realtimebattle-1.0.8/0002755000175000017500000000000010404234341012645 5ustar moimoirealtimebattle-1.0.8/Robots/0002755000175000017500000000000010404234034014114 5ustar moimoirealtimebattle-1.0.8/Robots/jBot/0002755000175000017500000000000010404234035015013 5ustar moimoirealtimebattle-1.0.8/Robots/jBot/Makefile.am0000644000175000017500000000051310170545361017053 0ustar moimoijbotdir = $(RTB_DIR)/Robots/jBot JAVAROOT=. jbot_DATA= JBot_C.java JBot.java JBotMain.java JBot_T.java Makefile.am jBot.robot.in EXTRA_DIST= $(jbot_DATA) if javacavailable if javaavailable robotexecdir = $(RTB_DIR)/Robots robotexec_SCRIPTS = jBot.robot jbot_JAVA = JBot_C.java JBot.java JBotMain.java JBot_T.java endif endif realtimebattle-1.0.8/Robots/jBot/Makefile.in0000644000175000017500000003604410324167711017074 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = Robots/jBot DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/jBot.robot.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = jBot.robot am__installdirs = "$(DESTDIR)$(robotexecdir)" "$(DESTDIR)$(jbotdir)" \ "$(DESTDIR)$(jbotdir)" robotexecSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(robotexec_SCRIPTS) SOURCES = DIST_SOURCES = CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT):$$CLASSPATH 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|^.*/||'`; jbotDATA_INSTALL = $(INSTALL_DATA) DATA = $(jbot_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ jbotdir = $(RTB_DIR)/Robots/jBot JAVAROOT = . jbot_DATA = JBot_C.java JBot.java JBotMain.java JBot_T.java Makefile.am jBot.robot.in EXTRA_DIST = $(jbot_DATA) @javaavailable_TRUE@@javacavailable_TRUE@robotexecdir = $(RTB_DIR)/Robots @javaavailable_TRUE@@javacavailable_TRUE@robotexec_SCRIPTS = jBot.robot @javaavailable_TRUE@@javacavailable_TRUE@jbot_JAVA = JBot_C.java JBot.java JBotMain.java JBot_T.java all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Robots/jBot/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Robots/jBot/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh jBot.robot: $(top_builddir)/config.status $(srcdir)/jBot.robot.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-robotexecSCRIPTS: $(robotexec_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(robotexecdir)" || $(mkdir_p) "$(DESTDIR)$(robotexecdir)" @list='$(robotexec_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)'`; \ echo " $(robotexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(robotexecdir)/$$f'"; \ $(robotexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(robotexecdir)/$$f"; \ else :; fi; \ done uninstall-robotexecSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(robotexec_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(robotexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(robotexecdir)/$$f"; \ done uninstall-info-am: classjbot.stamp: $(jbot_JAVA) @if test -n "$?"; then \ echo '$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) $?' ; \ $(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) \ $(AM_JAVACFLAGS) $(JAVACFLAGS) $?; \ else :; fi echo timestamp > classjbot.stamp install-jbotJAVA: classjbot.stamp @$(NORMAL_INSTALL) test -z "$(jbotdir)" || $(mkdir_p) "$(DESTDIR)$(jbotdir)" for p in `find . -name "*.class"`; do \ echo " $(INSTALL_DATA) '$$p' '$(DESTDIR)$(jbotdir)/$$p'"; \ $(INSTALL_DATA) "$$p" "$(DESTDIR)$(jbotdir)/$$p"; \ done uninstall-jbotJAVA: @$(NORMAL_UNINSTALL) @for p in `find . -name "*.class"`; do \ echo " rm -f '$(DESTDIR)$(jbotdir)/$$p'"; \ rm -f "$(DESTDIR)$(jbotdir)/$$p"; \ done clean-jbotJAVA: -rm -f *.class classjbot.stamp install-jbotDATA: $(jbot_DATA) @$(NORMAL_INSTALL) test -z "$(jbotdir)" || $(mkdir_p) "$(DESTDIR)$(jbotdir)" @list='$(jbot_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(jbotDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(jbotdir)/$$f'"; \ $(jbotDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(jbotdir)/$$f"; \ done uninstall-jbotDATA: @$(NORMAL_UNINSTALL) @list='$(jbot_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(jbotdir)/$$f'"; \ rm -f "$(DESTDIR)$(jbotdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 $(SCRIPTS) classjbot.stamp $(DATA) installdirs: for dir in "$(DESTDIR)$(robotexecdir)" "$(DESTDIR)$(jbotdir)" "$(DESTDIR)$(jbotdir)"; 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-jbotJAVA mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-jbotDATA install-jbotJAVA install-exec-am: install-robotexecSCRIPTS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-jbotDATA uninstall-jbotJAVA \ uninstall-robotexecSCRIPTS .PHONY: all all-am check check-am clean clean-generic clean-jbotJAVA \ distclean distclean-generic 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-jbotDATA install-jbotJAVA install-man \ install-robotexecSCRIPTS install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ uninstall-jbotDATA uninstall-jbotJAVA \ uninstall-robotexecSCRIPTS # 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: realtimebattle-1.0.8/Robots/jBot/jBot.robot.in0000644000175000017500000000100310404234035017355 0ustar moimoi#! /bin/sh # JBot, a robot for RealTimeBattle # written in Java, author: # Ingo Beckmann, Dec. 1999, # email: brain@nnTec.de #GameOptions: SEND_SIGNAL=0 SEND_ROTATION_REACHED=1 SIGNAL=2 USE_NON_BLOCKING=3 RTB_PATH=@ROBOTDIR@/jBot RobotName=JBot SLEEP=1 echo RobotOption $SEND_SIGNAL 0 echo RobotOption $SEND_ROTATION_REACHED 1 echo RobotOption $SIGNAL 0 echo RobotOption $USE_NON_BLOCKING 1 # program options: 1=SLEEP in [ms], 2=Robot Name exec @JAVA@ -classpath $CLASSPATH:$RTB_PATH JBotMain $SLEEP $RobotName realtimebattle-1.0.8/Robots/jBot/JBot_C.java0000644000175000017500000002542510342677430016777 0ustar moimoi// // // JBot_C v0.3.0 in JAVA // Robot for RealTimeBattle v1.0.2 // (c) 1999, 2000 by Ingo Beckmann // ingoBeckmann@gmx.de // 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. // // import java.util.*; import java.io.*; // What a Coward ! class JBot_C extends JBot { // Hello ! I am: final private static String myDefaultName = "Coward"; // borussiamoenchengladbachlikecolour: final private static String HOMECOLOUR="45c126", AWAYCOLOUR="b3e5d3"; // sleep in ms, everytime in do-loop: private int SLEEP; // How much time have I ? private double myTimeShare; private String[] warning; private boolean continueThis; private StringTokenizer st; private BufferedReader bf; private String msg2robotString, s; private int msg2robot, numberPars, lastAction, lastObject; private String[] parString; // Parameters // Info from RTB: double radarDistance, radarAngle, robotDistance, wallDistance, wallAngle, collisionAngle, time, speed, energyLevel, cannonAngle, otherRobotEnergy; int radarObjectType, collisionObjectType, optionType, warningType, robotsLeft; boolean otherRobotEnemy, rotationReached; // Variables: double rotate, flee; // Constructor: JBot_C (String name, int SLEEP, double timeShare) { super(name); this.SLEEP = SLEEP; myTimeShare = timeShare; warning = new String[WARNING_TYPE_COUNT]; parString = new String[MAX_PARAMETER_COUNT]; bf = new BufferedReader(new InputStreamReader(System.in)); // some Initialization: lastAction = UNKNOWN_MESSAGE_TO_ROBOT; lastObject = NOOBJECT; time = 0.0; rotate = 3.0; rotationReached = true; flee = 0.0; } // end Constructor // Constructor: JBot_C (int SLEEP, double timeShare) { // call constructor above with default name: this(myDefaultName, SLEEP, timeShare); } // end Constructor // JBot running as a thread: public void run () { // OK, start operation... do { try { if (bf.ready()) { // There is a message ! // Get the message waiting: st = new StringTokenizer(bf.readLine()); // get the message command (first token): if (st.hasMoreTokens()) msg2robotString = st.nextToken(); //System.err.println(msg2robotString); msg2robot = parseMessage(msg2robotString); // get number of parameters and put them in array of String: numberPars = st.countTokens(); for (int i=0; i myTimeShare) { handoverBaton = true; sendCommand("Sweep " +(ROT_CANNON+ROT_RADAR)+ " 1 0 0"); echo(myDefaultName+ ": time to say good bye..."); } s = "Info Message, time: " +time; echoDebug(s, 5); break; case ROBOT_INFO: otherRobotEnergy = parseDouble(parString[0]); otherRobotEnemy = (Integer.parseInt(parString[1])==0) ? true : false; s = "RobotInfo Message"; echoDebug(s, 5); break; case COLLISION: collisionObjectType = Integer.parseInt(parString[0]); collisionAngle = parseDouble(parString[1]); //echoDebug("hit something at angle=" +collisionAngle, 4); switch (collisionObjectType) { case ROBOT: sendCommand("Shoot 10"); if (rotationReached) { sendCommand("RotateAmount "+ROT_ROBOT+" 0.5 " +TWO_PI/3 ); rotationReached = false; sendCommand("Brake 0"); sendCommand("Accelerate 1"); flee = time + 1 + 2*Math.random(); //echoDebug("A robot! Panicing for " +(int)((flee-time)*1000)+ "ms", 4); echoDebug("Oh, excuse me! My Name is "+myDefaultName, 4); } break; case SHOT: if (rotationReached) { sendCommand("RotateAmount "+ROT_ROBOT+" 0.5 " +(-TWO_PI/3) ); rotationReached = false; } sendCommand("Brake 0"); sendCommand("Accelerate 2"); flee = time + 1 + 2*Math.random(); //echoDebug("A shot! Panicing for " +(int)((flee-time)*1000)+ "ms", 4); echoDebug("Ouch!", 4); break; case WALL: if (time > flee) { if (rotationReached) { sendCommand("RotateAmount " +ROT_ROBOT+ " 1.5 " + ((collisionAngle+TWO_PI/2)%TWO_PI) ); rotationReached = false; } sendCommand("Brake 1.0"); sendCommand("Accelerate 0"); } break; case COOKIE: echoDebug("Yumm Yumm", 3); break; case MINE: echoDebug("I hit a mine!", 3); break; default: break; } s = "Collision Message"; echoDebug(s, 5); break; case ENERGY: energyLevel = parseDouble(parString[0]); // Energy lower than 70% ? if (energyLevel*10 < gameOption[ROBOT_START_ENERGY]*7) { handoverBaton = true; sendCommand("Sweep " +(ROT_CANNON+ROT_RADAR)+ " 1 0 0"); echo(myDefaultName+ ": low on energy, leaving..."); } echoDebug(s, 5); break; case ROBOTS_LEFT: robotsLeft = Integer.parseInt(parString[0]); if (robotsLeft == 2) { handoverBaton = true; sendCommand("Sweep " +(ROT_CANNON+ROT_RADAR)+ " 1 0 0"); echo(myDefaultName+ ": Hey, where are you ?"); } s = "RobotsLeft Message: "+robotsLeft; echoDebug(s, 5); break; case ROTATION_REACHED: // Integer.parseInt(parString[0]); rotationReached = true; s = "RotationReached Message"; echoDebug(s, 5); break; case GAME_OPTION: optionType = Integer.parseInt(parString[0]); gameOption[optionType] = parseDouble(parString[1]); switch (optionType) { case DEBUG_LEVEL: setDebugLevel(gameOption[optionType]); break; default: break; } echoDebug("received GameOption " +optionType+ ": "+gameOption[optionType], 3); break; case GAME_STARTS: sendCommand("Rotate " +ROT_ROBOT+ " 1.5"); echo("Let's go !"); break; case INITIALIZE: if (Integer.parseInt(parString[0])==1) { sendCommand("Name " +Name); sendCommand("Colour " +HOMECOLOUR+ " " +AWAYCOLOUR); } echo("Alive & Kicking !!!"); break; case WARNING: warningType = Integer.parseInt(parString[0]); warning[warningType] = parString[1]; if (warningType == PROCESS_TIME_LOW) echo("low on CPU-time: " +warning[warningType]); echoDebug("Warning Message: " +warningType+ " " + warning[warningType], 2); break; case DEAD: // be quiet from now on: dead = true; break; case GAME_FINISHES: gameFinishes = true; break; case EXIT_ROBOT: exitRobot = true; echo("Bye, bye."); break; case YOUR_NAME: break; case YOUR_COLOUR: break; case UNKNOWN_MESSAGE_TO_ROBOT: s = msg2robotString + " with " + numberPars + " parameters"; echo("*** Unknown Message *** : " + s); break; default: break; } // end switch (msg2robot) // when there is no message: } else { // No new message: echoDebug("is sad. No message for him.", 5); // sleep in my spare time: try { int extra_sleep = 2*SLEEP+1; echoDebug("gets some extra sleep: " +extra_sleep+ "ms", 5); sleep(extra_sleep); } catch (InterruptedException ie) { echoDebug("*** InterruptedException ***", 1); } } // bf not ready // do other stuff here echoDebug("could do something else", 5); } // end try {...} // Exception caused by BufferedReader ? catch (IOException ioX) { echoDebug("*** IOException ***", 1); } // Exception caused by StringTokenizer ? catch (NoSuchElementException nseX) { echoDebug("*** NoSuchElementException ***", 1); } // Exception caused by parsing routines ? catch (NumberFormatException nfeX) { echoDebug("*** NumberFormatException ***", 1); } catch (ArrayIndexOutOfBoundsException aiobX) { echoDebug("*** ArrayIndexOutOfBoundsException ***:"+msg2robotString, 1); } catch (Exception x) { echoDebug("*** Exception *** "+x.toString(), 1); } continueThis = !(dead || gameFinishes || exitRobot || handoverBaton); // Finally find some sleep (guaranteed!): if (continueThis && SLEEP > 0) try { echoDebug("sleeping for " +SLEEP+ "ms, ...zzzz...zzz....", 5); sleep(SLEEP); } catch (InterruptedException ie) { echoDebug("*** InterruptedException ***", 1); } } while (continueThis); } // end run } // end JBot_C realtimebattle-1.0.8/Robots/jBot/JBot.java0000644000175000017500000001416010342677431016530 0ustar moimoi// // // JBot v0.2.0 in JAVA // Robot for RealTimeBattle v1.0.5 // 'include'-file & some methods // (c) 1999, 2000 by Ingo Beckmann // ingoBeckmann@gmx.de // 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. class JBot extends Thread { // Robot Name: String Name; // Robot & Game flags: static boolean dead = false, gameFinishes = false, exitRobot = false, handoverBaton = false; // Debug Level: 1=Exceptions, 2=Warnings, 3=rare events, // 4=frequent events, 5=trivial messages private double debugLevel; // Some Mathematics: public static final double TWO_PI = 2.0*Math.PI; // and, most important (in milliseconds): public static final int DEFAULT_SLEEP = 4; // default timeshare [s], should be big enough for a robot fighting 'til end of game: public static final double UNTIL_END = 10000.0; // Constants: public static final int MAX_PARAMETER_COUNT = 4, WARNING_TYPE_COUNT = 7, GAME_OPTION_COUNT = 15; // make GameOptions accessible for 'other' robots... static double[] gameOption = new double[GAME_OPTION_COUNT]; // Warning Types: public static final int UNKNOWN_MESSAGE = 0, PROCESS_TIME_LOW = 1, //ENERGY_LOW, //VARIABLE_OUT_OF_RANGE, MESSAGE_SENT_IN_ILLEGAL_STATE = 2, UNKNOWN_OPTION = 3, OBSOLETE_KEYWORD = 4, NAME_NOT_GIVEN = 5, COLOUR_NOT_GIVEN = 6; // Game Option Types: public static final int ROBOT_MAX_ROTATE = 0, ROBOT_CANNON_MAX_ROTATE = 1, ROBOT_RADAR_MAX_ROTATE = 2, ROBOT_MAX_ACCELERATION = 3, ROBOT_MIN_ACCELERATION = 4, ROBOT_START_ENERGY = 5, ROBOT_MAX_ENERGY = 6, ROBOT_ENERGY_LEVELS = 7, SHOT_SPEED = 8, SHOT_MIN_ENERGY = 9, SHOT_MAX_ENERGY = 10, SHOT_ENERGY_INCREASE_SPEED = 11, TIMEOUT = 12, DEBUG_LEVEL = 13, // 0 - no debug, 5 - highest debug level SEND_ROBOT_COORDINATES= 14; // 0 - no coordinates, // 1 - coordinates are given relative the starting position // 2 - absolute coordinates // Robot Option Types: public static final int SIGNAL = 2, // 0 - no signal, > 1 - signal to send (e.g. SIGUSR1 or SIGUSR2) SEND_SIGNAL = 0, // 0 - false, 1 - true SEND_ROTATION_REACHED = 1, // 0 - no messages // 1 - messages when RotateTo and RotateAmount finished // 2 - messages also when sweep direction is changed USE_NON_BLOCKING = 3; // 0 - false, 1 - true // This option should always be sent as soon as possible // Object Types: public static final int NOOBJECT = -1, ROBOT = 0, SHOT = 1, WALL = 2, COOKIE = 3, MINE = 4, LAST_OBJECT_TYPE = 5; // Rotation Object Types: public static final int ROT_ROBOT = 1, ROT_CANNON = 2, ROT_RADAR = 4; // Messages to Robot: public static final int INITIALIZE = 1001, YOUR_NAME = 1002, YOUR_COLOUR = 1003, GAME_OPTION = 1004, GAME_STARTS = 1005, RADAR = 1006, INFO = 1007, ROBOT_INFO = 1008, ROTATION_REACHED = 1009, ENERGY = 1010, ROBOTS_LEFT = 1011, COLLISION = 1012, WARNING = 1013, DEAD = 1014, GAME_FINISHES = 1015, EXIT_ROBOT = 1016, // this line was added by Johannes Nicolai COORDINATES=1017, UNKNOWN_MESSAGE_TO_ROBOT = -1; // JBot Constructor: JBot (String Name) { super(); this.Name = Name; if (dead || gameFinishes || handoverBaton) { debugLevel = gameOption[DEBUG_LEVEL]; // with predecessor take old debug level } else { debugLevel = 3; // so I see the GameOptions in the beginning } dead = false; gameFinishes = false; exitRobot = false; handoverBaton = false; } public final int parseMessage(String s) { if (s == null) return UNKNOWN_MESSAGE_TO_ROBOT; if (s.equals("Radar")) return RADAR; if (s.equals("Info")) return INFO; if (s.equals("RobotInfo")) return ROBOT_INFO; if (s.equals("Collision")) return COLLISION; if (s.equals("Energy")) return ENERGY; if (s.equals("RotationReached")) return ROTATION_REACHED; if (s.equals("RobotsLeft")) return ROBOTS_LEFT; if (s.equals("GameOption")) return GAME_OPTION; if (s.equals("GameStarts")) return GAME_STARTS; if (s.equals("Initialize")) return INITIALIZE; if (s.equals("Warning")) return WARNING; if (s.equals("Dead")) return DEAD; if (s.equals("GameFinishes")) return GAME_FINISHES; if (s.equals("ExitRobot")) return EXIT_ROBOT; if (s.equals("YourName")) return YOUR_NAME; if (s.equals("YourColour")) return YOUR_COLOUR; // this line was added by Johannes Nicolai if (s.equals("Coordinates")) return COORDINATES; return UNKNOWN_MESSAGE_TO_ROBOT; } // Here are some common methods for all JBots: public final double parseDouble (String s) { return Double.valueOf(s).doubleValue(); } public final void echo (String s) { sendCommand("Print " + s); } public final void echoDebug (String s, double dl) { // !!! MAX_DEBUG_LEVEL = 5 !!! // for a competitive robot, you might want to comment out the following line: if ( (debugLevel>=dl) && (dl>0.0) && (dl<=5.0) ) sendCommand("Debug " + s); } public final void sendCommand (String s) { System.out.println( s ); System.out.flush(); } final void setDebugLevel (double dl) { debugLevel = dl; } } realtimebattle-1.0.8/Robots/jBot/JBotMain.java0000644000175000017500000000477010342677430017342 0ustar moimoi// // // JBotMain v0.2.0 // Robot for RealTimeBattle in JAVA // (c) 1999 by Ingo Beckmann // ingoBeckmann@gmx.de // 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. class JBotMain { public static void main (String[] argv) { // default sleeping time in ms: int SLEEP = JBot.DEFAULT_SLEEP; double timeShare; // get sleeping duration from first command line option: if (argv.length > 0) try { SLEEP = Integer.parseInt(argv[0]); } catch (NumberFormatException nfe) { System.err.println("Could not parse sleeping duration, taking "+SLEEP+" ms instead !"); } // Send RobotOptions: /* System.out.println("RobotOption " +JBot.SEND_SIGNAL+ " 0"); System.out.println("RobotOption " +JBot.SEND_ROTATION_REACHED+ " 1"); System.out.println("RobotOption " +JBot.SIGNAL+ " 0"); System.out.println("RobotOption " +JBot.USE_NON_BLOCKING+ " 1"); */ JBot jBot; do { // Robot 1... if (true) { timeShare = 25.0; if (argv.length > 1) { jBot = new JBot_C (argv[1], SLEEP, timeShare); } else { jBot = new JBot_C (SLEEP, timeShare); } // ...gets started: jBot.start(); // Wait for Thread to finish: try { jBot.join(); } catch (InterruptedException ie) { System.err.println("JBotMain: Interrupt during join() !"); } } // Robot 2... if (JBot.handoverBaton) { timeShare = JBot.UNTIL_END; if (argv.length > 1) { jBot = new JBot_T (argv[1], SLEEP, timeShare); } else { jBot = new JBot_T (SLEEP, timeShare); } // ...gets started: jBot.start(); // Wait for Thread to finish: try { jBot.join(); } catch (InterruptedException ie) { System.err.println("JBotMain: Interrupt during join() !"); } } } while (!JBot.exitRobot); } // end void main } realtimebattle-1.0.8/Robots/jBot/JBot_T.java0000644000175000017500000002345510342677430017021 0ustar moimoi// // // JBot_T v0.2.0 in JAVA // Robot for RealTimeBattle v0.9.11 // (c) 1999 by Ingo Beckmann // ingoBeckmann@gmx.de // 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. import java.util.*; import java.io.*; // My sweet little Terminator: class JBot_T extends JBot { // Hello ! I am: final private static String myDefaultName = "T100"; // borussiamoenchengladbachlikecolour: final private static String HOMECOLOUR="45c126", AWAYCOLOUR="b3e5d3"; // sleep in ms, everytime in do-loop: private int SLEEP; // How much time have I ? private double myTimeShare; private String[] warning; private boolean continueThis; private StringTokenizer st; private BufferedReader bf; private String msg2robotString, s; private int msg2robot, numberPars, lastAction, lastObject; private String[] parString; // Parameters // Info from RTB: double radarDistance, radarAngle, robotDistance, wallDistance, wallAngle, collisionAngle, time, speed, energyLevel, cannonAngle, otherRobotEnergy; int radarObjectType, collisionObjectType, optionType, warningType, robotsLeft, rotationReached; boolean otherRobotEnemy; // Variables: int salve, maxSalve; double rotate; boolean rotFlag; // Constructor: JBot_T (String Name, int SLEEP, double timeShare) { super(Name); this.SLEEP = SLEEP; myTimeShare = timeShare; warning = new String[WARNING_TYPE_COUNT]; parString = new String[MAX_PARAMETER_COUNT]; bf = new BufferedReader(new InputStreamReader(System.in)); // some Initialization: lastAction = UNKNOWN_MESSAGE_TO_ROBOT; lastObject = NOOBJECT; time = 0.0; rotate = 3.0; rotFlag = false; salve = 0; maxSalve = 2; robotDistance = 0.0; } // end Constructor // Constructor: JBot_T (int SLEEP, double timeShare) { // call constructor above with default name: this(myDefaultName, SLEEP, timeShare); } // end Constructor // JBot running as a thread: public void run () { // OK, start operation... do { try { if (bf.ready()) { // There is a message ! // Get the message waiting: st = new StringTokenizer(bf.readLine()); // get the message command (first token): if (st.hasMoreTokens()) msg2robotString = st.nextToken(); msg2robot = parseMessage(msg2robotString); // get number of parameters and put them in an array of String: numberPars = st.countTokens(); for (int i=0; i 4.0) { sendCommand("Rotate " +ROT_ROBOT+ " " +rotate/3); sendCommand("Brake 0"); sendCommand("Accelerate 1.2"); } else { sendCommand("Rotate " +ROT_ROBOT+ " 0"); sendCommand("Brake 0"); sendCommand("Accelerate -0.3"); //sendCommand("Brake 1"); } sendCommand("Shoot 10"); if (rotFlag && robotDistance>5.0) { rotFlag = false; rotate = -rotate; echoDebug("reversing my rotation", 4); } break; case SHOT: if (salve < maxSalve) { sendCommand("Shoot 5"); sendCommand("Rotate " +ROT_ROBOT+ " " +rotate/10); salve++; echoDebug("shooting a shot", 5); //if (robotDistance>2) sendCommand("RotateAmount "+ROT_ROBOT+" "+rotate/3+" "+1/robotDistance/4); } else { sendCommand("Rotate " +ROT_ROBOT+ " 0"); } break; case WALL: wallDistance = radarDistance; wallAngle = radarAngle; if (wallDistance < 2.0) { sendCommand("Brake 1"); } else { sendCommand("Brake 0"); sendCommand("Accelerate 1"); } rotFlag = true; sendCommand("Rotate " +ROT_ROBOT+ " " +rotate); break; case COOKIE: sendCommand("Rotate " +ROT_ROBOT+ " 0"); if (speed<4.0) { sendCommand("Accelerate 2.0"); } else { sendCommand("Accelerate 0.0"); echoDebug("running at maximum-cookie-speed!", 4); } break; case MINE: if (radarDistance<8.0) sendCommand("Shoot 1"); break; default: break; } if (radarObjectType != SHOT) salve = 0; s = "Radar Message"; echoDebug(s, 5); break; // end CASE RADAR case INFO: time = parseDouble(parString[0]); speed = parseDouble(parString[1]); cannonAngle = parseDouble(parString[2]); // game over for me ? if (time > myTimeShare) { handoverBaton = true; echo(myDefaultName+ ": handing over to my successor..."); } s = "Info Message, time: " +time; echoDebug(s, 5); break; case ROBOT_INFO: otherRobotEnergy = parseDouble(parString[0]); otherRobotEnemy = (Integer.parseInt(parString[1])==0) ? true : false; s = "RobotInfo Message"; echoDebug(s, 5); break; case COLLISION: collisionObjectType = Integer.parseInt(parString[0]); collisionAngle = parseDouble(parString[1]); switch (collisionObjectType) { case ROBOT: sendCommand("RotateAmount " +ROT_ROBOT+ " " +collisionAngle); break; case SHOT: echoDebug("Ouch !", 4); break; case WALL: break; case COOKIE: echoDebug("Yumm Yumm !", 3);; break; case MINE: echoDebug("I hit a mine !", 3); break; default: break; } s = "Collision Message"; echoDebug(s, 5); break; case ENERGY: energyLevel = parseDouble(parString[0]); s = "Energy Message"; echoDebug(s, 5); break; case ROBOTS_LEFT: robotsLeft = Integer.parseInt(parString[0]); s = "RobotsLeft Message"; echoDebug(s, 5); break; case ROTATION_REACHED: rotationReached = Integer.parseInt(parString[0]); s = "RotationReached Message"; echoDebug(s, 5); break; case GAME_OPTION: optionType = Integer.parseInt(parString[0]); gameOption[optionType] = parseDouble(parString[1]); switch (optionType) { case DEBUG_LEVEL: setDebugLevel(gameOption[optionType]); break; default: break; } echoDebug("received GameOption " +optionType+ ": "+gameOption[optionType], 3); break; case GAME_STARTS: echo("Let's go !"); break; case INITIALIZE: if (Integer.parseInt(parString[0])==1) { sendCommand("Name " +Name); sendCommand("Colour " +HOMECOLOUR+ " " +AWAYCOLOUR); } echo("Alive & Kicking !!!"); break; case WARNING: warningType = Integer.parseInt(parString[0]); warning[warningType] = parString[1]; if (warningType == PROCESS_TIME_LOW) echo("low on CPU-time: " +warning[warningType]); echoDebug("Warning Message: " +warningType+ " " + warning[warningType], 2); break; case DEAD: // be quiet from now on: dead = true; break; case GAME_FINISHES: gameFinishes = true; break; case EXIT_ROBOT: exitRobot = true; echo("I'll be back."); break; case YOUR_NAME: break; case YOUR_COLOUR: break; // the coordinate treatment was added by Johannes Nicolai // we do not need any coordinate information case COORDINATES: break; case UNKNOWN_MESSAGE_TO_ROBOT: s = msg2robotString + " with " + numberPars + " parameters"; echo("*** Unknown Message ***: " + s); break; default: break; } // end switch (msg2robot) // when there is no message: } else { // No new message: echoDebug("is sad. No message for him.", 5); // sleep in my spare time: try { int extra_sleep = 2*SLEEP+1; echoDebug("gets some extra sleep: " +extra_sleep+ "ms", 5); sleep(extra_sleep); } catch (InterruptedException ie) { echoDebug("*** InterruptedException ***", 1); } } // do other stuff here echoDebug("could do something else", 5); } // end try {...} // Exception caused by BufferedReader ? catch (IOException ioX) { echoDebug("*** IOException ***", 1); } // Exception caused by StringTokenizer ? catch (NoSuchElementException nseX) { echoDebug("*** NoSuchElementException ***", 1); } // Exception caused by parsing routines ? catch (NumberFormatException nfeX) { echoDebug("*** NumberFormatException ***", 1); } catch (ArrayIndexOutOfBoundsException aiobX) { echoDebug("*** ArrayIndexOutOfBoundsException ***", 1); } catch (Exception x) { echoDebug("*** Exception *** "+x.toString(), 1); } continueThis = !(dead || gameFinishes || exitRobot || handoverBaton); // Finally find some sleep (guaranteed!): if (continueThis && SLEEP > 0) try { echoDebug("sleeping for " +SLEEP+ "ms, ...zzzz...zzz....", 5); sleep(SLEEP); } catch (InterruptedException ie) { echoDebug("*** InterruptedException ***", 1); } } while (continueThis); } // end run } // end JBot_T realtimebattle-1.0.8/Robots/perl/0002755000175000017500000000000010404234033015055 5ustar moimoirealtimebattle-1.0.8/Robots/perl/Makefile.am0000644000175000017500000000027110276702357017127 0ustar moimoiperlrobotdir = $(RTB_DIR)/Robots/perl perlrobot_DATA= perl.robot.in EXTRA_DIST= $(perlrobot_DATA) if perlavailable robotexecdir = $(RTB_DIR)/Robots robotexec_SCRIPTS = perl.robot endif realtimebattle-1.0.8/Robots/perl/Makefile.in0000644000175000017500000003367310324167711017145 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = Robots/perl DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/perl.robot.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = perl.robot am__installdirs = "$(DESTDIR)$(robotexecdir)" \ "$(DESTDIR)$(perlrobotdir)" robotexecSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(robotexec_SCRIPTS) SOURCES = DIST_SOURCES = 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|^.*/||'`; perlrobotDATA_INSTALL = $(INSTALL_DATA) DATA = $(perlrobot_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ perlrobotdir = $(RTB_DIR)/Robots/perl perlrobot_DATA = perl.robot.in EXTRA_DIST = $(perlrobot_DATA) @perlavailable_TRUE@robotexecdir = $(RTB_DIR)/Robots @perlavailable_TRUE@robotexec_SCRIPTS = perl.robot all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Robots/perl/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Robots/perl/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh perl.robot: $(top_builddir)/config.status $(srcdir)/perl.robot.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-robotexecSCRIPTS: $(robotexec_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(robotexecdir)" || $(mkdir_p) "$(DESTDIR)$(robotexecdir)" @list='$(robotexec_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)'`; \ echo " $(robotexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(robotexecdir)/$$f'"; \ $(robotexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(robotexecdir)/$$f"; \ else :; fi; \ done uninstall-robotexecSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(robotexec_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(robotexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(robotexecdir)/$$f"; \ done uninstall-info-am: install-perlrobotDATA: $(perlrobot_DATA) @$(NORMAL_INSTALL) test -z "$(perlrobotdir)" || $(mkdir_p) "$(DESTDIR)$(perlrobotdir)" @list='$(perlrobot_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(perlrobotDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(perlrobotdir)/$$f'"; \ $(perlrobotDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(perlrobotdir)/$$f"; \ done uninstall-perlrobotDATA: @$(NORMAL_UNINSTALL) @list='$(perlrobot_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(perlrobotdir)/$$f'"; \ rm -f "$(DESTDIR)$(perlrobotdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(robotexecdir)" "$(DESTDIR)$(perlrobotdir)"; 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-perlrobotDATA install-exec-am: install-robotexecSCRIPTS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-perlrobotDATA \ uninstall-robotexecSCRIPTS .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic 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-perlrobotDATA install-robotexecSCRIPTS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ uninstall-perlrobotDATA uninstall-robotexecSCRIPTS # 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: realtimebattle-1.0.8/Robots/perl/perl.robot.in0000644000175000017500000001547510404222764017515 0ustar moimoi#! @PERL_SHEBANG@ use strict; use IO::Handle; srand; sub UNKNOWN_MESSAGE() {0} sub PROCESS_TIME_LOW() {1} sub MESSAGE_SENT_IN_ILLEGAL_STATE() {2} sub UNKNOWN_OPTION() {3} sub OBSOLETE_KEYWORD() {4} sub ROBOT_MAX_ROTATE() {0} sub ROBOT_CANNON_MAX_ROTATE() {1} sub ROBOT_RADAR_MAX_ROTATE() {2} sub ROBOT_MAX_ACCELERATION() {3} sub ROBOT_MIN_ACCELERATION() {4} sub ROBOT_START_ENERGY() {5} sub ROBOT_MAX_ENERGY() {6} sub ROBOT_ENERGY_LEVELS() {7} sub SHOT_SPEED() {8} sub SHOT_MIN_ENERGY() {9} sub SHOT_MAX_ENERGY() {10} sub SHOT_ENERGY_INCREASE_SPEED() {11} sub TIMEOUT() {12} sub DEBUG_LEVEL() {13} sub SIGNAL() {2} sub SEND_SIGNAL() {0} sub SEND_ROTATION_REACHED() {1} sub NOOBJECT() {-1} sub ROBOT() {0} sub SHOT() {1} sub WALL() {2} sub COOKIE() {3} sub MINE() {4} sub LAST_OBJECT_TYPE() {5} ################################################################## # CMDs sub RobotOption($$){ my ($nr, $value) = @_; print "RobotOption $nr $value\n"; } sub Name($) { my $name = shift; print "Name $name\n"; } sub Colour($) { my $color = shift; print "Colour $color\n"; } sub Color($) { Colour(@_) } sub Rotate($$) { my $what = shift; # 1 - robot, 2 - cannon, 4 - radar my $v = shift; # velocity print "Rotate $what $v\n"; } sub RotateTo($$$) { my ($what, $v, $end) = @_; print "RotateTo $what $v $end\n"; } sub RotateAmount($$$) { my ($what, $v, $angl) = @_; print "RotateAmount $what $v $angl\n"; } sub Sweep($$$$) { my ($what, $v, $la, $ra) = @_; print "Sweep $what $v $la $ra\n"; } sub Accelerate($) { my $value = shift; print "Accelerate $value\n"; } sub Brake($) { my $portion = shift; print "Brake $portion\n"; } sub Shoot($) { my $energy = shift; print "Shoot $energy\n"; } sub Print(@) { my $txt = join(" ",@_); print "Print $txt\n"; } sub Debug($) { my $txt = shift; print "Debug $txt\n"; } sub DebugLine($$$$) { my ($a1, $r1, $a2, $r2) = @_; print "DebugLine $a1 $r1 $a2 $r2\n"; } sub DebugCircle($$$) { my ($a,$r1,$r2) = @_; print "DebugCircle $a $r1 $r2\n"; } # Objects: Robot=0, Shot=1, Wall=2, Cookie=3, Mine=4, LAST=5 my $NAME = "Perl v0.0"; my $COLOR= "00ff00 ff0000"; my $QUIT = 0; my %OPTION; my %RDATA = (Energy => 100, RobotsLeft => 0); open(LOG,">>/tmp/perl.robot.log") || die "Kann Logfile nicht ffnen: $!"; LOG->autoflush(1); STDOUT->autoflush(1); STDERR->autoflush(1); RobotOption(SIGNAL,10); # Get Signals # Signalhandler $SIG{USR1} = \&check_message; $SIG{USR2} = 'IGNORE'; $SIG{HUP} = \&quit_bot; print LOG "Starting Roboter\n"; while(not $QUIT) { &run_robot } print LOG "Jetzt ist aber Ende\a\n"; exit; ################################################################### sub run_robot() { sleep(1); } sub quit_bot() { $QUIT = 1; run_robot(); } sub check_message() { my $signame = shift; my @input = ; foreach my $msg (@input) { chomp($msg); # entferne \n if ($msg) {&parse($msg)} } run_robot(); } sub parse($) { my $input = shift; my ($cmd, @arg) = split(" ",$input); if ($cmd eq "Initialize") {Initialize($arg[0])} elsif ($cmd eq "YourName") {YourName(@arg)} elsif ($cmd eq "YourColour") {YourColour(@arg)} elsif ($cmd eq "GameOption") {GameOption(@arg)} elsif ($cmd eq "GameStarts") {GameStarts()} elsif ($cmd eq "Radar") {Radar(@arg)} elsif ($cmd eq "Info") {Info(@arg)} elsif ($cmd eq "RobotInfo") {RobotInfo(@arg)} elsif ($cmd eq "RotationReached") {RotationReached($arg[0])} elsif ($cmd eq "Energy") {Energy($arg[0])} elsif ($cmd eq "RobotsLeft") {RobotsLeft($arg[0])} elsif ($cmd eq "Collision") {Collision(@arg)} elsif ($cmd eq "Warning") {Warning(@arg)} elsif ($cmd eq "Dead") {Dead()} elsif ($cmd eq "GameFinishes") {GameFinishes()} elsif ($cmd eq "ExitRobot") {ExitRobot()} else {print LOG "Unknown Command $input\n"; # print "Print Unknown Command $input\n" } } #################################################### # Message: sub Initialize($) { my $arg = shift; if ($arg ==1) { print LOG "Initialising\n"; Name($NAME); Colour($COLOR); Print("Ahh, awaken again..."); } else { # warte auf YourName und Colour } } sub YourName(@) { $NAME = join(" ",@_); Print("My name is now $NAME"); } sub YourColour(@) { $COLOR = join(" ",@_); Print("My colo(u)r is now $COLOR"); } sub GameOption(@){ my @arg = @_; my ($optionnr,$value) = split(" ",@arg); $OPTION{$optionnr} = $value; } sub GameStarts() { Print("Let's go dancing..."); dump_options(); tac_move(); } sub Radar($$$) { my $dist = shift; my $obj = shift; my $angle= shift; # print LOG "Radar: $dist, $obj, $angle\n"; if ($obj == 0) {tac_fire($angle)} if ($obj == 2 or $obj == 4) {tac_wall($dist)} print LOG "Gotch: $obj\n" if ($obj == 5); } sub Info($$$) { my $time = shift; my $speed = shift; my $cannon= shift; # angle } sub RobotInfo($$) { my $energy = shift; my $team = shift; } sub RotationReached($) { my $reached = shift; } sub Energy($) { $RDATA{'Energy'} = shift; # print LOG "Energy: $RDATA{'Energy'}\n"; } sub RobotsLeft($) { my $robots = shift; if ($RDATA{RobotsLeft}) { if ($robots < $RDATA{RobotsLeft}) { Print("Gotcha. Onother one's gone! :-)"); } } $RDATA{RobotsLeft} = $robots; } sub Collision($$) { my $obj = shift; my $angle= shift; if ($obj == 4) {Print("Boom! Hit by a mine")} elsif ($obj == 3) {Print("Yamm! Cookies Cookiiiies!")} } sub Warning($$) { my $type = shift; my $msg = join(" ",@_); print LOG "WARN: ($type) $msg\n"; Print("Someone's fucking me: ($type) $msg"); } sub Dead() { Print("Fuck! Good Bye!"); } sub GameFinishes() { Print("Good Bye!"); } sub ExitRobot() { Print("10 9 8 7 6 5 4 3 2 1 ZERO and LIFT OFFFFFFFF"); exit(0); } ######################################################################### # Tools sub dump_options() { $OPTION{'ROBOT_MAX_ROTATE'}=12; print LOG "RobotMaxRotate(): ", $OPTION{ROBOT_MAX_ROTATE()},"\n"; print LOG "RobotMaxRotate: ", $OPTION{ROBOT_MAX_ROTATE},"\n"; print LOG "RobotCannonMaxRotate: ", $OPTION{ROBOT_CANNON_MAX_ROTATE()},"\n"; print LOG "RobotMaxAcceleration: ", $OPTION{ROBOT_MAX_ACCELERATION()},"\n"; print LOG "RobotMinAcceleration: ", $OPTION{ROBOT_MIN_ACCELERATION()},"\n"; print LOG "RobotStartEnergy: ", $OPTION{ROBOT_START_ENERGY()},"\n"; } ########################################################################## # Tactics sub tac_fire($) { my $angle= shift; RotateTo(7, 2, $angle); # print LOG "Trying to Hit Boogie at $angle\n"; Shoot(10); } sub tac_move() { my $speed = rand(1)+0.5; my $angle = rand(0.2)-0.4; Accelerate($speed); RotateAmount(7,$angle,360); } sub tac_wall() { my $dist = shift; if ($dist < 5) { Brake(1); RotateAmount(7,2.0,90); } else { tac_move } } realtimebattle-1.0.8/Robots/perl-Skeleton/0002755000175000017500000000000010404234033016637 5ustar moimoirealtimebattle-1.0.8/Robots/perl-Skeleton/Makefile.am0000644000175000017500000000032110170545362020677 0ustar moimoiperlskeldir = $(RTB_DIR)/Robots/perl-Skeleton perlskel_DATA= perl-Skeleton.robot.in EXTRA_DIST= $(perlskel_DATA) if perlavailable robotexecdir = $(RTB_DIR)/Robots robotexec_SCRIPTS = perl-Skeleton.robot endif realtimebattle-1.0.8/Robots/perl-Skeleton/Makefile.in0000644000175000017500000003377510324167711020732 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = Robots/perl-Skeleton DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/perl-Skeleton.robot.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = perl-Skeleton.robot am__installdirs = "$(DESTDIR)$(robotexecdir)" \ "$(DESTDIR)$(perlskeldir)" robotexecSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(robotexec_SCRIPTS) SOURCES = DIST_SOURCES = 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|^.*/||'`; perlskelDATA_INSTALL = $(INSTALL_DATA) DATA = $(perlskel_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ perlskeldir = $(RTB_DIR)/Robots/perl-Skeleton perlskel_DATA = perl-Skeleton.robot.in EXTRA_DIST = $(perlskel_DATA) @perlavailable_TRUE@robotexecdir = $(RTB_DIR)/Robots @perlavailable_TRUE@robotexec_SCRIPTS = perl-Skeleton.robot all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Robots/perl-Skeleton/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Robots/perl-Skeleton/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh perl-Skeleton.robot: $(top_builddir)/config.status $(srcdir)/perl-Skeleton.robot.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-robotexecSCRIPTS: $(robotexec_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(robotexecdir)" || $(mkdir_p) "$(DESTDIR)$(robotexecdir)" @list='$(robotexec_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)'`; \ echo " $(robotexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(robotexecdir)/$$f'"; \ $(robotexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(robotexecdir)/$$f"; \ else :; fi; \ done uninstall-robotexecSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(robotexec_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(robotexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(robotexecdir)/$$f"; \ done uninstall-info-am: install-perlskelDATA: $(perlskel_DATA) @$(NORMAL_INSTALL) test -z "$(perlskeldir)" || $(mkdir_p) "$(DESTDIR)$(perlskeldir)" @list='$(perlskel_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(perlskelDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(perlskeldir)/$$f'"; \ $(perlskelDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(perlskeldir)/$$f"; \ done uninstall-perlskelDATA: @$(NORMAL_UNINSTALL) @list='$(perlskel_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(perlskeldir)/$$f'"; \ rm -f "$(DESTDIR)$(perlskeldir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(robotexecdir)" "$(DESTDIR)$(perlskeldir)"; 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-perlskelDATA install-exec-am: install-robotexecSCRIPTS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-perlskelDATA \ uninstall-robotexecSCRIPTS .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic 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-perlskelDATA install-robotexecSCRIPTS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ uninstall-perlskelDATA uninstall-robotexecSCRIPTS # 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: realtimebattle-1.0.8/Robots/perl-Skeleton/perl-Skeleton.robot.in0000755000175000017500000001200710276172132023050 0ustar moimoi#! @PERL_SHEBANG@ #====================================================================== # perl.robot -- Copyright(c) 1999 Shinsuke Noguchi #====================================================================== # RealTimeBattleΥܥåȵѤΥȥǤ # Ū̿ʬƤޤ # åϥɥѹСñ˥ܥåȤ򵭽ҤǤޤ # ƻΥץȤ򻲹ͤˤĺޤ #====================================================================== #====================================================================== # Хѿ #====================================================================== $PI = 3.14159265359; ### 졼ȯ줿оݤΥ %OBJ = ( NOOBJECT, -1, ROBOT, 0, SHOT, 1, WALL, 2, COOKIE, 3, MINE, 4 ); ### ४ץ @OPTNUM = ( 'ROBOT_MAX_ROTATE', 'ROBOT_CANNON_MAX_ROTATE', 'ROBOT_RADAR_MAX_ROTATE', 'ROBOT_MAX_ACCELERATION', 'ROBOT_MIN_ACCELERATION', 'ROBOT_START_ENERGY', 'ROBOT_MAX_ENERGY', 'ROBOT_ENERGY_LEVELS', 'SHOT_SPEED', 'SHOT_MIN_ENERGY', 'SHOT_MAX_ENERGY', 'SHOT_ENERGY_INCREASE_SPEED', 'TIMEOUT', 'DEBUG_LEVEL', ); #====================================================================== # åϥɥ #====================================================================== #====================================================================== # Message: Initialize [first?(int)] #====================================================================== # ֺǽ˥ܥåȤå # ܥåȤNameColour򥵡Сޤ礦 #====================================================================== sub INITIALIZE { my($first) = @_; if ($first) { print "Name Skeleton\n"; print "Colour 22FF55 22FF55\n"; } } #====================================================================== # Message: GameOption [optionnr(int)] [val(double)] #====================================================================== # κž®ʤɡऴȤ꤬Ƥޤ # ΥץǤ$OPTION{ROBOT_MAX_ROTATE}ʤɤȤ뤳ȤǤͤ # ȤǤ褦ˤʤäƤޤ #====================================================================== sub GAMEOPTION { my( $opt, $val ) = @_; $OPTION{$OPTNUM[$opt]} = $val; } #====================================================================== # Message: GameStarts #====================================================================== # ೫ϻƤåǤ # ܥåȤνưεҤ䡤ѿνԤɤǤ礦 #====================================================================== sub GAMESTARTS { printf "Accelerate %f\n", 0.1; printf "Rotate 1 %f\n", 0.3; } #====================================================================== # Message: Rader[distance(double)] [observed object type(int)] # [rader angle(double)] #====================================================================== # 西Ƥ졼ξǤư򵭽Ҥ # ȤǡȿŪư򤹤ܥåȤĤ뤳ȤǤޤ #====================================================================== sub RADAR { ($DIST, $TYPE, $RANGLE) = @_; if( $TYPE == $OBJ{ROBOT} ) { printf "Shoot %f\n", $OPTION{SHOT_MAX_ENERGY}; } else { printf "Rotate 6 %f\n", 1.0; } } #====================================================================== # Message: ExitRobot #====================================================================== # ΥåƤ硤ľ˥ץλɬפ # ޤ #====================================================================== sub EXITROBOT { exit; } #====================================================================== # å롼 #====================================================================== sub in { my( $str, @args, $msg, $callstr ) = @_; chop($str); @args = split(/\s/,$str); $msg = shift(@args); $msg =~ tr/[a-z]/[A-Z]/; $callstr = sprintf "do $msg('%s')", join("','",@args); eval($callstr); } sub idol { ### ܥåȤΥɥ֤˲򤷤 ### ˵ҤƤ } sub wait_message { my($rbit,$ebit,$str); while(1) { $ebit = $rbit = ''; vec($rbit,fileno(STDIN),1) = 1; select($rbit,undef,$ebit,1); if ( vec($rbit,fileno(STDIN),1) ) { if ($str = ) { do in($str); next; } } do idol(); } } #====================================================================== # ᥤ #====================================================================== $|=1; print "RobotOption 3 0\n"; &wait_message; exit; #====================================================================== # ٤ #====================================================================== sub nrad { my($rad,$deg) = @_; $deg = $rad * 180 / $PI; $deg = (($deg + 180) % 360) - 180; return $deg * $PI / 180.0; } realtimebattle-1.0.8/Robots/raziel/0002755000175000017500000000000010404234033015401 5ustar moimoirealtimebattle-1.0.8/Robots/raziel/Makefile.am0000644000175000017500000000031510320513352017433 0ustar moimoirazielrobotdir = $(RTB_DIR)/Robots/raziel razielrobot_DATA= raziel.py.robot.in EXTRA_DIST= $(razielrobot_DATA) if pythonavailable robotexecdir = $(RTB_DIR)/Robots robotexec_SCRIPTS = raziel.py.robot endif realtimebattle-1.0.8/Robots/raziel/Makefile.in0000644000175000017500000003402510324167711017461 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = Robots/raziel DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/raziel.py.robot.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = raziel.py.robot am__installdirs = "$(DESTDIR)$(robotexecdir)" \ "$(DESTDIR)$(razielrobotdir)" robotexecSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(robotexec_SCRIPTS) SOURCES = DIST_SOURCES = 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|^.*/||'`; razielrobotDATA_INSTALL = $(INSTALL_DATA) DATA = $(razielrobot_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ razielrobotdir = $(RTB_DIR)/Robots/raziel razielrobot_DATA = raziel.py.robot.in EXTRA_DIST = $(razielrobot_DATA) @pythonavailable_TRUE@robotexecdir = $(RTB_DIR)/Robots @pythonavailable_TRUE@robotexec_SCRIPTS = raziel.py.robot all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Robots/raziel/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Robots/raziel/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh raziel.py.robot: $(top_builddir)/config.status $(srcdir)/raziel.py.robot.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-robotexecSCRIPTS: $(robotexec_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(robotexecdir)" || $(mkdir_p) "$(DESTDIR)$(robotexecdir)" @list='$(robotexec_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)'`; \ echo " $(robotexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(robotexecdir)/$$f'"; \ $(robotexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(robotexecdir)/$$f"; \ else :; fi; \ done uninstall-robotexecSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(robotexec_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(robotexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(robotexecdir)/$$f"; \ done uninstall-info-am: install-razielrobotDATA: $(razielrobot_DATA) @$(NORMAL_INSTALL) test -z "$(razielrobotdir)" || $(mkdir_p) "$(DESTDIR)$(razielrobotdir)" @list='$(razielrobot_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(razielrobotDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(razielrobotdir)/$$f'"; \ $(razielrobotDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(razielrobotdir)/$$f"; \ done uninstall-razielrobotDATA: @$(NORMAL_UNINSTALL) @list='$(razielrobot_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(razielrobotdir)/$$f'"; \ rm -f "$(DESTDIR)$(razielrobotdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(robotexecdir)" "$(DESTDIR)$(razielrobotdir)"; 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-razielrobotDATA install-exec-am: install-robotexecSCRIPTS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-razielrobotDATA \ uninstall-robotexecSCRIPTS .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic 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-razielrobotDATA install-robotexecSCRIPTS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ uninstall-razielrobotDATA uninstall-robotexecSCRIPTS # 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: realtimebattle-1.0.8/Robots/raziel/raziel.py.robot.in0000755000175000017500000000044310323176125021003 0ustar moimoi#! @PYTHON@ print 'RobotOption 3 0' print 'RobotOption 1 1\n' print 'Name razziel' print 'Colour ee299 aaffaa\n' x=raw_input('') while (x!='Dead') or (x!='GameFinishes'): print 'Accelerate 0.5\n' print 'Rotate 7 3\n' for i in range(0,10): print 'Shoot 10\n' realtimebattle-1.0.8/Robots/Makefile.am0000644000175000017500000000015410320514455016153 0ustar moimoiSUBDIRS = empty rotate_and_fire seek_and_destroy xt-bot thomas2 joypad_robot jBot perl-Skeleton perl raziel realtimebattle-1.0.8/Robots/Makefile.in0000644000175000017500000004126310324167710016174 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = Robots DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = 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 ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ SUBDIRS = empty rotate_and_fire seek_and_destroy xt-bot thomas2 joypad_robot jBot perl-Skeleton perl raziel all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Robots/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Robots/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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) @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 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: 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) 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 mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-recursive ctags ctags-recursive \ distclean distclean-generic distclean-recursive 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 \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # 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: realtimebattle-1.0.8/Robots/empty/0002755000175000017500000000000010404234034015252 5ustar moimoirealtimebattle-1.0.8/Robots/empty/Makefile.am0000644000175000017500000000026610170545362017321 0ustar moimoirobotexecdir = $(RTB_DIR)/Robots robotexec_PROGRAMS = empty.robot empty_robot_SOURCES = empty.c emptydir = $(RTB_DIR)/Robots/empty empty_DATA = $(empty_robot_SOURCES) Makefile.am realtimebattle-1.0.8/Robots/empty/Makefile.in0000644000175000017500000004247510324167710017340 0ustar moimoi# Makefile.in generated by automake 1.9.3 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 = $(empty_robot_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ robotexec_PROGRAMS = empty.robot$(EXEEXT) subdir = Robots/empty DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(robotexecdir)" "$(DESTDIR)$(emptydir)" robotexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(robotexec_PROGRAMS) am_empty_robot_OBJECTS = empty.$(OBJEXT) empty_robot_OBJECTS = $(am_empty_robot_OBJECTS) empty_robot_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(empty_robot_SOURCES) DIST_SOURCES = $(empty_robot_SOURCES) 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|^.*/||'`; emptyDATA_INSTALL = $(INSTALL_DATA) DATA = $(empty_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ robotexecdir = $(RTB_DIR)/Robots empty_robot_SOURCES = empty.c emptydir = $(RTB_DIR)/Robots/empty empty_DATA = $(empty_robot_SOURCES) Makefile.am all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Robots/empty/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Robots/empty/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-robotexecPROGRAMS: $(robotexec_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(robotexecdir)" || $(mkdir_p) "$(DESTDIR)$(robotexecdir)" @list='$(robotexec_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(robotexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(robotexecdir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(robotexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(robotexecdir)/$$f" || exit 1; \ else :; fi; \ done uninstall-robotexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(robotexec_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(robotexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(robotexecdir)/$$f"; \ done clean-robotexecPROGRAMS: -test -z "$(robotexec_PROGRAMS)" || rm -f $(robotexec_PROGRAMS) empty.robot$(EXEEXT): $(empty_robot_OBJECTS) $(empty_robot_DEPENDENCIES) @rm -f empty.robot$(EXEEXT) $(LINK) $(empty_robot_LDFLAGS) $(empty_robot_OBJECTS) $(empty_robot_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/empty.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: install-emptyDATA: $(empty_DATA) @$(NORMAL_INSTALL) test -z "$(emptydir)" || $(mkdir_p) "$(DESTDIR)$(emptydir)" @list='$(empty_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(emptyDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(emptydir)/$$f'"; \ $(emptyDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(emptydir)/$$f"; \ done uninstall-emptyDATA: @$(NORMAL_UNINSTALL) @list='$(empty_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(emptydir)/$$f'"; \ rm -f "$(DESTDIR)$(emptydir)/$$f"; \ 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: $(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) @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 $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(robotexecdir)" "$(DESTDIR)$(emptydir)"; 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-robotexecPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-emptyDATA install-exec-am: install-robotexecPROGRAMS 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 pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-emptyDATA uninstall-info-am \ uninstall-robotexecPROGRAMS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-robotexecPROGRAMS ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-emptyDATA install-exec install-exec-am \ install-info install-info-am install-man \ install-robotexecPROGRAMS install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-emptyDATA uninstall-info-am \ uninstall-robotexecPROGRAMS # 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: realtimebattle-1.0.8/Robots/empty/empty.c0000644000175000017500000000051410170545362016563 0ustar moimoi#include #include #include /*#include "../messagetypes.h"*/ #ifdef HAVE_CONFIG_H #include #endif int main(int argc, char * argv[]) { printf("RobotOption 0 0\n"); printf("Name Empty\n"); printf("Colour ee2299 aaffaa\n"); fflush(stdout); sleep(50); return(EXIT_SUCCESS); } realtimebattle-1.0.8/Robots/rotate_and_fire/0002755000175000017500000000000010404234034017241 5ustar moimoirealtimebattle-1.0.8/Robots/rotate_and_fire/Makefile.am0000644000175000017500000000163310213055206021276 0ustar moimoirobotexecdir = $(RTB_DIR)/Robots INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl robotexec_PROGRAMS = rotate_and_fire_signal.robot \ rotate_and_fire_blocking.robot \ rotate_and_fire_select.robot rotate_and_fire_signal_robot_SOURCES = rotate_and_fire.cc rotate_and_fire.h \ rotate_and_fire_signal.cc rotate_and_fire_blocking_robot_SOURCES = rotate_and_fire.cc rotate_and_fire.h \ rotate_and_fire_blocking.cc rotate_and_fire_select_robot_SOURCES = rotate_and_fire.cc rotate_and_fire.h \ rotate_and_fire_select.cc rafdir = $(RTB_DIR)/Robots/rotate_and_fire raf_DATA = $(rotate_and_fire_signal_robot_SOURCES) \ $(rotate_and_fire_blocking_robot_SOURCES) \ $(rotate_and_fire_select_robot_SOURCES) \ Makefile.am LDADD = $(LIBINTL) realtimebattle-1.0.8/Robots/rotate_and_fire/Makefile.in0000644000175000017500000005054510324167712021326 0ustar moimoi# Makefile.in generated by automake 1.9.3 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 = $(rotate_and_fire_blocking_robot_SOURCES) $(rotate_and_fire_select_robot_SOURCES) $(rotate_and_fire_signal_robot_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ robotexec_PROGRAMS = rotate_and_fire_signal.robot$(EXEEXT) \ rotate_and_fire_blocking.robot$(EXEEXT) \ rotate_and_fire_select.robot$(EXEEXT) subdir = Robots/rotate_and_fire DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(robotexecdir)" "$(DESTDIR)$(rafdir)" robotexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(robotexec_PROGRAMS) am_rotate_and_fire_blocking_robot_OBJECTS = rotate_and_fire.$(OBJEXT) \ rotate_and_fire_blocking.$(OBJEXT) rotate_and_fire_blocking_robot_OBJECTS = \ $(am_rotate_and_fire_blocking_robot_OBJECTS) rotate_and_fire_blocking_robot_LDADD = $(LDADD) am__DEPENDENCIES_1 = rotate_and_fire_blocking_robot_DEPENDENCIES = $(am__DEPENDENCIES_1) am_rotate_and_fire_select_robot_OBJECTS = rotate_and_fire.$(OBJEXT) \ rotate_and_fire_select.$(OBJEXT) rotate_and_fire_select_robot_OBJECTS = \ $(am_rotate_and_fire_select_robot_OBJECTS) rotate_and_fire_select_robot_LDADD = $(LDADD) rotate_and_fire_select_robot_DEPENDENCIES = $(am__DEPENDENCIES_1) am_rotate_and_fire_signal_robot_OBJECTS = rotate_and_fire.$(OBJEXT) \ rotate_and_fire_signal.$(OBJEXT) rotate_and_fire_signal_robot_OBJECTS = \ $(am_rotate_and_fire_signal_robot_OBJECTS) rotate_and_fire_signal_robot_LDADD = $(LDADD) rotate_and_fire_signal_robot_DEPENDENCIES = $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(rotate_and_fire_blocking_robot_SOURCES) \ $(rotate_and_fire_select_robot_SOURCES) \ $(rotate_and_fire_signal_robot_SOURCES) DIST_SOURCES = $(rotate_and_fire_blocking_robot_SOURCES) \ $(rotate_and_fire_select_robot_SOURCES) \ $(rotate_and_fire_signal_robot_SOURCES) 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|^.*/||'`; rafDATA_INSTALL = $(INSTALL_DATA) DATA = $(raf_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ robotexecdir = $(RTB_DIR)/Robots INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl rotate_and_fire_signal_robot_SOURCES = rotate_and_fire.cc rotate_and_fire.h \ rotate_and_fire_signal.cc rotate_and_fire_blocking_robot_SOURCES = rotate_and_fire.cc rotate_and_fire.h \ rotate_and_fire_blocking.cc rotate_and_fire_select_robot_SOURCES = rotate_and_fire.cc rotate_and_fire.h \ rotate_and_fire_select.cc rafdir = $(RTB_DIR)/Robots/rotate_and_fire raf_DATA = $(rotate_and_fire_signal_robot_SOURCES) \ $(rotate_and_fire_blocking_robot_SOURCES) \ $(rotate_and_fire_select_robot_SOURCES) \ Makefile.am LDADD = $(LIBINTL) all: all-am .SUFFIXES: .SUFFIXES: .cc .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Robots/rotate_and_fire/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Robots/rotate_and_fire/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-robotexecPROGRAMS: $(robotexec_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(robotexecdir)" || $(mkdir_p) "$(DESTDIR)$(robotexecdir)" @list='$(robotexec_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(robotexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(robotexecdir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(robotexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(robotexecdir)/$$f" || exit 1; \ else :; fi; \ done uninstall-robotexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(robotexec_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(robotexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(robotexecdir)/$$f"; \ done clean-robotexecPROGRAMS: -test -z "$(robotexec_PROGRAMS)" || rm -f $(robotexec_PROGRAMS) rotate_and_fire_blocking.robot$(EXEEXT): $(rotate_and_fire_blocking_robot_OBJECTS) $(rotate_and_fire_blocking_robot_DEPENDENCIES) @rm -f rotate_and_fire_blocking.robot$(EXEEXT) $(CXXLINK) $(rotate_and_fire_blocking_robot_LDFLAGS) $(rotate_and_fire_blocking_robot_OBJECTS) $(rotate_and_fire_blocking_robot_LDADD) $(LIBS) rotate_and_fire_select.robot$(EXEEXT): $(rotate_and_fire_select_robot_OBJECTS) $(rotate_and_fire_select_robot_DEPENDENCIES) @rm -f rotate_and_fire_select.robot$(EXEEXT) $(CXXLINK) $(rotate_and_fire_select_robot_LDFLAGS) $(rotate_and_fire_select_robot_OBJECTS) $(rotate_and_fire_select_robot_LDADD) $(LIBS) rotate_and_fire_signal.robot$(EXEEXT): $(rotate_and_fire_signal_robot_OBJECTS) $(rotate_and_fire_signal_robot_DEPENDENCIES) @rm -f rotate_and_fire_signal.robot$(EXEEXT) $(CXXLINK) $(rotate_and_fire_signal_robot_LDFLAGS) $(rotate_and_fire_signal_robot_OBJECTS) $(rotate_and_fire_signal_robot_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rotate_and_fire.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rotate_and_fire_blocking.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rotate_and_fire_select.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rotate_and_fire_signal.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` uninstall-info-am: install-rafDATA: $(raf_DATA) @$(NORMAL_INSTALL) test -z "$(rafdir)" || $(mkdir_p) "$(DESTDIR)$(rafdir)" @list='$(raf_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(rafDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(rafdir)/$$f'"; \ $(rafDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(rafdir)/$$f"; \ done uninstall-rafDATA: @$(NORMAL_UNINSTALL) @list='$(raf_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(rafdir)/$$f'"; \ rm -f "$(DESTDIR)$(rafdir)/$$f"; \ 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: $(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) @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 $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(robotexecdir)" "$(DESTDIR)$(rafdir)"; 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-robotexecPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-rafDATA install-exec-am: install-robotexecPROGRAMS 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 pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-rafDATA \ uninstall-robotexecPROGRAMS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-robotexecPROGRAMS ctags distclean distclean-compile \ distclean-generic 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-rafDATA \ install-robotexecPROGRAMS install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am uninstall-rafDATA \ uninstall-robotexecPROGRAMS # 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: realtimebattle-1.0.8/Robots/rotate_and_fire/rotate_and_fire.cc0000644000175000017500000004550610170545362022716 0ustar moimoi #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #ifdef HAVE_LOCALE_H # include #endif #include "IntlDefs.h" #include "rotate_and_fire.h" namespace std { } using namespace std; RotateAndFire::RotateAndFire(const char* name, const char* colour) { robot_name = new char[strlen(name) + 1]; strcpy(robot_name, name); robot_colour = new char[strlen(colour) + 1]; strcpy(robot_colour, colour); quitting = false; robot_rotate = 0.53; acceleration = 0.54; brake_value = 0.0; // Get random seed from the clock // timeval current_time; // gettimeofday(¤t_time, NULL); // srand(current_time.tv_usec); // We want to know when RotateTo and RotateAmount finishes robot_option( SEND_ROTATION_REACHED, 1 ); } RotateAndFire::~RotateAndFire() { delete [] robot_name; delete [] robot_colour; } // Function for sending messages from robot. // They do nothing but write the command and its arguments to cout. void RotateAndFire::robot_option( const int option, const int value ) { cout << "RobotOption " << option << " " << value << endl; } void RotateAndFire::name( const char* name ) { cout << "Name " << name << endl; } void RotateAndFire::colour( const char* home, const char* away ) { cout << "Colour " << home << " " << away << endl; } void RotateAndFire::rotate( const int what, const double vel ) { cout << "Rotate " << what << " " << vel << endl; } void RotateAndFire::rotate_to( const int what, const double vel, const double angle ) { cout << "RotateTo " << what << " " << vel << " " << angle << endl; } void RotateAndFire::rotate_amount( const int what, const double vel, const double angle ) { cout << "RotateAmount " << what << " " << vel << " " << angle << endl; } void RotateAndFire::sweep( const int what, const double vel, const double left, const double right ) { cout << "Sweep " << what << " " << vel << " " << left << " " << right << endl; } void RotateAndFire::accelerate( const double amount ) { cout << "Accelerate " << amount << endl; } void RotateAndFire::brake( const double amount ) { cout << "Brake " << amount << endl; } void RotateAndFire::shoot( const double energy ) { cout << "Shoot " << energy << endl; } void RotateAndFire::print( const char* message ) { cout << "Print " << message << endl; } void RotateAndFire::debug( const char* message ) { cout << "Debug " << message << endl; } void RotateAndFire::debug_line( const double start_angle, const double start_radius, const double end_angle, const double end_radius ) { cout << "DebugLine " << start_angle << " " << start_radius << " " << end_angle << " " << end_radius << endl; } void RotateAndFire::debug_circle( const double center_angle, const double center_radius, const double circle_radius ) { cout << "DebugCircle " << center_angle << " " << center_radius << " " << circle_radius << endl; } // Here are all functions that is called whenever a message of // corresponding type is recieved. // Send name and colour if it is the first sequence. void RotateAndFire::initialize( const int first_seq ) { if( first_seq == 1 ) { name( robot_name ); colour( robot_colour, robot_colour ); } } // The name the robot got in the game. void RotateAndFire::your_name( const char* prev_name ) { } // The colour the robot got in the game. void RotateAndFire::your_colour( const char* colour ) { } // This function is called when a game option is changed and // the robot's copy of this option will change. void RotateAndFire::game_option( const int option, const double value ) { switch( option ) { case ROBOT_MAX_ROTATE: robot_max_rotate = value; break; case ROBOT_CANNON_MAX_ROTATE: robot_cannon_max_rotate = value; break; case ROBOT_RADAR_MAX_ROTATE: robot_radar_max_rotate = value; break; case ROBOT_MAX_ACCELERATION: robot_max_acceleration = value; break; case ROBOT_MIN_ACCELERATION: robot_min_acceleration = value; break; case ROBOT_START_ENERGY: robot_start_energy = value; break; case ROBOT_MAX_ENERGY: robot_max_energy = value; break; case ROBOT_ENERGY_LEVELS: robot_energy_levels = value; break; case SHOT_SPEED: shot_speed = value; break; case SHOT_MIN_ENERGY: shot_min_energy = value; break; case SHOT_MAX_ENERGY: shot_max_energy = value; break; case SHOT_ENERGY_INCREASE_SPEED: shot_energy_increase_speed = value; break; case TIMEOUT: timeout = value; break; case DEBUG_LEVEL: debug_level = value; break; case SEND_ROBOT_COORDINATES: send_robot_coordinates = (int)rint(value); break; } } // Reset the robot when a new game starts. Send initial rotate and // accelerate commands. void RotateAndFire::game_starts() { robot_rotate = 0.53; acceleration = 0.54; brake_value = 0.0; rotate_allowed = true; shots_hit = 0; last_shot_hit_time = -2.0; current_time = 0; radar_and_cannon_rotate = robot_cannon_max_rotate - fabs(robot_rotate) - robot_rotate; rotate( 1, robot_rotate ); rotate( 6, radar_and_cannon_rotate ); accelerate( acceleration ); } // Radar info when no object is seen, should never happen. void RotateAndFire::radar_noobject( const double dist, const double angle ) { } // Radar info when robot is seen. // Lock cannon and radar on the seen robot, // and if it is near enough, begin to brake. Shoot at it. void RotateAndFire::radar_robot( const double dist, const double angle ) { if( radar_and_cannon_rotate != - robot_rotate ) { radar_and_cannon_rotate = - robot_rotate; rotate( 6, radar_and_cannon_rotate ); } if( dist < 2 && acceleration != 0.0 ) { acceleration = 0.0; accelerate( acceleration ); brake_value = 1.0; brake( brake_value ); if( debug_level >= 1 ) cout << "Debug "<< _("Brakes locked: Robot found and at distance") << " " << dist << endl; } shoot( 2 ); } // Radar info when a shot is seen. void RotateAndFire::radar_shot( const double dist, const double angle ) { if( radar_and_cannon_rotate != robot_cannon_max_rotate - fabs(robot_rotate) - robot_rotate ) { radar_and_cannon_rotate = robot_cannon_max_rotate - fabs(robot_rotate) - robot_rotate; rotate( 6, radar_and_cannon_rotate ); } } // Radar info when a wall is seen. // If a wall is near in the robot direction, begin to brake, // else have normal acceleration. void RotateAndFire::radar_wall( const double dist, const double angle ) { if( radar_and_cannon_rotate != robot_cannon_max_rotate - fabs(robot_rotate) - robot_rotate ) { radar_and_cannon_rotate = robot_cannon_max_rotate - fabs(robot_rotate) - robot_rotate; rotate( 6, radar_and_cannon_rotate ); } double old_acc = acceleration; double mod_angle = fmod( angle, 2 * M_PI ); if( mod_angle < 1 * M_PI / 3 || mod_angle > 5 * M_PI / 3 ) { if( dist < 1.0 ) { acceleration = 0.0; brake_value = 1.0; } else { acceleration = 1.0; brake_value = 0.0; } } if( old_acc != acceleration ) { accelerate( acceleration ); brake( brake_value ); if( debug_level >= 4 ) { cout << "Debug " << _("Acceleration") << ": " << acceleration << endl; cout << "Debug " << _("Brake") << ": " << brake_value << endl; } if( debug_level == 5 ) cout << "Debug " << _("Modular angle, Angle") << ": " << mod_angle << ", " << angle << endl; } } // Radar info when a cookie is seen. void RotateAndFire::radar_cookie( const double dist, const double angle ) { if( radar_and_cannon_rotate != robot_cannon_max_rotate - fabs(robot_rotate) - robot_rotate ) { radar_and_cannon_rotate = robot_cannon_max_rotate - fabs(robot_rotate) - robot_rotate; rotate( 6, radar_and_cannon_rotate ); } if( debug_level >= 2 ) { cout << "Debug " << _("Cookie found at") << " (" << current_x_coordinate + dist*cos(angle + current_robot_angle) << "," << current_y_coordinate + dist*sin(angle + current_robot_angle) << ")" << endl; cout << "Debug " << _("I am at") << " " << " (" << current_x_coordinate << "," << current_y_coordinate << ") " << _("at angle") << " " << current_robot_angle << endl; } } // Radar info when a mine is seen. void RotateAndFire::radar_mine( const double dist, const double angle ) { if( radar_and_cannon_rotate != robot_cannon_max_rotate - fabs(robot_rotate) - robot_rotate ) { radar_and_cannon_rotate = robot_cannon_max_rotate - fabs(robot_rotate) - robot_rotate; rotate( 6, radar_and_cannon_rotate ); } shoot( shot_min_energy ); if( debug_level >= 2 ) { cout << "Debug " << _("Mine found at") << " (" << current_x_coordinate + dist*cos(angle + current_robot_angle) << "," << current_y_coordinate + dist*sin(angle + current_robot_angle) << ")" << endl; cout << "Debug " << _("I am at") << " " << " (" << current_x_coordinate << "," << current_y_coordinate << ") " << _("at angle") << " " << current_robot_angle << endl; } } // Information about the position of the robot. Coordinates are given either absolute, // relative to the starting position, or not at all, depending on the option // SEND_ROBOT_COORDINATES. void RotateAndFire::coordinates( const double x, const double y, const double rotation) { if( send_robot_coordinates == 0 ) return; current_x_coordinate = x; current_y_coordinate = y; current_robot_angle = rotation; } // Get information about time, speed and cannon_angle // Update current time and check how long time has passed since // we were last hit by a shot. void RotateAndFire::info( const double time, const double speed, const double cannon_angle ) { current_time = time; if( current_time - last_shot_hit_time > 2.0 ) shots_hit = 0; } // Information about seen robots void RotateAndFire::robot_info( const double energy, int enemy ) { } // Check if rotation has been reached. // If it is the robot. Begin normal acceleration and rotation void RotateAndFire::rotation_reached( const int what ) { if( what & 1 == 1 ) { rotate_allowed = true; acceleration_change_allowed = true; int direction = rand() / (RAND_MAX/2); if( direction == 0 ) direction = -1; robot_rotate = 0.53 * direction; acceleration = 1.0; accelerate( acceleration ); } } // Our energy level. void RotateAndFire::energy( const double energylevel ) { } // How many robots is left in the game. void RotateAndFire::robots_left( const int number_of_robots ) { number_of_robots_left = number_of_robots; } // We have collided with no object. Should not happen. void RotateAndFire::collision_noobject( const double angle ) { } // We have collided with another robot. void RotateAndFire::collision_robot( const double angle ) { } // We have collided with a shot. // Set last_shot_hit_time and increase shots_hit. // If shots_hit is too high, begin fleeing acceleration and rotation. void RotateAndFire::collision_shot( const double angle ) { shots_hit++; last_shot_hit_time = current_time; if( debug_level == 5 ) cout << "Debug Number of shots hit " << shots_hit << endl; if( shots_hit > 5 ) { int direction = rand() / (RAND_MAX/2); if( direction == 0 ) direction = -1; robot_rotate = robot_max_rotate * direction; rotate_amount( 1, robot_rotate, M_PI / 2 ); rotate_allowed = false; acceleration = robot_max_acceleration; accelerate( acceleration ); acceleration_change_allowed = false; if( debug_level >= 3 ) { cout << "Debug " << _("New rotation") << ": " << robot_rotate << endl; cout << "Debug " << _("New acceleration") << ": " << acceleration << endl; } shots_hit = 0; print( _("Hit too many times! Flee!") ); } } // We have collided with a wall. void RotateAndFire::collision_wall( const double angle ) { } // We have collided with a cookie. void RotateAndFire::collision_cookie( const double angle ) { print( _("Cookie eaten!") ); } // We have collided with a mine. void RotateAndFire::collision_mine( const double angle ) { print( _("Oh no! A mine") ); } // We have received a warning message. // Print the message. void RotateAndFire::warning( const int type, const char* message ) { char full_message[200]; switch( type ) { case UNKNOWN_MESSAGE: strcpy( full_message, _("Unknown message: ") ); break; case PROCESS_TIME_LOW: strcpy( full_message, _("Process time low: ") ); break; case MESSAGE_SENT_IN_ILLEGAL_STATE: strcpy( full_message, _("Message sent in illegal state: ") ); break; case UNKNOWN_OPTION: strcpy( full_message, _("Unknown option: ") ); break; case OBSOLETE_KEYWORD: strcpy( full_message, _("Obsolete Keyword: ") ); break; } strcat( full_message, message ); print( full_message ); } // Unfortunately we have died. void RotateAndFire::dead() { } // The game has finished void RotateAndFire::game_finishes() { } // You have been ordered to exit the robot void RotateAndFire::exit_robot() { print( _("Shutting down and leaving") ); quitting = true; } // This function is called before checking messages. // Every hundred time, change the direction of the rotation. void RotateAndFire::pre_checking_messages() { if(rand() < (RAND_MAX/200) && rotate_allowed ) { robot_rotate = -robot_rotate; rotate( 1, robot_rotate ); if( debug_level >= 2 ) cout << "Debug " << _("New") << " robot_rotate : " << robot_rotate << endl; } } // This function handles all the message checking and // calls the appropriate function. // This function is called whenever a SIGUSR1 (decided in the // robotoption sent to the server) signal is received. void RotateAndFire::check_messages( ) { quitting = false; char msg_name[81]; message_to_robot_type msg_t; cin.clear(); while( !cin.eof() && !quitting ) { pre_checking_messages(); cin >> msg_name; msg_t = name2msg_to_robot_type(msg_name); switch(msg_t) { case INITIALIZE: { int init; cin >> init; initialize( init ); } break; case YOUR_NAME: { char name[81]; cin >> name; your_name( name ); } break; case YOUR_COLOUR: { char col[81]; cin >> col; your_colour( col ); } break; case GAME_OPTION: { int nr; double value; cin >> nr >> value; game_option( nr, value ); } break; case GAME_STARTS: game_starts(); break; case RADAR: { double dist, angle; int object; cin >> dist >> object >> angle; switch(object) { case NOOBJECT: radar_noobject( dist, angle ); break; case ROBOT: radar_robot( dist, angle ); break; case WALL: radar_wall( dist, angle ); break; case SHOT: radar_shot( dist, angle ); break; case COOKIE: radar_cookie( dist, angle ); break; case MINE: radar_mine( dist, angle ); break; default: cout << "Print" << _("Unknown Object seen!") << endl; break; } } break; case COORDINATES: { double x, y, rotation; cin >> x >> y >> rotation; coordinates( x, y, rotation ); } break; case INFO: { double time, speed, cannon_angle; cin >> time >> speed >> cannon_angle; info( time, speed, cannon_angle ); } break; case ROBOT_INFO: { double energy; int enemy; cin >> energy >> enemy; robot_info( energy, enemy ); } break; case ROTATION_REACHED: { int what; cin >> what; rotation_reached( what ); } break; case ENERGY: { double en; cin >> en; energy( en ); } break; case ROBOTS_LEFT: { int nr; cin >> nr; robots_left( nr ); } break; case COLLISION: { int object; double angle; cin >> object >> angle; switch( object ) { case NOOBJECT: collision_noobject( angle ); break; case ROBOT: collision_robot( angle ); break; case WALL: collision_wall( angle ); break; case SHOT: collision_shot( angle ); break; case COOKIE: collision_cookie( angle ); break; case MINE: collision_mine( angle ); break; default: cout << "Print " << _("Collided with Unknown Object!") << endl; break; } } break; case WARNING: { int type; char text[81]; cin >> type; cin.getline(text,80,'\n'); warning( type, text ); } break; case DEAD: dead(); break; case GAME_FINISHES: game_finishes(); break; case EXIT_ROBOT: exit_robot(); break; default: break; } } } // A function to convert the messagename to an enum message_to_robot_type message_to_robot_type name2msg_to_robot_type(char* msg_name) { for(int i=0; message_to_robot[i].msg[0] != '\0'; i++) { if( strcmp(message_to_robot[i].msg, msg_name) == 0 ) return (message_to_robot_type)i; } return UNKNOWN_MESSAGE_TO_ROBOT; } realtimebattle-1.0.8/Robots/rotate_and_fire/rotate_and_fire.h0000644000175000017500000001245010170545362022550 0ustar moimoi #ifndef __ROTATE_AND_FIRE__ #define __ROTATE_AND_FIRE__ #ifdef HAVE_CONFIG_H #include #endif #include "Messagetypes.h" message_to_robot_type name2msg_to_robot_type(char* msg_name); class RotateAndFire { public: // The constructor and destructor. RotateAndFire (const char* name, const char* colour); ~RotateAndFire (); // These functions are equivalent to messages sent from the robot void robot_option ( const int option_nr, const int value ); void name ( const char* name ); void colour ( const char* home, const char* away ); void rotate ( const int what, const double vel ); void rotate_to ( const int what, const double vel, const double angle ); void rotate_amount ( const int what, const double vel, const double angle ); void sweep ( const int what, const double vel, const double left, const double right ); void accelerate ( const double amount ); void brake ( const double amount ); void shoot ( const double energy ); void print ( const char* message ); void debug ( const char* message ); void debug_line ( const double start_angle, const double start_radius, const double end_angle, const double end_radius ); void debug_circle ( const double center_angle, const double center_radius, const double circle_radius ); // These functions are called when the robot gets a message // of the corresponding type. There are several radar and // collision functions. These functions corresponds to each // object that the robot has collided with or found with the radar. void initialize ( const int first_seq ); void your_name ( const char* prev_name ); void your_colour ( const char* colour ); void game_option ( const int option, const double value ); void game_starts (); void radar_noobject ( const double dist, const double angle ); void radar_robot ( const double dist, const double angle ); void radar_shot ( const double dist, const double angle ); void radar_wall ( const double dist, const double angle ); void radar_cookie ( const double dist, const double angle ); void radar_mine ( const double dist, const double angle ); void coordinates ( const double x, const double y, const double rotation); void info ( const double time, const double speed, const double cannon_angle ); void robot_info ( const double energy, int enemy ); void rotation_reached ( const int what ); void energy ( const double energylevel ); void robots_left ( const int number_of_robots ); void collision_noobject ( const double angle ); void collision_robot ( const double angle ); void collision_shot ( const double angle ); void collision_wall ( const double angle ); void collision_cookie ( const double angle ); void collision_mine ( const double angle ); void warning ( const int type, const char* message ); void dead (); void game_finishes (); void exit_robot (); // This function is called before checking messages. void pre_checking_messages (); // This function goes through all messages and calls the // corresponding function whenever a message is recieved. void check_messages ( ); // Tells if robot is about to quit bool is_quitting () { return quitting; } protected: // These variables contains the current values of the robot rotation, // acceleration and brake. double radar_and_cannon_rotate; double robot_rotate; double acceleration; double brake_value; // Is set if th robot gets the 'EXIT_ROBOT' message bool quitting; // The robot name and colour are set in the constructor char* robot_name; char* robot_colour; // Boolean variables to control if it is allowed to change robot // rotation and acceleration. bool rotate_allowed; bool acceleration_change_allowed; // Variables that controls how frequent the robot has been hit by shots. int shots_hit; double last_shot_hit_time; int number_of_robots_left; // The current time is stored in this variable. double current_time; // If we get coordinates, these are stored here. double current_x_coordinate; double current_y_coordinate; double current_robot_angle; // All game options are stored in these variables. double robot_max_rotate; double robot_cannon_max_rotate; double robot_radar_max_rotate; double robot_max_acceleration; double robot_min_acceleration; double robot_start_energy; double robot_max_energy; double robot_energy_levels; double shot_speed; double shot_min_energy; double shot_max_energy; double shot_energy_increase_speed; double timeout; double debug_level; int send_robot_coordinates; }; #endif realtimebattle-1.0.8/Robots/rotate_and_fire/rotate_and_fire_blocking.cc0000644000175000017500000000140010170545362024547 0ustar moimoi #ifdef HAVE_CONFIG_H #include #endif #include "rotate_and_fire.h" #include // This version of rotate_and_fire uses blocking STDIN. int main(int argc, char * argv[]) { class RotateAndFire raf_obj("Rotate&Fire-blocking", "9977dd"); // STDIN blocks, signals are not used. raf_obj.robot_option( USE_NON_BLOCKING, false ); // raf_obj.robot_option( SIGNAL, SIGUSR1 ); // STDIN blocks, signals are not used. raf_obj.robot_option( USE_NON_BLOCKING, false ); // raf_obj.robot_option( SIGNAL, SIGUSR1 ); // STDIN will block instead of being eof when all messages have // been read, therefore 'check_messages()' will not return until // the robot shout quit. raf_obj.check_messages(); return( EXIT_SUCCESS ); } realtimebattle-1.0.8/Robots/rotate_and_fire/rotate_and_fire_select.cc0000644000175000017500000000224310170545362024244 0ustar moimoi #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include "rotate_and_fire.h" // This version of rotate_and_fire uses 'select' to check // for new messages. int main(int argc, char * argv[]) { class RotateAndFire raf_obj("Rotate&Fire-select", "66ccdd"); // STDIN block (otherwise, we won't get complete messages from the server) and signals are not used raf_obj.robot_option( USE_NON_BLOCKING, false ); // raf_obj.robot_option( SIGNAL, SIGUSR1 ); // Make a set of file descriptor to check for. // In this case only STDIN fd_set file_descriptor_set; FD_ZERO( &file_descriptor_set ); FD_SET( STDIN_FILENO, &file_descriptor_set ); while( !raf_obj.is_quitting() ) { raf_obj.check_messages(); // Here you can do what you like, when finished ... // ... wait for the next message select( FD_SETSIZE, &file_descriptor_set, NULL, NULL, NULL ); } return( EXIT_SUCCESS ); } realtimebattle-1.0.8/Robots/rotate_and_fire/rotate_and_fire_signal.cc0000644000175000017500000000202110170545362024234 0ustar moimoi #ifdef HAVE_CONFIG_H #include #endif #include "rotate_and_fire.h" #include #include #include // This version of rotate_and_fire uses signals. class RotateAndFire raf_obj("Rotate&Fire-signal", "aaaaff"); // We need a function to be called when a signal arrives void handle_signal(int signr) { raf_obj.check_messages(); // Call this function next time too signal(signr, handle_signal); } int main(int argc, char * argv[]) { // Use non blocking and signals raf_obj.robot_option( USE_NON_BLOCKING, true ); raf_obj.robot_option( SIGNAL, SIGUSR1 ); // Initialize signal function sigset_t usr1set; signal(SIGUSR1, handle_signal); // libpthread seems to block USR1 sometimes for some reason sigemptyset(&usr1set); sigaddset(&usr1set, SIGUSR1); sigprocmask(SIG_UNBLOCK, &usr1set, NULL); while( !raf_obj.is_quitting() ) { // Here you can to whatever you like, but we have nothing // to do... sleep(1); } return( EXIT_SUCCESS ); } realtimebattle-1.0.8/Robots/seek_and_destroy/0002755000175000017500000000000010404234034017436 5ustar moimoirealtimebattle-1.0.8/Robots/seek_and_destroy/Makefile.am0000644000175000017500000000041510170545362021501 0ustar moimoirobotexecdir = $(RTB_DIR)/Robots INCLUDES = -I$(top_srcdir)/include robotexec_PROGRAMS = seek_and_destroy.robot seek_and_destroy_robot_SOURCES = seek_and_destroy.cc saddir = $(RTB_DIR)/Robots/seek_and_destroy sad_DATA = $(seek_and_destroy_robot_SOURCES) Makefile.am realtimebattle-1.0.8/Robots/seek_and_destroy/Makefile.in0000644000175000017500000004316710324167712021525 0ustar moimoi# Makefile.in generated by automake 1.9.3 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 = $(seek_and_destroy_robot_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ robotexec_PROGRAMS = seek_and_destroy.robot$(EXEEXT) subdir = Robots/seek_and_destroy DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(robotexecdir)" "$(DESTDIR)$(saddir)" robotexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(robotexec_PROGRAMS) am_seek_and_destroy_robot_OBJECTS = seek_and_destroy.$(OBJEXT) seek_and_destroy_robot_OBJECTS = $(am_seek_and_destroy_robot_OBJECTS) seek_and_destroy_robot_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(seek_and_destroy_robot_SOURCES) DIST_SOURCES = $(seek_and_destroy_robot_SOURCES) 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|^.*/||'`; sadDATA_INSTALL = $(INSTALL_DATA) DATA = $(sad_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ robotexecdir = $(RTB_DIR)/Robots INCLUDES = -I$(top_srcdir)/include seek_and_destroy_robot_SOURCES = seek_and_destroy.cc saddir = $(RTB_DIR)/Robots/seek_and_destroy sad_DATA = $(seek_and_destroy_robot_SOURCES) Makefile.am all: all-am .SUFFIXES: .SUFFIXES: .cc .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Robots/seek_and_destroy/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Robots/seek_and_destroy/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-robotexecPROGRAMS: $(robotexec_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(robotexecdir)" || $(mkdir_p) "$(DESTDIR)$(robotexecdir)" @list='$(robotexec_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(robotexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(robotexecdir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(robotexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(robotexecdir)/$$f" || exit 1; \ else :; fi; \ done uninstall-robotexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(robotexec_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(robotexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(robotexecdir)/$$f"; \ done clean-robotexecPROGRAMS: -test -z "$(robotexec_PROGRAMS)" || rm -f $(robotexec_PROGRAMS) seek_and_destroy.robot$(EXEEXT): $(seek_and_destroy_robot_OBJECTS) $(seek_and_destroy_robot_DEPENDENCIES) @rm -f seek_and_destroy.robot$(EXEEXT) $(CXXLINK) $(seek_and_destroy_robot_LDFLAGS) $(seek_and_destroy_robot_OBJECTS) $(seek_and_destroy_robot_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seek_and_destroy.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` uninstall-info-am: install-sadDATA: $(sad_DATA) @$(NORMAL_INSTALL) test -z "$(saddir)" || $(mkdir_p) "$(DESTDIR)$(saddir)" @list='$(sad_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(sadDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(saddir)/$$f'"; \ $(sadDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(saddir)/$$f"; \ done uninstall-sadDATA: @$(NORMAL_UNINSTALL) @list='$(sad_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(saddir)/$$f'"; \ rm -f "$(DESTDIR)$(saddir)/$$f"; \ 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: $(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) @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 $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(robotexecdir)" "$(DESTDIR)$(saddir)"; 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-robotexecPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-sadDATA install-exec-am: install-robotexecPROGRAMS 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 pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-robotexecPROGRAMS \ uninstall-sadDATA .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-robotexecPROGRAMS ctags distclean distclean-compile \ distclean-generic 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-robotexecPROGRAMS \ install-sadDATA install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags uninstall uninstall-am uninstall-info-am \ uninstall-robotexecPROGRAMS uninstall-sadDATA # 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: realtimebattle-1.0.8/Robots/seek_and_destroy/seek_and_destroy.cc0000644000175000017500000002262710170545362023307 0ustar moimoi#ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include #include "Messagetypes.h" using namespace std; #define abs(x) ((x>0) ? (x) : -(x)) volatile double acceleration = 0.0; volatile double robot_rotate = 0.0; volatile double cannon_rotate = 0.0, radar_rotate = 0.0; double tid, speed, radar_angle, cannon_angle, tid0, slumprotate = 1.0 ; double maxspeed = 10.0; int robots_left = 20; bool sweep = false, align_cro= true, align_cra = true, enemy = false; volatile sig_atomic_t exit_robot = false; message_to_robot_type name2msg_to_robot_type(char* msg_name) { for(int i=0; message_to_robot[i].msg[0] != '\0'; i++) { if( strcmp(message_to_robot[i].msg, msg_name) == 0 ) return (message_to_robot_type)i; } return UNKNOWN_MESSAGE_TO_ROBOT; } void check_messages(int sig) { exit_robot = false; char msg_name[81]; char text[81]; message_to_robot_type msg_t; //timeval current_time; //gettimeofday(¤t_time, NULL); //srand(current_time.tv_usec); cin.clear(); while( !cin.eof() ) { cin >> msg_name; msg_t = name2msg_to_robot_type(msg_name); switch(msg_t) { case INITIALIZE: int init; cin >> init ; if (init == 1) { cout << "Name Seek and Destroy" << endl; cout << "Colour dede11 de5500" << endl; } break; case GAME_STARTS: // cout << "Rotate 1 " << robot_rotate << endl; cout << "Sweep 6 " << M_PI/2.0 << " " << -M_PI/2.0 << " " << M_PI/2.0 << endl; acceleration = 0.4; cout << "Accelerate " << acceleration << endl; break; case GAME_FINISHES: break; case INFO: cin >> tid >> speed >> cannon_angle; if(rand() < (RAND_MAX/500)) { slumprotate = 0.0; while (abs(slumprotate)<0.5) slumprotate = ((double)(rand())/(double)RAND_MAX-0.5)*2.0; // cout << "Print seek_and_destroy: slumptal = " << slumprotate << endl; } break; case ROBOTS_LEFT: cin >> robots_left; break; case RADAR: { double dist, energy; int object; cin >> dist >> object >> radar_angle; switch(object) { case ROBOT: enemy = true; energy = 20.0/(dist*dist+0.2)+0.5+2.0/double(robots_left); robot_rotate = M_PI/3.0; if (dist<3.0) { acceleration = 2.0; } else { if (speed 0.1) { acceleration = 0.0; robot_rotate = 0.0; cout << "Brake 1" << endl; } else { robot_rotate = 5.0*slumprotate; acceleration = 0.1; } } else { if (dist<4.0) { if (speed > 2.0) { acceleration = 0.0 ; robot_rotate = 2.0*slumprotate ; cout << "Brake 0.7" << endl; } else { acceleration = 0.1; robot_rotate = 1.0*slumprotate; } } else { robot_rotate = 0.3*slumprotate; if (speed 0.4) cout << "Brake 1" << endl; cout << "Shoot 0.5" << endl; cout << "Accelerate " << acceleration << endl; cout << "Rotate 1 " << robot_rotate << endl; } //cout << "Print Avoid this mine" << endl; break; } break; } case COLLISION: { int tmp; double energy_diff = 0, coll_angle; cin >> tmp >> coll_angle; switch(tmp) { case ROBOT: if (abs(coll_angle) #include #include #include #include #include #include using std::cout; using std::cin; using std::endl; void message(int); class bot { public: int Initialize; char YourName[80]; int YourColour; int GameOption_Optionsnummer; double GameOption_value; double Radar_Entfernung; int Radar_typ; double Radar_Winkel; double Info_Zeit; double Info_Geschwindigkeit; double Info_Kanonen_Winkel; double RobotInfo_Energie_Level; int RobotInfo_Team_Mitglied; int RotationReached_wer; double Energy_Level; int RobotsLeft_anz; int Collision_typ; double Collision_winkel; int Warning_typ; char Warning_string[80]; double fahr_winkel; //public: bot(){ fahr_winkel = 0.0; } void init(); void options(); void nachricht(); void debug(char *); void print(char *); void beschleunigen(double); void rotateamount(int, double, double); void sweep(int,double,double,double); }; void bot::sweep(int was, double velocty, double left, double right) { cout<<"Sweep "<>typ; if(!strcmp(typ,"Initialize")) cin>>Initialize; else if(!strcmp(typ,"YourName")) cin>>YourName; else if(!strcmp(typ,"GameOption")) cin>>GameOption_Optionsnummer>>GameOption_value; // that line seems to be wrong because there is more than one option else if(!strcmp(typ,"GameStarts")) ; else if(!strcmp(typ,"Radar")) { cin>>Radar_Entfernung>>Radar_typ>>Radar_Winkel; if(Radar_typ == 0) { if(Radar_Winkel < -0.3||Radar_Winkel > 0.3) { if(Radar_Winkel > 0) { if(Radar_Entfernung > 6) cout<<"RotateAmount "<<1<<" "<<7<<" "<<0.4<6) cout<<"RotateAmount "<<1<<" "<<7<<" "<<-0.4< -0.4&&Radar_Winkel<0.4) { cout<<"Debug gegner! winkel:"< -0.4 && Radar_Winkel < 0.4 && Radar_Entfernung < 7) //wand seite cout<<"RotateAmount "<<1<<" "<<7<<" "<<0.1< -0.4 && Radar_Winkel < 0.4 && Radar_Entfernung < 2) // wand frontal cout<<"RotateAmount "<<1<<" "<<7<<" "<<0.6< -0.1 && Radar_Winkel < 0.2 && Radar_Entfernung < 0.01) //stehe an der wand cout<<"RotateAmount "<<1<<" "<<7<<" "<<1< -0.3&&Radar_Winkel < 0.3 ) { cout<<"Shoot 0.5"< 0.3) cout<<"RotateAmount "<<1<<" "<<7<<" "<<0.9<>Info_Zeit; cin>>Info_Geschwindigkeit; cin>>Info_Kanonen_Winkel; } else if(!strcmp(typ,"RobotInfo")) { cin>>RobotInfo_Energie_Level>>RobotInfo_Team_Mitglied; cout<<"Debug der gegner hat noch "<>RotationReached_wer; else if(!strcmp(typ,"Energy")) { cin>>Energy_Level; //cout<<"Debug ich habe noch:"<>RobotsLeft_anz; else if(!strcmp(typ,"Collision")) { cin>>Collision_typ; cin>>Collision_winkel; } else if(!strcmp(typ,"Warning")) { cin>>Warning_typ; cin>>Warning_string[80]; cout<<"Debug "< #include #include #include #include #include #include using std::cout; using std::cin; using std::endl; void message(int); class bot { public: int Initialize; char YourName[80]; int YourColour; int GameOption_Optionsnummer; double GameOption_value; double Radar_Entfernung; int Radar_typ; double Radar_Winkel; double Info_Zeit; double Info_Geschwindigkeit; double Info_Kanonen_Winkel; double RobotInfo_Energie_Level; int RobotInfo_Team_Mitglied; int RotationReached_wer; double Energy_Level; int RobotsLeft_anz; int Collision_typ; double Collision_winkel; int Warning_typ; char Warning_string[80]; double fahr_winkel; //public: bot(){ fahr_winkel = 0.0; } void init(); void options(); void nachricht(); void debug(char *); void print(char *); void beschleunigen(double); void rotateamount(int, double, double); void sweep(int,double,double,double); }; void bot::sweep(int was, double velocty, double left, double right) { cout<<"Sweep "<>typ; if(!strcmp(typ,"Initialize")) cin>>Initialize; else if(!strcmp(typ,"YourName")) cin>>YourName; else if(!strcmp(typ,"GameOption")) cin>>GameOption_Optionsnummer>>GameOption_value; // that line seems to be wrong because there is more than one option else if(!strcmp(typ,"GameStarts")) ; else if(!strcmp(typ,"Radar")) { cin>>Radar_Entfernung>>Radar_typ>>Radar_Winkel; if(Radar_typ == 0) { if(Radar_Winkel < -0.3||Radar_Winkel > 0.3) { if(Radar_Winkel > 0) { if(Radar_Entfernung > 6) cout<<"RotateAmount "<<1<<" "<<7<<" "<<0.4<6) cout<<"RotateAmount "<<1<<" "<<7<<" "<<-0.4< -0.4&&Radar_Winkel<0.4) { cout<<"Debug gegner! winkel:"< -0.4 && Radar_Winkel < 0.4 && Radar_Entfernung < 7) //wand seite cout<<"RotateAmount "<<1<<" "<<7<<" "<<0.1< -0.4 && Radar_Winkel < 0.4 && Radar_Entfernung < 2) // wand frontal cout<<"RotateAmount "<<1<<" "<<7<<" "<<0.7< -0.1 && Radar_Winkel < 0.2 && Radar_Entfernung < 0.01) //stehe an der wand cout<<"RotateAmount "<<1<<" "<<7<<" "<<1< -0.3&&Radar_Winkel < 0.3 ) { cout<<"DebugCircle "< 0.3) cout<<"RotateAmount "<<1<<" "<<7<<" "<<0.9<>Info_Zeit; cin>>Info_Geschwindigkeit; cin>>Info_Kanonen_Winkel; } else if(!strcmp(typ,"RobotInfo")) { cin>>RobotInfo_Energie_Level>>RobotInfo_Team_Mitglied; cout<<"Debug der gegner hat noch "<>RotationReached_wer; else if(!strcmp(typ,"Energy")) { cin>>Energy_Level; //cout<<"Debug ich habe noch:"<>RobotsLeft_anz; else if(!strcmp(typ,"Collision")) { cin>>Collision_typ; cin>>Collision_winkel; } else if(!strcmp(typ,"Warning")) { cin>>Warning_typ; cin>>Warning_string[80]; cout<<"Debug "< #include #include #include #include #include #include #include #define abs(x) ((x>0) ? (x) : -(x)) #define sgn(x) ((x>0) ? 1 : -1) #define max(a,b) (((a) > (b)) ? (a) : (b)) #define min(a,b) (((a) < (b)) ? (a) : (b)) volatile double acceleration = 0.0; volatile double robot_rotate = 0.0; volatile double cannon_rotate = 0.0, radar_rotate = 0.0; double tid=0.0, radar_angle=0.0, prev_radar_angle, cannon_angle, tid0, slumprotate = 1.0 ; double maxspeed =3.0, robotmaxrotate, cannonmaxrotate, radarmaxrotate, dist=0.0, prev_dist; double robotstartenergy, robotmaxenergy, robotenergylevels, shotspeed, shotmaxenergy; double shotminenergy, shotenergyincreasespeed,timeout, rotend=0.0, broms=0.0; double prev_speed, speed=0.0, prev_tid, energy, sweepleft, sweepright, prev_energy; int robots_left = 20, rotating, enemy = 0, cookie = 0, flee = 0, wallcoll=0; bool sweep = false, align_cro= true, align_cra = true; volatile sig_atomic_t exit_robot = false; static GTimer* timer; using std::endl; using std::cin; using std::cout; message_to_robot_type name2msg_to_robot_type(char* msg_name) { for(int i=0; message_to_robot[i].msg[0] != '\0'; i++) { if( strcmp(message_to_robot[i].msg, msg_name) == 0 ) return (message_to_robot_type)i; } return UNKNOWN_MESSAGE_TO_ROBOT; } void check_messages(int sig) { exit_robot = false; char msg_name[81]; char text[81]; message_to_robot_type msg_t; gulong microsecs; g_timer_elapsed(timer, µsecs); srand(microsecs); cin.clear(); while( !cin.eof() ) { std::cin >> msg_name; msg_t = name2msg_to_robot_type(msg_name); switch(msg_t) { case INITIALIZE: int init; cin >> init ; if (init == 1) { cout << "Name Thomas2" << endl; cout << "Colour 993322 777777" << endl; } break; case GAME_STARTS: // cout << "Rotate 1 " << robot_rotate << endl; cout << "Sweep 6 " << cannonmaxrotate << " " << -M_PI/2.0 << " " << M_PI/2.0 << endl; acceleration = 0.4; cout << "Accelerate " << acceleration << endl; break; case GAME_FINISHES: break; case GAME_OPTION: int optnr; double value; cin >> optnr >> value ; switch(optnr) { case ROBOT_MAX_ROTATE: robotmaxrotate = value; break; case ROBOT_CANNON_MAX_ROTATE: cannonmaxrotate = value; break; case ROBOT_RADAR_MAX_ROTATE: radarmaxrotate = value ; break; case ROBOT_START_ENERGY: robotstartenergy = value; break; case ROBOT_MAX_ENERGY: robotmaxenergy = value; break; case ROBOT_ENERGY_LEVELS: robotenergylevels = value; break; case SHOT_SPEED: shotspeed = value; break; case SHOT_MIN_ENERGY: shotminenergy = value; break; case SHOT_MAX_ENERGY: shotmaxenergy = value; break; case SHOT_ENERGY_INCREASE_SPEED: shotenergyincreasespeed = value; break; case TIMEOUT: timeout = value; break; } break; /** case SAVE_DATA: cout << "SaveDataFinished" << endl; break; */ case INFO: prev_speed = speed; prev_tid = tid; cin >> tid >> speed >> cannon_angle; break; case ENERGY: prev_energy=energy; cin >> energy; // if (prev_energy != energy) // cout << "Print Energifrlust: " << prev_energy-energy << endl; break; case ROBOTS_LEFT: cin >> robots_left; break; case RADAR: { double x1,x2,s,rot; int object; prev_dist = dist; prev_radar_angle = radar_angle; cin >> dist >> object >> radar_angle; switch(object) { case ROBOT: enemy = max(15-robots_left,1); broms=1.0; if (speedM_PI/20.0) { cout << "RotateAmount 1 " << robotmaxrotate << " " << radar_angle << endl; cout << "RotateAmount 6 " << robotmaxrotate << " " << -radar_angle << endl; } else { cout << "Sweep 6 " << cannonmaxrotate << " " << sweepleft << " " << sweepright << endl; } cout << "Accelerate " << acceleration << endl; cout << "Shoot 2" << endl; // cout << "Print Skjuter" << endl; cout << "Brake " << broms << endl; break; case WALL: if (flee>1) flee--; else { if (flee==1) { sweepleft=-M_PI/3.0; sweepright=M_PI/3.0; flee--; } maxspeed=3.0; } if (speed < maxspeed) { acceleration = 2.0; broms = 0.0; } else { acceleration = 0.0; broms = 0.3; } if (enemy>0) { enemy--; if (abs(radar_angle)>M_PI/20.0) { acceleration=0.0; broms=1.0; } else { sweepleft=sweepleft-M_PI/200.0; sweepright=sweepright+M_PI/200.0; cout << "Sweep 6 " << cannonmaxrotate << " " << sweepleft << " " << sweepright << endl; } //cout << "Debug enemy " << enemy << " radar " << radar_angle << endl; } else { if (cookie>0) { cookie--; sweepleft=sweepleft-M_PI/200.0; sweepright=sweepright+M_PI/200.0; if (abs(radar_angle)>M_PI/20.0) { acceleration=0.0; broms=1.0; } else { sweepleft=sweepleft-M_PI/200.0; sweepright=sweepright+M_PI/200.0; cout << "Sweep 6 " << cannonmaxrotate << " " << sweepleft << " " << sweepright << endl; } // cout << "Debug cookie" << cookie << endl; } else { x1=abs(prev_dist * sin(prev_radar_angle)); x2=abs(dist * sin(radar_angle)); // if (wallcoll > 0) // if (speed < 2.0) // { // if (dist > 2.0) // rot = sgn(radar_angle)*robotmaxrotate; // else // rot = robotmaxrotate; // } // else // wallcoll = 0; // else { if (x1<=x2) rot = 0; else { s = (prev_dist*cos(prev_radar_angle) - dist*cos(radar_angle)- (prev_speed+speed)/2.0*(tid-prev_tid))* (radar_angle-prev_radar_angle); if (s>0) rot = robotmaxrotate; else rot = -robotmaxrotate; } } //cout << "Print " << s << endl; if (((prev_dist/(dist+1e-7)>1.2) && (dist<2.0)) || ((dist<0.5) && (dist> tmp >> coll_angle; switch(tmp) { case ROBOT: enemy=0; break; case SHOT: //cout << "Print Skjuten!" << endl; flee = 10; enemy=0; maxspeed = 10.0; acceleration = 2.0; cout << "Accelerate " << acceleration << endl; sweepleft = coll_angle - M_PI/4.0; sweepright = coll_angle + M_PI/4.0; cout << "Sweep 6 " << cannonmaxrotate << " " << sweepleft << " " << sweepright << endl; break; case MINE: cout << "Print Oh no! A mine!" << endl; break; case COOKIE: cout << "Print Cookie eaten!" << endl; cookie = 0; break; case WALL: wallcoll=10; break; } //if( enegry_diff != 0 ) cout << "Print energy changed by " << enegry_diff << endl; } break; case WARNING: cin.getline(text,80,'\n'); cout << "Print Help, I got a yellow card! " << text << endl; break; case EXIT_ROBOT: cout << "Print Shutting down and leaving" << endl; exit_robot = true; break; default: break; } } signal (sig, check_messages); } int main(int argc, char * argv[]) { //robot_rotate = 0.53; timer = g_timer_new(); g_timer_reset(timer); srand(time(0)); //check_messages(SIGUSR1); signal(SIGUSR1, check_messages); cout << "RobotOption " << SEND_SIGNAL << " " << true << endl; for(;;sleep(1)) { if( exit_robot ) { // cerr << "Fire: Exiting normally!" << endl; return(EXIT_SUCCESS); } } return(EXIT_SUCCESS); } realtimebattle-1.0.8/Robots/joypad_robot/0002755000175000017500000000000010404234033016606 5ustar moimoirealtimebattle-1.0.8/Robots/joypad_robot/README0000644000175000017500000000041410170545362017475 0ustar moimoiTo use this robot, you need a joystick on /dev/js0 or /dev/input/js0. Furthermore, the API used for this robot is only available under Linux. To configure the correct behavior of this robot, it is a good idea to change some parts of the source code. Johannes Nicolai realtimebattle-1.0.8/Robots/joypad_robot/Makefile.am0000644000175000017500000000044310170545362020653 0ustar moimoirobotexecdir = $(RTB_DIR)/Robots INCLUDES = -I$(top_srcdir)/include if linuxjoystickavailable robotexec_PROGRAMS = joypad_robot.robot endif joypad_robot_robot_SOURCES = joypad_robot.c joypaddir = $(RTB_DIR)/Robots/joypad_robot joypad_DATA = $(joypad_robot_robot_SOURCES) Makefile.am README realtimebattle-1.0.8/Robots/joypad_robot/Makefile.in0000644000175000017500000004315210324167711020667 0ustar moimoi# Makefile.in generated by automake 1.9.3 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 = $(joypad_robot_robot_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ @linuxjoystickavailable_TRUE@robotexec_PROGRAMS = \ @linuxjoystickavailable_TRUE@ joypad_robot.robot$(EXEEXT) subdir = Robots/joypad_robot DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(robotexecdir)" "$(DESTDIR)$(joypaddir)" robotexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(robotexec_PROGRAMS) am_joypad_robot_robot_OBJECTS = joypad_robot.$(OBJEXT) joypad_robot_robot_OBJECTS = $(am_joypad_robot_robot_OBJECTS) joypad_robot_robot_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(joypad_robot_robot_SOURCES) DIST_SOURCES = $(joypad_robot_robot_SOURCES) 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|^.*/||'`; joypadDATA_INSTALL = $(INSTALL_DATA) DATA = $(joypad_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ robotexecdir = $(RTB_DIR)/Robots INCLUDES = -I$(top_srcdir)/include joypad_robot_robot_SOURCES = joypad_robot.c joypaddir = $(RTB_DIR)/Robots/joypad_robot joypad_DATA = $(joypad_robot_robot_SOURCES) Makefile.am README all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Robots/joypad_robot/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Robots/joypad_robot/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-robotexecPROGRAMS: $(robotexec_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(robotexecdir)" || $(mkdir_p) "$(DESTDIR)$(robotexecdir)" @list='$(robotexec_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(robotexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(robotexecdir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(robotexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(robotexecdir)/$$f" || exit 1; \ else :; fi; \ done uninstall-robotexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(robotexec_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(robotexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(robotexecdir)/$$f"; \ done clean-robotexecPROGRAMS: -test -z "$(robotexec_PROGRAMS)" || rm -f $(robotexec_PROGRAMS) joypad_robot.robot$(EXEEXT): $(joypad_robot_robot_OBJECTS) $(joypad_robot_robot_DEPENDENCIES) @rm -f joypad_robot.robot$(EXEEXT) $(LINK) $(joypad_robot_robot_LDFLAGS) $(joypad_robot_robot_OBJECTS) $(joypad_robot_robot_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/joypad_robot.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: install-joypadDATA: $(joypad_DATA) @$(NORMAL_INSTALL) test -z "$(joypaddir)" || $(mkdir_p) "$(DESTDIR)$(joypaddir)" @list='$(joypad_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(joypadDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(joypaddir)/$$f'"; \ $(joypadDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(joypaddir)/$$f"; \ done uninstall-joypadDATA: @$(NORMAL_UNINSTALL) @list='$(joypad_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(joypaddir)/$$f'"; \ rm -f "$(DESTDIR)$(joypaddir)/$$f"; \ 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: $(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) @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 $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(robotexecdir)" "$(DESTDIR)$(joypaddir)"; 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-robotexecPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-joypadDATA install-exec-am: install-robotexecPROGRAMS 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 pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-joypadDATA \ uninstall-robotexecPROGRAMS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-robotexecPROGRAMS ctags distclean distclean-compile \ distclean-generic 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-joypadDATA install-man \ install-robotexecPROGRAMS install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am uninstall-joypadDATA \ uninstall-robotexecPROGRAMS # 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: realtimebattle-1.0.8/Robots/joypad_robot/joypad_robot.c0000644000175000017500000001250010170545362021453 0ustar moimoi/************************************************** joypad_robot.c -- Copyright(c) 1999 Jiro Sekiba This program is destributed under the GPL. **************************************************/ #include #include #include #include #include #define __USE_GNU /* for M_PIl etc */ #include #include #include /* if you can't compile, comment out prev line and uncomment next line */ /* #include */ double GAME_OPT[13]; double rotate_angle = M_PIl/36; /* 5 deg */ int joy_fd = -1; void initialize(int num) { if(num == 1) { puts("Name Joybot"); puts("Colour B2DD32 32DDBs"); fflush(stdout); } } void gameoption(int type, double value) { GAME_OPT[type] = value; } void debug(char *msg) { printf("Debug %s\n",msg); } void right(void) { printf("RotateAmount 1 %f -%f\n",GAME_OPT[ROBOT_MAX_ROTATE],rotate_angle); } void left(void) { printf("RotateAmount 1 %f %f\n",GAME_OPT[ROBOT_MAX_ROTATE],rotate_angle); } void shoot(void) { printf("Shoot %f",GAME_OPT[SHOT_MAX_ENERGY]); } void accel_on(void) { printf("Accelerate %f\n",GAME_OPT[ROBOT_MAX_ACCELERATION]/2); } void accel_off(void) { printf("Accelerate 0.0\n"); } void accel_back(void) { printf("Accelerate %f\n",GAME_OPT[ROBOT_MIN_ACCELERATION]); } void brake_on(void) { puts("Brake 1.0"); } void brake_off(void) { puts("Brake 0.0"); } void idle(void) { /* do something for idle time */ } void main_loop(void) { struct timeval tv; fd_set rfds; int retval; struct js_event event; char buf[2048]; int type; double value; int num; /* Wait up to one seconds. */ tv.tv_sec = 1; tv.tv_usec = 0; while(1) { FD_ZERO(&rfds); FD_SET(0,&rfds); FD_SET(joy_fd,&rfds); retval = select(6,&rfds,NULL,NULL,&tv); if(FD_ISSET(joy_fd,&rfds)) { read(joy_fd, &event, sizeof(struct js_event)); switch(event.type) { case JS_EVENT_BUTTON: switch(event.number) { case 0: /* accel */ if(event.value) /* pressed */ accel_on(); else /* released */ accel_off(); break; case 1: /* brake */ if(event.value) /* pressed */ brake_on(); else/* released */ brake_off(); break; case 2: /* shoot */ if(event.value) /* pressed */ shoot(); break; case 3: /* back */ if(event.value) /* pressed */ accel_back(); else /* released */ accel_off(); break; case 4: /* do somthing if your joypad has button 5 */ break; case 5: /* do somthing if your joypad has button 6 */ break; default: break; /* do nothing */ } break; case JS_EVENT_AXIS: /* AXIS and calibration depend on your joystick. You should hack for you environment. */ switch(event.number) { case 0: /* left/right*/ if(event.value > 1000) /* right */ { right(); } else if(event.value < 100) /* left */ { left(); } break; case 1: /* up/down */ if(event.value > 1000) /* down */ { /* do if you want to do something when push down */ } else if( event.value < 100 ) /* up */ { /* do if you want to do something when push up */ } break; default: /* do nothing */ break; } break; default: break; } } else if( FD_ISSET(0,&rfds) ) /* message from RTB */ { fgets(buf,2048,stdin); if(strncmp(buf,"Initialize",10) == 0 ) { sscanf(buf,"Initialize %i",&num); initialize(num); } else if(strncmp(buf,"GameOption",10) == 0 ) { sscanf(buf,"GameOption %i %lf",&type,&value); gameoption(type,value); } else if(strncmp(buf,"Dead",4) == 0 ) { break; } } else { idle(); } fflush(stdout); } } int open_joystick(char *name) { joy_fd = open(name, O_RDONLY); if(joy_fd < 0) { fprintf(stderr,"Can't open file %s\n",name); return(1); } return(0); } int main(void) { if(open_joystick("/dev/js0")) if (open_joystick("/dev/input/js0")) { printf("RobotOption %i 1\n",USE_NON_BLOCKING); puts("Name Joybot"); puts("Colour B2DD32 32DDBs"); fflush(stdout); fprintf(stderr,"Exiting joystick bot ...\n"); sleep(3); puts("Print Could not open the joystick device, exiting ..."); return -1; } printf("RobotOption %i 1\n",USE_NON_BLOCKING); fflush(stdout); main_loop(); } realtimebattle-1.0.8/config/0002755000175000017500000000000010324172235014116 5ustar moimoirealtimebattle-1.0.8/config/acinclude.m40000644000175000017500000010532710320517000016302 0ustar moimoidnl RTB_EXPAND_DIR(VARNAME, DIR) dnl expands occurrences of ${prefix} and ${exec_prefix} in the given DIR, dnl and assigns the resulting string to VARNAME dnl example: RTB_EXPAND_DIR(ROBOTDIR, "${RTB_DIR}/Robots") dnl eg, then: AC_DEFINE_UNQUOTED(ROBOTDIR, "$ROBOTDIR") dnl by Alexandre Oliva dnl from http://www.cygnus.com/ml/automake/1998-Aug/0040.html AC_DEFUN([RTB_EXPAND_DIR], [ $1=$2 $1=`( test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" eval echo \""[$]$1"\" )` ]) dnl @synopsis AC_CHECK_CLASS dnl dnl AC_CHECK_CLASS tests the existence of a given Java class, either in dnl a jar or in a '.class' file. dnl dnl *Warning*: its success or failure can depend on a proper setting of the dnl CLASSPATH env. variable. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Stephane Bortzmeyer dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl AC_DEFUN([AC_CHECK_CLASS],[ AC_REQUIRE([AC_PROG_JAVA]) ac_var_name=`echo $1 | sed 's/\./_/g'` dnl Normaly I'd use a AC_CACHE_CHECK here but since the variable name is dnl dynamic I need an extra level of extraction AC_MSG_CHECKING([for $1 class]) AC_CACHE_VAL(ac_cv_class_$ac_var_name, [ if test x$ac_cv_prog_uudecode_base64 = xyes; then dnl /** dnl * Test.java: used to test dynamicaly if a class exists. dnl */ dnl public class Test dnl { dnl dnl public static void dnl main( String[] argv ) dnl { dnl Class lib; dnl if (argv.length < 1) dnl { dnl System.err.println ("Missing argument"); dnl System.exit (77); dnl } dnl try dnl { dnl lib = Class.forName (argv[0]); dnl } dnl catch (ClassNotFoundException e) dnl { dnl System.exit (1); dnl } dnl lib = null; dnl System.exit (0); dnl } dnl dnl } cat << \EOF > Test.uue begin-base64 644 Test.class yv66vgADAC0AKQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51 bWJlclRhYmxlDAAKAAsBAANlcnIBABVMamF2YS9pby9QcmludFN0cmVhbTsJ AA0ACQcADgEAEGphdmEvbGFuZy9TeXN0ZW0IABABABBNaXNzaW5nIGFyZ3Vt ZW50DAASABMBAAdwcmludGxuAQAVKExqYXZhL2xhbmcvU3RyaW5nOylWCgAV ABEHABYBABNqYXZhL2lvL1ByaW50U3RyZWFtDAAYABkBAARleGl0AQAEKEkp VgoADQAXDAAcAB0BAAdmb3JOYW1lAQAlKExqYXZhL2xhbmcvU3RyaW5nOylM amF2YS9sYW5nL0NsYXNzOwoAHwAbBwAgAQAPamF2YS9sYW5nL0NsYXNzBwAi AQAgamF2YS9sYW5nL0NsYXNzTm90Rm91bmRFeGNlcHRpb24BAAY8aW5pdD4B AAMoKVYMACMAJAoAAwAlAQAKU291cmNlRmlsZQEACVRlc3QuamF2YQAhAAEA AwAAAAAAAgAJAAUABgABAAcAAABtAAMAAwAAACkqvgSiABCyAAwSD7YAFBBN uAAaKgMyuAAeTKcACE0EuAAaAUwDuAAasQABABMAGgAdACEAAQAIAAAAKgAK AAAACgAAAAsABgANAA4ADgATABAAEwASAB4AFgAiABgAJAAZACgAGgABACMA JAABAAcAAAAhAAEAAQAAAAUqtwAmsQAAAAEACAAAAAoAAgAAAAQABAAEAAEA JwAAAAIAKA== ==== EOF if uudecode$EXEEXT Test.uue; then : else echo "configure: __oline__: uudecode had trouble decoding base 64 file 'Test.uue'" >&AC_FD_CC echo "configure: failed file was:" >&AC_FD_CC cat Test.uue >&AC_FD_CC ac_cv_prog_uudecode_base64=no fi rm -f Test.uue if AC_TRY_COMMAND($JAVA $JAVAFLAGS Test $1) >/dev/null 2>&1; then eval "ac_cv_class_$ac_var_name=yes" else eval "ac_cv_class_$ac_var_name=no" fi rm -f Test.class else AC_TRY_COMPILE_JAVA([$1], , [eval "ac_cv_class_$ac_var_name=yes"], [eval "ac_cv_class_$ac_var_name=no"]) fi eval "ac_var_val=$`eval echo ac_cv_class_$ac_var_name`" eval "HAVE_$ac_var_name=$`echo ac_cv_class_$ac_var_val`" HAVE_LAST_CLASS=$ac_var_val if test x$ac_var_val = xyes; then ifelse([$2], , :, [$2]) else ifelse([$3], , :, [$3]) fi ]) dnl for some reason the above statment didn't fall though here? dnl do scripts have variable scoping? eval "ac_var_val=$`eval echo ac_cv_class_$ac_var_name`" AC_MSG_RESULT($ac_var_val) ]) dnl @synopsis AC_CHECK_CLASSPATH dnl dnl AC_CHECK_CLASSPATH just displays the CLASSPATH, for the edification dnl of the user. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Stephane Bortzmeyer dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl AC_DEFUN([AC_CHECK_CLASSPATH],[ if test "x$CLASSPATH" = x; then echo "You have no CLASSPATH, I hope it is good" else echo "You have CLASSPATH $CLASSPATH, hope it is correct" fi ]) dnl @synopsis AC_CHECK_JUNIT dnl dnl AC_CHECK_JUNIT tests the availability of the Junit testing dnl framework, and set some variables for conditional compilation dnl of the test suite by automake. dnl dnl If available, JUNIT is set to a command launching the text dnl based user interface of Junit, @JAVA_JUNIT@ is set to $JAVA_JUNIT dnl and @TESTS_JUNIT@ is set to $TESTS_JUNIT, otherwise they are set dnl to empty values. dnl dnl You can use these variables in your Makefile.am file like this : dnl dnl # Some of the following classes are built only if junit is available dnl JAVA_JUNIT = Class1Test.java Class2Test.java AllJunitTests.java dnl dnl noinst_JAVA = Example1.java Example2.java @JAVA_JUNIT@ dnl dnl EXTRA_JAVA = $(JAVA_JUNIT) dnl dnl TESTS_JUNIT = AllJunitTests dnl dnl TESTS = StandaloneTest1 StandaloneTest2 @TESTS_JUNIT@ dnl dnl EXTRA_TESTS = $(TESTS_JUNIT) dnl dnl AllJunitTests : dnl echo "#! /bin/sh" > $@ dnl echo "exec @JUNIT@ my.package.name.AllJunitTests" >> $@ dnl chmod +x $@ dnl dnl @author Luc Maisonobe dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl AC_DEFUN([AC_CHECK_JUNIT],[ AC_CACHE_VAL(ac_cv_prog_JUNIT,[ AC_CHECK_CLASS(junit.textui.TestRunner) if test x"`eval 'echo $ac_cv_class_junit_textui_TestRunner'`" != xno ; then ac_cv_prog_JUNIT='$(CLASSPATH_ENV) $(JAVA) $(JAVAFLAGS) junit.textui.TestRunner' fi]) AC_MSG_CHECKING([for junit]) if test x"`eval 'echo $ac_cv_prog_JUNIT'`" != x ; then JUNIT="$ac_cv_prog_JUNIT" JAVA_JUNIT='$(JAVA_JUNIT)' TESTS_JUNIT='$(TESTS_JUNIT)' else JUNIT= JAVA_JUNIT= TESTS_JUNIT= fi AC_MSG_RESULT($JAVA_JUNIT) AC_SUBST(JUNIT) AC_SUBST(JAVA_JUNIT) AC_SUBST(TESTS_JUNIT)]) dnl @synopsis AC_CHECK_RQRD_CLASS dnl dnl AC_CHECK_RQRD_CLASS tests the existence of a given Java class, either in dnl a jar or in a '.class' file and fails if it doesn't exist. dnl Its success or failure can depend on a proper setting of the dnl CLASSPATH env. variable. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Stephane Bortzmeyer dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl AC_DEFUN([AC_CHECK_RQRD_CLASS],[ CLASS=`echo $1|sed 's/\./_/g'` AC_CHECK_CLASS($1) if test "$HAVE_LAST_CLASS" = "no"; then AC_MSG_WARN([Required class $1 missing, exiting.]) fi ]) dnl @synopsis AC_JAVA_OPTIONS dnl dnl AC_JAVA_OPTIONS adds configure command line options used for Java m4 dnl macros. This Macro is optional. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Devin Weaver dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl AC_DEFUN([AC_JAVA_OPTIONS],[ AC_ARG_WITH(java-prefix, [ --with-java-prefix=PFX prefix where Java runtime is installed (optional)]) AC_ARG_WITH(javac-flags, [ --with-javac-flags=FLAGS flags to pass to the Java compiler (optional)]) AC_ARG_WITH(java-flags, [ --with-java-flags=FLAGS flags to pass to the Java VM (optional)]) JAVAPREFIX=$with_java_prefix JAVACFLAGS=$with_javac_flags JAVAFLAGS=$with_java_flags AC_SUBST(JAVAPREFIX)dnl AC_SUBST(JAVACFLAGS)dnl AC_SUBST(JAVAFLAGS)dnl AC_SUBST(JAVA)dnl AC_SUBST(JAVAC)dnl ]) dnl @synopsis AC_PROG_JAR dnl dnl AC_PROG_JAR tests for an existing jar program. It uses the environment dnl variable JAR then tests in sequence various common jar programs. dnl dnl If you want to force a specific compiler: dnl dnl - at the configure.in level, set JAR=yourcompiler before calling dnl AC_PROG_JAR dnl dnl - at the configure level, setenv JAR dnl dnl You can use the JAR variable in your Makefile.in, with @JAR@. dnl dnl Note: This macro depends on the autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download that whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl dnl The general documentation of those macros, as well as the sample dnl configure.in, is included in the AC_PROG_JAVA macro. dnl dnl @author Egon Willighagen dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl AC_DEFUN([AC_PROG_JAR],[ AC_REQUIRE([AC_EXEEXT])dnl if test "x$JAVAPREFIX" = x; then test "x$JAR" = x && AC_CHECK_PROGS(JAR, jar$EXEEXT) else test "x$JAR" = x && AC_CHECK_PROGS(JAR, jar, $JAVAPREFIX) fi test "x$JAR" = x && AC_MSG_WARN([no acceptable jar program found in \$PATH]) AC_PROVIDE([$0])dnl ]) dnl @synopsis AC_PROG_JAVA_CC dnl dnl Finds the appropriate java compiler on your path. By preference dnl the java compiler is gcj, then jikes then javac. dnl dnl The macro can take one argument specifying a space separated list dnl of java compiler names. dnl dnl For example: dnl dnl AC_PROG_JAVA_CC(javac, gcj) dnl dnl The macro also sets the compiler options variable: JAVA_CC_OPTS dnl to something sensible: dnl - for GCJ it sets it to: @GCJ_OPTS@ dnl (if GCJ_OPTS is not yet defined then it is set to "-C") dnl dnl - no other compiler has applicable options yet dnl dnl Here's an example configure.in: dnl dnl AC_INIT(Makefile.in) dnl AC_PROG_JAVA_CC() dnl AC_OUTPUT(Makefile) dnl dnl End. dnl dnl And here's the start of the Makefile.in: dnl dnl PROJECT_ROOT := @srcdir@ dnl # Tool definitions. dnl JAVAC := @JAVA_CC@ dnl JAVAC_OPTS := @JAVA_CC_OPTS@ dnl JAR_TOOL := @jar_tool@ dnl dnl dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl @author Nic Ferrier dnl # AC_PROG_JAVA_CC([COMPILER ...]) # -------------------------- # COMPILER ... is a space separated list of java compilers to search for. # This just gives the user an opportunity to specify an alternative # search list for the java compiler. AC_DEFUN([AC_PROG_JAVA_CC], [AC_ARG_VAR([JAVA_CC], [java compiler command])dnl AC_ARG_VAR([JAVA_CC_FLAGS], [java compiler flags])dnl m4_ifval([$1], [AC_CHECK_TOOLS(JAVA_CC, [$1])], [AC_CHECK_TOOL(JAVA_CC, gcj) if test -z "$JAVA_CC"; then AC_CHECK_TOOL(JAVA_CC, javac) fi if test -z "$JAVA_CC"; then AC_CHECK_TOOL(JAVA_CC, jikes) fi ]) if test "$JAVA_CC" = "gcj"; then if test "$GCJ_OPTS" = ""; then AC_SUBST(GCJ_OPTS,-C) fi AC_SUBST(JAVA_CC_OPTS, @GCJ_OPTS@, [Define the compilation options for GCJ]) fi test -z "$JAVA_CC" && AC_MSG_WARN([no acceptable java compiler found in \$PATH]) ])# AC_PROG_JAVA_CC dnl @synopsis AC_PROG_JAVAC dnl dnl AC_PROG_JAVAC tests an existing Java compiler. It uses the environment dnl variable JAVAC then tests in sequence various common Java compilers. For dnl political reasons, it starts with the free ones. dnl dnl If you want to force a specific compiler: dnl dnl - at the configure.in level, set JAVAC=yourcompiler before calling dnl AC_PROG_JAVAC dnl dnl - at the configure level, setenv JAVAC dnl dnl You can use the JAVAC variable in your Makefile.in, with @JAVAC@. dnl dnl *Warning*: its success or failure can depend on a proper setting of the dnl CLASSPATH env. variable. dnl dnl TODO: allow to exclude compilers (rationale: most Java programs cannot compile dnl with some compilers like guavac). dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Stephane Bortzmeyer dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl AC_DEFUN([AC_PROG_JAVAC],[ AC_REQUIRE([AC_EXEEXT])dnl if test "x$JAVAPREFIX" = x; then test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT) else test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT, $JAVAPREFIX) fi test "x$JAVAC" = x && AC_MSG_WARN([no acceptable Java compiler found in \$PATH]) AC_PROG_JAVAC_WORKS AC_PROVIDE([$0])dnl ]) dnl @synopsis AC_PROG_JAVAC_WORKS dnl dnl Internal use ONLY. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Stephane Bortzmeyer dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl AC_DEFUN([AC_PROG_JAVAC_WORKS],[ AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [ JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST /* [#]line __oline__ "configure" */ public class Test { } EOF if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) >/dev/null 2>&1; then ac_cv_prog_javac_works=yes else AC_MSG_WARN([The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)]) echo "configure: failed program was:" >&AC_FD_CC cat $JAVA_TEST >&AC_FD_CC fi rm -f $JAVA_TEST $CLASS_TEST ]) AC_PROVIDE([$0])dnl ]) dnl @synopsis AC_PROG_JAVADOC dnl dnl AC_PROG_JAVADOC tests for an existing javadoc generator. It uses the environment dnl variable JAVADOC then tests in sequence various common javadoc generator. dnl dnl If you want to force a specific compiler: dnl dnl - at the configure.in level, set JAVADOC=yourgenerator before calling dnl AC_PROG_JAVADOC dnl dnl - at the configure level, setenv JAVADOC dnl dnl You can use the JAVADOC variable in your Makefile.in, with @JAVADOC@. dnl dnl Note: This macro depends on the autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download that whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl dnl The general documentation of those macros, as well as the sample dnl configure.in, is included in the AC_PROG_JAVA macro. dnl dnl @author Egon Willighagen dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl AC_DEFUN([AC_PROG_JAVADOC],[ AC_REQUIRE([AC_EXEEXT])dnl if test "x$JAVAPREFIX" = x; then test "x$JAVADOC" = x && AC_CHECK_PROGS(JAVADOC, javadoc$EXEEXT) else test "x$JAVADOC" = x && AC_CHECK_PROGS(JAVADOC, javadoc, $JAVAPREFIX) fi test "x$JAVADOC" = x && AC_MSG_WARN([no acceptable javadoc generator found in \$PATH]) AC_PROVIDE([$0])dnl ]) dnl @synopsis AC_PROG_JAVAH dnl dnl AC_PROG_JAVAH tests the availability of the javah header generator dnl and looks for the jni.h header file. If available, JAVAH is set to dnl the full path of javah and CPPFLAGS is updated accordingly. dnl dnl @author Luc Maisonobe dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl AC_DEFUN([AC_PROG_JAVAH],[ AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl AC_REQUIRE([AC_PROG_CPP])dnl AC_PATH_PROG(JAVAH,javah) if test x"`eval 'echo $ac_cv_path_JAVAH'`" != x ; then AC_TRY_CPP([#include ],,[ ac_save_CPPFLAGS="$CPPFLAGS" changequote(, )dnl ac_dir=`echo $ac_cv_path_JAVAH | sed 's,\(.*\)/[^/]*/[^/]*$,\1/include,'` ac_machdep=`echo $build_os | sed 's,[-0-9].*,,' | sed 's,cygwin,win32,'` changequote([, ])dnl CPPFLAGS="$ac_save_CPPFLAGS -I$ac_dir -I$ac_dir/$ac_machdep" AC_TRY_CPP([#include ], ac_save_CPPFLAGS="$CPPFLAGS", AC_MSG_WARN([unable to include ])) CPPFLAGS="$ac_save_CPPFLAGS"]) fi]) dnl @synopsis AC_PROG_JAVA dnl dnl Here is a summary of the main macros: dnl dnl AC_PROG_JAVAC: finds a Java compiler. dnl dnl AC_PROG_JAVA: finds a Java virtual machine. dnl dnl AC_CHECK_CLASS: finds if we have the given class (beware of CLASSPATH!). dnl dnl AC_CHECK_RQRD_CLASS: finds if we have the given class and stops otherwise. dnl dnl AC_TRY_COMPILE_JAVA: attempt to compile user given source. dnl dnl AC_TRY_RUN_JAVA: attempt to compile and run user given source. dnl dnl AC_JAVA_OPTIONS: adds Java configure options. dnl dnl AC_PROG_JAVA tests an existing Java virtual machine. It uses the dnl environment variable JAVA then tests in sequence various common Java dnl virtual machines. For political reasons, it starts with the free ones. dnl You *must* call [AC_PROG_JAVAC] before. dnl dnl If you want to force a specific VM: dnl dnl - at the configure.in level, set JAVA=yourvm before calling AC_PROG_JAVA dnl (but after AC_INIT) dnl dnl - at the configure level, setenv JAVA dnl dnl You can use the JAVA variable in your Makefile.in, with @JAVA@. dnl dnl *Warning*: its success or failure can depend on a proper setting of the dnl CLASSPATH env. variable. dnl dnl TODO: allow to exclude virtual machines (rationale: most Java programs dnl cannot run with some VM like kaffe). dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl dnl A Web page, with a link to the latest CVS snapshot is at dnl . dnl dnl This is a sample configure.in dnl Process this file with autoconf to produce a configure script. dnl dnl AC_INIT(UnTag.java) dnl dnl dnl Checks for programs. dnl AC_CHECK_CLASSPATH dnl AC_PROG_JAVAC dnl AC_PROG_JAVA dnl dnl dnl Checks for classes dnl AC_CHECK_RQRD_CLASS(org.xml.sax.Parser) dnl AC_CHECK_RQRD_CLASS(com.jclark.xml.sax.Driver) dnl dnl AC_OUTPUT(Makefile) dnl dnl @author Stephane Bortzmeyer dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl AC_DEFUN([AC_PROG_JAVA],[ AC_REQUIRE([AC_EXEEXT])dnl if test x$JAVAPREFIX = x; then test x$JAVA = x && AC_CHECK_PROGS(JAVA, kaffe$EXEEXT java$EXEEXT) else test x$JAVA = x && AC_CHECK_PROGS(JAVA, kaffe$EXEEXT java$EXEEXT, $JAVAPREFIX) fi test x$JAVA = x && AC_MSG_WARN([no acceptable Java virtual machine found in \$PATH]) AC_PROG_JAVA_WORKS AC_PROVIDE([$0])dnl ]) dnl @synopsis AC_PROG_JAVA_WORKS dnl dnl Internal use ONLY. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Stephane Bortzmeyer dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl AC_DEFUN([AC_PROG_JAVA_WORKS], [ AC_CHECK_PROG(uudecode, uudecode$EXEEXT, yes) if test x$uudecode = xyes; then AC_CACHE_CHECK([if uudecode can decode base 64 file], ac_cv_prog_uudecode_base64, [ dnl /** dnl * Test.java: used to test if java compiler works. dnl */ dnl public class Test dnl { dnl dnl public static void dnl main( String[] argv ) dnl { dnl System.exit (0); dnl } dnl dnl } cat << \EOF > Test.uue begin-base64 644 Test.class yv66vgADAC0AFQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51 bWJlclRhYmxlDAAKAAsBAARleGl0AQAEKEkpVgoADQAJBwAOAQAQamF2YS9s YW5nL1N5c3RlbQEABjxpbml0PgEAAygpVgwADwAQCgADABEBAApTb3VyY2VG aWxlAQAJVGVzdC5qYXZhACEAAQADAAAAAAACAAkABQAGAAEABwAAACEAAQAB AAAABQO4AAyxAAAAAQAIAAAACgACAAAACgAEAAsAAQAPABAAAQAHAAAAIQAB AAEAAAAFKrcAErEAAAABAAgAAAAKAAIAAAAEAAQABAABABMAAAACABQ= ==== EOF if uudecode$EXEEXT Test.uue; then ac_cv_prog_uudecode_base64=yes else echo "configure: __oline__: uudecode had trouble decoding base 64 file 'Test.uue'" >&AC_FD_CC echo "configure: failed file was:" >&AC_FD_CC cat Test.uue >&AC_FD_CC ac_cv_prog_uudecode_base64=no fi rm -f Test.uue]) fi if test x$ac_cv_prog_uudecode_base64 != xyes; then rm -f Test.class AC_MSG_WARN([I have to compile Test.class from scratch]) if test x$ac_cv_prog_javac_works = xno; then AC_MSG_WARN([Cannot compile java source. $JAVAC does not work properly]) fi if test x$ac_cv_prog_javac_works = x; then AC_PROG_JAVAC fi fi AC_CACHE_CHECK(if $JAVA works, ac_cv_prog_java_works, [ JAVA_TEST=Test.java CLASS_TEST=Test.class TEST=Test changequote(, )dnl cat << \EOF > $JAVA_TEST /* [#]line __oline__ "configure" */ public class Test { public static void main (String args[]) { System.exit (0); } } EOF changequote([, ])dnl if test x$ac_cv_prog_uudecode_base64 != xyes; then if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) && test -s $CLASS_TEST; then : else echo "configure: failed program was:" >&AC_FD_CC cat $JAVA_TEST >&AC_FD_CC AC_MSG_WARN(The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)) fi fi if AC_TRY_COMMAND($JAVA $JAVAFLAGS $TEST) >/dev/null 2>&1; then ac_cv_prog_java_works=yes else echo "configure: failed program was:" >&AC_FD_CC cat $JAVA_TEST >&AC_FD_CC AC_MSG_WARN(The Java VM $JAVA failed (see config.log, check the CLASSPATH?)) fi rm -fr $JAVA_TEST $CLASS_TEST Test.uue ]) AC_PROVIDE([$0])dnl ] ) dnl @synopsis AC_TRY_COMPILE_JAVA dnl dnl AC_TRY_COMPILE_JAVA attempt to compile user given source. dnl dnl *Warning*: its success or failure can depend on a proper setting of the dnl CLASSPATH env. variable. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Devin Weaver dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl AC_DEFUN([AC_TRY_COMPILE_JAVA],[ AC_REQUIRE([AC_PROG_JAVAC])dnl cat << \EOF > Test.java /* [#]line __oline__ "configure" */ ifelse([$1], , , [import $1;]) public class Test { [$2] } EOF if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class then dnl Don't remove the temporary files here, so they can be examined. ifelse([$3], , :, [$3]) else echo "configure: failed program was:" >&AC_FD_CC cat Test.java >&AC_FD_CC ifelse([$4], , , [ rm -fr Test* $4 ])dnl fi rm -fr Test*]) dnl @synopsis AC_TRY_RUN_JAVA dnl dnl AC_TRY_RUN_JAVA attempt to compile and run user given source. dnl dnl *Warning*: its success or failure can depend on a proper setting of the dnl CLASSPATH env. variable. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Devin Weaver dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl AC_DEFUN([AC_TRY_RUN_JAVA],[ AC_REQUIRE([AC_PROG_JAVAC])dnl AC_REQUIRE([AC_PROG_JAVA])dnl cat << \EOF > Test.java /* [#]line __oline__ "configure" */ ifelse([$1], , , [include $1;]) public class Test { [$2] } EOF if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class && ($JAVA $JAVAFLAGS Test; exit) 2>/dev/null then dnl Don't remove the temporary files here, so they can be examined. ifelse([$3], , :, [$3]) else echo "configure: failed program was:" >&AC_FD_CC cat Test.java >&AC_FD_CC ifelse([$4], , , [ rm -fr Test* $4 ])dnl fi rm -fr Test*]) dnl @synopsis AX_SYS_PERLSHARPBANG dnl Determine how the perl interpreter is located by the OS kernel and make dnl substitution variable PERL_SHEBANG available. Does AC_PATH_PROG to find dnl the path to perl. As a side-effect, that sets PERLINTERP and makes it dnl available as a substitution variable. dnl dnl Note: dnl The macro allows for the possibility (expected to be seldom used) of an dnl explicit user override (the "user" being the operator executing the final dnl 'configure' script, in this context) by making the option argument like: dnl dnl --with-perl-shebang='#! /my/funky/perlpath' # OR dnl --with-perl-shebang='/my/funky/perlpath' # we just throw away the #! anyway dnl # bec it must be absent in Makefile dnl dnl Rationale: The are various ways of starting an interpreter on different dnl *nix-like systems. Many use the simple dnl #!/usr/bin/perl dnl but it could be instead dnl #!/usr/local/bin/perl dnl and there is even the possibility that the user wants dnl #!/usr/bin/env perl dnl to find whichever perl comes first in the current $PATH. This is preferred dnl by some of us because we run multiple perl installations on the same box. dnl Adjusting our $PATH then allows us to set precedence over other perls, even dnl whatever the "house" version is. dnl dnl Users on very non-unix systems like MS Windows do not have a kernel that dnl does this kind of thing from the first line of script files, but instead the dnl perl on their machine is started and merely notices whatever comes after dnl the interpreter path on this first line of the script (options like "-w"). dnl dnl dnl Acknowledgement: this macro was inspired in part by dnl authored by Dean Povey, see the AC-Archive (ac-archive.sf.net). dnl dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl @author Soren Andersen dnl AC_DEFUN([AX_SYS_PERLSHARPBANG],[dnl AC_PATH_PROG(PERLINTERP,perl,perl) ac_cv_path_perlinterp="$PERLINTERP" _sHpB='#!' AC_ARG_WITH(perl-shebang, AC_HELP_STRING([--with-perl-shebang], [override what perl thinks is the way for the kernel to start it (seldom needed)]dnl ), [opt_perl_shebang="$withval"]dnl ,dnl [opt_perl_shebang="not_set"]dnl )dnl AC_CACHE_CHECK([whether explicit instead of detected sharpbang is to be used], ax_cv_opt_perl_shebang, [ case "$opt_perl_shebang" in not_set ) ax_cv_opt_perl_shebang='' ;; * ) ax_cv_opt_perl_shebang=`echo "$opt_perl_shebang" | sed -e's|^#!\s*\(.*\)$|\1|'` esac ]dnl )dnl if test "A$ax_cv_opt_perl_shebang" != "A" then ac_cv_sys_kernshrpbang_perl="$ax_cv_opt_perl_shebang" PERL_SHEBANG="$ac_cv_sys_kernshrpbang_perl" AC_SUBST(PERL_SHEBANG)dnl AC_MSG_NOTICE([OK - PERL_SHEBANG is $_sHpB$PERL_SHEBANG.]) # Automatic detection of sharpbang formula starts here else dnl _somian_shbangperl=`$PERLINTERP -V:startperl` negclass="[[^']]"; dnl # must leave this comment: m4 will remove the outer brackets for us, heheh AC_CACHE_CHECK([for kernel sharpbang invocation to start perl], ac_cv_sys_kernshrpbang_perl, [_somian_kspb_perl=`echo "$_somian_shbangperl" | sed -ne"s|.*='\($negclass*\)';$|\1|p"` if test "x$_somian_kspb_perl" == x then _somian_ksbp_warn_empty='durnit' else case "A$_somian_kspb_perl" in A#!*perl* ) ac_cv_sys_kernshrpbang_perl=`echo "$_somian_kspb_perl" | sed -e's|#!\(.*\)$|\1|'` ;; A* ) _somian_ksbp_warn_defau='trouble' ac_cv_sys_kernshrpbang_perl="$PERLINTERP" esac fi ])dnl Done with testing sharpbang # The above prints Checking ... result message to user. PERL_SHEBANG="$ac_cv_sys_kernshrpbang_perl" AC_SUBST(PERL_SHEBANG) if test A${_somian_ksbp_warn_empty+set} == Aset then AC_MSG_WARN([dnl In last check, doing $PERLINTERP -V:startperl yielded empty result! That should not happen.]) fi # Inform user after printing result value if test A${_somian_ksbp_warn_defau+set} == Aset then AC_MSG_NOTICE([Maybe Not good -]) AC_MSG_WARN([dnl In last check perl's Config query did not work so we bunted: $_sHpB$PERLINTERP]) else AC_MSG_NOTICE([OK Good result - ]) AC_MSG_NOTICE([dnl In last check we got a proper-looking answer from perl's Config: $_somian_shbangperl]) dnl Done with user info messages fi dnl Outer loop checked for user override term here fi dnl ])dnl EOMACRO DEF dnl @synopsis ETR_SOCKET_NSL dnl dnl This macro figures out what libraries are required on this platform dnl to link sockets programs. It's usually -lsocket and/or -lnsl or dnl neither. We test for all three combinations. dnl dnl @version $Id: acinclude.m4,v 1.2 2005/10/04 15:21:36 jonico Exp $ dnl @author Warren Young dnl AC_DEFUN([ETR_SOCKET_NSL], [ AC_CACHE_CHECK(for libraries containing socket functions, ac_cv_socket_libs, [ oCFLAGS=$CFLAGS AC_TRY_LINK([ #include #include #include #include ], [ struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); ], ac_cv_socket_libs=-lc, ac_cv_socket_libs=no) if test x"$ac_cv_socket_libs" = "xno" then CFLAGS="$oCFLAGS -lsocket" AC_TRY_LINK([ #include #include #include #include ], [ struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); ], ac_cv_socket_libs=-lsocket, ac_cv_socket_libs=no) fi if test x"$ac_cv_socket_libs" = "xno" then CFLAGS="$oCFLAGS -lsocket -lnsl" AC_TRY_LINK([ #include #include #include #include ], [ struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); ], ac_cv_socket_libs="-lsocket -lnsl", ac_cv_socket_libs=no) fi CFLAGS=$oCFLAGS ]) if test x"$ac_cv_socket_libs" = "xno" then AC_MSG_ERROR([Cannot find socket libraries]) elif test x"$ac_cv_socket_libs" = "x-lc" then ETR_SOCKET_LIBS="" else ETR_SOCKET_LIBS="$ac_cv_socket_libs" fi AC_SUBST(ETR_SOCKET_LIBS) ]) dnl ETR_SOCKET_NSL dnl @synopsis AX_WITH_PYTHON([minimum-version], [value-if-not-found], [path]) dnl dnl Locates an installed Python binary, placing the result in the dnl precious variable $PYTHON. Accepts a present $PYTHON, then dnl --with-python, and failing that searches for python in the given dnl path (which defaults to the system path). If python is found, dnl $PYTHON is set to the full path of the binary; if it is not found, dnl $PYTHON is set to VALUE-IF-NOT-FOUND, which defaults to 'python'. dnl dnl Example: dnl dnl AX_WITH_PYTHON(2.2, missing) dnl dnl @category InstalledPackages dnl @author Dustin Mitchell dnl @version 2005-01-22 dnl @license GPLWithACException AC_DEFUN([AX_WITH_PYTHON], [ AC_ARG_VAR([PYTHON]) dnl unless PYTHON was supplied to us (as a precious variable) if test -z "$PYTHON" then AC_MSG_CHECKING(for --with-python) AC_ARG_WITH(python, AC_HELP_STRING([--with-python=PYTHON], [absolute path name of Python executable]), [ if test "$withval" != "yes" then PYTHON="$withval" AC_MSG_RESULT($withval) else AC_MSG_RESULT(no) fi ], [ AC_MSG_RESULT(no) ]) fi dnl if it's still not found, check the paths, or use the fallback if test -z "$PYTHON" then AC_PATH_PROG([PYTHON], python, m4_ifval([$2],[$2],[python]), $3) fi dnl check version if required m4_ifvaln([$1], [ dnl do this only if we didn't fall back if test "$PYTHON" != "m4_ifval([$2],[$2],[python])" then AC_MSG_CHECKING($PYTHON version >= $1) if test `$PYTHON -c ["import sys; print sys.version[:3] >= \"$1\" and \"OK\" or \"OLD\""]` = "OK" then AC_MSG_RESULT(ok) else AC_MSG_RESULT(no) PYTHON="$2" fi fi]) ]) realtimebattle-1.0.8/config/config.guess0000755000175000017500000012462210170545353016447 0ustar moimoi#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. timestamp='2004-10-25' # This file 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. # # 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 Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amd64:OpenBSD:*:*) echo x86_64-unknown-openbsd${UNAME_RELEASE} exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; cats:OpenBSD:*:*) echo arm-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; luna88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips64-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit 0 ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; *:OS400:*:*) echo powerpc-ibm-os400 exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit 0 ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms && exit 0 ;; I*) echo ia64-dec-vms && exit 0 ;; V*) echo vax-dec-vms && exit 0 ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: realtimebattle-1.0.8/config/config.rpath0000755000175000017500000003521310170545353016434 0ustar moimoi#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2003 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 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 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. # # 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. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux*) case $CC in icc|ecc) wl='-Wl,' ;; ccc) wl='-Wl,' ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; sco3.2v5*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) wl='-Wl,' ;; sysv4*MP*) ;; uts4*) ;; esac fi # Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi4*) ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then hardcode_direct=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10* | hpux11*) if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=no ;; ia64*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; *) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4.2uw2*) hardcode_direct=yes hardcode_minus_L=no ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) ;; sysv5*) hardcode_libdir_flag_spec= ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. libname_spec='lib$name' case "$host_os" in aix3*) ;; aix4* | aix5*) ;; amigaos*) ;; beos*) ;; bsdi4*) ;; cygwin* | mingw* | pw32*) shrext=.dll ;; darwin* | rhapsody*) shrext=.dylib ;; dgux*) ;; freebsd1*) ;; freebsd*) ;; gnu*) ;; hpux9* | hpux10* | hpux11*) case "$host_cpu" in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac ;; irix5* | irix6* | nonstopux*) case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux*) ;; netbsd*) ;; newsos6) ;; nto-qnx) ;; openbsd*) ;; os2*) libname_spec='$name' shrext=.dll ;; osf3* | osf4* | osf5*) ;; sco3.2v5*) ;; solaris*) ;; sunos4*) ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ;; sysv4*MP*) ;; uts4*) ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: realtimebattle-1.0.8/config/depcomp0000755000175000017500000003554510170545354015512 0ustar moimoi#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2004-05-31.23 # Copyright (C) 1999, 2000, 2003, 2004 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 . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit 0 ;; -v | --v*) echo "depcomp $scriptversion" exit 0 ;; esac 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 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} 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 # Dependencies are output in .lo.d with libtool 1.4. # With libtool 1.5 they are output both in $dir.libs/$base.o.d # and in $dir.libs/$base.o.d and $dir$base.o.d. We process the # latter, because the former will be cleaned when $dir.libs is # erased. tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir$base.o.d" tmpdepfile3="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" tmpdepfile3="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" elif test -f "$tmpdepfile2"; then tmpdepfile="$tmpdepfile2" else tmpdepfile="$tmpdepfile3" 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 # 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: realtimebattle-1.0.8/config/install-sh0000755000175000017500000002201110170545354016121 0ustar moimoi#!/bin/sh # install - install a program, script, or datafile scriptversion=2004-10-22.00 # 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}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit 0;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $cpprog "$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 $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # 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 test -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 || { (exit 1); exit; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: realtimebattle-1.0.8/config/missing0000755000175000017500000002453310170545354015527 0ustar moimoi#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2004-09-07.08 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 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 msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -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] Send bug reports to ." exit 0 ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit 0 ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. 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) echo 1>&2 "\ WARNING: \`$1' is $msg. 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) echo 1>&2 "\ WARNING: \`$1' is $msg. 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*) echo 1>&2 "\ WARNING: \`$1' is $msg. 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) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. 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' $msg. 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 $msg. 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) echo 1>&2 "\ WARNING: \`$1' is $msg. 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) echo 1>&2 "\ WARNING: \`$1' is $msg. 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 # 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 is $msg. 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 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: realtimebattle-1.0.8/config/mkinstalldirs0000755000175000017500000000370410170545354016733 0ustar moimoi#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # 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 realtimebattle-1.0.8/intl/0002755000175000017500000000000010404234035013613 5ustar moimoirealtimebattle-1.0.8/intl/Makefile.in0000644000175000017500000003762610170545357015710 0ustar moimoi# Makefile for directory with message catalog handling library of GNU gettext # Copyright (C) 1995-1998, 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 Library 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library 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. PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = .. VPATH = $(srcdir) prefix = @prefix@ exec_prefix = @exec_prefix@ transform = @program_transform_name@ libdir = @libdir@ includedir = @includedir@ datadir = @datadir@ localedir = $(datadir)/locale gettextsrcdir = $(datadir)/gettext/intl aliaspath = $(localedir) subdir = intl INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = @MKINSTALLDIRS@ mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) l = @INTL_LIBTOOL_SUFFIX_PREFIX@ AR = ar CC = @CC@ LIBTOOL = @LIBTOOL@ RANLIB = @RANLIB@ YACC = @INTLBISON@ -y -d YFLAGS = --name-prefix=__gettext DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ -DLIBDIR=\"$(libdir)\" -DIN_LIBINTL \ -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \ -Dset_relocation_prefix=libintl_set_relocation_prefix \ -Drelocate=libintl_relocate \ -DDEPENDS_ON_LIBICONV=1 @DEFS@ CPPFLAGS = @CPPFLAGS@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) HEADERS = \ gmo.h \ gettextP.h \ hash-string.h \ loadinfo.h \ plural-exp.h \ eval-plural.h \ localcharset.h \ relocatable.h \ xsize.h \ printf-args.h printf-args.c \ printf-parse.h wprintf-parse.h printf-parse.c \ vasnprintf.h vasnwprintf.h vasnprintf.c \ os2compat.h \ libgnuintl.h.in SOURCES = \ bindtextdom.c \ dcgettext.c \ dgettext.c \ gettext.c \ finddomain.c \ loadmsgcat.c \ localealias.c \ textdomain.c \ l10nflist.c \ explodename.c \ dcigettext.c \ dcngettext.c \ dngettext.c \ ngettext.c \ plural.y \ plural-exp.c \ localcharset.c \ relocatable.c \ localename.c \ log.c \ printf.c \ osdep.c \ os2compat.c \ intl-compat.c OBJECTS = \ bindtextdom.$lo \ dcgettext.$lo \ dgettext.$lo \ gettext.$lo \ finddomain.$lo \ loadmsgcat.$lo \ localealias.$lo \ textdomain.$lo \ l10nflist.$lo \ explodename.$lo \ dcigettext.$lo \ dcngettext.$lo \ dngettext.$lo \ ngettext.$lo \ plural.$lo \ plural-exp.$lo \ localcharset.$lo \ relocatable.$lo \ localename.$lo \ log.$lo \ printf.$lo \ osdep.$lo \ intl-compat.$lo DISTFILES.common = Makefile.in \ config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES) DISTFILES.generated = plural.c DISTFILES.normal = VERSION DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \ libgnuintl.h_vms Makefile.vms \ libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \ COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h all: all-@USE_INCLUDED_LIBINTL@ all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed all-no: all-no-@BUILD_INCLUDED_LIBINTL@ all-no-yes: libgnuintl.$la all-no-no: libintl.a libgnuintl.a: $(OBJECTS) rm -f $@ $(AR) cru $@ $(OBJECTS) $(RANLIB) $@ libintl.la libgnuintl.la: $(OBJECTS) $(LIBTOOL) --mode=link \ $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \ $(OBJECTS) @LTLIBICONV@ $(LIBS) -lc \ -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ -rpath $(libdir) \ -no-undefined # Libtool's library version information for libintl. # Before making a gettext release, the gettext maintainer must change this # according to the libtool documentation, section "Library interface versions". # Maintainers of other packages that include the intl directory must *not* # change these values. LTV_CURRENT=7 LTV_REVISION=0 LTV_AGE=4 .SUFFIXES: .SUFFIXES: .c .y .o .lo .sin .sed .c.o: $(COMPILE) $< .y.c: $(YACC) $(YFLAGS) --output $@ $< rm -f $*.h bindtextdom.lo: $(srcdir)/bindtextdom.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c dcgettext.lo: $(srcdir)/dcgettext.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c dgettext.lo: $(srcdir)/dgettext.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c gettext.lo: $(srcdir)/gettext.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c finddomain.lo: $(srcdir)/finddomain.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c loadmsgcat.lo: $(srcdir)/loadmsgcat.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c localealias.lo: $(srcdir)/localealias.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c textdomain.lo: $(srcdir)/textdomain.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c l10nflist.lo: $(srcdir)/l10nflist.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c explodename.lo: $(srcdir)/explodename.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c dcigettext.lo: $(srcdir)/dcigettext.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c dcngettext.lo: $(srcdir)/dcngettext.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c dngettext.lo: $(srcdir)/dngettext.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c ngettext.lo: $(srcdir)/ngettext.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c plural.lo: $(srcdir)/plural.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c plural-exp.lo: $(srcdir)/plural-exp.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c localcharset.lo: $(srcdir)/localcharset.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c relocatable.lo: $(srcdir)/relocatable.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c localename.lo: $(srcdir)/localename.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c log.lo: $(srcdir)/log.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c printf.lo: $(srcdir)/printf.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c osdep.lo: $(srcdir)/osdep.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c intl-compat.lo: $(srcdir)/intl-compat.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c ref-add.sed: $(srcdir)/ref-add.sin sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed mv t-ref-add.sed ref-add.sed ref-del.sed: $(srcdir)/ref-del.sin sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed mv t-ref-del.sed ref-del.sed INCLUDES = -I. -I$(srcdir) -I.. libgnuintl.h: $(srcdir)/libgnuintl.h.in sed -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \ -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \ -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ < $(srcdir)/libgnuintl.h.in > libgnuintl.h libintl.h: libgnuintl.h cp libgnuintl.h libintl.h charset.alias: $(srcdir)/config.charset $(SHELL) $(srcdir)/config.charset '@host@' > t-$@ mv t-$@ $@ check: all # We must not install the libintl.h/libintl.a files if we are on a # system which has the GNU gettext() function in its C library or in a # separate library. # If you want to use the one which comes with this version of the # package, you have to use `configure --with-included-gettext'. install: install-exec install-data install-exec: all if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ && test '@USE_INCLUDED_LIBINTL@' = yes; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \ $(LIBTOOL) --mode=install \ $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \ if test "@RELOCATABLE@" = yes; then \ dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \ if test -n "$$dependencies"; then \ rm -f $(DESTDIR)$(libdir)/libintl.la; \ fi; \ fi; \ else \ : ; \ fi if test "$(PACKAGE)" = "gettext-tools" \ && test '@USE_INCLUDED_LIBINTL@' = no; then \ $(mkinstalldirs) $(DESTDIR)$(libdir); \ $(LIBTOOL) --mode=install \ $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \ $(LIBTOOL) --mode=uninstall \ rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \ else \ : ; \ fi if test '@USE_INCLUDED_LIBINTL@' = yes; then \ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \ temp=$(DESTDIR)$(libdir)/t-charset.alias; \ dest=$(DESTDIR)$(libdir)/charset.alias; \ if test -f $(DESTDIR)$(libdir)/charset.alias; then \ orig=$(DESTDIR)$(libdir)/charset.alias; \ sed -f ref-add.sed $$orig > $$temp; \ $(INSTALL_DATA) $$temp $$dest; \ rm -f $$temp; \ else \ if test @GLIBC21@ = no; then \ orig=charset.alias; \ sed -f ref-add.sed $$orig > $$temp; \ $(INSTALL_DATA) $$temp $$dest; \ rm -f $$temp; \ fi; \ fi; \ $(mkinstalldirs) $(DESTDIR)$(localedir); \ test -f $(DESTDIR)$(localedir)/locale.alias \ && orig=$(DESTDIR)$(localedir)/locale.alias \ || orig=$(srcdir)/locale.alias; \ temp=$(DESTDIR)$(localedir)/t-locale.alias; \ dest=$(DESTDIR)$(localedir)/locale.alias; \ sed -f ref-add.sed $$orig > $$temp; \ $(INSTALL_DATA) $$temp $$dest; \ rm -f $$temp; \ else \ : ; \ fi install-data: all if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \ $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \ dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \ for file in $$dists; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \ dists="$(DISTFILES.generated)"; \ for file in $$dists; do \ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ $(INSTALL_DATA) $$dir/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ dists="$(DISTFILES.obsolete)"; \ for file in $$dists; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-strip: install installdirs: if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ && test '@USE_INCLUDED_LIBINTL@' = yes; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ else \ : ; \ fi if test "$(PACKAGE)" = "gettext-tools" \ && test '@USE_INCLUDED_LIBINTL@' = no; then \ $(mkinstalldirs) $(DESTDIR)$(libdir); \ else \ : ; \ fi if test '@USE_INCLUDED_LIBINTL@' = yes; then \ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \ $(mkinstalldirs) $(DESTDIR)$(localedir); \ else \ : ; \ fi if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi # Define this as empty until I found a useful application. installcheck: uninstall: if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ && test '@USE_INCLUDED_LIBINTL@' = yes; then \ rm -f $(DESTDIR)$(includedir)/libintl.h; \ $(LIBTOOL) --mode=uninstall \ rm -f $(DESTDIR)$(libdir)/libintl.$la; \ else \ : ; \ fi if test "$(PACKAGE)" = "gettext-tools" \ && test '@USE_INCLUDED_LIBINTL@' = no; then \ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ else \ : ; \ fi if test '@USE_INCLUDED_LIBINTL@' = yes; then \ if test -f $(DESTDIR)$(libdir)/charset.alias; then \ temp=$(DESTDIR)$(libdir)/t-charset.alias; \ dest=$(DESTDIR)$(libdir)/charset.alias; \ sed -f ref-del.sed $$dest > $$temp; \ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ rm -f $$dest; \ else \ $(INSTALL_DATA) $$temp $$dest; \ fi; \ rm -f $$temp; \ fi; \ if test -f $(DESTDIR)$(localedir)/locale.alias; then \ temp=$(DESTDIR)$(localedir)/t-locale.alias; \ dest=$(DESTDIR)$(localedir)/locale.alias; \ sed -f ref-del.sed $$dest > $$temp; \ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ rm -f $$dest; \ else \ $(INSTALL_DATA) $$temp $$dest; \ fi; \ rm -f $$temp; \ fi; \ else \ : ; \ fi if test "$(PACKAGE)" = "gettext-tools"; then \ for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi info dvi ps pdf html: $(OBJECTS): ../config.h libgnuintl.h bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h dcigettext.$lo: $(srcdir)/eval-plural.h localcharset.$lo: $(srcdir)/localcharset.h localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-parse.h $(srcdir)/wprintf-parse.h $(srcdir)/xsize.h $(srcdir)/printf-parse.c $(srcdir)/vasnprintf.h $(srcdir)/vasnwprintf.h $(srcdir)/vasnprintf.c tags: TAGS TAGS: $(HEADERS) $(SOURCES) here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES) id: ID ID: $(HEADERS) $(SOURCES) here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) mostlyclean: rm -f *.a *.la *.o *.obj *.lo core core.* rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed rm -f -r .libs _libs clean: mostlyclean distclean: clean rm -f Makefile ID TAGS if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \ rm -f ChangeLog.inst $(DISTFILES.normal); \ else \ : ; \ fi maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." # GNU gettext needs not contain the file `VERSION' but contains some # other files which should not be distributed in other packages. distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: Makefile if test "$(PACKAGE)" = "gettext-tools"; then \ : ; \ else \ if test "$(PACKAGE)" = "gettext-runtime"; then \ additional="$(DISTFILES.gettext)"; \ else \ additional="$(DISTFILES.normal)"; \ fi; \ $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \ for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ cp -p $$dir/$$file $(distdir); \ done; \ fi Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status # This would be more efficient, but doesn't work any more with autoconf-2.57, # when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used. # cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: realtimebattle-1.0.8/intl/ChangeLog0000644000175000017500000000011110170545357015370 0ustar moimoi2004-01-29 GNU * Version 0.14.1 released. realtimebattle-1.0.8/intl/config.charset0000755000175000017500000004340610170545357016457 0ustar moimoi#! /bin/sh # Output a system dependent table of character encoding aliases. # # Copyright (C) 2000-2004 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library 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. # # The table consists of lines of the form # ALIAS CANONICAL # # ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". # ALIAS is compared in a case sensitive way. # # CANONICAL is the GNU canonical name for this character encoding. # It must be an encoding supported by libiconv. Support by GNU libc is # also desirable. CANONICAL is case insensitive. Usually an upper case # MIME charset name is preferred. # The current list of GNU canonical charset names is as follows. # # name MIME? used by which systems # ASCII, ANSI_X3.4-1968 glibc solaris freebsd darwin # ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd darwin # ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd darwin # ISO-8859-3 Y glibc solaris # ISO-8859-4 Y osf solaris freebsd darwin # ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd darwin # ISO-8859-6 Y glibc aix hpux solaris # ISO-8859-7 Y glibc aix hpux irix osf solaris # ISO-8859-8 Y glibc aix hpux osf solaris # ISO-8859-9 Y glibc aix hpux irix osf solaris # ISO-8859-13 glibc # ISO-8859-14 glibc # ISO-8859-15 glibc aix osf solaris freebsd # KOI8-R Y glibc solaris freebsd darwin # KOI8-U Y glibc freebsd darwin # KOI8-T glibc # CP437 dos # CP775 dos # CP850 aix osf dos # CP852 dos # CP855 dos # CP856 aix # CP857 dos # CP861 dos # CP862 dos # CP864 dos # CP865 dos # CP866 freebsd darwin dos # CP869 dos # CP874 woe32 dos # CP922 aix # CP932 aix woe32 dos # CP943 aix # CP949 osf woe32 dos # CP950 woe32 dos # CP1046 aix # CP1124 aix # CP1125 dos # CP1129 aix # CP1250 woe32 # CP1251 glibc solaris darwin woe32 # CP1252 aix woe32 # CP1253 woe32 # CP1254 woe32 # CP1255 glibc woe32 # CP1256 woe32 # CP1257 woe32 # GB2312 Y glibc aix hpux irix solaris freebsd darwin # EUC-JP Y glibc aix hpux irix osf solaris freebsd darwin # EUC-KR Y glibc aix hpux irix osf solaris freebsd darwin # EUC-TW glibc aix hpux irix osf solaris # BIG5 Y glibc aix hpux osf solaris freebsd darwin # BIG5-HKSCS glibc solaris # GBK glibc aix osf solaris woe32 dos # GB18030 glibc solaris # SHIFT_JIS Y hpux osf solaris freebsd darwin # JOHAB glibc solaris woe32 # TIS-620 glibc aix hpux osf solaris # VISCII Y glibc # TCVN5712-1 glibc # GEORGIAN-PS glibc # HP-ROMAN8 hpux # HP-ARABIC8 hpux # HP-GREEK8 hpux # HP-HEBREW8 hpux # HP-TURKISH8 hpux # HP-KANA8 hpux # DEC-KANJI osf # DEC-HANYU osf # UTF-8 Y glibc aix hpux osf solaris # # Note: Names which are not marked as being a MIME name should not be used in # Internet protocols for information interchange (mail, news, etc.). # # Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications # must understand both names and treat them as equivalent. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM host="$1" os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` echo "# This file contains a table of character encoding aliases," echo "# suitable for operating system '${os}'." echo "# It was automatically generated from config.charset." # List of references, updated during installation: echo "# Packages using this file: " case "$os" in linux-gnulibc1*) # Linux libc5 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" echo "POSIX ASCII" for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \ sv_FI sv_SE; do echo "$l ISO-8859-1" echo "$l.iso-8859-1 ISO-8859-1" echo "$l.iso-8859-15 ISO-8859-15" echo "$l.iso-8859-15@euro ISO-8859-15" echo "$l@euro ISO-8859-15" echo "$l.cp-437 CP437" echo "$l.cp-850 CP850" echo "$l.cp-1252 CP1252" echo "$l.cp-1252@euro CP1252" #echo "$l.atari-st ATARI-ST" # not a commonly used encoding echo "$l.utf-8 UTF-8" echo "$l.utf-8@euro UTF-8" done for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \ sl_SI sr sr_CS sr_YU; do echo "$l ISO-8859-2" echo "$l.iso-8859-2 ISO-8859-2" echo "$l.cp-852 CP852" echo "$l.cp-1250 CP1250" echo "$l.utf-8 UTF-8" done for l in mk mk_MK ru ru_RU; do echo "$l ISO-8859-5" echo "$l.iso-8859-5 ISO-8859-5" echo "$l.koi8-r KOI8-R" echo "$l.cp-866 CP866" echo "$l.cp-1251 CP1251" echo "$l.utf-8 UTF-8" done for l in ar ar_SA; do echo "$l ISO-8859-6" echo "$l.iso-8859-6 ISO-8859-6" echo "$l.cp-864 CP864" #echo "$l.cp-868 CP868" # not a commonly used encoding echo "$l.cp-1256 CP1256" echo "$l.utf-8 UTF-8" done for l in el el_GR gr gr_GR; do echo "$l ISO-8859-7" echo "$l.iso-8859-7 ISO-8859-7" echo "$l.cp-869 CP869" echo "$l.cp-1253 CP1253" echo "$l.cp-1253@euro CP1253" echo "$l.utf-8 UTF-8" echo "$l.utf-8@euro UTF-8" done for l in he he_IL iw iw_IL; do echo "$l ISO-8859-8" echo "$l.iso-8859-8 ISO-8859-8" echo "$l.cp-862 CP862" echo "$l.cp-1255 CP1255" echo "$l.utf-8 UTF-8" done for l in tr tr_TR; do echo "$l ISO-8859-9" echo "$l.iso-8859-9 ISO-8859-9" echo "$l.cp-857 CP857" echo "$l.cp-1254 CP1254" echo "$l.utf-8 UTF-8" done for l in lt lt_LT lv lv_LV; do #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name echo "$l ISO-8859-13" done for l in ru_UA uk uk_UA; do echo "$l KOI8-U" done for l in zh zh_CN; do #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name echo "$l GB2312" done for l in ja ja_JP ja_JP.EUC; do echo "$l EUC-JP" done for l in ko ko_KR; do echo "$l EUC-KR" done for l in th th_TH; do echo "$l TIS-620" done for l in fa fa_IR; do #echo "$l ISIRI-3342" # a broken encoding echo "$l.utf-8 UTF-8" done ;; linux* | *-gnu*) # With glibc-2.1 or newer, we don't need any canonicalization, # because glibc has iconv and both glibc and libiconv support all # GNU canonical names directly. Therefore, the Makefile does not # need to install the alias file at all. # The following applies only to glibc-2.0.x and older libcs. echo "ISO_646.IRV:1983 ASCII" ;; aix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "IBM-850 CP850" echo "IBM-856 CP856" echo "IBM-921 ISO-8859-13" echo "IBM-922 CP922" echo "IBM-932 CP932" echo "IBM-943 CP943" echo "IBM-1046 CP1046" echo "IBM-1124 CP1124" echo "IBM-1129 CP1129" echo "IBM-1252 CP1252" echo "IBM-eucCN GB2312" echo "IBM-eucJP EUC-JP" echo "IBM-eucKR EUC-KR" echo "IBM-eucTW EUC-TW" echo "big5 BIG5" echo "GBK GBK" echo "TIS-620 TIS-620" echo "UTF-8 UTF-8" ;; hpux*) echo "iso88591 ISO-8859-1" echo "iso88592 ISO-8859-2" echo "iso88595 ISO-8859-5" echo "iso88596 ISO-8859-6" echo "iso88597 ISO-8859-7" echo "iso88598 ISO-8859-8" echo "iso88599 ISO-8859-9" echo "iso885915 ISO-8859-15" echo "roman8 HP-ROMAN8" echo "arabic8 HP-ARABIC8" echo "greek8 HP-GREEK8" echo "hebrew8 HP-HEBREW8" echo "turkish8 HP-TURKISH8" echo "kana8 HP-KANA8" echo "tis620 TIS-620" echo "big5 BIG5" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "hp15CN GB2312" #echo "ccdc ?" # what is this? echo "SJIS SHIFT_JIS" echo "utf8 UTF-8" ;; irix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-9 ISO-8859-9" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" ;; osf*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "cp850 CP850" echo "big5 BIG5" echo "dechanyu DEC-HANYU" echo "dechanzi GB2312" echo "deckanji DEC-KANJI" echo "deckorean EUC-KR" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "GBK GBK" echo "KSC5601 CP949" echo "sdeckanji EUC-JP" echo "SJIS SHIFT_JIS" echo "TACTIS TIS-620" echo "UTF-8 UTF-8" ;; solaris*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-3 ISO-8859-3" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "koi8-r KOI8-R" echo "ansi-1251 CP1251" echo "BIG5 BIG5" echo "Big5-HKSCS BIG5-HKSCS" echo "gb2312 GB2312" echo "GBK GBK" echo "GB18030 GB18030" echo "cns11643 EUC-TW" echo "5601 EUC-KR" echo "ko_KR.johap92 JOHAB" echo "eucJP EUC-JP" echo "PCK SHIFT_JIS" echo "TIS620.2533 TIS-620" #echo "sun_eu_greek ?" # what is this? echo "UTF-8 UTF-8" ;; freebsd* | os2*) # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just # reuse FreeBSD's locale data for OS/2. echo "C ASCII" echo "US-ASCII ASCII" for l in la_LN lt_LN; do echo "$l.ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do echo "$l.ISO_8859-1 ISO-8859-1" echo "$l.DIS_8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do echo "$l.ISO_8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO_8859-4 ISO-8859-4" done for l in ru_RU ru_SU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO_8859-5 ISO-8859-5" echo "$l.CP866 CP866" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ja_JP.Shift_JIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; netbsd*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-15 ISO-8859-15" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "BIG5 BIG5" echo "SJIS SHIFT_JIS" ;; darwin*) # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" for l in en_AU en_CA en_GB en_US la_LN; do echo "$l.US-ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \ nl_NL no_NO pt_PT sv_SE; do echo "$l ISO-8859-1" echo "$l.ISO8859-1 ISO-8859-1" echo "$l.ISO8859-15 ISO-8859-15" done for l in la_LN; do echo "$l.ISO8859-1 ISO-8859-1" echo "$l.ISO8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do echo "$l.ISO8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO8859-4 ISO-8859-4" done for l in ru_RU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO8859-5 ISO-8859-5" echo "$l.CP866 CP866" done for l in bg_BG; do echo "$l.CP1251 CP1251" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; beos*) # BeOS has a single locale, and it has UTF-8 encoding. echo "* UTF-8" ;; msdosdjgpp*) # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "#" echo "# The encodings given here may not all be correct." echo "# If you find that the encoding given for your language and" echo "# country is not the one your DOS machine actually uses, just" echo "# correct it in this file, and send a mail to" echo "# Juan Manuel Guerrero " echo "# and Bruno Haible ." echo "#" echo "C ASCII" # ISO-8859-1 languages echo "ca CP850" echo "ca_ES CP850" echo "da CP865" # not CP850 ?? echo "da_DK CP865" # not CP850 ?? echo "de CP850" echo "de_AT CP850" echo "de_CH CP850" echo "de_DE CP850" echo "en CP850" echo "en_AU CP850" # not CP437 ?? echo "en_CA CP850" echo "en_GB CP850" echo "en_NZ CP437" echo "en_US CP437" echo "en_ZA CP850" # not CP437 ?? echo "es CP850" echo "es_AR CP850" echo "es_BO CP850" echo "es_CL CP850" echo "es_CO CP850" echo "es_CR CP850" echo "es_CU CP850" echo "es_DO CP850" echo "es_EC CP850" echo "es_ES CP850" echo "es_GT CP850" echo "es_HN CP850" echo "es_MX CP850" echo "es_NI CP850" echo "es_PA CP850" echo "es_PY CP850" echo "es_PE CP850" echo "es_SV CP850" echo "es_UY CP850" echo "es_VE CP850" echo "et CP850" echo "et_EE CP850" echo "eu CP850" echo "eu_ES CP850" echo "fi CP850" echo "fi_FI CP850" echo "fr CP850" echo "fr_BE CP850" echo "fr_CA CP850" echo "fr_CH CP850" echo "fr_FR CP850" echo "ga CP850" echo "ga_IE CP850" echo "gd CP850" echo "gd_GB CP850" echo "gl CP850" echo "gl_ES CP850" echo "id CP850" # not CP437 ?? echo "id_ID CP850" # not CP437 ?? echo "is CP861" # not CP850 ?? echo "is_IS CP861" # not CP850 ?? echo "it CP850" echo "it_CH CP850" echo "it_IT CP850" echo "lt CP775" echo "lt_LT CP775" echo "lv CP775" echo "lv_LV CP775" echo "nb CP865" # not CP850 ?? echo "nb_NO CP865" # not CP850 ?? echo "nl CP850" echo "nl_BE CP850" echo "nl_NL CP850" echo "nn CP865" # not CP850 ?? echo "nn_NO CP865" # not CP850 ?? echo "no CP865" # not CP850 ?? echo "no_NO CP865" # not CP850 ?? echo "pt CP850" echo "pt_BR CP850" echo "pt_PT CP850" echo "sv CP850" echo "sv_SE CP850" # ISO-8859-2 languages echo "cs CP852" echo "cs_CZ CP852" echo "hr CP852" echo "hr_HR CP852" echo "hu CP852" echo "hu_HU CP852" echo "pl CP852" echo "pl_PL CP852" echo "ro CP852" echo "ro_RO CP852" echo "sk CP852" echo "sk_SK CP852" echo "sl CP852" echo "sl_SI CP852" echo "sq CP852" echo "sq_AL CP852" echo "sr CP852" # CP852 or CP866 or CP855 ?? echo "sr_CS CP852" # CP852 or CP866 or CP855 ?? echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? # ISO-8859-3 languages echo "mt CP850" echo "mt_MT CP850" # ISO-8859-5 languages echo "be CP866" echo "be_BE CP866" echo "bg CP866" # not CP855 ?? echo "bg_BG CP866" # not CP855 ?? echo "mk CP866" # not CP855 ?? echo "mk_MK CP866" # not CP855 ?? echo "ru CP866" echo "ru_RU CP866" echo "uk CP1125" echo "uk_UA CP1125" # ISO-8859-6 languages echo "ar CP864" echo "ar_AE CP864" echo "ar_DZ CP864" echo "ar_EG CP864" echo "ar_IQ CP864" echo "ar_IR CP864" echo "ar_JO CP864" echo "ar_KW CP864" echo "ar_MA CP864" echo "ar_OM CP864" echo "ar_QA CP864" echo "ar_SA CP864" echo "ar_SY CP864" # ISO-8859-7 languages echo "el CP869" echo "el_GR CP869" # ISO-8859-8 languages echo "he CP862" echo "he_IL CP862" # ISO-8859-9 languages echo "tr CP857" echo "tr_TR CP857" # Japanese echo "ja CP932" echo "ja_JP CP932" # Chinese echo "zh_CN GBK" echo "zh_TW CP950" # not CP938 ?? # Korean echo "kr CP949" # not CP934 ?? echo "kr_KR CP949" # not CP934 ?? # Thai echo "th CP874" echo "th_TH CP874" # Other echo "eo CP850" echo "eo_EO CP850" ;; esac realtimebattle-1.0.8/intl/locale.alias0000644000175000017500000000512210170545357016077 0ustar moimoi# Locale name alias data base. # Copyright (C) 1996-2001,2003 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library 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. # The format of this file is the same as for the corresponding file of # the X Window System, which normally can be found in # /usr/lib/X11/locale/locale.alias # A single line contains two fields: an alias and a substitution value. # All entries are case independent. # Note: This file is far from being complete. If you have a value for # your own site which you think might be useful for others too, share # it with the rest of us. Send it using the `glibcbug' script to # bugs@gnu.org. # Packages using this file: bokmal nb_NO.ISO-8859-1 bokml nb_NO.ISO-8859-1 catalan ca_ES.ISO-8859-1 croatian hr_HR.ISO-8859-2 czech cs_CZ.ISO-8859-2 danish da_DK.ISO-8859-1 dansk da_DK.ISO-8859-1 deutsch de_DE.ISO-8859-1 dutch nl_NL.ISO-8859-1 eesti et_EE.ISO-8859-1 estonian et_EE.ISO-8859-1 finnish fi_FI.ISO-8859-1 franais fr_FR.ISO-8859-1 french fr_FR.ISO-8859-1 galego gl_ES.ISO-8859-1 galician gl_ES.ISO-8859-1 german de_DE.ISO-8859-1 greek el_GR.ISO-8859-7 hebrew he_IL.ISO-8859-8 hrvatski hr_HR.ISO-8859-2 hungarian hu_HU.ISO-8859-2 icelandic is_IS.ISO-8859-1 italian it_IT.ISO-8859-1 japanese ja_JP.eucJP japanese.euc ja_JP.eucJP ja_JP ja_JP.eucJP ja_JP.ujis ja_JP.eucJP japanese.sjis ja_JP.SJIS korean ko_KR.eucKR korean.euc ko_KR.eucKR ko_KR ko_KR.eucKR lithuanian lt_LT.ISO-8859-13 no_NO nb_NO.ISO-8859-1 no_NO.ISO-8859-1 nb_NO.ISO-8859-1 norwegian nb_NO.ISO-8859-1 nynorsk nn_NO.ISO-8859-1 polish pl_PL.ISO-8859-2 portuguese pt_PT.ISO-8859-1 romanian ro_RO.ISO-8859-2 russian ru_RU.ISO-8859-5 slovak sk_SK.ISO-8859-2 slovene sl_SI.ISO-8859-2 slovenian sl_SI.ISO-8859-2 spanish es_ES.ISO-8859-1 swedish sv_SE.ISO-8859-1 thai th_TH.TIS-620 turkish tr_TR.ISO-8859-9 realtimebattle-1.0.8/intl/ref-add.sin0000644000175000017500000000210110170545357015634 0ustar moimoi# Add this package to a list of references stored in a text file. # # Copyright (C) 2000 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library 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. # # Written by Bruno Haible . # /^# Packages using this file: / { s/# Packages using this file:// ta :a s/ @PACKAGE@ / @PACKAGE@ / tb s/ $/ @PACKAGE@ / :b s/^/# Packages using this file:/ } realtimebattle-1.0.8/intl/ref-del.sin0000644000175000017500000000202410170545357015654 0ustar moimoi# Remove this package from a list of references stored in a text file. # # Copyright (C) 2000 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library 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. # # Written by Bruno Haible . # /^# Packages using this file: / { s/# Packages using this file:// s/ @PACKAGE@ / / s/^/# Packages using this file:/ } realtimebattle-1.0.8/intl/gmo.h0000644000175000017500000001134510170545357014564 0ustar moimoi/* Description of GNU message catalog format: general file layout. Copyright (C) 1995, 1997, 2000-2002, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifndef _GETTEXT_H #define _GETTEXT_H 1 #include /* @@ end of prolog @@ */ /* The magic number of the GNU message catalog format. */ #define _MAGIC 0x950412de #define _MAGIC_SWAPPED 0xde120495 /* Revision number of the currently used .mo (binary) file format. */ #define MO_REVISION_NUMBER 0 #define MO_REVISION_NUMBER_WITH_SYSDEP_I 1 /* The following contortions are an attempt to use the C preprocessor to determine an unsigned integral type that is 32 bits wide. An alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work when cross-compiling. */ #if __STDC__ # define UINT_MAX_32_BITS 4294967295U #else # define UINT_MAX_32_BITS 0xFFFFFFFF #endif /* If UINT_MAX isn't defined, assume it's a 32-bit type. This should be valid for all systems GNU cares about because that doesn't include 16-bit systems, and only modern systems (that certainly have ) have 64+-bit integral types. */ #ifndef UINT_MAX # define UINT_MAX UINT_MAX_32_BITS #endif #if UINT_MAX == UINT_MAX_32_BITS typedef unsigned nls_uint32; #else # if USHRT_MAX == UINT_MAX_32_BITS typedef unsigned short nls_uint32; # else # if ULONG_MAX == UINT_MAX_32_BITS typedef unsigned long nls_uint32; # else /* The following line is intended to throw an error. Using #error is not portable enough. */ "Cannot determine unsigned 32-bit data type." # endif # endif #endif /* Header for binary .mo file format. */ struct mo_file_header { /* The magic number. */ nls_uint32 magic; /* The revision number of the file format. */ nls_uint32 revision; /* The following are only used in .mo files with major revision 0 or 1. */ /* The number of strings pairs. */ nls_uint32 nstrings; /* Offset of table with start offsets of original strings. */ nls_uint32 orig_tab_offset; /* Offset of table with start offsets of translated strings. */ nls_uint32 trans_tab_offset; /* Size of hash table. */ nls_uint32 hash_tab_size; /* Offset of first hash table entry. */ nls_uint32 hash_tab_offset; /* The following are only used in .mo files with minor revision >= 1. */ /* The number of system dependent segments. */ nls_uint32 n_sysdep_segments; /* Offset of table describing system dependent segments. */ nls_uint32 sysdep_segments_offset; /* The number of system dependent strings pairs. */ nls_uint32 n_sysdep_strings; /* Offset of table with start offsets of original sysdep strings. */ nls_uint32 orig_sysdep_tab_offset; /* Offset of table with start offsets of translated sysdep strings. */ nls_uint32 trans_sysdep_tab_offset; }; /* Descriptor for static string contained in the binary .mo file. */ struct string_desc { /* Length of addressed string, not including the trailing NUL. */ nls_uint32 length; /* Offset of string in file. */ nls_uint32 offset; }; /* The following are only used in .mo files with minor revision >= 1. */ /* Descriptor for system dependent string segment. */ struct sysdep_segment { /* Length of addressed string, including the trailing NUL. */ nls_uint32 length; /* Offset of string in file. */ nls_uint32 offset; }; /* Descriptor for system dependent string. */ struct sysdep_string { /* Offset of static string segments in file. */ nls_uint32 offset; /* Alternating sequence of static and system dependent segments. The last segment is a static segment, including the trailing NUL. */ struct segment_pair { /* Size of static segment. */ nls_uint32 segsize; /* Reference to system dependent string segment, or ~0 at the end. */ nls_uint32 sysdepref; } segments[1]; }; /* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF, regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */ #define SEGMENTS_END ((nls_uint32) ~0) /* @@ begin of epilog @@ */ #endif /* gettext.h */ realtimebattle-1.0.8/intl/gettextP.h0000644000175000017500000001453010170545357015605 0ustar moimoi/* Header describing internals of libintl library. Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. Written by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifndef _GETTEXTP_H #define _GETTEXTP_H #include /* Get size_t. */ #ifdef _LIBC # include "../iconv/gconv_int.h" #else # if HAVE_ICONV # include # endif #endif #include "loadinfo.h" #include "gmo.h" /* Get nls_uint32. */ /* @@ end of prolog @@ */ #ifndef internal_function # define internal_function #endif #ifndef attribute_hidden # define attribute_hidden #endif /* Tell the compiler when a conditional or integer expression is almost always true or almost always false. */ #ifndef HAVE_BUILTIN_EXPECT # define __builtin_expect(expr, val) (expr) #endif #ifndef W # define W(flag, data) ((flag) ? SWAP (data) : (data)) #endif #ifdef _LIBC # include # define SWAP(i) bswap_32 (i) #else static inline nls_uint32 SWAP (i) nls_uint32 i; { return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); } #endif /* In-memory representation of system dependent string. */ struct sysdep_string_desc { /* Length of addressed string, including the trailing NUL. */ size_t length; /* Pointer to addressed string. */ const char *pointer; }; /* The representation of an opened message catalog. */ struct loaded_domain { /* Pointer to memory containing the .mo file. */ const char *data; /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */ int use_mmap; /* Size of mmap()ed memory. */ size_t mmap_size; /* 1 if the .mo file uses a different endianness than this machine. */ int must_swap; /* Pointer to additional malloc()ed memory. */ void *malloced; /* Number of static strings pairs. */ nls_uint32 nstrings; /* Pointer to descriptors of original strings in the file. */ const struct string_desc *orig_tab; /* Pointer to descriptors of translated strings in the file. */ const struct string_desc *trans_tab; /* Number of system dependent strings pairs. */ nls_uint32 n_sysdep_strings; /* Pointer to descriptors of original sysdep strings. */ const struct sysdep_string_desc *orig_sysdep_tab; /* Pointer to descriptors of translated sysdep strings. */ const struct sysdep_string_desc *trans_sysdep_tab; /* Size of hash table. */ nls_uint32 hash_size; /* Pointer to hash table. */ const nls_uint32 *hash_tab; /* 1 if the hash table uses a different endianness than this machine. */ int must_swap_hash_tab; int codeset_cntr; #ifdef _LIBC __gconv_t conv; #else # if HAVE_ICONV iconv_t conv; # endif #endif char **conv_tab; struct expression *plural; unsigned long int nplurals; }; /* We want to allocate a string at the end of the struct. But ISO C doesn't allow zero sized arrays. */ #ifdef __GNUC__ # define ZERO 0 #else # define ZERO 1 #endif /* A set of settings bound to a message domain. Used to store settings from bindtextdomain() and bind_textdomain_codeset(). */ struct binding { struct binding *next; char *dirname; int codeset_cntr; /* Incremented each time codeset changes. */ char *codeset; char domainname[ZERO]; }; /* A counter which is incremented each time some previous translations become invalid. This variable is part of the external ABI of the GNU libintl. */ extern int _nl_msg_cat_cntr; #ifndef _LIBC const char *_nl_locale_name (int category, const char *categoryname); #endif struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale, const char *__domainname, struct binding *__domainbinding) internal_function; void _nl_load_domain (struct loaded_l10nfile *__domain, struct binding *__domainbinding) internal_function; void _nl_unload_domain (struct loaded_domain *__domain) internal_function; const char *_nl_init_domain_conv (struct loaded_l10nfile *__domain_file, struct loaded_domain *__domain, struct binding *__domainbinding) internal_function; void _nl_free_domain_conv (struct loaded_domain *__domain) internal_function; char *_nl_find_msg (struct loaded_l10nfile *domain_file, struct binding *domainbinding, const char *msgid, size_t *lengthp) internal_function; #ifdef _LIBC extern char *__gettext (const char *__msgid); extern char *__dgettext (const char *__domainname, const char *__msgid); extern char *__dcgettext (const char *__domainname, const char *__msgid, int __category); extern char *__ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n); extern char *__dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int n); extern char *__dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category); extern char *__dcigettext (const char *__domainname, const char *__msgid1, const char *__msgid2, int __plural, unsigned long int __n, int __category); extern char *__textdomain (const char *__domainname); extern char *__bindtextdomain (const char *__domainname, const char *__dirname); extern char *__bind_textdomain_codeset (const char *__domainname, const char *__codeset); #else /* Declare the exported libintl_* functions, in a way that allows us to call them under their real name. */ # undef _INTL_REDIRECT_INLINE # undef _INTL_REDIRECT_MACROS # define _INTL_REDIRECT_MACROS # include "libgnuintl.h" extern char *libintl_dcigettext (const char *__domainname, const char *__msgid1, const char *__msgid2, int __plural, unsigned long int __n, int __category); #endif /* @@ begin of epilog @@ */ #endif /* gettextP.h */ realtimebattle-1.0.8/intl/hash-string.h0000644000175000017500000000314110170545357016224 0ustar moimoi/* Description of GNU message catalog format: string hashing function. Copyright (C) 1995, 1997-1998, 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 Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ /* @@ end of prolog @@ */ /* We assume to have `unsigned long int' value with at least 32 bits. */ #define HASHWORDBITS 32 /* Defines the so called `hashpjw' function by P.J. Weinberger [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, 1986, 1987 Bell Telephone Laboratories, Inc.] */ static inline unsigned long int hash_string (const char *str_param) { unsigned long int hval, g; const char *str = str_param; /* Compute the hash value for the given string. */ hval = 0; while (*str != '\0') { hval <<= 4; hval += (unsigned char) *str++; g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4)); if (g != 0) { hval ^= g >> (HASHWORDBITS - 8); hval ^= g; } } return hval; } realtimebattle-1.0.8/intl/loadinfo.h0000644000175000017500000001332210170545357015572 0ustar moimoi/* Copyright (C) 1996-1999, 2000-2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifndef _LOADINFO_H #define _LOADINFO_H 1 /* Declarations of locale dependent catalog lookup functions. Implemented in localealias.c Possibly replace a locale name by another. explodename.c Split a locale name into its various fields. l10nflist.c Generate a list of filenames of possible message catalogs. finddomain.c Find and open the relevant message catalogs. The main function _nl_find_domain() in finddomain.c is declared in gettextP.h. */ #ifndef internal_function # define internal_function #endif /* Tell the compiler when a conditional or integer expression is almost always true or almost always false. */ #ifndef HAVE_BUILTIN_EXPECT # define __builtin_expect(expr, val) (expr) #endif /* Separator in PATH like lists of pathnames. */ #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS */ # define PATH_SEPARATOR ';' #else /* Unix */ # define PATH_SEPARATOR ':' #endif /* Encoding of locale name parts. */ #define CEN_REVISION 1 #define CEN_SPONSOR 2 #define CEN_SPECIAL 4 #define XPG_NORM_CODESET 8 #define XPG_CODESET 16 #define TERRITORY 32 #define CEN_AUDIENCE 64 #define XPG_MODIFIER 128 #define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE) #define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER) struct loaded_l10nfile { const char *filename; int decided; const void *data; struct loaded_l10nfile *next; struct loaded_l10nfile *successor[1]; }; /* Normalize codeset name. There is no standard for the codeset names. Normalization allows the user to use any of the common names. The return value is dynamically allocated and has to be freed by the caller. */ extern const char *_nl_normalize_codeset (const char *codeset, size_t name_len); /* Lookup a locale dependent file. *L10NFILE_LIST denotes a pool of lookup results of locale dependent files of the same kind, sorted in decreasing order of ->filename. DIRLIST and DIRLIST_LEN are an argz list of directories in which to look, containing at least one directory (i.e. DIRLIST_LEN > 0). MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER, SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as produced by _nl_explode_name(). FILENAME is the filename suffix. The return value is the lookup result, either found in *L10NFILE_LIST, or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL. If the return value is non-NULL, it is added to *L10NFILE_LIST, and its ->next field denotes the chaining inside *L10NFILE_LIST, and furthermore its ->successor[] field contains a list of other lookup results from which this lookup result inherits. */ extern struct loaded_l10nfile * _nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, const char *dirlist, size_t dirlist_len, int mask, const char *language, const char *territory, const char *codeset, const char *normalized_codeset, const char *modifier, const char *special, const char *sponsor, const char *revision, const char *filename, int do_allocate); /* Lookup the real locale name for a locale alias NAME, or NULL if NAME is not a locale alias (but possibly a real locale name). The return value is statically allocated and must not be freed. */ extern const char *_nl_expand_alias (const char *name); /* Split a locale name NAME into its pieces: language, modifier, territory, codeset, special, sponsor, revision. NAME gets destructively modified: NUL bytes are inserted here and there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY, *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a pointer into the old NAME string, or NULL. *NORMALIZED_CODESET gets assigned the expanded *CODESET, if it is different from *CODESET; this one is dynamically allocated and has to be freed by the caller. The return value is a bitmask, where each bit corresponds to one filled-in value: XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER, TERRITORY for *TERRITORY, XPG_CODESET for *CODESET, XPG_NORM_CODESET for *NORMALIZED_CODESET, CEN_SPECIAL for *SPECIAL, CEN_SPONSOR for *SPONSOR, CEN_REVISION for *REVISION. */ extern int _nl_explode_name (char *name, const char **language, const char **modifier, const char **territory, const char **codeset, const char **normalized_codeset, const char **special, const char **sponsor, const char **revision); /* Split a locale name NAME into a leading language part and all the rest. Return a pointer to the first character after the language, i.e. to the first byte of the rest. */ extern char *_nl_find_language (const char *name); #endif /* loadinfo.h */ realtimebattle-1.0.8/intl/plural-exp.h0000644000175000017500000000773310170545357016101 0ustar moimoi/* Expression parsing and evaluation for plural form selection. Copyright (C) 2000-2003 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifndef _PLURAL_EXP_H #define _PLURAL_EXP_H #ifndef internal_function # define internal_function #endif #ifndef attribute_hidden # define attribute_hidden #endif /* This is the representation of the expressions to determine the plural form. */ struct expression { int nargs; /* Number of arguments. */ enum operator { /* Without arguments: */ var, /* The variable "n". */ num, /* Decimal number. */ /* Unary operators: */ lnot, /* Logical NOT. */ /* Binary operators: */ mult, /* Multiplication. */ divide, /* Division. */ module, /* Modulo operation. */ plus, /* Addition. */ minus, /* Subtraction. */ less_than, /* Comparison. */ greater_than, /* Comparison. */ less_or_equal, /* Comparison. */ greater_or_equal, /* Comparison. */ equal, /* Comparison for equality. */ not_equal, /* Comparison for inequality. */ land, /* Logical AND. */ lor, /* Logical OR. */ /* Ternary operators: */ qmop /* Question mark operator. */ } operation; union { unsigned long int num; /* Number value for `num'. */ struct expression *args[3]; /* Up to three arguments. */ } val; }; /* This is the data structure to pass information to the parser and get the result in a thread-safe way. */ struct parse_args { const char *cp; struct expression *res; }; /* Names for the libintl functions are a problem. This source code is used 1. in the GNU C Library library, 2. in the GNU libintl library, 3. in the GNU gettext tools. The function names in each situation must be different, to allow for binary incompatible changes in 'struct expression'. Furthermore, 1. in the GNU C Library library, the names have a __ prefix, 2.+3. in the GNU libintl library and in the GNU gettext tools, the names must follow ANSI C and not start with __. So we have to distinguish the three cases. */ #ifdef _LIBC # define FREE_EXPRESSION __gettext_free_exp # define PLURAL_PARSE __gettextparse # define GERMANIC_PLURAL __gettext_germanic_plural # define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural #elif defined (IN_LIBINTL) # define FREE_EXPRESSION libintl_gettext_free_exp # define PLURAL_PARSE libintl_gettextparse # define GERMANIC_PLURAL libintl_gettext_germanic_plural # define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural #else # define FREE_EXPRESSION free_plural_expression # define PLURAL_PARSE parse_plural_expression # define GERMANIC_PLURAL germanic_plural # define EXTRACT_PLURAL_EXPRESSION extract_plural_expression #endif extern void FREE_EXPRESSION (struct expression *exp) internal_function; extern int PLURAL_PARSE (void *arg); extern struct expression GERMANIC_PLURAL attribute_hidden; extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry, struct expression **pluralp, unsigned long int *npluralsp) internal_function; #if !defined (_LIBC) && !defined (IN_LIBINTL) extern unsigned long int plural_eval (struct expression *pexp, unsigned long int n); #endif #endif /* _PLURAL_EXP_H */ realtimebattle-1.0.8/intl/eval-plural.h0000644000175000017500000000532210170545357016224 0ustar moimoi/* Plural expression evaluation. Copyright (C) 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 Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifndef STATIC #define STATIC static #endif /* Evaluate the plural expression and return an index value. */ STATIC unsigned long int internal_function plural_eval (struct expression *pexp, unsigned long int n) { switch (pexp->nargs) { case 0: switch (pexp->operation) { case var: return n; case num: return pexp->val.num; default: break; } /* NOTREACHED */ break; case 1: { /* pexp->operation must be lnot. */ unsigned long int arg = plural_eval (pexp->val.args[0], n); return ! arg; } case 2: { unsigned long int leftarg = plural_eval (pexp->val.args[0], n); if (pexp->operation == lor) return leftarg || plural_eval (pexp->val.args[1], n); else if (pexp->operation == land) return leftarg && plural_eval (pexp->val.args[1], n); else { unsigned long int rightarg = plural_eval (pexp->val.args[1], n); switch (pexp->operation) { case mult: return leftarg * rightarg; case divide: #if !INTDIV0_RAISES_SIGFPE if (rightarg == 0) raise (SIGFPE); #endif return leftarg / rightarg; case module: #if !INTDIV0_RAISES_SIGFPE if (rightarg == 0) raise (SIGFPE); #endif return leftarg % rightarg; case plus: return leftarg + rightarg; case minus: return leftarg - rightarg; case less_than: return leftarg < rightarg; case greater_than: return leftarg > rightarg; case less_or_equal: return leftarg <= rightarg; case greater_or_equal: return leftarg >= rightarg; case equal: return leftarg == rightarg; case not_equal: return leftarg != rightarg; default: break; } } /* NOTREACHED */ break; } case 3: { /* pexp->operation must be qmop. */ unsigned long int boolarg = plural_eval (pexp->val.args[0], n); return plural_eval (pexp->val.args[boolarg ? 1 : 2], n); } } /* NOTREACHED */ return 0; } realtimebattle-1.0.8/intl/localcharset.h0000644000175000017500000000255710170545357016453 0ustar moimoi/* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2003 Free Software Foundation, Inc. This file is part of the GNU CHARSET Library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifndef _LOCALCHARSET_H #define _LOCALCHARSET_H #ifdef __cplusplus extern "C" { #endif /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ extern const char * locale_charset (void); #ifdef __cplusplus } #endif #endif /* _LOCALCHARSET_H */ realtimebattle-1.0.8/intl/relocatable.h0000644000175000017500000000523510170545357016260 0ustar moimoi/* Provide relocatable packages. Copyright (C) 2003 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifndef _RELOCATABLE_H #define _RELOCATABLE_H #ifdef __cplusplus extern "C" { #endif /* This can be enabled through the configure --enable-relocatable option. */ #if ENABLE_RELOCATABLE /* When building a DLL, we must export some functions. Note that because this is a private .h file, we don't need to use __declspec(dllimport) in any case. */ #if defined _MSC_VER && BUILDING_DLL # define RELOCATABLE_DLL_EXPORTED __declspec(dllexport) #else # define RELOCATABLE_DLL_EXPORTED #endif /* Sets the original and the current installation prefix of the package. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ extern RELOCATABLE_DLL_EXPORTED void set_relocation_prefix (const char *orig_prefix, const char *curr_prefix); /* Returns the pathname, relocated according to the current installation directory. */ extern const char * relocate (const char *pathname); /* Memory management: relocate() leaks memory, because it has to construct a fresh pathname. If this is a problem because your program calls relocate() frequently, think about caching the result. */ /* Convenience function: Computes the current installation prefix, based on the original installation prefix, the original installation directory of a particular file, and the current pathname of this file. Returns NULL upon failure. */ extern const char * compute_curr_prefix (const char *orig_installprefix, const char *orig_installdir, const char *curr_pathname); #else /* By default, we use the hardwired pathnames. */ #define relocate(pathname) (pathname) #endif #ifdef __cplusplus } #endif #endif /* _RELOCATABLE_H */ realtimebattle-1.0.8/intl/xsize.h0000644000175000017500000000672210170545357015147 0ustar moimoi/* xsize.h -- Checked size_t computations. Copyright (C) 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifndef _XSIZE_H #define _XSIZE_H /* Get size_t. */ #include /* Get SIZE_MAX. */ #include #if HAVE_STDINT_H # include #endif /* The size of memory objects is often computed through expressions of type size_t. Example: void* p = malloc (header_size + n * element_size). These computations can lead to overflow. When this happens, malloc() returns a piece of memory that is way too small, and the program then crashes while attempting to fill the memory. To avoid this, the functions and macros in this file check for overflow. The convention is that SIZE_MAX represents overflow. malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc implementation that uses mmap --, it's recommended to use size_overflow_p() or size_in_bounds_p() before invoking malloc(). The example thus becomes: size_t size = xsum (header_size, xtimes (n, element_size)); void *p = (size_in_bounds_p (size) ? malloc (size) : NULL); */ /* Convert an arbitrary value >= 0 to type size_t. */ #define xcast_size_t(N) \ ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX) /* Sum of two sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum (size_t size1, size_t size2) { size_t sum = size1 + size2; return (sum >= size1 ? sum : SIZE_MAX); } /* Sum of three sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum3 (size_t size1, size_t size2, size_t size3) { return xsum (xsum (size1, size2), size3); } /* Sum of four sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum4 (size_t size1, size_t size2, size_t size3, size_t size4) { return xsum (xsum (xsum (size1, size2), size3), size4); } /* Maximum of two sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xmax (size_t size1, size_t size2) { /* No explicit check is needed here, because for any n: max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */ return (size1 >= size2 ? size1 : size2); } /* Multiplication of a count with an element size, with overflow check. The count must be >= 0 and the element size must be > 0. This is a macro, not an inline function, so that it works correctly even when N is of a wider tupe and N > SIZE_MAX. */ #define xtimes(N, ELSIZE) \ ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX) /* Check for overflow. */ #define size_overflow_p(SIZE) \ ((SIZE) == SIZE_MAX) /* Check against overflow. */ #define size_in_bounds_p(SIZE) \ ((SIZE) != SIZE_MAX) #endif /* _XSIZE_H */ realtimebattle-1.0.8/intl/printf-args.h0000644000175000017500000000550210170545357016234 0ustar moimoi/* Decomposed printf argument list. Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifndef _PRINTF_ARGS_H #define _PRINTF_ARGS_H /* Get size_t. */ #include /* Get wchar_t. */ #ifdef HAVE_WCHAR_T # include #endif /* Get wint_t. */ #ifdef HAVE_WINT_T # include #endif /* Get va_list. */ #include /* Argument types */ typedef enum { TYPE_NONE, TYPE_SCHAR, TYPE_UCHAR, TYPE_SHORT, TYPE_USHORT, TYPE_INT, TYPE_UINT, TYPE_LONGINT, TYPE_ULONGINT, #ifdef HAVE_LONG_LONG TYPE_LONGLONGINT, TYPE_ULONGLONGINT, #endif TYPE_DOUBLE, #ifdef HAVE_LONG_DOUBLE TYPE_LONGDOUBLE, #endif TYPE_CHAR, #ifdef HAVE_WINT_T TYPE_WIDE_CHAR, #endif TYPE_STRING, #ifdef HAVE_WCHAR_T TYPE_WIDE_STRING, #endif TYPE_POINTER, TYPE_COUNT_SCHAR_POINTER, TYPE_COUNT_SHORT_POINTER, TYPE_COUNT_INT_POINTER, TYPE_COUNT_LONGINT_POINTER #ifdef HAVE_LONG_LONG , TYPE_COUNT_LONGLONGINT_POINTER #endif } arg_type; /* Polymorphic argument */ typedef struct { arg_type type; union { signed char a_schar; unsigned char a_uchar; short a_short; unsigned short a_ushort; int a_int; unsigned int a_uint; long int a_longint; unsigned long int a_ulongint; #ifdef HAVE_LONG_LONG long long int a_longlongint; unsigned long long int a_ulonglongint; #endif float a_float; double a_double; #ifdef HAVE_LONG_DOUBLE long double a_longdouble; #endif int a_char; #ifdef HAVE_WINT_T wint_t a_wide_char; #endif const char* a_string; #ifdef HAVE_WCHAR_T const wchar_t* a_wide_string; #endif void* a_pointer; signed char * a_count_schar_pointer; short * a_count_short_pointer; int * a_count_int_pointer; long int * a_count_longint_pointer; #ifdef HAVE_LONG_LONG long long int * a_count_longlongint_pointer; #endif } a; } argument; typedef struct { size_t count; argument *arg; } arguments; /* Fetch the arguments, putting them into a. */ #ifdef STATIC STATIC #else extern #endif int printf_fetchargs (va_list args, arguments *a); #endif /* _PRINTF_ARGS_H */ realtimebattle-1.0.8/intl/printf-args.c0000644000175000017500000000625310170545357016233 0ustar moimoi/* Decomposed printf argument list. Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include "printf-args.h" #ifdef STATIC STATIC #endif int printf_fetchargs (va_list args, arguments *a) { size_t i; argument *ap; for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) switch (ap->type) { case TYPE_SCHAR: ap->a.a_schar = va_arg (args, /*signed char*/ int); break; case TYPE_UCHAR: ap->a.a_uchar = va_arg (args, /*unsigned char*/ int); break; case TYPE_SHORT: ap->a.a_short = va_arg (args, /*short*/ int); break; case TYPE_USHORT: ap->a.a_ushort = va_arg (args, /*unsigned short*/ int); break; case TYPE_INT: ap->a.a_int = va_arg (args, int); break; case TYPE_UINT: ap->a.a_uint = va_arg (args, unsigned int); break; case TYPE_LONGINT: ap->a.a_longint = va_arg (args, long int); break; case TYPE_ULONGINT: ap->a.a_ulongint = va_arg (args, unsigned long int); break; #ifdef HAVE_LONG_LONG case TYPE_LONGLONGINT: ap->a.a_longlongint = va_arg (args, long long int); break; case TYPE_ULONGLONGINT: ap->a.a_ulonglongint = va_arg (args, unsigned long long int); break; #endif case TYPE_DOUBLE: ap->a.a_double = va_arg (args, double); break; #ifdef HAVE_LONG_DOUBLE case TYPE_LONGDOUBLE: ap->a.a_longdouble = va_arg (args, long double); break; #endif case TYPE_CHAR: ap->a.a_char = va_arg (args, int); break; #ifdef HAVE_WINT_T case TYPE_WIDE_CHAR: ap->a.a_wide_char = va_arg (args, wint_t); break; #endif case TYPE_STRING: ap->a.a_string = va_arg (args, const char *); break; #ifdef HAVE_WCHAR_T case TYPE_WIDE_STRING: ap->a.a_wide_string = va_arg (args, const wchar_t *); break; #endif case TYPE_POINTER: ap->a.a_pointer = va_arg (args, void *); break; case TYPE_COUNT_SCHAR_POINTER: ap->a.a_count_schar_pointer = va_arg (args, signed char *); break; case TYPE_COUNT_SHORT_POINTER: ap->a.a_count_short_pointer = va_arg (args, short *); break; case TYPE_COUNT_INT_POINTER: ap->a.a_count_int_pointer = va_arg (args, int *); break; case TYPE_COUNT_LONGINT_POINTER: ap->a.a_count_longint_pointer = va_arg (args, long int *); break; #ifdef HAVE_LONG_LONG case TYPE_COUNT_LONGLONGINT_POINTER: ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); break; #endif default: /* Unknown type. */ return -1; } return 0; } realtimebattle-1.0.8/intl/printf-parse.h0000644000175000017500000000420710170545357016413 0ustar moimoi/* Parse printf format string. Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifndef _PRINTF_PARSE_H #define _PRINTF_PARSE_H #include "printf-args.h" /* Flags */ #define FLAG_GROUP 1 /* ' flag */ #define FLAG_LEFT 2 /* - flag */ #define FLAG_SHOWSIGN 4 /* + flag */ #define FLAG_SPACE 8 /* space flag */ #define FLAG_ALT 16 /* # flag */ #define FLAG_ZERO 32 /* arg_index value indicating that no argument is consumed. */ #define ARG_NONE (~(size_t)0) /* A parsed directive. */ typedef struct { const char* dir_start; const char* dir_end; int flags; const char* width_start; const char* width_end; size_t width_arg_index; const char* precision_start; const char* precision_end; size_t precision_arg_index; char conversion; /* d i o u x X f e E g G c s p n U % but not C S */ size_t arg_index; } char_directive; /* A parsed format string. */ typedef struct { size_t count; char_directive *dir; size_t max_width_length; size_t max_precision_length; } char_directives; /* Parses the format string. Fills in the number N of directives, and fills in directives[0], ..., directives[N-1], and sets directives[N].dir_start to the end of the format string. Also fills in the arg_type fields of the arguments and the needed count of arguments. */ #ifdef STATIC STATIC #else extern #endif int printf_parse (const char *format, char_directives *d, arguments *a); #endif /* _PRINTF_PARSE_H */ realtimebattle-1.0.8/intl/wprintf-parse.h0000644000175000017500000000425710170545357016607 0ustar moimoi/* Parse printf format string. Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifndef _WPRINTF_PARSE_H #define _WPRINTF_PARSE_H #include "printf-args.h" /* Flags */ #define FLAG_GROUP 1 /* ' flag */ #define FLAG_LEFT 2 /* - flag */ #define FLAG_SHOWSIGN 4 /* + flag */ #define FLAG_SPACE 8 /* space flag */ #define FLAG_ALT 16 /* # flag */ #define FLAG_ZERO 32 /* arg_index value indicating that no argument is consumed. */ #define ARG_NONE (~(size_t)0) /* A parsed directive. */ typedef struct { const wchar_t* dir_start; const wchar_t* dir_end; int flags; const wchar_t* width_start; const wchar_t* width_end; size_t width_arg_index; const wchar_t* precision_start; const wchar_t* precision_end; size_t precision_arg_index; wchar_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */ size_t arg_index; } wchar_t_directive; /* A parsed format string. */ typedef struct { size_t count; wchar_t_directive *dir; size_t max_width_length; size_t max_precision_length; } wchar_t_directives; /* Parses the format string. Fills in the number N of directives, and fills in directives[0], ..., directives[N-1], and sets directives[N].dir_start to the end of the format string. Also fills in the arg_type fields of the arguments and the needed count of arguments. */ #ifdef STATIC STATIC #else extern #endif int wprintf_parse (const wchar_t *format, wchar_t_directives *d, arguments *a); #endif /* _WPRINTF_PARSE_H */ realtimebattle-1.0.8/intl/printf-parse.c0000644000175000017500000002733310170545357016413 0ustar moimoi/* Formatted output to strings. Copyright (C) 1999-2000, 2002-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #if WIDE_CHAR_VERSION # include "wprintf-parse.h" #else # include "printf-parse.h" #endif /* Get size_t, NULL. */ #include /* Get intmax_t. */ #if HAVE_STDINT_H_WITH_UINTMAX # include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX # include #endif /* malloc(), realloc(), free(). */ #include /* Checked size_t computations. */ #include "xsize.h" #if WIDE_CHAR_VERSION # define PRINTF_PARSE wprintf_parse # define CHAR_T wchar_t # define DIRECTIVE wchar_t_directive # define DIRECTIVES wchar_t_directives #else # define PRINTF_PARSE printf_parse # define CHAR_T char # define DIRECTIVE char_directive # define DIRECTIVES char_directives #endif #ifdef STATIC STATIC #endif int PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) { const CHAR_T *cp = format; /* pointer into format */ size_t arg_posn = 0; /* number of regular arguments consumed */ size_t d_allocated; /* allocated elements of d->dir */ size_t a_allocated; /* allocated elements of a->arg */ size_t max_width_length = 0; size_t max_precision_length = 0; d->count = 0; d_allocated = 1; d->dir = malloc (d_allocated * sizeof (DIRECTIVE)); if (d->dir == NULL) /* Out of memory. */ return -1; a->count = 0; a_allocated = 0; a->arg = NULL; #define REGISTER_ARG(_index_,_type_) \ { \ size_t n = (_index_); \ if (n >= a_allocated) \ { \ size_t memory_size; \ argument *memory; \ \ a_allocated = xtimes (a_allocated, 2); \ if (a_allocated <= n) \ a_allocated = xsum (n, 1); \ memory_size = xtimes (a_allocated, sizeof (argument)); \ if (size_overflow_p (memory_size)) \ /* Overflow, would lead to out of memory. */ \ goto error; \ memory = (a->arg \ ? realloc (a->arg, memory_size) \ : malloc (memory_size)); \ if (memory == NULL) \ /* Out of memory. */ \ goto error; \ a->arg = memory; \ } \ while (a->count <= n) \ a->arg[a->count++].type = TYPE_NONE; \ if (a->arg[n].type == TYPE_NONE) \ a->arg[n].type = (_type_); \ else if (a->arg[n].type != (_type_)) \ /* Ambiguous type for positional argument. */ \ goto error; \ } while (*cp != '\0') { CHAR_T c = *cp++; if (c == '%') { size_t arg_index = ARG_NONE; DIRECTIVE *dp = &d->dir[d->count];/* pointer to next directive */ /* Initialize the next directive. */ dp->dir_start = cp - 1; dp->flags = 0; dp->width_start = NULL; dp->width_end = NULL; dp->width_arg_index = ARG_NONE; dp->precision_start = NULL; dp->precision_end = NULL; dp->precision_arg_index = ARG_NONE; dp->arg_index = ARG_NONE; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; arg_index = n - 1; cp = np + 1; } } /* Read the flags. */ for (;;) { if (*cp == '\'') { dp->flags |= FLAG_GROUP; cp++; } else if (*cp == '-') { dp->flags |= FLAG_LEFT; cp++; } else if (*cp == '+') { dp->flags |= FLAG_SHOWSIGN; cp++; } else if (*cp == ' ') { dp->flags |= FLAG_SPACE; cp++; } else if (*cp == '#') { dp->flags |= FLAG_ALT; cp++; } else if (*cp == '0') { dp->flags |= FLAG_ZERO; cp++; } else break; } /* Parse the field width. */ if (*cp == '*') { dp->width_start = cp; cp++; dp->width_end = cp; if (max_width_length < 1) max_width_length = 1; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; dp->width_arg_index = n - 1; cp = np + 1; } } if (dp->width_arg_index == ARG_NONE) { dp->width_arg_index = arg_posn++; if (dp->width_arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->width_arg_index, TYPE_INT); } else if (*cp >= '0' && *cp <= '9') { size_t width_length; dp->width_start = cp; for (; *cp >= '0' && *cp <= '9'; cp++) ; dp->width_end = cp; width_length = dp->width_end - dp->width_start; if (max_width_length < width_length) max_width_length = width_length; } /* Parse the precision. */ if (*cp == '.') { cp++; if (*cp == '*') { dp->precision_start = cp - 1; cp++; dp->precision_end = cp; if (max_precision_length < 2) max_precision_length = 2; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; dp->precision_arg_index = n - 1; cp = np + 1; } } if (dp->precision_arg_index == ARG_NONE) { dp->precision_arg_index = arg_posn++; if (dp->precision_arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->precision_arg_index, TYPE_INT); } else { size_t precision_length; dp->precision_start = cp - 1; for (; *cp >= '0' && *cp <= '9'; cp++) ; dp->precision_end = cp; precision_length = dp->precision_end - dp->precision_start; if (max_precision_length < precision_length) max_precision_length = precision_length; } } { arg_type type; /* Parse argument type/size specifiers. */ { int flags = 0; for (;;) { if (*cp == 'h') { flags |= (1 << (flags & 1)); cp++; } else if (*cp == 'L') { flags |= 4; cp++; } else if (*cp == 'l') { flags += 8; cp++; } #ifdef HAVE_INTMAX_T else if (*cp == 'j') { if (sizeof (intmax_t) > sizeof (long)) { /* intmax_t = long long */ flags += 16; } else if (sizeof (intmax_t) > sizeof (int)) { /* intmax_t = long */ flags += 8; } cp++; } #endif else if (*cp == 'z' || *cp == 'Z') { /* 'z' is standardized in ISO C 99, but glibc uses 'Z' because the warning facility in gcc-2.95.2 understands only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */ if (sizeof (size_t) > sizeof (long)) { /* size_t = long long */ flags += 16; } else if (sizeof (size_t) > sizeof (int)) { /* size_t = long */ flags += 8; } cp++; } else if (*cp == 't') { if (sizeof (ptrdiff_t) > sizeof (long)) { /* ptrdiff_t = long long */ flags += 16; } else if (sizeof (ptrdiff_t) > sizeof (int)) { /* ptrdiff_t = long */ flags += 8; } cp++; } else break; } /* Read the conversion character. */ c = *cp++; switch (c) { case 'd': case 'i': #ifdef HAVE_LONG_LONG if (flags >= 16 || (flags & 4)) type = TYPE_LONGLONGINT; else #endif if (flags >= 8) type = TYPE_LONGINT; else if (flags & 2) type = TYPE_SCHAR; else if (flags & 1) type = TYPE_SHORT; else type = TYPE_INT; break; case 'o': case 'u': case 'x': case 'X': #ifdef HAVE_LONG_LONG if (flags >= 16 || (flags & 4)) type = TYPE_ULONGLONGINT; else #endif if (flags >= 8) type = TYPE_ULONGINT; else if (flags & 2) type = TYPE_UCHAR; else if (flags & 1) type = TYPE_USHORT; else type = TYPE_UINT; break; case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': #ifdef HAVE_LONG_DOUBLE if (flags >= 16 || (flags & 4)) type = TYPE_LONGDOUBLE; else #endif type = TYPE_DOUBLE; break; case 'c': if (flags >= 8) #ifdef HAVE_WINT_T type = TYPE_WIDE_CHAR; #else goto error; #endif else type = TYPE_CHAR; break; #ifdef HAVE_WINT_T case 'C': type = TYPE_WIDE_CHAR; c = 'c'; break; #endif case 's': if (flags >= 8) #ifdef HAVE_WCHAR_T type = TYPE_WIDE_STRING; #else goto error; #endif else type = TYPE_STRING; break; #ifdef HAVE_WCHAR_T case 'S': type = TYPE_WIDE_STRING; c = 's'; break; #endif case 'p': type = TYPE_POINTER; break; case 'n': #ifdef HAVE_LONG_LONG if (flags >= 16 || (flags & 4)) type = TYPE_COUNT_LONGLONGINT_POINTER; else #endif if (flags >= 8) type = TYPE_COUNT_LONGINT_POINTER; else if (flags & 2) type = TYPE_COUNT_SCHAR_POINTER; else if (flags & 1) type = TYPE_COUNT_SHORT_POINTER; else type = TYPE_COUNT_INT_POINTER; break; case '%': type = TYPE_NONE; break; default: /* Unknown conversion character. */ goto error; } } if (type != TYPE_NONE) { dp->arg_index = arg_index; if (dp->arg_index == ARG_NONE) { dp->arg_index = arg_posn++; if (dp->arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->arg_index, type); } dp->conversion = c; dp->dir_end = cp; } d->count++; if (d->count >= d_allocated) { size_t memory_size; DIRECTIVE *memory; d_allocated = xtimes (d_allocated, 2); memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); if (size_overflow_p (memory_size)) /* Overflow, would lead to out of memory. */ goto error; memory = realloc (d->dir, memory_size); if (memory == NULL) /* Out of memory. */ goto error; d->dir = memory; } } } d->dir[d->count].dir_start = cp; d->max_width_length = max_width_length; d->max_precision_length = max_precision_length; return 0; error: if (a->arg) free (a->arg); if (d->dir) free (d->dir); return -1; } #undef DIRECTIVES #undef DIRECTIVE #undef CHAR_T #undef PRINTF_PARSE realtimebattle-1.0.8/intl/vasnprintf.h0000644000175000017500000000436010170545357016173 0ustar moimoi/* vsprintf with automatic memory allocation. Copyright (C) 2002-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifndef _VASNPRINTF_H #define _VASNPRINTF_H /* Get va_list. */ #include /* Get size_t. */ #include #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __format__ format # define __printf__ printf # endif #endif #ifdef __cplusplus extern "C" { #endif /* Write formatted output to a string dynamically allocated with malloc(). You can pass a preallocated buffer for the result in RESULTBUF and its size in *LENGTHP; otherwise you pass RESULTBUF = NULL. If successful, return the address of the string (this may be = RESULTBUF if no dynamic memory allocation was necessary) and set *LENGTHP to the number of resulting bytes, excluding the trailing NUL. Upon error, set errno and return NULL. */ extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 3, 0))); #ifdef __cplusplus } #endif #endif /* _VASNPRINTF_H */ realtimebattle-1.0.8/intl/vasnwprintf.h0000644000175000017500000000330210170545357016355 0ustar moimoi/* vswprintf with automatic memory allocation. Copyright (C) 2002-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifndef _VASNWPRINTF_H #define _VASNWPRINTF_H /* Get va_list. */ #include /* Get wchar_t, size_t. */ #include #ifdef __cplusplus extern "C" { #endif /* Write formatted output to a string dynamically allocated with malloc(). You can pass a preallocated buffer for the result in RESULTBUF and its size in *LENGTHP; otherwise you pass RESULTBUF = NULL. If successful, return the address of the string (this may be = RESULTBUF if no dynamic memory allocation was necessary) and set *LENGTHP to the number of resulting bytes, excluding the trailing NUL. Upon error, set errno and return NULL. */ extern wchar_t * asnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, ...); extern wchar_t * vasnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, va_list args); #ifdef __cplusplus } #endif #endif /* _VASNWPRINTF_H */ realtimebattle-1.0.8/intl/vasnprintf.c0000644000175000017500000005304410170545357016171 0ustar moimoi/* vsprintf with automatic memory allocation. Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ /* Tell glibc's to provide a prototype for snprintf(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H # include #endif #ifndef IN_LIBINTL # include #endif /* Specification. */ #if WIDE_CHAR_VERSION # include "vasnwprintf.h" #else # include "vasnprintf.h" #endif #include /* snprintf(), sprintf() */ #include /* abort(), malloc(), realloc(), free() */ #include /* memcpy(), strlen() */ #include /* errno */ #include /* CHAR_BIT */ #include /* DBL_MAX_EXP, LDBL_MAX_EXP */ #if WIDE_CHAR_VERSION # include "wprintf-parse.h" #else # include "printf-parse.h" #endif /* Checked size_t computations. */ #include "xsize.h" #ifdef HAVE_WCHAR_T # ifdef HAVE_WCSLEN # define local_wcslen wcslen # else /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid a dependency towards this library, here is a local substitute. Define this substitute only once, even if this file is included twice in the same compilation unit. */ # ifndef local_wcslen_defined # define local_wcslen_defined 1 static size_t local_wcslen (const wchar_t *s) { const wchar_t *ptr; for (ptr = s; *ptr != (wchar_t) 0; ptr++) ; return ptr - s; } # endif # endif #endif #if WIDE_CHAR_VERSION # define VASNPRINTF vasnwprintf # define CHAR_T wchar_t # define DIRECTIVE wchar_t_directive # define DIRECTIVES wchar_t_directives # define PRINTF_PARSE wprintf_parse # define USE_SNPRINTF 1 # if HAVE_DECL__SNWPRINTF /* On Windows, the function swprintf() has a different signature than on Unix; we use the _snwprintf() function instead. */ # define SNPRINTF _snwprintf # else /* Unix. */ # define SNPRINTF swprintf # endif #else # define VASNPRINTF vasnprintf # define CHAR_T char # define DIRECTIVE char_directive # define DIRECTIVES char_directives # define PRINTF_PARSE printf_parse # define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) # if HAVE_DECL__SNPRINTF /* Windows. */ # define SNPRINTF _snprintf # else /* Unix. */ # define SNPRINTF snprintf # endif #endif CHAR_T * VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list args) { DIRECTIVES d; arguments a; if (PRINTF_PARSE (format, &d, &a) < 0) { errno = EINVAL; return NULL; } #define CLEANUP() \ free (d.dir); \ if (a.arg) \ free (a.arg); if (printf_fetchargs (args, &a) < 0) { CLEANUP (); errno = EINVAL; return NULL; } { size_t buf_neededlength; CHAR_T *buf; CHAR_T *buf_malloced; const CHAR_T *cp; size_t i; DIRECTIVE *dp; /* Output string accumulator. */ CHAR_T *result; size_t allocated; size_t length; /* Allocate a small buffer that will hold a directive passed to sprintf or snprintf. */ buf_neededlength = xsum4 (7, d.max_width_length, d.max_precision_length, 6); #if HAVE_ALLOCA if (buf_neededlength < 4000 / sizeof (CHAR_T)) { buf = (CHAR_T *) alloca (buf_neededlength * sizeof (CHAR_T)); buf_malloced = NULL; } else #endif { size_t buf_memsize = xtimes (buf_neededlength, sizeof (CHAR_T)); if (size_overflow_p (buf_memsize)) goto out_of_memory_1; buf = (CHAR_T *) malloc (buf_memsize); if (buf == NULL) goto out_of_memory_1; buf_malloced = buf; } if (resultbuf != NULL) { result = resultbuf; allocated = *lengthp; } else { result = NULL; allocated = 0; } length = 0; /* Invariants: result is either == resultbuf or == NULL or malloc-allocated. If length > 0, then result != NULL. */ /* Ensures that allocated >= needed. Aborts through a jump to out_of_memory if needed is SIZE_MAX or otherwise too big. */ #define ENSURE_ALLOCATION(needed) \ if ((needed) > allocated) \ { \ size_t memory_size; \ CHAR_T *memory; \ \ allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ if ((needed) > allocated) \ allocated = (needed); \ memory_size = xtimes (allocated, sizeof (CHAR_T)); \ if (size_overflow_p (memory_size)) \ goto out_of_memory; \ if (result == resultbuf || result == NULL) \ memory = (CHAR_T *) malloc (memory_size); \ else \ memory = (CHAR_T *) realloc (result, memory_size); \ if (memory == NULL) \ goto out_of_memory; \ if (result == resultbuf && length > 0) \ memcpy (memory, result, length * sizeof (CHAR_T)); \ result = memory; \ } for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) { if (cp != dp->dir_start) { size_t n = dp->dir_start - cp; size_t augmented_length = xsum (length, n); ENSURE_ALLOCATION (augmented_length); memcpy (result + length, cp, n * sizeof (CHAR_T)); length = augmented_length; } if (i == d.count) break; /* Execute a single directive. */ if (dp->conversion == '%') { size_t augmented_length; if (!(dp->arg_index == ARG_NONE)) abort (); augmented_length = xsum (length, 1); ENSURE_ALLOCATION (augmented_length); result[length] = '%'; length = augmented_length; } else { if (!(dp->arg_index != ARG_NONE)) abort (); if (dp->conversion == 'n') { switch (a.arg[dp->arg_index].type) { case TYPE_COUNT_SCHAR_POINTER: *a.arg[dp->arg_index].a.a_count_schar_pointer = length; break; case TYPE_COUNT_SHORT_POINTER: *a.arg[dp->arg_index].a.a_count_short_pointer = length; break; case TYPE_COUNT_INT_POINTER: *a.arg[dp->arg_index].a.a_count_int_pointer = length; break; case TYPE_COUNT_LONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longint_pointer = length; break; #ifdef HAVE_LONG_LONG case TYPE_COUNT_LONGLONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; break; #endif default: abort (); } } else { arg_type type = a.arg[dp->arg_index].type; CHAR_T *p; unsigned int prefix_count; int prefixes[2]; #if !USE_SNPRINTF size_t tmp_length; CHAR_T tmpbuf[700]; CHAR_T *tmp; /* Allocate a temporary buffer of sufficient size for calling sprintf. */ { size_t width; size_t precision; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; width = (arg < 0 ? (unsigned int) (-arg) : arg); } else { const CHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } } precision = 6; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; precision = (arg < 0 ? 0 : arg); } else { const CHAR_T *digitp = dp->precision_start + 1; precision = 0; do precision = xsum (xtimes (precision, 10), *digitp++ - '0'); while (digitp != dp->precision_end); } } switch (dp->conversion) { case 'd': case 'i': case 'u': # ifdef HAVE_LONG_LONG if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 1; /* account for leading sign */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 1; /* account for leading sign */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 1; /* account for leading sign */ break; case 'o': # ifdef HAVE_LONG_LONG if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1 /* turn floor into ceil */ + 1; /* account for leading sign */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1 /* turn floor into ceil */ + 1; /* account for leading sign */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1 /* turn floor into ceil */ + 1; /* account for leading sign */ break; case 'x': case 'X': # ifdef HAVE_LONG_LONG if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1 /* turn floor into ceil */ + 2; /* account for leading sign or alternate form */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1 /* turn floor into ceil */ + 2; /* account for leading sign or alternate form */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1 /* turn floor into ceil */ + 2; /* account for leading sign or alternate form */ break; case 'f': case 'F': # ifdef HAVE_LONG_DOUBLE if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_MAX_EXP * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ else # endif tmp_length = (unsigned int) (DBL_MAX_EXP * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ tmp_length = xsum (tmp_length, precision); break; case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': tmp_length = 12; /* sign, decimal point, exponent etc. */ tmp_length = xsum (tmp_length, precision); break; case 'c': # if defined HAVE_WINT_T && !WIDE_CHAR_VERSION if (type == TYPE_WIDE_CHAR) tmp_length = MB_CUR_MAX; else # endif tmp_length = 1; break; case 's': # ifdef HAVE_WCHAR_T if (type == TYPE_WIDE_STRING) { tmp_length = local_wcslen (a.arg[dp->arg_index].a.a_wide_string); # if !WIDE_CHAR_VERSION tmp_length = xtimes (tmp_length, MB_CUR_MAX); # endif } else # endif tmp_length = strlen (a.arg[dp->arg_index].a.a_string); break; case 'p': tmp_length = (unsigned int) (sizeof (void *) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1 /* turn floor into ceil */ + 2; /* account for leading 0x */ break; default: abort (); } if (tmp_length < width) tmp_length = width; tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ } if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (CHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } #endif /* Construct the format string for calling snprintf or sprintf. */ p = buf; *p++ = '%'; if (dp->flags & FLAG_GROUP) *p++ = '\''; if (dp->flags & FLAG_LEFT) *p++ = '-'; if (dp->flags & FLAG_SHOWSIGN) *p++ = '+'; if (dp->flags & FLAG_SPACE) *p++ = ' '; if (dp->flags & FLAG_ALT) *p++ = '#'; if (dp->flags & FLAG_ZERO) *p++ = '0'; if (dp->width_start != dp->width_end) { size_t n = dp->width_end - dp->width_start; memcpy (p, dp->width_start, n * sizeof (CHAR_T)); p += n; } if (dp->precision_start != dp->precision_end) { size_t n = dp->precision_end - dp->precision_start; memcpy (p, dp->precision_start, n * sizeof (CHAR_T)); p += n; } switch (type) { #ifdef HAVE_LONG_LONG case TYPE_LONGLONGINT: case TYPE_ULONGLONGINT: *p++ = 'l'; /*FALLTHROUGH*/ #endif case TYPE_LONGINT: case TYPE_ULONGINT: #ifdef HAVE_WINT_T case TYPE_WIDE_CHAR: #endif #ifdef HAVE_WCHAR_T case TYPE_WIDE_STRING: #endif *p++ = 'l'; break; #ifdef HAVE_LONG_DOUBLE case TYPE_LONGDOUBLE: *p++ = 'L'; break; #endif default: break; } *p = dp->conversion; #if USE_SNPRINTF p[1] = '%'; p[2] = 'n'; p[3] = '\0'; #else p[1] = '\0'; #endif /* Construct the arguments for calling snprintf or sprintf. */ prefix_count = 0; if (dp->width_arg_index != ARG_NONE) { if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int; } if (dp->precision_arg_index != ARG_NONE) { if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int; } #if USE_SNPRINTF /* Prepare checking whether snprintf returns the count via %n. */ ENSURE_ALLOCATION (xsum (length, 1)); result[length] = '\0'; #endif for (;;) { size_t maxlen; int count; int retcount; maxlen = allocated - length; count = -1; retcount = 0; #if USE_SNPRINTF # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ retcount = SNPRINTF (result + length, maxlen, buf, \ arg, &count); \ break; \ case 1: \ retcount = SNPRINTF (result + length, maxlen, buf, \ prefixes[0], arg, &count); \ break; \ case 2: \ retcount = SNPRINTF (result + length, maxlen, buf, \ prefixes[0], prefixes[1], arg, \ &count); \ break; \ default: \ abort (); \ } #else # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ count = sprintf (tmp, buf, arg); \ break; \ case 1: \ count = sprintf (tmp, buf, prefixes[0], arg); \ break; \ case 2: \ count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ arg); \ break; \ default: \ abort (); \ } #endif switch (type) { case TYPE_SCHAR: { int arg = a.arg[dp->arg_index].a.a_schar; SNPRINTF_BUF (arg); } break; case TYPE_UCHAR: { unsigned int arg = a.arg[dp->arg_index].a.a_uchar; SNPRINTF_BUF (arg); } break; case TYPE_SHORT: { int arg = a.arg[dp->arg_index].a.a_short; SNPRINTF_BUF (arg); } break; case TYPE_USHORT: { unsigned int arg = a.arg[dp->arg_index].a.a_ushort; SNPRINTF_BUF (arg); } break; case TYPE_INT: { int arg = a.arg[dp->arg_index].a.a_int; SNPRINTF_BUF (arg); } break; case TYPE_UINT: { unsigned int arg = a.arg[dp->arg_index].a.a_uint; SNPRINTF_BUF (arg); } break; case TYPE_LONGINT: { long int arg = a.arg[dp->arg_index].a.a_longint; SNPRINTF_BUF (arg); } break; case TYPE_ULONGINT: { unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint; SNPRINTF_BUF (arg); } break; #ifdef HAVE_LONG_LONG case TYPE_LONGLONGINT: { long long int arg = a.arg[dp->arg_index].a.a_longlongint; SNPRINTF_BUF (arg); } break; case TYPE_ULONGLONGINT: { unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint; SNPRINTF_BUF (arg); } break; #endif case TYPE_DOUBLE: { double arg = a.arg[dp->arg_index].a.a_double; SNPRINTF_BUF (arg); } break; #ifdef HAVE_LONG_DOUBLE case TYPE_LONGDOUBLE: { long double arg = a.arg[dp->arg_index].a.a_longdouble; SNPRINTF_BUF (arg); } break; #endif case TYPE_CHAR: { int arg = a.arg[dp->arg_index].a.a_char; SNPRINTF_BUF (arg); } break; #ifdef HAVE_WINT_T case TYPE_WIDE_CHAR: { wint_t arg = a.arg[dp->arg_index].a.a_wide_char; SNPRINTF_BUF (arg); } break; #endif case TYPE_STRING: { const char *arg = a.arg[dp->arg_index].a.a_string; SNPRINTF_BUF (arg); } break; #ifdef HAVE_WCHAR_T case TYPE_WIDE_STRING: { const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; SNPRINTF_BUF (arg); } break; #endif case TYPE_POINTER: { void *arg = a.arg[dp->arg_index].a.a_pointer; SNPRINTF_BUF (arg); } break; default: abort (); } #if USE_SNPRINTF /* Portability: Not all implementations of snprintf() are ISO C 99 compliant. Determine the number of bytes that snprintf() has produced or would have produced. */ if (count >= 0) { /* Verify that snprintf() has NUL-terminated its result. */ if (count < maxlen && result[length + count] != '\0') abort (); /* Portability hack. */ if (retcount > count) count = retcount; } else { /* snprintf() doesn't understand the '%n' directive. */ if (p[1] != '\0') { /* Don't use the '%n' directive; instead, look at the snprintf() return value. */ p[1] = '\0'; continue; } else { /* Look at the snprintf() return value. */ if (retcount < 0) { /* HP-UX 10.20 snprintf() is doubly deficient: It doesn't understand the '%n' directive, *and* it returns -1 (rather than the length that would have been required) when the buffer is too small. */ size_t bigger_need = xsum (xtimes (allocated, 2), 12); ENSURE_ALLOCATION (bigger_need); continue; } else count = retcount; } } #endif /* Attempt to handle failure. */ if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EINVAL; return NULL; } #if !USE_SNPRINTF if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); #endif /* Make room for the result. */ if (count >= maxlen) { /* Need at least count bytes. But allocate proportionally, to avoid looping eternally if snprintf() reports a too small count. */ size_t n = xmax (xsum (length, count), xtimes (allocated, 2)); ENSURE_ALLOCATION (n); #if USE_SNPRINTF continue; #endif } #if USE_SNPRINTF /* The snprintf() result did fit. */ #else /* Append the sprintf() result. */ memcpy (result + length, tmp, count * sizeof (CHAR_T)); if (tmp != tmpbuf) free (tmp); #endif length += count; break; } } } } /* Add the final NUL. */ ENSURE_ALLOCATION (xsum (length, 1)); result[length] = '\0'; if (result != resultbuf && length + 1 < allocated) { /* Shrink the allocated memory if possible. */ CHAR_T *memory; memory = (CHAR_T *) realloc (result, (length + 1) * sizeof (CHAR_T)); if (memory != NULL) result = memory; } if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); *lengthp = length; return result; out_of_memory: if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); out_of_memory_1: CLEANUP (); errno = ENOMEM; return NULL; } } #undef SNPRINTF #undef USE_SNPRINTF #undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE #undef CHAR_T #undef VASNPRINTF realtimebattle-1.0.8/intl/os2compat.h0000644000175000017500000000302210170545357015702 0ustar moimoi/* OS/2 compatibility defines. This file is intended to be included from config.h Copyright (C) 2001-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ /* When included from os2compat.h we need all the original definitions */ #ifndef OS2_AWARE #undef LIBDIR #define LIBDIR _nlos2_libdir extern char *_nlos2_libdir; #undef LOCALEDIR #define LOCALEDIR _nlos2_localedir extern char *_nlos2_localedir; #undef LOCALE_ALIAS_PATH #define LOCALE_ALIAS_PATH _nlos2_localealiaspath extern char *_nlos2_localealiaspath; #endif #undef HAVE_STRCASECMP #define HAVE_STRCASECMP 1 #define strcasecmp stricmp #define strncasecmp strnicmp /* We have our own getenv() which works even if library is compiled as DLL */ #define getenv _nl_getenv /* Older versions of gettext used -1 as the value of LC_MESSAGES */ #define LC_MESSAGES_COMPAT (-1) realtimebattle-1.0.8/intl/libgnuintl.h.in0000644000175000017500000003114610170545357016557 0ustar moimoi/* Message catalogs for internationalization. Copyright (C) 1995-1997, 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 Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifndef _LIBINTL_H #define _LIBINTL_H 1 #include /* The LC_MESSAGES locale category is the category used by the functions gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. On systems that don't define it, use an arbitrary value instead. On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) then includes (i.e. this file!) and then only defines LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES in this case. */ #if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) # define LC_MESSAGES 1729 #endif /* We define an additional symbol to signal that we use the GNU implementation of gettext. */ #define __USE_GNU_GETTEXT 1 /* Provide information about the supported file formats. Returns the maximum minor revision number supported for a given major revision. */ #define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ ((major) == 0 ? 1 : -1) /* Resolve a platform specific conflict on DJGPP. GNU gettext takes precedence over _conio_gettext. */ #ifdef __DJGPP__ # undef gettext #endif #ifdef __cplusplus extern "C" { #endif /* We redirect the functions to those prefixed with "libintl_". This is necessary, because some systems define gettext/textdomain/... in the C library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). If we used the unprefixed names, there would be cases where the definition in the C library would override the one in the libintl.so shared library. Recall that on ELF systems, the symbols are looked up in the following order: 1. in the executable, 2. in the shared libraries specified on the link command line, in order, 3. in the dependencies of the shared libraries specified on the link command line, 4. in the dlopen()ed shared libraries, in the order in which they were dlopen()ed. The definition in the C library would override the one in libintl.so if either * -lc is given on the link command line and -lintl isn't, or * -lc is given on the link command line before -lintl, or * libintl.so is a dependency of a dlopen()ed shared library but not linked to the executable at link time. Since Solaris gettext() behaves differently than GNU gettext(), this would be unacceptable. The redirection happens by default through macros in C, so that &gettext is independent of the compilation unit, but through inline functions in C++, in order not to interfere with the name mangling of class fields or class methods called 'gettext'. */ /* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. If he doesn't, we choose the method. A third possible method is _INTL_REDIRECT_ASM, supported only by GCC. */ #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) # if __GNUC__ >= 2 && !defined __APPLE_CC__ && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) # define _INTL_REDIRECT_ASM # else # ifdef __cplusplus # define _INTL_REDIRECT_INLINE # else # define _INTL_REDIRECT_MACROS # endif # endif #endif /* Auxiliary macros. */ #ifdef _INTL_REDIRECT_ASM # define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) # define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring # define _INTL_STRINGIFY(prefix) #prefix #else # define _INTL_ASM(cname) #endif /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_gettext (const char *__msgid); static inline char *gettext (const char *__msgid) { return libintl_gettext (__msgid); } #else #ifdef _INTL_REDIRECT_MACROS # define gettext libintl_gettext #endif extern char *gettext (const char *__msgid) _INTL_ASM (libintl_gettext); #endif /* Look up MSGID in the DOMAINNAME message catalog for the current LC_MESSAGES locale. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dgettext (const char *__domainname, const char *__msgid); static inline char *dgettext (const char *__domainname, const char *__msgid) { return libintl_dgettext (__domainname, __msgid); } #else #ifdef _INTL_REDIRECT_MACROS # define dgettext libintl_dgettext #endif extern char *dgettext (const char *__domainname, const char *__msgid) _INTL_ASM (libintl_dgettext); #endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, int __category); static inline char *dcgettext (const char *__domainname, const char *__msgid, int __category) { return libintl_dcgettext (__domainname, __msgid, __category); } #else #ifdef _INTL_REDIRECT_MACROS # define dcgettext libintl_dcgettext #endif extern char *dcgettext (const char *__domainname, const char *__msgid, int __category) _INTL_ASM (libintl_dcgettext); #endif /* Similar to `gettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n); static inline char *ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) { return libintl_ngettext (__msgid1, __msgid2, __n); } #else #ifdef _INTL_REDIRECT_MACROS # define ngettext libintl_ngettext #endif extern char *ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_ASM (libintl_ngettext); #endif /* Similar to `dgettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n); static inline char *dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) { return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); } #else #ifdef _INTL_REDIRECT_MACROS # define dngettext libintl_dngettext #endif extern char *dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_ASM (libintl_dngettext); #endif /* Similar to `dcgettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category); static inline char *dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) { return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); } #else #ifdef _INTL_REDIRECT_MACROS # define dcngettext libintl_dcngettext #endif extern char *dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) _INTL_ASM (libintl_dcngettext); #endif /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_textdomain (const char *__domainname); static inline char *textdomain (const char *__domainname) { return libintl_textdomain (__domainname); } #else #ifdef _INTL_REDIRECT_MACROS # define textdomain libintl_textdomain #endif extern char *textdomain (const char *__domainname) _INTL_ASM (libintl_textdomain); #endif /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_bindtextdomain (const char *__domainname, const char *__dirname); static inline char *bindtextdomain (const char *__domainname, const char *__dirname) { return libintl_bindtextdomain (__domainname, __dirname); } #else #ifdef _INTL_REDIRECT_MACROS # define bindtextdomain libintl_bindtextdomain #endif extern char *bindtextdomain (const char *__domainname, const char *__dirname) _INTL_ASM (libintl_bindtextdomain); #endif /* Specify the character encoding in which the messages from the DOMAINNAME message catalog will be returned. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_bind_textdomain_codeset (const char *__domainname, const char *__codeset); static inline char *bind_textdomain_codeset (const char *__domainname, const char *__codeset) { return libintl_bind_textdomain_codeset (__domainname, __codeset); } #else #ifdef _INTL_REDIRECT_MACROS # define bind_textdomain_codeset libintl_bind_textdomain_codeset #endif extern char *bind_textdomain_codeset (const char *__domainname, const char *__codeset) _INTL_ASM (libintl_bind_textdomain_codeset); #endif /* Support for format strings with positions in *printf(), following the POSIX/XSI specification. Note: These replacements for the *printf() functions are visible only in source files that #include or #include "gettext.h". Packages that use *printf() in source files that don't refer to _() or gettext() but for which the format string could be the return value of _() or gettext() need to add this #include. Oh well. */ #if !@HAVE_POSIX_PRINTF@ #include #include /* Get va_list. */ #if __STDC__ || defined __cplusplus || defined _MSC_VER # include #else # include #endif #undef fprintf #define fprintf libintl_fprintf extern int fprintf (FILE *, const char *, ...); #undef vfprintf #define vfprintf libintl_vfprintf extern int vfprintf (FILE *, const char *, va_list); #undef printf #define printf libintl_printf extern int printf (const char *, ...); #undef vprintf #define vprintf libintl_vprintf extern int vprintf (const char *, va_list); #undef sprintf #define sprintf libintl_sprintf extern int sprintf (char *, const char *, ...); #undef vsprintf #define vsprintf libintl_vsprintf extern int vsprintf (char *, const char *, va_list); #if @HAVE_SNPRINTF@ #undef snprintf #define snprintf libintl_snprintf extern int snprintf (char *, size_t, const char *, ...); #undef vsnprintf #define vsnprintf libintl_vsnprintf extern int vsnprintf (char *, size_t, const char *, va_list); #endif #if @HAVE_ASPRINTF@ #undef asprintf #define asprintf libintl_asprintf extern int asprintf (char **, const char *, ...); #undef vasprintf #define vasprintf libintl_vasprintf extern int vasprintf (char **, const char *, va_list); #endif #if @HAVE_WPRINTF@ #undef fwprintf #define fwprintf libintl_fwprintf extern int fwprintf (FILE *, const wchar_t *, ...); #undef vfwprintf #define vfwprintf libintl_vfwprintf extern int vfwprintf (FILE *, const wchar_t *, va_list); #undef wprintf #define wprintf libintl_wprintf extern int wprintf (const wchar_t *, ...); #undef vwprintf #define vwprintf libintl_vwprintf extern int vwprintf (const wchar_t *, va_list); #undef swprintf #define swprintf libintl_swprintf extern int swprintf (wchar_t *, size_t, const wchar_t *, ...); #undef vswprintf #define vswprintf libintl_vswprintf extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); #endif #endif /* Support for relocatable packages. */ /* Sets the original and the current installation prefix of the package. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ #define libintl_set_relocation_prefix libintl_set_relocation_prefix extern void libintl_set_relocation_prefix (const char *orig_prefix, const char *curr_prefix); #ifdef __cplusplus } #endif #endif /* libintl.h */ realtimebattle-1.0.8/intl/bindtextdom.c0000644000175000017500000002312010170545357016310 0ustar moimoi/* Implementation of the bindtextdomain(3) function Copyright (C) 1995-1998, 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 Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #ifdef _LIBC # include #else # include "libgnuintl.h" #endif #include "gettextP.h" #ifdef _LIBC /* We have to handle multi-threaded applications. */ # include #else /* Provide dummy implementation if this is outside glibc. */ # define __libc_rwlock_define(CLASS, NAME) # define __libc_rwlock_wrlock(NAME) # define __libc_rwlock_unlock(NAME) #endif /* The internal variables in the standalone libintl.a must have different names than the internal variables in GNU libc, otherwise programs using libintl.a cannot be linked statically. */ #if !defined _LIBC # define _nl_default_dirname libintl_nl_default_dirname # define _nl_domain_bindings libintl_nl_domain_bindings #endif /* Some compilers, like SunOS4 cc, don't have offsetof in . */ #ifndef offsetof # define offsetof(type,ident) ((size_t)&(((type*)0)->ident)) #endif /* @@ end of prolog @@ */ /* Contains the default location of the message catalogs. */ extern const char _nl_default_dirname[]; #ifdef _LIBC extern const char _nl_default_dirname_internal[] attribute_hidden; #else # define INTUSE(name) name #endif /* List with bindings of specific domains. */ extern struct binding *_nl_domain_bindings; /* Lock variable to protect the global data in the gettext implementation. */ __libc_rwlock_define (extern, _nl_state_lock attribute_hidden) /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define BINDTEXTDOMAIN __bindtextdomain # define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset # ifndef strdup # define strdup(str) __strdup (str) # endif #else # define BINDTEXTDOMAIN libintl_bindtextdomain # define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset #endif /* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP to be used for the DOMAINNAME message catalog. If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not modified, only the current value is returned. If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither modified nor returned. */ static void set_binding_values (const char *domainname, const char **dirnamep, const char **codesetp) { struct binding *binding; int modified; /* Some sanity checks. */ if (domainname == NULL || domainname[0] == '\0') { if (dirnamep) *dirnamep = NULL; if (codesetp) *codesetp = NULL; return; } __libc_rwlock_wrlock (_nl_state_lock); modified = 0; for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) { int compare = strcmp (domainname, binding->domainname); if (compare == 0) /* We found it! */ break; if (compare < 0) { /* It is not in the list. */ binding = NULL; break; } } if (binding != NULL) { if (dirnamep) { const char *dirname = *dirnamep; if (dirname == NULL) /* The current binding has be to returned. */ *dirnamep = binding->dirname; else { /* The domain is already bound. If the new value and the old one are equal we simply do nothing. Otherwise replace the old binding. */ char *result = binding->dirname; if (strcmp (dirname, result) != 0) { if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0) result = (char *) INTUSE(_nl_default_dirname); else { #if defined _LIBC || defined HAVE_STRDUP result = strdup (dirname); #else size_t len = strlen (dirname) + 1; result = (char *) malloc (len); if (__builtin_expect (result != NULL, 1)) memcpy (result, dirname, len); #endif } if (__builtin_expect (result != NULL, 1)) { if (binding->dirname != INTUSE(_nl_default_dirname)) free (binding->dirname); binding->dirname = result; modified = 1; } } *dirnamep = result; } } if (codesetp) { const char *codeset = *codesetp; if (codeset == NULL) /* The current binding has be to returned. */ *codesetp = binding->codeset; else { /* The domain is already bound. If the new value and the old one are equal we simply do nothing. Otherwise replace the old binding. */ char *result = binding->codeset; if (result == NULL || strcmp (codeset, result) != 0) { #if defined _LIBC || defined HAVE_STRDUP result = strdup (codeset); #else size_t len = strlen (codeset) + 1; result = (char *) malloc (len); if (__builtin_expect (result != NULL, 1)) memcpy (result, codeset, len); #endif if (__builtin_expect (result != NULL, 1)) { if (binding->codeset != NULL) free (binding->codeset); binding->codeset = result; binding->codeset_cntr++; modified = 1; } } *codesetp = result; } } } else if ((dirnamep == NULL || *dirnamep == NULL) && (codesetp == NULL || *codesetp == NULL)) { /* Simply return the default values. */ if (dirnamep) *dirnamep = INTUSE(_nl_default_dirname); if (codesetp) *codesetp = NULL; } else { /* We have to create a new binding. */ size_t len = strlen (domainname) + 1; struct binding *new_binding = (struct binding *) malloc (offsetof (struct binding, domainname) + len); if (__builtin_expect (new_binding == NULL, 0)) goto failed; memcpy (new_binding->domainname, domainname, len); if (dirnamep) { const char *dirname = *dirnamep; if (dirname == NULL) /* The default value. */ dirname = INTUSE(_nl_default_dirname); else { if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0) dirname = INTUSE(_nl_default_dirname); else { char *result; #if defined _LIBC || defined HAVE_STRDUP result = strdup (dirname); if (__builtin_expect (result == NULL, 0)) goto failed_dirname; #else size_t len = strlen (dirname) + 1; result = (char *) malloc (len); if (__builtin_expect (result == NULL, 0)) goto failed_dirname; memcpy (result, dirname, len); #endif dirname = result; } } *dirnamep = dirname; new_binding->dirname = (char *) dirname; } else /* The default value. */ new_binding->dirname = (char *) INTUSE(_nl_default_dirname); new_binding->codeset_cntr = 0; if (codesetp) { const char *codeset = *codesetp; if (codeset != NULL) { char *result; #if defined _LIBC || defined HAVE_STRDUP result = strdup (codeset); if (__builtin_expect (result == NULL, 0)) goto failed_codeset; #else size_t len = strlen (codeset) + 1; result = (char *) malloc (len); if (__builtin_expect (result == NULL, 0)) goto failed_codeset; memcpy (result, codeset, len); #endif codeset = result; new_binding->codeset_cntr++; } *codesetp = codeset; new_binding->codeset = (char *) codeset; } else new_binding->codeset = NULL; /* Now enqueue it. */ if (_nl_domain_bindings == NULL || strcmp (domainname, _nl_domain_bindings->domainname) < 0) { new_binding->next = _nl_domain_bindings; _nl_domain_bindings = new_binding; } else { binding = _nl_domain_bindings; while (binding->next != NULL && strcmp (domainname, binding->next->domainname) > 0) binding = binding->next; new_binding->next = binding->next; binding->next = new_binding; } modified = 1; /* Here we deal with memory allocation failures. */ if (0) { failed_codeset: if (new_binding->dirname != INTUSE(_nl_default_dirname)) free (new_binding->dirname); failed_dirname: free (new_binding); failed: if (dirnamep) *dirnamep = NULL; if (codesetp) *codesetp = NULL; } } /* If we modified any binding, we flush the caches. */ if (modified) ++_nl_msg_cat_cntr; __libc_rwlock_unlock (_nl_state_lock); } /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ char * BINDTEXTDOMAIN (const char *domainname, const char *dirname) { set_binding_values (domainname, &dirname, NULL); return (char *) dirname; } /* Specify the character encoding in which the messages from the DOMAINNAME message catalog will be returned. */ char * BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset) { set_binding_values (domainname, NULL, &codeset); return (char *) codeset; } #ifdef _LIBC /* Aliases for function names in GNU C Library. */ weak_alias (__bindtextdomain, bindtextdomain); weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset); #endif realtimebattle-1.0.8/intl/dcgettext.c0000644000175000017500000000341510170545357015767 0ustar moimoi/* Implementation of the dcgettext(3) function. Copyright (C) 1995-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 Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DCGETTEXT __dcgettext # define DCIGETTEXT __dcigettext #else # define DCGETTEXT libintl_dcgettext # define DCIGETTEXT libintl_dcigettext #endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ char * DCGETTEXT (const char *domainname, const char *msgid, int category) { return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ INTDEF(__dcgettext) weak_alias (__dcgettext, dcgettext); #endif realtimebattle-1.0.8/intl/dgettext.c0000644000175000017500000000336510170545357015630 0ustar moimoi/* Implementation of the dgettext(3) function. Copyright (C) 1995-1997, 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 Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif #include "gettextP.h" #include #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DGETTEXT __dgettext # define DCGETTEXT INTUSE(__dcgettext) #else # define DGETTEXT libintl_dgettext # define DCGETTEXT libintl_dcgettext #endif /* Look up MSGID in the DOMAINNAME message catalog of the current LC_MESSAGES locale. */ char * DGETTEXT (const char *domainname, const char *msgid) { return DCGETTEXT (domainname, msgid, LC_MESSAGES); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__dgettext, dgettext); #endif realtimebattle-1.0.8/intl/gettext.c0000644000175000017500000000355010170545357015460 0ustar moimoi/* Implementation of gettext(3) function. Copyright (C) 1995, 1997, 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 Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif #ifdef _LIBC # define __need_NULL # include #else # include /* Just for NULL. */ #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define GETTEXT __gettext # define DCGETTEXT INTUSE(__dcgettext) #else # define GETTEXT libintl_gettext # define DCGETTEXT libintl_dcgettext #endif /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ char * GETTEXT (const char *msgid) { return DCGETTEXT (NULL, msgid, LC_MESSAGES); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__gettext, gettext); #endif realtimebattle-1.0.8/intl/finddomain.c0000644000175000017500000001274310170545357016110 0ustar moimoi/* Handle list of needed message catalogs Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc. Written by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #if defined HAVE_UNISTD_H || defined _LIBC # include #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* List of already loaded domains. */ static struct loaded_l10nfile *_nl_loaded_domains; /* Return a data structure describing the message catalog described by the DOMAINNAME and CATEGORY parameters with respect to the currently established bindings. */ struct loaded_l10nfile * internal_function _nl_find_domain (const char *dirname, char *locale, const char *domainname, struct binding *domainbinding) { struct loaded_l10nfile *retval; const char *language; const char *modifier; const char *territory; const char *codeset; const char *normalized_codeset; const char *special; const char *sponsor; const char *revision; const char *alias_value; int mask; /* LOCALE can consist of up to four recognized parts for the XPG syntax: language[_territory[.codeset]][@modifier] and six parts for the CEN syntax: language[_territory][+audience][+special][,[sponsor][_revision]] Beside the first part all of them are allowed to be missing. If the full specified locale is not found, the less specific one are looked for. The various parts will be stripped off according to the following order: (1) revision (2) sponsor (3) special (4) codeset (5) normalized codeset (6) territory (7) audience/modifier */ /* If we have already tested for this locale entry there has to be one data set in the list of loaded domains. */ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, strlen (dirname) + 1, 0, locale, NULL, NULL, NULL, NULL, NULL, NULL, NULL, domainname, 0); if (retval != NULL) { /* We know something about this locale. */ int cnt; if (retval->decided == 0) _nl_load_domain (retval, domainbinding); if (retval->data != NULL) return retval; for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) { if (retval->successor[cnt]->decided == 0) _nl_load_domain (retval->successor[cnt], domainbinding); if (retval->successor[cnt]->data != NULL) break; } return cnt >= 0 ? retval : NULL; /* NOTREACHED */ } /* See whether the locale value is an alias. If yes its value *overwrites* the alias name. No test for the original value is done. */ alias_value = _nl_expand_alias (locale); if (alias_value != NULL) { #if defined _LIBC || defined HAVE_STRDUP locale = strdup (alias_value); if (locale == NULL) return NULL; #else size_t len = strlen (alias_value) + 1; locale = (char *) malloc (len); if (locale == NULL) return NULL; memcpy (locale, alias_value, len); #endif } /* Now we determine the single parts of the locale name. First look for the language. Termination symbols are `_' and `@' if we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ mask = _nl_explode_name (locale, &language, &modifier, &territory, &codeset, &normalized_codeset, &special, &sponsor, &revision); /* Create all possible locale entries which might be interested in generalization. */ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, strlen (dirname) + 1, mask, language, territory, codeset, normalized_codeset, modifier, special, sponsor, revision, domainname, 1); if (retval == NULL) /* This means we are out of core. */ return NULL; if (retval->decided == 0) _nl_load_domain (retval, domainbinding); if (retval->data == NULL) { int cnt; for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) { if (retval->successor[cnt]->decided == 0) _nl_load_domain (retval->successor[cnt], domainbinding); if (retval->successor[cnt]->data != NULL) break; } } /* The room for an alias was dynamically allocated. Free it now. */ if (alias_value != NULL) free (locale); /* The space for normalized_codeset is dynamically allocated. Free it. */ if (mask & XPG_NORM_CODESET) free ((void *) normalized_codeset); return retval; } #ifdef _LIBC libc_freeres_fn (free_mem) { struct loaded_l10nfile *runp = _nl_loaded_domains; while (runp != NULL) { struct loaded_l10nfile *here = runp; if (runp->data != NULL) _nl_unload_domain ((struct loaded_domain *) runp->data); runp = runp->next; free ((char *) here->filename); free (here); } } #endif realtimebattle-1.0.8/intl/loadmsgcat.c0000644000175000017500000010723710170545357016121 0ustar moimoi/* Load needed message catalogs. Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ /* Tell glibc's to provide a prototype for mempcpy(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #ifdef __GNUC__ # undef alloca # define alloca __builtin_alloca # define HAVE_ALLOCA 1 #else # ifdef _MSC_VER # include # define alloca _alloca # else # if defined HAVE_ALLOCA_H || defined _LIBC # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca char *alloca (); # endif # endif # endif # endif #endif #include #include #if defined HAVE_UNISTD_H || defined _LIBC # include #endif #ifdef _LIBC # include # include #endif #if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ || (defined _LIBC && defined _POSIX_MAPPED_FILES) # include # undef HAVE_MMAP # define HAVE_MMAP 1 #else # undef HAVE_MMAP #endif #if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC # include #endif #if defined HAVE_INTTYPES_H || defined _LIBC # include #endif #include "gmo.h" #include "gettextP.h" #include "hash-string.h" #include "plural-exp.h" #ifdef _LIBC # include "../locale/localeinfo.h" #endif /* Provide fallback values for macros that ought to be defined in . Note that our fallback values need not be literal strings, because we don't use them with preprocessor string concatenation. */ #if !defined PRId8 || PRI_MACROS_BROKEN # undef PRId8 # define PRId8 "d" #endif #if !defined PRIi8 || PRI_MACROS_BROKEN # undef PRIi8 # define PRIi8 "i" #endif #if !defined PRIo8 || PRI_MACROS_BROKEN # undef PRIo8 # define PRIo8 "o" #endif #if !defined PRIu8 || PRI_MACROS_BROKEN # undef PRIu8 # define PRIu8 "u" #endif #if !defined PRIx8 || PRI_MACROS_BROKEN # undef PRIx8 # define PRIx8 "x" #endif #if !defined PRIX8 || PRI_MACROS_BROKEN # undef PRIX8 # define PRIX8 "X" #endif #if !defined PRId16 || PRI_MACROS_BROKEN # undef PRId16 # define PRId16 "d" #endif #if !defined PRIi16 || PRI_MACROS_BROKEN # undef PRIi16 # define PRIi16 "i" #endif #if !defined PRIo16 || PRI_MACROS_BROKEN # undef PRIo16 # define PRIo16 "o" #endif #if !defined PRIu16 || PRI_MACROS_BROKEN # undef PRIu16 # define PRIu16 "u" #endif #if !defined PRIx16 || PRI_MACROS_BROKEN # undef PRIx16 # define PRIx16 "x" #endif #if !defined PRIX16 || PRI_MACROS_BROKEN # undef PRIX16 # define PRIX16 "X" #endif #if !defined PRId32 || PRI_MACROS_BROKEN # undef PRId32 # define PRId32 "d" #endif #if !defined PRIi32 || PRI_MACROS_BROKEN # undef PRIi32 # define PRIi32 "i" #endif #if !defined PRIo32 || PRI_MACROS_BROKEN # undef PRIo32 # define PRIo32 "o" #endif #if !defined PRIu32 || PRI_MACROS_BROKEN # undef PRIu32 # define PRIu32 "u" #endif #if !defined PRIx32 || PRI_MACROS_BROKEN # undef PRIx32 # define PRIx32 "x" #endif #if !defined PRIX32 || PRI_MACROS_BROKEN # undef PRIX32 # define PRIX32 "X" #endif #if !defined PRId64 || PRI_MACROS_BROKEN # undef PRId64 # define PRId64 (sizeof (long) == 8 ? "ld" : "lld") #endif #if !defined PRIi64 || PRI_MACROS_BROKEN # undef PRIi64 # define PRIi64 (sizeof (long) == 8 ? "li" : "lli") #endif #if !defined PRIo64 || PRI_MACROS_BROKEN # undef PRIo64 # define PRIo64 (sizeof (long) == 8 ? "lo" : "llo") #endif #if !defined PRIu64 || PRI_MACROS_BROKEN # undef PRIu64 # define PRIu64 (sizeof (long) == 8 ? "lu" : "llu") #endif #if !defined PRIx64 || PRI_MACROS_BROKEN # undef PRIx64 # define PRIx64 (sizeof (long) == 8 ? "lx" : "llx") #endif #if !defined PRIX64 || PRI_MACROS_BROKEN # undef PRIX64 # define PRIX64 (sizeof (long) == 8 ? "lX" : "llX") #endif #if !defined PRIdLEAST8 || PRI_MACROS_BROKEN # undef PRIdLEAST8 # define PRIdLEAST8 "d" #endif #if !defined PRIiLEAST8 || PRI_MACROS_BROKEN # undef PRIiLEAST8 # define PRIiLEAST8 "i" #endif #if !defined PRIoLEAST8 || PRI_MACROS_BROKEN # undef PRIoLEAST8 # define PRIoLEAST8 "o" #endif #if !defined PRIuLEAST8 || PRI_MACROS_BROKEN # undef PRIuLEAST8 # define PRIuLEAST8 "u" #endif #if !defined PRIxLEAST8 || PRI_MACROS_BROKEN # undef PRIxLEAST8 # define PRIxLEAST8 "x" #endif #if !defined PRIXLEAST8 || PRI_MACROS_BROKEN # undef PRIXLEAST8 # define PRIXLEAST8 "X" #endif #if !defined PRIdLEAST16 || PRI_MACROS_BROKEN # undef PRIdLEAST16 # define PRIdLEAST16 "d" #endif #if !defined PRIiLEAST16 || PRI_MACROS_BROKEN # undef PRIiLEAST16 # define PRIiLEAST16 "i" #endif #if !defined PRIoLEAST16 || PRI_MACROS_BROKEN # undef PRIoLEAST16 # define PRIoLEAST16 "o" #endif #if !defined PRIuLEAST16 || PRI_MACROS_BROKEN # undef PRIuLEAST16 # define PRIuLEAST16 "u" #endif #if !defined PRIxLEAST16 || PRI_MACROS_BROKEN # undef PRIxLEAST16 # define PRIxLEAST16 "x" #endif #if !defined PRIXLEAST16 || PRI_MACROS_BROKEN # undef PRIXLEAST16 # define PRIXLEAST16 "X" #endif #if !defined PRIdLEAST32 || PRI_MACROS_BROKEN # undef PRIdLEAST32 # define PRIdLEAST32 "d" #endif #if !defined PRIiLEAST32 || PRI_MACROS_BROKEN # undef PRIiLEAST32 # define PRIiLEAST32 "i" #endif #if !defined PRIoLEAST32 || PRI_MACROS_BROKEN # undef PRIoLEAST32 # define PRIoLEAST32 "o" #endif #if !defined PRIuLEAST32 || PRI_MACROS_BROKEN # undef PRIuLEAST32 # define PRIuLEAST32 "u" #endif #if !defined PRIxLEAST32 || PRI_MACROS_BROKEN # undef PRIxLEAST32 # define PRIxLEAST32 "x" #endif #if !defined PRIXLEAST32 || PRI_MACROS_BROKEN # undef PRIXLEAST32 # define PRIXLEAST32 "X" #endif #if !defined PRIdLEAST64 || PRI_MACROS_BROKEN # undef PRIdLEAST64 # define PRIdLEAST64 PRId64 #endif #if !defined PRIiLEAST64 || PRI_MACROS_BROKEN # undef PRIiLEAST64 # define PRIiLEAST64 PRIi64 #endif #if !defined PRIoLEAST64 || PRI_MACROS_BROKEN # undef PRIoLEAST64 # define PRIoLEAST64 PRIo64 #endif #if !defined PRIuLEAST64 || PRI_MACROS_BROKEN # undef PRIuLEAST64 # define PRIuLEAST64 PRIu64 #endif #if !defined PRIxLEAST64 || PRI_MACROS_BROKEN # undef PRIxLEAST64 # define PRIxLEAST64 PRIx64 #endif #if !defined PRIXLEAST64 || PRI_MACROS_BROKEN # undef PRIXLEAST64 # define PRIXLEAST64 PRIX64 #endif #if !defined PRIdFAST8 || PRI_MACROS_BROKEN # undef PRIdFAST8 # define PRIdFAST8 "d" #endif #if !defined PRIiFAST8 || PRI_MACROS_BROKEN # undef PRIiFAST8 # define PRIiFAST8 "i" #endif #if !defined PRIoFAST8 || PRI_MACROS_BROKEN # undef PRIoFAST8 # define PRIoFAST8 "o" #endif #if !defined PRIuFAST8 || PRI_MACROS_BROKEN # undef PRIuFAST8 # define PRIuFAST8 "u" #endif #if !defined PRIxFAST8 || PRI_MACROS_BROKEN # undef PRIxFAST8 # define PRIxFAST8 "x" #endif #if !defined PRIXFAST8 || PRI_MACROS_BROKEN # undef PRIXFAST8 # define PRIXFAST8 "X" #endif #if !defined PRIdFAST16 || PRI_MACROS_BROKEN # undef PRIdFAST16 # define PRIdFAST16 "d" #endif #if !defined PRIiFAST16 || PRI_MACROS_BROKEN # undef PRIiFAST16 # define PRIiFAST16 "i" #endif #if !defined PRIoFAST16 || PRI_MACROS_BROKEN # undef PRIoFAST16 # define PRIoFAST16 "o" #endif #if !defined PRIuFAST16 || PRI_MACROS_BROKEN # undef PRIuFAST16 # define PRIuFAST16 "u" #endif #if !defined PRIxFAST16 || PRI_MACROS_BROKEN # undef PRIxFAST16 # define PRIxFAST16 "x" #endif #if !defined PRIXFAST16 || PRI_MACROS_BROKEN # undef PRIXFAST16 # define PRIXFAST16 "X" #endif #if !defined PRIdFAST32 || PRI_MACROS_BROKEN # undef PRIdFAST32 # define PRIdFAST32 "d" #endif #if !defined PRIiFAST32 || PRI_MACROS_BROKEN # undef PRIiFAST32 # define PRIiFAST32 "i" #endif #if !defined PRIoFAST32 || PRI_MACROS_BROKEN # undef PRIoFAST32 # define PRIoFAST32 "o" #endif #if !defined PRIuFAST32 || PRI_MACROS_BROKEN # undef PRIuFAST32 # define PRIuFAST32 "u" #endif #if !defined PRIxFAST32 || PRI_MACROS_BROKEN # undef PRIxFAST32 # define PRIxFAST32 "x" #endif #if !defined PRIXFAST32 || PRI_MACROS_BROKEN # undef PRIXFAST32 # define PRIXFAST32 "X" #endif #if !defined PRIdFAST64 || PRI_MACROS_BROKEN # undef PRIdFAST64 # define PRIdFAST64 PRId64 #endif #if !defined PRIiFAST64 || PRI_MACROS_BROKEN # undef PRIiFAST64 # define PRIiFAST64 PRIi64 #endif #if !defined PRIoFAST64 || PRI_MACROS_BROKEN # undef PRIoFAST64 # define PRIoFAST64 PRIo64 #endif #if !defined PRIuFAST64 || PRI_MACROS_BROKEN # undef PRIuFAST64 # define PRIuFAST64 PRIu64 #endif #if !defined PRIxFAST64 || PRI_MACROS_BROKEN # undef PRIxFAST64 # define PRIxFAST64 PRIx64 #endif #if !defined PRIXFAST64 || PRI_MACROS_BROKEN # undef PRIXFAST64 # define PRIXFAST64 PRIX64 #endif #if !defined PRIdMAX || PRI_MACROS_BROKEN # undef PRIdMAX # define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld") #endif #if !defined PRIiMAX || PRI_MACROS_BROKEN # undef PRIiMAX # define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli") #endif #if !defined PRIoMAX || PRI_MACROS_BROKEN # undef PRIoMAX # define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo") #endif #if !defined PRIuMAX || PRI_MACROS_BROKEN # undef PRIuMAX # define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu") #endif #if !defined PRIxMAX || PRI_MACROS_BROKEN # undef PRIxMAX # define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx") #endif #if !defined PRIXMAX || PRI_MACROS_BROKEN # undef PRIXMAX # define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX") #endif #if !defined PRIdPTR || PRI_MACROS_BROKEN # undef PRIdPTR # define PRIdPTR \ (sizeof (void *) == sizeof (long) ? "ld" : \ sizeof (void *) == sizeof (int) ? "d" : \ "lld") #endif #if !defined PRIiPTR || PRI_MACROS_BROKEN # undef PRIiPTR # define PRIiPTR \ (sizeof (void *) == sizeof (long) ? "li" : \ sizeof (void *) == sizeof (int) ? "i" : \ "lli") #endif #if !defined PRIoPTR || PRI_MACROS_BROKEN # undef PRIoPTR # define PRIoPTR \ (sizeof (void *) == sizeof (long) ? "lo" : \ sizeof (void *) == sizeof (int) ? "o" : \ "llo") #endif #if !defined PRIuPTR || PRI_MACROS_BROKEN # undef PRIuPTR # define PRIuPTR \ (sizeof (void *) == sizeof (long) ? "lu" : \ sizeof (void *) == sizeof (int) ? "u" : \ "llu") #endif #if !defined PRIxPTR || PRI_MACROS_BROKEN # undef PRIxPTR # define PRIxPTR \ (sizeof (void *) == sizeof (long) ? "lx" : \ sizeof (void *) == sizeof (int) ? "x" : \ "llx") #endif #if !defined PRIXPTR || PRI_MACROS_BROKEN # undef PRIXPTR # define PRIXPTR \ (sizeof (void *) == sizeof (long) ? "lX" : \ sizeof (void *) == sizeof (int) ? "X" : \ "llX") #endif /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ISO C functions. This is required by the standard because some ISO C functions will require linking with this object file and the name space must not be polluted. */ # define open __open # define close __close # define read __read # define mmap __mmap # define munmap __munmap #endif /* For those losing systems which don't have `alloca' we have to add some additional code emulating it. */ #ifdef HAVE_ALLOCA # define freea(p) /* nothing */ #else # define alloca(n) malloc (n) # define freea(p) free (p) #endif /* For systems that distinguish between text and binary I/O. O_BINARY is usually declared in . */ #if !defined O_BINARY && defined _O_BINARY /* For MSC-compatible compilers. */ # define O_BINARY _O_BINARY # define O_TEXT _O_TEXT #endif #ifdef __BEOS__ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ # undef O_BINARY # undef O_TEXT #endif /* On reasonable systems, binary I/O is the default. */ #ifndef O_BINARY # define O_BINARY 0 #endif /* We need a sign, whether a new catalog was loaded, which can be associated with all translations. This is important if the translations are cached by one of GCC's features. */ int _nl_msg_cat_cntr; /* Expand a system dependent string segment. Return NULL if unsupported. */ static const char * get_sysdep_segment_value (const char *name) { /* Test for an ISO C 99 section 7.8.1 format string directive. Syntax: P R I { d | i | o | u | x | X } { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */ /* We don't use a table of 14 times 6 'const char *' strings here, because data relocations cost startup time. */ if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I') { if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u' || name[3] == 'x' || name[3] == 'X') { if (name[4] == '8' && name[5] == '\0') { if (name[3] == 'd') return PRId8; if (name[3] == 'i') return PRIi8; if (name[3] == 'o') return PRIo8; if (name[3] == 'u') return PRIu8; if (name[3] == 'x') return PRIx8; if (name[3] == 'X') return PRIX8; abort (); } if (name[4] == '1' && name[5] == '6' && name[6] == '\0') { if (name[3] == 'd') return PRId16; if (name[3] == 'i') return PRIi16; if (name[3] == 'o') return PRIo16; if (name[3] == 'u') return PRIu16; if (name[3] == 'x') return PRIx16; if (name[3] == 'X') return PRIX16; abort (); } if (name[4] == '3' && name[5] == '2' && name[6] == '\0') { if (name[3] == 'd') return PRId32; if (name[3] == 'i') return PRIi32; if (name[3] == 'o') return PRIo32; if (name[3] == 'u') return PRIu32; if (name[3] == 'x') return PRIx32; if (name[3] == 'X') return PRIX32; abort (); } if (name[4] == '6' && name[5] == '4' && name[6] == '\0') { if (name[3] == 'd') return PRId64; if (name[3] == 'i') return PRIi64; if (name[3] == 'o') return PRIo64; if (name[3] == 'u') return PRIu64; if (name[3] == 'x') return PRIx64; if (name[3] == 'X') return PRIX64; abort (); } if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A' && name[7] == 'S' && name[8] == 'T') { if (name[9] == '8' && name[10] == '\0') { if (name[3] == 'd') return PRIdLEAST8; if (name[3] == 'i') return PRIiLEAST8; if (name[3] == 'o') return PRIoLEAST8; if (name[3] == 'u') return PRIuLEAST8; if (name[3] == 'x') return PRIxLEAST8; if (name[3] == 'X') return PRIXLEAST8; abort (); } if (name[9] == '1' && name[10] == '6' && name[11] == '\0') { if (name[3] == 'd') return PRIdLEAST16; if (name[3] == 'i') return PRIiLEAST16; if (name[3] == 'o') return PRIoLEAST16; if (name[3] == 'u') return PRIuLEAST16; if (name[3] == 'x') return PRIxLEAST16; if (name[3] == 'X') return PRIXLEAST16; abort (); } if (name[9] == '3' && name[10] == '2' && name[11] == '\0') { if (name[3] == 'd') return PRIdLEAST32; if (name[3] == 'i') return PRIiLEAST32; if (name[3] == 'o') return PRIoLEAST32; if (name[3] == 'u') return PRIuLEAST32; if (name[3] == 'x') return PRIxLEAST32; if (name[3] == 'X') return PRIXLEAST32; abort (); } if (name[9] == '6' && name[10] == '4' && name[11] == '\0') { if (name[3] == 'd') return PRIdLEAST64; if (name[3] == 'i') return PRIiLEAST64; if (name[3] == 'o') return PRIoLEAST64; if (name[3] == 'u') return PRIuLEAST64; if (name[3] == 'x') return PRIxLEAST64; if (name[3] == 'X') return PRIXLEAST64; abort (); } } if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S' && name[7] == 'T') { if (name[8] == '8' && name[9] == '\0') { if (name[3] == 'd') return PRIdFAST8; if (name[3] == 'i') return PRIiFAST8; if (name[3] == 'o') return PRIoFAST8; if (name[3] == 'u') return PRIuFAST8; if (name[3] == 'x') return PRIxFAST8; if (name[3] == 'X') return PRIXFAST8; abort (); } if (name[8] == '1' && name[9] == '6' && name[10] == '\0') { if (name[3] == 'd') return PRIdFAST16; if (name[3] == 'i') return PRIiFAST16; if (name[3] == 'o') return PRIoFAST16; if (name[3] == 'u') return PRIuFAST16; if (name[3] == 'x') return PRIxFAST16; if (name[3] == 'X') return PRIXFAST16; abort (); } if (name[8] == '3' && name[9] == '2' && name[10] == '\0') { if (name[3] == 'd') return PRIdFAST32; if (name[3] == 'i') return PRIiFAST32; if (name[3] == 'o') return PRIoFAST32; if (name[3] == 'u') return PRIuFAST32; if (name[3] == 'x') return PRIxFAST32; if (name[3] == 'X') return PRIXFAST32; abort (); } if (name[8] == '6' && name[9] == '4' && name[10] == '\0') { if (name[3] == 'd') return PRIdFAST64; if (name[3] == 'i') return PRIiFAST64; if (name[3] == 'o') return PRIoFAST64; if (name[3] == 'u') return PRIuFAST64; if (name[3] == 'x') return PRIxFAST64; if (name[3] == 'X') return PRIXFAST64; abort (); } } if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X' && name[7] == '\0') { if (name[3] == 'd') return PRIdMAX; if (name[3] == 'i') return PRIiMAX; if (name[3] == 'o') return PRIoMAX; if (name[3] == 'u') return PRIuMAX; if (name[3] == 'x') return PRIxMAX; if (name[3] == 'X') return PRIXMAX; abort (); } if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R' && name[7] == '\0') { if (name[3] == 'd') return PRIdPTR; if (name[3] == 'i') return PRIiPTR; if (name[3] == 'o') return PRIoPTR; if (name[3] == 'u') return PRIuPTR; if (name[3] == 'x') return PRIxPTR; if (name[3] == 'X') return PRIXPTR; abort (); } } } /* Test for a glibc specific printf() format directive flag. */ if (name[0] == 'I' && name[1] == '\0') { #if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) /* The 'I' flag, in numeric format directives, replaces ASCII digits with the 'outdigits' defined in the LC_CTYPE locale facet. This is used for Farsi (Persian) and maybe Arabic. */ return "I"; #else return ""; #endif } /* Other system dependent strings are not valid. */ return NULL; } /* Initialize the codeset dependent parts of an opened message catalog. Return the header entry. */ const char * internal_function _nl_init_domain_conv (struct loaded_l10nfile *domain_file, struct loaded_domain *domain, struct binding *domainbinding) { /* Find out about the character set the file is encoded with. This can be found (in textual form) in the entry "". If this entry does not exist or if this does not contain the `charset=' information, we will assume the charset matches the one the current locale and we don't have to perform any conversion. */ char *nullentry; size_t nullentrylen; /* Preinitialize fields, to avoid recursion during _nl_find_msg. */ domain->codeset_cntr = (domainbinding != NULL ? domainbinding->codeset_cntr : 0); #ifdef _LIBC domain->conv = (__gconv_t) -1; #else # if HAVE_ICONV domain->conv = (iconv_t) -1; # endif #endif domain->conv_tab = NULL; /* Get the header entry. */ nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen); if (nullentry != NULL) { #if defined _LIBC || HAVE_ICONV const char *charsetstr; charsetstr = strstr (nullentry, "charset="); if (charsetstr != NULL) { size_t len; char *charset; const char *outcharset; charsetstr += strlen ("charset="); len = strcspn (charsetstr, " \t\n"); charset = (char *) alloca (len + 1); # if defined _LIBC || HAVE_MEMPCPY *((char *) mempcpy (charset, charsetstr, len)) = '\0'; # else memcpy (charset, charsetstr, len); charset[len] = '\0'; # endif /* The output charset should normally be determined by the locale. But sometimes the locale is not used or not correctly set up, so we provide a possibility for the user to override this. Moreover, the value specified through bind_textdomain_codeset overrides both. */ if (domainbinding != NULL && domainbinding->codeset != NULL) outcharset = domainbinding->codeset; else { outcharset = getenv ("OUTPUT_CHARSET"); if (outcharset == NULL || outcharset[0] == '\0') { # ifdef _LIBC outcharset = _NL_CURRENT (LC_CTYPE, CODESET); # else # if HAVE_ICONV extern const char *locale_charset (void); outcharset = locale_charset (); # endif # endif } } # ifdef _LIBC /* We always want to use transliteration. */ outcharset = norm_add_slashes (outcharset, "TRANSLIT"); charset = norm_add_slashes (charset, NULL); if (__gconv_open (outcharset, charset, &domain->conv, GCONV_AVOID_NOCONV) != __GCONV_OK) domain->conv = (__gconv_t) -1; # else # if HAVE_ICONV /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5, we want to use transliteration. */ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \ || _LIBICONV_VERSION >= 0x0105 if (strchr (outcharset, '/') == NULL) { char *tmp; len = strlen (outcharset); tmp = (char *) alloca (len + 10 + 1); memcpy (tmp, outcharset, len); memcpy (tmp + len, "//TRANSLIT", 10 + 1); outcharset = tmp; domain->conv = iconv_open (outcharset, charset); freea (outcharset); } else # endif domain->conv = iconv_open (outcharset, charset); # endif # endif freea (charset); } #endif /* _LIBC || HAVE_ICONV */ } return nullentry; } /* Frees the codeset dependent parts of an opened message catalog. */ void internal_function _nl_free_domain_conv (struct loaded_domain *domain) { if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1) free (domain->conv_tab); #ifdef _LIBC if (domain->conv != (__gconv_t) -1) __gconv_close (domain->conv); #else # if HAVE_ICONV if (domain->conv != (iconv_t) -1) iconv_close (domain->conv); # endif #endif } /* Load the message catalogs specified by FILENAME. If it is no valid message catalog do nothing. */ void internal_function _nl_load_domain (struct loaded_l10nfile *domain_file, struct binding *domainbinding) { int fd; size_t size; #ifdef _LIBC struct stat64 st; #else struct stat st; #endif struct mo_file_header *data = (struct mo_file_header *) -1; int use_mmap = 0; struct loaded_domain *domain; int revision; const char *nullentry; domain_file->decided = 1; domain_file->data = NULL; /* Note that it would be useless to store domainbinding in domain_file because domainbinding might be == NULL now but != NULL later (after a call to bind_textdomain_codeset). */ /* If the record does not represent a valid locale the FILENAME might be NULL. This can happen when according to the given specification the locale file name is different for XPG and CEN syntax. */ if (domain_file->filename == NULL) return; /* Try to open the addressed file. */ fd = open (domain_file->filename, O_RDONLY | O_BINARY); if (fd == -1) return; /* We must know about the size of the file. */ if ( #ifdef _LIBC __builtin_expect (fstat64 (fd, &st) != 0, 0) #else __builtin_expect (fstat (fd, &st) != 0, 0) #endif || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0) || __builtin_expect (size < sizeof (struct mo_file_header), 0)) { /* Something went wrong. */ close (fd); return; } #ifdef HAVE_MMAP /* Now we are ready to load the file. If mmap() is available we try this first. If not available or it failed we try to load it. */ data = (struct mo_file_header *) mmap (NULL, size, PROT_READ, MAP_PRIVATE, fd, 0); if (__builtin_expect (data != (struct mo_file_header *) -1, 1)) { /* mmap() call was successful. */ close (fd); use_mmap = 1; } #endif /* If the data is not yet available (i.e. mmap'ed) we try to load it manually. */ if (data == (struct mo_file_header *) -1) { size_t to_read; char *read_ptr; data = (struct mo_file_header *) malloc (size); if (data == NULL) return; to_read = size; read_ptr = (char *) data; do { long int nb = (long int) read (fd, read_ptr, to_read); if (nb <= 0) { #ifdef EINTR if (nb == -1 && errno == EINTR) continue; #endif close (fd); return; } read_ptr += nb; to_read -= nb; } while (to_read > 0); close (fd); } /* Using the magic number we can test whether it really is a message catalog file. */ if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED, 0)) { /* The magic number is wrong: not a message catalog file. */ #ifdef HAVE_MMAP if (use_mmap) munmap ((caddr_t) data, size); else #endif free (data); return; } domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); if (domain == NULL) return; domain_file->data = domain; domain->data = (char *) data; domain->use_mmap = use_mmap; domain->mmap_size = size; domain->must_swap = data->magic != _MAGIC; domain->malloced = NULL; /* Fill in the information about the available tables. */ revision = W (domain->must_swap, data->revision); /* We support only the major revisions 0 and 1. */ switch (revision >> 16) { case 0: case 1: domain->nstrings = W (domain->must_swap, data->nstrings); domain->orig_tab = (const struct string_desc *) ((char *) data + W (domain->must_swap, data->orig_tab_offset)); domain->trans_tab = (const struct string_desc *) ((char *) data + W (domain->must_swap, data->trans_tab_offset)); domain->hash_size = W (domain->must_swap, data->hash_tab_size); domain->hash_tab = (domain->hash_size > 2 ? (const nls_uint32 *) ((char *) data + W (domain->must_swap, data->hash_tab_offset)) : NULL); domain->must_swap_hash_tab = domain->must_swap; /* Now dispatch on the minor revision. */ switch (revision & 0xffff) { case 0: domain->n_sysdep_strings = 0; domain->orig_sysdep_tab = NULL; domain->trans_sysdep_tab = NULL; break; case 1: default: { nls_uint32 n_sysdep_strings; if (domain->hash_tab == NULL) /* This is invalid. These minor revisions need a hash table. */ goto invalid; n_sysdep_strings = W (domain->must_swap, data->n_sysdep_strings); if (n_sysdep_strings > 0) { nls_uint32 n_sysdep_segments; const struct sysdep_segment *sysdep_segments; const char **sysdep_segment_values; const nls_uint32 *orig_sysdep_tab; const nls_uint32 *trans_sysdep_tab; nls_uint32 n_inmem_sysdep_strings; size_t memneed; char *mem; struct sysdep_string_desc *inmem_orig_sysdep_tab; struct sysdep_string_desc *inmem_trans_sysdep_tab; nls_uint32 *inmem_hash_tab; unsigned int i, j; /* Get the values of the system dependent segments. */ n_sysdep_segments = W (domain->must_swap, data->n_sysdep_segments); sysdep_segments = (const struct sysdep_segment *) ((char *) data + W (domain->must_swap, data->sysdep_segments_offset)); sysdep_segment_values = alloca (n_sysdep_segments * sizeof (const char *)); for (i = 0; i < n_sysdep_segments; i++) { const char *name = (char *) data + W (domain->must_swap, sysdep_segments[i].offset); nls_uint32 namelen = W (domain->must_swap, sysdep_segments[i].length); if (!(namelen > 0 && name[namelen - 1] == '\0')) { freea (sysdep_segment_values); goto invalid; } sysdep_segment_values[i] = get_sysdep_segment_value (name); } orig_sysdep_tab = (const nls_uint32 *) ((char *) data + W (domain->must_swap, data->orig_sysdep_tab_offset)); trans_sysdep_tab = (const nls_uint32 *) ((char *) data + W (domain->must_swap, data->trans_sysdep_tab_offset)); /* Compute the amount of additional memory needed for the system dependent strings and the augmented hash table. At the same time, also drop string pairs which refer to an undefined system dependent segment. */ n_inmem_sysdep_strings = 0; memneed = domain->hash_size * sizeof (nls_uint32); for (i = 0; i < n_sysdep_strings; i++) { int valid = 1; size_t needs[2]; for (j = 0; j < 2; j++) { const struct sysdep_string *sysdep_string = (const struct sysdep_string *) ((char *) data + W (domain->must_swap, j == 0 ? orig_sysdep_tab[i] : trans_sysdep_tab[i])); size_t need = 0; const struct segment_pair *p = sysdep_string->segments; if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END) for (p = sysdep_string->segments;; p++) { nls_uint32 sysdepref; need += W (domain->must_swap, p->segsize); sysdepref = W (domain->must_swap, p->sysdepref); if (sysdepref == SEGMENTS_END) break; if (sysdepref >= n_sysdep_segments) { /* Invalid. */ freea (sysdep_segment_values); goto invalid; } if (sysdep_segment_values[sysdepref] == NULL) { /* This particular string pair is invalid. */ valid = 0; break; } need += strlen (sysdep_segment_values[sysdepref]); } needs[j] = need; if (!valid) break; } if (valid) { n_inmem_sysdep_strings++; memneed += needs[0] + needs[1]; } } memneed += 2 * n_inmem_sysdep_strings * sizeof (struct sysdep_string_desc); if (n_inmem_sysdep_strings > 0) { unsigned int k; /* Allocate additional memory. */ mem = (char *) malloc (memneed); if (mem == NULL) goto invalid; domain->malloced = mem; inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem; mem += n_inmem_sysdep_strings * sizeof (struct sysdep_string_desc); inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem; mem += n_inmem_sysdep_strings * sizeof (struct sysdep_string_desc); inmem_hash_tab = (nls_uint32 *) mem; mem += domain->hash_size * sizeof (nls_uint32); /* Compute the system dependent strings. */ k = 0; for (i = 0; i < n_sysdep_strings; i++) { int valid = 1; for (j = 0; j < 2; j++) { const struct sysdep_string *sysdep_string = (const struct sysdep_string *) ((char *) data + W (domain->must_swap, j == 0 ? orig_sysdep_tab[i] : trans_sysdep_tab[i])); const struct segment_pair *p = sysdep_string->segments; if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END) for (p = sysdep_string->segments;; p++) { nls_uint32 sysdepref; sysdepref = W (domain->must_swap, p->sysdepref); if (sysdepref == SEGMENTS_END) break; if (sysdep_segment_values[sysdepref] == NULL) { /* This particular string pair is invalid. */ valid = 0; break; } } if (!valid) break; } if (valid) { for (j = 0; j < 2; j++) { const struct sysdep_string *sysdep_string = (const struct sysdep_string *) ((char *) data + W (domain->must_swap, j == 0 ? orig_sysdep_tab[i] : trans_sysdep_tab[i])); const char *static_segments = (char *) data + W (domain->must_swap, sysdep_string->offset); const struct segment_pair *p = sysdep_string->segments; /* Concatenate the segments, and fill inmem_orig_sysdep_tab[k] (for j == 0) and inmem_trans_sysdep_tab[k] (for j == 1). */ struct sysdep_string_desc *inmem_tab_entry = (j == 0 ? inmem_orig_sysdep_tab : inmem_trans_sysdep_tab) + k; if (W (domain->must_swap, p->sysdepref) == SEGMENTS_END) { /* Only one static segment. */ inmem_tab_entry->length = W (domain->must_swap, p->segsize); inmem_tab_entry->pointer = static_segments; } else { inmem_tab_entry->pointer = mem; for (p = sysdep_string->segments;; p++) { nls_uint32 segsize = W (domain->must_swap, p->segsize); nls_uint32 sysdepref = W (domain->must_swap, p->sysdepref); size_t n; if (segsize > 0) { memcpy (mem, static_segments, segsize); mem += segsize; static_segments += segsize; } if (sysdepref == SEGMENTS_END) break; n = strlen (sysdep_segment_values[sysdepref]); memcpy (mem, sysdep_segment_values[sysdepref], n); mem += n; } inmem_tab_entry->length = mem - inmem_tab_entry->pointer; } } k++; } } if (k != n_inmem_sysdep_strings) abort (); /* Compute the augmented hash table. */ for (i = 0; i < domain->hash_size; i++) inmem_hash_tab[i] = W (domain->must_swap_hash_tab, domain->hash_tab[i]); for (i = 0; i < n_inmem_sysdep_strings; i++) { const char *msgid = inmem_orig_sysdep_tab[i].pointer; nls_uint32 hash_val = hash_string (msgid); nls_uint32 idx = hash_val % domain->hash_size; nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); for (;;) { if (inmem_hash_tab[idx] == 0) { /* Hash table entry is empty. Use it. */ inmem_hash_tab[idx] = 1 + domain->nstrings + i; break; } if (idx >= domain->hash_size - incr) idx -= domain->hash_size - incr; else idx += incr; } } domain->n_sysdep_strings = n_inmem_sysdep_strings; domain->orig_sysdep_tab = inmem_orig_sysdep_tab; domain->trans_sysdep_tab = inmem_trans_sysdep_tab; domain->hash_tab = inmem_hash_tab; domain->must_swap_hash_tab = 0; } else { domain->n_sysdep_strings = 0; domain->orig_sysdep_tab = NULL; domain->trans_sysdep_tab = NULL; } freea (sysdep_segment_values); } else { domain->n_sysdep_strings = 0; domain->orig_sysdep_tab = NULL; domain->trans_sysdep_tab = NULL; } } break; } break; default: /* This is an invalid revision. */ invalid: /* This is an invalid .mo file. */ if (domain->malloced) free (domain->malloced); #ifdef HAVE_MMAP if (use_mmap) munmap ((caddr_t) data, size); else #endif free (data); free (domain); domain_file->data = NULL; return; } /* Now initialize the character set converter from the character set the file is encoded with (found in the header entry) to the domain's specified character set or the locale's character set. */ nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding); /* Also look for a plural specification. */ EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals); } #ifdef _LIBC void internal_function _nl_unload_domain (struct loaded_domain *domain) { if (domain->plural != &__gettext_germanic_plural) __gettext_free_exp (domain->plural); _nl_free_domain_conv (domain); if (domain->malloced) free (domain->malloced); # ifdef _POSIX_MAPPED_FILES if (domain->use_mmap) munmap ((caddr_t) domain->data, domain->mmap_size); else # endif /* _POSIX_MAPPED_FILES */ free ((void *) domain->data); free (domain); } #endif realtimebattle-1.0.8/intl/localealias.c0000644000175000017500000002334010170545357016244 0ustar moimoi/* Handle aliases for locale names. Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ /* Tell glibc's to provide a prototype for mempcpy(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H # include #endif #include #include #if defined _LIBC || defined HAVE___FSETLOCKING # include #endif #include #ifdef __GNUC__ # undef alloca # define alloca __builtin_alloca # define HAVE_ALLOCA 1 #else # ifdef _MSC_VER # include # define alloca _alloca # else # if defined HAVE_ALLOCA_H || defined _LIBC # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca char *alloca (); # endif # endif # endif # endif #endif #include #include #include "gettextP.h" #if ENABLE_RELOCATABLE # include "relocatable.h" #else # define relocate(pathname) (pathname) #endif /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ANSI C functions. This is required by the standard because some ANSI C functions will require linking with this object file and the name space must not be polluted. */ # define strcasecmp __strcasecmp # ifndef mempcpy # define mempcpy __mempcpy # endif # define HAVE_MEMPCPY 1 # define HAVE___FSETLOCKING 1 /* We need locking here since we can be called from different places. */ # include __libc_lock_define_initialized (static, lock); #endif #ifndef internal_function # define internal_function #endif /* Some optimizations for glibc. */ #ifdef _LIBC # define FEOF(fp) feof_unlocked (fp) # define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp) #else # define FEOF(fp) feof (fp) # define FGETS(buf, n, fp) fgets (buf, n, fp) #endif /* For those losing systems which don't have `alloca' we have to add some additional code emulating it. */ #ifdef HAVE_ALLOCA # define freea(p) /* nothing */ #else # define alloca(n) malloc (n) # define freea(p) free (p) #endif #if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED # undef fgets # define fgets(buf, len, s) fgets_unlocked (buf, len, s) #endif #if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED # undef feof # define feof(s) feof_unlocked (s) #endif struct alias_map { const char *alias; const char *value; }; #ifndef _LIBC # define libc_freeres_ptr(decl) decl #endif libc_freeres_ptr (static char *string_space); static size_t string_space_act; static size_t string_space_max; libc_freeres_ptr (static struct alias_map *map); static size_t nmap; static size_t maxmap; /* Prototypes for local functions. */ static size_t read_alias_file (const char *fname, int fname_len) internal_function; static int extend_alias_table (void); static int alias_compare (const struct alias_map *map1, const struct alias_map *map2); const char * _nl_expand_alias (const char *name) { static const char *locale_alias_path; struct alias_map *retval; const char *result = NULL; size_t added; #ifdef _LIBC __libc_lock_lock (lock); #endif if (locale_alias_path == NULL) locale_alias_path = LOCALE_ALIAS_PATH; do { struct alias_map item; item.alias = name; if (nmap > 0) retval = (struct alias_map *) bsearch (&item, map, nmap, sizeof (struct alias_map), (int (*) (const void *, const void *) ) alias_compare); else retval = NULL; /* We really found an alias. Return the value. */ if (retval != NULL) { result = retval->value; break; } /* Perhaps we can find another alias file. */ added = 0; while (added == 0 && locale_alias_path[0] != '\0') { const char *start; while (locale_alias_path[0] == PATH_SEPARATOR) ++locale_alias_path; start = locale_alias_path; while (locale_alias_path[0] != '\0' && locale_alias_path[0] != PATH_SEPARATOR) ++locale_alias_path; if (start < locale_alias_path) added = read_alias_file (start, locale_alias_path - start); } } while (added != 0); #ifdef _LIBC __libc_lock_unlock (lock); #endif return result; } static size_t internal_function read_alias_file (const char *fname, int fname_len) { FILE *fp; char *full_fname; size_t added; static const char aliasfile[] = "/locale.alias"; full_fname = (char *) alloca (fname_len + sizeof aliasfile); #ifdef HAVE_MEMPCPY mempcpy (mempcpy (full_fname, fname, fname_len), aliasfile, sizeof aliasfile); #else memcpy (full_fname, fname, fname_len); memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); #endif fp = fopen (relocate (full_fname), "r"); freea (full_fname); if (fp == NULL) return 0; #ifdef HAVE___FSETLOCKING /* No threads present. */ __fsetlocking (fp, FSETLOCKING_BYCALLER); #endif added = 0; while (!FEOF (fp)) { /* It is a reasonable approach to use a fix buffer here because a) we are only interested in the first two fields b) these fields must be usable as file names and so must not be that long We avoid a multi-kilobyte buffer here since this would use up stack space which we might not have if the program ran out of memory. */ char buf[400]; char *alias; char *value; char *cp; if (FGETS (buf, sizeof buf, fp) == NULL) /* EOF reached. */ break; cp = buf; /* Ignore leading white space. */ while (isspace ((unsigned char) cp[0])) ++cp; /* A leading '#' signals a comment line. */ if (cp[0] != '\0' && cp[0] != '#') { alias = cp++; while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) ++cp; /* Terminate alias name. */ if (cp[0] != '\0') *cp++ = '\0'; /* Now look for the beginning of the value. */ while (isspace ((unsigned char) cp[0])) ++cp; if (cp[0] != '\0') { size_t alias_len; size_t value_len; value = cp++; while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) ++cp; /* Terminate value. */ if (cp[0] == '\n') { /* This has to be done to make the following test for the end of line possible. We are looking for the terminating '\n' which do not overwrite here. */ *cp++ = '\0'; *cp = '\n'; } else if (cp[0] != '\0') *cp++ = '\0'; if (nmap >= maxmap) if (__builtin_expect (extend_alias_table (), 0)) return added; alias_len = strlen (alias) + 1; value_len = strlen (value) + 1; if (string_space_act + alias_len + value_len > string_space_max) { /* Increase size of memory pool. */ size_t new_size = (string_space_max + (alias_len + value_len > 1024 ? alias_len + value_len : 1024)); char *new_pool = (char *) realloc (string_space, new_size); if (new_pool == NULL) return added; if (__builtin_expect (string_space != new_pool, 0)) { size_t i; for (i = 0; i < nmap; i++) { map[i].alias += new_pool - string_space; map[i].value += new_pool - string_space; } } string_space = new_pool; string_space_max = new_size; } map[nmap].alias = memcpy (&string_space[string_space_act], alias, alias_len); string_space_act += alias_len; map[nmap].value = memcpy (&string_space[string_space_act], value, value_len); string_space_act += value_len; ++nmap; ++added; } } /* Possibly not the whole line fits into the buffer. Ignore the rest of the line. */ while (strchr (buf, '\n') == NULL) if (FGETS (buf, sizeof buf, fp) == NULL) /* Make sure the inner loop will be left. The outer loop will exit at the `feof' test. */ break; } /* Should we test for ferror()? I think we have to silently ignore errors. --drepper */ fclose (fp); if (added > 0) qsort (map, nmap, sizeof (struct alias_map), (int (*) (const void *, const void *)) alias_compare); return added; } static int extend_alias_table () { size_t new_size; struct alias_map *new_map; new_size = maxmap == 0 ? 100 : 2 * maxmap; new_map = (struct alias_map *) realloc (map, (new_size * sizeof (struct alias_map))); if (new_map == NULL) /* Simply don't extend: we don't have any more core. */ return -1; map = new_map; maxmap = new_size; return 0; } static int alias_compare (const struct alias_map *map1, const struct alias_map *map2) { #if defined _LIBC || defined HAVE_STRCASECMP return strcasecmp (map1->alias, map2->alias); #else const unsigned char *p1 = (const unsigned char *) map1->alias; const unsigned char *p2 = (const unsigned char *) map2->alias; unsigned char c1, c2; if (p1 == p2) return 0; do { /* I know this seems to be odd but the tolower() function in some systems libc cannot handle nonalpha characters. */ c1 = isupper (*p1) ? tolower (*p1) : *p1; c2 = isupper (*p2) ? tolower (*p2) : *p2; if (c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); return c1 - c2; #endif } realtimebattle-1.0.8/intl/textdomain.c0000644000175000017500000001066010170545357016150 0ustar moimoi/* Implementation of the textdomain(3) function. Copyright (C) 1995-1998, 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 Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #ifdef _LIBC # include #else # include "libgnuintl.h" #endif #include "gettextP.h" #ifdef _LIBC /* We have to handle multi-threaded applications. */ # include #else /* Provide dummy implementation if this is outside glibc. */ # define __libc_rwlock_define(CLASS, NAME) # define __libc_rwlock_wrlock(NAME) # define __libc_rwlock_unlock(NAME) #endif /* The internal variables in the standalone libintl.a must have different names than the internal variables in GNU libc, otherwise programs using libintl.a cannot be linked statically. */ #if !defined _LIBC # define _nl_default_default_domain libintl_nl_default_default_domain # define _nl_current_default_domain libintl_nl_current_default_domain #endif /* @@ end of prolog @@ */ /* Name of the default text domain. */ extern const char _nl_default_default_domain[] attribute_hidden; /* Default text domain in which entries for gettext(3) are to be found. */ extern const char *_nl_current_default_domain attribute_hidden; /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define TEXTDOMAIN __textdomain # ifndef strdup # define strdup(str) __strdup (str) # endif #else # define TEXTDOMAIN libintl_textdomain #endif /* Lock variable to protect the global data in the gettext implementation. */ __libc_rwlock_define (extern, _nl_state_lock attribute_hidden) /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ char * TEXTDOMAIN (const char *domainname) { char *new_domain; char *old_domain; /* A NULL pointer requests the current setting. */ if (domainname == NULL) return (char *) _nl_current_default_domain; __libc_rwlock_wrlock (_nl_state_lock); old_domain = (char *) _nl_current_default_domain; /* If domain name is the null string set to default domain "messages". */ if (domainname[0] == '\0' || strcmp (domainname, _nl_default_default_domain) == 0) { _nl_current_default_domain = _nl_default_default_domain; new_domain = (char *) _nl_current_default_domain; } else if (strcmp (domainname, old_domain) == 0) /* This can happen and people will use it to signal that some environment variable changed. */ new_domain = old_domain; else { /* If the following malloc fails `_nl_current_default_domain' will be NULL. This value will be returned and so signals we are out of core. */ #if defined _LIBC || defined HAVE_STRDUP new_domain = strdup (domainname); #else size_t len = strlen (domainname) + 1; new_domain = (char *) malloc (len); if (new_domain != NULL) memcpy (new_domain, domainname, len); #endif if (new_domain != NULL) _nl_current_default_domain = new_domain; } /* We use this possibility to signal a change of the loaded catalogs since this is most likely the case and there is no other easy we to do it. Do it only when the call was successful. */ if (new_domain != NULL) { ++_nl_msg_cat_cntr; if (old_domain != new_domain && old_domain != _nl_default_default_domain) free (old_domain); } __libc_rwlock_unlock (_nl_state_lock); return new_domain; } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__textdomain, textdomain); #endif realtimebattle-1.0.8/intl/l10nflist.c0000644000175000017500000002733010170545357015612 0ustar moimoi/* Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. Contributed by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ /* Tell glibc's to provide a prototype for stpcpy(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H # include #endif #include #if defined _LIBC || defined HAVE_ARGZ_H # include #endif #include #include #include #include "loadinfo.h" /* On some strange systems still no definition of NULL is found. Sigh! */ #ifndef NULL # if defined __STDC__ && __STDC__ # define NULL ((void *) 0) # else # define NULL 0 # endif #endif /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ANSI C functions. This is required by the standard because some ANSI C functions will require linking with this object file and the name space must not be polluted. */ # ifndef stpcpy # define stpcpy(dest, src) __stpcpy(dest, src) # endif #else # ifndef HAVE_STPCPY static char *stpcpy (char *dest, const char *src); # endif #endif /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, it may be concatenated to a directory pathname. */ #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ && (P)[1] == ':') # define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) #else /* Unix */ # define ISSLASH(C) ((C) == '/') # define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) #endif /* Define function which are usually not available. */ #if !defined _LIBC && !defined HAVE___ARGZ_COUNT /* Returns the number of strings in ARGZ. */ static size_t argz_count__ (const char *argz, size_t len) { size_t count = 0; while (len > 0) { size_t part_len = strlen (argz); argz += part_len + 1; len -= part_len + 1; count++; } return count; } # undef __argz_count # define __argz_count(argz, len) argz_count__ (argz, len) #else # ifdef _LIBC # define __argz_count(argz, len) INTUSE(__argz_count) (argz, len) # endif #endif /* !_LIBC && !HAVE___ARGZ_COUNT */ #if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's except the last into the character SEP. */ static void argz_stringify__ (char *argz, size_t len, int sep) { while (len > 0) { size_t part_len = strlen (argz); argz += part_len; len -= part_len + 1; if (len > 0) *argz++ = sep; } } # undef __argz_stringify # define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) #else # ifdef _LIBC # define __argz_stringify(argz, len, sep) \ INTUSE(__argz_stringify) (argz, len, sep) # endif #endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ #if !defined _LIBC && !defined HAVE___ARGZ_NEXT static char * argz_next__ (char *argz, size_t argz_len, const char *entry) { if (entry) { if (entry < argz + argz_len) entry = strchr (entry, '\0') + 1; return entry >= argz + argz_len ? NULL : (char *) entry; } else if (argz_len > 0) return argz; else return 0; } # undef __argz_next # define __argz_next(argz, len, entry) argz_next__ (argz, len, entry) #endif /* !_LIBC && !HAVE___ARGZ_NEXT */ /* Return number of bits set in X. */ static inline int pop (int x) { /* We assume that no more than 16 bits are used. */ x = ((x & ~0x5555) >> 1) + (x & 0x5555); x = ((x & ~0x3333) >> 2) + (x & 0x3333); x = ((x >> 4) + x) & 0x0f0f; x = ((x >> 8) + x) & 0xff; return x; } struct loaded_l10nfile * _nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, const char *dirlist, size_t dirlist_len, int mask, const char *language, const char *territory, const char *codeset, const char *normalized_codeset, const char *modifier, const char *special, const char *sponsor, const char *revision, const char *filename, int do_allocate) { char *abs_filename; struct loaded_l10nfile **lastp; struct loaded_l10nfile *retval; char *cp; size_t dirlist_count; size_t entries; int cnt; /* If LANGUAGE contains an absolute directory specification, we ignore DIRLIST. */ if (IS_ABSOLUTE_PATH (language)) dirlist_len = 0; /* Allocate room for the full file name. */ abs_filename = (char *) malloc (dirlist_len + strlen (language) + ((mask & TERRITORY) != 0 ? strlen (territory) + 1 : 0) + ((mask & XPG_CODESET) != 0 ? strlen (codeset) + 1 : 0) + ((mask & XPG_NORM_CODESET) != 0 ? strlen (normalized_codeset) + 1 : 0) + (((mask & XPG_MODIFIER) != 0 || (mask & CEN_AUDIENCE) != 0) ? strlen (modifier) + 1 : 0) + ((mask & CEN_SPECIAL) != 0 ? strlen (special) + 1 : 0) + (((mask & CEN_SPONSOR) != 0 || (mask & CEN_REVISION) != 0) ? (1 + ((mask & CEN_SPONSOR) != 0 ? strlen (sponsor) : 0) + ((mask & CEN_REVISION) != 0 ? strlen (revision) + 1 : 0)) : 0) + 1 + strlen (filename) + 1); if (abs_filename == NULL) return NULL; /* Construct file name. */ cp = abs_filename; if (dirlist_len > 0) { memcpy (cp, dirlist, dirlist_len); __argz_stringify (cp, dirlist_len, PATH_SEPARATOR); cp += dirlist_len; cp[-1] = '/'; } cp = stpcpy (cp, language); if ((mask & TERRITORY) != 0) { *cp++ = '_'; cp = stpcpy (cp, territory); } if ((mask & XPG_CODESET) != 0) { *cp++ = '.'; cp = stpcpy (cp, codeset); } if ((mask & XPG_NORM_CODESET) != 0) { *cp++ = '.'; cp = stpcpy (cp, normalized_codeset); } if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0) { /* This component can be part of both syntaces but has different leading characters. For CEN we use `+', else `@'. */ *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@'; cp = stpcpy (cp, modifier); } if ((mask & CEN_SPECIAL) != 0) { *cp++ = '+'; cp = stpcpy (cp, special); } if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0) { *cp++ = ','; if ((mask & CEN_SPONSOR) != 0) cp = stpcpy (cp, sponsor); if ((mask & CEN_REVISION) != 0) { *cp++ = '_'; cp = stpcpy (cp, revision); } } *cp++ = '/'; stpcpy (cp, filename); /* Look in list of already loaded domains whether it is already available. */ lastp = l10nfile_list; for (retval = *l10nfile_list; retval != NULL; retval = retval->next) if (retval->filename != NULL) { int compare = strcmp (retval->filename, abs_filename); if (compare == 0) /* We found it! */ break; if (compare < 0) { /* It's not in the list. */ retval = NULL; break; } lastp = &retval->next; } if (retval != NULL || do_allocate == 0) { free (abs_filename); return retval; } dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1); /* Allocate a new loaded_l10nfile. */ retval = (struct loaded_l10nfile *) malloc (sizeof (*retval) + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0)) * sizeof (struct loaded_l10nfile *))); if (retval == NULL) return NULL; retval->filename = abs_filename; /* We set retval->data to NULL here; it is filled in later. Setting retval->decided to 1 here means that retval does not correspond to a real file (dirlist_count > 1) or is not worth looking up (if an unnormalized codeset was specified). */ retval->decided = (dirlist_count > 1 || ((mask & XPG_CODESET) != 0 && (mask & XPG_NORM_CODESET) != 0)); retval->data = NULL; retval->next = *lastp; *lastp = retval; entries = 0; /* Recurse to fill the inheritance list of RETVAL. If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL entry does not correspond to a real file; retval->filename contains colons. In this case we loop across all elements of DIRLIST and across all bit patterns dominated by MASK. If the DIRLIST is a single directory or entirely redundant (i.e. DIRLIST_COUNT == 1), we loop across all bit patterns dominated by MASK, excluding MASK itself. In either case, we loop down from MASK to 0. This has the effect that the extra bits in the locale name are dropped in this order: first the modifier, then the territory, then the codeset, then the normalized_codeset. */ for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt) if ((cnt & ~mask) == 0 && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) { if (dirlist_count > 1) { /* Iterate over all elements of the DIRLIST. */ char *dir = NULL; while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) != NULL) retval->successor[entries++] = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt, language, territory, codeset, normalized_codeset, modifier, special, sponsor, revision, filename, 1); } else retval->successor[entries++] = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, cnt, language, territory, codeset, normalized_codeset, modifier, special, sponsor, revision, filename, 1); } retval->successor[entries] = NULL; return retval; } /* Normalize codeset name. There is no standard for the codeset names. Normalization allows the user to use any of the common names. The return value is dynamically allocated and has to be freed by the caller. */ const char * _nl_normalize_codeset (const char *codeset, size_t name_len) { int len = 0; int only_digit = 1; char *retval; char *wp; size_t cnt; for (cnt = 0; cnt < name_len; ++cnt) if (isalnum ((unsigned char) codeset[cnt])) { ++len; if (isalpha ((unsigned char) codeset[cnt])) only_digit = 0; } retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1); if (retval != NULL) { if (only_digit) wp = stpcpy (retval, "iso"); else wp = retval; for (cnt = 0; cnt < name_len; ++cnt) if (isalpha ((unsigned char) codeset[cnt])) *wp++ = tolower ((unsigned char) codeset[cnt]); else if (isdigit ((unsigned char) codeset[cnt])) *wp++ = codeset[cnt]; *wp = '\0'; } return (const char *) retval; } /* @@ begin of epilog @@ */ /* We don't want libintl.a to depend on any other library. So we avoid the non-standard function stpcpy. In GNU C Library this function is available, though. Also allow the symbol HAVE_STPCPY to be defined. */ #if !_LIBC && !HAVE_STPCPY static char * stpcpy (char *dest, const char *src) { while ((*dest++ = *src++) != '\0') /* Do nothing. */ ; return dest - 1; } #endif realtimebattle-1.0.8/intl/explodename.c0000644000175000017500000001064310170545357016276 0ustar moimoi/* Copyright (C) 1995-1998, 2000-2001, 2003 Free Software Foundation, Inc. Contributed by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "loadinfo.h" /* On some strange systems still no definition of NULL is found. Sigh! */ #ifndef NULL # if defined __STDC__ && __STDC__ # define NULL ((void *) 0) # else # define NULL 0 # endif #endif /* @@ end of prolog @@ */ char * _nl_find_language (const char *name) { while (name[0] != '\0' && name[0] != '_' && name[0] != '@' && name[0] != '+' && name[0] != ',') ++name; return (char *) name; } int _nl_explode_name (char *name, const char **language, const char **modifier, const char **territory, const char **codeset, const char **normalized_codeset, const char **special, const char **sponsor, const char **revision) { enum { undecided, xpg, cen } syntax; char *cp; int mask; *modifier = NULL; *territory = NULL; *codeset = NULL; *normalized_codeset = NULL; *special = NULL; *sponsor = NULL; *revision = NULL; /* Now we determine the single parts of the locale name. First look for the language. Termination symbols are `_' and `@' if we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ mask = 0; syntax = undecided; *language = cp = name; cp = _nl_find_language (*language); if (*language == cp) /* This does not make sense: language has to be specified. Use this entry as it is without exploding. Perhaps it is an alias. */ cp = strchr (*language, '\0'); else if (cp[0] == '_') { /* Next is the territory. */ cp[0] = '\0'; *territory = ++cp; while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@' && cp[0] != '+' && cp[0] != ',' && cp[0] != '_') ++cp; mask |= TERRITORY; if (cp[0] == '.') { /* Next is the codeset. */ syntax = xpg; cp[0] = '\0'; *codeset = ++cp; while (cp[0] != '\0' && cp[0] != '@') ++cp; mask |= XPG_CODESET; if (*codeset != cp && (*codeset)[0] != '\0') { *normalized_codeset = _nl_normalize_codeset (*codeset, cp - *codeset); if (strcmp (*codeset, *normalized_codeset) == 0) free ((char *) *normalized_codeset); else mask |= XPG_NORM_CODESET; } } } if (cp[0] == '@' || (syntax != xpg && cp[0] == '+')) { /* Next is the modifier. */ syntax = cp[0] == '@' ? xpg : cen; cp[0] = '\0'; *modifier = ++cp; while (syntax == cen && cp[0] != '\0' && cp[0] != '+' && cp[0] != ',' && cp[0] != '_') ++cp; mask |= XPG_MODIFIER | CEN_AUDIENCE; } if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_')) { syntax = cen; if (cp[0] == '+') { /* Next is special application (CEN syntax). */ cp[0] = '\0'; *special = ++cp; while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_') ++cp; mask |= CEN_SPECIAL; } if (cp[0] == ',') { /* Next is sponsor (CEN syntax). */ cp[0] = '\0'; *sponsor = ++cp; while (cp[0] != '\0' && cp[0] != '_') ++cp; mask |= CEN_SPONSOR; } if (cp[0] == '_') { /* Next is revision (CEN syntax). */ cp[0] = '\0'; *revision = ++cp; mask |= CEN_REVISION; } } /* For CEN syntax values it might be important to have the separator character in the file name, not for XPG syntax. */ if (syntax == xpg) { if (*territory != NULL && (*territory)[0] == '\0') mask &= ~TERRITORY; if (*codeset != NULL && (*codeset)[0] == '\0') mask &= ~XPG_CODESET; if (*modifier != NULL && (*modifier)[0] == '\0') mask &= ~XPG_MODIFIER; } return mask; } realtimebattle-1.0.8/intl/dcigettext.c0000644000175000017500000010125310170545360016131 0ustar moimoi/* Implementation of the internal dcigettext function. Copyright (C) 1995-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 Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ /* Tell glibc's to provide a prototype for mempcpy(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H # include #endif #include #ifdef __GNUC__ # define alloca __builtin_alloca # define HAVE_ALLOCA 1 #else # ifdef _MSC_VER # include # define alloca _alloca # else # if defined HAVE_ALLOCA_H || defined _LIBC # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca char *alloca (); # endif # endif # endif # endif #endif #include #ifndef errno extern int errno; #endif #ifndef __set_errno # define __set_errno(val) errno = (val) #endif #include #include #include #if defined HAVE_UNISTD_H || defined _LIBC # include #endif #include #ifdef _LIBC /* Guess whether integer division by zero raises signal SIGFPE. Set to 1 only if you know for sure. In case of doubt, set to 0. */ # if defined __alpha__ || defined __arm__ || defined __i386__ \ || defined __m68k__ || defined __s390__ # define INTDIV0_RAISES_SIGFPE 1 # else # define INTDIV0_RAISES_SIGFPE 0 # endif #endif #if !INTDIV0_RAISES_SIGFPE # include #endif #if defined HAVE_SYS_PARAM_H || defined _LIBC # include #endif #include "gettextP.h" #include "plural-exp.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif #include "hash-string.h" /* Thread safetyness. */ #ifdef _LIBC # include #else /* Provide dummy implementation if this is outside glibc. */ # define __libc_lock_define_initialized(CLASS, NAME) # define __libc_lock_lock(NAME) # define __libc_lock_unlock(NAME) # define __libc_rwlock_define_initialized(CLASS, NAME) # define __libc_rwlock_rdlock(NAME) # define __libc_rwlock_unlock(NAME) #endif /* Alignment of types. */ #if defined __GNUC__ && __GNUC__ >= 2 # define alignof(TYPE) __alignof__ (TYPE) #else # define alignof(TYPE) \ ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2) #endif /* The internal variables in the standalone libintl.a must have different names than the internal variables in GNU libc, otherwise programs using libintl.a cannot be linked statically. */ #if !defined _LIBC # define _nl_default_default_domain libintl_nl_default_default_domain # define _nl_current_default_domain libintl_nl_current_default_domain # define _nl_default_dirname libintl_nl_default_dirname # define _nl_domain_bindings libintl_nl_domain_bindings #endif /* Some compilers, like SunOS4 cc, don't have offsetof in . */ #ifndef offsetof # define offsetof(type,ident) ((size_t)&(((type*)0)->ident)) #endif /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ANSI C functions. This is required by the standard because some ANSI C functions will require linking with this object file and the name space must not be polluted. */ # define getcwd __getcwd # ifndef stpcpy # define stpcpy __stpcpy # endif # define tfind __tfind #else # if !defined HAVE_GETCWD char *getwd (); # define getcwd(buf, max) getwd (buf) # else # if VMS # define getcwd(buf, max) (getcwd) (buf, max, 0) # else char *getcwd (); # endif # endif # ifndef HAVE_STPCPY static char *stpcpy (char *dest, const char *src); # endif # ifndef HAVE_MEMPCPY static void *mempcpy (void *dest, const void *src, size_t n); # endif #endif /* Amount to increase buffer size by in each try. */ #define PATH_INCR 32 /* The following is from pathmax.h. */ /* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define PATH_MAX but might cause redefinition warnings when sys/param.h is later included (as on MORE/BSD 4.3). */ #if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__) # include #endif #ifndef _POSIX_PATH_MAX # define _POSIX_PATH_MAX 255 #endif #if !defined PATH_MAX && defined _PC_PATH_MAX # define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX)) #endif /* Don't include sys/param.h if it already has been. */ #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN # include #endif #if !defined PATH_MAX && defined MAXPATHLEN # define PATH_MAX MAXPATHLEN #endif #ifndef PATH_MAX # define PATH_MAX _POSIX_PATH_MAX #endif /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, it may be concatenated to a directory pathname. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ && (P)[1] == ':') # define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) # define IS_PATH_WITH_DIR(P) \ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) #else /* Unix */ # define ISSLASH(C) ((C) == '/') # define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) #endif /* This is the type used for the search tree where known translations are stored. */ struct known_translation_t { /* Domain in which to search. */ char *domainname; /* The category. */ int category; /* State of the catalog counter at the point the string was found. */ int counter; /* Catalog where the string was found. */ struct loaded_l10nfile *domain; /* And finally the translation. */ const char *translation; size_t translation_length; /* Pointer to the string in question. */ char msgid[ZERO]; }; /* Root of the search tree with known translations. We can use this only if the system provides the `tsearch' function family. */ #if defined HAVE_TSEARCH || defined _LIBC # include static void *root; # ifdef _LIBC # define tsearch __tsearch # endif /* Function to compare two entries in the table of known translations. */ static int transcmp (const void *p1, const void *p2) { const struct known_translation_t *s1; const struct known_translation_t *s2; int result; s1 = (const struct known_translation_t *) p1; s2 = (const struct known_translation_t *) p2; result = strcmp (s1->msgid, s2->msgid); if (result == 0) { result = strcmp (s1->domainname, s2->domainname); if (result == 0) /* We compare the category last (though this is the cheapest operation) since it is hopefully always the same (namely LC_MESSAGES). */ result = s1->category - s2->category; } return result; } #endif #ifndef INTVARDEF # define INTVARDEF(name) #endif #ifndef INTUSE # define INTUSE(name) name #endif /* Name of the default domain used for gettext(3) prior any call to textdomain(3). The default value for this is "messages". */ const char _nl_default_default_domain[] attribute_hidden = "messages"; /* Value used as the default domain for gettext(3). */ const char *_nl_current_default_domain attribute_hidden = _nl_default_default_domain; /* Contains the default location of the message catalogs. */ #if defined __EMX__ extern const char _nl_default_dirname[]; #else const char _nl_default_dirname[] = LOCALEDIR; INTVARDEF (_nl_default_dirname) #endif /* List with bindings of specific domains created by bindtextdomain() calls. */ struct binding *_nl_domain_bindings; /* Prototypes for local functions. */ static char *plural_lookup (struct loaded_l10nfile *domain, unsigned long int n, const char *translation, size_t translation_len) internal_function; static const char *guess_category_value (int category, const char *categoryname) internal_function; #ifdef _LIBC # include "../locale/localeinfo.h" # define category_to_name(category) _nl_category_names[category] #else static const char *category_to_name (int category) internal_function; #endif /* For those loosing systems which don't have `alloca' we have to add some additional code emulating it. */ #ifdef HAVE_ALLOCA /* Nothing has to be done. */ # define freea(p) /* nothing */ # define ADD_BLOCK(list, address) /* nothing */ # define FREE_BLOCKS(list) /* nothing */ #else struct block_list { void *address; struct block_list *next; }; # define ADD_BLOCK(list, addr) \ do { \ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ /* If we cannot get a free block we cannot add the new element to \ the list. */ \ if (newp != NULL) { \ newp->address = (addr); \ newp->next = (list); \ (list) = newp; \ } \ } while (0) # define FREE_BLOCKS(list) \ do { \ while (list != NULL) { \ struct block_list *old = list; \ list = list->next; \ free (old->address); \ free (old); \ } \ } while (0) # undef alloca # define alloca(size) (malloc (size)) # define freea(p) free (p) #endif /* have alloca */ #ifdef _LIBC /* List of blocks allocated for translations. */ typedef struct transmem_list { struct transmem_list *next; char data[ZERO]; } transmem_block_t; static struct transmem_list *transmem_list; #else typedef unsigned char transmem_block_t; #endif /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DCIGETTEXT __dcigettext #else # define DCIGETTEXT libintl_dcigettext #endif /* Lock variable to protect the global data in the gettext implementation. */ #ifdef _LIBC __libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden) #endif /* Checking whether the binaries runs SUID must be done and glibc provides easier methods therefore we make a difference here. */ #ifdef _LIBC # define ENABLE_SECURE __libc_enable_secure # define DETERMINE_SECURE #else # ifndef HAVE_GETUID # define getuid() 0 # endif # ifndef HAVE_GETGID # define getgid() 0 # endif # ifndef HAVE_GETEUID # define geteuid() getuid() # endif # ifndef HAVE_GETEGID # define getegid() getgid() # endif static int enable_secure; # define ENABLE_SECURE (enable_secure == 1) # define DETERMINE_SECURE \ if (enable_secure == 0) \ { \ if (getuid () != geteuid () || getgid () != getegid ()) \ enable_secure = 1; \ else \ enable_secure = -1; \ } #endif /* Get the function to evaluate the plural expression. */ #include "eval-plural.h" /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale and, if PLURAL is nonzero, search over string depending on the plural form determined by N. */ char * DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, int plural, unsigned long int n, int category) { #ifndef HAVE_ALLOCA struct block_list *block_list = NULL; #endif struct loaded_l10nfile *domain; struct binding *binding; const char *categoryname; const char *categoryvalue; char *dirname, *xdomainname; char *single_locale; char *retval; size_t retlen; int saved_errno; #if defined HAVE_TSEARCH || defined _LIBC struct known_translation_t *search; struct known_translation_t **foundp = NULL; size_t msgid_len; #endif size_t domainname_len; /* If no real MSGID is given return NULL. */ if (msgid1 == NULL) return NULL; #ifdef _LIBC if (category < 0 || category >= __LC_LAST || category == LC_ALL) /* Bogus. */ return (plural == 0 ? (char *) msgid1 /* Use the Germanic plural rule. */ : n == 1 ? (char *) msgid1 : (char *) msgid2); #endif __libc_rwlock_rdlock (_nl_state_lock); /* If DOMAINNAME is NULL, we are interested in the default domain. If CATEGORY is not LC_MESSAGES this might not make much sense but the definition left this undefined. */ if (domainname == NULL) domainname = _nl_current_default_domain; /* OS/2 specific: backward compatibility with older libintl versions */ #ifdef LC_MESSAGES_COMPAT if (category == LC_MESSAGES_COMPAT) category = LC_MESSAGES; #endif #if defined HAVE_TSEARCH || defined _LIBC msgid_len = strlen (msgid1) + 1; /* Try to find the translation among those which we found at some time. */ search = (struct known_translation_t *) alloca (offsetof (struct known_translation_t, msgid) + msgid_len); memcpy (search->msgid, msgid1, msgid_len); search->domainname = (char *) domainname; search->category = category; foundp = (struct known_translation_t **) tfind (search, &root, transcmp); freea (search); if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr) { /* Now deal with plural. */ if (plural) retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation, (*foundp)->translation_length); else retval = (char *) (*foundp)->translation; __libc_rwlock_unlock (_nl_state_lock); return retval; } #endif /* Preserve the `errno' value. */ saved_errno = errno; /* See whether this is a SUID binary or not. */ DETERMINE_SECURE; /* First find matching binding. */ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) { int compare = strcmp (domainname, binding->domainname); if (compare == 0) /* We found it! */ break; if (compare < 0) { /* It is not in the list. */ binding = NULL; break; } } if (binding == NULL) dirname = (char *) INTUSE(_nl_default_dirname); else if (IS_ABSOLUTE_PATH (binding->dirname)) dirname = binding->dirname; else { /* We have a relative path. Make it absolute now. */ size_t dirname_len = strlen (binding->dirname) + 1; size_t path_max; char *ret; path_max = (unsigned int) PATH_MAX; path_max += 2; /* The getcwd docs say to do this. */ for (;;) { dirname = (char *) alloca (path_max + dirname_len); ADD_BLOCK (block_list, dirname); __set_errno (0); ret = getcwd (dirname, path_max); if (ret != NULL || errno != ERANGE) break; path_max += path_max / 2; path_max += PATH_INCR; } if (ret == NULL) /* We cannot get the current working directory. Don't signal an error but simply return the default string. */ goto return_untranslated; stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname); } /* Now determine the symbolic name of CATEGORY and its value. */ categoryname = category_to_name (category); categoryvalue = guess_category_value (category, categoryname); domainname_len = strlen (domainname); xdomainname = (char *) alloca (strlen (categoryname) + domainname_len + 5); ADD_BLOCK (block_list, xdomainname); stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"), domainname, domainname_len), ".mo"); /* Creating working area. */ single_locale = (char *) alloca (strlen (categoryvalue) + 1); ADD_BLOCK (block_list, single_locale); /* Search for the given string. This is a loop because we perhaps got an ordered list of languages to consider for the translation. */ while (1) { /* Make CATEGORYVALUE point to the next element of the list. */ while (categoryvalue[0] != '\0' && categoryvalue[0] == ':') ++categoryvalue; if (categoryvalue[0] == '\0') { /* The whole contents of CATEGORYVALUE has been searched but no valid entry has been found. We solve this situation by implicitly appending a "C" entry, i.e. no translation will take place. */ single_locale[0] = 'C'; single_locale[1] = '\0'; } else { char *cp = single_locale; while (categoryvalue[0] != '\0' && categoryvalue[0] != ':') *cp++ = *categoryvalue++; *cp = '\0'; /* When this is a SUID binary we must not allow accessing files outside the dedicated directories. */ if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale)) /* Ingore this entry. */ continue; } /* If the current locale value is C (or POSIX) we don't load a domain. Return the MSGID. */ if (strcmp (single_locale, "C") == 0 || strcmp (single_locale, "POSIX") == 0) break; /* Find structure describing the message catalog matching the DOMAINNAME and CATEGORY. */ domain = _nl_find_domain (dirname, single_locale, xdomainname, binding); if (domain != NULL) { retval = _nl_find_msg (domain, binding, msgid1, &retlen); if (retval == NULL) { int cnt; for (cnt = 0; domain->successor[cnt] != NULL; ++cnt) { retval = _nl_find_msg (domain->successor[cnt], binding, msgid1, &retlen); if (retval != NULL) { domain = domain->successor[cnt]; break; } } } if (retval != NULL) { /* Found the translation of MSGID1 in domain DOMAIN: starting at RETVAL, RETLEN bytes. */ FREE_BLOCKS (block_list); #if defined HAVE_TSEARCH || defined _LIBC if (foundp == NULL) { /* Create a new entry and add it to the search tree. */ struct known_translation_t *newp; newp = (struct known_translation_t *) malloc (offsetof (struct known_translation_t, msgid) + msgid_len + domainname_len + 1); if (newp != NULL) { newp->domainname = mempcpy (newp->msgid, msgid1, msgid_len); memcpy (newp->domainname, domainname, domainname_len + 1); newp->category = category; newp->counter = _nl_msg_cat_cntr; newp->domain = domain; newp->translation = retval; newp->translation_length = retlen; /* Insert the entry in the search tree. */ foundp = (struct known_translation_t **) tsearch (newp, &root, transcmp); if (foundp == NULL || __builtin_expect (*foundp != newp, 0)) /* The insert failed. */ free (newp); } } else { /* We can update the existing entry. */ (*foundp)->counter = _nl_msg_cat_cntr; (*foundp)->domain = domain; (*foundp)->translation = retval; (*foundp)->translation_length = retlen; } #endif __set_errno (saved_errno); /* Now deal with plural. */ if (plural) retval = plural_lookup (domain, n, retval, retlen); __libc_rwlock_unlock (_nl_state_lock); return retval; } } } return_untranslated: /* Return the untranslated MSGID. */ FREE_BLOCKS (block_list); __libc_rwlock_unlock (_nl_state_lock); #ifndef _LIBC if (!ENABLE_SECURE) { extern void _nl_log_untranslated (const char *logfilename, const char *domainname, const char *msgid1, const char *msgid2, int plural); const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED"); if (logfilename != NULL && logfilename[0] != '\0') _nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural); } #endif __set_errno (saved_errno); return (plural == 0 ? (char *) msgid1 /* Use the Germanic plural rule. */ : n == 1 ? (char *) msgid1 : (char *) msgid2); } char * internal_function _nl_find_msg (struct loaded_l10nfile *domain_file, struct binding *domainbinding, const char *msgid, size_t *lengthp) { struct loaded_domain *domain; nls_uint32 nstrings; size_t act; char *result; size_t resultlen; if (domain_file->decided == 0) _nl_load_domain (domain_file, domainbinding); if (domain_file->data == NULL) return NULL; domain = (struct loaded_domain *) domain_file->data; nstrings = domain->nstrings; /* Locate the MSGID and its translation. */ if (domain->hash_tab != NULL) { /* Use the hashing table. */ nls_uint32 len = strlen (msgid); nls_uint32 hash_val = hash_string (msgid); nls_uint32 idx = hash_val % domain->hash_size; nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); while (1) { nls_uint32 nstr = W (domain->must_swap_hash_tab, domain->hash_tab[idx]); if (nstr == 0) /* Hash table entry is empty. */ return NULL; nstr--; /* Compare msgid with the original string at index nstr. We compare the lengths with >=, not ==, because plural entries are represented by strings with an embedded NUL. */ if (nstr < nstrings ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len && (strcmp (msgid, domain->data + W (domain->must_swap, domain->orig_tab[nstr].offset)) == 0) : domain->orig_sysdep_tab[nstr - nstrings].length > len && (strcmp (msgid, domain->orig_sysdep_tab[nstr - nstrings].pointer) == 0)) { act = nstr; goto found; } if (idx >= domain->hash_size - incr) idx -= domain->hash_size - incr; else idx += incr; } /* NOTREACHED */ } else { /* Try the default method: binary search in the sorted array of messages. */ size_t top, bottom; bottom = 0; top = nstrings; while (bottom < top) { int cmp_val; act = (bottom + top) / 2; cmp_val = strcmp (msgid, (domain->data + W (domain->must_swap, domain->orig_tab[act].offset))); if (cmp_val < 0) top = act; else if (cmp_val > 0) bottom = act + 1; else goto found; } /* No translation was found. */ return NULL; } found: /* The translation was found at index ACT. If we have to convert the string to use a different character set, this is the time. */ if (act < nstrings) { result = (char *) (domain->data + W (domain->must_swap, domain->trans_tab[act].offset)); resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1; } else { result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer; resultlen = domain->trans_sysdep_tab[act - nstrings].length; } #if defined _LIBC || HAVE_ICONV if (domain->codeset_cntr != (domainbinding != NULL ? domainbinding->codeset_cntr : 0)) { /* The domain's codeset has changed through bind_textdomain_codeset() since the message catalog was initialized or last accessed. We have to reinitialize the converter. */ _nl_free_domain_conv (domain); _nl_init_domain_conv (domain_file, domain, domainbinding); } if ( # ifdef _LIBC domain->conv != (__gconv_t) -1 # else # if HAVE_ICONV domain->conv != (iconv_t) -1 # endif # endif ) { /* We are supposed to do a conversion. First allocate an appropriate table with the same structure as the table of translations in the file, where we can put the pointers to the converted strings in. There is a slight complication with plural entries. They are represented by consecutive NUL terminated strings. We handle this case by converting RESULTLEN bytes, including NULs. */ if (domain->conv_tab == NULL && ((domain->conv_tab = (char **) calloc (nstrings + domain->n_sysdep_strings, sizeof (char *))) == NULL)) /* Mark that we didn't succeed allocating a table. */ domain->conv_tab = (char **) -1; if (__builtin_expect (domain->conv_tab == (char **) -1, 0)) /* Nothing we can do, no more memory. */ goto converted; if (domain->conv_tab[act] == NULL) { /* We haven't used this string so far, so it is not translated yet. Do this now. */ /* We use a bit more efficient memory handling. We allocate always larger blocks which get used over time. This is faster than many small allocations. */ __libc_lock_define_initialized (static, lock) # define INITIAL_BLOCK_SIZE 4080 static unsigned char *freemem; static size_t freemem_size; const unsigned char *inbuf; unsigned char *outbuf; int malloc_count; # ifndef _LIBC transmem_block_t *transmem_list = NULL; # endif __libc_lock_lock (lock); inbuf = (const unsigned char *) result; outbuf = freemem + sizeof (size_t); malloc_count = 0; while (1) { transmem_block_t *newmem; # ifdef _LIBC size_t non_reversible; int res; if (freemem_size < sizeof (size_t)) goto resize_freemem; res = __gconv (domain->conv, &inbuf, inbuf + resultlen, &outbuf, outbuf + freemem_size - sizeof (size_t), &non_reversible); if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT) break; if (res != __GCONV_FULL_OUTPUT) { __libc_lock_unlock (lock); goto converted; } inbuf = result; # else # if HAVE_ICONV const char *inptr = (const char *) inbuf; size_t inleft = resultlen; char *outptr = (char *) outbuf; size_t outleft; if (freemem_size < sizeof (size_t)) goto resize_freemem; outleft = freemem_size - sizeof (size_t); if (iconv (domain->conv, (ICONV_CONST char **) &inptr, &inleft, &outptr, &outleft) != (size_t) (-1)) { outbuf = (unsigned char *) outptr; break; } if (errno != E2BIG) { __libc_lock_unlock (lock); goto converted; } # endif # endif resize_freemem: /* We must allocate a new buffer or resize the old one. */ if (malloc_count > 0) { ++malloc_count; freemem_size = malloc_count * INITIAL_BLOCK_SIZE; newmem = (transmem_block_t *) realloc (transmem_list, freemem_size); # ifdef _LIBC if (newmem != NULL) transmem_list = transmem_list->next; else { struct transmem_list *old = transmem_list; transmem_list = transmem_list->next; free (old); } # endif } else { malloc_count = 1; freemem_size = INITIAL_BLOCK_SIZE; newmem = (transmem_block_t *) malloc (freemem_size); } if (__builtin_expect (newmem == NULL, 0)) { freemem = NULL; freemem_size = 0; __libc_lock_unlock (lock); goto converted; } # ifdef _LIBC /* Add the block to the list of blocks we have to free at some point. */ newmem->next = transmem_list; transmem_list = newmem; freemem = newmem->data; freemem_size -= offsetof (struct transmem_list, data); # else transmem_list = newmem; freemem = newmem; # endif outbuf = freemem + sizeof (size_t); } /* We have now in our buffer a converted string. Put this into the table of conversions. */ *(size_t *) freemem = outbuf - freemem - sizeof (size_t); domain->conv_tab[act] = (char *) freemem; /* Shrink freemem, but keep it aligned. */ freemem_size -= outbuf - freemem; freemem = outbuf; freemem += freemem_size & (alignof (size_t) - 1); freemem_size = freemem_size & ~ (alignof (size_t) - 1); __libc_lock_unlock (lock); } /* Now domain->conv_tab[act] contains the translation of all the plural variants. */ result = domain->conv_tab[act] + sizeof (size_t); resultlen = *(size_t *) domain->conv_tab[act]; } converted: /* The result string is converted. */ #endif /* _LIBC || HAVE_ICONV */ *lengthp = resultlen; return result; } /* Look up a plural variant. */ static char * internal_function plural_lookup (struct loaded_l10nfile *domain, unsigned long int n, const char *translation, size_t translation_len) { struct loaded_domain *domaindata = (struct loaded_domain *) domain->data; unsigned long int index; const char *p; index = plural_eval (domaindata->plural, n); if (index >= domaindata->nplurals) /* This should never happen. It means the plural expression and the given maximum value do not match. */ index = 0; /* Skip INDEX strings at TRANSLATION. */ p = translation; while (index-- > 0) { #ifdef _LIBC p = __rawmemchr (p, '\0'); #else p = strchr (p, '\0'); #endif /* And skip over the NUL byte. */ p++; if (p >= translation + translation_len) /* This should never happen. It means the plural expression evaluated to a value larger than the number of variants available for MSGID1. */ return (char *) translation; } return (char *) p; } #ifndef _LIBC /* Return string representation of locale CATEGORY. */ static const char * internal_function category_to_name (int category) { const char *retval; switch (category) { #ifdef LC_COLLATE case LC_COLLATE: retval = "LC_COLLATE"; break; #endif #ifdef LC_CTYPE case LC_CTYPE: retval = "LC_CTYPE"; break; #endif #ifdef LC_MONETARY case LC_MONETARY: retval = "LC_MONETARY"; break; #endif #ifdef LC_NUMERIC case LC_NUMERIC: retval = "LC_NUMERIC"; break; #endif #ifdef LC_TIME case LC_TIME: retval = "LC_TIME"; break; #endif #ifdef LC_MESSAGES case LC_MESSAGES: retval = "LC_MESSAGES"; break; #endif #ifdef LC_RESPONSE case LC_RESPONSE: retval = "LC_RESPONSE"; break; #endif #ifdef LC_ALL case LC_ALL: /* This might not make sense but is perhaps better than any other value. */ retval = "LC_ALL"; break; #endif default: /* If you have a better idea for a default value let me know. */ retval = "LC_XXX"; } return retval; } #endif /* Guess value of current locale from value of the environment variables. */ static const char * internal_function guess_category_value (int category, const char *categoryname) { const char *language; const char *retval; /* The highest priority value is the `LANGUAGE' environment variable. But we don't use the value if the currently selected locale is the C locale. This is a GNU extension. */ language = getenv ("LANGUAGE"); if (language != NULL && language[0] == '\0') language = NULL; /* We have to proceed with the POSIX methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some systems this can be done by the `setlocale' function itself. */ #ifdef _LIBC retval = __current_locale_name (category); #else retval = _nl_locale_name (category, categoryname); #endif /* Ignore LANGUAGE if the locale is set to "C" because 1. "C" locale usually uses the ASCII encoding, and most international messages use non-ASCII characters. These characters get displayed as question marks (if using glibc's iconv()) or as invalid 8-bit characters (because other iconv()s refuse to convert most non-ASCII characters to ASCII). In any case, the output is ugly. 2. The precise output of some programs in the "C" locale is specified by POSIX and should not depend on environment variables like "LANGUAGE". We allow such programs to use gettext(). */ return language != NULL && strcmp (retval, "C") != 0 ? language : retval; } /* @@ begin of epilog @@ */ /* We don't want libintl.a to depend on any other library. So we avoid the non-standard function stpcpy. In GNU C Library this function is available, though. Also allow the symbol HAVE_STPCPY to be defined. */ #if !_LIBC && !HAVE_STPCPY static char * stpcpy (char *dest, const char *src) { while ((*dest++ = *src++) != '\0') /* Do nothing. */ ; return dest - 1; } #endif #if !_LIBC && !HAVE_MEMPCPY static void * mempcpy (void *dest, const void *src, size_t n) { return (void *) ((char *) memcpy (dest, src, n) + n); } #endif #ifdef _LIBC /* If we want to free all resources we have to do some work at program's end. */ libc_freeres_fn (free_mem) { void *old; while (_nl_domain_bindings != NULL) { struct binding *oldp = _nl_domain_bindings; _nl_domain_bindings = _nl_domain_bindings->next; if (oldp->dirname != INTUSE(_nl_default_dirname)) /* Yes, this is a pointer comparison. */ free (oldp->dirname); free (oldp->codeset); free (oldp); } if (_nl_current_default_domain != _nl_default_default_domain) /* Yes, again a pointer comparison. */ free ((char *) _nl_current_default_domain); /* Remove the search tree with the known translations. */ __tdestroy (root, free); root = NULL; while (transmem_list != NULL) { old = transmem_list; transmem_list = transmem_list->next; free (old); } } #endif realtimebattle-1.0.8/intl/dcngettext.c0000644000175000017500000000347010170545360016140 0ustar moimoi/* Implementation of the dcngettext(3) function. Copyright (C) 1995-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 Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DCNGETTEXT __dcngettext # define DCIGETTEXT __dcigettext #else # define DCNGETTEXT libintl_dcngettext # define DCIGETTEXT libintl_dcigettext #endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ char * DCNGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, unsigned long int n, int category) { return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__dcngettext, dcngettext); #endif realtimebattle-1.0.8/intl/dngettext.c0000644000175000017500000000354210170545360015775 0ustar moimoi/* Implementation of the dngettext(3) function. Copyright (C) 1995-1997, 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 Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif #include "gettextP.h" #include #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DNGETTEXT __dngettext # define DCNGETTEXT __dcngettext #else # define DNGETTEXT libintl_dngettext # define DCNGETTEXT libintl_dcngettext #endif /* Look up MSGID in the DOMAINNAME message catalog of the current LC_MESSAGES locale and skip message according to the plural form. */ char * DNGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, unsigned long int n) { return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__dngettext, dngettext); #endif realtimebattle-1.0.8/intl/ngettext.c0000644000175000017500000000367010170545360015633 0ustar moimoi/* Implementation of ngettext(3) function. Copyright (C) 1995, 1997, 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 Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif #ifdef _LIBC # define __need_NULL # include #else # include /* Just for NULL. */ #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif #include /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define NGETTEXT __ngettext # define DCNGETTEXT __dcngettext #else # define NGETTEXT libintl_ngettext # define DCNGETTEXT libintl_dcngettext #endif /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ char * NGETTEXT (const char *msgid1, const char *msgid2, unsigned long int n) { return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__ngettext, ngettext); #endif realtimebattle-1.0.8/intl/plural.y0000644000175000017500000001627110170545360015317 0ustar moimoi%{ /* Expression parsing for plural form selection. Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ /* The bison generated parser uses alloca. AIX 3 forces us to put this declaration at the beginning of the file. The declaration in bison's skeleton file comes too late. This must come before because may include arbitrary system headers. */ #if defined _AIX && !defined __GNUC__ #pragma alloca #endif #ifdef HAVE_CONFIG_H # include #endif #include #include #include "plural-exp.h" /* The main function generated by the parser is called __gettextparse, but we want it to be called PLURAL_PARSE. */ #ifndef _LIBC # define __gettextparse PLURAL_PARSE #endif #define YYLEX_PARAM &((struct parse_args *) arg)->cp #define YYPARSE_PARAM arg %} %pure_parser %expect 7 %union { unsigned long int num; enum operator op; struct expression *exp; } %{ /* Prototypes for local functions. */ static int yylex (YYSTYPE *lval, const char **pexp); static void yyerror (const char *str); /* Allocation of expressions. */ static struct expression * new_exp (int nargs, enum operator op, struct expression * const *args) { int i; struct expression *newp; /* If any of the argument could not be malloc'ed, just return NULL. */ for (i = nargs - 1; i >= 0; i--) if (args[i] == NULL) goto fail; /* Allocate a new expression. */ newp = (struct expression *) malloc (sizeof (*newp)); if (newp != NULL) { newp->nargs = nargs; newp->operation = op; for (i = nargs - 1; i >= 0; i--) newp->val.args[i] = args[i]; return newp; } fail: for (i = nargs - 1; i >= 0; i--) FREE_EXPRESSION (args[i]); return NULL; } static inline struct expression * new_exp_0 (enum operator op) { return new_exp (0, op, NULL); } static inline struct expression * new_exp_1 (enum operator op, struct expression *right) { struct expression *args[1]; args[0] = right; return new_exp (1, op, args); } static struct expression * new_exp_2 (enum operator op, struct expression *left, struct expression *right) { struct expression *args[2]; args[0] = left; args[1] = right; return new_exp (2, op, args); } static inline struct expression * new_exp_3 (enum operator op, struct expression *bexp, struct expression *tbranch, struct expression *fbranch) { struct expression *args[3]; args[0] = bexp; args[1] = tbranch; args[2] = fbranch; return new_exp (3, op, args); } %} /* This declares that all operators have the same associativity and the precedence order as in C. See [Harbison, Steele: C, A Reference Manual]. There is no unary minus and no bitwise operators. Operators with the same syntactic behaviour have been merged into a single token, to save space in the array generated by bison. */ %right '?' /* ? */ %left '|' /* || */ %left '&' /* && */ %left EQUOP2 /* == != */ %left CMPOP2 /* < > <= >= */ %left ADDOP2 /* + - */ %left MULOP2 /* * / % */ %right '!' /* ! */ %token EQUOP2 CMPOP2 ADDOP2 MULOP2 %token NUMBER %type exp %% start: exp { if ($1 == NULL) YYABORT; ((struct parse_args *) arg)->res = $1; } ; exp: exp '?' exp ':' exp { $$ = new_exp_3 (qmop, $1, $3, $5); } | exp '|' exp { $$ = new_exp_2 (lor, $1, $3); } | exp '&' exp { $$ = new_exp_2 (land, $1, $3); } | exp EQUOP2 exp { $$ = new_exp_2 ($2, $1, $3); } | exp CMPOP2 exp { $$ = new_exp_2 ($2, $1, $3); } | exp ADDOP2 exp { $$ = new_exp_2 ($2, $1, $3); } | exp MULOP2 exp { $$ = new_exp_2 ($2, $1, $3); } | '!' exp { $$ = new_exp_1 (lnot, $2); } | 'n' { $$ = new_exp_0 (var); } | NUMBER { if (($$ = new_exp_0 (num)) != NULL) $$->val.num = $1; } | '(' exp ')' { $$ = $2; } ; %% void internal_function FREE_EXPRESSION (struct expression *exp) { if (exp == NULL) return; /* Handle the recursive case. */ switch (exp->nargs) { case 3: FREE_EXPRESSION (exp->val.args[2]); /* FALLTHROUGH */ case 2: FREE_EXPRESSION (exp->val.args[1]); /* FALLTHROUGH */ case 1: FREE_EXPRESSION (exp->val.args[0]); /* FALLTHROUGH */ default: break; } free (exp); } static int yylex (YYSTYPE *lval, const char **pexp) { const char *exp = *pexp; int result; while (1) { if (exp[0] == '\0') { *pexp = exp; return YYEOF; } if (exp[0] != ' ' && exp[0] != '\t') break; ++exp; } result = *exp++; switch (result) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { unsigned long int n = result - '0'; while (exp[0] >= '0' && exp[0] <= '9') { n *= 10; n += exp[0] - '0'; ++exp; } lval->num = n; result = NUMBER; } break; case '=': if (exp[0] == '=') { ++exp; lval->op = equal; result = EQUOP2; } else result = YYERRCODE; break; case '!': if (exp[0] == '=') { ++exp; lval->op = not_equal; result = EQUOP2; } break; case '&': case '|': if (exp[0] == result) ++exp; else result = YYERRCODE; break; case '<': if (exp[0] == '=') { ++exp; lval->op = less_or_equal; } else lval->op = less_than; result = CMPOP2; break; case '>': if (exp[0] == '=') { ++exp; lval->op = greater_or_equal; } else lval->op = greater_than; result = CMPOP2; break; case '*': lval->op = mult; result = MULOP2; break; case '/': lval->op = divide; result = MULOP2; break; case '%': lval->op = module; result = MULOP2; break; case '+': lval->op = plus; result = ADDOP2; break; case '-': lval->op = minus; result = ADDOP2; break; case 'n': case '?': case ':': case '(': case ')': /* Nothing, just return the character. */ break; case ';': case '\n': case '\0': /* Be safe and let the user call this function again. */ --exp; result = YYEOF; break; default: result = YYERRCODE; #if YYDEBUG != 0 --exp; #endif break; } *pexp = exp; return result; } static void yyerror (const char *str) { /* Do nothing. We don't print error messages here. */ } realtimebattle-1.0.8/intl/plural-exp.c0000644000175000017500000000765110170545360016065 0ustar moimoi/* Expression parsing for plural form selection. Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "plural-exp.h" #if (defined __GNUC__ && !defined __APPLE_CC__) \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) /* These structs are the constant expression for the germanic plural form determination. It represents the expression "n != 1". */ static const struct expression plvar = { .nargs = 0, .operation = var, }; static const struct expression plone = { .nargs = 0, .operation = num, .val = { .num = 1 } }; struct expression GERMANIC_PLURAL = { .nargs = 2, .operation = not_equal, .val = { .args = { [0] = (struct expression *) &plvar, [1] = (struct expression *) &plone } } }; # define INIT_GERMANIC_PLURAL() #else /* For compilers without support for ISO C 99 struct/union initializers: Initialization at run-time. */ static struct expression plvar; static struct expression plone; struct expression GERMANIC_PLURAL; static void init_germanic_plural () { if (plone.val.num == 0) { plvar.nargs = 0; plvar.operation = var; plone.nargs = 0; plone.operation = num; plone.val.num = 1; GERMANIC_PLURAL.nargs = 2; GERMANIC_PLURAL.operation = not_equal; GERMANIC_PLURAL.val.args[0] = &plvar; GERMANIC_PLURAL.val.args[1] = &plone; } } # define INIT_GERMANIC_PLURAL() init_germanic_plural () #endif void internal_function EXTRACT_PLURAL_EXPRESSION (const char *nullentry, struct expression **pluralp, unsigned long int *npluralsp) { if (nullentry != NULL) { const char *plural; const char *nplurals; plural = strstr (nullentry, "plural="); nplurals = strstr (nullentry, "nplurals="); if (plural == NULL || nplurals == NULL) goto no_plural; else { char *endp; unsigned long int n; struct parse_args args; /* First get the number. */ nplurals += 9; while (*nplurals != '\0' && isspace ((unsigned char) *nplurals)) ++nplurals; if (!(*nplurals >= '0' && *nplurals <= '9')) goto no_plural; #if defined HAVE_STRTOUL || defined _LIBC n = strtoul (nplurals, &endp, 10); #else for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++) n = n * 10 + (*endp - '0'); #endif if (nplurals == endp) goto no_plural; *npluralsp = n; /* Due to the restrictions bison imposes onto the interface of the scanner function we have to put the input string and the result passed up from the parser into the same structure which address is passed down to the parser. */ plural += 7; args.cp = plural; if (PLURAL_PARSE (&args) != 0) goto no_plural; *pluralp = args.res; } } else { /* By default we are using the Germanic form: singular form only for `one', the plural form otherwise. Yes, this is also what English is using since English is a Germanic language. */ no_plural: INIT_GERMANIC_PLURAL (); *pluralp = &GERMANIC_PLURAL; *npluralsp = 2; } } realtimebattle-1.0.8/intl/localcharset.c0000644000175000017500000002435710170545360016442 0ustar moimoi/* Determine a canonical name for the current locale's character encoding. Copyright (C) 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 Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ /* Written by Bruno Haible . */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include "localcharset.h" #if HAVE_STDDEF_H # include #endif #include #if HAVE_STRING_H # include #else # include #endif #if HAVE_STDLIB_H # include #endif #if defined _WIN32 || defined __WIN32__ # undef WIN32 /* avoid warning on mingw32 */ # define WIN32 #endif #if defined __EMX__ /* Assume EMX program runs on OS/2, even if compiled under DOS. */ # define OS2 #endif #if !defined WIN32 # if HAVE_LANGINFO_CODESET # include # else # if HAVE_SETLOCALE # include # endif # endif #elif defined WIN32 # define WIN32_LEAN_AND_MEAN # include #endif #if defined OS2 # define INCL_DOS # include #endif #if ENABLE_RELOCATABLE # include "relocatable.h" #else # define relocate(pathname) (pathname) #endif #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #endif #ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' #endif #ifndef ISSLASH # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) #endif #if HAVE_DECL_GETC_UNLOCKED # undef getc # define getc getc_unlocked #endif /* The following static variable is declared 'volatile' to avoid a possible multithread problem in the function get_charset_aliases. If we are running in a threaded environment, and if two threads initialize 'charset_aliases' simultaneously, both will produce the same value, and everything will be ok if the two assignments to 'charset_aliases' are atomic. But I don't know what will happen if the two assignments mix. */ #if __STDC__ != 1 # define volatile /* empty */ #endif /* Pointer to the contents of the charset.alias file, if it has already been read, else NULL. Its format is: ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ static const char * volatile charset_aliases; /* Return a pointer to the contents of the charset.alias file. */ static const char * get_charset_aliases () { const char *cp; cp = charset_aliases; if (cp == NULL) { #if !(defined VMS || defined WIN32) FILE *fp; const char *dir = relocate (LIBDIR); const char *base = "charset.alias"; char *file_name; /* Concatenate dir and base into freshly allocated file_name. */ { size_t dir_len = strlen (dir); size_t base_len = strlen (base); int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); file_name = (char *) malloc (dir_len + add_slash + base_len + 1); if (file_name != NULL) { memcpy (file_name, dir, dir_len); if (add_slash) file_name[dir_len] = DIRECTORY_SEPARATOR; memcpy (file_name + dir_len + add_slash, base, base_len + 1); } } if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL) /* Out of memory or file not found, treat it as empty. */ cp = ""; else { /* Parse the file's contents. */ int c; char buf1[50+1]; char buf2[50+1]; char *res_ptr = NULL; size_t res_size = 0; size_t l1, l2; for (;;) { c = getc (fp); if (c == EOF) break; if (c == '\n' || c == ' ' || c == '\t') continue; if (c == '#') { /* Skip comment, to end of line. */ do c = getc (fp); while (!(c == EOF || c == '\n')); if (c == EOF) break; continue; } ungetc (c, fp); if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) break; l1 = strlen (buf1); l2 = strlen (buf2); if (res_size == 0) { res_size = l1 + 1 + l2 + 1; res_ptr = (char *) malloc (res_size + 1); } else { res_size += l1 + 1 + l2 + 1; res_ptr = (char *) realloc (res_ptr, res_size + 1); } if (res_ptr == NULL) { /* Out of memory. */ res_size = 0; break; } strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); strcpy (res_ptr + res_size - (l2 + 1), buf2); } fclose (fp); if (res_size == 0) cp = ""; else { *(res_ptr + res_size) = '\0'; cp = res_ptr; } } if (file_name != NULL) free (file_name); #else # if defined VMS /* To avoid the troubles of an extra file charset.alias_vms in the sources of many GNU packages, simply inline the aliases here. */ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation "Compaq C Run-Time Library Reference Manual for OpenVMS systems" section 10.7 "Handling Different Character Sets". */ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" "ISO8859-2" "\0" "ISO-8859-2" "\0" "ISO8859-5" "\0" "ISO-8859-5" "\0" "ISO8859-7" "\0" "ISO-8859-7" "\0" "ISO8859-8" "\0" "ISO-8859-8" "\0" "ISO8859-9" "\0" "ISO-8859-9" "\0" /* Japanese */ "eucJP" "\0" "EUC-JP" "\0" "SJIS" "\0" "SHIFT_JIS" "\0" "DECKANJI" "\0" "DEC-KANJI" "\0" "SDECKANJI" "\0" "EUC-JP" "\0" /* Chinese */ "eucTW" "\0" "EUC-TW" "\0" "DECHANYU" "\0" "DEC-HANYU" "\0" "DECHANZI" "\0" "GB2312" "\0" /* Korean */ "DECKOREAN" "\0" "EUC-KR" "\0"; # endif # if defined WIN32 /* To avoid the troubles of installing a separate file in the same directory as the DLL and of retrieving the DLL's directory at runtime, simply inline the aliases here. */ cp = "CP936" "\0" "GBK" "\0" "CP1361" "\0" "JOHAB" "\0" "CP20127" "\0" "ASCII" "\0" "CP20866" "\0" "KOI8-R" "\0" "CP21866" "\0" "KOI8-RU" "\0" "CP28591" "\0" "ISO-8859-1" "\0" "CP28592" "\0" "ISO-8859-2" "\0" "CP28593" "\0" "ISO-8859-3" "\0" "CP28594" "\0" "ISO-8859-4" "\0" "CP28595" "\0" "ISO-8859-5" "\0" "CP28596" "\0" "ISO-8859-6" "\0" "CP28597" "\0" "ISO-8859-7" "\0" "CP28598" "\0" "ISO-8859-8" "\0" "CP28599" "\0" "ISO-8859-9" "\0" "CP28605" "\0" "ISO-8859-15" "\0"; # endif #endif charset_aliases = cp; } return cp; } /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ #ifdef STATIC STATIC #endif const char * locale_charset () { const char *codeset; const char *aliases; #if !(defined WIN32 || defined OS2) # if HAVE_LANGINFO_CODESET /* Most systems support nl_langinfo (CODESET) nowadays. */ codeset = nl_langinfo (CODESET); # else /* On old systems which lack it, use setlocale or getenv. */ const char *locale = NULL; /* But most old systems don't have a complete set of locales. Some (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't use setlocale here; it would return "C" when it doesn't support the locale name the user has set. */ # if HAVE_SETLOCALE && 0 locale = setlocale (LC_CTYPE, NULL); # endif if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } } /* On some old systems, one used to set locale = "iso8859_1". On others, you set it to "language_COUNTRY.charset". In any case, we resolve it through the charset.alias file. */ codeset = locale; # endif #elif defined WIN32 static char buf[2 + 10 + 1]; /* Woe32 has a function returning the locale's codepage as a number. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; #elif defined OS2 const char *locale; static char buf[2 + 10 + 1]; ULONG cp[3]; ULONG cplen; /* Allow user to override the codeset, as set in the operating system, with standard language environment variables. */ locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } /* Resolve through the charset.alias file. */ codeset = locale; } else { /* OS/2 has a function returning the locale's codepage as a number. */ if (DosQueryCp (sizeof (cp), cp, &cplen)) codeset = ""; else { sprintf (buf, "CP%u", cp[0]); codeset = buf; } } #endif if (codeset == NULL) /* The canonical name cannot be determined. */ codeset = ""; /* Resolve alias. */ for (aliases = get_charset_aliases (); *aliases != '\0'; aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) if (strcmp (codeset, aliases) == 0 || (aliases[0] == '*' && aliases[1] == '\0')) { codeset = aliases + strlen (aliases) + 1; break; } /* Don't return an empty string. GNU libc and GNU libiconv interpret the empty string as denoting "the locale's character encoding", thus GNU libiconv would call this function a second time. */ if (codeset[0] == '\0') codeset = "ASCII"; return codeset; } realtimebattle-1.0.8/intl/relocatable.c0000644000175000017500000003136010170545360016243 0ustar moimoi/* Provide relocatable packages. Copyright (C) 2003 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ /* Tell glibc's to provide a prototype for getline(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H # include "config.h" #endif /* Specification. */ #include "relocatable.h" #if ENABLE_RELOCATABLE #include #include #include #include #ifdef NO_XMALLOC # define xmalloc malloc #else # include "xalloc.h" #endif #if defined _WIN32 || defined __WIN32__ # define WIN32_LEAN_AND_MEAN # include #endif #if DEPENDS_ON_LIBCHARSET # include #endif #if DEPENDS_ON_LIBICONV && HAVE_ICONV # include #endif #if DEPENDS_ON_LIBINTL && ENABLE_NLS # include #endif /* Faked cheap 'bool'. */ #undef bool #undef false #undef true #define bool int #define false 0 #define true 1 /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ && (P)[1] == ':') # define IS_PATH_WITH_DIR(P) \ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) # define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0) #else /* Unix */ # define ISSLASH(C) ((C) == '/') # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) # define FILESYSTEM_PREFIX_LEN(P) 0 #endif /* Original installation prefix. */ static char *orig_prefix; static size_t orig_prefix_len; /* Current installation prefix. */ static char *curr_prefix; static size_t curr_prefix_len; /* These prefixes do not end in a slash. Anything that will be concatenated to them must start with a slash. */ /* Sets the original and the current installation prefix of this module. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ static void set_this_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg) { if (orig_prefix_arg != NULL && curr_prefix_arg != NULL /* Optimization: if orig_prefix and curr_prefix are equal, the relocation is a nop. */ && strcmp (orig_prefix_arg, curr_prefix_arg) != 0) { /* Duplicate the argument strings. */ char *memory; orig_prefix_len = strlen (orig_prefix_arg); curr_prefix_len = strlen (curr_prefix_arg); memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1); #ifdef NO_XMALLOC if (memory != NULL) #endif { memcpy (memory, orig_prefix_arg, orig_prefix_len + 1); orig_prefix = memory; memory += orig_prefix_len + 1; memcpy (memory, curr_prefix_arg, curr_prefix_len + 1); curr_prefix = memory; return; } } orig_prefix = NULL; curr_prefix = NULL; /* Don't worry about wasted memory here - this function is usually only called once. */ } /* Sets the original and the current installation prefix of the package. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ void set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg) { set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg); /* Now notify all dependent libraries. */ #if DEPENDS_ON_LIBCHARSET libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); #endif #if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109 libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); #endif #if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); #endif } #if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR) /* Convenience function: Computes the current installation prefix, based on the original installation prefix, the original installation directory of a particular file, and the current pathname of this file. Returns NULL upon failure. */ #ifdef IN_LIBRARY #define compute_curr_prefix local_compute_curr_prefix static #endif const char * compute_curr_prefix (const char *orig_installprefix, const char *orig_installdir, const char *curr_pathname) { const char *curr_installdir; const char *rel_installdir; if (curr_pathname == NULL) return NULL; /* Determine the relative installation directory, relative to the prefix. This is simply the difference between orig_installprefix and orig_installdir. */ if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix)) != 0) /* Shouldn't happen - nothing should be installed outside $(prefix). */ return NULL; rel_installdir = orig_installdir + strlen (orig_installprefix); /* Determine the current installation directory. */ { const char *p_base = curr_pathname + FILESYSTEM_PREFIX_LEN (curr_pathname); const char *p = curr_pathname + strlen (curr_pathname); char *q; while (p > p_base) { p--; if (ISSLASH (*p)) break; } q = (char *) xmalloc (p - curr_pathname + 1); #ifdef NO_XMALLOC if (q == NULL) return NULL; #endif memcpy (q, curr_pathname, p - curr_pathname); q[p - curr_pathname] = '\0'; curr_installdir = q; } /* Compute the current installation prefix by removing the trailing rel_installdir from it. */ { const char *rp = rel_installdir + strlen (rel_installdir); const char *cp = curr_installdir + strlen (curr_installdir); const char *cp_base = curr_installdir + FILESYSTEM_PREFIX_LEN (curr_installdir); while (rp > rel_installdir && cp > cp_base) { bool same = false; const char *rpi = rp; const char *cpi = cp; while (rpi > rel_installdir && cpi > cp_base) { rpi--; cpi--; if (ISSLASH (*rpi) || ISSLASH (*cpi)) { if (ISSLASH (*rpi) && ISSLASH (*cpi)) same = true; break; } #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS - case insignificant filesystem */ if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi) != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi)) break; #else if (*rpi != *cpi) break; #endif } if (!same) break; /* The last pathname component was the same. opi and cpi now point to the slash before it. */ rp = rpi; cp = cpi; } if (rp > rel_installdir) /* Unexpected: The curr_installdir does not end with rel_installdir. */ return NULL; { size_t curr_prefix_len = cp - curr_installdir; char *curr_prefix; curr_prefix = (char *) xmalloc (curr_prefix_len + 1); #ifdef NO_XMALLOC if (curr_prefix == NULL) return NULL; #endif memcpy (curr_prefix, curr_installdir, curr_prefix_len); curr_prefix[curr_prefix_len] = '\0'; return curr_prefix; } } } #endif /* !IN_LIBRARY || PIC */ #if defined PIC && defined INSTALLDIR /* Full pathname of shared library, or NULL. */ static char *shared_library_fullname; #if defined _WIN32 || defined __WIN32__ /* Determine the full pathname of the shared library when it is loaded. */ BOOL WINAPI DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved) { (void) reserved; if (event == DLL_PROCESS_ATTACH) { /* The DLL is being loaded into an application's address range. */ static char location[MAX_PATH]; if (!GetModuleFileName (module_handle, location, sizeof (location))) /* Shouldn't happen. */ return FALSE; if (!IS_PATH_WITH_DIR (location)) /* Shouldn't happen. */ return FALSE; shared_library_fullname = strdup (location); } return TRUE; } #else /* Unix */ static void find_shared_library_fullname () { #if defined __linux__ && __GLIBC__ >= 2 /* Linux has /proc/self/maps. glibc 2 has the getline() function. */ FILE *fp; /* Open the current process' maps file. It describes one VMA per line. */ fp = fopen ("/proc/self/maps", "r"); if (fp) { unsigned long address = (unsigned long) &find_shared_library_fullname; for (;;) { unsigned long start, end; int c; if (fscanf (fp, "%lx-%lx", &start, &end) != 2) break; if (address >= start && address <= end - 1) { /* Found it. Now see if this line contains a filename. */ while (c = getc (fp), c != EOF && c != '\n' && c != '/') continue; if (c == '/') { size_t size; int len; ungetc (c, fp); shared_library_fullname = NULL; size = 0; len = getline (&shared_library_fullname, &size, fp); if (len >= 0) { /* Success: filled shared_library_fullname. */ if (len > 0 && shared_library_fullname[len - 1] == '\n') shared_library_fullname[len - 1] = '\0'; } } break; } while (c = getc (fp), c != EOF && c != '\n') continue; } fclose (fp); } #endif } #endif /* WIN32 / Unix */ /* Return the full pathname of the current shared library. Return NULL if unknown. Guaranteed to work only on Linux and Woe32. */ static char * get_shared_library_fullname () { #if !(defined _WIN32 || defined __WIN32__) static bool tried_find_shared_library_fullname; if (!tried_find_shared_library_fullname) { find_shared_library_fullname (); tried_find_shared_library_fullname = true; } #endif return shared_library_fullname; } #endif /* PIC */ /* Returns the pathname, relocated according to the current installation directory. */ const char * relocate (const char *pathname) { #if defined PIC && defined INSTALLDIR static int initialized; /* Initialization code for a shared library. */ if (!initialized) { /* At this point, orig_prefix and curr_prefix likely have already been set through the main program's set_program_name_and_installdir function. This is sufficient in the case that the library has initially been installed in the same orig_prefix. But we can do better, to also cover the cases that 1. it has been installed in a different prefix before being moved to orig_prefix and (later) to curr_prefix, 2. unlike the program, it has not moved away from orig_prefix. */ const char *orig_installprefix = INSTALLPREFIX; const char *orig_installdir = INSTALLDIR; const char *curr_prefix_better; curr_prefix_better = compute_curr_prefix (orig_installprefix, orig_installdir, get_shared_library_fullname ()); if (curr_prefix_better == NULL) curr_prefix_better = curr_prefix; set_relocation_prefix (orig_installprefix, curr_prefix_better); initialized = 1; } #endif /* Note: It is not necessary to perform case insensitive comparison here, even for DOS-like filesystems, because the pathname argument was typically created from the same Makefile variable as orig_prefix came from. */ if (orig_prefix != NULL && curr_prefix != NULL && strncmp (pathname, orig_prefix, orig_prefix_len) == 0) { if (pathname[orig_prefix_len] == '\0') /* pathname equals orig_prefix. */ return curr_prefix; if (ISSLASH (pathname[orig_prefix_len])) { /* pathname starts with orig_prefix. */ const char *pathname_tail = &pathname[orig_prefix_len]; char *result = (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1); #ifdef NO_XMALLOC if (result != NULL) #endif { memcpy (result, curr_prefix, curr_prefix_len); strcpy (result + curr_prefix_len, pathname_tail); return result; } } } /* Nothing to relocate. */ return pathname; } #endif realtimebattle-1.0.8/intl/localename.c0000644000175000017500000007413510170545360016075 0ustar moimoi/* Determine the current selected locale. Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ /* Written by Ulrich Drepper , 1995. */ /* Win32 code written by Tor Lillqvist . */ #ifdef HAVE_CONFIG_H # include #endif #include #include #if defined _WIN32 || defined __WIN32__ # undef WIN32 /* avoid warning on mingw32 */ # define WIN32 #endif #ifdef WIN32 # define WIN32_LEAN_AND_MEAN # include /* List of language codes, sorted by value: 0x01 LANG_ARABIC 0x02 LANG_BULGARIAN 0x03 LANG_CATALAN 0x04 LANG_CHINESE 0x05 LANG_CZECH 0x06 LANG_DANISH 0x07 LANG_GERMAN 0x08 LANG_GREEK 0x09 LANG_ENGLISH 0x0a LANG_SPANISH 0x0b LANG_FINNISH 0x0c LANG_FRENCH 0x0d LANG_HEBREW 0x0e LANG_HUNGARIAN 0x0f LANG_ICELANDIC 0x10 LANG_ITALIAN 0x11 LANG_JAPANESE 0x12 LANG_KOREAN 0x13 LANG_DUTCH 0x14 LANG_NORWEGIAN 0x15 LANG_POLISH 0x16 LANG_PORTUGUESE 0x17 LANG_RHAETO_ROMANCE 0x18 LANG_ROMANIAN 0x19 LANG_RUSSIAN 0x1a LANG_CROATIAN == LANG_SERBIAN 0x1b LANG_SLOVAK 0x1c LANG_ALBANIAN 0x1d LANG_SWEDISH 0x1e LANG_THAI 0x1f LANG_TURKISH 0x20 LANG_URDU 0x21 LANG_INDONESIAN 0x22 LANG_UKRAINIAN 0x23 LANG_BELARUSIAN 0x24 LANG_SLOVENIAN 0x25 LANG_ESTONIAN 0x26 LANG_LATVIAN 0x27 LANG_LITHUANIAN 0x28 LANG_TAJIK 0x29 LANG_FARSI 0x2a LANG_VIETNAMESE 0x2b LANG_ARMENIAN 0x2c LANG_AZERI 0x2d LANG_BASQUE 0x2e LANG_SORBIAN 0x2f LANG_MACEDONIAN 0x30 LANG_SUTU 0x31 LANG_TSONGA 0x32 LANG_TSWANA 0x33 LANG_VENDA 0x34 LANG_XHOSA 0x35 LANG_ZULU 0x36 LANG_AFRIKAANS 0x37 LANG_GEORGIAN 0x38 LANG_FAEROESE 0x39 LANG_HINDI 0x3a LANG_MALTESE 0x3b LANG_SAAMI 0x3c LANG_GAELIC 0x3d LANG_YIDDISH 0x3e LANG_MALAY 0x3f LANG_KAZAK 0x40 LANG_KYRGYZ 0x41 LANG_SWAHILI 0x42 LANG_TURKMEN 0x43 LANG_UZBEK 0x44 LANG_TATAR 0x45 LANG_BENGALI 0x46 LANG_PUNJABI 0x47 LANG_GUJARATI 0x48 LANG_ORIYA 0x49 LANG_TAMIL 0x4a LANG_TELUGU 0x4b LANG_KANNADA 0x4c LANG_MALAYALAM 0x4d LANG_ASSAMESE 0x4e LANG_MARATHI 0x4f LANG_SANSKRIT 0x50 LANG_MONGOLIAN 0x51 LANG_TIBETAN 0x52 LANG_WELSH 0x53 LANG_CAMBODIAN 0x54 LANG_LAO 0x55 LANG_BURMESE 0x56 LANG_GALICIAN 0x57 LANG_KONKANI 0x58 LANG_MANIPURI 0x59 LANG_SINDHI 0x5a LANG_SYRIAC 0x5b LANG_SINHALESE 0x5c LANG_CHEROKEE 0x5d LANG_INUKTITUT 0x5e LANG_AMHARIC 0x5f LANG_TAMAZIGHT 0x60 LANG_KASHMIRI 0x61 LANG_NEPALI 0x62 LANG_FRISIAN 0x63 LANG_PASHTO 0x64 LANG_TAGALOG 0x65 LANG_DIVEHI 0x66 LANG_EDO 0x67 LANG_FULFULDE 0x68 LANG_HAUSA 0x69 LANG_IBIBIO 0x6a LANG_YORUBA 0x70 LANG_IGBO 0x71 LANG_KANURI 0x72 LANG_OROMO 0x73 LANG_TIGRINYA 0x74 LANG_GUARANI 0x75 LANG_HAWAIIAN 0x76 LANG_LATIN 0x77 LANG_SOMALI 0x78 LANG_YI 0x79 LANG_PAPIAMENTU */ /* Mingw headers don't have latest language and sublanguage codes. */ # ifndef LANG_AFRIKAANS # define LANG_AFRIKAANS 0x36 # endif # ifndef LANG_ALBANIAN # define LANG_ALBANIAN 0x1c # endif # ifndef LANG_AMHARIC # define LANG_AMHARIC 0x5e # endif # ifndef LANG_ARABIC # define LANG_ARABIC 0x01 # endif # ifndef LANG_ARMENIAN # define LANG_ARMENIAN 0x2b # endif # ifndef LANG_ASSAMESE # define LANG_ASSAMESE 0x4d # endif # ifndef LANG_AZERI # define LANG_AZERI 0x2c # endif # ifndef LANG_BASQUE # define LANG_BASQUE 0x2d # endif # ifndef LANG_BELARUSIAN # define LANG_BELARUSIAN 0x23 # endif # ifndef LANG_BENGALI # define LANG_BENGALI 0x45 # endif # ifndef LANG_BURMESE # define LANG_BURMESE 0x55 # endif # ifndef LANG_CAMBODIAN # define LANG_CAMBODIAN 0x53 # endif # ifndef LANG_CATALAN # define LANG_CATALAN 0x03 # endif # ifndef LANG_CHEROKEE # define LANG_CHEROKEE 0x5c # endif # ifndef LANG_DIVEHI # define LANG_DIVEHI 0x65 # endif # ifndef LANG_EDO # define LANG_EDO 0x66 # endif # ifndef LANG_ESTONIAN # define LANG_ESTONIAN 0x25 # endif # ifndef LANG_FAEROESE # define LANG_FAEROESE 0x38 # endif # ifndef LANG_FARSI # define LANG_FARSI 0x29 # endif # ifndef LANG_FRISIAN # define LANG_FRISIAN 0x62 # endif # ifndef LANG_FULFULDE # define LANG_FULFULDE 0x67 # endif # ifndef LANG_GAELIC # define LANG_GAELIC 0x3c # endif # ifndef LANG_GALICIAN # define LANG_GALICIAN 0x56 # endif # ifndef LANG_GEORGIAN # define LANG_GEORGIAN 0x37 # endif # ifndef LANG_GUARANI # define LANG_GUARANI 0x74 # endif # ifndef LANG_GUJARATI # define LANG_GUJARATI 0x47 # endif # ifndef LANG_HAUSA # define LANG_HAUSA 0x68 # endif # ifndef LANG_HAWAIIAN # define LANG_HAWAIIAN 0x75 # endif # ifndef LANG_HEBREW # define LANG_HEBREW 0x0d # endif # ifndef LANG_HINDI # define LANG_HINDI 0x39 # endif # ifndef LANG_IBIBIO # define LANG_IBIBIO 0x69 # endif # ifndef LANG_IGBO # define LANG_IGBO 0x70 # endif # ifndef LANG_INDONESIAN # define LANG_INDONESIAN 0x21 # endif # ifndef LANG_INUKTITUT # define LANG_INUKTITUT 0x5d # endif # ifndef LANG_KANNADA # define LANG_KANNADA 0x4b # endif # ifndef LANG_KANURI # define LANG_KANURI 0x71 # endif # ifndef LANG_KASHMIRI # define LANG_KASHMIRI 0x60 # endif # ifndef LANG_KAZAK # define LANG_KAZAK 0x3f # endif # ifndef LANG_KONKANI # define LANG_KONKANI 0x57 # endif # ifndef LANG_KYRGYZ # define LANG_KYRGYZ 0x40 # endif # ifndef LANG_LAO # define LANG_LAO 0x54 # endif # ifndef LANG_LATIN # define LANG_LATIN 0x76 # endif # ifndef LANG_LATVIAN # define LANG_LATVIAN 0x26 # endif # ifndef LANG_LITHUANIAN # define LANG_LITHUANIAN 0x27 # endif # ifndef LANG_MACEDONIAN # define LANG_MACEDONIAN 0x2f # endif # ifndef LANG_MALAY # define LANG_MALAY 0x3e # endif # ifndef LANG_MALAYALAM # define LANG_MALAYALAM 0x4c # endif # ifndef LANG_MALTESE # define LANG_MALTESE 0x3a # endif # ifndef LANG_MANIPURI # define LANG_MANIPURI 0x58 # endif # ifndef LANG_MARATHI # define LANG_MARATHI 0x4e # endif # ifndef LANG_MONGOLIAN # define LANG_MONGOLIAN 0x50 # endif # ifndef LANG_NEPALI # define LANG_NEPALI 0x61 # endif # ifndef LANG_ORIYA # define LANG_ORIYA 0x48 # endif # ifndef LANG_OROMO # define LANG_OROMO 0x72 # endif # ifndef LANG_PAPIAMENTU # define LANG_PAPIAMENTU 0x79 # endif # ifndef LANG_PASHTO # define LANG_PASHTO 0x63 # endif # ifndef LANG_PUNJABI # define LANG_PUNJABI 0x46 # endif # ifndef LANG_RHAETO_ROMANCE # define LANG_RHAETO_ROMANCE 0x17 # endif # ifndef LANG_SAAMI # define LANG_SAAMI 0x3b # endif # ifndef LANG_SANSKRIT # define LANG_SANSKRIT 0x4f # endif # ifndef LANG_SERBIAN # define LANG_SERBIAN 0x1a # endif # ifndef LANG_SINDHI # define LANG_SINDHI 0x59 # endif # ifndef LANG_SINHALESE # define LANG_SINHALESE 0x5b # endif # ifndef LANG_SLOVAK # define LANG_SLOVAK 0x1b # endif # ifndef LANG_SOMALI # define LANG_SOMALI 0x77 # endif # ifndef LANG_SORBIAN # define LANG_SORBIAN 0x2e # endif # ifndef LANG_SUTU # define LANG_SUTU 0x30 # endif # ifndef LANG_SWAHILI # define LANG_SWAHILI 0x41 # endif # ifndef LANG_SYRIAC # define LANG_SYRIAC 0x5a # endif # ifndef LANG_TAGALOG # define LANG_TAGALOG 0x64 # endif # ifndef LANG_TAJIK # define LANG_TAJIK 0x28 # endif # ifndef LANG_TAMAZIGHT # define LANG_TAMAZIGHT 0x5f # endif # ifndef LANG_TAMIL # define LANG_TAMIL 0x49 # endif # ifndef LANG_TATAR # define LANG_TATAR 0x44 # endif # ifndef LANG_TELUGU # define LANG_TELUGU 0x4a # endif # ifndef LANG_THAI # define LANG_THAI 0x1e # endif # ifndef LANG_TIBETAN # define LANG_TIBETAN 0x51 # endif # ifndef LANG_TIGRINYA # define LANG_TIGRINYA 0x73 # endif # ifndef LANG_TSONGA # define LANG_TSONGA 0x31 # endif # ifndef LANG_TSWANA # define LANG_TSWANA 0x32 # endif # ifndef LANG_TURKMEN # define LANG_TURKMEN 0x42 # endif # ifndef LANG_UKRAINIAN # define LANG_UKRAINIAN 0x22 # endif # ifndef LANG_URDU # define LANG_URDU 0x20 # endif # ifndef LANG_UZBEK # define LANG_UZBEK 0x43 # endif # ifndef LANG_VENDA # define LANG_VENDA 0x33 # endif # ifndef LANG_VIETNAMESE # define LANG_VIETNAMESE 0x2a # endif # ifndef LANG_WELSH # define LANG_WELSH 0x52 # endif # ifndef LANG_XHOSA # define LANG_XHOSA 0x34 # endif # ifndef LANG_YI # define LANG_YI 0x78 # endif # ifndef LANG_YIDDISH # define LANG_YIDDISH 0x3d # endif # ifndef LANG_YORUBA # define LANG_YORUBA 0x6a # endif # ifndef LANG_ZULU # define LANG_ZULU 0x35 # endif # ifndef SUBLANG_ARABIC_SAUDI_ARABIA # define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 # endif # ifndef SUBLANG_ARABIC_IRAQ # define SUBLANG_ARABIC_IRAQ 0x02 # endif # ifndef SUBLANG_ARABIC_EGYPT # define SUBLANG_ARABIC_EGYPT 0x03 # endif # ifndef SUBLANG_ARABIC_LIBYA # define SUBLANG_ARABIC_LIBYA 0x04 # endif # ifndef SUBLANG_ARABIC_ALGERIA # define SUBLANG_ARABIC_ALGERIA 0x05 # endif # ifndef SUBLANG_ARABIC_MOROCCO # define SUBLANG_ARABIC_MOROCCO 0x06 # endif # ifndef SUBLANG_ARABIC_TUNISIA # define SUBLANG_ARABIC_TUNISIA 0x07 # endif # ifndef SUBLANG_ARABIC_OMAN # define SUBLANG_ARABIC_OMAN 0x08 # endif # ifndef SUBLANG_ARABIC_YEMEN # define SUBLANG_ARABIC_YEMEN 0x09 # endif # ifndef SUBLANG_ARABIC_SYRIA # define SUBLANG_ARABIC_SYRIA 0x0a # endif # ifndef SUBLANG_ARABIC_JORDAN # define SUBLANG_ARABIC_JORDAN 0x0b # endif # ifndef SUBLANG_ARABIC_LEBANON # define SUBLANG_ARABIC_LEBANON 0x0c # endif # ifndef SUBLANG_ARABIC_KUWAIT # define SUBLANG_ARABIC_KUWAIT 0x0d # endif # ifndef SUBLANG_ARABIC_UAE # define SUBLANG_ARABIC_UAE 0x0e # endif # ifndef SUBLANG_ARABIC_BAHRAIN # define SUBLANG_ARABIC_BAHRAIN 0x0f # endif # ifndef SUBLANG_ARABIC_QATAR # define SUBLANG_ARABIC_QATAR 0x10 # endif # ifndef SUBLANG_AZERI_LATIN # define SUBLANG_AZERI_LATIN 0x01 # endif # ifndef SUBLANG_AZERI_CYRILLIC # define SUBLANG_AZERI_CYRILLIC 0x02 # endif # ifndef SUBLANG_BENGALI_INDIA # define SUBLANG_BENGALI_INDIA 0x00 # endif # ifndef SUBLANG_BENGALI_BANGLADESH # define SUBLANG_BENGALI_BANGLADESH 0x01 # endif # ifndef SUBLANG_CHINESE_MACAU # define SUBLANG_CHINESE_MACAU 0x05 # endif # ifndef SUBLANG_ENGLISH_SOUTH_AFRICA # define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 # endif # ifndef SUBLANG_ENGLISH_JAMAICA # define SUBLANG_ENGLISH_JAMAICA 0x08 # endif # ifndef SUBLANG_ENGLISH_CARIBBEAN # define SUBLANG_ENGLISH_CARIBBEAN 0x09 # endif # ifndef SUBLANG_ENGLISH_BELIZE # define SUBLANG_ENGLISH_BELIZE 0x0a # endif # ifndef SUBLANG_ENGLISH_TRINIDAD # define SUBLANG_ENGLISH_TRINIDAD 0x0b # endif # ifndef SUBLANG_ENGLISH_ZIMBABWE # define SUBLANG_ENGLISH_ZIMBABWE 0x0c # endif # ifndef SUBLANG_ENGLISH_PHILIPPINES # define SUBLANG_ENGLISH_PHILIPPINES 0x0d # endif # ifndef SUBLANG_ENGLISH_INDONESIA # define SUBLANG_ENGLISH_INDONESIA 0x0e # endif # ifndef SUBLANG_ENGLISH_HONGKONG # define SUBLANG_ENGLISH_HONGKONG 0x0f # endif # ifndef SUBLANG_ENGLISH_INDIA # define SUBLANG_ENGLISH_INDIA 0x10 # endif # ifndef SUBLANG_ENGLISH_MALAYSIA # define SUBLANG_ENGLISH_MALAYSIA 0x11 # endif # ifndef SUBLANG_ENGLISH_SINGAPORE # define SUBLANG_ENGLISH_SINGAPORE 0x12 # endif # ifndef SUBLANG_FRENCH_LUXEMBOURG # define SUBLANG_FRENCH_LUXEMBOURG 0x05 # endif # ifndef SUBLANG_FRENCH_MONACO # define SUBLANG_FRENCH_MONACO 0x06 # endif # ifndef SUBLANG_FRENCH_WESTINDIES # define SUBLANG_FRENCH_WESTINDIES 0x07 # endif # ifndef SUBLANG_FRENCH_REUNION # define SUBLANG_FRENCH_REUNION 0x08 # endif # ifndef SUBLANG_FRENCH_CONGO # define SUBLANG_FRENCH_CONGO 0x09 # endif # ifndef SUBLANG_FRENCH_SENEGAL # define SUBLANG_FRENCH_SENEGAL 0x0a # endif # ifndef SUBLANG_FRENCH_CAMEROON # define SUBLANG_FRENCH_CAMEROON 0x0b # endif # ifndef SUBLANG_FRENCH_COTEDIVOIRE # define SUBLANG_FRENCH_COTEDIVOIRE 0x0c # endif # ifndef SUBLANG_FRENCH_MALI # define SUBLANG_FRENCH_MALI 0x0d # endif # ifndef SUBLANG_FRENCH_MOROCCO # define SUBLANG_FRENCH_MOROCCO 0x0e # endif # ifndef SUBLANG_FRENCH_HAITI # define SUBLANG_FRENCH_HAITI 0x0f # endif # ifndef SUBLANG_GERMAN_LUXEMBOURG # define SUBLANG_GERMAN_LUXEMBOURG 0x04 # endif # ifndef SUBLANG_GERMAN_LIECHTENSTEIN # define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 # endif # ifndef SUBLANG_KASHMIRI_INDIA # define SUBLANG_KASHMIRI_INDIA 0x02 # endif # ifndef SUBLANG_MALAY_MALAYSIA # define SUBLANG_MALAY_MALAYSIA 0x01 # endif # ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM # define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 # endif # ifndef SUBLANG_NEPALI_INDIA # define SUBLANG_NEPALI_INDIA 0x02 # endif # ifndef SUBLANG_PUNJABI_INDIA # define SUBLANG_PUNJABI_INDIA 0x00 # endif # ifndef SUBLANG_PUNJABI_PAKISTAN # define SUBLANG_PUNJABI_PAKISTAN 0x01 # endif # ifndef SUBLANG_ROMANIAN_ROMANIA # define SUBLANG_ROMANIAN_ROMANIA 0x00 # endif # ifndef SUBLANG_ROMANIAN_MOLDOVA # define SUBLANG_ROMANIAN_MOLDOVA 0x01 # endif # ifndef SUBLANG_SERBIAN_LATIN # define SUBLANG_SERBIAN_LATIN 0x02 # endif # ifndef SUBLANG_SERBIAN_CYRILLIC # define SUBLANG_SERBIAN_CYRILLIC 0x03 # endif # ifndef SUBLANG_SINDHI_INDIA # define SUBLANG_SINDHI_INDIA 0x00 # endif # ifndef SUBLANG_SINDHI_PAKISTAN # define SUBLANG_SINDHI_PAKISTAN 0x01 # endif # ifndef SUBLANG_SPANISH_GUATEMALA # define SUBLANG_SPANISH_GUATEMALA 0x04 # endif # ifndef SUBLANG_SPANISH_COSTA_RICA # define SUBLANG_SPANISH_COSTA_RICA 0x05 # endif # ifndef SUBLANG_SPANISH_PANAMA # define SUBLANG_SPANISH_PANAMA 0x06 # endif # ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC # define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 # endif # ifndef SUBLANG_SPANISH_VENEZUELA # define SUBLANG_SPANISH_VENEZUELA 0x08 # endif # ifndef SUBLANG_SPANISH_COLOMBIA # define SUBLANG_SPANISH_COLOMBIA 0x09 # endif # ifndef SUBLANG_SPANISH_PERU # define SUBLANG_SPANISH_PERU 0x0a # endif # ifndef SUBLANG_SPANISH_ARGENTINA # define SUBLANG_SPANISH_ARGENTINA 0x0b # endif # ifndef SUBLANG_SPANISH_ECUADOR # define SUBLANG_SPANISH_ECUADOR 0x0c # endif # ifndef SUBLANG_SPANISH_CHILE # define SUBLANG_SPANISH_CHILE 0x0d # endif # ifndef SUBLANG_SPANISH_URUGUAY # define SUBLANG_SPANISH_URUGUAY 0x0e # endif # ifndef SUBLANG_SPANISH_PARAGUAY # define SUBLANG_SPANISH_PARAGUAY 0x0f # endif # ifndef SUBLANG_SPANISH_BOLIVIA # define SUBLANG_SPANISH_BOLIVIA 0x10 # endif # ifndef SUBLANG_SPANISH_EL_SALVADOR # define SUBLANG_SPANISH_EL_SALVADOR 0x11 # endif # ifndef SUBLANG_SPANISH_HONDURAS # define SUBLANG_SPANISH_HONDURAS 0x12 # endif # ifndef SUBLANG_SPANISH_NICARAGUA # define SUBLANG_SPANISH_NICARAGUA 0x13 # endif # ifndef SUBLANG_SPANISH_PUERTO_RICO # define SUBLANG_SPANISH_PUERTO_RICO 0x14 # endif # ifndef SUBLANG_SWEDISH_FINLAND # define SUBLANG_SWEDISH_FINLAND 0x02 # endif # ifndef SUBLANG_TAMAZIGHT_ARABIC # define SUBLANG_TAMAZIGHT_ARABIC 0x01 # endif # ifndef SUBLANG_TAMAZIGHT_LATIN # define SUBLANG_TAMAZIGHT_LATIN 0x02 # endif # ifndef SUBLANG_TIGRINYA_ETHIOPIA # define SUBLANG_TIGRINYA_ETHIOPIA 0x00 # endif # ifndef SUBLANG_TIGRINYA_ERITREA # define SUBLANG_TIGRINYA_ERITREA 0x01 # endif # ifndef SUBLANG_URDU_PAKISTAN # define SUBLANG_URDU_PAKISTAN 0x01 # endif # ifndef SUBLANG_URDU_INDIA # define SUBLANG_URDU_INDIA 0x02 # endif # ifndef SUBLANG_UZBEK_LATIN # define SUBLANG_UZBEK_LATIN 0x01 # endif # ifndef SUBLANG_UZBEK_CYRILLIC # define SUBLANG_UZBEK_CYRILLIC 0x02 # endif #endif /* XPG3 defines the result of 'setlocale (category, NULL)' as: "Directs 'setlocale()' to query 'category' and return the current setting of 'local'." However it does not specify the exact format. Neither do SUSV2 and ISO C 99. So we can use this feature only on selected systems (e.g. those using GNU C Library). */ #if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2) # define HAVE_LOCALE_NULL #endif /* Determine the current locale's name, and canonicalize it into XPG syntax language[_territory[.codeset]][@modifier] The codeset part in the result is not reliable; the locale_charset() should be used for codeset information instead. The result must not be freed; it is statically allocated. */ const char * _nl_locale_name (int category, const char *categoryname) { const char *retval; #ifndef WIN32 /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'. On some systems this can be done by the 'setlocale' function itself. */ # if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL retval = setlocale (category, NULL); # else /* Setting of LC_ALL overwrites all other. */ retval = getenv ("LC_ALL"); if (retval == NULL || retval[0] == '\0') { /* Next comes the name of the desired category. */ retval = getenv (categoryname); if (retval == NULL || retval[0] == '\0') { /* Last possibility is the LANG environment variable. */ retval = getenv ("LANG"); if (retval == NULL || retval[0] == '\0') /* We use C as the default domain. POSIX says this is implementation defined. */ retval = "C"; } } # endif return retval; #else /* WIN32 */ /* Return an XPG style locale name language[_territory][@modifier]. Don't even bother determining the codeset; it's not useful in this context, because message catalogs are not specific to a single codeset. */ LCID lcid; LANGID langid; int primary, sub; /* Let the user override the system settings through environment variables, as on POSIX systems. */ retval = getenv ("LC_ALL"); if (retval != NULL && retval[0] != '\0') return retval; retval = getenv (categoryname); if (retval != NULL && retval[0] != '\0') return retval; retval = getenv ("LANG"); if (retval != NULL && retval[0] != '\0') return retval; /* Use native Win32 API locale ID. */ lcid = GetThreadLocale (); /* Strip off the sorting rules, keep only the language part. */ langid = LANGIDFROMLCID (lcid); /* Split into language and territory part. */ primary = PRIMARYLANGID (langid); sub = SUBLANGID (langid); /* Dispatch on language. See also http://www.unicode.org/unicode/onlinedat/languages.html . For details about languages, see http://www.ethnologue.com/ . */ switch (primary) { case LANG_AFRIKAANS: return "af_ZA"; case LANG_ALBANIAN: return "sq_AL"; case LANG_AMHARIC: return "am_ET"; case LANG_ARABIC: switch (sub) { case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA"; case SUBLANG_ARABIC_IRAQ: return "ar_IQ"; case SUBLANG_ARABIC_EGYPT: return "ar_EG"; case SUBLANG_ARABIC_LIBYA: return "ar_LY"; case SUBLANG_ARABIC_ALGERIA: return "ar_DZ"; case SUBLANG_ARABIC_MOROCCO: return "ar_MA"; case SUBLANG_ARABIC_TUNISIA: return "ar_TN"; case SUBLANG_ARABIC_OMAN: return "ar_OM"; case SUBLANG_ARABIC_YEMEN: return "ar_YE"; case SUBLANG_ARABIC_SYRIA: return "ar_SY"; case SUBLANG_ARABIC_JORDAN: return "ar_JO"; case SUBLANG_ARABIC_LEBANON: return "ar_LB"; case SUBLANG_ARABIC_KUWAIT: return "ar_KW"; case SUBLANG_ARABIC_UAE: return "ar_AE"; case SUBLANG_ARABIC_BAHRAIN: return "ar_BH"; case SUBLANG_ARABIC_QATAR: return "ar_QA"; } return "ar"; case LANG_ARMENIAN: return "hy_AM"; case LANG_ASSAMESE: return "as_IN"; case LANG_AZERI: switch (sub) { /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */ case SUBLANG_AZERI_LATIN: return "az_AZ@latin"; case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic"; } return "az"; case LANG_BASQUE: return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */ case LANG_BELARUSIAN: return "be_BY"; case LANG_BENGALI: switch (sub) { case SUBLANG_BENGALI_INDIA: return "bn_IN"; case SUBLANG_BENGALI_BANGLADESH: return "bn_BD"; } return "bn"; case LANG_BULGARIAN: return "bg_BG"; case LANG_BURMESE: return "my_MM"; case LANG_CAMBODIAN: return "km_KH"; case LANG_CATALAN: return "ca_ES"; case LANG_CHEROKEE: return "chr_US"; case LANG_CHINESE: switch (sub) { case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW"; case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN"; case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; case SUBLANG_CHINESE_MACAU: return "zh_MO"; } return "zh"; case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN * What used to be called Serbo-Croatian * should really now be two separate * languages because of political reasons. * (Says tml, who knows nothing about Serbian * or Croatian.) * (I can feel those flames coming already.) */ switch (sub) { case SUBLANG_DEFAULT: return "hr_HR"; case SUBLANG_SERBIAN_LATIN: return "sr_CS"; case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic"; } return "hr"; case LANG_CZECH: return "cs_CZ"; case LANG_DANISH: return "da_DK"; case LANG_DIVEHI: return "dv_MV"; case LANG_DUTCH: switch (sub) { case SUBLANG_DUTCH: return "nl_NL"; case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE"; } return "nl"; case LANG_EDO: return "bin_NG"; case LANG_ENGLISH: switch (sub) { /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought * English was the language spoken in England. * Oh well. */ case SUBLANG_ENGLISH_US: return "en_US"; case SUBLANG_ENGLISH_UK: return "en_GB"; case SUBLANG_ENGLISH_AUS: return "en_AU"; case SUBLANG_ENGLISH_CAN: return "en_CA"; case SUBLANG_ENGLISH_NZ: return "en_NZ"; case SUBLANG_ENGLISH_EIRE: return "en_IE"; case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA"; case SUBLANG_ENGLISH_JAMAICA: return "en_JM"; case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */ case SUBLANG_ENGLISH_BELIZE: return "en_BZ"; case SUBLANG_ENGLISH_TRINIDAD: return "en_TT"; case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW"; case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH"; case SUBLANG_ENGLISH_INDONESIA: return "en_ID"; case SUBLANG_ENGLISH_HONGKONG: return "en_HK"; case SUBLANG_ENGLISH_INDIA: return "en_IN"; case SUBLANG_ENGLISH_MALAYSIA: return "en_MY"; case SUBLANG_ENGLISH_SINGAPORE: return "en_SG"; } return "en"; case LANG_ESTONIAN: return "et_EE"; case LANG_FAEROESE: return "fo_FO"; case LANG_FARSI: return "fa_IR"; case LANG_FINNISH: return "fi_FI"; case LANG_FRENCH: switch (sub) { case SUBLANG_FRENCH: return "fr_FR"; case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE"; case SUBLANG_FRENCH_CANADIAN: return "fr_CA"; case SUBLANG_FRENCH_SWISS: return "fr_CH"; case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU"; case SUBLANG_FRENCH_MONACO: return "fr_MC"; case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */ case SUBLANG_FRENCH_REUNION: return "fr_RE"; case SUBLANG_FRENCH_CONGO: return "fr_CG"; case SUBLANG_FRENCH_SENEGAL: return "fr_SN"; case SUBLANG_FRENCH_CAMEROON: return "fr_CM"; case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI"; case SUBLANG_FRENCH_MALI: return "fr_ML"; case SUBLANG_FRENCH_MOROCCO: return "fr_MA"; case SUBLANG_FRENCH_HAITI: return "fr_HT"; } return "fr"; case LANG_FRISIAN: return "fy_NL"; case LANG_FULFULDE: /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */ return "ff_NG"; case LANG_GAELIC: switch (sub) { case 0x01: /* SCOTTISH */ return "gd_GB"; case 0x02: /* IRISH */ return "ga_IE"; } return "C"; case LANG_GALICIAN: return "gl_ES"; case LANG_GEORGIAN: return "ka_GE"; case LANG_GERMAN: switch (sub) { case SUBLANG_GERMAN: return "de_DE"; case SUBLANG_GERMAN_SWISS: return "de_CH"; case SUBLANG_GERMAN_AUSTRIAN: return "de_AT"; case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU"; case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI"; } return "de"; case LANG_GREEK: return "el_GR"; case LANG_GUARANI: return "gn_PY"; case LANG_GUJARATI: return "gu_IN"; case LANG_HAUSA: return "ha_NG"; case LANG_HAWAIIAN: /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers) or Hawaii Creole English ("cpe_US", 600000 speakers)? */ return "cpe_US"; case LANG_HEBREW: return "he_IL"; case LANG_HINDI: return "hi_IN"; case LANG_HUNGARIAN: return "hu_HU"; case LANG_IBIBIO: return "nic_NG"; case LANG_ICELANDIC: return "is_IS"; case LANG_IGBO: return "ig_NG"; case LANG_INDONESIAN: return "id_ID"; case LANG_INUKTITUT: return "iu_CA"; case LANG_ITALIAN: switch (sub) { case SUBLANG_ITALIAN: return "it_IT"; case SUBLANG_ITALIAN_SWISS: return "it_CH"; } return "it"; case LANG_JAPANESE: return "ja_JP"; case LANG_KANNADA: return "kn_IN"; case LANG_KANURI: return "kr_NG"; case LANG_KASHMIRI: switch (sub) { case SUBLANG_DEFAULT: return "ks_PK"; case SUBLANG_KASHMIRI_INDIA: return "ks_IN"; } return "ks"; case LANG_KAZAK: return "kk_KZ"; case LANG_KONKANI: /* FIXME: Adjust this when such locales appear on Unix. */ return "kok_IN"; case LANG_KOREAN: return "ko_KR"; case LANG_KYRGYZ: return "ky_KG"; case LANG_LAO: return "lo_LA"; case LANG_LATIN: return "la_VA"; case LANG_LATVIAN: return "lv_LV"; case LANG_LITHUANIAN: return "lt_LT"; case LANG_MACEDONIAN: return "mk_MK"; case LANG_MALAY: switch (sub) { case SUBLANG_MALAY_MALAYSIA: return "ms_MY"; case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN"; } return "ms"; case LANG_MALAYALAM: return "ml_IN"; case LANG_MALTESE: return "mt_MT"; case LANG_MANIPURI: /* FIXME: Adjust this when such locales appear on Unix. */ return "mni_IN"; case LANG_MARATHI: return "mr_IN"; case LANG_MONGOLIAN: return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */ case LANG_NEPALI: switch (sub) { case SUBLANG_DEFAULT: return "ne_NP"; case SUBLANG_NEPALI_INDIA: return "ne_IN"; } return "ne"; case LANG_NORWEGIAN: switch (sub) { case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO"; case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO"; } return "no"; case LANG_ORIYA: return "or_IN"; case LANG_OROMO: return "om_ET"; case LANG_PAPIAMENTU: return "pap_AN"; case LANG_PASHTO: return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */ case LANG_POLISH: return "pl_PL"; case LANG_PORTUGUESE: switch (sub) { case SUBLANG_PORTUGUESE: return "pt_PT"; /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT. Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */ case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR"; } return "pt"; case LANG_PUNJABI: switch (sub) { case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */ case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */ } return "pa"; case LANG_RHAETO_ROMANCE: return "rm_CH"; case LANG_ROMANIAN: switch (sub) { case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO"; case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD"; } return "ro"; case LANG_RUSSIAN: return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */ case LANG_SAAMI: /* actually Northern Sami */ return "se_NO"; case LANG_SANSKRIT: return "sa_IN"; case LANG_SINDHI: switch (sub) { case SUBLANG_SINDHI_INDIA: return "sd_IN"; case SUBLANG_SINDHI_PAKISTAN: return "sd_PK"; } return "sd"; case LANG_SINHALESE: return "si_LK"; case LANG_SLOVAK: return "sk_SK"; case LANG_SLOVENIAN: return "sl_SI"; case LANG_SOMALI: return "so_SO"; case LANG_SORBIAN: /* FIXME: Adjust this when such locales appear on Unix. */ return "wen_DE"; case LANG_SPANISH: switch (sub) { case SUBLANG_SPANISH: return "es_ES"; case SUBLANG_SPANISH_MEXICAN: return "es_MX"; case SUBLANG_SPANISH_MODERN: return "es_ES@modern"; /* not seen on Unix */ case SUBLANG_SPANISH_GUATEMALA: return "es_GT"; case SUBLANG_SPANISH_COSTA_RICA: return "es_CR"; case SUBLANG_SPANISH_PANAMA: return "es_PA"; case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO"; case SUBLANG_SPANISH_VENEZUELA: return "es_VE"; case SUBLANG_SPANISH_COLOMBIA: return "es_CO"; case SUBLANG_SPANISH_PERU: return "es_PE"; case SUBLANG_SPANISH_ARGENTINA: return "es_AR"; case SUBLANG_SPANISH_ECUADOR: return "es_EC"; case SUBLANG_SPANISH_CHILE: return "es_CL"; case SUBLANG_SPANISH_URUGUAY: return "es_UY"; case SUBLANG_SPANISH_PARAGUAY: return "es_PY"; case SUBLANG_SPANISH_BOLIVIA: return "es_BO"; case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV"; case SUBLANG_SPANISH_HONDURAS: return "es_HN"; case SUBLANG_SPANISH_NICARAGUA: return "es_NI"; case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR"; } return "es"; case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */ case LANG_SWAHILI: return "sw_KE"; case LANG_SWEDISH: switch (sub) { case SUBLANG_DEFAULT: return "sv_SE"; case SUBLANG_SWEDISH_FINLAND: return "sv_FI"; } return "sv"; case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */ case LANG_TAGALOG: return "tl_PH"; case LANG_TAJIK: return "tg_TJ"; case LANG_TAMAZIGHT: switch (sub) { /* FIXME: Adjust this when Tamazight locales appear on Unix. */ case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic"; case SUBLANG_TAMAZIGHT_LATIN: return "ber_MA@latin"; } return "ber_MA"; case LANG_TAMIL: return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */ case LANG_TATAR: return "tt_RU"; case LANG_TELUGU: return "te_IN"; case LANG_THAI: return "th_TH"; case LANG_TIBETAN: return "bo_CN"; case LANG_TIGRINYA: switch (sub) { case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET"; case SUBLANG_TIGRINYA_ERITREA: return "ti_ER"; } return "ti"; case LANG_TSONGA: return "ts_ZA"; case LANG_TSWANA: return "tn_BW"; case LANG_TURKISH: return "tr_TR"; case LANG_TURKMEN: return "tk_TM"; case LANG_UKRAINIAN: return "uk_UA"; case LANG_URDU: switch (sub) { case SUBLANG_URDU_PAKISTAN: return "ur_PK"; case SUBLANG_URDU_INDIA: return "ur_IN"; } return "ur"; case LANG_UZBEK: switch (sub) { case SUBLANG_UZBEK_LATIN: return "uz_UZ"; case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic"; } return "uz"; case LANG_VENDA: return "ve_ZA"; case LANG_VIETNAMESE: return "vi_VN"; case LANG_WELSH: return "cy_GB"; case LANG_XHOSA: return "xh_ZA"; case LANG_YI: return "sit_CN"; case LANG_YIDDISH: return "yi_IL"; case LANG_YORUBA: return "yo_NG"; case LANG_ZULU: return "zu_ZA"; default: return "C"; } #endif } realtimebattle-1.0.8/intl/log.c0000644000175000017500000000530310170545360014545 0ustar moimoi/* Log file output. Copyright (C) 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ /* Written by Bruno Haible . */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include /* Print an ASCII string with quotes and escape sequences where needed. */ static void print_escaped (FILE *stream, const char *str) { putc ('"', stream); for (; *str != '\0'; str++) if (*str == '\n') { fputs ("\\n\"", stream); if (str[1] == '\0') return; fputs ("\n\"", stream); } else { if (*str == '"' || *str == '\\') putc ('\\', stream); putc (*str, stream); } putc ('"', stream); } /* Add to the log file an entry denoting a failed translation. */ void _nl_log_untranslated (const char *logfilename, const char *domainname, const char *msgid1, const char *msgid2, int plural) { static char *last_logfilename = NULL; static FILE *last_logfile = NULL; FILE *logfile; /* Can we reuse the last opened logfile? */ if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0) { /* Close the last used logfile. */ if (last_logfilename != NULL) { if (last_logfile != NULL) { fclose (last_logfile); last_logfile = NULL; } free (last_logfilename); last_logfilename = NULL; } /* Open the logfile. */ last_logfilename = (char *) malloc (strlen (logfilename) + 1); if (last_logfilename == NULL) return; strcpy (last_logfilename, logfilename); last_logfile = fopen (logfilename, "a"); if (last_logfile == NULL) return; } logfile = last_logfile; fprintf (logfile, "domain "); print_escaped (logfile, domainname); fprintf (logfile, "\nmsgid "); print_escaped (logfile, msgid1); if (plural) { fprintf (logfile, "\nmsgid_plural "); print_escaped (logfile, msgid2); fprintf (logfile, "\nmsgstr[0] \"\"\n"); } else fprintf (logfile, "\nmsgstr \"\"\n"); putc ('\n', logfile); } realtimebattle-1.0.8/intl/printf.c0000644000175000017500000001717710170545360015302 0ustar moimoi/* Formatted output to strings, using POSIX/XSI format strings with positions. Copyright (C) 2003 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif #ifdef __GNUC__ # define alloca __builtin_alloca # define HAVE_ALLOCA 1 #else # ifdef _MSC_VER # include # define alloca _alloca # else # if defined HAVE_ALLOCA_H || defined _LIBC # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca char *alloca (); # endif # endif # endif # endif #endif #include #if !HAVE_POSIX_PRINTF #include #include /* When building a DLL, we must export some functions. Note that because the functions are only defined for binary backward compatibility, we don't need to use __declspec(dllimport) in any case. */ #if defined _MSC_VER && BUILDING_DLL # define DLL_EXPORTED __declspec(dllexport) #else # define DLL_EXPORTED #endif #define STATIC static /* Define auxiliary functions declared in "printf-args.h". */ #include "printf-args.c" /* Define auxiliary functions declared in "printf-parse.h". */ #include "printf-parse.c" /* Define functions declared in "vasnprintf.h". */ #define vasnprintf libintl_vasnprintf #include "vasnprintf.c" #if 0 /* not needed */ #define asnprintf libintl_asnprintf #include "asnprintf.c" #endif DLL_EXPORTED int libintl_vfprintf (FILE *stream, const char *format, va_list args) { if (strchr (format, '$') == NULL) return vfprintf (stream, format, args); else { size_t length; char *result = libintl_vasnprintf (NULL, &length, format, args); int retval = -1; if (result != NULL) { if (fwrite (result, 1, length, stream) == length) retval = length; free (result); } return retval; } } DLL_EXPORTED int libintl_fprintf (FILE *stream, const char *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vfprintf (stream, format, args); va_end (args); return retval; } DLL_EXPORTED int libintl_vprintf (const char *format, va_list args) { return libintl_vfprintf (stdout, format, args); } DLL_EXPORTED int libintl_printf (const char *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vprintf (format, args); va_end (args); return retval; } DLL_EXPORTED int libintl_vsprintf (char *resultbuf, const char *format, va_list args) { if (strchr (format, '$') == NULL) return vsprintf (resultbuf, format, args); else { size_t length = (size_t) ~0 / (4 * sizeof (char)); char *result = libintl_vasnprintf (resultbuf, &length, format, args); if (result != resultbuf) { free (result); return -1; } else return length; } } DLL_EXPORTED int libintl_sprintf (char *resultbuf, const char *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vsprintf (resultbuf, format, args); va_end (args); return retval; } #if HAVE_SNPRINTF # if HAVE_DECL__SNPRINTF /* Windows. */ # define system_vsnprintf _vsnprintf # else /* Unix. */ # define system_vsnprintf vsnprintf # endif DLL_EXPORTED int libintl_vsnprintf (char *resultbuf, size_t length, const char *format, va_list args) { if (strchr (format, '$') == NULL) return system_vsnprintf (resultbuf, length, format, args); else { size_t maxlength = length; char *result = libintl_vasnprintf (resultbuf, &length, format, args); if (result != resultbuf) { if (maxlength > 0) { if (length < maxlength) abort (); memcpy (resultbuf, result, maxlength - 1); resultbuf[maxlength - 1] = '\0'; } free (result); return -1; } else return length; } } DLL_EXPORTED int libintl_snprintf (char *resultbuf, size_t length, const char *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vsnprintf (resultbuf, length, format, args); va_end (args); return retval; } #endif #if HAVE_ASPRINTF DLL_EXPORTED int libintl_vasprintf (char **resultp, const char *format, va_list args) { size_t length; char *result = libintl_vasnprintf (NULL, &length, format, args); if (result == NULL) return -1; *resultp = result; return length; } DLL_EXPORTED int libintl_asprintf (char **resultp, const char *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vasprintf (resultp, format, args); va_end (args); return retval; } #endif #if HAVE_FWPRINTF #include #define WIDE_CHAR_VERSION 1 /* Define auxiliary functions declared in "wprintf-parse.h". */ #include "printf-parse.c" /* Define functions declared in "vasnprintf.h". */ #define vasnwprintf libintl_vasnwprintf #include "vasnprintf.c" #if 0 /* not needed */ #define asnwprintf libintl_asnwprintf #include "asnprintf.c" #endif # if HAVE_DECL__SNWPRINTF /* Windows. */ # define system_vswprintf _vsnwprintf # else /* Unix. */ # define system_vswprintf vswprintf # endif DLL_EXPORTED int libintl_vfwprintf (FILE *stream, const wchar_t *format, va_list args) { if (wcschr (format, '$') == NULL) return vfwprintf (stream, format, args); else { size_t length; wchar_t *result = libintl_vasnwprintf (NULL, &length, format, args); int retval = -1; if (result != NULL) { size_t i; for (i = 0; i < length; i++) if (fputwc (result[i], stream) == WEOF) break; if (i == length) retval = length; free (result); } return retval; } } DLL_EXPORTED int libintl_fwprintf (FILE *stream, const wchar_t *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vfwprintf (stream, format, args); va_end (args); return retval; } DLL_EXPORTED int libintl_vwprintf (const wchar_t *format, va_list args) { return libintl_vfwprintf (stdout, format, args); } DLL_EXPORTED int libintl_wprintf (const wchar_t *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vwprintf (format, args); va_end (args); return retval; } DLL_EXPORTED int libintl_vswprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, va_list args) { if (wcschr (format, '$') == NULL) return system_vswprintf (resultbuf, length, format, args); else { size_t maxlength = length; wchar_t *result = libintl_vasnwprintf (resultbuf, &length, format, args); if (result != resultbuf) { if (maxlength > 0) { if (length < maxlength) abort (); memcpy (resultbuf, result, (maxlength - 1) * sizeof (wchar_t)); resultbuf[maxlength - 1] = 0; } free (result); return -1; } else return length; } } DLL_EXPORTED int libintl_swprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vswprintf (resultbuf, length, format, args); va_end (args); return retval; } #endif #endif realtimebattle-1.0.8/intl/osdep.c0000644000175000017500000000164310170545360015101 0ustar moimoi/* OS dependent parts of libintl. Copyright (C) 2001-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #if defined __EMX__ # include "os2compat.c" #else /* Avoid AIX compiler warning. */ typedef int dummy; #endif realtimebattle-1.0.8/intl/os2compat.c0000644000175000017500000000550310170545360015675 0ustar moimoi/* OS/2 compatibility functions. Copyright (C) 2001-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #define OS2_AWARE #ifdef HAVE_CONFIG_H #include #endif #include #include #include /* A version of getenv() that works from DLLs */ extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue); char * _nl_getenv (const char *name) { unsigned char *value; if (DosScanEnv (name, &value)) return NULL; else return value; } /* A fixed size buffer. */ char libintl_nl_default_dirname[MAXPATHLEN+1]; char *_nlos2_libdir = NULL; char *_nlos2_localealiaspath = NULL; char *_nlos2_localedir = NULL; static __attribute__((constructor)) void nlos2_initialize () { char *root = getenv ("UNIXROOT"); char *gnulocaledir = getenv ("GNULOCALEDIR"); _nlos2_libdir = gnulocaledir; if (!_nlos2_libdir) { if (root) { size_t sl = strlen (root); _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1); memcpy (_nlos2_libdir, root, sl); memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1); } else _nlos2_libdir = LIBDIR; } _nlos2_localealiaspath = gnulocaledir; if (!_nlos2_localealiaspath) { if (root) { size_t sl = strlen (root); _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1); memcpy (_nlos2_localealiaspath, root, sl); memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1); } else _nlos2_localealiaspath = LOCALE_ALIAS_PATH; } _nlos2_localedir = gnulocaledir; if (!_nlos2_localedir) { if (root) { size_t sl = strlen (root); _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1); memcpy (_nlos2_localedir, root, sl); memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1); } else _nlos2_localedir = LOCALEDIR; } if (strlen (_nlos2_localedir) <= MAXPATHLEN) strcpy (libintl_nl_default_dirname, _nlos2_localedir); } realtimebattle-1.0.8/intl/intl-compat.c0000644000175000017500000000644310170545360016221 0ustar moimoi/* intl-compat.c - Stub functions to call gettext functions from GNU gettext Library. Copyright (C) 1995, 2000-2003 Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ #ifdef HAVE_CONFIG_H # include #endif #include "gettextP.h" /* @@ end of prolog @@ */ /* This file redirects the gettext functions (without prefix) to those defined in the included GNU libintl library (with "libintl_" prefix). It is compiled into libintl in order to make the AM_GNU_GETTEXT test of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which has the redirections primarily in the include file. It is also compiled into libgnuintl so that libgnuintl.so can be used as LD_PRELOADable library on glibc systems, to provide the extra features that the functions in the libc don't have (namely, logging). */ #undef gettext #undef dgettext #undef dcgettext #undef ngettext #undef dngettext #undef dcngettext #undef textdomain #undef bindtextdomain #undef bind_textdomain_codeset /* When building a DLL, we must export some functions. Note that because the functions are only defined for binary backward compatibility, we don't need to use __declspec(dllimport) in any case. */ #if defined _MSC_VER && BUILDING_DLL # define DLL_EXPORTED __declspec(dllexport) #else # define DLL_EXPORTED #endif DLL_EXPORTED char * gettext (const char *msgid) { return libintl_gettext (msgid); } DLL_EXPORTED char * dgettext (const char *domainname, const char *msgid) { return libintl_dgettext (domainname, msgid); } DLL_EXPORTED char * dcgettext (const char *domainname, const char *msgid, int category) { return libintl_dcgettext (domainname, msgid, category); } DLL_EXPORTED char * ngettext (const char *msgid1, const char *msgid2, unsigned long int n) { return libintl_ngettext (msgid1, msgid2, n); } DLL_EXPORTED char * dngettext (const char *domainname, const char *msgid1, const char *msgid2, unsigned long int n) { return libintl_dngettext (domainname, msgid1, msgid2, n); } DLL_EXPORTED char * dcngettext (const char *domainname, const char *msgid1, const char *msgid2, unsigned long int n, int category) { return libintl_dcngettext (domainname, msgid1, msgid2, n, category); } DLL_EXPORTED char * textdomain (const char *domainname) { return libintl_textdomain (domainname); } DLL_EXPORTED char * bindtextdomain (const char *domainname, const char *dirname) { return libintl_bindtextdomain (domainname, dirname); } DLL_EXPORTED char * bind_textdomain_codeset (const char *domainname, const char *codeset) { return libintl_bind_textdomain_codeset (domainname, codeset); } realtimebattle-1.0.8/intl/plural.c0000644000175000017500000011065110170545360015266 0ustar moimoi/* A Bison parser, made from plural.y by GNU bison 1.35. */ #define YYBISON 1 /* Identify Bison output. */ #define yyparse __gettextparse #define yylex __gettextlex #define yyerror __gettexterror #define yylval __gettextlval #define yychar __gettextchar #define yydebug __gettextdebug #define yynerrs __gettextnerrs # define EQUOP2 257 # define CMPOP2 258 # define ADDOP2 259 # define MULOP2 260 # define NUMBER 261 #line 1 "plural.y" /* Expression parsing for plural form selection. Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library 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. */ /* The bison generated parser uses alloca. AIX 3 forces us to put this declaration at the beginning of the file. The declaration in bison's skeleton file comes too late. This must come before because may include arbitrary system headers. */ #if defined _AIX && !defined __GNUC__ #pragma alloca #endif #ifdef HAVE_CONFIG_H # include #endif #include #include #include "plural-exp.h" /* The main function generated by the parser is called __gettextparse, but we want it to be called PLURAL_PARSE. */ #ifndef _LIBC # define __gettextparse PLURAL_PARSE #endif #define YYLEX_PARAM &((struct parse_args *) arg)->cp #define YYPARSE_PARAM arg #line 49 "plural.y" #ifndef YYSTYPE typedef union { unsigned long int num; enum operator op; struct expression *exp; } yystype; # define YYSTYPE yystype # define YYSTYPE_IS_TRIVIAL 1 #endif #line 55 "plural.y" /* Prototypes for local functions. */ static int yylex (YYSTYPE *lval, const char **pexp); static void yyerror (const char *str); /* Allocation of expressions. */ static struct expression * new_exp (int nargs, enum operator op, struct expression * const *args) { int i; struct expression *newp; /* If any of the argument could not be malloc'ed, just return NULL. */ for (i = nargs - 1; i >= 0; i--) if (args[i] == NULL) goto fail; /* Allocate a new expression. */ newp = (struct expression *) malloc (sizeof (*newp)); if (newp != NULL) { newp->nargs = nargs; newp->operation = op; for (i = nargs - 1; i >= 0; i--) newp->val.args[i] = args[i]; return newp; } fail: for (i = nargs - 1; i >= 0; i--) FREE_EXPRESSION (args[i]); return NULL; } static inline struct expression * new_exp_0 (enum operator op) { return new_exp (0, op, NULL); } static inline struct expression * new_exp_1 (enum operator op, struct expression *right) { struct expression *args[1]; args[0] = right; return new_exp (1, op, args); } static struct expression * new_exp_2 (enum operator op, struct expression *left, struct expression *right) { struct expression *args[2]; args[0] = left; args[1] = right; return new_exp (2, op, args); } static inline struct expression * new_exp_3 (enum operator op, struct expression *bexp, struct expression *tbranch, struct expression *fbranch) { struct expression *args[3]; args[0] = bexp; args[1] = tbranch; args[2] = fbranch; return new_exp (3, op, args); } #ifndef YYDEBUG # define YYDEBUG 0 #endif #define YYFINAL 27 #define YYFLAG -32768 #define YYNTBASE 16 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ #define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18) /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 2, 2, 2, 2, 5, 2, 14, 15, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 12, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 6, 7, 8, 9, 11 }; #if YYDEBUG static const short yyprhs[] = { 0, 0, 2, 8, 12, 16, 20, 24, 28, 32, 35, 37, 39 }; static const short yyrhs[] = { 17, 0, 17, 3, 17, 12, 17, 0, 17, 4, 17, 0, 17, 5, 17, 0, 17, 6, 17, 0, 17, 7, 17, 0, 17, 8, 17, 0, 17, 9, 17, 0, 10, 17, 0, 13, 0, 11, 0, 14, 17, 15, 0 }; #endif #if YYDEBUG /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { 0, 150, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 199 }; #endif #if (YYDEBUG) || defined YYERROR_VERBOSE /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ static const char *const yytname[] = { "$", "error", "$undefined.", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2", "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'", "start", "exp", 0 }; #endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const short yyr1[] = { 0, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const short yyr2[] = { 0, 1, 5, 3, 3, 3, 3, 3, 3, 2, 1, 1, 3 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const short yydefact[] = { 0, 0, 11, 10, 0, 1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 3, 4, 5, 6, 7, 8, 0, 2, 0, 0, 0 }; static const short yydefgoto[] = { 25, 5 }; static const short yypact[] = { -9, -9,-32768,-32768, -9, 34,-32768, 11, -9, -9, -9, -9, -9, -9, -9,-32768, 24, 39, 43, 16, 26, -3,-32768, -9, 34, 21, 53,-32768 }; static const short yypgoto[] = { -32768, -1 }; #define YYLAST 53 static const short yytable[] = { 6, 1, 2, 7, 3, 4, 14, 16, 17, 18, 19, 20, 21, 22, 8, 9, 10, 11, 12, 13, 14, 26, 24, 12, 13, 14, 15, 8, 9, 10, 11, 12, 13, 14, 13, 14, 23, 8, 9, 10, 11, 12, 13, 14, 10, 11, 12, 13, 14, 11, 12, 13, 14, 27 }; static const short yycheck[] = { 1, 10, 11, 4, 13, 14, 9, 8, 9, 10, 11, 12, 13, 14, 3, 4, 5, 6, 7, 8, 9, 0, 23, 7, 8, 9, 15, 3, 4, 5, 6, 7, 8, 9, 8, 9, 12, 3, 4, 5, 6, 7, 8, 9, 5, 6, 7, 8, 9, 6, 7, 8, 9, 0 }; #define YYPURE 1 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/local/share/bison/bison.simple" /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 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, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) /* The parser invokes alloca or malloc; define the necessary symbols. */ # if YYSTACK_USE_ALLOCA # define YYSTACK_ALLOC alloca # else # ifndef YYSTACK_USE_ALLOCA # if defined (alloca) || defined (_ALLOCA_H) # define YYSTACK_ALLOC alloca # else # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else # if defined (__STDC__) || defined (__cplusplus) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif # define YYSTACK_ALLOC malloc # define YYSTACK_FREE free # endif #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ #if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { short yyss; YYSTYPE yyvs; # if YYLSP_NEEDED YYLTYPE yyls; # endif }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # if YYLSP_NEEDED # define YYSTACK_BYTES(N) \ ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAX) # else # define YYSTACK_BYTES(N) \ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAX) # endif /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ register YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (0) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif #if ! defined (YYSIZE_T) && defined (size_t) # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) # if defined (__STDC__) || defined (__cplusplus) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif #endif #if ! defined (YYSIZE_T) # define YYSIZE_T unsigned int #endif #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ yyerror ("syntax error: cannot back up"); \ YYERROR; \ } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Compute the default location (before the actions are run). When YYLLOC_DEFAULT is run, CURRENT is set the location of the first token. By default, to implement support for ranges, extend its range to the last symbol. */ #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ Current.last_line = Rhs[N].last_line; \ Current.last_column = Rhs[N].last_column; #endif /* YYLEX -- calling `yylex' with the right arguments. */ #if YYPURE # if YYLSP_NEEDED # ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) # else # define YYLEX yylex (&yylval, &yylloc) # endif # else /* !YYLSP_NEEDED */ # ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, YYLEX_PARAM) # else # define YYLEX yylex (&yylval) # endif # endif /* !YYLSP_NEEDED */ #else /* !YYPURE */ # define YYLEX yylex () #endif /* !YYPURE */ /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #if YYMAXDEPTH == 0 # undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #ifdef YYERROR_VERBOSE # ifndef yystrlen # if defined (__GLIBC__) && defined (_STRING_H) # define yystrlen strlen # else /* Return the length of YYSTR. */ static YYSIZE_T # if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) # else yystrlen (yystr) const char *yystr; # endif { register const char *yys = yystr; while (*yys++ != '\0') continue; return yys - yystr - 1; } # endif # endif # ifndef yystpcpy # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * # if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) # else yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; # endif { register char *yyd = yydest; register const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif #endif #line 315 "/usr/local/share/bison/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM # define YYPARSE_PARAM_DECL # else # define YYPARSE_PARAM_ARG YYPARSE_PARAM # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; # endif #else /* !YYPARSE_PARAM */ # define YYPARSE_PARAM_ARG # define YYPARSE_PARAM_DECL #endif /* !YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ # ifdef YYPARSE_PARAM int yyparse (void *); # else int yyparse (void); # endif #endif /* YY_DECL_VARIABLES -- depending whether we use a pure parser, variables are global, or local to YYPARSE. */ #define YY_DECL_NON_LSP_VARIABLES \ /* The lookahead symbol. */ \ int yychar; \ \ /* The semantic value of the lookahead symbol. */ \ YYSTYPE yylval; \ \ /* Number of parse errors so far. */ \ int yynerrs; #if YYLSP_NEEDED # define YY_DECL_VARIABLES \ YY_DECL_NON_LSP_VARIABLES \ \ /* Location data for the lookahead symbol. */ \ YYLTYPE yylloc; #else # define YY_DECL_VARIABLES \ YY_DECL_NON_LSP_VARIABLES #endif /* If nonreentrant, generate the variables here. */ #if !YYPURE YY_DECL_VARIABLES #endif /* !YYPURE */ int yyparse (YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { /* If reentrant, generate the variables here. */ #if YYPURE YY_DECL_VARIABLES #endif /* !YYPURE */ register int yystate; register int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ int yychar1 = 0; /* Three stacks and their tools: `yyss': related to states, `yyvs': related to semantic values, `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; #if YYLSP_NEEDED /* The location stack. */ YYLTYPE yylsa[YYINITDEPTH]; YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #endif #if YYLSP_NEEDED # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else # define YYPOPSTACK (yyvsp--, yyssp--) #endif YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYLSP_NEEDED YYLTYPE yyloc; #endif /* When reducing, the number of symbols on the RHS of the reduced rule. */ int yylen; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; #if YYLSP_NEEDED yylsp = yyls; #endif goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ # if YYLSP_NEEDED YYLTYPE *yyls1 = yyls; /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yyls1, yysize * sizeof (*yylsp), &yystacksize); yyls = yyls1; # else yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); # endif yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyoverflowlab; # else /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) goto yyoverflowlab; yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; { short *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); # if YYLSP_NEEDED YYSTACK_RELOCATE (yyls); # endif # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; #if YYLSP_NEEDED yylsp = yyls + yysize - 1; #endif YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyssp >= yyss + yystacksize - 1) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yychar1 = YYTRANSLATE (yychar); #if YYDEBUG /* We have to keep this `#if YYDEBUG', since we use variables which are defined only if `YYDEBUG' is set. */ if (yydebug) { YYFPRINTF (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ # ifdef YYPRINT YYPRINT (stderr, yychar, yylval); # endif YYFPRINTF (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ YYDPRINTF ((stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #if YYLSP_NEEDED *++yylsp = yylloc; #endif /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to the semantic value of the lookahead token. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; #if YYLSP_NEEDED /* Similarly for the default location. Let the user run additional commands if for instance locations are ranges. */ yyloc = yylsp[1-yylen]; YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); #endif #if YYDEBUG /* We have to keep this `#if YYDEBUG', since we use variables which are defined only if `YYDEBUG' is set. */ if (yydebug) { int yyi; YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 1: #line 151 "plural.y" { if (yyvsp[0].exp == NULL) YYABORT; ((struct parse_args *) arg)->res = yyvsp[0].exp; } break; case 2: #line 159 "plural.y" { yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp); } break; case 3: #line 163 "plural.y" { yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp); } break; case 4: #line 167 "plural.y" { yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp); } break; case 5: #line 171 "plural.y" { yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); } break; case 6: #line 175 "plural.y" { yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); } break; case 7: #line 179 "plural.y" { yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); } break; case 8: #line 183 "plural.y" { yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); } break; case 9: #line 187 "plural.y" { yyval.exp = new_exp_1 (lnot, yyvsp[0].exp); } break; case 10: #line 191 "plural.y" { yyval.exp = new_exp_0 (var); } break; case 11: #line 195 "plural.y" { if ((yyval.exp = new_exp_0 (num)) != NULL) yyval.exp->val.num = yyvsp[0].num; } break; case 12: #line 200 "plural.y" { yyval.exp = yyvsp[-1].exp; } break; } #line 705 "/usr/local/share/bison/bison.simple" yyvsp -= yylen; yyssp -= yylen; #if YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG if (yydebug) { short *yyssp1 = yyss - 1; YYFPRINTF (stderr, "state stack now"); while (yyssp1 != yyssp) YYFPRINTF (stderr, " %d", *++yyssp1); YYFPRINTF (stderr, "\n"); } #endif *++yyvsp = yyval; #if YYLSP_NEEDED *++yylsp = yyloc; #endif /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { YYSIZE_T yysize = 0; char *yymsg; int yyx, yycount; yycount = 0; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) if (yycheck[yyx + yyn] == yyx) yysize += yystrlen (yytname[yyx]) + 15, yycount++; yysize += yystrlen ("parse error, unexpected ") + 1; yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { char *yyp = yystpcpy (yymsg, "parse error, unexpected "); yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); if (yycount < 5) { yycount = 0; for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) if (yycheck[yyx + yyn] == yyx) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); yyp = yystpcpy (yyp, yytname[yyx]); yycount++; } } yyerror (yymsg); YYSTACK_FREE (yymsg); } else yyerror ("parse error; also virtual memory exhausted"); } else #endif /* defined (YYERROR_VERBOSE) */ yyerror ("parse error"); } goto yyerrlab1; /*--------------------------------------------------. | yyerrlab1 -- error raised explicitly by an action | `--------------------------------------------------*/ yyerrlab1: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; YYDPRINTF ((stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1])); yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; /*-------------------------------------------------------------------. | yyerrdefault -- current state does not do anything special for the | | error token. | `-------------------------------------------------------------------*/ yyerrdefault: #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ /* If its default is to accept any token, ok. Otherwise pop it. */ yyn = yydefact[yystate]; if (yyn) goto yydefault; #endif /*---------------------------------------------------------------. | yyerrpop -- pop the current state because it cannot handle the | | error token | `---------------------------------------------------------------*/ yyerrpop: if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #if YYLSP_NEEDED yylsp--; #endif #if YYDEBUG if (yydebug) { short *yyssp1 = yyss - 1; YYFPRINTF (stderr, "Error: state stack now"); while (yyssp1 != yyssp) YYFPRINTF (stderr, " %d", *++yyssp1); YYFPRINTF (stderr, "\n"); } #endif /*--------------. | yyerrhandle. | `--------------*/ yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; #if YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; /*---------------------------------------------. | yyoverflowab -- parser overflow comes here. | `---------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ yyreturn: #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif return yyresult; } #line 205 "plural.y" void internal_function FREE_EXPRESSION (struct expression *exp) { if (exp == NULL) return; /* Handle the recursive case. */ switch (exp->nargs) { case 3: FREE_EXPRESSION (exp->val.args[2]); /* FALLTHROUGH */ case 2: FREE_EXPRESSION (exp->val.args[1]); /* FALLTHROUGH */ case 1: FREE_EXPRESSION (exp->val.args[0]); /* FALLTHROUGH */ default: break; } free (exp); } static int yylex (YYSTYPE *lval, const char **pexp) { const char *exp = *pexp; int result; while (1) { if (exp[0] == '\0') { *pexp = exp; return YYEOF; } if (exp[0] != ' ' && exp[0] != '\t') break; ++exp; } result = *exp++; switch (result) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { unsigned long int n = result - '0'; while (exp[0] >= '0' && exp[0] <= '9') { n *= 10; n += exp[0] - '0'; ++exp; } lval->num = n; result = NUMBER; } break; case '=': if (exp[0] == '=') { ++exp; lval->op = equal; result = EQUOP2; } else result = YYERRCODE; break; case '!': if (exp[0] == '=') { ++exp; lval->op = not_equal; result = EQUOP2; } break; case '&': case '|': if (exp[0] == result) ++exp; else result = YYERRCODE; break; case '<': if (exp[0] == '=') { ++exp; lval->op = less_or_equal; } else lval->op = less_than; result = CMPOP2; break; case '>': if (exp[0] == '=') { ++exp; lval->op = greater_or_equal; } else lval->op = greater_than; result = CMPOP2; break; case '*': lval->op = mult; result = MULOP2; break; case '/': lval->op = divide; result = MULOP2; break; case '%': lval->op = module; result = MULOP2; break; case '+': lval->op = plus; result = ADDOP2; break; case '-': lval->op = minus; result = ADDOP2; break; case 'n': case '?': case ':': case '(': case ')': /* Nothing, just return the character. */ break; case ';': case '\n': case '\0': /* Be safe and let the user call this function again. */ --exp; result = YYEOF; break; default: result = YYERRCODE; #if YYDEBUG != 0 --exp; #endif break; } *pexp = exp; return result; } static void yyerror (const char *str) { /* Do nothing. We don't print error messages here. */ } realtimebattle-1.0.8/intl/VERSION0000644000175000017500000000005010170545360014662 0ustar moimoiGNU gettext library from gettext-0.14.1 realtimebattle-1.0.8/m4/0002755000175000017500000000000010404234035013165 5ustar moimoirealtimebattle-1.0.8/m4/codeset.m40000644000175000017500000000157610170545360015072 0ustar moimoi# codeset.m4 serial AM1 (gettext-0.10.40) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, [AC_TRY_LINK([#include ], [char* cs = nl_langinfo(CODESET);], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE(HAVE_LANGINFO_CODESET, 1, [Define if you have and nl_langinfo(CODESET).]) fi ]) realtimebattle-1.0.8/m4/gettext.m40000644000175000017500000004513010170545360015122 0ustar moimoi# gettext.m4 serial 28 (gettext-0.13) dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define(gt_included_intl, ifelse([$1], [external], [no], [yes])) define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Set USE_NLS. AM_NLS ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. dnl Add a version number to the cache macros. define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, [AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], gt_cv_func_gnugettext_libc=yes, gt_cv_func_gnugettext_libc=no)]) if test "$gt_cv_func_gnugettext_libc" != "yes"; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], gt_cv_func_gnugettext_libintl, [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias ();], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], gt_cv_func_gnugettext_libintl=yes, gt_cv_func_gnugettext_libintl=no) dnl Now see whether libintl exists and depends on libiconv. if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias ();], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" gt_cv_func_gnugettext_libintl=yes ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if test "$gt_cv_func_gnugettext_libc" = "yes" \ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext_libintl" = "yes"; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext_libintl" = "yes"; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE(HAVE_GETTEXT, 1, [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE(HAVE_DCGETTEXT, 1, [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST(BUILD_INCLUDED_LIBINTL) AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATOBJEXT) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST(DATADIRNAME) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST(INSTOBJEXT) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST(GENCAT) dnl For backward compatibility. Some Makefiles may be using this. if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST(INTLOBJS) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST(INTLLIBS) dnl Make all documented variables known to autoconf. AC_SUBST(LIBINTL) AC_SUBST(LTLIBINTL) AC_SUBST(POSUB) ]) dnl Checks for all prerequisites of the intl subdirectory, dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. AC_DEFUN([AM_INTL_SUBDIR], [ AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_MKINSTALLDIRS])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([bh_C_SIGNED])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl AC_REQUIRE([gt_TYPE_WCHAR_T])dnl AC_REQUIRE([gt_TYPE_WINT_T])dnl AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) AC_REQUIRE([jm_AC_HEADER_STDINT_H]) AC_REQUIRE([gt_TYPE_INTMAX_T]) AC_REQUIRE([gt_PRINTF_POSIX]) AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([jm_GLIBC21])dnl AC_REQUIRE([gt_INTDIV0])dnl AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl AC_REQUIRE([gt_INTTYPES_PRI])dnl AC_REQUIRE([gl_XSIZE])dnl AC_CHECK_TYPE([ptrdiff_t], , [AC_DEFINE([ptrdiff_t], [long], [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) ]) AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h]) AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \ mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ __fsetlocking]) dnl Use the _snprintf function only if it is declared (because on NetBSD it dnl is defined as a weak alias of snprintf; we prefer to use the latter). gt_CHECK_DECL(_snprintf, [#include ]) gt_CHECK_DECL(_snwprintf, [#include ]) dnl Use the *_unlocked functions only if they are declared. dnl (because some of them were defined without being declared in Solaris dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built dnl on Solaris 2.5.1 to run on Solaris 2.6). dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. gt_CHECK_DECL(feof_unlocked, [#include ]) gt_CHECK_DECL(fgets_unlocked, [#include ]) gt_CHECK_DECL(getc_unlocked, [#include ]) case $gt_cv_func_printf_posix in *yes) HAVE_POSIX_PRINTF=1 ;; *) HAVE_POSIX_PRINTF=0 ;; esac AC_SUBST([HAVE_POSIX_PRINTF]) if test "$ac_cv_func_asprintf" = yes; then HAVE_ASPRINTF=1 else HAVE_ASPRINTF=0 fi AC_SUBST([HAVE_ASPRINTF]) if test "$ac_cv_func_snprintf" = yes; then HAVE_SNPRINTF=1 else HAVE_SNPRINTF=0 fi AC_SUBST([HAVE_SNPRINTF]) if test "$ac_cv_func_wprintf" = yes; then HAVE_WPRINTF=1 else HAVE_WPRINTF=0 fi AC_SUBST([HAVE_WPRINTF]) AM_ICONV AM_LANGINFO_CODESET if test $ac_cv_header_locale_h = yes; then AM_LC_MESSAGES fi dnl intl/plural.c is generated from intl/plural.y. It requires bison, dnl because plural.y uses bison specific features. It requires at least dnl bison-1.26 because earlier versions generate a plural.c that doesn't dnl compile. dnl bison is only needed for the maintainer (who touches plural.y). But in dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put dnl the rule in general Makefile. Now, some people carelessly touch the dnl files or have a broken "make" program, hence the plural.c rule will dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not dnl present or too old. AC_CHECK_PROGS([INTLBISON], [bison]) if test -z "$INTLBISON"; then ac_verc_fail=yes else dnl Found it, now check the version. AC_MSG_CHECKING([version of bison]) changequote(<<,>>)dnl ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) changequote([,])dnl ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac AC_MSG_RESULT([$ac_prog_version]) fi if test $ac_verc_fail = yes; then INTLBISON=: fi ]) dnl gt_CHECK_DECL(FUNC, INCLUDES) dnl Check whether a function is declared. AC_DEFUN([gt_CHECK_DECL], [ AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, [AC_TRY_COMPILE([$2], [ #ifndef $1 char *p = (char *) $1; #endif ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) if test $ac_cv_have_decl_$1 = yes; then gt_value=1 else gt_value=0 fi AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) realtimebattle-1.0.8/m4/glibc21.m40000644000175000017500000000172710170545360014665 0ustar moimoi# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. # Test for the GNU C Library, version 2.1 or newer. # From Bruno Haible. AC_DEFUN([jm_GLIBC21], [ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, ac_cv_gnu_library_2_1, [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif ], ac_cv_gnu_library_2_1=yes, ac_cv_gnu_library_2_1=no) ] ) AC_SUBST(GLIBC21) GLIBC21="$ac_cv_gnu_library_2_1" ] ) realtimebattle-1.0.8/m4/iconv.m40000644000175000017500000000665310170545360014563 0ustar moimoi# iconv.m4 serial AM4 (gettext-0.11.3) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST(LIBICONV) AC_SUBST(LTLIBICONV) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) realtimebattle-1.0.8/m4/intdiv0.m40000644000175000017500000000356510170545360015021 0ustar moimoi# intdiv0.m4 serial 1 (gettext-0.11.3) dnl Copyright (C) 2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([gt_INTDIV0], [ AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], gt_cv_int_divbyzero_sigfpe, [ AC_TRY_RUN([ #include #include static void #ifdef __cplusplus sigfpe_handler (int sig) #else sigfpe_handler (sig) int sig; #endif { /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ exit (sig != SIGFPE); } int x = 1; int y = 0; int z; int nan; int main () { signal (SIGFPE, sigfpe_handler); /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) signal (SIGTRAP, sigfpe_handler); #endif /* Linux/SPARC yields signal SIGILL. */ #if defined (__sparc__) && defined (__linux__) signal (SIGILL, sigfpe_handler); #endif z = x / y; nan = y / y; exit (1); } ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, [ # Guess based on the CPU. case "$host_cpu" in alpha* | i[34567]86 | m68k | s390*) gt_cv_int_divbyzero_sigfpe="guessing yes";; *) gt_cv_int_divbyzero_sigfpe="guessing no";; esac ]) ]) case "$gt_cv_int_divbyzero_sigfpe" in *yes) value=1;; *) value=0;; esac AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, [Define if integer division by zero raises signal SIGFPE.]) ]) realtimebattle-1.0.8/m4/intmax.m40000644000175000017500000000217210170545360014735 0ustar moimoi# intmax.m4 serial 1 (gettext-0.12) dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl Test whether the system has the 'intmax_t' type, but don't attempt to dnl find a replacement if it is lacking. AC_DEFUN([gt_TYPE_INTMAX_T], [ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) AC_REQUIRE([jm_AC_HEADER_STDINT_H]) AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, [AC_TRY_COMPILE([ #include #include #if HAVE_STDINT_H_WITH_UINTMAX #include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX #include #endif ], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)]) if test $gt_cv_c_intmax_t = yes; then AC_DEFINE(HAVE_INTMAX_T, 1, [Define if you have the 'intmax_t' type in or .]) fi ]) realtimebattle-1.0.8/m4/inttypes-pri.m40000644000175000017500000000222710170545360016105 0ustar moimoi# inttypes-pri.m4 serial 1 (gettext-0.11.4) dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. # Define PRI_MACROS_BROKEN if exists and defines the PRI* # macros to non-string values. This is the case on AIX 4.3.3. AC_DEFUN([gt_INTTYPES_PRI], [ AC_REQUIRE([gt_HEADER_INTTYPES_H]) if test $gt_cv_header_inttypes_h = yes; then AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], gt_cv_inttypes_pri_broken, [ AC_TRY_COMPILE([#include #ifdef PRId32 char *p = PRId32; #endif ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) ]) fi if test "$gt_cv_inttypes_pri_broken" = yes; then AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, [Define if exists and defines unusable PRI* macros.]) fi ]) realtimebattle-1.0.8/m4/inttypes.m40000644000175000017500000000171710170545360015320 0ustar moimoi# inttypes.m4 serial 1 (gettext-0.11.4) dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_INTTYPES_H if exists and doesn't clash with # . AC_DEFUN([gt_HEADER_INTTYPES_H], [ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, [ AC_TRY_COMPILE( [#include #include ], [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) ]) if test $gt_cv_header_inttypes_h = yes; then AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, [Define if exists and doesn't clash with .]) fi ]) realtimebattle-1.0.8/m4/inttypes_h.m40000644000175000017500000000210310170545360015615 0ustar moimoi# inttypes_h.m4 serial 5 (gettext-0.12) dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([jm_AC_HEADER_INTTYPES_H], [ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, [AC_TRY_COMPILE( [#include #include ], [uintmax_t i = (uintmax_t) -1;], jm_ac_cv_header_inttypes_h=yes, jm_ac_cv_header_inttypes_h=no)]) if test $jm_ac_cv_header_inttypes_h = yes; then AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) realtimebattle-1.0.8/m4/lcmessage.m40000644000175000017500000000261610170545360015403 0ustar moimoi# lcmessage.m4 serial 3 (gettext-0.11.3) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995. # Check whether LC_MESSAGES is available in . AC_DEFUN([AM_LC_MESSAGES], [ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi ]) realtimebattle-1.0.8/m4/lib-ld.m40000644000175000017500000000675610170545360014614 0ustar moimoi# lib-ld.m4 serial 3 (gettext-0.13) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) realtimebattle-1.0.8/m4/lib-link.m40000644000175000017500000005534310170545360015146 0ustar moimoi# lib-link.m4 serial 4 (gettext-0.12) dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, dnl hardcode_direct, hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib$1-prefix], [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib$1-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */lib | */lib/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/lib"; then haveit= if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) realtimebattle-1.0.8/m4/lib-prefix.m40000644000175000017500000001250710170545360015501 0ustar moimoi# lib-prefix.m4 serial 3 (gettext-0.13) dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/lib"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) realtimebattle-1.0.8/m4/longdouble.m40000644000175000017500000000230010170545360015560 0ustar moimoi# longdouble.m4 serial 1 (gettext-0.12) dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl Test whether the compiler supports the 'long double' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_LONGDOUBLE], [ AC_CACHE_CHECK([for long double], gt_cv_c_long_double, [if test "$GCC" = yes; then gt_cv_c_long_double=yes else AC_TRY_COMPILE([ /* The Stardent Vistra knows sizeof(long double), but does not support it. */ long double foo = 0.0; /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ int array [2*(sizeof(long double) >= sizeof(double)) - 1]; ], , gt_cv_c_long_double=yes, gt_cv_c_long_double=no) fi]) if test $gt_cv_c_long_double = yes; then AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.]) fi ]) realtimebattle-1.0.8/m4/longlong.m40000644000175000017500000000164310170545360015256 0ustar moimoi# longlong.m4 serial 4 dnl Copyright (C) 1999-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_LONG_LONG if 'long long' works. AC_DEFUN([jm_AC_TYPE_LONG_LONG], [ AC_CACHE_CHECK([for long long], ac_cv_type_long_long, [AC_TRY_LINK([long long ll = 1LL; int i = 63;], [long long llmax = (long long) -1; return ll << i | ll >> i | llmax / ll | llmax % ll;], ac_cv_type_long_long=yes, ac_cv_type_long_long=no)]) if test $ac_cv_type_long_long = yes; then AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have the 'long long' type.]) fi ]) realtimebattle-1.0.8/m4/nls.m40000644000175000017500000000350510170545360014232 0ustar moimoi# nls.m4 serial 1 (gettext-0.12) dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) ]) AC_DEFUN([AM_MKINSTALLDIRS], [ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but $(top_srcdir). dnl Try to locate it. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then case "$ac_aux_dir" in /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; esac fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) ]) realtimebattle-1.0.8/m4/po.m40000644000175000017500000004265210170545360014062 0ustar moimoi# po.m4 serial 3 (gettext-0.14) dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_MKINSTALLDIRS])dnl AC_REQUIRE([AM_NLS])dnl dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. dnl Test whether we really found GNU msgfmt. if test "$GMSGFMT" != ":"; then dnl If it is no GNU msgfmt we define it as : so that the dnl Makefiles still can work. if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` AC_MSG_RESULT( [found $GMSGFMT program is not GNU msgfmt; ignore it]) GMSGFMT=":" fi fi dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is no GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po fi AC_OUTPUT_COMMANDS([ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" < #include /* The string "%2$d %1$d", with dollar characters protected from the shell's dollar expansion (possibly an autoconf bug). */ static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; static char buf[100]; int main () { sprintf (buf, format, 33, 55); return (strcmp (buf, "55 33") != 0); }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, [ AC_EGREP_CPP(notposix, [ #if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ notposix #endif ], gt_cv_func_printf_posix="guessing no", gt_cv_func_printf_posix="guessing yes") ]) ]) case $gt_cv_func_printf_posix in *yes) AC_DEFINE(HAVE_POSIX_PRINTF, 1, [Define if your printf() function supports format strings with positions.]) ;; esac ]) realtimebattle-1.0.8/m4/progtest.m40000644000175000017500000000563410170545360015312 0ustar moimoi# progtest.m4 serial 3 (gettext-0.12) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) realtimebattle-1.0.8/m4/signed.m40000644000175000017500000000140110170545360014700 0ustar moimoi# signed.m4 serial 1 (gettext-0.10.40) dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([bh_C_SIGNED], [ AC_CACHE_CHECK([for signed], bh_cv_c_signed, [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)]) if test $bh_cv_c_signed = no; then AC_DEFINE(signed, , [Define to empty if the C compiler doesn't support this keyword.]) fi ]) realtimebattle-1.0.8/m4/size_max.m40000644000175000017500000000407210170545360015255 0ustar moimoi# size_max.m4 serial 2 dnl Copyright (C) 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([gl_SIZE_MAX], [ AC_CHECK_HEADERS(stdint.h) dnl First test whether the system already has SIZE_MAX. AC_MSG_CHECKING([for SIZE_MAX]) result= AC_EGREP_CPP([Found it], [ #include #if HAVE_STDINT_H #include #endif #ifdef SIZE_MAX Found it #endif ], result=yes) if test -z "$result"; then dnl Define it ourselves. Here we assume that the type 'size_t' is not wider dnl than the type 'unsigned long'. dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr', dnl which is guaranteed to work from LONG_MIN to LONG_MAX. _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi, [#include ], result=?) _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo, [#include ], result=?) _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint, [#include ], result=?) if test "$fits_in_uint" = 1; then dnl Even though SIZE_MAX fits in an unsigned int, it must be of type dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. AC_TRY_COMPILE([#include extern size_t foo; extern unsigned long foo; ], [], fits_in_uint=0) fi if test -z "$result"; then if test "$fits_in_uint" = 1; then result="$res_hi$res_lo"U else result="$res_hi$res_lo"UL fi else dnl Shouldn't happen, but who knows... result='~(size_t)0' fi fi AC_MSG_RESULT([$result]) if test "$result" != yes; then AC_DEFINE_UNQUOTED([SIZE_MAX], [$result], [Define as the maximum value of type 'size_t', if the system doesn't define it.]) fi ]) realtimebattle-1.0.8/m4/stdint_h.m40000644000175000017500000000205310170545360015247 0ustar moimoi# stdint_h.m4 serial 3 (gettext-0.12) dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_STDINT_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([jm_AC_HEADER_STDINT_H], [ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, [AC_TRY_COMPILE( [#include #include ], [uintmax_t i = (uintmax_t) -1;], jm_ac_cv_header_stdint_h=yes, jm_ac_cv_header_stdint_h=no)]) if test $jm_ac_cv_header_stdint_h = yes; then AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) realtimebattle-1.0.8/m4/uintmax_t.m40000644000175000017500000000235010170545360015443 0ustar moimoi# uintmax_t.m4 serial 7 (gettext-0.12) dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. AC_PREREQ(2.13) # Define uintmax_t to 'unsigned long' or 'unsigned long long' # if it is not already defined in or . AC_DEFUN([jm_AC_TYPE_UINTMAX_T], [ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) AC_REQUIRE([jm_AC_HEADER_STDINT_H]) if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) test $ac_cv_type_unsigned_long_long = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, [Define to unsigned long or unsigned long long if and don't define.]) else AC_DEFINE(HAVE_UINTMAX_T, 1, [Define if you have the 'uintmax_t' type in or .]) fi ]) realtimebattle-1.0.8/m4/ulonglong.m40000644000175000017500000000204210170545360015435 0ustar moimoi# ulonglong.m4 serial 3 dnl Copyright (C) 1999-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works. AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], [ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;], [unsigned long long ullmax = (unsigned long long) -1; return ull << i | ull >> i | ullmax / ull | ullmax % ull;], ac_cv_type_unsigned_long_long=yes, ac_cv_type_unsigned_long_long=no)]) if test $ac_cv_type_unsigned_long_long = yes; then AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, [Define if you have the 'unsigned long long' type.]) fi ]) realtimebattle-1.0.8/m4/wchar_t.m40000644000175000017500000000155310170545360015066 0ustar moimoi# wchar_t.m4 serial 1 (gettext-0.12) dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl Test whether has the 'wchar_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WCHAR_T], [ AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t, [AC_TRY_COMPILE([#include wchar_t foo = (wchar_t)'\0';], , gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)]) if test $gt_cv_c_wchar_t = yes; then AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.]) fi ]) realtimebattle-1.0.8/m4/wint_t.m40000644000175000017500000000153110170545360014737 0ustar moimoi# wint_t.m4 serial 1 (gettext-0.12) dnl Copyright (C) 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl Test whether has the 'wint_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WINT_T], [ AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, [AC_TRY_COMPILE([#include wint_t foo = (wchar_t)'\0';], , gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) if test $gt_cv_c_wint_t = yes; then AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) fi ]) realtimebattle-1.0.8/m4/xsize.m40000644000175000017500000000103110170545360014570 0ustar moimoi# xsize.m4 serial 2 dnl Copyright (C) 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. AC_DEFUN([gl_XSIZE], [ dnl Prerequisites of lib/xsize.h. AC_REQUIRE([gl_SIZE_MAX]) AC_CHECK_HEADERS(stdint.h) ]) realtimebattle-1.0.8/m4/Makefile.am0000644000175000017500000000052110170545360015223 0ustar moimoiEXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 intmax.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 nls.m4 po.m4 printf-posix.m4 progtest.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4 realtimebattle-1.0.8/m4/Makefile.in0000644000175000017500000002734310324167713015252 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = m4 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 intmax.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 nls.m4 po.m4 printf-posix.m4 progtest.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 m4/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu m4/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 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: 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic 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 -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic 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-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am # 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: realtimebattle-1.0.8/m4/ChangeLog0000644000175000017500000000254610170545360014752 0ustar moimoi2004-11-18 gettextize * codeset.m4: New file, from gettext-0.14.1. * gettext.m4: New file, from gettext-0.14.1. * glibc21.m4: New file, from gettext-0.14.1. * iconv.m4: New file, from gettext-0.14.1. * intdiv0.m4: New file, from gettext-0.14.1. * intmax.m4: New file, from gettext-0.14.1. * inttypes.m4: New file, from gettext-0.14.1. * inttypes_h.m4: New file, from gettext-0.14.1. * inttypes-pri.m4: New file, from gettext-0.14.1. * isc-posix.m4: New file, from gettext-0.14.1. * lcmessage.m4: New file, from gettext-0.14.1. * lib-ld.m4: New file, from gettext-0.14.1. * lib-link.m4: New file, from gettext-0.14.1. * lib-prefix.m4: New file, from gettext-0.14.1. * longdouble.m4: New file, from gettext-0.14.1. * longlong.m4: New file, from gettext-0.14.1. * nls.m4: New file, from gettext-0.14.1. * po.m4: New file, from gettext-0.14.1. * printf-posix.m4: New file, from gettext-0.14.1. * progtest.m4: New file, from gettext-0.14.1. * signed.m4: New file, from gettext-0.14.1. * size_max.m4: New file, from gettext-0.14.1. * stdint_h.m4: New file, from gettext-0.14.1. * uintmax_t.m4: New file, from gettext-0.14.1. * ulonglong.m4: New file, from gettext-0.14.1. * wchar_t.m4: New file, from gettext-0.14.1. * wint_t.m4: New file, from gettext-0.14.1. * xsize.m4: New file, from gettext-0.14.1. * Makefile.am: New file. realtimebattle-1.0.8/m4/isc-posix.m40000644000175000017500000000213310170545360015350 0ustar moimoi# isc-posix.m4 serial 2 (gettext-0.11.2) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. # This file is not needed with autoconf-2.53 and newer. Remove it in 2005. # This test replaces the one in autoconf. # Currently this macro should have the same name as the autoconf macro # because gettext's gettext.m4 (distributed in the automake package) # still uses it. Otherwise, the use in gettext.m4 makes autoheader # give these diagnostics: # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX undefine([AC_ISC_POSIX]) AC_DEFUN([AC_ISC_POSIX], [ dnl This test replaces the obsolescent AC_ISC_POSIX kludge. AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) ] ) realtimebattle-1.0.8/po/0002755000175000017500000000000010404234035013263 5ustar moimoirealtimebattle-1.0.8/po/Makefile.in.in0000644000175000017500000003020510170545361015742 0ustar moimoi# Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-1997, 2000-2004 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License but which still want to provide support for the GNU gettext # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # # Origin: gettext-0.14 PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ localedir = $(datadir)/locale gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = @MKINSTALLDIRS@ mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all: all-@USE_NLS@ all-yes: stamp-po all-no: # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent # invocations of "make" will do nothing. This timestamp would not be necessary # if updating the $(CATALOGS) would always touch them; however, the rule for # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @echo "touch stamp-po" @echo timestamp > stamp-poT @mv stamp-poT stamp-po # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)' test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ else \ $(MAKE) $${lang}.po-create; \ fi install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all $(mkinstalldirs) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkinstalldirs) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: $(mkinstalldirs) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkinstalldirs) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(MAKE) update-po @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir); \ else \ cp -p $(srcdir)/$$file $(distdir); \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: realtimebattle-1.0.8/po/remove-potcdate.sin0000644000175000017500000000066010170545361017103 0ustar moimoi# Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } realtimebattle-1.0.8/po/quot.sed0000644000175000017500000000023110170545361014751 0ustar moimois/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g realtimebattle-1.0.8/po/boldquot.sed0000644000175000017500000000033110170545361015613 0ustar moimois/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g s/“/“/g s/”/”/g s/‘/‘/g s/’/’/g realtimebattle-1.0.8/po/en@quot.header0000644000175000017500000000226310170545361016060 0ustar moimoi# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # realtimebattle-1.0.8/po/en@boldquot.header0000644000175000017500000000247110170545361016722 0ustar moimoi# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # realtimebattle-1.0.8/po/insert-header.sin0000644000175000017500000000124010170545361016532 0ustar moimoi# Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } realtimebattle-1.0.8/po/Rules-quot0000644000175000017500000000337610170545361015304 0ustar moimoi# Special Makefile rules for English message catalogs with quotation marks. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-create: $(MAKE) en@quot.po-update en@boldquot.po-create: $(MAKE) en@boldquot.po-update en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en@quot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header en@boldquot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header realtimebattle-1.0.8/po/Makevars0000644000175000017500000000350410260540472014764 0ustar moimoi# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = The RealTime Battle translators, see AUTHORS for detail # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = jonico@users.sourceforge.net # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = realtimebattle-1.0.8/po/POTFILES.in0000644000175000017500000000121210271666714015051 0ustar moimoi# List of source files containing translatable strings. ## Created by Anjuta - will be overwritten ## If you don't want it to overwrite it, ## Please disable it in the Anjuta project configuration # Source files src/RealTimeBattle.cc src/ArenaBase.cc src/ArenaController.cc src/ArenaRealTime.cc src/ArenaReplay.cc src/ArenaWindow.cc src/ControlWindow.cc src/Dialog.cc src/Extras.cc src/GeometricalObjects.cc src/Gui.cc src/MessageWindow.cc src/Options.cc src/Robot.cc src/ScoreWindow.cc src/Shape.cc src/Shot.cc src/StartTournamentWindow.cc src/StatisticsWindow.cc src/Structs.cc src/Timer.cc src/Various.cc src/Vector2D.cc src/OptionsWindow.cc realtimebattle-1.0.8/po/RealTimeBattle.pot0000644000175000017500000003721410321753014016653 0ustar moimoi# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR The RealTime Battle translators, see AUTHORS for detail # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: jonico@users.sourceforge.net\n" "POT-Creation-Date: 2005-10-08 16:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/RealTimeBattle.cc:102 msgid " Usage: RealTimeBattle [options] " msgstr "" #: src/RealTimeBattle.cc:103 msgid " Options:" msgstr "" #: src/RealTimeBattle.cc:104 msgid " --debug_mode, -d debug mode" msgstr "" #: src/RealTimeBattle.cc:105 msgid "" " --debug_level [0-5], -D sets the initial debug level. Implies -" "d" msgstr "" #: src/RealTimeBattle.cc:106 msgid " --normal_mode, -n normal mode (default)" msgstr "" #: src/RealTimeBattle.cc:107 msgid " --competition_mode, -c competition mode" msgstr "" #: src/RealTimeBattle.cc:109 msgid " --no_graphics, -g no graphics will be displayed" msgstr "" #: src/RealTimeBattle.cc:110 msgid "" " --option_file [file], -o selects option-file (default: $HOME/." "rtbrc)" msgstr "" #: src/RealTimeBattle.cc:112 msgid "" " --log_file [file], -l make log file, if 'file' is '-'\n" " the log is sent to STDOUT" msgstr "" #: src/RealTimeBattle.cc:115 msgid "" " --tournament_file [file], -t specify a tournament file to\n" " autostart a tournament" msgstr "" #: src/RealTimeBattle.cc:118 msgid "" " --statistics_file [file], -s file to print the statistics to\n" " when autostarting" msgstr "" #: src/RealTimeBattle.cc:121 msgid "" " --message_file [file], -m redirect messages to 'file'.\n" " With '-' as 'file', STDOUT is used.\n" " If both log and messages are sent\n" " to STDOUT, '-m' will be ignored" msgstr "" #: src/RealTimeBattle.cc:126 msgid "" " --replay [file] -r a log file to replay.\n" " if '-' is specified as file,\n" " input is taken from STDIN" msgstr "" #: src/RealTimeBattle.cc:130 msgid " --help, -h prints this message" msgstr "" #: src/RealTimeBattle.cc:131 msgid " --version, -v prints the version number" msgstr "" #: src/RealTimeBattle.cc:133 msgid "" " --port_number -p specifies the port to listen on " "(default 32134)" msgstr "" #: src/ArenaBase.cc:123 msgid "*Starting robots*" msgstr "" #: src/ArenaBase.cc:126 msgid "*Shutting down robots*" msgstr "" #: src/ArenaBase.cc:130 msgid "*Running*" msgstr "" #: src/ArenaBase.cc:132 msgid "*Pausing after game*" msgstr "" #: src/ArenaBase.cc:136 msgid "*Paused*" msgstr "" #: src/ArenaBase.cc:139 msgid "*Exiting*" msgstr "" #: src/ArenaBase.cc:142 msgid "*Finished*" msgstr "" #: src/ArenaRealTime.cc:849 #, c-format msgid "Game %d of sequence %d begins on arena" msgstr "" #: src/ArenaRealTime.cc:1037 #, c-format msgid "Robot with filename %s has not given any name" msgstr "" #: src/ArenaReplay.cc:131 #, c-format msgid "Game %d of sequence %d" msgstr "" #: src/ArenaWindow.cc:77 msgid " No Zoom " msgstr "" #: src/ArenaWindow.cc:79 msgid " Zoom In " msgstr "" #: src/ArenaWindow.cc:81 msgid " Zoom Out " msgstr "" #: src/ArenaWindow.cc:149 msgid "Arena" msgstr "" #: src/ControlWindow.cc:81 msgid " New Tournament " msgstr "" #: src/ControlWindow.cc:83 msgid " Replay Tournament " msgstr "" #: src/ControlWindow.cc:85 msgid " Pause " msgstr "" #: src/ControlWindow.cc:87 msgid " End " msgstr "" #: src/ControlWindow.cc:89 msgid " Options " msgstr "" #: src/ControlWindow.cc:91 msgid " Statistics " msgstr "" #: src/ControlWindow.cc:93 msgid " Quit " msgstr "" #: src/ControlWindow.cc:119 msgid "Show arena window" msgstr "" #: src/ControlWindow.cc:121 msgid "Show message window" msgstr "" #: src/ControlWindow.cc:123 msgid "Show score window" msgstr "" #: src/ControlWindow.cc:202 msgid " Step " msgstr "" #: src/ControlWindow.cc:204 msgid " End Game " msgstr "" #: src/ControlWindow.cc:206 msgid " Kill Marked Robot " msgstr "" #: src/ControlWindow.cc:234 msgid " Debug Level: " msgstr "" #: src/ControlWindow.cc:335 msgid " Step forward " msgstr "" #: src/ControlWindow.cc:339 msgid " Step backward " msgstr "" #: src/ControlWindow.cc:343 msgid " Next Game " msgstr "" #: src/ControlWindow.cc:347 msgid " Prev Game " msgstr "" #: src/ControlWindow.cc:351 msgid " Next Seq " msgstr "" #: src/ControlWindow.cc:355 msgid " Prev Seq " msgstr "" #: src/ControlWindow.cc:514 src/ControlWindow.cc:674 src/Gui.cc:154 msgid "" "This action will kill the current tournament.\n" "Do you want to do that?" msgstr "" #: src/ControlWindow.cc:517 src/ControlWindow.cc:677 msgid "Yes" msgstr "" #: src/ControlWindow.cc:518 src/ControlWindow.cc:678 msgid "No" msgstr "" #: src/ControlWindow.cc:531 msgid "Choose a log file to replay" msgstr "" #: src/MessageWindow.cc:78 msgid " Clear all messages " msgstr "" #: src/MessageWindow.cc:80 msgid " Show only marked robot " msgstr "" #: src/MessageWindow.cc:82 msgid " Show all " msgstr "" #: src/MessageWindow.cc:108 src/StatisticsWindow.cc:93 msgid " Robot " msgstr "" #: src/MessageWindow.cc:108 msgid " Message " msgstr "" #: src/MessageWindow.cc:172 msgid "Messages" msgstr "" #: src/MessageWindow.cc:176 msgid " All " msgstr "" #: src/Options.cc:77 msgid "Gravitational Constant" msgstr "" #: src/Options.cc:81 msgid "Air resistance" msgstr "" #: src/Options.cc:85 msgid "Roll friction" msgstr "" #: src/Options.cc:90 msgid "Slide/brake friction" msgstr "" #: src/Options.cc:95 msgid "Send robot coordinates" msgstr "" #: src/Options.cc:100 msgid "Robot max acceleration" msgstr "" #: src/Options.cc:105 msgid "Robot min acceleration" msgstr "" #: src/Options.cc:109 msgid "Robot radius" msgstr "" #: src/Options.cc:113 msgid "Robot mass" msgstr "" #: src/Options.cc:118 msgid "Robot bounce coefficient" msgstr "" #: src/Options.cc:123 msgid "Robot hardness coefficient" msgstr "" #: src/Options.cc:128 msgid "Robot protection coefficient" msgstr "" #: src/Options.cc:133 msgid "Robot frontsize [radians]" msgstr "" #: src/Options.cc:138 msgid "Robot front bounce coefficient" msgstr "" #: src/Options.cc:143 msgid "Robot front hardness coefficient" msgstr "" #: src/Options.cc:148 msgid "Robot front protection coefficient" msgstr "" #: src/Options.cc:153 msgid "Robot start energy" msgstr "" #: src/Options.cc:158 msgid "Robot max energy" msgstr "" #: src/Options.cc:164 msgid "Robot max rotate speed [rad/s]" msgstr "" #: src/Options.cc:170 msgid "Robot cannon max rotate speed [rad/s]" msgstr "" #: src/Options.cc:176 msgid "Robot radar max rotate speed [rad/s]" msgstr "" #: src/Options.cc:181 msgid "Process check interval" msgstr "" #: src/Options.cc:185 msgid "Robot energy levels" msgstr "" #: src/Options.cc:189 msgid "Shot radius" msgstr "" #: src/Options.cc:193 msgid "Shot speed" msgstr "" #: src/Options.cc:198 msgid "Shooting penalty (times shot energy)" msgstr "" #: src/Options.cc:202 msgid "Shot min energy" msgstr "" #: src/Options.cc:206 msgid "Shot max energy" msgstr "" #: src/Options.cc:211 msgid "Shot energy increase speed [energy/s]" msgstr "" #: src/Options.cc:215 msgid "Background colour" msgstr "" #: src/Options.cc:219 msgid "Foreground colour" msgstr "" #: src/Options.cc:224 msgid "Colour for RTB messages" msgstr "" #: src/Options.cc:228 msgid "Cookie max energy" msgstr "" #: src/Options.cc:232 msgid "Cookie min energy" msgstr "" #: src/Options.cc:237 msgid "Cookie frequency [cookies per second]" msgstr "" #: src/Options.cc:241 msgid "Cookie radius" msgstr "" #: src/Options.cc:245 msgid "Cookie colour" msgstr "" #: src/Options.cc:249 msgid "Mine max energy" msgstr "" #: src/Options.cc:253 msgid "Mine min energy" msgstr "" #: src/Options.cc:258 msgid "Mine frequency [mines per second]" msgstr "" #: src/Options.cc:262 msgid "Mine radius" msgstr "" #: src/Options.cc:266 msgid "Mine colour" msgstr "" #: src/Options.cc:270 msgid "Arena scale" msgstr "" #: src/Options.cc:275 msgid "Fast forward factor" msgstr "" #: src/Options.cc:279 msgid "Timeout [s]" msgstr "" #: src/Options.cc:283 msgid "Max timestep" msgstr "" #: src/Options.cc:287 msgid "Timescale" msgstr "" #: src/Options.cc:292 msgid "Update interval [s]" msgstr "" #: src/Options.cc:297 msgid "Robot startup time [s]" msgstr "" #: src/Options.cc:301 msgid "Start CPU time [s]" msgstr "" #: src/Options.cc:305 msgid "Extra CPU time [s]" msgstr "" #: src/Options.cc:310 msgid "Extra CPU period [s]" msgstr "" #: src/Options.cc:315 msgid "CPU time warning percentage" msgstr "" #: src/Options.cc:320 msgid "Logging frequency [Each n:th update interval]" msgstr "" #: src/Options.cc:325 msgid "Max robots allowed simultaneously" msgstr "" #: src/Options.cc:329 msgid "Robot search path" msgstr "" #: src/Options.cc:333 msgid "Arena search path" msgstr "" #: src/Options.cc:344 msgid "Directory for temporary files" msgstr "" #: src/Options.cc:349 msgid "Initial Arena window width" msgstr "" #: src/Options.cc:354 msgid "Initial Arena window height" msgstr "" #: src/Options.cc:359 msgid "Initial Arena window x position" msgstr "" #: src/Options.cc:364 msgid "Initial Arena window y position" msgstr "" #: src/Options.cc:369 msgid "Initial Control window x position" msgstr "" #: src/Options.cc:374 msgid "Initial Control window y position" msgstr "" #: src/Options.cc:379 msgid "Initial Message window width" msgstr "" #: src/Options.cc:384 msgid "Initial Message window height" msgstr "" #: src/Options.cc:389 msgid "Initial Message window x position" msgstr "" #: src/Options.cc:394 msgid "Initial Message window y position" msgstr "" #: src/Options.cc:399 msgid "Initial Score window width" msgstr "" #: src/Options.cc:404 msgid "Initial Score window height" msgstr "" #: src/Options.cc:409 msgid "Initial Score window x position" msgstr "" #: src/Options.cc:414 msgid "Initial Score window y position" msgstr "" #: src/Options.cc:419 msgid "Initial Statistics window width" msgstr "" #: src/Options.cc:424 msgid "Initial Statistics window height" msgstr "" #: src/ScoreWindow.cc:72 src/StatisticsWindow.cc:225 #: src/StatisticsWindow.cc:372 msgid "Name" msgstr "" #: src/ScoreWindow.cc:72 msgid "Energy" msgstr "" #: src/ScoreWindow.cc:72 msgid "Place" msgstr "" #: src/ScoreWindow.cc:73 msgid "Last" msgstr "" #: src/ScoreWindow.cc:73 src/ScoreWindow.cc:147 msgid "Score" msgstr "" #: src/ScoreWindow.cc:148 msgid " Seq: " msgstr "" #: src/ScoreWindow.cc:151 src/StatisticsWindow.cc:90 #: src/StatisticsWindow.cc:389 src/StatisticsWindow.cc:508 msgid "Game" msgstr "" #: src/ScoreWindow.cc:154 src/OptionsWindow.cc:79 msgid "Time" msgstr "" #: src/StartTournamentWindow.cc:78 msgid "Start New Tournament" msgstr "" #: src/StartTournamentWindow.cc:124 msgid "Robots in Tournament" msgstr "" #: src/StartTournamentWindow.cc:125 msgid "Robots in Directory" msgstr "" #: src/StartTournamentWindow.cc:134 msgid "Arenas in Tournament" msgstr "" #: src/StartTournamentWindow.cc:135 msgid "Arenas in Directory" msgstr "" #: src/StartTournamentWindow.cc:153 msgid " Remove " msgstr "" #: src/StartTournamentWindow.cc:153 src/StartTournamentWindow.cc:155 msgid " Select All " msgstr "" #: src/StartTournamentWindow.cc:154 src/StartTournamentWindow.cc:155 msgid " Unselect All " msgstr "" #: src/StartTournamentWindow.cc:154 msgid " Add " msgstr "" #: src/StartTournamentWindow.cc:251 msgid "Games per sequence" msgstr "" #: src/StartTournamentWindow.cc:251 msgid "Robots per sequence" msgstr "" #: src/StartTournamentWindow.cc:252 msgid "Number of sequences" msgstr "" #: src/StartTournamentWindow.cc:309 src/OptionsWindow.cc:137 #: src/OptionsWindow.cc:182 msgid " Min " msgstr "" #: src/StartTournamentWindow.cc:321 msgid " All Arenas " msgstr "" #: src/StartTournamentWindow.cc:333 msgid " Full Round " msgstr "" #: src/StartTournamentWindow.cc:343 src/OptionsWindow.cc:141 #: src/OptionsWindow.cc:186 msgid " Max " msgstr "" #: src/StartTournamentWindow.cc:371 msgid " Load tournament " msgstr "" #: src/StartTournamentWindow.cc:371 msgid " Save tournament " msgstr "" #: src/StartTournamentWindow.cc:393 msgid " Start " msgstr "" #: src/StartTournamentWindow.cc:393 src/OptionsWindow.cc:268 msgid " Cancel " msgstr "" #: src/StartTournamentWindow.cc:500 msgid "Choose a tournament file to load" msgstr "" #: src/StartTournamentWindow.cc:534 msgid "Choose file to save tournament into" msgstr "" #: src/StartTournamentWindow.cc:578 msgid "Error in specified tournament file." msgstr "" #: src/StartTournamentWindow.cc:580 src/StartTournamentWindow.cc:740 #: src/StartTournamentWindow.cc:891 src/OptionsWindow.cc:266 msgid " Ok " msgstr "" #: src/StartTournamentWindow.cc:581 msgid "Tournament could not be loaded." msgstr "" #: src/StartTournamentWindow.cc:730 msgid "There are too few robots in the tournament." msgstr "" #: src/StartTournamentWindow.cc:732 src/StartTournamentWindow.cc:886 msgid "There are no arenas in the tournament." msgstr "" #: src/StartTournamentWindow.cc:735 msgid "Could not open file." msgstr "" #: src/StartTournamentWindow.cc:741 msgid "Tournament could not be saved." msgstr "" #: src/StartTournamentWindow.cc:884 msgid "There must be at least two robots in the tournament." msgstr "" #: src/StartTournamentWindow.cc:892 msgid "Tournament could not be started." msgstr "" #: src/StatisticsWindow.cc:49 msgid "Statistics" msgstr "" #: src/StatisticsWindow.cc:82 msgid " Close " msgstr "" #: src/StatisticsWindow.cc:84 msgid " Save Statistics " msgstr "" #: src/StatisticsWindow.cc:86 msgid " Total " msgstr "" #: src/StatisticsWindow.cc:88 msgid " Sequence Total " msgstr "" #: src/StatisticsWindow.cc:225 msgid "Position" msgstr "" #: src/StatisticsWindow.cc:225 msgid "Points" msgstr "" #: src/StatisticsWindow.cc:226 msgid "Games" msgstr "" #: src/StatisticsWindow.cc:226 msgid "Survival Time" msgstr "" #: src/StatisticsWindow.cc:226 msgid "Total Points" msgstr "" #: src/StatisticsWindow.cc:310 msgid "Choose a statistics file to save" msgstr "" #: src/StatisticsWindow.cc:388 msgid "Seq" msgstr "" #: src/StatisticsWindow.cc:485 msgid " Grand Total " msgstr "" #: src/StatisticsWindow.cc:491 msgid " Sequence " msgstr "" #: src/StatisticsWindow.cc:507 msgid " Sequence: " msgstr "" #: src/Various.cc:96 msgid "Error in" msgstr "" #: src/OptionsWindow.cc:52 msgid "Options" msgstr "" #: src/OptionsWindow.cc:78 msgid "Environment" msgstr "" #: src/OptionsWindow.cc:78 msgid "Robot" msgstr "" #: src/OptionsWindow.cc:78 msgid "Shot" msgstr "" #: src/OptionsWindow.cc:79 msgid "Extras" msgstr "" #: src/OptionsWindow.cc:79 msgid "Window sizes" msgstr "" #: src/OptionsWindow.cc:80 msgid "Misc" msgstr "" #: src/OptionsWindow.cc:139 src/OptionsWindow.cc:184 src/OptionsWindow.cc:211 msgid " Def " msgstr "" #: src/OptionsWindow.cc:236 msgid " Grab sizes and positions from present windows " msgstr "" #: src/OptionsWindow.cc:256 msgid " Default " msgstr "" #: src/OptionsWindow.cc:258 msgid " Load options " msgstr "" #: src/OptionsWindow.cc:260 msgid " Save options " msgstr "" #: src/OptionsWindow.cc:262 msgid " Save as default " msgstr "" #: src/OptionsWindow.cc:264 msgid " Apply " msgstr "" #: src/OptionsWindow.cc:457 msgid "Choose an options file to load" msgstr "" #: src/OptionsWindow.cc:481 msgid "Choose an options file to save" msgstr "" realtimebattle-1.0.8/po/stamp-po0000644000175000017500000000001210323175165014745 0ustar moimoitimestamp realtimebattle-1.0.8/po/de.po0000644000175000017500000005242610321753014014223 0ustar moimoi# translation of de.po to # Internationalization of RealTimeBattle - german # Copyright (C) 1999 Uwe Hermann # Copyright (C) 1999 Jan Suhr # , 2005. # , 2005. # msgid "" msgstr "" "Project-Id-Version: de\n" "Report-Msgid-Bugs-To: jonico@users.sourceforge.net\n" "POT-Creation-Date: 2005-10-08 16:22+0200\n" "PO-Revision-Date: 2005-10-01 17:20+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.9.1\n" #: src/RealTimeBattle.cc:102 msgid " Usage: RealTimeBattle [options] " msgstr " Verwendung: RealTimeBattle [Optionen] " #: src/RealTimeBattle.cc:103 msgid " Options:" msgstr " Optionen:" #: src/RealTimeBattle.cc:104 msgid " --debug_mode, -d debug mode" msgstr " --debug_mode, -d Debug-Modus" #: src/RealTimeBattle.cc:105 msgid "" " --debug_level [0-5], -D sets the initial debug level. Implies -" "d" msgstr "" " --debug_level [0-5], -D Setzt den anfnglichen Debug-Level. " "Bezieht -d mit ein" #: src/RealTimeBattle.cc:106 msgid " --normal_mode, -n normal mode (default)" msgstr " --normal_mode, -n normaler Modus (Standard)" #: src/RealTimeBattle.cc:107 msgid " --competition_mode, -c competition mode" msgstr " --competition_mode, -c Wettkampf Modus" #: src/RealTimeBattle.cc:109 msgid " --no_graphics, -g no graphics will be displayed" msgstr "" " --no_graphics, -g es werden keine Grafiken angezeigt" #: src/RealTimeBattle.cc:110 msgid "" " --option_file [file], -o selects option-file (default: $HOME/." "rtbrc)" msgstr "" " --option_file [Datei], -o gibt Options-Datei an (Standard: " "$HOME/.rtbrc)" #: src/RealTimeBattle.cc:112 msgid "" " --log_file [file], -l make log file, if 'file' is '-'\n" " the log is sent to STDOUT" msgstr "" " --log_file [Datei], -l schreibt Log-Datei, wenn 'Datei' ein\n" " '-' ist, wird nach STDOUT geschrieben" #: src/RealTimeBattle.cc:115 msgid "" " --tournament_file [file], -t specify a tournament file to\n" " autostart a tournament" msgstr "" " --tournament_file [Datei], -t Gibt eine Turnier-Datei an, um\n" " selbstndig das Turnier zu starten" #: src/RealTimeBattle.cc:118 msgid "" " --statistics_file [file], -s file to print the statistics to\n" " when autostarting" msgstr "" " --statistics_file [Datei], -s Datei um die Statistiken zu speichern\n" " wenn selbstndig gestartet wird" #: src/RealTimeBattle.cc:121 msgid "" " --message_file [file], -m redirect messages to 'file'.\n" " With '-' as 'file', STDOUT is used.\n" " If both log and messages are sent\n" " to STDOUT, '-m' will be ignored" msgstr "" " --message_file [Datei], -m schreibt Nachrichten in 'Datei'.\n" " Mit '-' als 'Datei', wird STDOUT\n" " benutzt.\n" " Wenn sowohl Logs als auch Nachrichten\n" " nach STDOUT geschrieben werden, wird\n" " '-m' ignoriert" #: src/RealTimeBattle.cc:126 msgid "" " --replay [file] -r a log file to replay.\n" " if '-' is specified as file,\n" " input is taken from STDIN" msgstr "" " --replay [file] -r Eine Logdatei zum Nachspielen.\n" " Wenn '-' als Datei angegeben ist,\n" " wird der Inhalt von STDIN genommen" #: src/RealTimeBattle.cc:130 msgid " --help, -h prints this message" msgstr " --help, -h gibt diese Meldung aus" #: src/RealTimeBattle.cc:131 msgid " --version, -v prints the version number" msgstr " --version, -v gibt die Versionsnummer aus" #: src/RealTimeBattle.cc:133 msgid "" " --port_number -p specifies the port to listen on " "(default 32134)" msgstr " --port_number, -p Port-Nummer (Standard: 32134)" #: src/ArenaBase.cc:123 msgid "*Starting robots*" msgstr "*Starte Roboter*" #: src/ArenaBase.cc:126 msgid "*Shutting down robots*" msgstr "*Beende Roboter*" #: src/ArenaBase.cc:130 msgid "*Running*" msgstr "*RTB luft*" #: src/ArenaBase.cc:132 msgid "*Pausing after game*" msgstr "*Pause nach dem Spiel*" #: src/ArenaBase.cc:136 msgid "*Paused*" msgstr "*Pause*" #: src/ArenaBase.cc:139 msgid "*Exiting*" msgstr "*Verlasse Programm*" #: src/ArenaBase.cc:142 msgid "*Finished*" msgstr "*Beendet*" #: src/ArenaRealTime.cc:849 #, c-format msgid "Game %d of sequence %d begins on arena" msgstr "Spiel %d von Sequenz %d beginnt in der Arena" #: src/ArenaRealTime.cc:1037 #, c-format msgid "Robot with filename %s has not given any name" msgstr "Roboter mit Dateinamen %s hat keinen Namen angegeben" #: src/ArenaReplay.cc:131 #, c-format msgid "Game %d of sequence %d" msgstr "Spiel %d von Sequenz %d" #: src/ArenaWindow.cc:77 msgid " No Zoom " msgstr " Kein Zoom " #: src/ArenaWindow.cc:79 msgid " Zoom In " msgstr " Zoom In " #: src/ArenaWindow.cc:81 msgid " Zoom Out " msgstr " Zoom Out " #: src/ArenaWindow.cc:149 msgid "Arena" msgstr "Arena" #: src/ControlWindow.cc:81 msgid " New Tournament " msgstr " Neues Turnier " #: src/ControlWindow.cc:83 msgid " Replay Tournament " msgstr " Turnier abspielen " #: src/ControlWindow.cc:85 msgid " Pause " msgstr " Pause " #: src/ControlWindow.cc:87 msgid " End " msgstr " Ende " #: src/ControlWindow.cc:89 msgid " Options " msgstr " Optionen " #: src/ControlWindow.cc:91 msgid " Statistics " msgstr " Statistiken " #: src/ControlWindow.cc:93 msgid " Quit " msgstr " Beenden " #: src/ControlWindow.cc:119 msgid "Show arena window" msgstr "Arena-Fenster anzeigen" #: src/ControlWindow.cc:121 msgid "Show message window" msgstr "Nachrichten-Fenster anzeigen" #: src/ControlWindow.cc:123 msgid "Show score window" msgstr "Score-Fenster anzeigen" #: src/ControlWindow.cc:202 msgid " Step " msgstr " Schritt " #: src/ControlWindow.cc:204 msgid " End Game " msgstr " Spiel beenden " #: src/ControlWindow.cc:206 msgid " Kill Marked Robot " msgstr " Markierten Roboter killen " #: src/ControlWindow.cc:234 msgid " Debug Level: " msgstr " Debug Level: " #: src/ControlWindow.cc:335 msgid " Step forward " msgstr " Schritt vorwrts " #: src/ControlWindow.cc:339 msgid " Step backward " msgstr " Schritt rckwrts " #: src/ControlWindow.cc:343 msgid " Next Game " msgstr " Nchstes Spiel " #: src/ControlWindow.cc:347 msgid " Prev Game " msgstr " Vorhergehendes Spiel " #: src/ControlWindow.cc:351 msgid " Next Seq " msgstr " Nchste Sequenz " #: src/ControlWindow.cc:355 msgid " Prev Seq " msgstr " Vorhergehende Sequenz " #: src/ControlWindow.cc:514 src/ControlWindow.cc:674 src/Gui.cc:154 msgid "" "This action will kill the current tournament.\n" "Do you want to do that?" msgstr "" "Diese Aktion wird das aktuelle Turnier beenden.\n" "Willst du das tun?" #: src/ControlWindow.cc:517 src/ControlWindow.cc:677 msgid "Yes" msgstr "Ja" #: src/ControlWindow.cc:518 src/ControlWindow.cc:678 msgid "No" msgstr "Nein" #: src/ControlWindow.cc:531 msgid "Choose a log file to replay" msgstr "Whle ein Logfile zum abspielen" #: src/MessageWindow.cc:78 msgid " Clear all messages " msgstr " Lsche alle Nachrichten " #: src/MessageWindow.cc:80 msgid " Show only marked robot " msgstr " Zeige nur den markierten Roboter " #: src/MessageWindow.cc:82 msgid " Show all " msgstr " Zeige alle " #: src/MessageWindow.cc:108 src/StatisticsWindow.cc:93 msgid " Robot " msgstr " Roboter " #: src/MessageWindow.cc:108 msgid " Message " msgstr " Nachricht " #: src/MessageWindow.cc:172 msgid "Messages" msgstr "Nachrichten" #: src/MessageWindow.cc:176 msgid " All " msgstr " Alle " #: src/Options.cc:77 msgid "Gravitational Constant" msgstr "Gravitationskonstante" #: src/Options.cc:81 msgid "Air resistance" msgstr "Luftwiderstand" #: src/Options.cc:85 msgid "Roll friction" msgstr "Rollreibung" #: src/Options.cc:90 msgid "Slide/brake friction" msgstr "Gleit-/Bremsreibung" #: src/Options.cc:95 msgid "Send robot coordinates" msgstr "Art der Koordinatenangabe" #: src/Options.cc:100 msgid "Robot max acceleration" msgstr "Max. Roboter-Beschleunigung" #: src/Options.cc:105 msgid "Robot min acceleration" msgstr "Min. Roboter-Beschleunigung" #: src/Options.cc:109 msgid "Robot radius" msgstr "Roboter-Radius" #: src/Options.cc:113 msgid "Robot mass" msgstr "Roboter-Masse" #: src/Options.cc:118 msgid "Robot bounce coefficient" msgstr "Roboter Bounce Koeffizient" #: src/Options.cc:123 msgid "Robot hardness coefficient" msgstr "Roboter Hrte Koeffizient" #: src/Options.cc:128 msgid "Robot protection coefficient" msgstr "Roboter Schutz Koeffizient" #: src/Options.cc:133 msgid "Robot frontsize [radians]" msgstr "Roboter Vorderseite [Winkel im Bogenma]" #: src/Options.cc:138 msgid "Robot front bounce coefficient" msgstr "Roboter Vorderseiten Bounce-Koeffizient" #: src/Options.cc:143 msgid "Robot front hardness coefficient" msgstr "Robot Vorderseiten Hrte-Koeffizient" #: src/Options.cc:148 msgid "Robot front protection coefficient" msgstr "Roboter Vorderseiten Schutz-Koeffizient" #: src/Options.cc:153 msgid "Robot start energy" msgstr "Roboter Start-Energie" #: src/Options.cc:158 msgid "Robot max energy" msgstr "Max. Roboter-Energie" #: src/Options.cc:164 msgid "Robot max rotate speed [rad/s]" msgstr "Max. Roboter-Rotationsgeschwindigkeit [Winkel im Bogenma/s]" #: src/Options.cc:170 msgid "Robot cannon max rotate speed [rad/s]" msgstr "Max. Roboter-Kanonen-Rotationsgeschwindigkeit [Winkel im Bogenma/s]" #: src/Options.cc:176 msgid "Robot radar max rotate speed [rad/s]" msgstr "Max. Roboter-Radar-Rotationsgeschwindigkeit [Winkel im Bogenma/s]" #: src/Options.cc:181 msgid "Process check interval" msgstr "Prozess Check-Intervall" #: src/Options.cc:185 msgid "Robot energy levels" msgstr "Roboter Energielevels" #: src/Options.cc:189 msgid "Shot radius" msgstr "Schussradius" #: src/Options.cc:193 msgid "Shot speed" msgstr "Schussgeschwindigkeit" #: src/Options.cc:198 msgid "Shooting penalty (times shot energy)" msgstr "Energie-Kosten pro Schu" #: src/Options.cc:202 msgid "Shot min energy" msgstr "Min. Schussenergie" #: src/Options.cc:206 msgid "Shot max energy" msgstr "Max. Schussenergie" #: src/Options.cc:211 msgid "Shot energy increase speed [energy/s]" msgstr "Regenerationsgeschwindigkeit der Schu-Energie [Energie/s]" #: src/Options.cc:215 msgid "Background colour" msgstr "Hintergrund-Farbe" #: src/Options.cc:219 msgid "Foreground colour" msgstr "Vordergrund-Farbe" #: src/Options.cc:224 msgid "Colour for RTB messages" msgstr "Farbe fr RTB-Nachrichten" #: src/Options.cc:228 msgid "Cookie max energy" msgstr "Max. Keks-Energie" #: src/Options.cc:232 msgid "Cookie min energy" msgstr "Min. Keks-Energie" #: src/Options.cc:237 msgid "Cookie frequency [cookies per second]" msgstr "Keks-Frequenz [Kekse pro Sekunde]" #: src/Options.cc:241 msgid "Cookie radius" msgstr "Keks-Radius" #: src/Options.cc:245 msgid "Cookie colour" msgstr "Keks-Farbe" #: src/Options.cc:249 msgid "Mine max energy" msgstr "Max. Minen-Energie" #: src/Options.cc:253 msgid "Mine min energy" msgstr "Min. Minen-Energie" #: src/Options.cc:258 msgid "Mine frequency [mines per second]" msgstr "Minen-Frequenz [Minen pro Sekunde]" #: src/Options.cc:262 msgid "Mine radius" msgstr "Minen-Radius" #: src/Options.cc:266 msgid "Mine colour" msgstr "Minen-Farbe" #: src/Options.cc:270 msgid "Arena scale" msgstr "Arena Skala" #: src/Options.cc:275 msgid "Fast forward factor" msgstr "Fast forward Faktor" #: src/Options.cc:279 msgid "Timeout [s]" msgstr "Timeout [s]" #: src/Options.cc:283 msgid "Max timestep" msgstr "Max. Zeitschritt" #: src/Options.cc:287 msgid "Timescale" msgstr "Zeitskala" #: src/Options.cc:292 msgid "Update interval [s]" msgstr "Update Intervall [s]" #: src/Options.cc:297 msgid "Robot startup time [s]" msgstr "Zeit zum Hochfahren der Roboter [s]" #: src/Options.cc:301 msgid "Start CPU time [s]" msgstr "Anfangs-CPU-Zeit [s]" #: src/Options.cc:305 msgid "Extra CPU time [s]" msgstr "Extra CPU-Zeit [s]" #: src/Options.cc:310 msgid "Extra CPU period [s]" msgstr "Extra CPU Periode [s]" #: src/Options.cc:315 msgid "CPU time warning percentage" msgstr "kritischen Prozentsatz der CPU-Zeit" #: src/Options.cc:320 msgid "Logging frequency [Each n:th update interval]" msgstr "Loggingfrequenz [Jedes n:te Update-Intervall]" #: src/Options.cc:325 msgid "Max robots allowed simultaneously" msgstr "Anzahl max. gleichzeitig erlaubter Roboter" #: src/Options.cc:329 msgid "Robot search path" msgstr "Roboter Suchpfad" #: src/Options.cc:333 msgid "Arena search path" msgstr "Arena Suchpfad" #: src/Options.cc:344 msgid "Directory for temporary files" msgstr "Verzeichnis fr temporre Dateien" #: src/Options.cc:349 msgid "Initial Arena window width" msgstr "Anfngliche Arena-Fenster Breite" #: src/Options.cc:354 msgid "Initial Arena window height" msgstr "Anfngliche Arena-Fenster Hhe" #: src/Options.cc:359 msgid "Initial Arena window x position" msgstr "Anfngliche x-Position des Arena-Fensters" #: src/Options.cc:364 msgid "Initial Arena window y position" msgstr "Anfngliche y-Position des Arena-Fensters" #: src/Options.cc:369 msgid "Initial Control window x position" msgstr "Anfngliche x-Position des Kontroll-Fensters" #: src/Options.cc:374 msgid "Initial Control window y position" msgstr "Anfngliche y-Position des Kontroll-Fensters" #: src/Options.cc:379 msgid "Initial Message window width" msgstr "Anfngliche Nachrichten-Fenster Breite" #: src/Options.cc:384 msgid "Initial Message window height" msgstr "Anfngliche Nachrichten-Fenster Hhe" #: src/Options.cc:389 msgid "Initial Message window x position" msgstr "Anfngliche x-Position des Nachrichten-Fensters" #: src/Options.cc:394 msgid "Initial Message window y position" msgstr "Anfngliche y-Position des Nachrichten-Fensters" #: src/Options.cc:399 msgid "Initial Score window width" msgstr "Anfngliche Score-Fenster Breite" #: src/Options.cc:404 msgid "Initial Score window height" msgstr "Anfngliche Score-Fenster Hhe" #: src/Options.cc:409 msgid "Initial Score window x position" msgstr "Anfngliche x-Position Score-Fenster" #: src/Options.cc:414 msgid "Initial Score window y position" msgstr "Anfngliche y-Position Score-Fenster" #: src/Options.cc:419 msgid "Initial Statistics window width" msgstr "Anfngliche Statistik-Fenster Breite" #: src/Options.cc:424 msgid "Initial Statistics window height" msgstr "Anfngliche Statistik-Fenster Hhe" #: src/ScoreWindow.cc:72 src/StatisticsWindow.cc:225 #: src/StatisticsWindow.cc:372 msgid "Name" msgstr "Name" #: src/ScoreWindow.cc:72 msgid "Energy" msgstr "Energie" #: src/ScoreWindow.cc:72 msgid "Place" msgstr "Platz" #: src/ScoreWindow.cc:73 msgid "Last" msgstr "Letzer" #: src/ScoreWindow.cc:73 src/ScoreWindow.cc:147 msgid "Score" msgstr "Score" #: src/ScoreWindow.cc:148 msgid " Seq: " msgstr " Seq: " #: src/ScoreWindow.cc:151 src/StatisticsWindow.cc:90 #: src/StatisticsWindow.cc:389 src/StatisticsWindow.cc:508 msgid "Game" msgstr "Spiel" #: src/ScoreWindow.cc:154 src/OptionsWindow.cc:79 msgid "Time" msgstr "Zeit" #: src/StartTournamentWindow.cc:78 msgid "Start New Tournament" msgstr "Starte neues Turnier" #: src/StartTournamentWindow.cc:124 msgid "Robots in Tournament" msgstr "Roboter im Turnier" #: src/StartTournamentWindow.cc:125 msgid "Robots in Directory" msgstr "Roboter im Verzeichnis" #: src/StartTournamentWindow.cc:134 msgid "Arenas in Tournament" msgstr "Arenen im Turnier" #: src/StartTournamentWindow.cc:135 msgid "Arenas in Directory" msgstr "Arenen im Verzeichnis" #: src/StartTournamentWindow.cc:153 msgid " Remove " msgstr " Entfernen " #: src/StartTournamentWindow.cc:153 src/StartTournamentWindow.cc:155 msgid " Select All " msgstr " Alle auswhlen " #: src/StartTournamentWindow.cc:154 src/StartTournamentWindow.cc:155 msgid " Unselect All " msgstr " Alle abwhlen " #: src/StartTournamentWindow.cc:154 msgid " Add " msgstr " Hinzufgen " #: src/StartTournamentWindow.cc:251 msgid "Games per sequence" msgstr "Spiele pro Sequenz" #: src/StartTournamentWindow.cc:251 msgid "Robots per sequence" msgstr "Roboter pro Sequenz" #: src/StartTournamentWindow.cc:252 msgid "Number of sequences" msgstr "Anzahl der Sequenzen" #: src/StartTournamentWindow.cc:309 src/OptionsWindow.cc:137 #: src/OptionsWindow.cc:182 msgid " Min " msgstr " Min. " #: src/StartTournamentWindow.cc:321 msgid " All Arenas " msgstr " Alle Arenen " #: src/StartTournamentWindow.cc:333 msgid " Full Round " msgstr " Alle Runden " #: src/StartTournamentWindow.cc:343 src/OptionsWindow.cc:141 #: src/OptionsWindow.cc:186 msgid " Max " msgstr " Max. " #: src/StartTournamentWindow.cc:371 msgid " Load tournament " msgstr " Turnier laden " #: src/StartTournamentWindow.cc:371 msgid " Save tournament " msgstr " Turnier speichern" #: src/StartTournamentWindow.cc:393 msgid " Start " msgstr " Start " #: src/StartTournamentWindow.cc:393 src/OptionsWindow.cc:268 msgid " Cancel " msgstr " Abbrechen " #: src/StartTournamentWindow.cc:500 msgid "Choose a tournament file to load" msgstr "Whle eine Turnier-Datei zum laden" #: src/StartTournamentWindow.cc:534 msgid "Choose file to save tournament into" msgstr "Whle eine Datei um das Turnier zu speichern" #: src/StartTournamentWindow.cc:578 msgid "Error in specified tournament file." msgstr "Fehler in angegebener Turnier-Datei." #: src/StartTournamentWindow.cc:580 src/StartTournamentWindow.cc:740 #: src/StartTournamentWindow.cc:891 src/OptionsWindow.cc:266 msgid " Ok " msgstr " Ok " #: src/StartTournamentWindow.cc:581 msgid "Tournament could not be loaded." msgstr "Turnier konnte nicht geladen werden." #: src/StartTournamentWindow.cc:730 msgid "There are too few robots in the tournament." msgstr "Es sind zu wenig Roboter im Turnier." #: src/StartTournamentWindow.cc:732 src/StartTournamentWindow.cc:886 msgid "There are no arenas in the tournament." msgstr "Es sind keine Arenen im Turnier." #: src/StartTournamentWindow.cc:735 msgid "Could not open file." msgstr "Kann Datei nicht ffnen." #: src/StartTournamentWindow.cc:741 msgid "Tournament could not be saved." msgstr "Turnier konnte nicht gespeichert werden." #: src/StartTournamentWindow.cc:884 msgid "There must be at least two robots in the tournament." msgstr "Es mssen mindestens zwei Roboter im Turnier sein." #: src/StartTournamentWindow.cc:892 msgid "Tournament could not be started." msgstr "Turnier konnte nicht gestartet werden." #: src/StatisticsWindow.cc:49 msgid "Statistics" msgstr "Statistiken" #: src/StatisticsWindow.cc:82 msgid " Close " msgstr " Schlieen " #: src/StatisticsWindow.cc:84 msgid " Save Statistics " msgstr " Statistiken speichern " #: src/StatisticsWindow.cc:86 msgid " Total " msgstr " Gesamt " #: src/StatisticsWindow.cc:88 msgid " Sequence Total " msgstr " Sequenzen gesamt " #: src/StatisticsWindow.cc:225 msgid "Position" msgstr "Position" #: src/StatisticsWindow.cc:225 msgid "Points" msgstr "Punkte" #: src/StatisticsWindow.cc:226 msgid "Games" msgstr "Spiele" #: src/StatisticsWindow.cc:226 msgid "Survival Time" msgstr "berlebenszeit" #: src/StatisticsWindow.cc:226 msgid "Total Points" msgstr "Gesamtpunktzahl" #: src/StatisticsWindow.cc:310 msgid "Choose a statistics file to save" msgstr "Whle eine Statistik-Datei zum speichern" #: src/StatisticsWindow.cc:388 msgid "Seq" msgstr "Seq" #: src/StatisticsWindow.cc:485 msgid " Grand Total " msgstr " Endergebnis " #: src/StatisticsWindow.cc:491 msgid " Sequence " msgstr " Sequenz " #: src/StatisticsWindow.cc:507 msgid " Sequence: " msgstr " Sequenz: " #: src/Various.cc:96 msgid "Error in" msgstr "Fehler in" #: src/OptionsWindow.cc:52 msgid "Options" msgstr "Optionen" #: src/OptionsWindow.cc:78 msgid "Environment" msgstr "Umgebung" #: src/OptionsWindow.cc:78 msgid "Robot" msgstr "Roboter" #: src/OptionsWindow.cc:78 msgid "Shot" msgstr "Schuss" #: src/OptionsWindow.cc:79 msgid "Extras" msgstr "Extras" #: src/OptionsWindow.cc:79 msgid "Window sizes" msgstr "Fenster-Gren" #: src/OptionsWindow.cc:80 msgid "Misc" msgstr "Verschiedenes" #: src/OptionsWindow.cc:139 src/OptionsWindow.cc:184 src/OptionsWindow.cc:211 msgid " Def " msgstr " Def " #: src/OptionsWindow.cc:236 msgid " Grab sizes and positions from present windows " msgstr " Nehme Gre und Position vom aktuellen Fenster" #: src/OptionsWindow.cc:256 msgid " Default " msgstr " Default " #: src/OptionsWindow.cc:258 msgid " Load options " msgstr " Optionen laden " #: src/OptionsWindow.cc:260 msgid " Save options " msgstr " Optionen speichern " #: src/OptionsWindow.cc:262 msgid " Save as default " msgstr " Als Standard speichern" #: src/OptionsWindow.cc:264 msgid " Apply " msgstr " Anwenden " #: src/OptionsWindow.cc:457 msgid "Choose an options file to load" msgstr "Whle eine Options-Datei zum laden" #: src/OptionsWindow.cc:481 msgid "Choose an options file to save" msgstr "Whle eine Options-Datei zum speichern" realtimebattle-1.0.8/po/es.po0000644000175000017500000005231510321753015014240 0ustar moimoi# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # # msgid "" msgstr "" "Project-Id-Version: RealTime Battle\n" "Report-Msgid-Bugs-To: jonico@users.sourceforge.net\n" "POT-Creation-Date: 2005-10-08 16:22+0200\n" "PO-Revision-Date: 2004-11-2004 20:09+0100\n" "Last-Translator: Mc_Tr \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: src/RealTimeBattle.cc:102 msgid " Usage: RealTimeBattle [options] " msgstr " Uso: RealTimeBattle [opciones] " #: src/RealTimeBattle.cc:103 msgid " Options:" msgstr " Opciones: " #: src/RealTimeBattle.cc:104 msgid " --debug_mode, -d debug mode" msgstr " --debug_mode, -d modo debug" #: src/RealTimeBattle.cc:105 msgid "" " --debug_level [0-5], -D sets the initial debug level. Implies -" "d" msgstr "" " --debug_level [0-5], -D Nivel de debug inicial. necesario -d" #: src/RealTimeBattle.cc:106 msgid " --normal_mode, -n normal mode (default)" msgstr " --normal_mode, -n modo normal (predeterminado)" #: src/RealTimeBattle.cc:107 msgid " --competition_mode, -c competition mode" msgstr " --competition_mode, -c modo competicin" #: src/RealTimeBattle.cc:109 msgid " --no_graphics, -g no graphics will be displayed" msgstr " --no_graphics, -g sin grficos" #: src/RealTimeBattle.cc:110 msgid "" " --option_file [file], -o selects option-file (default: $HOME/." "rtbrc)" msgstr "" " --option_file [archivo], -o fichero de opciones " "(predeterminado: $HOME/.rtbrc)" #: src/RealTimeBattle.cc:112 msgid "" " --log_file [file], -l make log file, if 'file' is '-'\n" " the log is sent to STDOUT" msgstr "" " --log_file [archivo], -l archivo de log, si es '-'\n" " el log se envia a STDOUT" #: src/RealTimeBattle.cc:115 msgid "" " --tournament_file [file], -t specify a tournament file to\n" " autostart a tournament" msgstr "" " --tournament_file [archivo], -t archivo de torneo que se\n" " iniciar automticamente" #: src/RealTimeBattle.cc:118 msgid "" " --statistics_file [file], -s file to print the statistics to\n" " when autostarting" msgstr "" " --statistics_file [archivo], -s archivo donde se volcarn \n" " las estadisticas" #: src/RealTimeBattle.cc:121 msgid "" " --message_file [file], -m redirect messages to 'file'.\n" " With '-' as 'file', STDOUT is used.\n" " If both log and messages are sent\n" " to STDOUT, '-m' will be ignored" msgstr "" " --message_file [archivo], -m envia los mensajes al 'archivo'.\n" " Con '-' como 'archivo', se usar " "STDOUT.\n" " Si se envin tanto el log como los " "mensajes\n" " a STDOUT, '-m' no se tendr en cuenta." #: src/RealTimeBattle.cc:126 msgid "" " --replay [file] -r a log file to replay.\n" " if '-' is specified as file,\n" " input is taken from STDIN" msgstr "" " --replay [archivo] -r archivo log a recrear.\n" " si se indica '-' como archivo,\n" " la entrada se coge de STDIN" #: src/RealTimeBattle.cc:130 msgid " --help, -h prints this message" msgstr " --help, -h muestra este mensaje" #: src/RealTimeBattle.cc:131 msgid " --version, -v prints the version number" msgstr " --version, -v muestra la verin" #: src/RealTimeBattle.cc:133 #, fuzzy msgid "" " --port_number -p specifies the port to listen on " "(default 32134)" msgstr " --normal_mode, -n modo normal (predeterminado)" #: src/ArenaBase.cc:123 msgid "*Starting robots*" msgstr "* Iniciando Robots *" #: src/ArenaBase.cc:126 msgid "*Shutting down robots*" msgstr "* Finalizando Robots *" #: src/ArenaBase.cc:130 msgid "*Running*" msgstr "* Ejecutando ... *" #: src/ArenaBase.cc:132 msgid "*Pausing after game*" msgstr "* Pausar despues del juego *" #: src/ArenaBase.cc:136 msgid "*Paused*" msgstr "* Pausado *" #: src/ArenaBase.cc:139 msgid "*Exiting*" msgstr "* Saliendo *" #: src/ArenaBase.cc:142 msgid "*Finished*" msgstr "* Terminado *" #: src/ArenaRealTime.cc:849 #, c-format msgid "Game %d of sequence %d begins on arena" msgstr "Ha comenzado la partida %d de la secuencia %d." #: src/ArenaRealTime.cc:1037 #, c-format msgid "Robot with filename %s has not given any name" msgstr "El Robot con el nombre de fichero %s no ha dado nombre." #: src/ArenaReplay.cc:131 #, c-format msgid "Game %d of sequence %d" msgstr "Partida %d de la secuencia %d." #: src/ArenaWindow.cc:77 msgid " No Zoom " msgstr " No Zoom " #: src/ArenaWindow.cc:79 msgid " Zoom In " msgstr " Aumentar zoom " #: src/ArenaWindow.cc:81 msgid " Zoom Out " msgstr " Disminuir zoom " #: src/ArenaWindow.cc:149 msgid "Arena" msgstr "Arena" #: src/ControlWindow.cc:81 msgid " New Tournament " msgstr " Nuevo CamPeonaTO " #: src/ControlWindow.cc:83 msgid " Replay Tournament " msgstr " Cargar Campeonato " #: src/ControlWindow.cc:85 msgid " Pause " msgstr " Pausa " #: src/ControlWindow.cc:87 msgid " End " msgstr " FIN " #: src/ControlWindow.cc:89 msgid " Options " msgstr " Opciones " #: src/ControlWindow.cc:91 msgid " Statistics " msgstr " Estadisticas " #: src/ControlWindow.cc:93 msgid " Quit " msgstr " QUITAR " #: src/ControlWindow.cc:119 msgid "Show arena window" msgstr "Ver la arena" #: src/ControlWindow.cc:121 msgid "Show message window" msgstr "Ver los mensajes" #: src/ControlWindow.cc:123 msgid "Show score window" msgstr "Ver los puntos" #: src/ControlWindow.cc:202 msgid " Step " msgstr " Paso " #: src/ControlWindow.cc:204 msgid " End Game " msgstr " Fin Juego " #: src/ControlWindow.cc:206 msgid " Kill Marked Robot " msgstr " Matar robots marcados " #: src/ControlWindow.cc:234 msgid " Debug Level: " msgstr " Nivel de Debug: " #: src/ControlWindow.cc:335 msgid " Step forward " msgstr " Paso adelante " #: src/ControlWindow.cc:339 msgid " Step backward " msgstr " Paso atrs " #: src/ControlWindow.cc:343 msgid " Next Game " msgstr " Siguiente Partida " #: src/ControlWindow.cc:347 msgid " Prev Game " msgstr " Partida anterior " #: src/ControlWindow.cc:351 msgid " Next Seq " msgstr " Siguiente Sequencia " #: src/ControlWindow.cc:355 msgid " Prev Seq " msgstr " Secuencia Previa " #: src/ControlWindow.cc:514 src/ControlWindow.cc:674 src/Gui.cc:154 msgid "" "This action will kill the current tournament.\n" "Do you want to do that?" msgstr "" "Con esto abortaras el campeonato actual.\n" "Ests seguro?" #: src/ControlWindow.cc:517 src/ControlWindow.cc:677 msgid "Yes" msgstr "Si" #: src/ControlWindow.cc:518 src/ControlWindow.cc:678 msgid "No" msgstr "" #: src/ControlWindow.cc:531 msgid "Choose a log file to replay" msgstr "Selecciona el archivo de log a recrear." #: src/MessageWindow.cc:78 msgid " Clear all messages " msgstr " Borra todos los mensajes " #: src/MessageWindow.cc:80 msgid " Show only marked robot " msgstr " Ver nicamente el robot marcado " #: src/MessageWindow.cc:82 msgid " Show all " msgstr " Ver todos " #: src/MessageWindow.cc:108 src/StatisticsWindow.cc:93 msgid " Robot " msgstr "" #: src/MessageWindow.cc:108 msgid " Message " msgstr " Mensaje " #: src/MessageWindow.cc:172 msgid "Messages" msgstr " Mensajes " #: src/MessageWindow.cc:176 msgid " All " msgstr " Todo " #: src/Options.cc:77 msgid "Gravitational Constant" msgstr "Constante gravitatoria" #: src/Options.cc:81 msgid "Air resistance" msgstr "Resistencia del Aire" #: src/Options.cc:85 msgid "Roll friction" msgstr "Friccin de giro" #: src/Options.cc:90 msgid "Slide/brake friction" msgstr "Friccin de frenado" #: src/Options.cc:95 msgid "Send robot coordinates" msgstr "" #: src/Options.cc:100 msgid "Robot max acceleration" msgstr "Acelaracin mxima" #: src/Options.cc:105 msgid "Robot min acceleration" msgstr "Aceleracin mnima" #: src/Options.cc:109 msgid "Robot radius" msgstr "Radio" #: src/Options.cc:113 msgid "Robot mass" msgstr "Masa" #: src/Options.cc:118 msgid "Robot bounce coefficient" msgstr "Coeficiente de salto." #: src/Options.cc:123 msgid "Robot hardness coefficient" msgstr "Coeficiente de dureza" #: src/Options.cc:128 msgid "Robot protection coefficient" msgstr "Coeficiente de proteccin" #: src/Options.cc:133 msgid "Robot frontsize [radians]" msgstr "Tamao [radianes]" #: src/Options.cc:138 msgid "Robot front bounce coefficient" msgstr "Coeficiente de salto delantero" #: src/Options.cc:143 msgid "Robot front hardness coefficient" msgstr "Coeficiente de dureza delantero" #: src/Options.cc:148 msgid "Robot front protection coefficient" msgstr "Coeficiente de proteccin delantero" #: src/Options.cc:153 msgid "Robot start energy" msgstr "Energia de inicio" #: src/Options.cc:158 msgid "Robot max energy" msgstr "Energia mxima" #: src/Options.cc:164 msgid "Robot max rotate speed [rad/s]" msgstr "Velcidad mxima de rotacin [rad/s]" #: src/Options.cc:170 msgid "Robot cannon max rotate speed [rad/s]" msgstr "Velocidad mxima velocidad de rotacin del caon [rad/s]" #: src/Options.cc:176 msgid "Robot radar max rotate speed [rad/s]" msgstr "Velocidad mxima velocidad de rotacin del radar [rad/s]" #: src/Options.cc:181 msgid "Process check interval" msgstr "Intrvalo de chequeo del proceso" #: src/Options.cc:185 msgid "Robot energy levels" msgstr "Niveles de energia" #: src/Options.cc:189 msgid "Shot radius" msgstr "Radio" #: src/Options.cc:193 msgid "Shot speed" msgstr "Velocidad" #: src/Options.cc:198 msgid "Shooting penalty (times shot energy)" msgstr "Penalizacin" #: src/Options.cc:202 msgid "Shot min energy" msgstr "Energia mnima" #: src/Options.cc:206 msgid "Shot max energy" msgstr "Energia mxima" #: src/Options.cc:211 msgid "Shot energy increase speed [energy/s]" msgstr "Velocidad de aumento de energia energia/s]" #: src/Options.cc:215 msgid "Background colour" msgstr "Color de fondo" #: src/Options.cc:219 msgid "Foreground colour" msgstr "Color de primer plano" #: src/Options.cc:224 msgid "Colour for RTB messages" msgstr "Color para los mensajes" #: src/Options.cc:228 msgid "Cookie max energy" msgstr "Emergia mxima" #: src/Options.cc:232 msgid "Cookie min energy" msgstr "Emegia mnima" #: src/Options.cc:237 msgid "Cookie frequency [cookies per second]" msgstr "Frecuencia de cookies [por segundo]" #: src/Options.cc:241 msgid "Cookie radius" msgstr "Radio" #: src/Options.cc:245 msgid "Cookie colour" msgstr "Color" #: src/Options.cc:249 msgid "Mine max energy" msgstr "Energia mxima" #: src/Options.cc:253 msgid "Mine min energy" msgstr "Energia mnima" #: src/Options.cc:258 msgid "Mine frequency [mines per second]" msgstr "Frecuencia de minas [por segundo]" #: src/Options.cc:262 msgid "Mine radius" msgstr "Radio" #: src/Options.cc:266 msgid "Mine colour" msgstr "Color" #: src/Options.cc:270 msgid "Arena scale" msgstr "Escala de la Arena" #: src/Options.cc:275 msgid "Fast forward factor" msgstr "Velocidad de 'Adelante'" #: src/Options.cc:279 msgid "Timeout [s]" msgstr "" #: src/Options.cc:283 msgid "Max timestep" msgstr "" #: src/Options.cc:287 msgid "Timescale" msgstr "Scala de tiempo" #: src/Options.cc:292 msgid "Update interval [s]" msgstr "Intervalo de refresco [s]" #: src/Options.cc:297 msgid "Robot startup time [s]" msgstr "Retardo de inicio [s]" #: src/Options.cc:301 msgid "Start CPU time [s]" msgstr "Lmite de gasto de CPU [s]" #: src/Options.cc:305 msgid "Extra CPU time [s]" msgstr "Tiempo extra de uso de CPU [s]" #: src/Options.cc:310 msgid "Extra CPU period [s]" msgstr "Periodo del uso extra de la CPU [s]" #: src/Options.cc:315 msgid "CPU time warning percentage" msgstr "Porcentaje de aviso en el uso de la CPU" #: src/Options.cc:320 msgid "Logging frequency [Each n:th update interval]" msgstr "Frecuencia de 'logeo' [refresca cada n-veces]" #: src/Options.cc:325 msgid "Max robots allowed simultaneously" msgstr "Nmero mximo de robot simultaneos" #: src/Options.cc:329 msgid "Robot search path" msgstr "Ruta de busqueda de robots" #: src/Options.cc:333 msgid "Arena search path" msgstr "Ruta de busqueda de arenas" #: src/Options.cc:344 msgid "Directory for temporary files" msgstr "Directorio para archivos temporales" #: src/Options.cc:349 msgid "Initial Arena window width" msgstr "Anchura de la ventana de Arenas" #: src/Options.cc:354 msgid "Initial Arena window height" msgstr "Altura de la ventana de Arenas" #: src/Options.cc:359 msgid "Initial Arena window x position" msgstr "Posicin x de la ventana de Arenas" #: src/Options.cc:364 msgid "Initial Arena window y position" msgstr "Posicin y de la ventana de Arenas" #: src/Options.cc:369 msgid "Initial Control window x position" msgstr "Posicin x de la ventana de Control" #: src/Options.cc:374 msgid "Initial Control window y position" msgstr "Posicin y de la ventana de Control" #: src/Options.cc:379 msgid "Initial Message window width" msgstr "Anchura de la ventana de Mensajes" #: src/Options.cc:384 msgid "Initial Message window height" msgstr "Altura de la ventana de Mensajes" #: src/Options.cc:389 msgid "Initial Message window x position" msgstr "Posicin x de la ventana de Mensajes" #: src/Options.cc:394 msgid "Initial Message window y position" msgstr "Posicin y de la ventana de Mensajes" #: src/Options.cc:399 msgid "Initial Score window width" msgstr "Anchura de la ventana de Puntuacin" #: src/Options.cc:404 msgid "Initial Score window height" msgstr "Altura de la ventana de Puntuacin" #: src/Options.cc:409 msgid "Initial Score window x position" msgstr "Posicin de la ventana de Puntuacin" #: src/Options.cc:414 msgid "Initial Score window y position" msgstr "Posicin de la ventana de Puntuacin" #: src/Options.cc:419 msgid "Initial Statistics window width" msgstr "Anchura de la ventana de Estadisticas" #: src/Options.cc:424 msgid "Initial Statistics window height" msgstr "Altura de la ventana de Estadisticas" #: src/ScoreWindow.cc:72 src/StatisticsWindow.cc:225 #: src/StatisticsWindow.cc:372 msgid "Name" msgstr "Nombre" #: src/ScoreWindow.cc:72 msgid "Energy" msgstr "Energia" #: src/ScoreWindow.cc:72 msgid "Place" msgstr "Lugar" #: src/ScoreWindow.cc:73 msgid "Last" msgstr "ltimo" #: src/ScoreWindow.cc:73 src/ScoreWindow.cc:147 msgid "Score" msgstr "Puntos" #: src/ScoreWindow.cc:148 msgid " Seq: " msgstr " Sec: " #: src/ScoreWindow.cc:151 src/StatisticsWindow.cc:90 #: src/StatisticsWindow.cc:389 src/StatisticsWindow.cc:508 msgid "Game" msgstr "Juego" #: src/ScoreWindow.cc:154 src/OptionsWindow.cc:79 msgid "Time" msgstr "Tiempo" #: src/StartTournamentWindow.cc:78 #, fuzzy msgid "Start New Tournament" msgstr " Nuevo CamPeonaTO " #: src/StartTournamentWindow.cc:124 msgid "Robots in Tournament" msgstr "Robots en el Torneo" #: src/StartTournamentWindow.cc:125 msgid "Robots in Directory" msgstr "Robots en el directorio" #: src/StartTournamentWindow.cc:134 msgid "Arenas in Tournament" msgstr "Arens en el Torneo" #: src/StartTournamentWindow.cc:135 msgid "Arenas in Directory" msgstr "Arenas en el directorio" #: src/StartTournamentWindow.cc:153 msgid " Remove " msgstr "" #: src/StartTournamentWindow.cc:153 src/StartTournamentWindow.cc:155 msgid " Select All " msgstr " Selecciona todo " #: src/StartTournamentWindow.cc:154 src/StartTournamentWindow.cc:155 msgid " Unselect All " msgstr " Deselecciona todo " #: src/StartTournamentWindow.cc:154 msgid " Add " msgstr " Aadir " #: src/StartTournamentWindow.cc:251 msgid "Games per sequence" msgstr "Juegos por secuencia" #: src/StartTournamentWindow.cc:251 msgid "Robots per sequence" msgstr "Robots por secuencia" #: src/StartTournamentWindow.cc:252 msgid "Number of sequences" msgstr "N de secuencias" #: src/StartTournamentWindow.cc:309 src/OptionsWindow.cc:137 #: src/OptionsWindow.cc:182 msgid " Min " msgstr "" #: src/StartTournamentWindow.cc:321 msgid " All Arenas " msgstr " Todas las Arenas " #: src/StartTournamentWindow.cc:333 msgid " Full Round " msgstr " Ronda entera " #: src/StartTournamentWindow.cc:343 src/OptionsWindow.cc:141 #: src/OptionsWindow.cc:186 msgid " Max " msgstr " Mx " #: src/StartTournamentWindow.cc:371 msgid " Load tournament " msgstr " Cargar Torneo " #: src/StartTournamentWindow.cc:371 msgid " Save tournament " msgstr " Guardar Torneo " #: src/StartTournamentWindow.cc:393 msgid " Start " msgstr " Empezar " #: src/StartTournamentWindow.cc:393 src/OptionsWindow.cc:268 msgid " Cancel " msgstr " Cancelar " #: src/StartTournamentWindow.cc:500 msgid "Choose a tournament file to load" msgstr "Archivo torneo a cargar" #: src/StartTournamentWindow.cc:534 msgid "Choose file to save tournament into" msgstr "Archivo torneo a guardar" #: src/StartTournamentWindow.cc:578 msgid "Error in specified tournament file." msgstr "Error en el archivo especificado" #: src/StartTournamentWindow.cc:580 src/StartTournamentWindow.cc:740 #: src/StartTournamentWindow.cc:891 src/OptionsWindow.cc:266 msgid " Ok " msgstr "" #: src/StartTournamentWindow.cc:581 msgid "Tournament could not be loaded." msgstr "El torneo no puedo cargarse" #: src/StartTournamentWindow.cc:730 msgid "There are too few robots in the tournament." msgstr "No hay suficientes robots en el torneo" #: src/StartTournamentWindow.cc:732 src/StartTournamentWindow.cc:886 msgid "There are no arenas in the tournament." msgstr "No hay arenas en el torneo" #: src/StartTournamentWindow.cc:735 msgid "Could not open file." msgstr "No se puede abrir el archivo" #: src/StartTournamentWindow.cc:741 msgid "Tournament could not be saved." msgstr "El torneo no ha podido ser guardado" #: src/StartTournamentWindow.cc:884 msgid "There must be at least two robots in the tournament." msgstr "Deben existir al menos dos robots en el torneo." #: src/StartTournamentWindow.cc:892 msgid "Tournament could not be started." msgstr "El torneo no se ha podido iniciar." #: src/StatisticsWindow.cc:49 msgid "Statistics" msgstr "Estadisticas" #: src/StatisticsWindow.cc:82 msgid " Close " msgstr " Cerrar " #: src/StatisticsWindow.cc:84 msgid " Save Statistics " msgstr " Guardar Estadisticas " #: src/StatisticsWindow.cc:86 msgid " Total " msgstr "" #: src/StatisticsWindow.cc:88 msgid " Sequence Total " msgstr " Total de la Secuencia " #: src/StatisticsWindow.cc:225 msgid "Position" msgstr "Posicin" #: src/StatisticsWindow.cc:225 msgid "Points" msgstr "Puntos" #: src/StatisticsWindow.cc:226 msgid "Games" msgstr "Juegos" #: src/StatisticsWindow.cc:226 msgid "Survival Time" msgstr "Tiempo de supervivencia" #: src/StatisticsWindow.cc:226 msgid "Total Points" msgstr "Puntos Totales" #: src/StatisticsWindow.cc:310 msgid "Choose a statistics file to save" msgstr "Archivo para guardar las estadisticas" #: src/StatisticsWindow.cc:388 msgid "Seq" msgstr "Sec" #: src/StatisticsWindow.cc:485 msgid " Grand Total " msgstr " Gran TOTAL " #: src/StatisticsWindow.cc:491 msgid " Sequence " msgstr " Secuencia " #: src/StatisticsWindow.cc:507 msgid " Sequence: " msgstr " Secuencia: " #: src/Various.cc:96 msgid "Error in" msgstr "Error en" #: src/OptionsWindow.cc:52 msgid "Options" msgstr "Opciones" #: src/OptionsWindow.cc:78 msgid "Environment" msgstr "Entorno" #: src/OptionsWindow.cc:78 msgid "Robot" msgstr "" #: src/OptionsWindow.cc:78 msgid "Shot" msgstr "Disparo" #: src/OptionsWindow.cc:79 msgid "Extras" msgstr "" #: src/OptionsWindow.cc:79 msgid "Window sizes" msgstr "Tamao ventanas" #: src/OptionsWindow.cc:80 msgid "Misc" msgstr "" #: src/OptionsWindow.cc:139 src/OptionsWindow.cc:184 src/OptionsWindow.cc:211 msgid " Def " msgstr "" #: src/OptionsWindow.cc:236 msgid " Grab sizes and positions from present windows " msgstr "Guardar tamaos y posiciones de las ventanas actuales" #: src/OptionsWindow.cc:256 #, fuzzy msgid " Default " msgstr " Predeterminado " #: src/OptionsWindow.cc:258 #, fuzzy msgid " Load options " msgstr " Cargar opciones " #: src/OptionsWindow.cc:260 #, fuzzy msgid " Save options " msgstr " Salvar opciones " #: src/OptionsWindow.cc:262 #, fuzzy msgid " Save as default " msgstr " Salvar como predeterminado " #: src/OptionsWindow.cc:264 #, fuzzy msgid " Apply " msgstr " Aplicar " #: src/OptionsWindow.cc:457 msgid "Choose an options file to load" msgstr "Nombre del archivo a cargar" #: src/OptionsWindow.cc:481 msgid "Choose an options file to save" msgstr "Nombre del archivo a guardar" #, fuzzy #~ msgid " --use_gui [gui], -g sets the gui to be used" #~ msgstr " --version, -v muestra la verin" #, fuzzy #~ msgid "No options" #~ msgstr " Cargar opciones " #, fuzzy #~ msgid "Cancel" #~ msgstr " Cancelar " #~ msgid "Acceleration" #~ msgstr "Acelaracin" #~ msgid "Brake" #~ msgstr "Freno" #~ msgid "Modular angle, Angle" #~ msgstr "Angulo modular, Angulo" #~ msgid "New rotation" #~ msgstr "Nueva rotacin" #~ msgid "New acceleration" #~ msgstr "Nueva acelaracin" realtimebattle-1.0.8/po/gl.po0000644000175000017500000005566310321753015014244 0ustar moimoi# Galician translation of RealTimeBattle. # Copyright (C) 2000 Jess Bravo lvarez. # Jess Bravo lvarez , 2000. # # Se desexas colaborar connosco na traduccin de programas libres galego, # vai mira-la pxina do noso grupo: http://www.ctv.es/USERS/jtarrio/trans # # First Version: 2000-02-09 22:17+0100 # msgid "" msgstr "" "Project-Id-Version: RealTimeBattle 1.0.2\n" "Report-Msgid-Bugs-To: jonico@users.sourceforge.net\n" "POT-Creation-Date: 2005-10-08 16:22+0200\n" "PO-Revision-Date: 2000-02-09 22:17+0100\n" "Last-Translator: Jess Bravo lvarez \n" "Language-Team: Galician \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: src/RealTimeBattle.cc:102 msgid " Usage: RealTimeBattle [options] " msgstr " Uso: RealTimeBattle [opcins] " #: src/RealTimeBattle.cc:103 msgid " Options:" msgstr " Opcins:" #: src/RealTimeBattle.cc:104 msgid " --debug_mode, -d debug mode" msgstr " --debug_mode, -d modo de debug" #: src/RealTimeBattle.cc:105 msgid "" " --debug_level [0-5], -D sets the initial debug level. Implies -" "d" msgstr "" " --debug_level [0-5], -D establece-lo nivel inicial de debug.\n" " Implica -d" #: src/RealTimeBattle.cc:106 msgid " --normal_mode, -n normal mode (default)" msgstr " --normal_mode, -n modo normal (por defecto)" #: src/RealTimeBattle.cc:107 msgid " --competition_mode, -c competition mode" msgstr " --competition_mode, -c modo de competicin" #: src/RealTimeBattle.cc:109 msgid " --no_graphics, -g no graphics will be displayed" msgstr " --no_graphics, -g non amosar grficos" #: src/RealTimeBattle.cc:110 msgid "" " --option_file [file], -o selects option-file (default: $HOME/." "rtbrc)" msgstr "" " --option_file [ficheiro], -o escolle-lo ficheiro de opcins\n" " (por defecto: $HOME/.rtbrc)" #: src/RealTimeBattle.cc:112 msgid "" " --log_file [file], -l make log file, if 'file' is '-'\n" " the log is sent to STDOUT" msgstr "" " --log_file [ficheiro], -l crear un ficheiro de rexistro, se\n" " 'ficheiro' '-', o rexistro envase\n" " sada estndar" #: src/RealTimeBattle.cc:115 msgid "" " --tournament_file [file], -t specify a tournament file to\n" " autostart a tournament" msgstr "" " --tournament_file [ficheiro], -t indicar un ficheiro de torneo para\n" " comezar automticamente un torneo" #: src/RealTimeBattle.cc:118 msgid "" " --statistics_file [file], -s file to print the statistics to\n" " when autostarting" msgstr "" " --statistics_file [ficheiro], -s ficheiro que escribir as " "estatsticas\n" " comezar automticamente" #: src/RealTimeBattle.cc:121 msgid "" " --message_file [file], -m redirect messages to 'file'.\n" " With '-' as 'file', STDOUT is used.\n" " If both log and messages are sent\n" " to STDOUT, '-m' will be ignored" msgstr "" " --message_file [ficheiro], -m redirixi-las mensaxes a 'ficheiro'.\n" " Con '-' como 'ficheiro', sase " "STDOUT.\n" " Se o rexistro e as mensaxes se " "envan\n" " a STDOUT, '-m' ignrase" #: src/RealTimeBattle.cc:126 msgid "" " --replay [file] -r a log file to replay.\n" " if '-' is specified as file,\n" " input is taken from STDIN" msgstr "" " --replay [ficheiro] -r ficheiro de rexistro para " "reproducir.\n" " se se indica '-' como ficheiro, a\n" " entrada cllese de STDIN" #: src/RealTimeBattle.cc:130 msgid " --help, -h prints this message" msgstr " --help, -h amosar esta mensaxe" #: src/RealTimeBattle.cc:131 msgid " --version, -v prints the version number" msgstr " --version, -v amosa-lo nmero de versin" #: src/RealTimeBattle.cc:133 #, fuzzy msgid "" " --port_number -p specifies the port to listen on " "(default 32134)" msgstr " --normal_mode, -n modo normal (por defecto)" #: src/ArenaBase.cc:123 msgid "*Starting robots*" msgstr "*Iniciando robots*" #: src/ArenaBase.cc:126 msgid "*Shutting down robots*" msgstr "*Desconectando robots*" #: src/ArenaBase.cc:130 msgid "*Running*" msgstr "*Executndose*" #: src/ArenaBase.cc:132 msgid "*Pausing after game*" msgstr "*Parando despois do xogo*" #: src/ArenaBase.cc:136 msgid "*Paused*" msgstr "*Parado*" #: src/ArenaBase.cc:139 msgid "*Exiting*" msgstr "*Sando*" #: src/ArenaBase.cc:142 msgid "*Finished*" msgstr "*Rematado*" #: src/ArenaRealTime.cc:849 #, c-format msgid "Game %d of sequence %d begins on arena" msgstr "Xogo %d da secuencia %d comeza na area" #: src/ArenaRealTime.cc:1037 #, c-format msgid "Robot with filename %s has not given any name" msgstr "O robot co nome de ficheiro %s non deu ningn nome" #: src/ArenaReplay.cc:131 #, c-format msgid "Game %d of sequence %d" msgstr "Xogo %d da secuencia %d" #: src/ArenaWindow.cc:77 msgid " No Zoom " msgstr " Sen Zoom " #: src/ArenaWindow.cc:79 msgid " Zoom In " msgstr " Achegar " #: src/ArenaWindow.cc:81 msgid " Zoom Out " msgstr " Alonxar " #: src/ArenaWindow.cc:149 msgid "Arena" msgstr "Area" #: src/ControlWindow.cc:81 msgid " New Tournament " msgstr " Novo Torneo " #: src/ControlWindow.cc:83 msgid " Replay Tournament " msgstr " Reproducir un Torneo " #: src/ControlWindow.cc:85 msgid " Pause " msgstr " Parar " #: src/ControlWindow.cc:87 msgid " End " msgstr " Acabar " #: src/ControlWindow.cc:89 msgid " Options " msgstr " Opcins " #: src/ControlWindow.cc:91 msgid " Statistics " msgstr " Estatsticas " #: src/ControlWindow.cc:93 msgid " Quit " msgstr " Sar " #: src/ControlWindow.cc:119 msgid "Show arena window" msgstr "Amosa-la fiestra da area" #: src/ControlWindow.cc:121 msgid "Show message window" msgstr "Amosa-la fiestra das mensaxes" #: src/ControlWindow.cc:123 msgid "Show score window" msgstr "Amosa-la fiestra das puntuacins" #: src/ControlWindow.cc:202 msgid " Step " msgstr " Paso a Paso " #: src/ControlWindow.cc:204 msgid " End Game " msgstr " Acaba-lo Xogo " #: src/ControlWindow.cc:206 msgid " Kill Marked Robot " msgstr " Mata-lo Robot Seleccionado " #: src/ControlWindow.cc:234 msgid " Debug Level: " msgstr " Nivel de debug: " #: src/ControlWindow.cc:335 msgid " Step forward " msgstr " Paso para adiante " #: src/ControlWindow.cc:339 msgid " Step backward " msgstr " Paso para atrs " #: src/ControlWindow.cc:343 msgid " Next Game " msgstr " Seguinte Xogo " #: src/ControlWindow.cc:347 msgid " Prev Game " msgstr " Xogo Anterior" #: src/ControlWindow.cc:351 msgid " Next Seq " msgstr " Seguinte Sec " #: src/ControlWindow.cc:355 msgid " Prev Seq " msgstr " Sec Anterior " #: src/ControlWindow.cc:514 src/ControlWindow.cc:674 src/Gui.cc:154 msgid "" "This action will kill the current tournament.\n" "Do you want to do that?" msgstr "" "Esta accin rematar o torneo actual.\n" "Quere facer iso?" #: src/ControlWindow.cc:517 src/ControlWindow.cc:677 msgid "Yes" msgstr "Si" #: src/ControlWindow.cc:518 src/ControlWindow.cc:678 msgid "No" msgstr "Non" #: src/ControlWindow.cc:531 msgid "Choose a log file to replay" msgstr "Escolla un ficheiro de rexistro para reproducir" #: src/MessageWindow.cc:78 msgid " Clear all messages " msgstr " Limpar tdalas mensaxes " #: src/MessageWindow.cc:80 msgid " Show only marked robot " msgstr " Amosar s o robot seleccionado " #: src/MessageWindow.cc:82 msgid " Show all " msgstr " Amosar todos " #: src/MessageWindow.cc:108 src/StatisticsWindow.cc:93 msgid " Robot " msgstr " Robot " #: src/MessageWindow.cc:108 msgid " Message " msgstr " Mensaxe " #: src/MessageWindow.cc:172 msgid "Messages" msgstr "Mensaxes" #: src/MessageWindow.cc:176 msgid " All " msgstr " Todos " #: src/Options.cc:77 msgid "Gravitational Constant" msgstr "Constante de Gravitacin" #: src/Options.cc:81 msgid "Air resistance" msgstr "Resistencia do ar" #: src/Options.cc:85 msgid "Roll friction" msgstr "Friccin rodar" #: src/Options.cc:90 msgid "Slide/brake friction" msgstr "Friccin de derrapaxe/freo" #: src/Options.cc:95 msgid "Send robot coordinates" msgstr "" #: src/Options.cc:100 msgid "Robot max acceleration" msgstr "Mxima aceleracin do robot" #: src/Options.cc:105 msgid "Robot min acceleration" msgstr "Mnima aceleracin do robot" #: src/Options.cc:109 msgid "Robot radius" msgstr "Radio do robot" #: src/Options.cc:113 msgid "Robot mass" msgstr "Masa do robot" #: src/Options.cc:118 msgid "Robot bounce coefficient" msgstr "Coeficiente de rebote do robot" #: src/Options.cc:123 msgid "Robot hardness coefficient" msgstr "Coeficiente de dureza do robot" #: src/Options.cc:128 msgid "Robot protection coefficient" msgstr "Coeficiente de proteccin do robot" #: src/Options.cc:133 msgid "Robot frontsize [radians]" msgstr "Tamao da fronte do robot [radins]" #: src/Options.cc:138 msgid "Robot front bounce coefficient" msgstr "Coeficiente de rebote da fronte do robot" #: src/Options.cc:143 msgid "Robot front hardness coefficient" msgstr "Coeficiente de dureza da fronte do robot" #: src/Options.cc:148 msgid "Robot front protection coefficient" msgstr "Coeficiente de proteccin da fronte do robot" #: src/Options.cc:153 msgid "Robot start energy" msgstr "Enerxa de inicio do robot" #: src/Options.cc:158 msgid "Robot max energy" msgstr "Mxima enerxa do robot" #: src/Options.cc:164 msgid "Robot max rotate speed [rad/s]" msgstr "Mxima velocidade de rotacin do robot [rad/s]" #: src/Options.cc:170 msgid "Robot cannon max rotate speed [rad/s]" msgstr "Mxima velocidade de rotacin do can do robot [rad/s]" #: src/Options.cc:176 msgid "Robot radar max rotate speed [rad/s]" msgstr "Mxima velocidade de rotacin do radar do robot [rad/s]" #: src/Options.cc:181 msgid "Process check interval" msgstr "Intervalo de verificacin dos procesos" #: src/Options.cc:185 msgid "Robot energy levels" msgstr "Niveis de enerxa dos robots" #: src/Options.cc:189 msgid "Shot radius" msgstr "Radio do tiro" #: src/Options.cc:193 msgid "Shot speed" msgstr "Velocidade do tiro" #: src/Options.cc:198 msgid "Shooting penalty (times shot energy)" msgstr "Penalizacin por disparar (veces a enerxa do tiro)" #: src/Options.cc:202 msgid "Shot min energy" msgstr "Mnima enerxa do tiro" #: src/Options.cc:206 msgid "Shot max energy" msgstr "Mxima enerxa do tiro" #: src/Options.cc:211 msgid "Shot energy increase speed [energy/s]" msgstr "Velocidade de incremento da enerxa do tiro [enerxa/s]" #: src/Options.cc:215 msgid "Background colour" msgstr "Cor do fondo" #: src/Options.cc:219 msgid "Foreground colour" msgstr "Cor do primeiro plano" #: src/Options.cc:224 msgid "Colour for RTB messages" msgstr "Cor para as mensaxes do RTB" #: src/Options.cc:228 msgid "Cookie max energy" msgstr "Mxima enerxa das galletas" #: src/Options.cc:232 msgid "Cookie min energy" msgstr "Mnima enerxa das galletas" #: src/Options.cc:237 msgid "Cookie frequency [cookies per second]" msgstr "Frecuencia das galletas [galletas por segundo]" #: src/Options.cc:241 msgid "Cookie radius" msgstr "Radio das galletas" #: src/Options.cc:245 msgid "Cookie colour" msgstr "Cor das galletas" #: src/Options.cc:249 msgid "Mine max energy" msgstr "Mxima enerxa das minas" #: src/Options.cc:253 msgid "Mine min energy" msgstr "Mnima enerxa das minas" #: src/Options.cc:258 msgid "Mine frequency [mines per second]" msgstr "Frecuencia das minas [minas por segundo]" #: src/Options.cc:262 msgid "Mine radius" msgstr "Radio das minas" #: src/Options.cc:266 msgid "Mine colour" msgstr "Cor das minas" #: src/Options.cc:270 msgid "Arena scale" msgstr "Escala da area" #: src/Options.cc:275 msgid "Fast forward factor" msgstr "Factor de avance rpido" #: src/Options.cc:279 msgid "Timeout [s]" msgstr "Tempo mximo [s]" #: src/Options.cc:283 msgid "Max timestep" msgstr "Mximo intervalo entre actualizacins" #: src/Options.cc:287 msgid "Timescale" msgstr "Escala de tempo" #: src/Options.cc:292 msgid "Update interval [s]" msgstr "Intervalo de actualizacin [s]" #: src/Options.cc:297 msgid "Robot startup time [s]" msgstr "Tempo de inicializacin dos robots [s]" #: src/Options.cc:301 msgid "Start CPU time [s]" msgstr "Tempo de CPU inicial [s]" #: src/Options.cc:305 msgid "Extra CPU time [s]" msgstr "Tempo de CPU extra [s]" #: src/Options.cc:310 msgid "Extra CPU period [s]" msgstr "Perodo de CPU extra [s]" #: src/Options.cc:315 msgid "CPU time warning percentage" msgstr "Percentaxe de tempo de CPU para aviso" #: src/Options.cc:320 msgid "Logging frequency [Each n:th update interval]" msgstr "Frecuencia de rexistro [Cada n intervalos de actualizacin]" #: src/Options.cc:325 msgid "Max robots allowed simultaneously" msgstr "Mximo n de robots permitidos mesmo tempo" #: src/Options.cc:329 msgid "Robot search path" msgstr "Camio de bsqueda dos robots" #: src/Options.cc:333 msgid "Arena search path" msgstr "Camio de bsqueda das areas" #: src/Options.cc:344 msgid "Directory for temporary files" msgstr "Directorio para os ficheiros temporais" #: src/Options.cc:349 msgid "Initial Arena window width" msgstr "Largura inicial da fiestra da area" #: src/Options.cc:354 msgid "Initial Arena window height" msgstr "Altura inicial da fiestra da area" #: src/Options.cc:359 msgid "Initial Arena window x position" msgstr "Posicin x inicial da fiestra da area" #: src/Options.cc:364 msgid "Initial Arena window y position" msgstr "Posicin y inicial da fiestra da area" #: src/Options.cc:369 msgid "Initial Control window x position" msgstr "Posicin x inicial da fiestra de control" #: src/Options.cc:374 msgid "Initial Control window y position" msgstr "Posicin y inicial da fiestra de control" #: src/Options.cc:379 msgid "Initial Message window width" msgstr "Largura inicial da fiestra de mensaxes" #: src/Options.cc:384 msgid "Initial Message window height" msgstr "Altura inicial da fiestra de mensaxes" #: src/Options.cc:389 msgid "Initial Message window x position" msgstr "Posicin x inicial da fiestra de mensaxes" #: src/Options.cc:394 msgid "Initial Message window y position" msgstr "Posicin y inicial da fiestra de mensaxes" #: src/Options.cc:399 msgid "Initial Score window width" msgstr "Largura inicial da fiestra de puntuacins" #: src/Options.cc:404 msgid "Initial Score window height" msgstr "Altura inicial da fiestra de puntuacins" #: src/Options.cc:409 msgid "Initial Score window x position" msgstr "Posicin x inicial da fiestra de puntuacins" #: src/Options.cc:414 msgid "Initial Score window y position" msgstr "Posicin y inicial da fiestra de puntuacins" #: src/Options.cc:419 msgid "Initial Statistics window width" msgstr "Largura inicial da fiestra de estatsticas" #: src/Options.cc:424 msgid "Initial Statistics window height" msgstr "Altura inicial da fiestra de estatsticas" #: src/ScoreWindow.cc:72 src/StatisticsWindow.cc:225 #: src/StatisticsWindow.cc:372 msgid "Name" msgstr "Nome" #: src/ScoreWindow.cc:72 msgid "Energy" msgstr "Enerxa" #: src/ScoreWindow.cc:72 msgid "Place" msgstr "Posicin" #: src/ScoreWindow.cc:73 msgid "Last" msgstr "ltimo" #: src/ScoreWindow.cc:73 src/ScoreWindow.cc:147 msgid "Score" msgstr "Puntuacin" #: src/ScoreWindow.cc:148 msgid " Seq: " msgstr " Sec: " #: src/ScoreWindow.cc:151 src/StatisticsWindow.cc:90 #: src/StatisticsWindow.cc:389 src/StatisticsWindow.cc:508 msgid "Game" msgstr "Xogo" #: src/ScoreWindow.cc:154 src/OptionsWindow.cc:79 msgid "Time" msgstr "Tempo" #: src/StartTournamentWindow.cc:78 msgid "Start New Tournament" msgstr "Comezar un novo Torneo" #: src/StartTournamentWindow.cc:124 msgid "Robots in Tournament" msgstr "Robots no Torneo" #: src/StartTournamentWindow.cc:125 msgid "Robots in Directory" msgstr "Robots no Directorio" #: src/StartTournamentWindow.cc:134 msgid "Arenas in Tournament" msgstr "Areas no Torneo" #: src/StartTournamentWindow.cc:135 msgid "Arenas in Directory" msgstr "Areas no Directorio" #: src/StartTournamentWindow.cc:153 msgid " Remove " msgstr " Quitar " #: src/StartTournamentWindow.cc:153 src/StartTournamentWindow.cc:155 msgid " Select All " msgstr " Seleccionar todos " #: src/StartTournamentWindow.cc:154 src/StartTournamentWindow.cc:155 msgid " Unselect All " msgstr " De-seleccionar todos " #: src/StartTournamentWindow.cc:154 msgid " Add " msgstr " Engadir " #: src/StartTournamentWindow.cc:251 msgid "Games per sequence" msgstr "Xogos por secuencia" #: src/StartTournamentWindow.cc:251 msgid "Robots per sequence" msgstr "Robots por secuencia" #: src/StartTournamentWindow.cc:252 msgid "Number of sequences" msgstr "Nmero de secuencias" #: src/StartTournamentWindow.cc:309 src/OptionsWindow.cc:137 #: src/OptionsWindow.cc:182 msgid " Min " msgstr " Mn " #: src/StartTournamentWindow.cc:321 msgid " All Arenas " msgstr " Tdalas Areas" #: src/StartTournamentWindow.cc:333 msgid " Full Round " msgstr " Ronda Completa " #: src/StartTournamentWindow.cc:343 src/OptionsWindow.cc:141 #: src/OptionsWindow.cc:186 msgid " Max " msgstr " Mx " #: src/StartTournamentWindow.cc:371 msgid " Load tournament " msgstr " Cargar torneo " #: src/StartTournamentWindow.cc:371 msgid " Save tournament " msgstr " Gardar torneo " #: src/StartTournamentWindow.cc:393 msgid " Start " msgstr " Comezar " #: src/StartTournamentWindow.cc:393 src/OptionsWindow.cc:268 msgid " Cancel " msgstr " Cancelar " #: src/StartTournamentWindow.cc:500 msgid "Choose a tournament file to load" msgstr "Escolla un ficheiro co torneo a cargar" #: src/StartTournamentWindow.cc:534 msgid "Choose file to save tournament into" msgstr "Escolla un ficheiro onde garda-lo torneo" #: src/StartTournamentWindow.cc:578 msgid "Error in specified tournament file." msgstr "Erro no ficheiro de torneo indicado." #: src/StartTournamentWindow.cc:580 src/StartTournamentWindow.cc:740 #: src/StartTournamentWindow.cc:891 src/OptionsWindow.cc:266 msgid " Ok " msgstr " Ok " #: src/StartTournamentWindow.cc:581 msgid "Tournament could not be loaded." msgstr "Non se puido carga-lo torneo." #: src/StartTournamentWindow.cc:730 msgid "There are too few robots in the tournament." msgstr "Hai moi poucos robots no torneo." #: src/StartTournamentWindow.cc:732 src/StartTournamentWindow.cc:886 msgid "There are no arenas in the tournament." msgstr "Non hai areas neste torneo." #: src/StartTournamentWindow.cc:735 msgid "Could not open file." msgstr "Non se puido abri-lo ficheiro." #: src/StartTournamentWindow.cc:741 msgid "Tournament could not be saved." msgstr "Non se puido garda-lo torneo." #: src/StartTournamentWindow.cc:884 msgid "There must be at least two robots in the tournament." msgstr "Ten que haber polo menos dous robots no torneo." #: src/StartTournamentWindow.cc:892 msgid "Tournament could not be started." msgstr "Non se puido inicia-lo torneo." #: src/StatisticsWindow.cc:49 msgid "Statistics" msgstr "Estatsticas" #: src/StatisticsWindow.cc:82 msgid " Close " msgstr " Pechar " #: src/StatisticsWindow.cc:84 msgid " Save Statistics " msgstr " Gardar Estatsticas " #: src/StatisticsWindow.cc:86 msgid " Total " msgstr " Total " #: src/StatisticsWindow.cc:88 msgid " Sequence Total " msgstr " Total da Secuencia " #: src/StatisticsWindow.cc:225 msgid "Position" msgstr "Posicin" #: src/StatisticsWindow.cc:225 msgid "Points" msgstr "Puntos" #: src/StatisticsWindow.cc:226 msgid "Games" msgstr "Xogos" #: src/StatisticsWindow.cc:226 msgid "Survival Time" msgstr "Tempo de sobrevivencia" #: src/StatisticsWindow.cc:226 msgid "Total Points" msgstr "Puntos Totais" #: src/StatisticsWindow.cc:310 msgid "Choose a statistics file to save" msgstr "Escolla un ficheiro de estatsticas para gravar" #: src/StatisticsWindow.cc:388 msgid "Seq" msgstr "Sec" #: src/StatisticsWindow.cc:485 msgid " Grand Total " msgstr " Total Absoluto " #: src/StatisticsWindow.cc:491 msgid " Sequence " msgstr " Secuencia " #: src/StatisticsWindow.cc:507 msgid " Sequence: " msgstr " Secuencia: " #: src/Various.cc:96 msgid "Error in" msgstr "Erro en" #: src/OptionsWindow.cc:52 msgid "Options" msgstr "Opcins" #: src/OptionsWindow.cc:78 msgid "Environment" msgstr "Entorno" #: src/OptionsWindow.cc:78 msgid "Robot" msgstr "Robot" #: src/OptionsWindow.cc:78 msgid "Shot" msgstr "Tiro" #: src/OptionsWindow.cc:79 msgid "Extras" msgstr "Extras" #: src/OptionsWindow.cc:79 msgid "Window sizes" msgstr "Tamaos das fiestras" #: src/OptionsWindow.cc:80 msgid "Misc" msgstr "Varios" #: src/OptionsWindow.cc:139 src/OptionsWindow.cc:184 src/OptionsWindow.cc:211 msgid " Def " msgstr " Def " #: src/OptionsWindow.cc:236 msgid " Grab sizes and positions from present windows " msgstr " Recolle-los tamaos e posicins das fiestras actuais " #: src/OptionsWindow.cc:256 msgid " Default " msgstr " Defecto " #: src/OptionsWindow.cc:258 msgid " Load options " msgstr " Cargar opcins " #: src/OptionsWindow.cc:260 msgid " Save options " msgstr " Gardar opcins " #: src/OptionsWindow.cc:262 msgid " Save as default " msgstr " Gardar como defecto " #: src/OptionsWindow.cc:264 msgid " Apply " msgstr " Aplicar " #: src/OptionsWindow.cc:457 msgid "Choose an options file to load" msgstr "Escolla un ficheiro de opcins para cargar" #: src/OptionsWindow.cc:481 msgid "Choose an options file to save" msgstr "Escolla un ficheiro de opcins para gardar" #, fuzzy #~ msgid "Ok" #~ msgstr " Ok " #~ msgid "Brakes locked: Robot found and at distance" #~ msgstr "Freos bloqueados: Robot avistado e alcance" #~ msgid "Acceleration" #~ msgstr "Aceleracin" #~ msgid "Brake" #~ msgstr "Frear" #~ msgid "Modular angle, Angle" #~ msgstr "Mdulo do ngulo, ngulo" #~ msgid "New rotation" #~ msgstr "Nova rotacin" #~ msgid "New acceleration" #~ msgstr "Nova aceleracin" #~ msgid "Hit too many times! Flee!" #~ msgstr "Alcanzado demasiadas veces! Fuxir!" #~ msgid "Cookie eaten!" #~ msgstr "Comida unha galleta!" #~ msgid "Oh no! A mine" #~ msgstr "Oh, non, unha mina!" #~ msgid "Unknown message: " #~ msgstr "Mensaxe descoecida: " #~ msgid "Process time low: " #~ msgstr "Tempo de proceso baixo: " #~ msgid "Message sent in illegal state: " #~ msgstr "Mensaxe enviada nun estado ilegal: " #~ msgid "Unknown option: " #~ msgstr "Opcin descoecida: " #~ msgid "Obsolete Keyword: " #~ msgstr "Palabra chave obsoleta: " #~ msgid "Shutting down and leaving" #~ msgstr "Desconectando e sando" #~ msgid "New" #~ msgstr "Novo" #~ msgid "Unknown Object seen!" #~ msgstr "Avistado obxecto descoecido!" #~ msgid "Collided with Unknown Object!" #~ msgstr "Colisin cun obxecto descoecido!" realtimebattle-1.0.8/po/ja.po0000644000175000017500000005402010321753015014216 0ustar moimoi# Internationalization of RealTimeBattle - japanese # Copyright (C) 2000 Minatsu Tukisima # Copyright (C) 1999 Jan Suhr # msgid "" msgstr "" "Project-Id-Version: RealTimeBattle 0.9.11\n" "Report-Msgid-Bugs-To: jonico@users.sourceforge.net\n" "POT-Creation-Date: 2005-10-08 16:22+0200\n" "PO-Revision-Date: 2004-11-12 20:10 +0100\n" "Last-Translator: Minatsu Tukisima \n" "Language-Team: Minatsu Tukisima\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=euc-jp\n" "Content-Transfer-Encoding: 8bit\n" #: src/RealTimeBattle.cc:102 msgid " Usage: RealTimeBattle [options] " msgstr " Ȥ: RealTimeBattle [ץ] " #: src/RealTimeBattle.cc:103 msgid " Options:" msgstr " ץ:" #: src/RealTimeBattle.cc:104 msgid " --debug_mode, -d debug mode" msgstr " --debug_mode, -d ǥХå⡼" #: src/RealTimeBattle.cc:105 msgid "" " --debug_level [0-5], -D sets the initial debug level. Implies -" "d" msgstr "" " --debug_level [0-5], -D ǥХå٥λꡣ-d ꤷ" "\n" " Ȥˤʤޤ" #: src/RealTimeBattle.cc:106 msgid " --normal_mode, -n normal mode (default)" msgstr " --normal_mode, -n Ρޥ⡼ (ǥե)" #: src/RealTimeBattle.cc:107 msgid " --competition_mode, -c competition mode" msgstr " --competition_mode, -c ڥƥ⡼" #: src/RealTimeBattle.cc:109 msgid " --no_graphics, -g no graphics will be displayed" msgstr " --no_graphics, -g եåɽ" #: src/RealTimeBattle.cc:110 msgid "" " --option_file [file], -o selects option-file (default: $HOME/." "rtbrc)" msgstr "" " --option_file [file], -o ץեλ(ǥե: \n" " $HOME/.rtbrc)" #: src/RealTimeBattle.cc:112 msgid "" " --log_file [file], -l make log file, if 'file' is '-'\n" " the log is sent to STDOUT" msgstr "" " --log_file [file], -l եκ, 'file' '-'\n" " ꤵ줿硢ɸϤ˽Ϥޤ" #: src/RealTimeBattle.cc:115 msgid "" " --tournament_file [file], -t specify a tournament file to\n" " autostart a tournament" msgstr "" " --tournament_file [file], -t ưȤȡʥȥե" "\n" " ꤷޤ" #: src/RealTimeBattle.cc:118 msgid "" " --statistics_file [file], -s file to print the statistics to\n" " when autostarting" msgstr "" " --statistics_file [file], -s ưȻ׾Ϥ\n" " եꤷޤ" #: src/RealTimeBattle.cc:121 msgid "" " --message_file [file], -m redirect messages to 'file'.\n" " With '-' as 'file', STDOUT is used.\n" " If both log and messages are sent\n" " to STDOUT, '-m' will be ignored" msgstr "" " --message_file [file], -m å'file'˽Ϥޤ\n" " 'file' '-' ꤵ줿硢\n" " ɸϤȤޤ\n" " ȥåξɸϤ\n" " Ϥ硢-m ̵뤵ޤ" #: src/RealTimeBattle.cc:126 msgid "" " --replay [file] -r a log file to replay.\n" " if '-' is specified as file,\n" " input is taken from STDIN" msgstr "" " --replay [file] -r ץ쥤ΤΥեλꡣ\n" " 'file' '-' ꤵ줿\n" " ɸϤϤޤ" #: src/RealTimeBattle.cc:130 msgid " --help, -h prints this message" msgstr " --help, -h Υåɽޤ" #: src/RealTimeBattle.cc:131 msgid " --version, -v prints the version number" msgstr " --version, -v Сɽޤ" #: src/RealTimeBattle.cc:133 #, fuzzy msgid "" " --port_number -p specifies the port to listen on " "(default 32134)" msgstr " --normal_mode, -n Ρޥ⡼ (ǥե)" #: src/ArenaBase.cc:123 msgid "*Starting robots*" msgstr "*ܥåȥ*" #: src/ArenaBase.cc:126 msgid "*Shutting down robots*" msgstr "*ܥåȥåȥ*" #: src/ArenaBase.cc:130 msgid "*Running*" msgstr "*¹*" #: src/ArenaBase.cc:132 msgid "*Pausing after game*" msgstr "*ݡ*" #: src/ArenaBase.cc:136 msgid "*Paused*" msgstr "*ݡ*" #: src/ArenaBase.cc:139 msgid "*Exiting*" msgstr "*λ*" #: src/ArenaBase.cc:142 msgid "*Finished*" msgstr "*λ*" #: src/ArenaRealTime.cc:849 #, c-format msgid "Game %d of sequence %d begins on arena" msgstr "%d %d ꡼ʤ" #: src/ArenaRealTime.cc:1037 #, c-format msgid "Robot with filename %s has not given any name" msgstr "ե̾ %s ΥܥåȤ̾ΤƤޤ" #: src/ArenaReplay.cc:131 #, c-format msgid "Game %d of sequence %d" msgstr "%d %d " #: src/ArenaWindow.cc:77 msgid " No Zoom " msgstr " ̵ " #: src/ArenaWindow.cc:79 msgid " Zoom In " msgstr " । " #: src/ArenaWindow.cc:81 msgid " Zoom Out " msgstr " ॢ " #: src/ArenaWindow.cc:149 msgid "Arena" msgstr "꡼" #: src/ControlWindow.cc:81 msgid " New Tournament " msgstr " ȡʥ " #: src/ControlWindow.cc:83 msgid " Replay Tournament " msgstr " ȡʥȥץ쥤 " #: src/ControlWindow.cc:85 msgid " Pause " msgstr " ݡ " #: src/ControlWindow.cc:87 msgid " End " msgstr " ȡʥȽλ " #: src/ControlWindow.cc:89 msgid " Options " msgstr " ץ " #: src/ControlWindow.cc:91 msgid " Statistics " msgstr " ׾ " #: src/ControlWindow.cc:93 msgid " Quit " msgstr " λ " #: src/ControlWindow.cc:119 msgid "Show arena window" msgstr "꡼ʥɥɽ" #: src/ControlWindow.cc:121 msgid "Show message window" msgstr "åɥɽ" #: src/ControlWindow.cc:123 msgid "Show score window" msgstr "ɥɽ" #: src/ControlWindow.cc:202 msgid " Step " msgstr " ƥå " #: src/ControlWindow.cc:204 msgid " End Game " msgstr " ཪλ " #: src/ControlWindow.cc:206 msgid " Kill Marked Robot " msgstr " ޡܥåȤ " #: src/ControlWindow.cc:234 msgid " Debug Level: " msgstr " ǥХå٥: " #: src/ControlWindow.cc:335 msgid " Step forward " msgstr " ƥå " #: src/ControlWindow.cc:339 msgid " Step backward " msgstr " ƥå " #: src/ControlWindow.cc:343 msgid " Next Game " msgstr " Υ " #: src/ControlWindow.cc:347 msgid " Prev Game " msgstr " Υ " #: src/ControlWindow.cc:351 msgid " Next Seq " msgstr " Υ " #: src/ControlWindow.cc:355 msgid " Prev Seq " msgstr " Υ " #: src/ControlWindow.cc:514 src/ControlWindow.cc:674 src/Gui.cc:154 msgid "" "This action will kill the current tournament.\n" "Do you want to do that?" msgstr "" "ߤΥȡʥȤλޤ.\n" "Ǥ" #: src/ControlWindow.cc:517 src/ControlWindow.cc:677 msgid "Yes" msgstr "Ϥ" #: src/ControlWindow.cc:518 src/ControlWindow.cc:678 msgid "No" msgstr "" #: src/ControlWindow.cc:531 msgid "Choose a log file to replay" msgstr "ץ쥤եDz" #: src/MessageWindow.cc:78 msgid " Clear all messages " msgstr " åꥢ " #: src/MessageWindow.cc:80 msgid " Show only marked robot " msgstr " ޡܥåȤΤ " #: src/MessageWindow.cc:82 msgid " Show all " msgstr " ɽ " #: src/MessageWindow.cc:108 src/StatisticsWindow.cc:93 msgid " Robot " msgstr " ܥå " #: src/MessageWindow.cc:108 msgid " Message " msgstr " å " #: src/MessageWindow.cc:172 msgid "Messages" msgstr "å" #: src/MessageWindow.cc:176 msgid " All " msgstr " " #: src/Options.cc:77 msgid "Gravitational Constant" msgstr "" #: src/Options.cc:81 msgid "Air resistance" msgstr "" #: src/Options.cc:85 msgid "Roll friction" msgstr "ž໤" #: src/Options.cc:90 msgid "Slide/brake friction" msgstr "٤/֥졼໤" #: src/Options.cc:95 msgid "Send robot coordinates" msgstr "" #: src/Options.cc:100 msgid "Robot max acceleration" msgstr "ܥåȲ®" #: src/Options.cc:105 msgid "Robot min acceleration" msgstr "ǾܥåȲ®" #: src/Options.cc:109 msgid "Robot radius" msgstr "ܥåȤȾ" #: src/Options.cc:113 msgid "Robot mass" msgstr "ܥåȤμ" #: src/Options.cc:118 msgid "Robot bounce coefficient" msgstr "ܥåȤȿͷ" #: src/Options.cc:123 msgid "Robot hardness coefficient" msgstr "ܥåȤιٷ" #: src/Options.cc:128 msgid "Robot protection coefficient" msgstr "ܥåȤɸ" #: src/Options.cc:133 msgid "Robot frontsize [radians]" msgstr "ܥåȤ [rad]" #: src/Options.cc:138 msgid "Robot front bounce coefficient" msgstr "ܥåȤȿͷ" #: src/Options.cc:143 msgid "Robot front hardness coefficient" msgstr "ܥåȤٷ" #: src/Options.cc:148 msgid "Robot front protection coefficient" msgstr "ܥåȤɸ" #: src/Options.cc:153 msgid "Robot start energy" msgstr "ܥåȥͥ륮" #: src/Options.cc:158 msgid "Robot max energy" msgstr "ܥåȥͥ륮" #: src/Options.cc:164 msgid "Robot max rotate speed [rad/s]" msgstr "ܥåȲž® [rad/s]" #: src/Options.cc:170 msgid "Robot cannon max rotate speed [rad/s]" msgstr "祭Υž® [rad/s]" #: src/Options.cc:176 msgid "Robot radar max rotate speed [rad/s]" msgstr "졼ž® [rad/s]" #: src/Options.cc:181 msgid "Process check interval" msgstr "ץåֳ" #: src/Options.cc:185 msgid "Robot energy levels" msgstr "ܥåȥͥ륮٥" #: src/Options.cc:189 msgid "Shot radius" msgstr "åȾ" #: src/Options.cc:193 msgid "Shot speed" msgstr "åȥԡ" #: src/Options.cc:198 msgid "Shooting penalty (times shot energy)" msgstr "åȥڥʥƥ(ߥåȥͥ륮)" #: src/Options.cc:202 msgid "Shot min energy" msgstr "Ǿåȥͥ륮" #: src/Options.cc:206 msgid "Shot max energy" msgstr "祷åȥͥ륮" #: src/Options.cc:211 msgid "Shot energy increase speed [energy/s]" msgstr "åȥͥ륮® [ͥ륮/]" #: src/Options.cc:215 msgid "Background colour" msgstr "Хå饦ɥ顼" #: src/Options.cc:219 msgid "Foreground colour" msgstr "ե饦ɥ顼" #: src/Options.cc:224 msgid "Colour for RTB messages" msgstr "RTBåο" #: src/Options.cc:228 msgid "Cookie max energy" msgstr "祯åͥ륮" #: src/Options.cc:232 msgid "Cookie min energy" msgstr "Ǿåͥ륮" #: src/Options.cc:237 msgid "Cookie frequency [cookies per second]" msgstr "åи [/]" #: src/Options.cc:241 msgid "Cookie radius" msgstr "åȾ" #: src/Options.cc:245 msgid "Cookie colour" msgstr "åο" #: src/Options.cc:249 msgid "Mine max energy" msgstr "륨ͥ륮" #: src/Options.cc:253 msgid "Mine min energy" msgstr "Ǿ륨ͥ륮" #: src/Options.cc:258 msgid "Mine frequency [mines per second]" msgstr "и [/]" #: src/Options.cc:262 msgid "Mine radius" msgstr "Ⱦ" #: src/Options.cc:266 msgid "Mine colour" msgstr "ο" #: src/Options.cc:270 msgid "Arena scale" msgstr "꡼ʥ" #: src/Options.cc:275 msgid "Fast forward factor" msgstr "®" #: src/Options.cc:279 msgid "Timeout [s]" msgstr "ॢ [s]" #: src/Options.cc:283 msgid "Max timestep" msgstr "祿ॹƥå" #: src/Options.cc:287 msgid "Timescale" msgstr "ॹ" #: src/Options.cc:292 msgid "Update interval [s]" msgstr "ֳ [s]" #: src/Options.cc:297 msgid "Robot startup time [s]" msgstr "ܥåȥȥåץ [s]" #: src/Options.cc:301 msgid "Start CPU time [s]" msgstr "CPU [s]" #: src/Options.cc:305 msgid "Extra CPU time [s]" msgstr "ȥCPU [s]" #: src/Options.cc:310 msgid "Extra CPU period [s]" msgstr "ȥCPU [s]" #: src/Options.cc:315 msgid "CPU time warning percentage" msgstr "CPU˥󥰥ѡơ" #: src/Options.cc:320 msgid "Logging frequency [Each n:th update interval]" msgstr " [ֳn]" #: src/Options.cc:325 msgid "Max robots allowed simultaneously" msgstr "ƱƯܥåȿ" #: src/Options.cc:329 msgid "Robot search path" msgstr "ܥåȸѥ" #: src/Options.cc:333 msgid "Arena search path" msgstr "꡼ʸѥ" #: src/Options.cc:344 msgid "Directory for temporary files" msgstr "ƥݥǥ쥯ȥ" #: src/Options.cc:349 msgid "Initial Arena window width" msgstr "꡼ʥɥ" #: src/Options.cc:354 msgid "Initial Arena window height" msgstr "꡼ʥɥ⤵" #: src/Options.cc:359 msgid "Initial Arena window x position" msgstr "꡼ʥɥxɸ" #: src/Options.cc:364 msgid "Initial Arena window y position" msgstr "꡼ʥɥyɸ" #: src/Options.cc:369 msgid "Initial Control window x position" msgstr "ȥ륦ɥxɸ" #: src/Options.cc:374 msgid "Initial Control window y position" msgstr "ȥ륦ɥyɸ" #: src/Options.cc:379 msgid "Initial Message window width" msgstr "åɥ" #: src/Options.cc:384 msgid "Initial Message window height" msgstr "åɥ⤵" #: src/Options.cc:389 msgid "Initial Message window x position" msgstr "åɥxɸ" #: src/Options.cc:394 msgid "Initial Message window y position" msgstr "åɥyɸ" #: src/Options.cc:399 msgid "Initial Score window width" msgstr "ɥ" #: src/Options.cc:404 msgid "Initial Score window height" msgstr "ɥ⤵" #: src/Options.cc:409 msgid "Initial Score window x position" msgstr "ɥxɸ" #: src/Options.cc:414 msgid "Initial Score window y position" msgstr "ɥyɸ" #: src/Options.cc:419 msgid "Initial Statistics window width" msgstr "׾󥦥ɥ" #: src/Options.cc:424 msgid "Initial Statistics window height" msgstr "׾󥦥ɥ⤵" #: src/ScoreWindow.cc:72 src/StatisticsWindow.cc:225 #: src/StatisticsWindow.cc:372 msgid "Name" msgstr "̾" #: src/ScoreWindow.cc:72 msgid "Energy" msgstr "ͥ륮" #: src/ScoreWindow.cc:72 msgid "Place" msgstr "" #: src/ScoreWindow.cc:73 msgid "Last" msgstr "" #: src/ScoreWindow.cc:73 src/ScoreWindow.cc:147 msgid "Score" msgstr "" #: src/ScoreWindow.cc:148 msgid " Seq: " msgstr " : " #: src/ScoreWindow.cc:151 src/StatisticsWindow.cc:90 #: src/StatisticsWindow.cc:389 src/StatisticsWindow.cc:508 msgid "Game" msgstr "" #: src/ScoreWindow.cc:154 src/OptionsWindow.cc:79 msgid "Time" msgstr "" #: src/StartTournamentWindow.cc:78 msgid "Start New Tournament" msgstr "ȡʥȤγ" #: src/StartTournamentWindow.cc:124 msgid "Robots in Tournament" msgstr "ȡʥȤ˻äܥå" #: src/StartTournamentWindow.cc:125 msgid "Robots in Directory" msgstr "ǥ쥯ȥˤܥå" #: src/StartTournamentWindow.cc:134 msgid "Arenas in Tournament" msgstr "ȡʥȤ˻Ѥ륢꡼" #: src/StartTournamentWindow.cc:135 msgid "Arenas in Directory" msgstr "ǥ쥯ȥˤ륢꡼" #: src/StartTournamentWindow.cc:153 msgid " Remove " msgstr " " #: src/StartTournamentWindow.cc:153 src/StartTournamentWindow.cc:155 msgid " Select All " msgstr " " #: src/StartTournamentWindow.cc:154 src/StartTournamentWindow.cc:155 msgid " Unselect All " msgstr " " #: src/StartTournamentWindow.cc:154 msgid " Add " msgstr " ɲ " #: src/StartTournamentWindow.cc:251 msgid "Games per sequence" msgstr "󥹤Υ" #: src/StartTournamentWindow.cc:251 msgid "Robots per sequence" msgstr "󥹤Υܥåȿ" #: src/StartTournamentWindow.cc:252 msgid "Number of sequences" msgstr "󥹿" #: src/StartTournamentWindow.cc:309 src/OptionsWindow.cc:137 #: src/OptionsWindow.cc:182 msgid " Min " msgstr " Ǿ " #: src/StartTournamentWindow.cc:321 msgid " All Arenas " msgstr " ƤΥ꡼ " #: src/StartTournamentWindow.cc:333 msgid " Full Round " msgstr " 饦 " #: src/StartTournamentWindow.cc:343 src/OptionsWindow.cc:141 #: src/OptionsWindow.cc:186 msgid " Max " msgstr " " #: src/StartTournamentWindow.cc:371 msgid " Load tournament " msgstr " ȡʥȤɹ " #: src/StartTournamentWindow.cc:371 msgid " Save tournament " msgstr " ȡʥȤ¸ " #: src/StartTournamentWindow.cc:393 msgid " Start " msgstr " " #: src/StartTournamentWindow.cc:393 src/OptionsWindow.cc:268 msgid " Cancel " msgstr " 󥻥 " #: src/StartTournamentWindow.cc:500 msgid "Choose a tournament file to load" msgstr "ɤ߹ȡʥȥեDz" #: src/StartTournamentWindow.cc:534 msgid "Choose file to save tournament into" msgstr "¸ȡʥȥեDz" #: src/StartTournamentWindow.cc:578 msgid "Error in specified tournament file." msgstr "ꤷȡʥȥե˥顼ޤ" #: src/StartTournamentWindow.cc:580 src/StartTournamentWindow.cc:740 #: src/StartTournamentWindow.cc:891 src/OptionsWindow.cc:266 msgid " Ok " msgstr " Ok " #: src/StartTournamentWindow.cc:581 msgid "Tournament could not be loaded." msgstr "ȡʥȤɤ߹ߤǤޤǤ" #: src/StartTournamentWindow.cc:730 msgid "There are too few robots in the tournament." msgstr "ȡʥȤ˻äܥåȤʤޤ" #: src/StartTournamentWindow.cc:732 src/StartTournamentWindow.cc:886 msgid "There are no arenas in the tournament." msgstr "ȡʥȤ˻Ѥ륢꡼ʤꤵƤޤ" #: src/StartTournamentWindow.cc:735 msgid "Could not open file." msgstr "ե򥪡ץǤޤ" #: src/StartTournamentWindow.cc:741 msgid "Tournament could not be saved." msgstr "ȡʥȤ¸ǤޤǤ" #: src/StartTournamentWindow.cc:884 msgid "There must be at least two robots in the tournament." msgstr "" "ȡʥȤˤϾʤȤ⣲ĤΥܥåȤäƤʤФʤޤ" #: src/StartTournamentWindow.cc:892 msgid "Tournament could not be started." msgstr "ȡʥȤϤǤޤǤ" #: src/StatisticsWindow.cc:49 msgid "Statistics" msgstr "׾" #: src/StatisticsWindow.cc:82 msgid " Close " msgstr " Ĥ " #: src/StatisticsWindow.cc:84 msgid " Save Statistics " msgstr " ׾¸ " #: src/StatisticsWindow.cc:86 msgid " Total " msgstr " ȡ " #: src/StatisticsWindow.cc:88 msgid " Sequence Total " msgstr " 󥹥ȡ " #: src/StatisticsWindow.cc:225 msgid "Position" msgstr "" #: src/StatisticsWindow.cc:225 msgid "Points" msgstr "" #: src/StatisticsWindow.cc:226 msgid "Games" msgstr "" #: src/StatisticsWindow.cc:226 msgid "Survival Time" msgstr "¸" #: src/StatisticsWindow.cc:226 msgid "Total Points" msgstr "ȡ" #: src/StatisticsWindow.cc:310 msgid "Choose a statistics file to save" msgstr "¸׾եDz" #: src/StatisticsWindow.cc:388 msgid "Seq" msgstr "" #: src/StatisticsWindow.cc:485 msgid " Grand Total " msgstr " ɥȡ " #: src/StatisticsWindow.cc:491 msgid " Sequence " msgstr " " #: src/StatisticsWindow.cc:507 msgid " Sequence: " msgstr " : " #: src/Various.cc:96 msgid "Error in" msgstr "顼ȯ" #: src/OptionsWindow.cc:52 msgid "Options" msgstr "ץ" #: src/OptionsWindow.cc:78 msgid "Environment" msgstr "Ķ" #: src/OptionsWindow.cc:78 msgid "Robot" msgstr "ܥå" #: src/OptionsWindow.cc:78 msgid "Shot" msgstr "å" #: src/OptionsWindow.cc:79 msgid "Extras" msgstr "ȥ" #: src/OptionsWindow.cc:79 msgid "Window sizes" msgstr "ɥ" #: src/OptionsWindow.cc:80 msgid "Misc" msgstr "¾" #: src/OptionsWindow.cc:139 src/OptionsWindow.cc:184 src/OptionsWindow.cc:211 msgid " Def " msgstr " ǥե " #: src/OptionsWindow.cc:236 msgid " Grab sizes and positions from present windows " msgstr " ߤΥɥ饵Ⱥɸ " #: src/OptionsWindow.cc:256 msgid " Default " msgstr " ǥե " #: src/OptionsWindow.cc:258 msgid " Load options " msgstr " ץɹ " #: src/OptionsWindow.cc:260 msgid " Save options " msgstr " ץ¸ " #: src/OptionsWindow.cc:262 msgid " Save as default " msgstr " ǥեȤȤ¸ " #: src/OptionsWindow.cc:264 msgid " Apply " msgstr " Ŭ " #: src/OptionsWindow.cc:457 msgid "Choose an options file to load" msgstr "ɤ߹४ץեDz" #: src/OptionsWindow.cc:481 msgid "Choose an options file to save" msgstr "¸륪ץեDz" #, fuzzy #~ msgid "Ok" #~ msgstr " Ok " #~ msgid "Brakes locked: Robot found and at distance" #~ msgstr "֥졼åܥåȯΥ" #~ msgid "Acceleration" #~ msgstr "®" #~ msgid "Brake" #~ msgstr "֥졼" #~ msgid "Modular angle, Angle" #~ msgstr ", " #~ msgid "New rotation" #~ msgstr "ơ" #~ msgid "New acceleration" #~ msgstr "®" #~ msgid "Hit too many times! Flee!" #~ msgstr "ﳲ硪" #~ msgid "Cookie eaten!" #~ msgstr "ååȡ" #~ msgid "Oh no! A mine" #~ msgstr "" #~ msgid "Unknown message: " #~ msgstr "̤ΤΥå: " #~ msgid "Process time low: " #~ msgstr "ץ֤ʤʤäޤ: " #~ msgid "Message sent in illegal state: " #~ msgstr "åŬڤʾ֤λޤ: " #~ msgid "Unknown option: " #~ msgstr "̤ΤΥץ: " #~ msgid "Obsolete Keyword: " #~ msgstr "Ť: " #~ msgid "Shutting down and leaving" #~ msgstr "λű" #~ msgid "New" #~ msgstr "" #~ msgid "Unknown Object seen!" #~ msgstr "̤Τʪȯ" #~ msgid "Collided with Unknown Object!" #~ msgstr "̤ΤʪΤȾ͡" realtimebattle-1.0.8/po/pl.po0000644000175000017500000005401410321753015014242 0ustar moimoimsgid "" msgstr "" "Project-Id-Version: RealTimeBattle 0.9.10\n" "Report-Msgid-Bugs-To: jonico@users.sourceforge.net\n" "POT-Creation-Date: 2005-10-08 16:22+0200\n" "PO-Revision-Date: 1999-08-24 22:22+0200\n" "Last-Translator: GNOME PL Team\n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-2\n" "Content-Transfer-Encoding: 8bit\n" #: src/RealTimeBattle.cc:102 msgid " Usage: RealTimeBattle [options] " msgstr " Uycie: RealTimeBattle [opcje] " #: src/RealTimeBattle.cc:103 msgid " Options:" msgstr " Opcje:" #: src/RealTimeBattle.cc:104 msgid " --debug_mode, -d debug mode" msgstr " --debug_mode, -d tryb ledzenia" #: src/RealTimeBattle.cc:105 msgid "" " --debug_level [0-5], -D sets the initial debug level. Implies -" "d" msgstr "" " --debug_level [0-5], -D ustawia domylny poziom ledzenia. " "Implikuje -d" #: src/RealTimeBattle.cc:106 msgid " --normal_mode, -n normal mode (default)" msgstr " --normal-mode, -n tryb zwyky (domylnie)" #: src/RealTimeBattle.cc:107 msgid " --competition_mode, -c competition mode" msgstr " --competition_mode, -c tryb wspzawodnictwa" #: src/RealTimeBattle.cc:109 msgid " --no_graphics, -g no graphics will be displayed" msgstr " --no_graphics, -g bez wywietlania grafiki" #: src/RealTimeBattle.cc:110 msgid "" " --option_file [file], -o selects option-file (default: $HOME/." "rtbrc)" msgstr "" " --option_file [plik], -o wybiera plik z opcjami (domylnie: " "$HOME/.rtbrc)" #: src/RealTimeBattle.cc:112 msgid "" " --log_file [file], -l make log file, if 'file' is '-'\n" " the log is sent to STDOUT" msgstr "" " --log_file [plik], -l okrela plik dziennika, nazwa '-'\n" " oznacza standardowe wyjcie" #: src/RealTimeBattle.cc:115 msgid "" " --tournament_file [file], -t specify a tournament file to\n" " autostart a tournament" msgstr "" " --tournament_file [plik], -t okrela plik z turniejem przy\n" " automatycznym rozpoczciu turnieju" #: src/RealTimeBattle.cc:118 msgid "" " --statistics_file [file], -s file to print the statistics to\n" " when autostarting" msgstr "" " --statistics_file [plik], -s plik do zapisu statystyk przy\n" " automatycznym starcie" #: src/RealTimeBattle.cc:121 msgid "" " --message_file [file], -m redirect messages to 'file'.\n" " With '-' as 'file', STDOUT is used.\n" " If both log and messages are sent\n" " to STDOUT, '-m' will be ignored" msgstr "" " --message_file [plik], -m przekierunkowuje komunikaty do pliku.\n" " '-' podane jako nazwa pliku okrela.\n" " standardowe wyjcie.\n" " Jeli obie z opcji -l oraz -m opisuj\n" " standarwode wyjcie, -m zostanie\n" " zignorowane" #: src/RealTimeBattle.cc:126 msgid "" " --replay [file] -r a log file to replay.\n" " if '-' is specified as file,\n" " input is taken from STDIN" msgstr "" " --replay [plik] -r plik dziennika do odtworzenia.\n" " Znak '-' jako nazwa pliku,\n" " okrela standardowe wejcie" #: src/RealTimeBattle.cc:130 msgid " --help, -h prints this message" msgstr " --help, -h wypisuje ten komunikat" #: src/RealTimeBattle.cc:131 msgid " --version, -v prints the version number" msgstr " --version, -v wypisuje numer wersji" #: src/RealTimeBattle.cc:133 #, fuzzy msgid "" " --port_number -p specifies the port to listen on " "(default 32134)" msgstr " --normal-mode, -n tryb zwyky (domylnie)" #: src/ArenaBase.cc:123 msgid "*Starting robots*" msgstr "*Uruchamianie robotw*" #: src/ArenaBase.cc:126 msgid "*Shutting down robots*" msgstr "*Koczenie robotw*" #: src/ArenaBase.cc:130 msgid "*Running*" msgstr "*Wykonywanie*" #: src/ArenaBase.cc:132 msgid "*Pausing after game*" msgstr "*Wstrzymanie po grze*" #: src/ArenaBase.cc:136 msgid "*Paused*" msgstr "*Wstrzymanie*" #: src/ArenaBase.cc:139 msgid "*Exiting*" msgstr "*Koczenie*" #: src/ArenaBase.cc:142 msgid "*Finished*" msgstr "*Zakoczono*" #: src/ArenaRealTime.cc:849 #, c-format msgid "Game %d of sequence %d begins on arena" msgstr "Gra %d w sekwencji %d rozpoczyna si an arenie" #: src/ArenaRealTime.cc:1037 #, c-format msgid "Robot with filename %s has not given any name" msgstr "" #: src/ArenaReplay.cc:131 #, c-format msgid "Game %d of sequence %d" msgstr "Gra %d w sekwencji %d" #: src/ArenaWindow.cc:77 msgid " No Zoom " msgstr " Bez powikszenia " #: src/ArenaWindow.cc:79 msgid " Zoom In " msgstr " Powiksz " #: src/ArenaWindow.cc:81 msgid " Zoom Out " msgstr " Pomniejsz " #: src/ArenaWindow.cc:149 msgid "Arena" msgstr "Arena" #: src/ControlWindow.cc:81 msgid " New Tournament " msgstr " Nowy turniej " #: src/ControlWindow.cc:83 msgid " Replay Tournament " msgstr " Odtwrz turniej " #: src/ControlWindow.cc:85 msgid " Pause " msgstr " Wstrzymaj " #: src/ControlWindow.cc:87 msgid " End " msgstr " Koniec " #: src/ControlWindow.cc:89 msgid " Options " msgstr " Opcje " #: src/ControlWindow.cc:91 msgid " Statistics " msgstr " Statystyki " #: src/ControlWindow.cc:93 msgid " Quit " msgstr " Zakocz " #: src/ControlWindow.cc:119 msgid "Show arena window" msgstr "Wywietlanie okna areny" #: src/ControlWindow.cc:121 msgid "Show message window" msgstr "Wywietlanie okna komunikatw" #: src/ControlWindow.cc:123 msgid "Show score window" msgstr "Wywietlanie okna punktacji" #: src/ControlWindow.cc:202 msgid " Step " msgstr " Krok " #: src/ControlWindow.cc:204 msgid " End Game " msgstr " Zakocz gr " #: src/ControlWindow.cc:206 msgid " Kill Marked Robot " msgstr " Zabij zaznaczonego robota " #: src/ControlWindow.cc:234 msgid " Debug Level: " msgstr " Poziom ledzenia: " #: src/ControlWindow.cc:335 msgid " Step forward " msgstr " Krok naprzd " #: src/ControlWindow.cc:339 msgid " Step backward " msgstr " Krok wstecz " #: src/ControlWindow.cc:343 msgid " Next Game " msgstr " Nastpna gra " #: src/ControlWindow.cc:347 msgid " Prev Game " msgstr " Poprzednia gra " #: src/ControlWindow.cc:351 msgid " Next Seq " msgstr " Nast sekw. " #: src/ControlWindow.cc:355 msgid " Prev Seq " msgstr " Poprz sekw. " #: src/ControlWindow.cc:514 src/ControlWindow.cc:674 src/Gui.cc:154 msgid "" "This action will kill the current tournament.\n" "Do you want to do that?" msgstr "" "Ta akcja przerwie biecy turniej.\n" "Czy tego chcesz?" #: src/ControlWindow.cc:517 src/ControlWindow.cc:677 msgid "Yes" msgstr "Tak" #: src/ControlWindow.cc:518 src/ControlWindow.cc:678 msgid "No" msgstr "Nie" #: src/ControlWindow.cc:531 msgid "Choose a log file to replay" msgstr "Wybierz plik dziennika do odtworzenia" #: src/MessageWindow.cc:78 msgid " Clear all messages " msgstr " Wyczy komunikaty " #: src/MessageWindow.cc:80 msgid " Show only marked robot " msgstr " Tylko zaznaczony robot " #: src/MessageWindow.cc:82 msgid " Show all " msgstr " Wszystkie " #: src/MessageWindow.cc:108 src/StatisticsWindow.cc:93 msgid " Robot " msgstr " Robot " #: src/MessageWindow.cc:108 msgid " Message " msgstr " Komunikat " #: src/MessageWindow.cc:172 msgid "Messages" msgstr "Komunikaty" #: src/MessageWindow.cc:176 msgid " All " msgstr " Wszystkie " #: src/Options.cc:77 msgid "Gravitational Constant" msgstr "Sta grawitacji" #: src/Options.cc:81 msgid "Air resistance" msgstr "Opr powietrza" #: src/Options.cc:85 msgid "Roll friction" msgstr "Tarcie przy obrocie" #: src/Options.cc:90 msgid "Slide/brake friction" msgstr "Tarcie przy polizgu/hamowaniu" #: src/Options.cc:95 msgid "Send robot coordinates" msgstr "" #: src/Options.cc:100 msgid "Robot max acceleration" msgstr "Maks. przypieszenie robota" #: src/Options.cc:105 msgid "Robot min acceleration" msgstr "Min. przypieszenie robota" #: src/Options.cc:109 msgid "Robot radius" msgstr "Promie robota" #: src/Options.cc:113 msgid "Robot mass" msgstr "Masa robota" #: src/Options.cc:118 msgid "Robot bounce coefficient" msgstr "Wspczynnik odbicia robota" #: src/Options.cc:123 msgid "Robot hardness coefficient" msgstr "Wspczynnik twardoci robota" #: src/Options.cc:128 msgid "Robot protection coefficient" msgstr "Wspczynnik ochrony robota" #: src/Options.cc:133 msgid "Robot frontsize [radians]" msgstr "Rozmiar przodu robota [radiany]" #: src/Options.cc:138 msgid "Robot front bounce coefficient" msgstr "Wspczynnik odbicia przodu robota" #: src/Options.cc:143 msgid "Robot front hardness coefficient" msgstr "Wspczynnik twardoci przodu robota" #: src/Options.cc:148 msgid "Robot front protection coefficient" msgstr "Wspczynnik ochrony przodu robota" #: src/Options.cc:153 msgid "Robot start energy" msgstr "Energia pocztkowa robota" #: src/Options.cc:158 msgid "Robot max energy" msgstr "Maksymalna energia robota" #: src/Options.cc:164 msgid "Robot max rotate speed [rad/s]" msgstr "Maks. szybko obrotu robota [rad/s]" #: src/Options.cc:170 msgid "Robot cannon max rotate speed [rad/s]" msgstr "Maks. szybko obrotu dziaka robota [rad/s]" #: src/Options.cc:176 msgid "Robot radar max rotate speed [rad/s]" msgstr "Maks. szybko obrotu radaru robota [rad/s]" #: src/Options.cc:181 msgid "Process check interval" msgstr "Okres sprawdzania procesu" #: src/Options.cc:185 msgid "Robot energy levels" msgstr "Poziomy energii robota" #: src/Options.cc:189 msgid "Shot radius" msgstr "Promie strzau" #: src/Options.cc:193 msgid "Shot speed" msgstr "Szybko strzau" #: src/Options.cc:198 msgid "Shooting penalty (times shot energy)" msgstr "Ubytek energii od strzau (* energia strzau)" #: src/Options.cc:202 msgid "Shot min energy" msgstr "Min. energia strzau" #: src/Options.cc:206 msgid "Shot max energy" msgstr "Maks. energia strzau" #: src/Options.cc:211 msgid "Shot energy increase speed [energy/s]" msgstr "Szybko narastania energii strzau [energ./s]" #: src/Options.cc:215 msgid "Background colour" msgstr "Kolor ta" #: src/Options.cc:219 msgid "Foreground colour" msgstr "Kolor obiektw" #: src/Options.cc:224 msgid "Colour for RTB messages" msgstr "Kolor komunikatr RTB" #: src/Options.cc:228 msgid "Cookie max energy" msgstr "Maks. energia ciasteczka" #: src/Options.cc:232 msgid "Cookie min energy" msgstr "Min. energia ciasteczka" #: src/Options.cc:237 msgid "Cookie frequency [cookies per second]" msgstr "Czstotliwo pojawiania si ciasteczek [1/s]" #: src/Options.cc:241 msgid "Cookie radius" msgstr "Promie ciasteczka" #: src/Options.cc:245 msgid "Cookie colour" msgstr "Kolor ciasteczka" #: src/Options.cc:249 msgid "Mine max energy" msgstr "Maks. energia miny" #: src/Options.cc:253 msgid "Mine min energy" msgstr "Min. energia miny" #: src/Options.cc:258 msgid "Mine frequency [mines per second]" msgstr "Czstotliwo pojawiania si min [1/s]" #: src/Options.cc:262 msgid "Mine radius" msgstr "Promie miny" #: src/Options.cc:266 msgid "Mine colour" msgstr "Kolor miny" #: src/Options.cc:270 msgid "Arena scale" msgstr "Skala areny" #: src/Options.cc:275 msgid "Fast forward factor" msgstr "Wspczynnik szybkego ruchu" #: src/Options.cc:279 msgid "Timeout [s]" msgstr "Czas oczekiwania [s]" #: src/Options.cc:283 msgid "Max timestep" msgstr "Maks odstp czasu" #: src/Options.cc:287 msgid "Timescale" msgstr "Skala czasu" #: src/Options.cc:292 msgid "Update interval [s]" msgstr "Okres odwieania [s]" #: src/Options.cc:297 msgid "Robot startup time [s]" msgstr "Czas uruchamiania robota [s]" #: src/Options.cc:301 msgid "Start CPU time [s]" msgstr "Pocztkowy czas CPU [s]" #: src/Options.cc:305 msgid "Extra CPU time [s]" msgstr "Dodatkowy czas CPU [s]" #: src/Options.cc:310 msgid "Extra CPU period [s]" msgstr "Dodatkowy czas CPU [s]" #: src/Options.cc:315 msgid "CPU time warning percentage" msgstr "Prg czasu CPU przy ostrzeeniu [%]" #: src/Options.cc:320 msgid "Logging frequency [Each n:th update interval]" msgstr "Czstotliwo zapisu dziennika [co ktre odwieenie]" #: src/Options.cc:325 msgid "Max robots allowed simultaneously" msgstr "" #: src/Options.cc:329 msgid "Robot search path" msgstr "cieka poszukiwania robota" #: src/Options.cc:333 msgid "Arena search path" msgstr "cieka poszukiwania areny" #: src/Options.cc:344 msgid "Directory for temporary files" msgstr "Katalog na pliki tymczasowe" #: src/Options.cc:349 msgid "Initial Arena window width" msgstr "Pocztkowa szeroko okna areny" #: src/Options.cc:354 msgid "Initial Arena window height" msgstr "Pocztkowa wysoko okna areny" #: src/Options.cc:359 msgid "Initial Arena window x position" msgstr "Pocztkowa pozycja pozioma okna areny" #: src/Options.cc:364 msgid "Initial Arena window y position" msgstr "Pocztkowa pozycja pionowa okna areny" #: src/Options.cc:369 msgid "Initial Control window x position" msgstr "Pocztkowa pozycja pozioma okna kontrolnego" #: src/Options.cc:374 msgid "Initial Control window y position" msgstr "Pocztkowa pozycja pionowa okna kontrolnego" #: src/Options.cc:379 msgid "Initial Message window width" msgstr "Pocztkowa szeroko okna komunikatw" #: src/Options.cc:384 msgid "Initial Message window height" msgstr "Pocztkowa wysoko okna komunikatw" #: src/Options.cc:389 msgid "Initial Message window x position" msgstr "Pocztkowa pozioma pozycja okna komunikatw" #: src/Options.cc:394 msgid "Initial Message window y position" msgstr "Pocztkowa pionowa pozycja okna komunikatw" #: src/Options.cc:399 msgid "Initial Score window width" msgstr "Pocztkowa szeroko okna punktacji" #: src/Options.cc:404 msgid "Initial Score window height" msgstr "Pocztkowa wysoko okna punktacji" #: src/Options.cc:409 msgid "Initial Score window x position" msgstr "Pocztkowa pozioma pozycja okna punktacji" #: src/Options.cc:414 msgid "Initial Score window y position" msgstr "Pocztkowa pionowa pozycja okna punktacji" #: src/Options.cc:419 msgid "Initial Statistics window width" msgstr "Pocztkowa szeroko okna statystyk" #: src/Options.cc:424 msgid "Initial Statistics window height" msgstr "Pocztkowa wysoko okna statystyk" #: src/ScoreWindow.cc:72 src/StatisticsWindow.cc:225 #: src/StatisticsWindow.cc:372 msgid "Name" msgstr "Nazwa" #: src/ScoreWindow.cc:72 msgid "Energy" msgstr "Energia" #: src/ScoreWindow.cc:72 msgid "Place" msgstr "Miejsce" #: src/ScoreWindow.cc:73 msgid "Last" msgstr "Ostatni" #: src/ScoreWindow.cc:73 src/ScoreWindow.cc:147 msgid "Score" msgstr "Punktacja" #: src/ScoreWindow.cc:148 msgid " Seq: " msgstr " Sekw: " #: src/ScoreWindow.cc:151 src/StatisticsWindow.cc:90 #: src/StatisticsWindow.cc:389 src/StatisticsWindow.cc:508 msgid "Game" msgstr "Gra" #: src/ScoreWindow.cc:154 src/OptionsWindow.cc:79 msgid "Time" msgstr "Czas" #: src/StartTournamentWindow.cc:78 msgid "Start New Tournament" msgstr "Rozpocznij nowy turniej" #: src/StartTournamentWindow.cc:124 msgid "Robots in Tournament" msgstr "Roboty w turnieju" #: src/StartTournamentWindow.cc:125 msgid "Robots in Directory" msgstr "Roboty w katalogu" #: src/StartTournamentWindow.cc:134 msgid "Arenas in Tournament" msgstr "Areny w turnieju" #: src/StartTournamentWindow.cc:135 msgid "Arenas in Directory" msgstr "Areny w katalogu" #: src/StartTournamentWindow.cc:153 msgid " Remove " msgstr " Usu " #: src/StartTournamentWindow.cc:153 src/StartTournamentWindow.cc:155 msgid " Select All " msgstr " Zaznacz wszystkie " #: src/StartTournamentWindow.cc:154 src/StartTournamentWindow.cc:155 msgid " Unselect All " msgstr " Odznacz wszystkie " #: src/StartTournamentWindow.cc:154 msgid " Add " msgstr " Dodaj " #: src/StartTournamentWindow.cc:251 msgid "Games per sequence" msgstr "Gier na sekwencj" #: src/StartTournamentWindow.cc:251 msgid "Robots per sequence" msgstr "Robotw na sekwencj" #: src/StartTournamentWindow.cc:252 msgid "Number of sequences" msgstr "Liczba sekwencji" #: src/StartTournamentWindow.cc:309 src/OptionsWindow.cc:137 #: src/OptionsWindow.cc:182 msgid " Min " msgstr " Min " #: src/StartTournamentWindow.cc:321 msgid " All Arenas " msgstr " Wszystkie areny " #: src/StartTournamentWindow.cc:333 msgid " Full Round " msgstr " Pena runda " #: src/StartTournamentWindow.cc:343 src/OptionsWindow.cc:141 #: src/OptionsWindow.cc:186 msgid " Max " msgstr " Maks " #: src/StartTournamentWindow.cc:371 msgid " Load tournament " msgstr " Wczytaj turniej " #: src/StartTournamentWindow.cc:371 msgid " Save tournament " msgstr " Zapisz turniej " #: src/StartTournamentWindow.cc:393 msgid " Start " msgstr " Start " #: src/StartTournamentWindow.cc:393 src/OptionsWindow.cc:268 msgid " Cancel " msgstr " Anuluj " #: src/StartTournamentWindow.cc:500 msgid "Choose a tournament file to load" msgstr "Wybierz plik z turniejem do odczytu" #: src/StartTournamentWindow.cc:534 msgid "Choose file to save tournament into" msgstr "Wybierz plik do zapisu turnieju" #: src/StartTournamentWindow.cc:578 msgid "Error in specified tournament file." msgstr "Bd w podanym pliku z turniejem." #: src/StartTournamentWindow.cc:580 src/StartTournamentWindow.cc:740 #: src/StartTournamentWindow.cc:891 src/OptionsWindow.cc:266 msgid " Ok " msgstr " Ok " #: src/StartTournamentWindow.cc:581 msgid "Tournament could not be loaded." msgstr "Nie mona wczyta tornieju." #: src/StartTournamentWindow.cc:730 msgid "There are too few robots in the tournament." msgstr "W turnieju uczestniczy zbyt mao robotw." #: src/StartTournamentWindow.cc:732 src/StartTournamentWindow.cc:886 msgid "There are no arenas in the tournament." msgstr "Brak aren w turnieju." #: src/StartTournamentWindow.cc:735 msgid "Could not open file." msgstr "Nie mona otworzy pliku." #: src/StartTournamentWindow.cc:741 msgid "Tournament could not be saved." msgstr "Turniej nie moe zosta zapisany." #: src/StartTournamentWindow.cc:884 msgid "There must be at least two robots in the tournament." msgstr "W turnieju musz uczestniczy co najmniej dwa roboty." #: src/StartTournamentWindow.cc:892 msgid "Tournament could not be started." msgstr "Turniej nie moe zosta rozpoczty." #: src/StatisticsWindow.cc:49 msgid "Statistics" msgstr "Statystyki" #: src/StatisticsWindow.cc:82 msgid " Close " msgstr " Zamknij " #: src/StatisticsWindow.cc:84 msgid " Save Statistics " msgstr " Zapisz statystyki " #: src/StatisticsWindow.cc:86 msgid " Total " msgstr " Ogem " #: src/StatisticsWindow.cc:88 msgid " Sequence Total " msgstr " Ogem w sekwencji " #: src/StatisticsWindow.cc:225 msgid "Position" msgstr "Pozycja" #: src/StatisticsWindow.cc:225 msgid "Points" msgstr "Punkty" #: src/StatisticsWindow.cc:226 msgid "Games" msgstr "Gry" #: src/StatisticsWindow.cc:226 msgid "Survival Time" msgstr "Czas przeycia" #: src/StatisticsWindow.cc:226 msgid "Total Points" msgstr "Ogem punktw" #: src/StatisticsWindow.cc:310 msgid "Choose a statistics file to save" msgstr "Wybierz plik do zapisu statystyk" #: src/StatisticsWindow.cc:388 msgid "Seq" msgstr "Sekw" #: src/StatisticsWindow.cc:485 msgid " Grand Total " msgstr " Ogem " #: src/StatisticsWindow.cc:491 msgid " Sequence " msgstr " Sekwencja " #: src/StatisticsWindow.cc:507 msgid " Sequence: " msgstr " Sekwencja: " #: src/Various.cc:96 msgid "Error in" msgstr "Bd w" #: src/OptionsWindow.cc:52 msgid "Options" msgstr "Opcje" #: src/OptionsWindow.cc:78 msgid "Environment" msgstr "rodowisko" #: src/OptionsWindow.cc:78 msgid "Robot" msgstr "Robot" #: src/OptionsWindow.cc:78 msgid "Shot" msgstr "Strza" #: src/OptionsWindow.cc:79 msgid "Extras" msgstr "Dodatki" #: src/OptionsWindow.cc:79 msgid "Window sizes" msgstr "Rozmiary okien" #: src/OptionsWindow.cc:80 msgid "Misc" msgstr "Rne" #: src/OptionsWindow.cc:139 src/OptionsWindow.cc:184 src/OptionsWindow.cc:211 msgid " Def " msgstr " Dom " #: src/OptionsWindow.cc:236 msgid " Grab sizes and positions from present windows " msgstr " Pobierz rozmiary i pozycje aktualnych okien " #: src/OptionsWindow.cc:256 msgid " Default " msgstr " Domylne " #: src/OptionsWindow.cc:258 msgid " Load options " msgstr " Wczytaj opcje " #: src/OptionsWindow.cc:260 msgid " Save options " msgstr " Zapisz opcje " #: src/OptionsWindow.cc:262 msgid " Save as default " msgstr " Zapisz jako domylne " #: src/OptionsWindow.cc:264 msgid " Apply " msgstr " Zastosuj " #: src/OptionsWindow.cc:457 msgid "Choose an options file to load" msgstr "Wybierz plik z opcjami do odczytu" #: src/OptionsWindow.cc:481 msgid "Choose an options file to save" msgstr "Wybierz plik do zapisu opcji" #, fuzzy #~ msgid "Ok" #~ msgstr " Ok " #~ msgid "Brakes locked: Robot found and at distance" #~ msgstr "Hamowanie - odnaleziono bliskiego robota" #~ msgid "Acceleration" #~ msgstr "Przypieszenie" #~ msgid "Brake" #~ msgstr "Hamowanie" #~ msgid "Modular angle, Angle" #~ msgstr "Kt" #~ msgid "New rotation" #~ msgstr "Nowy obrt" #~ msgid "New acceleration" #~ msgstr "Nowe przypiesznie" #~ msgid "Hit too many times! Flee!" #~ msgstr "Trafiony zbyt wiele razy! Ucieczka!" #~ msgid "Cookie eaten!" #~ msgstr "Zjedzono ciasteczko!" #~ msgid "Oh no! A mine" #~ msgstr "O nie! Mina" #~ msgid "Unknown message: " #~ msgstr "Nieznany komunikat: " #~ msgid "Process time low: " #~ msgstr "Koniec czaso procesu: " #~ msgid "Message sent in illegal state: " #~ msgstr "Wysano komunikat w niewaciwym stanie: " #~ msgid "Unknown option: " #~ msgstr "Nieznana opcja: " #~ msgid "Obsolete Keyword: " #~ msgstr "Przestarzae sowo kluczowe: " #~ msgid "Shutting down and leaving" #~ msgstr "Zamykanie i zakoczenie" #~ msgid "New" #~ msgstr "Nowy" #~ msgid "Unknown Object seen!" #~ msgstr "Zobaczono nieznany obiekt!" #~ msgid "Collided with Unknown Object!" #~ msgstr "Kolizja z nieznanym obiektem!" realtimebattle-1.0.8/po/pt.po0000644000175000017500000005523410321753016014260 0ustar moimoi# Portuguese Translation of RealTimeBattle. # Copyright (C) 1999 Free Software Foundation, Inc. # Rui Sousa , 1999. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: RealTime Battle\n" "Report-Msgid-Bugs-To: jonico@users.sourceforge.net\n" "POT-Creation-Date: 2005-10-08 16:22+0200\n" "PO-Revision-Date: 2004-11-12 20:10+0100\n" "Last-Translator: Rui Sousa \n" "Language-Team: Rui Sousa\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: src/RealTimeBattle.cc:102 msgid " Usage: RealTimeBattle [options] " msgstr " Uso: RealTimeBattle [opes] " #: src/RealTimeBattle.cc:103 msgid " Options:" msgstr " Opes:" #: src/RealTimeBattle.cc:104 msgid " --debug_mode, -d debug mode" msgstr " --debug_mode, -d modo de debug" #: src/RealTimeBattle.cc:105 msgid "" " --debug_level [0-5], -D sets the initial debug level. Implies -" "d" msgstr "" " --debug_level [0-5], -D ajusta o nivel inicial de debug.\n" " Implica -d" #: src/RealTimeBattle.cc:106 msgid " --normal_mode, -n normal mode (default)" msgstr " --normal_mode, -n modo normal (automtico)" #: src/RealTimeBattle.cc:107 msgid " --competition_mode, -c competition mode" msgstr " --competition_mode, -c modo de competio" #: src/RealTimeBattle.cc:109 msgid " --no_graphics, -g no graphics will be displayed" msgstr " --no_graphics, -g no sero mostrados grficos" #: src/RealTimeBattle.cc:110 msgid "" " --option_file [file], -o selects option-file (default: $HOME/." "rtbrc)" msgstr "" " --option_file [ficheiro], -o selecciona ficheiro de opes\n" " (automtico: $HOME/.rtbrc)" #: src/RealTimeBattle.cc:112 msgid "" " --log_file [file], -l make log file, if 'file' is '-'\n" " the log is sent to STDOUT" msgstr "" " --log_file [ficheiro], -l produz ficheiro de relatrio, se o\n" " 'ficheiro' '-' o relatrio \n" " enviado para STDOUT" #: src/RealTimeBattle.cc:115 msgid "" " --tournament_file [file], -t specify a tournament file to\n" " autostart a tournament" msgstr "" " --tournament_file [ficheiro],-t especifica um ficheiro de torneio\n" " para comear automaticamente um\n" " torneio" #: src/RealTimeBattle.cc:118 msgid "" " --statistics_file [file], -s file to print the statistics to\n" " when autostarting" msgstr "" " --statistics_file [ficheiro],-s ficheiro para o qual escrever as\n" " estatsticas quando a comear\n" " automaticamente" #: src/RealTimeBattle.cc:121 msgid "" " --message_file [file], -m redirect messages to 'file'.\n" " With '-' as 'file', STDOUT is used.\n" " If both log and messages are sent\n" " to STDOUT, '-m' will be ignored" msgstr "" " --message_file [ficheiro], -m redirige mensagens para o 'ficheiro'.\n" " Com '-' como 'ficheiro', usado o\n" " STDOUT.\n" " Se mensagens e relatrios so ambos\n" " enviados para STDOUT, '-m' vai ser\n" " ignorado" #: src/RealTimeBattle.cc:126 msgid "" " --replay [file] -r a log file to replay.\n" " if '-' is specified as file,\n" " input is taken from STDIN" msgstr "" " --replay [ficheiro] -r um ficheiro de relatrio para\n" " repetir.\n" " se '-' for especificado como\n" " ficheiro, o input vem de STDIN" #: src/RealTimeBattle.cc:130 msgid " --help, -h prints this message" msgstr " --help, -h escreve esta mensagem" #: src/RealTimeBattle.cc:131 msgid " --version, -v prints the version number" msgstr " --version, -v escreve o nmero da verso" #: src/RealTimeBattle.cc:133 #, fuzzy msgid "" " --port_number -p specifies the port to listen on " "(default 32134)" msgstr " --normal_mode, -n modo normal (automtico)" #: src/ArenaBase.cc:123 msgid "*Starting robots*" msgstr "*A Iniciar robots*" #: src/ArenaBase.cc:126 msgid "*Shutting down robots*" msgstr "*A Desligar robots*" #: src/ArenaBase.cc:130 msgid "*Running*" msgstr "*A correr*" #: src/ArenaBase.cc:132 msgid "*Pausing after game*" msgstr "*A parar aps o jogo*" #: src/ArenaBase.cc:136 msgid "*Paused*" msgstr "*Parado*" #: src/ArenaBase.cc:139 msgid "*Exiting*" msgstr "*A sair*" #: src/ArenaBase.cc:142 msgid "*Finished*" msgstr "*Acabou*" #: src/ArenaRealTime.cc:849 #, c-format msgid "Game %d of sequence %d begins on arena" msgstr "Jogo %d da sequncia %d comea na arena" #: src/ArenaRealTime.cc:1037 #, c-format msgid "Robot with filename %s has not given any name" msgstr "Robot com nome de ficheiro %s no deu nenhum nome" #: src/ArenaReplay.cc:131 #, c-format msgid "Game %d of sequence %d" msgstr "Jogo %d da sequncia %d" #: src/ArenaWindow.cc:77 msgid " No Zoom " msgstr " Normal " #: src/ArenaWindow.cc:79 msgid " Zoom In " msgstr " Aproximar " #: src/ArenaWindow.cc:81 msgid " Zoom Out " msgstr " Afastar " #: src/ArenaWindow.cc:149 msgid "Arena" msgstr "Arena" #: src/ControlWindow.cc:81 msgid " New Tournament " msgstr " Novo Torneio " #: src/ControlWindow.cc:83 msgid " Replay Tournament " msgstr " Repetio do Torneio " #: src/ControlWindow.cc:85 msgid " Pause " msgstr " Parar " #: src/ControlWindow.cc:87 msgid " End " msgstr " Acabar " #: src/ControlWindow.cc:89 msgid " Options " msgstr " Opes " #: src/ControlWindow.cc:91 msgid " Statistics " msgstr " Estatsticas " #: src/ControlWindow.cc:93 msgid " Quit " msgstr " Abandonar " #: src/ControlWindow.cc:119 msgid "Show arena window" msgstr "Mostrar janela da arena" #: src/ControlWindow.cc:121 msgid "Show message window" msgstr "Mostrar janela das mensagens" #: src/ControlWindow.cc:123 msgid "Show score window" msgstr "Mostrar janela da pontuao" #: src/ControlWindow.cc:202 msgid " Step " msgstr " Passo a Passo " #: src/ControlWindow.cc:204 msgid " End Game " msgstr " Acabar o Jogo" #: src/ControlWindow.cc:206 msgid " Kill Marked Robot " msgstr " Matar Robot Seleccionado " #: src/ControlWindow.cc:234 msgid " Debug Level: " msgstr " Nvel de debug: " #: src/ControlWindow.cc:335 msgid " Step forward " msgstr " Passo frente " #: src/ControlWindow.cc:339 msgid " Step backward " msgstr " Passo a trs " #: src/ControlWindow.cc:343 msgid " Next Game " msgstr " Jogo Seguinte " #: src/ControlWindow.cc:347 msgid " Prev Game " msgstr " Jogo Anter " #: src/ControlWindow.cc:351 msgid " Next Seq " msgstr " Seq Seguinte " #: src/ControlWindow.cc:355 msgid " Prev Seq " msgstr " Seq Anter " #: src/ControlWindow.cc:514 src/ControlWindow.cc:674 src/Gui.cc:154 msgid "" "This action will kill the current tournament.\n" "Do you want to do that?" msgstr "" "Esta aco ir matar o presente torneio.\n" "Quer fazer isto?" #: src/ControlWindow.cc:517 src/ControlWindow.cc:677 msgid "Yes" msgstr "Sim" #: src/ControlWindow.cc:518 src/ControlWindow.cc:678 msgid "No" msgstr "No" #: src/ControlWindow.cc:531 msgid "Choose a log file to replay" msgstr "Escolha um ficheiro de relatrio para a repetio" #: src/MessageWindow.cc:78 msgid " Clear all messages " msgstr " Limpar mensagens " #: src/MessageWindow.cc:80 msgid " Show only marked robot " msgstr " Mostrar robot seleccionado " #: src/MessageWindow.cc:82 msgid " Show all " msgstr " Mostrar Todos " #: src/MessageWindow.cc:108 src/StatisticsWindow.cc:93 msgid " Robot " msgstr " Robot " #: src/MessageWindow.cc:108 msgid " Message " msgstr " Mensagem " #: src/MessageWindow.cc:172 msgid "Messages" msgstr "Mensagens" #: src/MessageWindow.cc:176 msgid " All " msgstr " Todos " #: src/Options.cc:77 msgid "Gravitational Constant" msgstr "Constante Gravitacional" #: src/Options.cc:81 msgid "Air resistance" msgstr "Resistncia do ar" #: src/Options.cc:85 msgid "Roll friction" msgstr "Frico de rolamento" #: src/Options.cc:90 msgid "Slide/brake friction" msgstr "Frico de derrapagem/travagem" #: src/Options.cc:95 msgid "Send robot coordinates" msgstr "" #: src/Options.cc:100 msgid "Robot max acceleration" msgstr "Mx acelerao do robot" #: src/Options.cc:105 msgid "Robot min acceleration" msgstr "Min acelerao do robot" #: src/Options.cc:109 msgid "Robot radius" msgstr "Raio do robot" #: src/Options.cc:113 msgid "Robot mass" msgstr "Massa do robot" #: src/Options.cc:118 msgid "Robot bounce coefficient" msgstr "Coeficiente de restituio do robot" #: src/Options.cc:123 msgid "Robot hardness coefficient" msgstr "Coeficiente de rigidez do robot" #: src/Options.cc:128 msgid "Robot protection coefficient" msgstr "Coeficiente de proteco do robot" #: src/Options.cc:133 msgid "Robot frontsize [radians]" msgstr "Tamanho da frente do robot [radianos]" #: src/Options.cc:138 msgid "Robot front bounce coefficient" msgstr "Coeficiente de restituio da frente do robot" #: src/Options.cc:143 msgid "Robot front hardness coefficient" msgstr "Coeficiente de rigidez da frente do robot" #: src/Options.cc:148 msgid "Robot front protection coefficient" msgstr "Coeficiente de proteco da frente do robot" #: src/Options.cc:153 msgid "Robot start energy" msgstr "Energia inicial do robot" #: src/Options.cc:158 msgid "Robot max energy" msgstr "Energia mx do robot" #: src/Options.cc:164 msgid "Robot max rotate speed [rad/s]" msgstr "Velocidade de rotao mx do robot [rad/s]" #: src/Options.cc:170 msgid "Robot cannon max rotate speed [rad/s]" msgstr "Velocidade de rotao mx do canho do robot [rad/s]" #: src/Options.cc:176 msgid "Robot radar max rotate speed [rad/s]" msgstr "Velocidade de rotao mx do radar do robot [rad/s]" #: src/Options.cc:181 msgid "Process check interval" msgstr "Intervalo de verificao do processo" #: src/Options.cc:185 msgid "Robot energy levels" msgstr "Nveis de energia do robot" #: src/Options.cc:189 msgid "Shot radius" msgstr "Raio do tiro" #: src/Options.cc:193 msgid "Shot speed" msgstr "Velocidade do tiro" #: src/Options.cc:198 msgid "Shooting penalty (times shot energy)" msgstr "Penalizao por disparar (vezes energia do tiro)" #: src/Options.cc:202 msgid "Shot min energy" msgstr "Energia min do tiro" #: src/Options.cc:206 msgid "Shot max energy" msgstr "Energia mx do tiro" #: src/Options.cc:211 msgid "Shot energy increase speed [energy/s]" msgstr "Velocidade do aumento da energia do tiro [energia/s]" #: src/Options.cc:215 msgid "Background colour" msgstr "Cr de fundo" #: src/Options.cc:219 msgid "Foreground colour" msgstr "Cr do primeiro plano" #: src/Options.cc:224 msgid "Colour for RTB messages" msgstr "Cr das mensagens do RTB" #: src/Options.cc:228 msgid "Cookie max energy" msgstr "Energia mx dos cookies" #: src/Options.cc:232 msgid "Cookie min energy" msgstr "Energia min dos cookies" #: src/Options.cc:237 msgid "Cookie frequency [cookies per second]" msgstr "Frequncia dos cookies [cookies por segundo]" #: src/Options.cc:241 msgid "Cookie radius" msgstr "Raio dos cookies" #: src/Options.cc:245 msgid "Cookie colour" msgstr "Cr dos cookies" #: src/Options.cc:249 msgid "Mine max energy" msgstr "Energia mx das minas" #: src/Options.cc:253 msgid "Mine min energy" msgstr "Energia min das minas" #: src/Options.cc:258 msgid "Mine frequency [mines per second]" msgstr "Frequncia das minas [minas por segundo]" #: src/Options.cc:262 msgid "Mine radius" msgstr "Raio das minas" #: src/Options.cc:266 msgid "Mine colour" msgstr "Cr das minas" #: src/Options.cc:270 msgid "Arena scale" msgstr "Escala da arena" #: src/Options.cc:275 msgid "Fast forward factor" msgstr "Factor de avano rpido" #: src/Options.cc:279 msgid "Timeout [s]" msgstr "Durao mxima [s]" #: src/Options.cc:283 msgid "Max timestep" msgstr "Intervalo de tempo mx" #: src/Options.cc:287 msgid "Timescale" msgstr "Escala de tempo" #: src/Options.cc:292 msgid "Update interval [s]" msgstr "Intervalo das actualizaes [s]" #: src/Options.cc:297 msgid "Robot startup time [s]" msgstr "Tempo inicial do robot [s]" #: src/Options.cc:301 msgid "Start CPU time [s]" msgstr "Tempo de CPU inicial [s]" #: src/Options.cc:305 msgid "Extra CPU time [s]" msgstr "Tempo de CPU extra [s]" #: src/Options.cc:310 msgid "Extra CPU period [s]" msgstr "Perodo extra de CPU [s]" #: src/Options.cc:315 msgid "CPU time warning percentage" msgstr "Percentagem de tempo de CPU para aviso" #: src/Options.cc:320 msgid "Logging frequency [Each n:th update interval]" msgstr "Frequncia de relatrio [A cada n intervalos de actualizao]" #: src/Options.cc:325 msgid "Max robots allowed simultaneously" msgstr "Mx robots permitidos simultaneamente" #: src/Options.cc:329 msgid "Robot search path" msgstr "Caminho para procurar robots" #: src/Options.cc:333 msgid "Arena search path" msgstr "Caminho para procurar arenas" #: src/Options.cc:344 msgid "Directory for temporary files" msgstr "Directoria para ficheiros temporrios" #: src/Options.cc:349 msgid "Initial Arena window width" msgstr "Largura inicial da janela da Arena" #: src/Options.cc:354 msgid "Initial Arena window height" msgstr "Altura inicial da janela da Arena" #: src/Options.cc:359 msgid "Initial Arena window x position" msgstr "Coordenada inicial da janela da Arena" #: src/Options.cc:364 msgid "Initial Arena window y position" msgstr "Ordenada inicial da janela da Arena" #: src/Options.cc:369 msgid "Initial Control window x position" msgstr "Coordenada inicial da janela de Controle" #: src/Options.cc:374 msgid "Initial Control window y position" msgstr "Ordenada inicial da janela de Controle" #: src/Options.cc:379 msgid "Initial Message window width" msgstr "Largura inicial da janela das Mensagens" #: src/Options.cc:384 msgid "Initial Message window height" msgstr "Altura inicial da janela das Mensagens" #: src/Options.cc:389 msgid "Initial Message window x position" msgstr "Coordenada inicial da janela das Mensagens" #: src/Options.cc:394 msgid "Initial Message window y position" msgstr "Ordenada inicial da janela das Mensagens" #: src/Options.cc:399 msgid "Initial Score window width" msgstr "Largura inicial da janela da Pontuao" #: src/Options.cc:404 msgid "Initial Score window height" msgstr "Altura inicial da janela da Pontuao" #: src/Options.cc:409 msgid "Initial Score window x position" msgstr "Coordenada inicial da janela da Pontuao" #: src/Options.cc:414 msgid "Initial Score window y position" msgstr "Ordenada inicial da janela da Pontuao" #: src/Options.cc:419 msgid "Initial Statistics window width" msgstr "Largura inicial da janela das Estatsticas" #: src/Options.cc:424 msgid "Initial Statistics window height" msgstr "Altura inicial da janela das Estatsticas" #: src/ScoreWindow.cc:72 src/StatisticsWindow.cc:225 #: src/StatisticsWindow.cc:372 msgid "Name" msgstr "Nome" #: src/ScoreWindow.cc:72 msgid "Energy" msgstr "Energia" #: src/ScoreWindow.cc:72 msgid "Place" msgstr "Lugar" #: src/ScoreWindow.cc:73 msgid "Last" msgstr "ltimo" #: src/ScoreWindow.cc:73 src/ScoreWindow.cc:147 msgid "Score" msgstr "Pontuao" #: src/ScoreWindow.cc:148 msgid " Seq: " msgstr " Seq: " #: src/ScoreWindow.cc:151 src/StatisticsWindow.cc:90 #: src/StatisticsWindow.cc:389 src/StatisticsWindow.cc:508 msgid "Game" msgstr "Jogo" #: src/ScoreWindow.cc:154 src/OptionsWindow.cc:79 msgid "Time" msgstr "Tempo" #: src/StartTournamentWindow.cc:78 msgid "Start New Tournament" msgstr "Comear Novo Torneio" #: src/StartTournamentWindow.cc:124 msgid "Robots in Tournament" msgstr "Robots no Torneio" #: src/StartTournamentWindow.cc:125 msgid "Robots in Directory" msgstr "Robots na Directoria" #: src/StartTournamentWindow.cc:134 msgid "Arenas in Tournament" msgstr "Arenas no Torneio" #: src/StartTournamentWindow.cc:135 msgid "Arenas in Directory" msgstr "Arenas na Directoria" #: src/StartTournamentWindow.cc:153 msgid " Remove " msgstr " Remover " #: src/StartTournamentWindow.cc:153 src/StartTournamentWindow.cc:155 msgid " Select All " msgstr " Selecionar Todos " #: src/StartTournamentWindow.cc:154 src/StartTournamentWindow.cc:155 msgid " Unselect All " msgstr "De-selecionar Todos" #: src/StartTournamentWindow.cc:154 msgid " Add " msgstr " Adicionar " #: src/StartTournamentWindow.cc:251 msgid "Games per sequence" msgstr "Jogos por sequncia" #: src/StartTournamentWindow.cc:251 msgid "Robots per sequence" msgstr "Robots por sequncia" #: src/StartTournamentWindow.cc:252 msgid "Number of sequences" msgstr "Nmero de sequncias" #: src/StartTournamentWindow.cc:309 src/OptionsWindow.cc:137 #: src/OptionsWindow.cc:182 msgid " Min " msgstr " Min " #: src/StartTournamentWindow.cc:321 msgid " All Arenas " msgstr " Todas as Arenas " #: src/StartTournamentWindow.cc:333 msgid " Full Round " msgstr " Round Completo " #: src/StartTournamentWindow.cc:343 src/OptionsWindow.cc:141 #: src/OptionsWindow.cc:186 msgid " Max " msgstr " Mx" #: src/StartTournamentWindow.cc:371 msgid " Load tournament " msgstr " Ler torneio " #: src/StartTournamentWindow.cc:371 msgid " Save tournament " msgstr " Gravar torneio " #: src/StartTournamentWindow.cc:393 msgid " Start " msgstr " Comear " #: src/StartTournamentWindow.cc:393 src/OptionsWindow.cc:268 msgid " Cancel " msgstr " Cancelar " #: src/StartTournamentWindow.cc:500 msgid "Choose a tournament file to load" msgstr "Escolha um ficheiro de torneio para ler" #: src/StartTournamentWindow.cc:534 msgid "Choose file to save tournament into" msgstr "Escolha um ficheiro para o qual gravar o torneio" #: src/StartTournamentWindow.cc:578 msgid "Error in specified tournament file." msgstr "Erro no ficheiro de torneio especificado." #: src/StartTournamentWindow.cc:580 src/StartTournamentWindow.cc:740 #: src/StartTournamentWindow.cc:891 src/OptionsWindow.cc:266 msgid " Ok " msgstr " Ok " #: src/StartTournamentWindow.cc:581 msgid "Tournament could not be loaded." msgstr "Torneio no pde ser lido." #: src/StartTournamentWindow.cc:730 msgid "There are too few robots in the tournament." msgstr "Existem robots a menos no torneio." #: src/StartTournamentWindow.cc:732 src/StartTournamentWindow.cc:886 msgid "There are no arenas in the tournament." msgstr "No existem nenhumas arenas no torneio." #: src/StartTournamentWindow.cc:735 msgid "Could not open file." msgstr "No foi possvel abrir ficheiro." #: src/StartTournamentWindow.cc:741 msgid "Tournament could not be saved." msgstr "O torneio no pde ser gravado." #: src/StartTournamentWindow.cc:884 msgid "There must be at least two robots in the tournament." msgstr "Tm de haver pelo menos dois robots no torneio." #: src/StartTournamentWindow.cc:892 msgid "Tournament could not be started." msgstr "No foi possivel comear o torneio." #: src/StatisticsWindow.cc:49 msgid "Statistics" msgstr "Estatsticas" #: src/StatisticsWindow.cc:82 msgid " Close " msgstr " Fechar " #: src/StatisticsWindow.cc:84 msgid " Save Statistics " msgstr " Gravar Estatsticas " #: src/StatisticsWindow.cc:86 msgid " Total " msgstr " Total " #: src/StatisticsWindow.cc:88 msgid " Sequence Total " msgstr " Total desta sequncia" #: src/StatisticsWindow.cc:225 msgid "Position" msgstr "Posio" #: src/StatisticsWindow.cc:225 msgid "Points" msgstr "Pontos" #: src/StatisticsWindow.cc:226 msgid "Games" msgstr "Jogos" #: src/StatisticsWindow.cc:226 msgid "Survival Time" msgstr "Tempo de sobrevivncia" #: src/StatisticsWindow.cc:226 msgid "Total Points" msgstr "Pontos Totais" #: src/StatisticsWindow.cc:310 msgid "Choose a statistics file to save" msgstr "Escolha um ficheiro de estatsticas para gravar" #: src/StatisticsWindow.cc:388 msgid "Seq" msgstr "Seq" #: src/StatisticsWindow.cc:485 msgid " Grand Total " msgstr " Grande Total " #: src/StatisticsWindow.cc:491 msgid " Sequence " msgstr " Sequncia " #: src/StatisticsWindow.cc:507 msgid " Sequence: " msgstr " Sequncia: " #: src/Various.cc:96 msgid "Error in" msgstr "Erro em" #: src/OptionsWindow.cc:52 msgid "Options" msgstr "Opes" #: src/OptionsWindow.cc:78 msgid "Environment" msgstr "Ambiente" #: src/OptionsWindow.cc:78 msgid "Robot" msgstr "Robot" #: src/OptionsWindow.cc:78 msgid "Shot" msgstr "Tiro" #: src/OptionsWindow.cc:79 msgid "Extras" msgstr "Extras" #: src/OptionsWindow.cc:79 msgid "Window sizes" msgstr "Tamanho da janelas" #: src/OptionsWindow.cc:80 msgid "Misc" msgstr "Vrios" #: src/OptionsWindow.cc:139 src/OptionsWindow.cc:184 src/OptionsWindow.cc:211 msgid " Def " msgstr " Aut " #: src/OptionsWindow.cc:236 msgid " Grab sizes and positions from present windows " msgstr " Recolher tamanhos e posies das janelas actuais " #: src/OptionsWindow.cc:256 msgid " Default " msgstr " Automtico " #: src/OptionsWindow.cc:258 msgid " Load options " msgstr " Ler opes " #: src/OptionsWindow.cc:260 msgid " Save options " msgstr " Gravar opes " #: src/OptionsWindow.cc:262 msgid " Save as default " msgstr " Gravar como automtico " #: src/OptionsWindow.cc:264 msgid " Apply " msgstr " Aplicar " #: src/OptionsWindow.cc:457 msgid "Choose an options file to load" msgstr "Escolha um ficheiro de opes para ler" #: src/OptionsWindow.cc:481 msgid "Choose an options file to save" msgstr "Escolha um ficheiro de opes para gravar" #, fuzzy #~ msgid "Ok" #~ msgstr " Ok " #~ msgid "Brakes locked: Robot found and at distance" #~ msgstr "Traves a fundo: Robot avistado e ao alcance" #~ msgid "Acceleration" #~ msgstr "Acelerao" #~ msgid "Brake" #~ msgstr "Travar" #~ msgid "Modular angle, Angle" #~ msgstr "ngulo modular, ngulo" #~ msgid "New rotation" #~ msgstr "Nova Rotao" #~ msgid "New acceleration" #~ msgstr "Nova acelerao" #~ msgid "Hit too many times! Flee!" #~ msgstr "Atingido demasiadas vezes! Fugir!" #~ msgid "Cookie eaten!" #~ msgstr "Cookie comido!" #~ msgid "Oh no! A mine" #~ msgstr "Oh no! Uma mina" #~ msgid "Unknown message: " #~ msgstr "Mensagem desconhecida: " #~ msgid "Process time low: " #~ msgstr "Tempo do processo baixo: " #~ msgid "Message sent in illegal state: " #~ msgstr "Mensagem enviada em estado ilegal: " #~ msgid "Unknown option: " #~ msgstr "Opo desconhecida: " #~ msgid "Obsolete Keyword: " #~ msgstr "Palavra chave obsoleta: " #~ msgid "Shutting down and leaving" #~ msgstr "A desligar e sair" #~ msgid "New" #~ msgstr "Novo" #~ msgid "Unknown Object seen!" #~ msgstr "Objecto desconhecido avistado!" #~ msgid "Collided with Unknown Object!" #~ msgstr "Coliso com Objecto Desconhecido!" realtimebattle-1.0.8/po/sv.po0000644000175000017500000005342410321753016014264 0ustar moimoi# Swedish tranlsation of RealTimeBattle # Copyright (C) YEAR Free Software Foundation, Inc. # Erik Ouchterlony and Ragnar Ouchterlony , 1999 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: RealTime Battle\n" "Report-Msgid-Bugs-To: jonico@users.sourceforge.net\n" "POT-Creation-Date: 2005-10-08 16:22+0200\n" "PO-Revision-Date: 2004-11-12 20:11 +0100\n" "Last-Translator: Erik Ouchterlony and Ragnar Ouchterlony \n" "Language-Team: Erik and Ragnar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: src/RealTimeBattle.cc:102 msgid " Usage: RealTimeBattle [options] " msgstr " Anvndning: RealTimeBattle [flaggor] " #: src/RealTimeBattle.cc:103 msgid " Options:" msgstr " Flaggor:" #: src/RealTimeBattle.cc:104 msgid " --debug_mode, -d debug mode" msgstr " --debug_mode, -d debuglge" #: src/RealTimeBattle.cc:105 msgid "" " --debug_level [0-5], -D sets the initial debug level. Implies -" "d" msgstr " --debug_level [0-5], -D stt debug-niv. Implicerar -d" #: src/RealTimeBattle.cc:106 msgid " --normal_mode, -n normal mode (default)" msgstr " --normal_mode, -n normalt lge" #: src/RealTimeBattle.cc:107 msgid " --competition_mode, -c competition mode" msgstr " --competition_mode, -c tvlingslge" #: src/RealTimeBattle.cc:109 msgid " --no_graphics, -g no graphics will be displayed" msgstr " --no_graphics, -g visa ingen grafik" #: src/RealTimeBattle.cc:110 msgid "" " --option_file [file], -o selects option-file (default: $HOME/." "rtbrc)" msgstr "" " --option_file [fil], -o vlj instllningsfil (normalt: $HOME/." "rtbrc)" #: src/RealTimeBattle.cc:112 msgid "" " --log_file [file], -l make log file, if 'file' is '-'\n" " the log is sent to STDOUT" msgstr "" " --log_file [fil], -l skapa log-file, om 'fil' r '-'\n" " s skickas loggen till STDOUT" #: src/RealTimeBattle.cc:115 msgid "" " --tournament_file [file], -t specify a tournament file to\n" " autostart a tournament" msgstr "" " --tournament_file [fil], -t vlj turneringsfil fr automatisk\n" " start av turneringen" #: src/RealTimeBattle.cc:118 msgid "" " --statistics_file [file], -s file to print the statistics to\n" " when autostarting" msgstr "" " --statistics_file [fil], -s skriv statistik till fil vid\n" " automatisk turneringsstart" #: src/RealTimeBattle.cc:121 msgid "" " --message_file [file], -m redirect messages to 'file'.\n" " With '-' as 'file', STDOUT is used.\n" " If both log and messages are sent\n" " to STDOUT, '-m' will be ignored" msgstr "" " --message_file [fil], -m skicka meddelanden till 'fil'.\n" " Om 'fil' r '-' anvnds STDOUT.\n" " Om bde loggen och meddelanden " "skickas\n" " till STDOUT kommer '-m' att ignoreras" #: src/RealTimeBattle.cc:126 msgid "" " --replay [file] -r a log file to replay.\n" " if '-' is specified as file,\n" " input is taken from STDIN" msgstr "" " --replay [fil] -r visa spel sparat i 'fil'.\n" " om filen r '-' kommer\n" " STDIN anvndas" #: src/RealTimeBattle.cc:130 msgid " --help, -h prints this message" msgstr " --help, -h skriv ut denna hjlptext" #: src/RealTimeBattle.cc:131 msgid " --version, -v prints the version number" msgstr " --version, -v visa versionsnummer" #: src/RealTimeBattle.cc:133 #, fuzzy msgid "" " --port_number -p specifies the port to listen on " "(default 32134)" msgstr " --normal_mode, -n normalt lge" #: src/ArenaBase.cc:123 msgid "*Starting robots*" msgstr "*Startar robotar*" #: src/ArenaBase.cc:126 msgid "*Shutting down robots*" msgstr "*Stnger av robotar*" #: src/ArenaBase.cc:130 msgid "*Running*" msgstr "*Spelet pgr*" #: src/ArenaBase.cc:132 msgid "*Pausing after game*" msgstr "*Paus efter spelets slut*" #: src/ArenaBase.cc:136 msgid "*Paused*" msgstr "*Paus*" #: src/ArenaBase.cc:139 msgid "*Exiting*" msgstr "*Avslutar*" #: src/ArenaBase.cc:142 msgid "*Finished*" msgstr "*Spelet slut*" #: src/ArenaRealTime.cc:849 #, c-format msgid "Game %d of sequence %d begins on arena" msgstr "Spel %d i sekvens %d brjar p arena" #: src/ArenaRealTime.cc:1037 #, c-format msgid "Robot with filename %s has not given any name" msgstr "Roboten med filnamnet %s har inte skickat ngot namn" #: src/ArenaReplay.cc:131 #, c-format msgid "Game %d of sequence %d" msgstr "Spel %d i sekvens %d" #: src/ArenaWindow.cc:77 msgid " No Zoom " msgstr " Ingen inzoomning " #: src/ArenaWindow.cc:79 msgid " Zoom In " msgstr " Zooma in " #: src/ArenaWindow.cc:81 msgid " Zoom Out " msgstr " Zooma ut " #: src/ArenaWindow.cc:149 msgid "Arena" msgstr "Arena" #: src/ControlWindow.cc:81 msgid " New Tournament " msgstr " Ny turnering " #: src/ControlWindow.cc:83 msgid " Replay Tournament " msgstr " Repris av turnering " #: src/ControlWindow.cc:85 msgid " Pause " msgstr " Paus " #: src/ControlWindow.cc:87 msgid " End " msgstr " Stoppa " #: src/ControlWindow.cc:89 msgid " Options " msgstr " Instllningar " #: src/ControlWindow.cc:91 msgid " Statistics " msgstr " Statistik " #: src/ControlWindow.cc:93 msgid " Quit " msgstr " Avsluta " #: src/ControlWindow.cc:119 msgid "Show arena window" msgstr "Visa arenafnster" #: src/ControlWindow.cc:121 msgid "Show message window" msgstr "Visa meddelandefnster" #: src/ControlWindow.cc:123 msgid "Show score window" msgstr "Visa resultatfnster" #: src/ControlWindow.cc:202 msgid " Step " msgstr " Stega " #: src/ControlWindow.cc:204 msgid " End Game " msgstr " Avsluta spel " #: src/ControlWindow.cc:206 msgid " Kill Marked Robot " msgstr " Dda markerad robot " #: src/ControlWindow.cc:234 msgid " Debug Level: " msgstr " Debugniv: " #: src/ControlWindow.cc:335 msgid " Step forward " msgstr " Stega framt " #: src/ControlWindow.cc:339 msgid " Step backward " msgstr " Stega bakt " #: src/ControlWindow.cc:343 msgid " Next Game " msgstr " Nsta spel " #: src/ControlWindow.cc:347 msgid " Prev Game " msgstr " Freg spel " #: src/ControlWindow.cc:351 msgid " Next Seq " msgstr " Nsta sekv " #: src/ControlWindow.cc:355 msgid " Prev Seq " msgstr " Freg sekv " #: src/ControlWindow.cc:514 src/ControlWindow.cc:674 src/Gui.cc:154 msgid "" "This action will kill the current tournament.\n" "Do you want to do that?" msgstr "" "Detta kommer avbryta den pgende turningen.\n" "Vill du gra det?" #: src/ControlWindow.cc:517 src/ControlWindow.cc:677 msgid "Yes" msgstr "Ja" #: src/ControlWindow.cc:518 src/ControlWindow.cc:678 msgid "No" msgstr "Nej" #: src/ControlWindow.cc:531 msgid "Choose a log file to replay" msgstr "Vlj en log-fil att spela upp" #: src/MessageWindow.cc:78 msgid " Clear all messages " msgstr " Rensa alla meddelanden " #: src/MessageWindow.cc:80 msgid " Show only marked robot " msgstr " Visa endast markerad robot " #: src/MessageWindow.cc:82 msgid " Show all " msgstr " Visa alla " #: src/MessageWindow.cc:108 src/StatisticsWindow.cc:93 msgid " Robot " msgstr " Robot " #: src/MessageWindow.cc:108 msgid " Message " msgstr " Meddelande " #: src/MessageWindow.cc:172 msgid "Messages" msgstr "Meddelanden" #: src/MessageWindow.cc:176 msgid " All " msgstr " Alla " #: src/Options.cc:77 msgid "Gravitational Constant" msgstr "Tyngdacceleration" #: src/Options.cc:81 msgid "Air resistance" msgstr "Luftmotstnd" #: src/Options.cc:85 msgid "Roll friction" msgstr "Rullfriktion" #: src/Options.cc:90 msgid "Slide/brake friction" msgstr "Glid/bromsfriktion" #: src/Options.cc:95 msgid "Send robot coordinates" msgstr "Skicka robotens koordinater" #: src/Options.cc:100 msgid "Robot max acceleration" msgstr "Robots maxacceleration" #: src/Options.cc:105 msgid "Robot min acceleration" msgstr "Robots minacceleration" #: src/Options.cc:109 msgid "Robot radius" msgstr "Robotradie" #: src/Options.cc:113 msgid "Robot mass" msgstr "Robotvikt" #: src/Options.cc:118 msgid "Robot bounce coefficient" msgstr "Robots studskoefficient" #: src/Options.cc:123 msgid "Robot hardness coefficient" msgstr "Robots hrdhetskoefficient" #: src/Options.cc:128 msgid "Robot protection coefficient" msgstr "Robots skyddskoefficient" #: src/Options.cc:133 msgid "Robot frontsize [radians]" msgstr "Robots frontstorlek [radianer]" #: src/Options.cc:138 msgid "Robot front bounce coefficient" msgstr "Robotfronts studskoefficient" #: src/Options.cc:143 msgid "Robot front hardness coefficient" msgstr "Robotfronts hrdhetskoefficient" #: src/Options.cc:148 msgid "Robot front protection coefficient" msgstr "Robotfronts skyddskoefficient" #: src/Options.cc:153 msgid "Robot start energy" msgstr "Robots startenergi" #: src/Options.cc:158 msgid "Robot max energy" msgstr "Robots maxenergi" #: src/Options.cc:164 msgid "Robot max rotate speed [rad/s]" msgstr "Robots hgsta rotationshast. [rad/s]" #: src/Options.cc:170 msgid "Robot cannon max rotate speed [rad/s]" msgstr "Kanons hgsta rotationshast. [rad/s]" #: src/Options.cc:176 msgid "Robot radar max rotate speed [rad/s]" msgstr "Radars hgsta rotationshast. [rad/s]" #: src/Options.cc:181 msgid "Process check interval" msgstr "Tid mellan processkontroller" #: src/Options.cc:185 msgid "Robot energy levels" msgstr "Antal energiniver fr robot" #: src/Options.cc:189 msgid "Shot radius" msgstr "Skottradie" #: src/Options.cc:193 msgid "Shot speed" msgstr "Skotthastighet" #: src/Options.cc:198 msgid "Shooting penalty (times shot energy)" msgstr "Skada p skytt (mult. m skottenergin)" #: src/Options.cc:202 msgid "Shot min energy" msgstr "Skotts lgsta energi" #: src/Options.cc:206 msgid "Shot max energy" msgstr "Skotts hgsta energi" #: src/Options.cc:211 msgid "Shot energy increase speed [energy/s]" msgstr "Robots skotttenegi-kning [per sekund]" #: src/Options.cc:215 msgid "Background colour" msgstr "Bakgrundsfrg" #: src/Options.cc:219 msgid "Foreground colour" msgstr "Frgrnudsfrg" #: src/Options.cc:224 msgid "Colour for RTB messages" msgstr "Frg p RTB-meddelanden" #: src/Options.cc:228 msgid "Cookie max energy" msgstr "Kakors hgsta energi" #: src/Options.cc:232 msgid "Cookie min energy" msgstr "Kakors lgsta energi" #: src/Options.cc:237 msgid "Cookie frequency [cookies per second]" msgstr "Kakors talrikhet [kakor per sekund]" #: src/Options.cc:241 msgid "Cookie radius" msgstr "Kakors radie" #: src/Options.cc:245 msgid "Cookie colour" msgstr "Kakors frg" #: src/Options.cc:249 msgid "Mine max energy" msgstr "Minors hgsta energi" #: src/Options.cc:253 msgid "Mine min energy" msgstr "Minors lgsta energi" #: src/Options.cc:258 msgid "Mine frequency [mines per second]" msgstr "Minors talrikhet [minor per sekund]" #: src/Options.cc:262 msgid "Mine radius" msgstr "Minors radie" #: src/Options.cc:266 msgid "Mine colour" msgstr "Minors frg" #: src/Options.cc:270 msgid "Arena scale" msgstr "Arenaskala" #: src/Options.cc:275 msgid "Fast forward factor" msgstr "Snabbspolningsfaktor" #: src/Options.cc:279 msgid "Timeout [s]" msgstr "Max tids [s]" #: src/Options.cc:283 msgid "Max timestep" msgstr "Max tidshopp" #: src/Options.cc:287 msgid "Timescale" msgstr "Tidsskala" #: src/Options.cc:292 msgid "Update interval [s]" msgstr "Uppdateringsintervall [s]" #: src/Options.cc:297 msgid "Robot startup time [s]" msgstr "Startupptid fr robotar [s]" #: src/Options.cc:301 msgid "Start CPU time [s]" msgstr "Processtid [s]" #: src/Options.cc:305 msgid "Extra CPU time [s]" msgstr "Extra processtid [s]" #: src/Options.cc:310 msgid "Extra CPU period [s]" msgstr "Extra processtid-intervall [s]" #: src/Options.cc:315 msgid "CPU time warning percentage" msgstr "Lg processtidsvarning [procent]" #: src/Options.cc:320 msgid "Logging frequency [Each n:th update interval]" msgstr "Loggningsfrekvens [Var n:te uppdateringsintervall]" #: src/Options.cc:325 msgid "Max robots allowed simultaneously" msgstr "Max antal samtidiga robotar" #: src/Options.cc:329 msgid "Robot search path" msgstr "Robot skvg" #: src/Options.cc:333 msgid "Arena search path" msgstr "Arena skvg" #: src/Options.cc:344 msgid "Directory for temporary files" msgstr "Bibliotek fr tillflliga filer" #: src/Options.cc:349 msgid "Initial Arena window width" msgstr "Arenafnster bredd" #: src/Options.cc:354 msgid "Initial Arena window height" msgstr "Arenafnster hjd" #: src/Options.cc:359 msgid "Initial Arena window x position" msgstr "Arenafnster x-position" #: src/Options.cc:364 msgid "Initial Arena window y position" msgstr "Arenafnster y-position" #: src/Options.cc:369 msgid "Initial Control window x position" msgstr "kontrollfnster x-position" #: src/Options.cc:374 msgid "Initial Control window y position" msgstr "kontrollfnster y-position" #: src/Options.cc:379 msgid "Initial Message window width" msgstr "Meddelandefnster bredd" #: src/Options.cc:384 msgid "Initial Message window height" msgstr "Meddelandefnster hjd" #: src/Options.cc:389 msgid "Initial Message window x position" msgstr "Meddelandefnster x-position" #: src/Options.cc:394 msgid "Initial Message window y position" msgstr "Meddelandefnster y-position" #: src/Options.cc:399 msgid "Initial Score window width" msgstr "Resultatfnster bredd" #: src/Options.cc:404 msgid "Initial Score window height" msgstr "Resultatfnster hjd" #: src/Options.cc:409 msgid "Initial Score window x position" msgstr "Resultatfnster x-position" #: src/Options.cc:414 msgid "Initial Score window y position" msgstr "Resultatfnster y-position" #: src/Options.cc:419 msgid "Initial Statistics window width" msgstr "Statistikfnster bredd" #: src/Options.cc:424 msgid "Initial Statistics window height" msgstr "Statistikfnster hjd" #: src/ScoreWindow.cc:72 src/StatisticsWindow.cc:225 #: src/StatisticsWindow.cc:372 msgid "Name" msgstr "Namn" #: src/ScoreWindow.cc:72 msgid "Energy" msgstr "Energi" #: src/ScoreWindow.cc:72 msgid "Place" msgstr "Plats" #: src/ScoreWindow.cc:73 msgid "Last" msgstr "Senast" #: src/ScoreWindow.cc:73 src/ScoreWindow.cc:147 msgid "Score" msgstr "Pong" #: src/ScoreWindow.cc:148 msgid " Seq: " msgstr " Sekv: " #: src/ScoreWindow.cc:151 src/StatisticsWindow.cc:90 #: src/StatisticsWindow.cc:389 src/StatisticsWindow.cc:508 msgid "Game" msgstr "Spel" #: src/ScoreWindow.cc:154 src/OptionsWindow.cc:79 msgid "Time" msgstr "Tid" #: src/StartTournamentWindow.cc:78 msgid "Start New Tournament" msgstr "Starta ny turnering" #: src/StartTournamentWindow.cc:124 msgid "Robots in Tournament" msgstr "Robotar i turnering" #: src/StartTournamentWindow.cc:125 msgid "Robots in Directory" msgstr "Robotar i bibliotek" #: src/StartTournamentWindow.cc:134 msgid "Arenas in Tournament" msgstr "Arenor i bibliotek" #: src/StartTournamentWindow.cc:135 msgid "Arenas in Directory" msgstr "Arenor i bibliotek" #: src/StartTournamentWindow.cc:153 msgid " Remove " msgstr " Ta bort " #: src/StartTournamentWindow.cc:153 src/StartTournamentWindow.cc:155 msgid " Select All " msgstr " Vlj alla " #: src/StartTournamentWindow.cc:154 src/StartTournamentWindow.cc:155 msgid " Unselect All " msgstr " Vlj ingen " #: src/StartTournamentWindow.cc:154 msgid " Add " msgstr " Lgg till " #: src/StartTournamentWindow.cc:251 msgid "Games per sequence" msgstr "Spel per sekvens" #: src/StartTournamentWindow.cc:251 msgid "Robots per sequence" msgstr "Robotar per sekvens" #: src/StartTournamentWindow.cc:252 msgid "Number of sequences" msgstr "Antal sekvenser" #: src/StartTournamentWindow.cc:309 src/OptionsWindow.cc:137 #: src/OptionsWindow.cc:182 msgid " Min " msgstr " Min " #: src/StartTournamentWindow.cc:321 msgid " All Arenas " msgstr " Alla arenor " #: src/StartTournamentWindow.cc:333 msgid " Full Round " msgstr " Full omgng " #: src/StartTournamentWindow.cc:343 src/OptionsWindow.cc:141 #: src/OptionsWindow.cc:186 msgid " Max " msgstr " Max " #: src/StartTournamentWindow.cc:371 msgid " Load tournament " msgstr " Hmta turnering " #: src/StartTournamentWindow.cc:371 msgid " Save tournament " msgstr " Spara turnering " #: src/StartTournamentWindow.cc:393 msgid " Start " msgstr " Brja " #: src/StartTournamentWindow.cc:393 src/OptionsWindow.cc:268 msgid " Cancel " msgstr " ngra " #: src/StartTournamentWindow.cc:500 msgid "Choose a tournament file to load" msgstr "Vlj turneringsfil att hmta" #: src/StartTournamentWindow.cc:534 msgid "Choose file to save tournament into" msgstr "Vlj turneringsfil att spara till" #: src/StartTournamentWindow.cc:578 msgid "Error in specified tournament file." msgstr "Fel i den angivna turneringsfilen." #: src/StartTournamentWindow.cc:580 src/StartTournamentWindow.cc:740 #: src/StartTournamentWindow.cc:891 src/OptionsWindow.cc:266 msgid " Ok " msgstr " Ok " #: src/StartTournamentWindow.cc:581 msgid "Tournament could not be loaded." msgstr "Turneringen kunde inte hmtas." #: src/StartTournamentWindow.cc:730 msgid "There are too few robots in the tournament." msgstr "Fr f robotar i turneringen." #: src/StartTournamentWindow.cc:732 src/StartTournamentWindow.cc:886 msgid "There are no arenas in the tournament." msgstr "Ingen arena har valts." #: src/StartTournamentWindow.cc:735 msgid "Could not open file." msgstr "Kunde inte ppna fil." #: src/StartTournamentWindow.cc:741 msgid "Tournament could not be saved." msgstr "Turneringen kunde inte sparas." #: src/StartTournamentWindow.cc:884 msgid "There must be at least two robots in the tournament." msgstr "Det mste vara minst tv robtar i en turnering." #: src/StartTournamentWindow.cc:892 msgid "Tournament could not be started." msgstr "Turneringen kunde inte startas." #: src/StatisticsWindow.cc:49 msgid "Statistics" msgstr "Statistik" #: src/StatisticsWindow.cc:82 msgid " Close " msgstr " Stng " #: src/StatisticsWindow.cc:84 msgid " Save Statistics " msgstr " Spara statistik " #: src/StatisticsWindow.cc:86 msgid " Total " msgstr " Totalt " #: src/StatisticsWindow.cc:88 msgid " Sequence Total " msgstr " Totalt i sekvens " #: src/StatisticsWindow.cc:225 msgid "Position" msgstr "Placering" #: src/StatisticsWindow.cc:225 msgid "Points" msgstr "Pong" #: src/StatisticsWindow.cc:226 msgid "Games" msgstr "Spel" #: src/StatisticsWindow.cc:226 msgid "Survival Time" msgstr "Tid i livet" #: src/StatisticsWindow.cc:226 msgid "Total Points" msgstr "Summa pong" #: src/StatisticsWindow.cc:310 msgid "Choose a statistics file to save" msgstr "Vlj fil att spara statistik till" #: src/StatisticsWindow.cc:388 msgid "Seq" msgstr "Sekv" #: src/StatisticsWindow.cc:485 msgid " Grand Total " msgstr " Sammanlagd stllning " #: src/StatisticsWindow.cc:491 msgid " Sequence " msgstr " Sekvens " #: src/StatisticsWindow.cc:507 msgid " Sequence: " msgstr " Sekvens: " #: src/Various.cc:96 msgid "Error in" msgstr "Fel i" #: src/OptionsWindow.cc:52 msgid "Options" msgstr "Instllningar" #: src/OptionsWindow.cc:78 msgid "Environment" msgstr "Omgivning" #: src/OptionsWindow.cc:78 msgid "Robot" msgstr "Robot" #: src/OptionsWindow.cc:78 msgid "Shot" msgstr "Skott" #: src/OptionsWindow.cc:79 msgid "Extras" msgstr "Extra" #: src/OptionsWindow.cc:79 msgid "Window sizes" msgstr "Fnster" #: src/OptionsWindow.cc:80 msgid "Misc" msgstr "vrigt" #: src/OptionsWindow.cc:139 src/OptionsWindow.cc:184 src/OptionsWindow.cc:211 msgid " Def " msgstr " Std " #: src/OptionsWindow.cc:236 msgid " Grab sizes and positions from present windows " msgstr " Anvnd nuvarande fnsterstorlekar och -positioner " #: src/OptionsWindow.cc:256 msgid " Default " msgstr " terstll " #: src/OptionsWindow.cc:258 msgid " Load options " msgstr " Hmta instllningar " #: src/OptionsWindow.cc:260 msgid " Save options " msgstr " Spara instllningar " #: src/OptionsWindow.cc:262 msgid " Save as default " msgstr " Spara som standard " #: src/OptionsWindow.cc:264 msgid " Apply " msgstr " Verkstll " #: src/OptionsWindow.cc:457 msgid "Choose an options file to load" msgstr "Vlj installnings-fil att hmta" #: src/OptionsWindow.cc:481 msgid "Choose an options file to save" msgstr "Vlj installnings-fil att spara" #, fuzzy #~ msgid "Ok" #~ msgstr " Ok " #~ msgid "Brakes locked: Robot found and at distance" #~ msgstr "Full broms: Robot siktad p anvstndet" #~ msgid "Acceleration" #~ msgstr "Acceleration" #~ msgid "Brake" #~ msgstr "Broms" #~ msgid "Modular angle, Angle" #~ msgstr "Vinkel modulo 2 pi, vinkel" #~ msgid "Cookie found at" #~ msgstr "Kaka funnen p" #~ msgid "I am at" #~ msgstr "Jag r p" #~ msgid "at angle" #~ msgstr "vid vinkeln" #~ msgid "Mine found at" #~ msgstr "Mina funnen p" #~ msgid "New rotation" #~ msgstr "Ny rotation" #~ msgid "New acceleration" #~ msgstr "Ny acceleration" #~ msgid "Hit too many times! Flee!" #~ msgstr "Trffad fr mnga gnger! Fly!" #~ msgid "Cookie eaten!" #~ msgstr "Kaka uppten" #~ msgid "Oh no! A mine" #~ msgstr "Oh nej! En mina" #~ msgid "Unknown message: " #~ msgstr "Oknt meddelande: " #~ msgid "Process time low: " #~ msgstr "Processtid lg: " #~ msgid "Message sent in illegal state: " #~ msgstr "Meddelande skickat i fel lge: " #~ msgid "Unknown option: " #~ msgstr "Oknt alternativ: " #~ msgid "Obsolete Keyword: " #~ msgstr "Frldrat kommando: " #~ msgid "Shutting down and leaving" #~ msgstr "Avslutar" #~ msgid "New" #~ msgstr "Ny" #~ msgid "Unknown Object seen!" #~ msgstr "Oknt objekt siktat!" #~ msgid "Collided with Unknown Object!" #~ msgstr "Kolliderade med oknt object!" realtimebattle-1.0.8/po/en@quot.po0000644000175000017500000005342710323175164015256 0ustar moimoi# English translations for RealTimeBattle package. # Copyright (C) 2005 The RealTime Battle translators, see AUTHORS for detail # This file is distributed under the same license as the RealTimeBattle package. # Automatically generated, 2005. # # All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # msgid "" msgstr "" "Project-Id-Version: RealTimeBattle\n" "Report-Msgid-Bugs-To: jonico@users.sourceforge.net\n" "POT-Creation-Date: 2005-10-08 16:22+0200\n" "PO-Revision-Date: 2005-10-08 16:22+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/RealTimeBattle.cc:102 msgid " Usage: RealTimeBattle [options] " msgstr " Usage: RealTimeBattle [options] " #: src/RealTimeBattle.cc:103 msgid " Options:" msgstr " Options:" #: src/RealTimeBattle.cc:104 msgid " --debug_mode, -d debug mode" msgstr " --debug_mode, -d debug mode" #: src/RealTimeBattle.cc:105 msgid "" " --debug_level [0-5], -D sets the initial debug level. Implies -" "d" msgstr "" " --debug_level [0-5], -D sets the initial debug level. Implies -" "d" #: src/RealTimeBattle.cc:106 msgid " --normal_mode, -n normal mode (default)" msgstr " --normal_mode, -n normal mode (default)" #: src/RealTimeBattle.cc:107 msgid " --competition_mode, -c competition mode" msgstr " --competition_mode, -c competition mode" #: src/RealTimeBattle.cc:109 msgid " --no_graphics, -g no graphics will be displayed" msgstr " --no_graphics, -g no graphics will be displayed" #: src/RealTimeBattle.cc:110 msgid "" " --option_file [file], -o selects option-file (default: $HOME/." "rtbrc)" msgstr "" " --option_file [file], -o selects option-file (default: $HOME/." "rtbrc)" #: src/RealTimeBattle.cc:112 msgid "" " --log_file [file], -l make log file, if 'file' is '-'\n" " the log is sent to STDOUT" msgstr "" " --log_file [file], -l make log file, if ‘file’ is ‘-’\n" " the log is sent to STDOUT" #: src/RealTimeBattle.cc:115 msgid "" " --tournament_file [file], -t specify a tournament file to\n" " autostart a tournament" msgstr "" " --tournament_file [file], -t specify a tournament file to\n" " autostart a tournament" #: src/RealTimeBattle.cc:118 msgid "" " --statistics_file [file], -s file to print the statistics to\n" " when autostarting" msgstr "" " --statistics_file [file], -s file to print the statistics to\n" " when autostarting" #: src/RealTimeBattle.cc:121 msgid "" " --message_file [file], -m redirect messages to 'file'.\n" " With '-' as 'file', STDOUT is used.\n" " If both log and messages are sent\n" " to STDOUT, '-m' will be ignored" msgstr "" " --message_file [file], -m redirect messages to 'file'.\n" " With ‘-’ as 'file', STDOUT is used.\n" " If both log and messages are sent\n" " to STDOUT, ‘-m’ will be ignored" #: src/RealTimeBattle.cc:126 msgid "" " --replay [file] -r a log file to replay.\n" " if '-' is specified as file,\n" " input is taken from STDIN" msgstr "" " --replay [file] -r a log file to replay.\n" " if ‘-’ is specified as file,\n" " input is taken from STDIN" #: src/RealTimeBattle.cc:130 msgid " --help, -h prints this message" msgstr " --help, -h prints this message" #: src/RealTimeBattle.cc:131 msgid " --version, -v prints the version number" msgstr " --version, -v prints the version number" #: src/RealTimeBattle.cc:133 msgid "" " --port_number -p specifies the port to listen on " "(default 32134)" msgstr "" " --port_number -p specifies the port to listen on " "(default 32134)" #: src/ArenaBase.cc:123 msgid "*Starting robots*" msgstr "*Starting robots*" #: src/ArenaBase.cc:126 msgid "*Shutting down robots*" msgstr "*Shutting down robots*" #: src/ArenaBase.cc:130 msgid "*Running*" msgstr "*Running*" #: src/ArenaBase.cc:132 msgid "*Pausing after game*" msgstr "*Pausing after game*" #: src/ArenaBase.cc:136 msgid "*Paused*" msgstr "*Paused*" #: src/ArenaBase.cc:139 msgid "*Exiting*" msgstr "*Exiting*" #: src/ArenaBase.cc:142 msgid "*Finished*" msgstr "*Finished*" #: src/ArenaRealTime.cc:849 #, c-format msgid "Game %d of sequence %d begins on arena" msgstr "Game %d of sequence %d begins on arena" #: src/ArenaRealTime.cc:1037 #, c-format msgid "Robot with filename %s has not given any name" msgstr "Robot with filename %s has not given any name" #: src/ArenaReplay.cc:131 #, c-format msgid "Game %d of sequence %d" msgstr "Game %d of sequence %d" #: src/ArenaWindow.cc:77 msgid " No Zoom " msgstr " No Zoom " #: src/ArenaWindow.cc:79 msgid " Zoom In " msgstr " Zoom In " #: src/ArenaWindow.cc:81 msgid " Zoom Out " msgstr " Zoom Out " #: src/ArenaWindow.cc:149 msgid "Arena" msgstr "Arena" #: src/ControlWindow.cc:81 msgid " New Tournament " msgstr " New Tournament " #: src/ControlWindow.cc:83 msgid " Replay Tournament " msgstr " Replay Tournament " #: src/ControlWindow.cc:85 msgid " Pause " msgstr " Pause " #: src/ControlWindow.cc:87 msgid " End " msgstr " End " #: src/ControlWindow.cc:89 msgid " Options " msgstr " Options " #: src/ControlWindow.cc:91 msgid " Statistics " msgstr " Statistics " #: src/ControlWindow.cc:93 msgid " Quit " msgstr " Quit " #: src/ControlWindow.cc:119 msgid "Show arena window" msgstr "Show arena window" #: src/ControlWindow.cc:121 msgid "Show message window" msgstr "Show message window" #: src/ControlWindow.cc:123 msgid "Show score window" msgstr "Show score window" #: src/ControlWindow.cc:202 msgid " Step " msgstr " Step " #: src/ControlWindow.cc:204 msgid " End Game " msgstr " End Game " #: src/ControlWindow.cc:206 msgid " Kill Marked Robot " msgstr " Kill Marked Robot " #: src/ControlWindow.cc:234 msgid " Debug Level: " msgstr " Debug Level: " #: src/ControlWindow.cc:335 msgid " Step forward " msgstr " Step forward " #: src/ControlWindow.cc:339 msgid " Step backward " msgstr " Step backward " #: src/ControlWindow.cc:343 msgid " Next Game " msgstr " Next Game " #: src/ControlWindow.cc:347 msgid " Prev Game " msgstr " Prev Game " #: src/ControlWindow.cc:351 msgid " Next Seq " msgstr " Next Seq " #: src/ControlWindow.cc:355 msgid " Prev Seq " msgstr " Prev Seq " #: src/ControlWindow.cc:514 src/ControlWindow.cc:674 src/Gui.cc:154 msgid "" "This action will kill the current tournament.\n" "Do you want to do that?" msgstr "" "This action will kill the current tournament.\n" "Do you want to do that?" #: src/ControlWindow.cc:517 src/ControlWindow.cc:677 msgid "Yes" msgstr "Yes" #: src/ControlWindow.cc:518 src/ControlWindow.cc:678 msgid "No" msgstr "No" #: src/ControlWindow.cc:531 msgid "Choose a log file to replay" msgstr "Choose a log file to replay" #: src/MessageWindow.cc:78 msgid " Clear all messages " msgstr " Clear all messages " #: src/MessageWindow.cc:80 msgid " Show only marked robot " msgstr " Show only marked robot " #: src/MessageWindow.cc:82 msgid " Show all " msgstr " Show all " #: src/MessageWindow.cc:108 src/StatisticsWindow.cc:93 msgid " Robot " msgstr " Robot " #: src/MessageWindow.cc:108 msgid " Message " msgstr " Message " #: src/MessageWindow.cc:172 msgid "Messages" msgstr "Messages" #: src/MessageWindow.cc:176 msgid " All " msgstr " All " #: src/Options.cc:77 msgid "Gravitational Constant" msgstr "Gravitational Constant" #: src/Options.cc:81 msgid "Air resistance" msgstr "Air resistance" #: src/Options.cc:85 msgid "Roll friction" msgstr "Roll friction" #: src/Options.cc:90 msgid "Slide/brake friction" msgstr "Slide/brake friction" #: src/Options.cc:95 msgid "Send robot coordinates" msgstr "Send robot coordinates" #: src/Options.cc:100 msgid "Robot max acceleration" msgstr "Robot max acceleration" #: src/Options.cc:105 msgid "Robot min acceleration" msgstr "Robot min acceleration" #: src/Options.cc:109 msgid "Robot radius" msgstr "Robot radius" #: src/Options.cc:113 msgid "Robot mass" msgstr "Robot mass" #: src/Options.cc:118 msgid "Robot bounce coefficient" msgstr "Robot bounce coefficient" #: src/Options.cc:123 msgid "Robot hardness coefficient" msgstr "Robot hardness coefficient" #: src/Options.cc:128 msgid "Robot protection coefficient" msgstr "Robot protection coefficient" #: src/Options.cc:133 msgid "Robot frontsize [radians]" msgstr "Robot frontsize [radians]" #: src/Options.cc:138 msgid "Robot front bounce coefficient" msgstr "Robot front bounce coefficient" #: src/Options.cc:143 msgid "Robot front hardness coefficient" msgstr "Robot front hardness coefficient" #: src/Options.cc:148 msgid "Robot front protection coefficient" msgstr "Robot front protection coefficient" #: src/Options.cc:153 msgid "Robot start energy" msgstr "Robot start energy" #: src/Options.cc:158 msgid "Robot max energy" msgstr "Robot max energy" #: src/Options.cc:164 msgid "Robot max rotate speed [rad/s]" msgstr "Robot max rotate speed [rad/s]" #: src/Options.cc:170 msgid "Robot cannon max rotate speed [rad/s]" msgstr "Robot cannon max rotate speed [rad/s]" #: src/Options.cc:176 msgid "Robot radar max rotate speed [rad/s]" msgstr "Robot radar max rotate speed [rad/s]" #: src/Options.cc:181 msgid "Process check interval" msgstr "Process check interval" #: src/Options.cc:185 msgid "Robot energy levels" msgstr "Robot energy levels" #: src/Options.cc:189 msgid "Shot radius" msgstr "Shot radius" #: src/Options.cc:193 msgid "Shot speed" msgstr "Shot speed" #: src/Options.cc:198 msgid "Shooting penalty (times shot energy)" msgstr "Shooting penalty (times shot energy)" #: src/Options.cc:202 msgid "Shot min energy" msgstr "Shot min energy" #: src/Options.cc:206 msgid "Shot max energy" msgstr "Shot max energy" #: src/Options.cc:211 msgid "Shot energy increase speed [energy/s]" msgstr "Shot energy increase speed [energy/s]" #: src/Options.cc:215 msgid "Background colour" msgstr "Background colour" #: src/Options.cc:219 msgid "Foreground colour" msgstr "Foreground colour" #: src/Options.cc:224 msgid "Colour for RTB messages" msgstr "Colour for RTB messages" #: src/Options.cc:228 msgid "Cookie max energy" msgstr "Cookie max energy" #: src/Options.cc:232 msgid "Cookie min energy" msgstr "Cookie min energy" #: src/Options.cc:237 msgid "Cookie frequency [cookies per second]" msgstr "Cookie frequency [cookies per second]" #: src/Options.cc:241 msgid "Cookie radius" msgstr "Cookie radius" #: src/Options.cc:245 msgid "Cookie colour" msgstr "Cookie colour" #: src/Options.cc:249 msgid "Mine max energy" msgstr "Mine max energy" #: src/Options.cc:253 msgid "Mine min energy" msgstr "Mine min energy" #: src/Options.cc:258 msgid "Mine frequency [mines per second]" msgstr "Mine frequency [mines per second]" #: src/Options.cc:262 msgid "Mine radius" msgstr "Mine radius" #: src/Options.cc:266 msgid "Mine colour" msgstr "Mine colour" #: src/Options.cc:270 msgid "Arena scale" msgstr "Arena scale" #: src/Options.cc:275 msgid "Fast forward factor" msgstr "Fast forward factor" #: src/Options.cc:279 msgid "Timeout [s]" msgstr "Timeout [s]" #: src/Options.cc:283 msgid "Max timestep" msgstr "Max timestep" #: src/Options.cc:287 msgid "Timescale" msgstr "Timescale" #: src/Options.cc:292 msgid "Update interval [s]" msgstr "Update interval [s]" #: src/Options.cc:297 msgid "Robot startup time [s]" msgstr "Robot startup time [s]" #: src/Options.cc:301 msgid "Start CPU time [s]" msgstr "Start CPU time [s]" #: src/Options.cc:305 msgid "Extra CPU time [s]" msgstr "Extra CPU time [s]" #: src/Options.cc:310 msgid "Extra CPU period [s]" msgstr "Extra CPU period [s]" #: src/Options.cc:315 msgid "CPU time warning percentage" msgstr "CPU time warning percentage" #: src/Options.cc:320 msgid "Logging frequency [Each n:th update interval]" msgstr "Logging frequency [Each n:th update interval]" #: src/Options.cc:325 msgid "Max robots allowed simultaneously" msgstr "Max robots allowed simultaneously" #: src/Options.cc:329 msgid "Robot search path" msgstr "Robot search path" #: src/Options.cc:333 msgid "Arena search path" msgstr "Arena search path" #: src/Options.cc:344 msgid "Directory for temporary files" msgstr "Directory for temporary files" #: src/Options.cc:349 msgid "Initial Arena window width" msgstr "Initial Arena window width" #: src/Options.cc:354 msgid "Initial Arena window height" msgstr "Initial Arena window height" #: src/Options.cc:359 msgid "Initial Arena window x position" msgstr "Initial Arena window x position" #: src/Options.cc:364 msgid "Initial Arena window y position" msgstr "Initial Arena window y position" #: src/Options.cc:369 msgid "Initial Control window x position" msgstr "Initial Control window x position" #: src/Options.cc:374 msgid "Initial Control window y position" msgstr "Initial Control window y position" #: src/Options.cc:379 msgid "Initial Message window width" msgstr "Initial Message window width" #: src/Options.cc:384 msgid "Initial Message window height" msgstr "Initial Message window height" #: src/Options.cc:389 msgid "Initial Message window x position" msgstr "Initial Message window x position" #: src/Options.cc:394 msgid "Initial Message window y position" msgstr "Initial Message window y position" #: src/Options.cc:399 msgid "Initial Score window width" msgstr "Initial Score window width" #: src/Options.cc:404 msgid "Initial Score window height" msgstr "Initial Score window height" #: src/Options.cc:409 msgid "Initial Score window x position" msgstr "Initial Score window x position" #: src/Options.cc:414 msgid "Initial Score window y position" msgstr "Initial Score window y position" #: src/Options.cc:419 msgid "Initial Statistics window width" msgstr "Initial Statistics window width" #: src/Options.cc:424 msgid "Initial Statistics window height" msgstr "Initial Statistics window height" #: src/ScoreWindow.cc:72 src/StatisticsWindow.cc:225 #: src/StatisticsWindow.cc:372 msgid "Name" msgstr "Name" #: src/ScoreWindow.cc:72 msgid "Energy" msgstr "Energy" #: src/ScoreWindow.cc:72 msgid "Place" msgstr "Place" #: src/ScoreWindow.cc:73 msgid "Last" msgstr "Last" #: src/ScoreWindow.cc:73 src/ScoreWindow.cc:147 msgid "Score" msgstr "Score" #: src/ScoreWindow.cc:148 msgid " Seq: " msgstr " Seq: " #: src/ScoreWindow.cc:151 src/StatisticsWindow.cc:90 #: src/StatisticsWindow.cc:389 src/StatisticsWindow.cc:508 msgid "Game" msgstr "Game" #: src/ScoreWindow.cc:154 src/OptionsWindow.cc:79 msgid "Time" msgstr "Time" #: src/StartTournamentWindow.cc:78 msgid "Start New Tournament" msgstr "Start New Tournament" #: src/StartTournamentWindow.cc:124 msgid "Robots in Tournament" msgstr "Robots in Tournament" #: src/StartTournamentWindow.cc:125 msgid "Robots in Directory" msgstr "Robots in Directory" #: src/StartTournamentWindow.cc:134 msgid "Arenas in Tournament" msgstr "Arenas in Tournament" #: src/StartTournamentWindow.cc:135 msgid "Arenas in Directory" msgstr "Arenas in Directory" #: src/StartTournamentWindow.cc:153 msgid " Remove " msgstr " Remove " #: src/StartTournamentWindow.cc:153 src/StartTournamentWindow.cc:155 msgid " Select All " msgstr " Select All " #: src/StartTournamentWindow.cc:154 src/StartTournamentWindow.cc:155 msgid " Unselect All " msgstr " Unselect All " #: src/StartTournamentWindow.cc:154 msgid " Add " msgstr " Add " #: src/StartTournamentWindow.cc:251 msgid "Games per sequence" msgstr "Games per sequence" #: src/StartTournamentWindow.cc:251 msgid "Robots per sequence" msgstr "Robots per sequence" #: src/StartTournamentWindow.cc:252 msgid "Number of sequences" msgstr "Number of sequences" #: src/StartTournamentWindow.cc:309 src/OptionsWindow.cc:137 #: src/OptionsWindow.cc:182 msgid " Min " msgstr " Min " #: src/StartTournamentWindow.cc:321 msgid " All Arenas " msgstr " All Arenas " #: src/StartTournamentWindow.cc:333 msgid " Full Round " msgstr " Full Round " #: src/StartTournamentWindow.cc:343 src/OptionsWindow.cc:141 #: src/OptionsWindow.cc:186 msgid " Max " msgstr " Max " #: src/StartTournamentWindow.cc:371 msgid " Load tournament " msgstr " Load tournament " #: src/StartTournamentWindow.cc:371 msgid " Save tournament " msgstr " Save tournament " #: src/StartTournamentWindow.cc:393 msgid " Start " msgstr " Start " #: src/StartTournamentWindow.cc:393 src/OptionsWindow.cc:268 msgid " Cancel " msgstr " Cancel " #: src/StartTournamentWindow.cc:500 msgid "Choose a tournament file to load" msgstr "Choose a tournament file to load" #: src/StartTournamentWindow.cc:534 msgid "Choose file to save tournament into" msgstr "Choose file to save tournament into" #: src/StartTournamentWindow.cc:578 msgid "Error in specified tournament file." msgstr "Error in specified tournament file." #: src/StartTournamentWindow.cc:580 src/StartTournamentWindow.cc:740 #: src/StartTournamentWindow.cc:891 src/OptionsWindow.cc:266 msgid " Ok " msgstr " Ok " #: src/StartTournamentWindow.cc:581 msgid "Tournament could not be loaded." msgstr "Tournament could not be loaded." #: src/StartTournamentWindow.cc:730 msgid "There are too few robots in the tournament." msgstr "There are too few robots in the tournament." #: src/StartTournamentWindow.cc:732 src/StartTournamentWindow.cc:886 msgid "There are no arenas in the tournament." msgstr "There are no arenas in the tournament." #: src/StartTournamentWindow.cc:735 msgid "Could not open file." msgstr "Could not open file." #: src/StartTournamentWindow.cc:741 msgid "Tournament could not be saved." msgstr "Tournament could not be saved." #: src/StartTournamentWindow.cc:884 msgid "There must be at least two robots in the tournament." msgstr "There must be at least two robots in the tournament." #: src/StartTournamentWindow.cc:892 msgid "Tournament could not be started." msgstr "Tournament could not be started." #: src/StatisticsWindow.cc:49 msgid "Statistics" msgstr "Statistics" #: src/StatisticsWindow.cc:82 msgid " Close " msgstr " Close " #: src/StatisticsWindow.cc:84 msgid " Save Statistics " msgstr " Save Statistics " #: src/StatisticsWindow.cc:86 msgid " Total " msgstr " Total " #: src/StatisticsWindow.cc:88 msgid " Sequence Total " msgstr " Sequence Total " #: src/StatisticsWindow.cc:225 msgid "Position" msgstr "Position" #: src/StatisticsWindow.cc:225 msgid "Points" msgstr "Points" #: src/StatisticsWindow.cc:226 msgid "Games" msgstr "Games" #: src/StatisticsWindow.cc:226 msgid "Survival Time" msgstr "Survival Time" #: src/StatisticsWindow.cc:226 msgid "Total Points" msgstr "Total Points" #: src/StatisticsWindow.cc:310 msgid "Choose a statistics file to save" msgstr "Choose a statistics file to save" #: src/StatisticsWindow.cc:388 msgid "Seq" msgstr "Seq" #: src/StatisticsWindow.cc:485 msgid " Grand Total " msgstr " Grand Total " #: src/StatisticsWindow.cc:491 msgid " Sequence " msgstr " Sequence " #: src/StatisticsWindow.cc:507 msgid " Sequence: " msgstr " Sequence: " #: src/Various.cc:96 msgid "Error in" msgstr "Error in" #: src/OptionsWindow.cc:52 msgid "Options" msgstr "Options" #: src/OptionsWindow.cc:78 msgid "Environment" msgstr "Environment" #: src/OptionsWindow.cc:78 msgid "Robot" msgstr "Robot" #: src/OptionsWindow.cc:78 msgid "Shot" msgstr "Shot" #: src/OptionsWindow.cc:79 msgid "Extras" msgstr "Extras" #: src/OptionsWindow.cc:79 msgid "Window sizes" msgstr "Window sizes" #: src/OptionsWindow.cc:80 msgid "Misc" msgstr "Misc" #: src/OptionsWindow.cc:139 src/OptionsWindow.cc:184 src/OptionsWindow.cc:211 msgid " Def " msgstr " Def " #: src/OptionsWindow.cc:236 msgid " Grab sizes and positions from present windows " msgstr " Grab sizes and positions from present windows " #: src/OptionsWindow.cc:256 msgid " Default " msgstr " Default " #: src/OptionsWindow.cc:258 msgid " Load options " msgstr " Load options " #: src/OptionsWindow.cc:260 msgid " Save options " msgstr " Save options " #: src/OptionsWindow.cc:262 msgid " Save as default " msgstr " Save as default " #: src/OptionsWindow.cc:264 msgid " Apply " msgstr " Apply " #: src/OptionsWindow.cc:457 msgid "Choose an options file to load" msgstr "Choose an options file to load" #: src/OptionsWindow.cc:481 msgid "Choose an options file to save" msgstr "Choose an options file to save" realtimebattle-1.0.8/po/en@boldquot.po0000644000175000017500000005371310323175165016116 0ustar moimoi# English translations for RealTimeBattle package. # Copyright (C) 2005 The RealTime Battle translators, see AUTHORS for detail # This file is distributed under the same license as the RealTimeBattle package. # Automatically generated, 2005. # # All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # msgid "" msgstr "" "Project-Id-Version: RealTimeBattle\n" "Report-Msgid-Bugs-To: jonico@users.sourceforge.net\n" "POT-Creation-Date: 2005-10-08 16:22+0200\n" "PO-Revision-Date: 2005-10-08 16:22+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/RealTimeBattle.cc:102 msgid " Usage: RealTimeBattle [options] " msgstr " Usage: RealTimeBattle [options] " #: src/RealTimeBattle.cc:103 msgid " Options:" msgstr " Options:" #: src/RealTimeBattle.cc:104 msgid " --debug_mode, -d debug mode" msgstr " --debug_mode, -d debug mode" #: src/RealTimeBattle.cc:105 msgid "" " --debug_level [0-5], -D sets the initial debug level. Implies -" "d" msgstr "" " --debug_level [0-5], -D sets the initial debug level. Implies -" "d" #: src/RealTimeBattle.cc:106 msgid " --normal_mode, -n normal mode (default)" msgstr " --normal_mode, -n normal mode (default)" #: src/RealTimeBattle.cc:107 msgid " --competition_mode, -c competition mode" msgstr " --competition_mode, -c competition mode" #: src/RealTimeBattle.cc:109 msgid " --no_graphics, -g no graphics will be displayed" msgstr " --no_graphics, -g no graphics will be displayed" #: src/RealTimeBattle.cc:110 msgid "" " --option_file [file], -o selects option-file (default: $HOME/." "rtbrc)" msgstr "" " --option_file [file], -o selects option-file (default: $HOME/." "rtbrc)" #: src/RealTimeBattle.cc:112 msgid "" " --log_file [file], -l make log file, if 'file' is '-'\n" " the log is sent to STDOUT" msgstr "" " --log_file [file], -l make log file, if ‘file’ is ‘-" "[0m’\n" " the log is sent to STDOUT" #: src/RealTimeBattle.cc:115 msgid "" " --tournament_file [file], -t specify a tournament file to\n" " autostart a tournament" msgstr "" " --tournament_file [file], -t specify a tournament file to\n" " autostart a tournament" #: src/RealTimeBattle.cc:118 msgid "" " --statistics_file [file], -s file to print the statistics to\n" " when autostarting" msgstr "" " --statistics_file [file], -s file to print the statistics to\n" " when autostarting" #: src/RealTimeBattle.cc:121 msgid "" " --message_file [file], -m redirect messages to 'file'.\n" " With '-' as 'file', STDOUT is used.\n" " If both log and messages are sent\n" " to STDOUT, '-m' will be ignored" msgstr "" " --message_file [file], -m redirect messages to 'file'.\n" " With ‘-’ as 'file', STDOUT is " "used.\n" " If both log and messages are sent\n" " to STDOUT, ‘-m’ will be ignored" #: src/RealTimeBattle.cc:126 msgid "" " --replay [file] -r a log file to replay.\n" " if '-' is specified as file,\n" " input is taken from STDIN" msgstr "" " --replay [file] -r a log file to replay.\n" " if ‘-’ is specified as file,\n" " input is taken from STDIN" #: src/RealTimeBattle.cc:130 msgid " --help, -h prints this message" msgstr " --help, -h prints this message" #: src/RealTimeBattle.cc:131 msgid " --version, -v prints the version number" msgstr " --version, -v prints the version number" #: src/RealTimeBattle.cc:133 msgid "" " --port_number -p specifies the port to listen on " "(default 32134)" msgstr "" " --port_number -p specifies the port to listen on " "(default 32134)" #: src/ArenaBase.cc:123 msgid "*Starting robots*" msgstr "*Starting robots*" #: src/ArenaBase.cc:126 msgid "*Shutting down robots*" msgstr "*Shutting down robots*" #: src/ArenaBase.cc:130 msgid "*Running*" msgstr "*Running*" #: src/ArenaBase.cc:132 msgid "*Pausing after game*" msgstr "*Pausing after game*" #: src/ArenaBase.cc:136 msgid "*Paused*" msgstr "*Paused*" #: src/ArenaBase.cc:139 msgid "*Exiting*" msgstr "*Exiting*" #: src/ArenaBase.cc:142 msgid "*Finished*" msgstr "*Finished*" #: src/ArenaRealTime.cc:849 #, c-format msgid "Game %d of sequence %d begins on arena" msgstr "Game %d of sequence %d begins on arena" #: src/ArenaRealTime.cc:1037 #, c-format msgid "Robot with filename %s has not given any name" msgstr "Robot with filename %s has not given any name" #: src/ArenaReplay.cc:131 #, c-format msgid "Game %d of sequence %d" msgstr "Game %d of sequence %d" #: src/ArenaWindow.cc:77 msgid " No Zoom " msgstr " No Zoom " #: src/ArenaWindow.cc:79 msgid " Zoom In " msgstr " Zoom In " #: src/ArenaWindow.cc:81 msgid " Zoom Out " msgstr " Zoom Out " #: src/ArenaWindow.cc:149 msgid "Arena" msgstr "Arena" #: src/ControlWindow.cc:81 msgid " New Tournament " msgstr " New Tournament " #: src/ControlWindow.cc:83 msgid " Replay Tournament " msgstr " Replay Tournament " #: src/ControlWindow.cc:85 msgid " Pause " msgstr " Pause " #: src/ControlWindow.cc:87 msgid " End " msgstr " End " #: src/ControlWindow.cc:89 msgid " Options " msgstr " Options " #: src/ControlWindow.cc:91 msgid " Statistics " msgstr " Statistics " #: src/ControlWindow.cc:93 msgid " Quit " msgstr " Quit " #: src/ControlWindow.cc:119 msgid "Show arena window" msgstr "Show arena window" #: src/ControlWindow.cc:121 msgid "Show message window" msgstr "Show message window" #: src/ControlWindow.cc:123 msgid "Show score window" msgstr "Show score window" #: src/ControlWindow.cc:202 msgid " Step " msgstr " Step " #: src/ControlWindow.cc:204 msgid " End Game " msgstr " End Game " #: src/ControlWindow.cc:206 msgid " Kill Marked Robot " msgstr " Kill Marked Robot " #: src/ControlWindow.cc:234 msgid " Debug Level: " msgstr " Debug Level: " #: src/ControlWindow.cc:335 msgid " Step forward " msgstr " Step forward " #: src/ControlWindow.cc:339 msgid " Step backward " msgstr " Step backward " #: src/ControlWindow.cc:343 msgid " Next Game " msgstr " Next Game " #: src/ControlWindow.cc:347 msgid " Prev Game " msgstr " Prev Game " #: src/ControlWindow.cc:351 msgid " Next Seq " msgstr " Next Seq " #: src/ControlWindow.cc:355 msgid " Prev Seq " msgstr " Prev Seq " #: src/ControlWindow.cc:514 src/ControlWindow.cc:674 src/Gui.cc:154 msgid "" "This action will kill the current tournament.\n" "Do you want to do that?" msgstr "" "This action will kill the current tournament.\n" "Do you want to do that?" #: src/ControlWindow.cc:517 src/ControlWindow.cc:677 msgid "Yes" msgstr "Yes" #: src/ControlWindow.cc:518 src/ControlWindow.cc:678 msgid "No" msgstr "No" #: src/ControlWindow.cc:531 msgid "Choose a log file to replay" msgstr "Choose a log file to replay" #: src/MessageWindow.cc:78 msgid " Clear all messages " msgstr " Clear all messages " #: src/MessageWindow.cc:80 msgid " Show only marked robot " msgstr " Show only marked robot " #: src/MessageWindow.cc:82 msgid " Show all " msgstr " Show all " #: src/MessageWindow.cc:108 src/StatisticsWindow.cc:93 msgid " Robot " msgstr " Robot " #: src/MessageWindow.cc:108 msgid " Message " msgstr " Message " #: src/MessageWindow.cc:172 msgid "Messages" msgstr "Messages" #: src/MessageWindow.cc:176 msgid " All " msgstr " All " #: src/Options.cc:77 msgid "Gravitational Constant" msgstr "Gravitational Constant" #: src/Options.cc:81 msgid "Air resistance" msgstr "Air resistance" #: src/Options.cc:85 msgid "Roll friction" msgstr "Roll friction" #: src/Options.cc:90 msgid "Slide/brake friction" msgstr "Slide/brake friction" #: src/Options.cc:95 msgid "Send robot coordinates" msgstr "Send robot coordinates" #: src/Options.cc:100 msgid "Robot max acceleration" msgstr "Robot max acceleration" #: src/Options.cc:105 msgid "Robot min acceleration" msgstr "Robot min acceleration" #: src/Options.cc:109 msgid "Robot radius" msgstr "Robot radius" #: src/Options.cc:113 msgid "Robot mass" msgstr "Robot mass" #: src/Options.cc:118 msgid "Robot bounce coefficient" msgstr "Robot bounce coefficient" #: src/Options.cc:123 msgid "Robot hardness coefficient" msgstr "Robot hardness coefficient" #: src/Options.cc:128 msgid "Robot protection coefficient" msgstr "Robot protection coefficient" #: src/Options.cc:133 msgid "Robot frontsize [radians]" msgstr "Robot frontsize [radians]" #: src/Options.cc:138 msgid "Robot front bounce coefficient" msgstr "Robot front bounce coefficient" #: src/Options.cc:143 msgid "Robot front hardness coefficient" msgstr "Robot front hardness coefficient" #: src/Options.cc:148 msgid "Robot front protection coefficient" msgstr "Robot front protection coefficient" #: src/Options.cc:153 msgid "Robot start energy" msgstr "Robot start energy" #: src/Options.cc:158 msgid "Robot max energy" msgstr "Robot max energy" #: src/Options.cc:164 msgid "Robot max rotate speed [rad/s]" msgstr "Robot max rotate speed [rad/s]" #: src/Options.cc:170 msgid "Robot cannon max rotate speed [rad/s]" msgstr "Robot cannon max rotate speed [rad/s]" #: src/Options.cc:176 msgid "Robot radar max rotate speed [rad/s]" msgstr "Robot radar max rotate speed [rad/s]" #: src/Options.cc:181 msgid "Process check interval" msgstr "Process check interval" #: src/Options.cc:185 msgid "Robot energy levels" msgstr "Robot energy levels" #: src/Options.cc:189 msgid "Shot radius" msgstr "Shot radius" #: src/Options.cc:193 msgid "Shot speed" msgstr "Shot speed" #: src/Options.cc:198 msgid "Shooting penalty (times shot energy)" msgstr "Shooting penalty (times shot energy)" #: src/Options.cc:202 msgid "Shot min energy" msgstr "Shot min energy" #: src/Options.cc:206 msgid "Shot max energy" msgstr "Shot max energy" #: src/Options.cc:211 msgid "Shot energy increase speed [energy/s]" msgstr "Shot energy increase speed [energy/s]" #: src/Options.cc:215 msgid "Background colour" msgstr "Background colour" #: src/Options.cc:219 msgid "Foreground colour" msgstr "Foreground colour" #: src/Options.cc:224 msgid "Colour for RTB messages" msgstr "Colour for RTB messages" #: src/Options.cc:228 msgid "Cookie max energy" msgstr "Cookie max energy" #: src/Options.cc:232 msgid "Cookie min energy" msgstr "Cookie min energy" #: src/Options.cc:237 msgid "Cookie frequency [cookies per second]" msgstr "Cookie frequency [cookies per second]" #: src/Options.cc:241 msgid "Cookie radius" msgstr "Cookie radius" #: src/Options.cc:245 msgid "Cookie colour" msgstr "Cookie colour" #: src/Options.cc:249 msgid "Mine max energy" msgstr "Mine max energy" #: src/Options.cc:253 msgid "Mine min energy" msgstr "Mine min energy" #: src/Options.cc:258 msgid "Mine frequency [mines per second]" msgstr "Mine frequency [mines per second]" #: src/Options.cc:262 msgid "Mine radius" msgstr "Mine radius" #: src/Options.cc:266 msgid "Mine colour" msgstr "Mine colour" #: src/Options.cc:270 msgid "Arena scale" msgstr "Arena scale" #: src/Options.cc:275 msgid "Fast forward factor" msgstr "Fast forward factor" #: src/Options.cc:279 msgid "Timeout [s]" msgstr "Timeout [s]" #: src/Options.cc:283 msgid "Max timestep" msgstr "Max timestep" #: src/Options.cc:287 msgid "Timescale" msgstr "Timescale" #: src/Options.cc:292 msgid "Update interval [s]" msgstr "Update interval [s]" #: src/Options.cc:297 msgid "Robot startup time [s]" msgstr "Robot startup time [s]" #: src/Options.cc:301 msgid "Start CPU time [s]" msgstr "Start CPU time [s]" #: src/Options.cc:305 msgid "Extra CPU time [s]" msgstr "Extra CPU time [s]" #: src/Options.cc:310 msgid "Extra CPU period [s]" msgstr "Extra CPU period [s]" #: src/Options.cc:315 msgid "CPU time warning percentage" msgstr "CPU time warning percentage" #: src/Options.cc:320 msgid "Logging frequency [Each n:th update interval]" msgstr "Logging frequency [Each n:th update interval]" #: src/Options.cc:325 msgid "Max robots allowed simultaneously" msgstr "Max robots allowed simultaneously" #: src/Options.cc:329 msgid "Robot search path" msgstr "Robot search path" #: src/Options.cc:333 msgid "Arena search path" msgstr "Arena search path" #: src/Options.cc:344 msgid "Directory for temporary files" msgstr "Directory for temporary files" #: src/Options.cc:349 msgid "Initial Arena window width" msgstr "Initial Arena window width" #: src/Options.cc:354 msgid "Initial Arena window height" msgstr "Initial Arena window height" #: src/Options.cc:359 msgid "Initial Arena window x position" msgstr "Initial Arena window x position" #: src/Options.cc:364 msgid "Initial Arena window y position" msgstr "Initial Arena window y position" #: src/Options.cc:369 msgid "Initial Control window x position" msgstr "Initial Control window x position" #: src/Options.cc:374 msgid "Initial Control window y position" msgstr "Initial Control window y position" #: src/Options.cc:379 msgid "Initial Message window width" msgstr "Initial Message window width" #: src/Options.cc:384 msgid "Initial Message window height" msgstr "Initial Message window height" #: src/Options.cc:389 msgid "Initial Message window x position" msgstr "Initial Message window x position" #: src/Options.cc:394 msgid "Initial Message window y position" msgstr "Initial Message window y position" #: src/Options.cc:399 msgid "Initial Score window width" msgstr "Initial Score window width" #: src/Options.cc:404 msgid "Initial Score window height" msgstr "Initial Score window height" #: src/Options.cc:409 msgid "Initial Score window x position" msgstr "Initial Score window x position" #: src/Options.cc:414 msgid "Initial Score window y position" msgstr "Initial Score window y position" #: src/Options.cc:419 msgid "Initial Statistics window width" msgstr "Initial Statistics window width" #: src/Options.cc:424 msgid "Initial Statistics window height" msgstr "Initial Statistics window height" #: src/ScoreWindow.cc:72 src/StatisticsWindow.cc:225 #: src/StatisticsWindow.cc:372 msgid "Name" msgstr "Name" #: src/ScoreWindow.cc:72 msgid "Energy" msgstr "Energy" #: src/ScoreWindow.cc:72 msgid "Place" msgstr "Place" #: src/ScoreWindow.cc:73 msgid "Last" msgstr "Last" #: src/ScoreWindow.cc:73 src/ScoreWindow.cc:147 msgid "Score" msgstr "Score" #: src/ScoreWindow.cc:148 msgid " Seq: " msgstr " Seq: " #: src/ScoreWindow.cc:151 src/StatisticsWindow.cc:90 #: src/StatisticsWindow.cc:389 src/StatisticsWindow.cc:508 msgid "Game" msgstr "Game" #: src/ScoreWindow.cc:154 src/OptionsWindow.cc:79 msgid "Time" msgstr "Time" #: src/StartTournamentWindow.cc:78 msgid "Start New Tournament" msgstr "Start New Tournament" #: src/StartTournamentWindow.cc:124 msgid "Robots in Tournament" msgstr "Robots in Tournament" #: src/StartTournamentWindow.cc:125 msgid "Robots in Directory" msgstr "Robots in Directory" #: src/StartTournamentWindow.cc:134 msgid "Arenas in Tournament" msgstr "Arenas in Tournament" #: src/StartTournamentWindow.cc:135 msgid "Arenas in Directory" msgstr "Arenas in Directory" #: src/StartTournamentWindow.cc:153 msgid " Remove " msgstr " Remove " #: src/StartTournamentWindow.cc:153 src/StartTournamentWindow.cc:155 msgid " Select All " msgstr " Select All " #: src/StartTournamentWindow.cc:154 src/StartTournamentWindow.cc:155 msgid " Unselect All " msgstr " Unselect All " #: src/StartTournamentWindow.cc:154 msgid " Add " msgstr " Add " #: src/StartTournamentWindow.cc:251 msgid "Games per sequence" msgstr "Games per sequence" #: src/StartTournamentWindow.cc:251 msgid "Robots per sequence" msgstr "Robots per sequence" #: src/StartTournamentWindow.cc:252 msgid "Number of sequences" msgstr "Number of sequences" #: src/StartTournamentWindow.cc:309 src/OptionsWindow.cc:137 #: src/OptionsWindow.cc:182 msgid " Min " msgstr " Min " #: src/StartTournamentWindow.cc:321 msgid " All Arenas " msgstr " All Arenas " #: src/StartTournamentWindow.cc:333 msgid " Full Round " msgstr " Full Round " #: src/StartTournamentWindow.cc:343 src/OptionsWindow.cc:141 #: src/OptionsWindow.cc:186 msgid " Max " msgstr " Max " #: src/StartTournamentWindow.cc:371 msgid " Load tournament " msgstr " Load tournament " #: src/StartTournamentWindow.cc:371 msgid " Save tournament " msgstr " Save tournament " #: src/StartTournamentWindow.cc:393 msgid " Start " msgstr " Start " #: src/StartTournamentWindow.cc:393 src/OptionsWindow.cc:268 msgid " Cancel " msgstr " Cancel " #: src/StartTournamentWindow.cc:500 msgid "Choose a tournament file to load" msgstr "Choose a tournament file to load" #: src/StartTournamentWindow.cc:534 msgid "Choose file to save tournament into" msgstr "Choose file to save tournament into" #: src/StartTournamentWindow.cc:578 msgid "Error in specified tournament file." msgstr "Error in specified tournament file." #: src/StartTournamentWindow.cc:580 src/StartTournamentWindow.cc:740 #: src/StartTournamentWindow.cc:891 src/OptionsWindow.cc:266 msgid " Ok " msgstr " Ok " #: src/StartTournamentWindow.cc:581 msgid "Tournament could not be loaded." msgstr "Tournament could not be loaded." #: src/StartTournamentWindow.cc:730 msgid "There are too few robots in the tournament." msgstr "There are too few robots in the tournament." #: src/StartTournamentWindow.cc:732 src/StartTournamentWindow.cc:886 msgid "There are no arenas in the tournament." msgstr "There are no arenas in the tournament." #: src/StartTournamentWindow.cc:735 msgid "Could not open file." msgstr "Could not open file." #: src/StartTournamentWindow.cc:741 msgid "Tournament could not be saved." msgstr "Tournament could not be saved." #: src/StartTournamentWindow.cc:884 msgid "There must be at least two robots in the tournament." msgstr "There must be at least two robots in the tournament." #: src/StartTournamentWindow.cc:892 msgid "Tournament could not be started." msgstr "Tournament could not be started." #: src/StatisticsWindow.cc:49 msgid "Statistics" msgstr "Statistics" #: src/StatisticsWindow.cc:82 msgid " Close " msgstr " Close " #: src/StatisticsWindow.cc:84 msgid " Save Statistics " msgstr " Save Statistics " #: src/StatisticsWindow.cc:86 msgid " Total " msgstr " Total " #: src/StatisticsWindow.cc:88 msgid " Sequence Total " msgstr " Sequence Total " #: src/StatisticsWindow.cc:225 msgid "Position" msgstr "Position" #: src/StatisticsWindow.cc:225 msgid "Points" msgstr "Points" #: src/StatisticsWindow.cc:226 msgid "Games" msgstr "Games" #: src/StatisticsWindow.cc:226 msgid "Survival Time" msgstr "Survival Time" #: src/StatisticsWindow.cc:226 msgid "Total Points" msgstr "Total Points" #: src/StatisticsWindow.cc:310 msgid "Choose a statistics file to save" msgstr "Choose a statistics file to save" #: src/StatisticsWindow.cc:388 msgid "Seq" msgstr "Seq" #: src/StatisticsWindow.cc:485 msgid " Grand Total " msgstr " Grand Total " #: src/StatisticsWindow.cc:491 msgid " Sequence " msgstr " Sequence " #: src/StatisticsWindow.cc:507 msgid " Sequence: " msgstr " Sequence: " #: src/Various.cc:96 msgid "Error in" msgstr "Error in" #: src/OptionsWindow.cc:52 msgid "Options" msgstr "Options" #: src/OptionsWindow.cc:78 msgid "Environment" msgstr "Environment" #: src/OptionsWindow.cc:78 msgid "Robot" msgstr "Robot" #: src/OptionsWindow.cc:78 msgid "Shot" msgstr "Shot" #: src/OptionsWindow.cc:79 msgid "Extras" msgstr "Extras" #: src/OptionsWindow.cc:79 msgid "Window sizes" msgstr "Window sizes" #: src/OptionsWindow.cc:80 msgid "Misc" msgstr "Misc" #: src/OptionsWindow.cc:139 src/OptionsWindow.cc:184 src/OptionsWindow.cc:211 msgid " Def " msgstr " Def " #: src/OptionsWindow.cc:236 msgid " Grab sizes and positions from present windows " msgstr " Grab sizes and positions from present windows " #: src/OptionsWindow.cc:256 msgid " Default " msgstr " Default " #: src/OptionsWindow.cc:258 msgid " Load options " msgstr " Load options " #: src/OptionsWindow.cc:260 msgid " Save options " msgstr " Save options " #: src/OptionsWindow.cc:262 msgid " Save as default " msgstr " Save as default " #: src/OptionsWindow.cc:264 msgid " Apply " msgstr " Apply " #: src/OptionsWindow.cc:457 msgid "Choose an options file to load" msgstr "Choose an options file to load" #: src/OptionsWindow.cc:481 msgid "Choose an options file to save" msgstr "Choose an options file to save" realtimebattle-1.0.8/po/de.gmo0000644000175000017500000003676210321753015014375 0ustar moimoi `a6xN09/iC ;NQU2~p?06 <IQZow   / ' -7= N Z eo t ~    %0 A MXq y!     -7N`o u  'Hg# % (=[ bn#w& 39Lc!!<!Y!{ 5U-Z!  !    $ ' ; C I P Y p v %   " !,!F! a!l!!!!!$! ""+">"-U"""" """"$"#%#?#O# _# k#v###### # #&$++$4W$E$$ $ $ $$% 9%Z% n%{%B%&5&\'1o'<''u(H)?G*T*C* ++,A- X-e- l- z- -- --- --- -/- +.9.U.f.v. }..... .. . ... / !/-/ A/K/c/{//// // / /"/0 0 )030G0Z0c0's0 0 00 000 00 11*1 01<1K1a1s1#11(1"1"2&82,_22 2!222 23!3>3F3 O3$Y3~3333333,34&494O4 n4)4)4,4,5$=5&b5/5/55 6$)6$N6"s6$66-6*67 ,7 87"D7g7z7 7 77777777778D!8f8'|8$8'8(89 49B9^9<s999B9*:9:J:#`:4:::: :; ;#;';@;:G;;; ;;;;;<*<?< T<`< o<$<2<B<+= 0= <=F=$V=({=&====)HXp|V}^9cGygtrxo!(= % [Ks#JlIWm>Pk10qS7Rif$Zh'6-YBAw; @,N*aeEz~_<CMU`+\O8Fv.n L]b D?: {4"u3d2TQ5j/& Quit --competition_mode, -c competition mode --debug_level [0-5], -D sets the initial debug level. Implies -d --debug_mode, -d debug mode --help, -h prints this message --log_file [file], -l make log file, if 'file' is '-' the log is sent to STDOUT --message_file [file], -m redirect messages to 'file'. With '-' as 'file', STDOUT is used. If both log and messages are sent to STDOUT, '-m' will be ignored --no_graphics, -g no graphics will be displayed --normal_mode, -n normal mode (default) --option_file [file], -o selects option-file (default: $HOME/.rtbrc) --port_number -p specifies the port to listen on (default 32134) --replay [file] -r a log file to replay. if '-' is specified as file, input is taken from STDIN --statistics_file [file], -s file to print the statistics to when autostarting --tournament_file [file], -t specify a tournament file to autostart a tournament --version, -v prints the version number Add All All Arenas Apply Cancel Clear all messages Close Debug Level: Def Default End End Game Full Round Grab sizes and positions from present windows Grand Total Kill Marked Robot Load options Load tournament Max Message Min New Tournament Next Game Next Seq No Zoom Ok Options Options: Pause Prev Game Prev Seq Remove Replay Tournament Robot Save Statistics Save as default Save options Save tournament Select All Seq: Sequence Sequence Total Sequence: Show all Show only marked robot Start Statistics Step Step backward Step forward Total Unselect All Usage: RealTimeBattle [options] Zoom In Zoom Out *Exiting**Finished**Paused**Pausing after game**Running**Shutting down robots**Starting robots*Air resistanceArenaArena scaleArena search pathArenas in DirectoryArenas in TournamentBackground colourCPU time warning percentageChoose a log file to replayChoose a statistics file to saveChoose a tournament file to loadChoose an options file to loadChoose an options file to saveChoose file to save tournament intoColour for RTB messagesCookie colourCookie frequency [cookies per second]Cookie max energyCookie min energyCookie radiusCould not open file.Directory for temporary filesEnergyEnvironmentError inError in specified tournament file.Extra CPU period [s]Extra CPU time [s]ExtrasFast forward factorForeground colourGameGame %d of sequence %dGame %d of sequence %d begins on arenaGamesGames per sequenceGravitational ConstantInitial Arena window heightInitial Arena window widthInitial Arena window x positionInitial Arena window y positionInitial Control window x positionInitial Control window y positionInitial Message window heightInitial Message window widthInitial Message window x positionInitial Message window y positionInitial Score window heightInitial Score window widthInitial Score window x positionInitial Score window y positionInitial Statistics window heightInitial Statistics window widthLastLogging frequency [Each n:th update interval]Max robots allowed simultaneouslyMax timestepMessagesMine colourMine frequency [mines per second]Mine max energyMine min energyMine radiusMiscNameNoNumber of sequencesOptionsPlacePointsPositionProcess check intervalRobotRobot bounce coefficientRobot cannon max rotate speed [rad/s]Robot energy levelsRobot front bounce coefficientRobot front hardness coefficientRobot front protection coefficientRobot frontsize [radians]Robot hardness coefficientRobot massRobot max accelerationRobot max energyRobot max rotate speed [rad/s]Robot min accelerationRobot protection coefficientRobot radar max rotate speed [rad/s]Robot radiusRobot search pathRobot start energyRobot startup time [s]Robot with filename %s has not given any nameRobots in DirectoryRobots in TournamentRobots per sequenceRoll frictionScoreSend robot coordinatesSeqShooting penalty (times shot energy)ShotShot energy increase speed [energy/s]Shot max energyShot min energyShot radiusShot speedShow arena windowShow message windowShow score windowSlide/brake frictionStart CPU time [s]Start New TournamentStatisticsSurvival TimeThere are no arenas in the tournament.There are too few robots in the tournament.There must be at least two robots in the tournament.This action will kill the current tournament. Do you want to do that?TimeTimeout [s]TimescaleTotal PointsTournament could not be loaded.Tournament could not be saved.Tournament could not be started.Update interval [s]Window sizesYesProject-Id-Version: de Report-Msgid-Bugs-To: jonico@users.sourceforge.net POT-Creation-Date: 2005-10-08 16:22+0200 PO-Revision-Date: 2005-10-01 17:20+0200 Last-Translator: Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Generator: KBabel 1.9.1 Beenden --competition_mode, -c Wettkampf Modus --debug_level [0-5], -D Setzt den anfnglichen Debug-Level. Bezieht -d mit ein --debug_mode, -d Debug-Modus --help, -h gibt diese Meldung aus --log_file [Datei], -l schreibt Log-Datei, wenn 'Datei' ein '-' ist, wird nach STDOUT geschrieben --message_file [Datei], -m schreibt Nachrichten in 'Datei'. Mit '-' als 'Datei', wird STDOUT benutzt. Wenn sowohl Logs als auch Nachrichten nach STDOUT geschrieben werden, wird '-m' ignoriert --no_graphics, -g es werden keine Grafiken angezeigt --normal_mode, -n normaler Modus (Standard) --option_file [Datei], -o gibt Options-Datei an (Standard: $HOME/.rtbrc) --port_number, -p Port-Nummer (Standard: 32134) --replay [file] -r Eine Logdatei zum Nachspielen. Wenn '-' als Datei angegeben ist, wird der Inhalt von STDIN genommen --statistics_file [Datei], -s Datei um die Statistiken zu speichern wenn selbstndig gestartet wird --tournament_file [Datei], -t Gibt eine Turnier-Datei an, um selbstndig das Turnier zu starten --version, -v gibt die Versionsnummer aus Hinzufgen Alle Alle Arenen Anwenden Abbrechen Lsche alle Nachrichten Schlieen Debug Level: Def Default Ende Spiel beenden Alle Runden Nehme Gre und Position vom aktuellen Fenster Endergebnis Markierten Roboter killen Optionen laden Turnier laden Max. Nachricht Min. Neues Turnier Nchstes Spiel Nchste Sequenz Kein Zoom Ok Optionen Optionen: Pause Vorhergehendes Spiel Vorhergehende Sequenz Entfernen Turnier abspielen Roboter Statistiken speichern Als Standard speichern Optionen speichern Turnier speichern Alle auswhlen Seq: Sequenz Sequenzen gesamt Sequenz: Zeige alle Zeige nur den markierten Roboter Start Statistiken Schritt Schritt rckwrts Schritt vorwrts Gesamt Alle abwhlen Verwendung: RealTimeBattle [Optionen] Zoom In Zoom Out *Verlasse Programm**Beendet**Pause**Pause nach dem Spiel**RTB luft**Beende Roboter**Starte Roboter*LuftwiderstandArenaArena SkalaArena SuchpfadArenen im VerzeichnisArenen im TurnierHintergrund-Farbekritischen Prozentsatz der CPU-ZeitWhle ein Logfile zum abspielenWhle eine Statistik-Datei zum speichernWhle eine Turnier-Datei zum ladenWhle eine Options-Datei zum ladenWhle eine Options-Datei zum speichernWhle eine Datei um das Turnier zu speichernFarbe fr RTB-NachrichtenKeks-FarbeKeks-Frequenz [Kekse pro Sekunde]Max. Keks-EnergieMin. Keks-EnergieKeks-RadiusKann Datei nicht ffnen.Verzeichnis fr temporre DateienEnergieUmgebungFehler inFehler in angegebener Turnier-Datei.Extra CPU Periode [s]Extra CPU-Zeit [s]ExtrasFast forward FaktorVordergrund-FarbeSpielSpiel %d von Sequenz %dSpiel %d von Sequenz %d beginnt in der ArenaSpieleSpiele pro SequenzGravitationskonstanteAnfngliche Arena-Fenster HheAnfngliche Arena-Fenster BreiteAnfngliche x-Position des Arena-FenstersAnfngliche y-Position des Arena-FenstersAnfngliche x-Position des Kontroll-FenstersAnfngliche y-Position des Kontroll-FenstersAnfngliche Nachrichten-Fenster HheAnfngliche Nachrichten-Fenster BreiteAnfngliche x-Position des Nachrichten-FenstersAnfngliche y-Position des Nachrichten-FenstersAnfngliche Score-Fenster HheAnfngliche Score-Fenster BreiteAnfngliche x-Position Score-FensterAnfngliche y-Position Score-FensterAnfngliche Statistik-Fenster HheAnfngliche Statistik-Fenster BreiteLetzerLoggingfrequenz [Jedes n:te Update-Intervall]Anzahl max. gleichzeitig erlaubter RoboterMax. ZeitschrittNachrichtenMinen-FarbeMinen-Frequenz [Minen pro Sekunde]Max. Minen-EnergieMin. Minen-EnergieMinen-RadiusVerschiedenesNameNeinAnzahl der SequenzenOptionenPlatzPunktePositionProzess Check-IntervallRoboterRoboter Bounce KoeffizientMax. Roboter-Kanonen-Rotationsgeschwindigkeit [Winkel im Bogenma/s]Roboter EnergielevelsRoboter Vorderseiten Bounce-KoeffizientRobot Vorderseiten Hrte-KoeffizientRoboter Vorderseiten Schutz-KoeffizientRoboter Vorderseite [Winkel im Bogenma]Roboter Hrte KoeffizientRoboter-MasseMax. Roboter-BeschleunigungMax. Roboter-EnergieMax. Roboter-Rotationsgeschwindigkeit [Winkel im Bogenma/s]Min. Roboter-BeschleunigungRoboter Schutz KoeffizientMax. Roboter-Radar-Rotationsgeschwindigkeit [Winkel im Bogenma/s]Roboter-RadiusRoboter SuchpfadRoboter Start-EnergieZeit zum Hochfahren der Roboter [s]Roboter mit Dateinamen %s hat keinen Namen angegebenRoboter im VerzeichnisRoboter im TurnierRoboter pro SequenzRollreibungScoreArt der KoordinatenangabeSeqEnergie-Kosten pro SchuSchussRegenerationsgeschwindigkeit der Schu-Energie [Energie/s]Max. SchussenergieMin. SchussenergieSchussradiusSchussgeschwindigkeitArena-Fenster anzeigenNachrichten-Fenster anzeigenScore-Fenster anzeigenGleit-/BremsreibungAnfangs-CPU-Zeit [s]Starte neues TurnierStatistikenberlebenszeitEs sind keine Arenen im Turnier.Es sind zu wenig Roboter im Turnier.Es mssen mindestens zwei Roboter im Turnier sein.Diese Aktion wird das aktuelle Turnier beenden. Willst du das tun?ZeitTimeout [s]ZeitskalaGesamtpunktzahlTurnier konnte nicht geladen werden.Turnier konnte nicht gespeichert werden.Turnier konnte nicht gestartet werden.Update Intervall [s]Fenster-GrenJarealtimebattle-1.0.8/po/es.gmo0000644000175000017500000003406510321753015014406 0ustar moimoi 6N0V9GCb;Q4~r?28 >KTiq  /   # / : D NX ` lw     $+;J!Y {     )=Rd  #@ X%f  # 1FYm&)I!i!!! ,Hc -!9 B!Np %)= \"} '>$[ -  4 B H $L q %v       ! ! 3! >!&L!+s!4!E!" " )"6"V" u"" ""U"$6&$J]$0$:$%7%2&B'[D''{g((7d)))) ))))* **5!* W*d*|** **** * * **++(+<+S+d+v+ }++ + +!+ +++ + ,, -,N,^, o, |, ,,,,,,- - -;-S-f-'u-'-%--..<.U.m.#s.. ...#../ / /#5/Y/x////.//00-0L0"l0"0#0#0 0!1$=1$b1"1#1$1$1$2%=2c2-j2"2 22!222 333*33393@3 I3j383333# 4/4A4W4\4o4#~4448455)5;57Q5555555 55*5&656D6 J6 T6a6r666 666&6/77G77777#7"78"8289r7d@Q^-BPIin=]bKT\ &"N,~HD|UgA?RS.E#;sq5pLl3y64! jF<f Ge' Wz>%{:_cZC (xuoYOXkmh}$tv+/0*2`JMa8w)1V[ Quit --competition_mode, -c competition mode --debug_level [0-5], -D sets the initial debug level. Implies -d --debug_mode, -d debug mode --help, -h prints this message --log_file [file], -l make log file, if 'file' is '-' the log is sent to STDOUT --message_file [file], -m redirect messages to 'file'. With '-' as 'file', STDOUT is used. If both log and messages are sent to STDOUT, '-m' will be ignored --no_graphics, -g no graphics will be displayed --normal_mode, -n normal mode (default) --option_file [file], -o selects option-file (default: $HOME/.rtbrc) --replay [file] -r a log file to replay. if '-' is specified as file, input is taken from STDIN --statistics_file [file], -s file to print the statistics to when autostarting --tournament_file [file], -t specify a tournament file to autostart a tournament --version, -v prints the version number Add All All Arenas Cancel Clear all messages Close Debug Level: End End Game Full Round Grab sizes and positions from present windows Grand Total Kill Marked Robot Load tournament Max Message New Tournament Next Game Next Seq No Zoom Options Options: Pause Prev Game Prev Seq Replay Tournament Save Statistics Save tournament Select All Seq: Sequence Sequence Total Sequence: Show all Show only marked robot Start Statistics Step Step backward Step forward Unselect All Usage: RealTimeBattle [options] Zoom In Zoom Out *Exiting**Finished**Paused**Pausing after game**Running**Shutting down robots**Starting robots*Air resistanceArenaArena scaleArena search pathArenas in DirectoryArenas in TournamentBackground colourCPU time warning percentageChoose a log file to replayChoose a statistics file to saveChoose a tournament file to loadChoose an options file to loadChoose an options file to saveChoose file to save tournament intoColour for RTB messagesCookie colourCookie frequency [cookies per second]Cookie max energyCookie min energyCookie radiusCould not open file.Directory for temporary filesEnergyEnvironmentError inError in specified tournament file.Extra CPU period [s]Extra CPU time [s]Fast forward factorForeground colourGameGame %d of sequence %dGame %d of sequence %d begins on arenaGamesGames per sequenceGravitational ConstantInitial Arena window heightInitial Arena window widthInitial Arena window x positionInitial Arena window y positionInitial Control window x positionInitial Control window y positionInitial Message window heightInitial Message window widthInitial Message window x positionInitial Message window y positionInitial Score window heightInitial Score window widthInitial Score window x positionInitial Score window y positionInitial Statistics window heightInitial Statistics window widthLastLogging frequency [Each n:th update interval]Max robots allowed simultaneouslyMessagesMine colourMine frequency [mines per second]Mine max energyMine min energyMine radiusNameNumber of sequencesOptionsPlacePointsPositionProcess check intervalRobot bounce coefficientRobot cannon max rotate speed [rad/s]Robot energy levelsRobot front bounce coefficientRobot front hardness coefficientRobot front protection coefficientRobot frontsize [radians]Robot hardness coefficientRobot massRobot max accelerationRobot max energyRobot max rotate speed [rad/s]Robot min accelerationRobot protection coefficientRobot radar max rotate speed [rad/s]Robot radiusRobot search pathRobot start energyRobot startup time [s]Robot with filename %s has not given any nameRobots in DirectoryRobots in TournamentRobots per sequenceRoll frictionScoreSeqShooting penalty (times shot energy)ShotShot energy increase speed [energy/s]Shot max energyShot min energyShot radiusShot speedShow arena windowShow message windowShow score windowSlide/brake frictionStart CPU time [s]StatisticsSurvival TimeThere are no arenas in the tournament.There are too few robots in the tournament.There must be at least two robots in the tournament.This action will kill the current tournament. Do you want to do that?TimeTimescaleTotal PointsTournament could not be loaded.Tournament could not be saved.Tournament could not be started.Update interval [s]Window sizesYesProject-Id-Version: RealTime Battle Report-Msgid-Bugs-To: jonico@users.sourceforge.net POT-Creation-Date: 2005-10-08 16:22+0200 PO-Revision-Date: 2004-11-2004 20:09+0100 Last-Translator: Mc_Tr Language-Team: Spanish MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit QUITAR --competition_mode, -c modo competicin --debug_level [0-5], -D Nivel de debug inicial. necesario -d --debug_mode, -d modo debug --help, -h muestra este mensaje --log_file [archivo], -l archivo de log, si es '-' el log se envia a STDOUT --message_file [archivo], -m envia los mensajes al 'archivo'. Con '-' como 'archivo', se usar STDOUT. Si se envin tanto el log como los mensajes a STDOUT, '-m' no se tendr en cuenta. --no_graphics, -g sin grficos --normal_mode, -n modo normal (predeterminado) --option_file [archivo], -o fichero de opciones (predeterminado: $HOME/.rtbrc) --replay [archivo] -r archivo log a recrear. si se indica '-' como archivo, la entrada se coge de STDIN --statistics_file [archivo], -s archivo donde se volcarn las estadisticas --tournament_file [archivo], -t archivo de torneo que se iniciar automticamente --version, -v muestra la verin Aadir Todo Todas las Arenas Cancelar Borra todos los mensajes Cerrar Nivel de Debug: FIN Fin Juego Ronda entera Guardar tamaos y posiciones de las ventanas actuales Gran TOTAL Matar robots marcados Cargar Torneo Mx Mensaje Nuevo CamPeonaTO Siguiente Partida Siguiente Sequencia No Zoom Opciones Opciones: Pausa Partida anterior Secuencia Previa Cargar Campeonato Guardar Estadisticas Guardar Torneo Selecciona todo Sec: Secuencia Total de la Secuencia Secuencia: Ver todos Ver nicamente el robot marcado Empezar Estadisticas Paso Paso atrs Paso adelante Deselecciona todo Uso: RealTimeBattle [opciones] Aumentar zoom Disminuir zoom * Saliendo ** Terminado ** Pausado ** Pausar despues del juego ** Ejecutando ... ** Finalizando Robots ** Iniciando Robots *Resistencia del AireArenaEscala de la ArenaRuta de busqueda de arenasArenas en el directorioArens en el TorneoColor de fondoPorcentaje de aviso en el uso de la CPUSelecciona el archivo de log a recrear.Archivo para guardar las estadisticasArchivo torneo a cargarNombre del archivo a cargarNombre del archivo a guardarArchivo torneo a guardarColor para los mensajesColorFrecuencia de cookies [por segundo]Emergia mximaEmegia mnimaRadioNo se puede abrir el archivoDirectorio para archivos temporalesEnergiaEntornoError enError en el archivo especificadoPeriodo del uso extra de la CPU [s]Tiempo extra de uso de CPU [s]Velocidad de 'Adelante'Color de primer planoJuegoPartida %d de la secuencia %d.Ha comenzado la partida %d de la secuencia %d.JuegosJuegos por secuenciaConstante gravitatoriaAltura de la ventana de ArenasAnchura de la ventana de ArenasPosicin x de la ventana de ArenasPosicin y de la ventana de ArenasPosicin x de la ventana de ControlPosicin y de la ventana de ControlAltura de la ventana de MensajesAnchura de la ventana de MensajesPosicin x de la ventana de MensajesPosicin y de la ventana de MensajesAltura de la ventana de PuntuacinAnchura de la ventana de PuntuacinPosicin de la ventana de PuntuacinPosicin de la ventana de PuntuacinAltura de la ventana de EstadisticasAnchura de la ventana de EstadisticasltimoFrecuencia de 'logeo' [refresca cada n-veces]Nmero mximo de robot simultaneos Mensajes ColorFrecuencia de minas [por segundo]Energia mximaEnergia mnimaRadioNombreN de secuenciasOpcionesLugarPuntosPosicinIntrvalo de chequeo del procesoCoeficiente de salto.Velocidad mxima velocidad de rotacin del caon [rad/s]Niveles de energiaCoeficiente de salto delanteroCoeficiente de dureza delanteroCoeficiente de proteccin delanteroTamao [radianes]Coeficiente de durezaMasaAcelaracin mximaEnergia mximaVelcidad mxima de rotacin [rad/s]Aceleracin mnimaCoeficiente de proteccinVelocidad mxima velocidad de rotacin del radar [rad/s]RadioRuta de busqueda de robotsEnergia de inicioRetardo de inicio [s]El Robot con el nombre de fichero %s no ha dado nombre.Robots en el directorioRobots en el TorneoRobots por secuenciaFriccin de giroPuntosSecPenalizacinDisparoVelocidad de aumento de energia energia/s]Energia mximaEnergia mnimaRadioVelocidadVer la arenaVer los mensajesVer los puntosFriccin de frenadoLmite de gasto de CPU [s]EstadisticasTiempo de supervivenciaNo hay arenas en el torneoNo hay suficientes robots en el torneoDeben existir al menos dos robots en el torneo.Con esto abortaras el campeonato actual. Ests seguro?TiempoScala de tiempoPuntos TotalesEl torneo no puedo cargarseEl torneo no ha podido ser guardadoEl torneo no se ha podido iniciar.Intervalo de refresco [s]Tamao ventanasSirealtimebattle-1.0.8/po/gl.gmo0000644000175000017500000003713110321753015014376 0ustar moimoi @A6XN09IC;.Qj~{?z    & 1/> n|        &1:NVhz     '6>!M o y     1FXt  #4 L%Z  #%:MThz& $D!d!!!'C^~ -! 4A J!Vx  % ? S r "     !!=!T!$q! !!!!-! "!"6" J"X"^"$b""%""" " """#!#6#I# ^# i#&w#+#4#E#E$ J$ V$ `$m$$ $$ $$y$l&:&}&4<':q''$y(:)@)**y+ ,A, ,,, , --.-7-I- O-Y-b-r-6----- . .. .-.=. L.W. \. f.p.x......... // &/2/ G/T/ c/ // ////// 0 0$0 -080A0[0j00000000 0%1/.1/^1&1*1*1( 242P2.a22222&2!3)313$93^3w333333&34 4!4!:4"\4%4%4(4(4%5&C5)j5)5(5)5,6,>6)k6*66;6,7%07V7 _7(m777777777888&8E8K87j88(8(8,9#>9b9 999.99":71:i:x::&:2: ; ;1;F; W;b;3f;;7;;; <<&<?< ]<~<<< <<< =/*=7Z==== ===>">A>V>(GWo{U|]8bFxfsqwn '<$ ZJr"IkHVl =Oj0/pR6Qhe#Yg&5,XA@v: ?+M)`dDy}^;BLT_*[N7Eu-m ~K\a C>9z3!t2c1SP4i.% Quit --competition_mode, -c competition mode --debug_level [0-5], -D sets the initial debug level. Implies -d --debug_mode, -d debug mode --help, -h prints this message --log_file [file], -l make log file, if 'file' is '-' the log is sent to STDOUT --message_file [file], -m redirect messages to 'file'. With '-' as 'file', STDOUT is used. If both log and messages are sent to STDOUT, '-m' will be ignored --no_graphics, -g no graphics will be displayed --normal_mode, -n normal mode (default) --option_file [file], -o selects option-file (default: $HOME/.rtbrc) --replay [file] -r a log file to replay. if '-' is specified as file, input is taken from STDIN --statistics_file [file], -s file to print the statistics to when autostarting --tournament_file [file], -t specify a tournament file to autostart a tournament --version, -v prints the version number Add All All Arenas Apply Cancel Clear all messages Close Debug Level: Def Default End End Game Full Round Grab sizes and positions from present windows Grand Total Kill Marked Robot Load options Load tournament Max Message Min New Tournament Next Game Next Seq No Zoom Ok Options Options: Pause Prev Game Prev Seq Remove Replay Tournament Robot Save Statistics Save as default Save options Save tournament Select All Seq: Sequence Sequence Total Sequence: Show all Show only marked robot Start Statistics Step Step backward Step forward Total Unselect All Usage: RealTimeBattle [options] Zoom In Zoom Out *Exiting**Finished**Paused**Pausing after game**Running**Shutting down robots**Starting robots*Air resistanceArenaArena scaleArena search pathArenas in DirectoryArenas in TournamentBackground colourCPU time warning percentageChoose a log file to replayChoose a statistics file to saveChoose a tournament file to loadChoose an options file to loadChoose an options file to saveChoose file to save tournament intoColour for RTB messagesCookie colourCookie frequency [cookies per second]Cookie max energyCookie min energyCookie radiusCould not open file.Directory for temporary filesEnergyEnvironmentError inError in specified tournament file.Extra CPU period [s]Extra CPU time [s]ExtrasFast forward factorForeground colourGameGame %d of sequence %dGame %d of sequence %d begins on arenaGamesGames per sequenceGravitational ConstantInitial Arena window heightInitial Arena window widthInitial Arena window x positionInitial Arena window y positionInitial Control window x positionInitial Control window y positionInitial Message window heightInitial Message window widthInitial Message window x positionInitial Message window y positionInitial Score window heightInitial Score window widthInitial Score window x positionInitial Score window y positionInitial Statistics window heightInitial Statistics window widthLastLogging frequency [Each n:th update interval]Max robots allowed simultaneouslyMax timestepMessagesMine colourMine frequency [mines per second]Mine max energyMine min energyMine radiusMiscNameNoNumber of sequencesOptionsPlacePointsPositionProcess check intervalRobotRobot bounce coefficientRobot cannon max rotate speed [rad/s]Robot energy levelsRobot front bounce coefficientRobot front hardness coefficientRobot front protection coefficientRobot frontsize [radians]Robot hardness coefficientRobot massRobot max accelerationRobot max energyRobot max rotate speed [rad/s]Robot min accelerationRobot protection coefficientRobot radar max rotate speed [rad/s]Robot radiusRobot search pathRobot start energyRobot startup time [s]Robot with filename %s has not given any nameRobots in DirectoryRobots in TournamentRobots per sequenceRoll frictionScoreSeqShooting penalty (times shot energy)ShotShot energy increase speed [energy/s]Shot max energyShot min energyShot radiusShot speedShow arena windowShow message windowShow score windowSlide/brake frictionStart CPU time [s]Start New TournamentStatisticsSurvival TimeThere are no arenas in the tournament.There are too few robots in the tournament.There must be at least two robots in the tournament.This action will kill the current tournament. Do you want to do that?TimeTimeout [s]TimescaleTotal PointsTournament could not be loaded.Tournament could not be saved.Tournament could not be started.Update interval [s]Window sizesYesProject-Id-Version: RealTimeBattle 1.0.2 Report-Msgid-Bugs-To: jonico@users.sourceforge.net POT-Creation-Date: 2005-10-08 16:22+0200 PO-Revision-Date: 2000-02-09 22:17+0100 Last-Translator: Jess Bravo lvarez Language-Team: Galician MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sar --competition_mode, -c modo de competicin --debug_level [0-5], -D establece-lo nivel inicial de debug. Implica -d --debug_mode, -d modo de debug --help, -h amosar esta mensaxe --log_file [ficheiro], -l crear un ficheiro de rexistro, se 'ficheiro' '-', o rexistro envase sada estndar --message_file [ficheiro], -m redirixi-las mensaxes a 'ficheiro'. Con '-' como 'ficheiro', sase STDOUT. Se o rexistro e as mensaxes se envan a STDOUT, '-m' ignrase --no_graphics, -g non amosar grficos --normal_mode, -n modo normal (por defecto) --option_file [ficheiro], -o escolle-lo ficheiro de opcins (por defecto: $HOME/.rtbrc) --replay [ficheiro] -r ficheiro de rexistro para reproducir. se se indica '-' como ficheiro, a entrada cllese de STDIN --statistics_file [ficheiro], -s ficheiro que escribir as estatsticas comezar automticamente --tournament_file [ficheiro], -t indicar un ficheiro de torneo para comezar automticamente un torneo --version, -v amosa-lo nmero de versin Engadir Todos Tdalas Areas Aplicar Cancelar Limpar tdalas mensaxes Pechar Nivel de debug: Def Defecto Acabar Acaba-lo Xogo Ronda Completa Recolle-los tamaos e posicins das fiestras actuais Total Absoluto Mata-lo Robot Seleccionado Cargar opcins Cargar torneo Mx Mensaxe Mn Novo Torneo Seguinte Xogo Seguinte Sec Sen Zoom Ok Opcins Opcins: Parar Xogo Anterior Sec Anterior Quitar Reproducir un Torneo Robot Gardar Estatsticas Gardar como defecto Gardar opcins Gardar torneo Seleccionar todos Sec: Secuencia Total da Secuencia Secuencia: Amosar todos Amosar s o robot seleccionado Comezar Estatsticas Paso a Paso Paso para atrs Paso para adiante Total De-seleccionar todos Uso: RealTimeBattle [opcins] Achegar Alonxar *Sando**Rematado**Parado**Parando despois do xogo**Executndose**Desconectando robots**Iniciando robots*Resistencia do arAreaEscala da areaCamio de bsqueda das areasAreas no DirectorioAreas no TorneoCor do fondoPercentaxe de tempo de CPU para avisoEscolla un ficheiro de rexistro para reproducirEscolla un ficheiro de estatsticas para gravarEscolla un ficheiro co torneo a cargarEscolla un ficheiro de opcins para cargarEscolla un ficheiro de opcins para gardarEscolla un ficheiro onde garda-lo torneoCor para as mensaxes do RTBCor das galletasFrecuencia das galletas [galletas por segundo]Mxima enerxa das galletasMnima enerxa das galletasRadio das galletasNon se puido abri-lo ficheiro.Directorio para os ficheiros temporaisEnerxaEntornoErro enErro no ficheiro de torneo indicado.Perodo de CPU extra [s]Tempo de CPU extra [s]ExtrasFactor de avance rpidoCor do primeiro planoXogoXogo %d da secuencia %dXogo %d da secuencia %d comeza na areaXogosXogos por secuenciaConstante de GravitacinAltura inicial da fiestra da areaLargura inicial da fiestra da areaPosicin x inicial da fiestra da areaPosicin y inicial da fiestra da areaPosicin x inicial da fiestra de controlPosicin y inicial da fiestra de controlAltura inicial da fiestra de mensaxesLargura inicial da fiestra de mensaxesPosicin x inicial da fiestra de mensaxesPosicin y inicial da fiestra de mensaxesAltura inicial da fiestra de puntuacinsLargura inicial da fiestra de puntuacinsPosicin x inicial da fiestra de puntuacinsPosicin y inicial da fiestra de puntuacinsAltura inicial da fiestra de estatsticasLargura inicial da fiestra de estatsticasltimoFrecuencia de rexistro [Cada n intervalos de actualizacin]Mximo n de robots permitidos mesmo tempoMximo intervalo entre actualizacinsMensaxesCor das minasFrecuencia das minas [minas por segundo]Mxima enerxa das minasMnima enerxa das minasRadio das minasVariosNomeNonNmero de secuenciasOpcinsPosicinPuntosPosicinIntervalo de verificacin dos procesosRobotCoeficiente de rebote do robotMxima velocidade de rotacin do can do robot [rad/s]Niveis de enerxa dos robotsCoeficiente de rebote da fronte do robotCoeficiente de dureza da fronte do robotCoeficiente de proteccin da fronte do robotTamao da fronte do robot [radins]Coeficiente de dureza do robotMasa do robotMxima aceleracin do robotMxima enerxa do robotMxima velocidade de rotacin do robot [rad/s]Mnima aceleracin do robotCoeficiente de proteccin do robotMxima velocidade de rotacin do radar do robot [rad/s]Radio do robotCamio de bsqueda dos robotsEnerxa de inicio do robotTempo de inicializacin dos robots [s]O robot co nome de ficheiro %s non deu ningn nomeRobots no DirectorioRobots no TorneoRobots por secuenciaFriccin rodarPuntuacinSecPenalizacin por disparar (veces a enerxa do tiro)TiroVelocidade de incremento da enerxa do tiro [enerxa/s]Mxima enerxa do tiroMnima enerxa do tiroRadio do tiroVelocidade do tiroAmosa-la fiestra da areaAmosa-la fiestra das mensaxesAmosa-la fiestra das puntuacinsFriccin de derrapaxe/freoTempo de CPU inicial [s]Comezar un novo TorneoEstatsticasTempo de sobrevivenciaNon hai areas neste torneo.Hai moi poucos robots no torneo.Ten que haber polo menos dous robots no torneo.Esta accin rematar o torneo actual. Quere facer iso?TempoTempo mximo [s]Escala de tempoPuntos TotaisNon se puido carga-lo torneo.Non se puido garda-lo torneo.Non se puido inicia-lo torneo.Intervalo de actualizacin [s]Tamaos das fiestrasSirealtimebattle-1.0.8/po/ja.gmo0000644000175000017500000003563410321753015014374 0ustar moimoi @A6XN09IC;.Qj~{?z    & 1/> n|        &1:NVhz     '6>!M o y     1FXt  #4 L%Z  #%:MThz& $D!d!!!'C^~ -! 4A J!Vx  % ? S r "     !!=!T!$q! !!!!-! "!"6" J"X"^"$b""%""" " """#!#6#I# ^# i#&w#+#4#E#E$ J$ V$ `$m$$ $$ $$r$e&<|&&4<'@q''WG(8)A)**j++<n,,,,, ,,,, - -&- 9- F-,S------ --- .. .-. 2. ?.L. U.b.s.z. ..... . . . / !/ //:/ S/ ^/ i/t// / /%/ /////00080K0T0]0n0000!0&0&1*@1(k1(1*11 12 272 N2[2z2 22 20222 3 3!383?3-Z333333334;4[4x444444535N5g5l555 555556 666 6 +666;6@6E6Z6c6v666666 77.7A7X7u777777 708A8\8{888 8(88*8 9#9 :9G9X9q999999949.):HX:0:::: :(;$/;$T; y;;;(GWo{U|]8bFxfsqwn '<$ ZJr"IkHVl =Oj0/pR6Qhe#Yg&5,XA@v: ?+M)`dDy}^;BLT_*[N7Eu-m ~K\a C>9z3!t2c1SP4i.% Quit --competition_mode, -c competition mode --debug_level [0-5], -D sets the initial debug level. Implies -d --debug_mode, -d debug mode --help, -h prints this message --log_file [file], -l make log file, if 'file' is '-' the log is sent to STDOUT --message_file [file], -m redirect messages to 'file'. With '-' as 'file', STDOUT is used. If both log and messages are sent to STDOUT, '-m' will be ignored --no_graphics, -g no graphics will be displayed --normal_mode, -n normal mode (default) --option_file [file], -o selects option-file (default: $HOME/.rtbrc) --replay [file] -r a log file to replay. if '-' is specified as file, input is taken from STDIN --statistics_file [file], -s file to print the statistics to when autostarting --tournament_file [file], -t specify a tournament file to autostart a tournament --version, -v prints the version number Add All All Arenas Apply Cancel Clear all messages Close Debug Level: Def Default End End Game Full Round Grab sizes and positions from present windows Grand Total Kill Marked Robot Load options Load tournament Max Message Min New Tournament Next Game Next Seq No Zoom Ok Options Options: Pause Prev Game Prev Seq Remove Replay Tournament Robot Save Statistics Save as default Save options Save tournament Select All Seq: Sequence Sequence Total Sequence: Show all Show only marked robot Start Statistics Step Step backward Step forward Total Unselect All Usage: RealTimeBattle [options] Zoom In Zoom Out *Exiting**Finished**Paused**Pausing after game**Running**Shutting down robots**Starting robots*Air resistanceArenaArena scaleArena search pathArenas in DirectoryArenas in TournamentBackground colourCPU time warning percentageChoose a log file to replayChoose a statistics file to saveChoose a tournament file to loadChoose an options file to loadChoose an options file to saveChoose file to save tournament intoColour for RTB messagesCookie colourCookie frequency [cookies per second]Cookie max energyCookie min energyCookie radiusCould not open file.Directory for temporary filesEnergyEnvironmentError inError in specified tournament file.Extra CPU period [s]Extra CPU time [s]ExtrasFast forward factorForeground colourGameGame %d of sequence %dGame %d of sequence %d begins on arenaGamesGames per sequenceGravitational ConstantInitial Arena window heightInitial Arena window widthInitial Arena window x positionInitial Arena window y positionInitial Control window x positionInitial Control window y positionInitial Message window heightInitial Message window widthInitial Message window x positionInitial Message window y positionInitial Score window heightInitial Score window widthInitial Score window x positionInitial Score window y positionInitial Statistics window heightInitial Statistics window widthLastLogging frequency [Each n:th update interval]Max robots allowed simultaneouslyMax timestepMessagesMine colourMine frequency [mines per second]Mine max energyMine min energyMine radiusMiscNameNoNumber of sequencesOptionsPlacePointsPositionProcess check intervalRobotRobot bounce coefficientRobot cannon max rotate speed [rad/s]Robot energy levelsRobot front bounce coefficientRobot front hardness coefficientRobot front protection coefficientRobot frontsize [radians]Robot hardness coefficientRobot massRobot max accelerationRobot max energyRobot max rotate speed [rad/s]Robot min accelerationRobot protection coefficientRobot radar max rotate speed [rad/s]Robot radiusRobot search pathRobot start energyRobot startup time [s]Robot with filename %s has not given any nameRobots in DirectoryRobots in TournamentRobots per sequenceRoll frictionScoreSeqShooting penalty (times shot energy)ShotShot energy increase speed [energy/s]Shot max energyShot min energyShot radiusShot speedShow arena windowShow message windowShow score windowSlide/brake frictionStart CPU time [s]Start New TournamentStatisticsSurvival TimeThere are no arenas in the tournament.There are too few robots in the tournament.There must be at least two robots in the tournament.This action will kill the current tournament. Do you want to do that?TimeTimeout [s]TimescaleTotal PointsTournament could not be loaded.Tournament could not be saved.Tournament could not be started.Update interval [s]Window sizesYesProject-Id-Version: RealTimeBattle 0.9.11 Report-Msgid-Bugs-To: jonico@users.sourceforge.net POT-Creation-Date: 2005-10-08 16:22+0200 PO-Revision-Date: 2004-11-12 20:10 +0100 Last-Translator: Minatsu Tukisima Language-Team: Minatsu Tukisima MIME-Version: 1.0 Content-Type: text/plain; charset=euc-jp Content-Transfer-Encoding: 8bit λ --competition_mode, -c ڥƥ⡼ --debug_level [0-5], -D ǥХå٥λꡣ-d ꤷ Ȥˤʤޤ --debug_mode, -d ǥХå⡼ --help, -h Υåɽޤ --log_file [file], -l եκ, 'file' '-' ꤵ줿硢ɸϤ˽Ϥޤ --message_file [file], -m å'file'˽Ϥޤ 'file' '-' ꤵ줿硢 ɸϤȤޤ ȥåξɸϤ Ϥ硢-m ̵뤵ޤ --no_graphics, -g եåɽ --normal_mode, -n Ρޥ⡼ (ǥե) --option_file [file], -o ץեλ(ǥե: $HOME/.rtbrc) --replay [file] -r ץ쥤ΤΥեλꡣ 'file' '-' ꤵ줿 ɸϤϤޤ --statistics_file [file], -s ưȻ׾Ϥ եꤷޤ --tournament_file [file], -t ưȤȡʥȥե ꤷޤ --version, -v Сɽޤ ɲ ƤΥ꡼ Ŭ 󥻥 åꥢ Ĥ ǥХå٥: ǥե ǥե ȡʥȽλ ཪλ 饦 ߤΥɥ饵Ⱥɸ ɥȡ ޡܥåȤ ץɹ ȡʥȤɹ å Ǿ ȡʥ Υ Υ ̵ Ok ץ ץ: ݡ Υ Υ ȡʥȥץ쥤 ܥå ׾¸ ǥեȤȤ¸ ץ¸ ȡʥȤ¸ : 󥹥ȡ : ɽ ޡܥåȤΤ ׾ ƥå ƥå ƥå ȡ Ȥ: RealTimeBattle [ץ] । ॢ *λ**λ**ݡ**ݡ**¹**ܥåȥåȥ**ܥåȥ*꡼꡼ʥ꡼ʸѥǥ쥯ȥˤ륢꡼ȡʥȤ˻Ѥ륢꡼Хå饦ɥ顼CPU˥󥰥ѡơץ쥤եDz¸׾եDzɤ߹ȡʥȥեDzɤ߹४ץեDz¸륪ץեDz¸ȡʥȥեDzRTBåοåοåи [/]祯åͥ륮Ǿåͥ륮åȾե򥪡ץǤޤƥݥǥ쥯ȥͥ륮Ķ顼ȯꤷȡʥȥե˥顼ޤȥCPU [s]ȥCPU [s]ȥ®ե饦ɥ顼%d %d %d %d ꡼ʤ󥹤Υ꡼ʥɥ⤵꡼ʥɥ꡼ʥɥxɸ꡼ʥɥyɸȥ륦ɥxɸȥ륦ɥyɸåɥ⤵åɥåɥxɸåɥyɸɥ⤵ɥɥxɸɥyɸ׾󥦥ɥ⤵׾󥦥ɥ [ֳn]ƱƯܥåȿ祿ॹƥååοи [/]륨ͥ륮Ǿ륨ͥ륮Ⱦ¾̾󥹿ץץåֳܥåܥåȤȿͷ祭Υž® [rad/s]ܥåȥͥ륮٥ܥåȤȿͷܥåȤٷܥåȤɸܥåȤ [rad]ܥåȤιٷܥåȤμܥåȲ®ܥåȥͥ륮ܥåȲž® [rad/s]ǾܥåȲ®ܥåȤɸ졼ž® [rad/s]ܥåȤȾܥåȸѥܥåȥͥ륮ܥåȥȥåץ [s]ե̾ %s ΥܥåȤ̾ΤƤޤǥ쥯ȥˤܥåȡʥȤ˻äܥå󥹤Υܥåȿž໤åȥڥʥƥ(ߥåȥͥ륮)ååȥͥ륮® [ͥ륮/]祷åȥͥ륮Ǿåȥͥ륮åȾåȥԡ꡼ʥɥɽåɥɽɥɽ٤/֥졼໤CPU [s]ȡʥȤγ׾¸ȡʥȤ˻Ѥ륢꡼ʤꤵƤޤȡʥȤ˻äܥåȤʤޤȡʥȤˤϾʤȤ⣲ĤΥܥåȤäƤʤФʤޤߤΥȡʥȤλޤ. Ǥॢ [s]ॹȡȡʥȤɤ߹ߤǤޤǤȡʥȤ¸ǤޤǤȡʥȤϤǤޤǤֳ [s]ɥϤrealtimebattle-1.0.8/po/pl.gmo0000644000175000017500000003563410321753016014416 0ustar moimoit  6 NW09C;Q2~C?B    / 6DXgy        0BQ cp w   ! 7 A L Vaj   < X y# %"HZ lz #0BG&^ !,!Np!! &F f-  !. >JOTWksy%  "9 \ v      $! )=J)V))*'+;++ +, ,!,*, ?,I,], c,n, w, ,-,,,,,- --!-0- ?-L-_-d-l- t---------- . . (.4. I. V.b.{. .. .... . . . / / "/0/ F/T/h/// //// /#/% 0 10#R0!v00000-0*1C1[1n111 11!1112222A2E2.[222222%2%3+<3+h3$3%3+3+ 4"74#Z4)~4)4"4#455!5W5 i5 t5&555 55555556660666,R66"6$6"67!7 ?7K7g7$777+7 8848N8k8}888 88-88.8+9A9V9f9w99999: :#:2:)H:5r:3::: :;;!-;#O;s;;;^f* V.~ qF[ly/U5P T$CMw"N#v,O]WzjQ<BJKnSEa@ 1Lu!p?rAcb=48eg(Rt2|D)o}76:{di& Y%I`\s9Xm0-G+3Hh ;'>xk_Z Quit --competition_mode, -c competition mode --debug_level [0-5], -D sets the initial debug level. Implies -d --debug_mode, -d debug mode --help, -h prints this message --log_file [file], -l make log file, if 'file' is '-' the log is sent to STDOUT --message_file [file], -m redirect messages to 'file'. With '-' as 'file', STDOUT is used. If both log and messages are sent to STDOUT, '-m' will be ignored --no_graphics, -g no graphics will be displayed --normal_mode, -n normal mode (default) --option_file [file], -o selects option-file (default: $HOME/.rtbrc) --replay [file] -r a log file to replay. if '-' is specified as file, input is taken from STDIN --statistics_file [file], -s file to print the statistics to when autostarting --tournament_file [file], -t specify a tournament file to autostart a tournament --version, -v prints the version number Add All All Arenas Apply Cancel Clear all messages Close Debug Level: Def Default End End Game Full Round Grab sizes and positions from present windows Grand Total Kill Marked Robot Load options Load tournament Max Message Min New Tournament Next Game Next Seq No Zoom Ok Options Options: Pause Prev Game Prev Seq Remove Replay Tournament Robot Save Statistics Save as default Save options Save tournament Select All Seq: Sequence Sequence Total Sequence: Show all Show only marked robot Start Statistics Step Step backward Step forward Total Unselect All Usage: RealTimeBattle [options] Zoom In Zoom Out *Exiting**Finished**Paused**Pausing after game**Running**Shutting down robots**Starting robots*Air resistanceArenaArena scaleArena search pathArenas in DirectoryArenas in TournamentBackground colourCPU time warning percentageChoose a log file to replayChoose a statistics file to saveChoose a tournament file to loadChoose an options file to loadChoose an options file to saveChoose file to save tournament intoColour for RTB messagesCookie colourCookie frequency [cookies per second]Cookie max energyCookie min energyCookie radiusCould not open file.Directory for temporary filesEnergyEnvironmentError inError in specified tournament file.Extra CPU period [s]Extra CPU time [s]ExtrasFast forward factorForeground colourGameGame %d of sequence %dGame %d of sequence %d begins on arenaGamesGames per sequenceGravitational ConstantInitial Arena window heightInitial Arena window widthInitial Arena window x positionInitial Arena window y positionInitial Control window x positionInitial Control window y positionInitial Message window heightInitial Message window widthInitial Message window x positionInitial Message window y positionInitial Score window heightInitial Score window widthInitial Score window x positionInitial Score window y positionInitial Statistics window heightInitial Statistics window widthLastLogging frequency [Each n:th update interval]Max timestepMessagesMine colourMine frequency [mines per second]Mine max energyMine min energyMine radiusMiscNameNoNumber of sequencesOptionsPlacePointsPositionProcess check intervalRobotRobot bounce coefficientRobot cannon max rotate speed [rad/s]Robot energy levelsRobot front bounce coefficientRobot front hardness coefficientRobot front protection coefficientRobot frontsize [radians]Robot hardness coefficientRobot massRobot max accelerationRobot max energyRobot max rotate speed [rad/s]Robot min accelerationRobot protection coefficientRobot radar max rotate speed [rad/s]Robot radiusRobot search pathRobot start energyRobot startup time [s]Robots in DirectoryRobots in TournamentRobots per sequenceRoll frictionScoreSeqShooting penalty (times shot energy)ShotShot energy increase speed [energy/s]Shot max energyShot min energyShot radiusShot speedShow arena windowShow message windowShow score windowSlide/brake frictionStart CPU time [s]Start New TournamentStatisticsSurvival TimeThere are no arenas in the tournament.There are too few robots in the tournament.There must be at least two robots in the tournament.This action will kill the current tournament. Do you want to do that?TimeTimeout [s]TimescaleTotal PointsTournament could not be loaded.Tournament could not be saved.Tournament could not be started.Update interval [s]Window sizesYesProject-Id-Version: RealTimeBattle 0.9.10 Report-Msgid-Bugs-To: jonico@users.sourceforge.net POT-Creation-Date: 2005-10-08 16:22+0200 PO-Revision-Date: 1999-08-24 22:22+0200 Last-Translator: GNOME PL Team Language-Team: Polish MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 8bit Zakocz --competition_mode, -c tryb wspzawodnictwa --debug_level [0-5], -D ustawia domylny poziom ledzenia. Implikuje -d --debug_mode, -d tryb ledzenia --help, -h wypisuje ten komunikat --log_file [plik], -l okrela plik dziennika, nazwa '-' oznacza standardowe wyjcie --message_file [plik], -m przekierunkowuje komunikaty do pliku. '-' podane jako nazwa pliku okrela. standardowe wyjcie. Jeli obie z opcji -l oraz -m opisuj standarwode wyjcie, -m zostanie zignorowane --no_graphics, -g bez wywietlania grafiki --normal-mode, -n tryb zwyky (domylnie) --option_file [plik], -o wybiera plik z opcjami (domylnie: $HOME/.rtbrc) --replay [plik] -r plik dziennika do odtworzenia. Znak '-' jako nazwa pliku, okrela standardowe wejcie --statistics_file [plik], -s plik do zapisu statystyk przy automatycznym starcie --tournament_file [plik], -t okrela plik z turniejem przy automatycznym rozpoczciu turnieju --version, -v wypisuje numer wersji Dodaj Wszystkie Wszystkie areny Zastosuj Anuluj Wyczy komunikaty Zamknij Poziom ledzenia: Dom Domylne Koniec Zakocz gr Pena runda Pobierz rozmiary i pozycje aktualnych okien Ogem Zabij zaznaczonego robota Wczytaj opcje Wczytaj turniej Maks Komunikat Min Nowy turniej Nastpna gra Nast sekw. Bez powikszenia Ok Opcje Opcje: Wstrzymaj Poprzednia gra Poprz sekw. Usu Odtwrz turniej Robot Zapisz statystyki Zapisz jako domylne Zapisz opcje Zapisz turniej Zaznacz wszystkie Sekw: Sekwencja Ogem w sekwencji Sekwencja: Wszystkie Tylko zaznaczony robot Start Statystyki Krok Krok wstecz Krok naprzd Ogem Odznacz wszystkie Uycie: RealTimeBattle [opcje] Powiksz Pomniejsz *Koczenie**Zakoczono**Wstrzymanie**Wstrzymanie po grze**Wykonywanie**Koczenie robotw**Uruchamianie robotw*Opr powietrzaArenaSkala arenycieka poszukiwania arenyAreny w kataloguAreny w turniejuKolor taPrg czasu CPU przy ostrzeeniu [%]Wybierz plik dziennika do odtworzeniaWybierz plik do zapisu statystykWybierz plik z turniejem do odczytuWybierz plik z opcjami do odczytuWybierz plik do zapisu opcjiWybierz plik do zapisu turniejuKolor komunikatr RTBKolor ciasteczkaCzstotliwo pojawiania si ciasteczek [1/s]Maks. energia ciasteczkaMin. energia ciasteczkaPromie ciasteczkaNie mona otworzy pliku.Katalog na pliki tymczasoweEnergiarodowiskoBd wBd w podanym pliku z turniejem.Dodatkowy czas CPU [s]Dodatkowy czas CPU [s]DodatkiWspczynnik szybkego ruchuKolor obiektwGraGra %d w sekwencji %dGra %d w sekwencji %d rozpoczyna si an arenieGryGier na sekwencjSta grawitacjiPocztkowa wysoko okna arenyPocztkowa szeroko okna arenyPocztkowa pozycja pozioma okna arenyPocztkowa pozycja pionowa okna arenyPocztkowa pozycja pozioma okna kontrolnegoPocztkowa pozycja pionowa okna kontrolnegoPocztkowa wysoko okna komunikatwPocztkowa szeroko okna komunikatwPocztkowa pozioma pozycja okna komunikatwPocztkowa pionowa pozycja okna komunikatwPocztkowa wysoko okna punktacjiPocztkowa szeroko okna punktacjiPocztkowa pozioma pozycja okna punktacjiPocztkowa pionowa pozycja okna punktacjiPocztkowa wysoko okna statystykPocztkowa szeroko okna statystykOstatniCzstotliwo zapisu dziennika [co ktre odwieenie]Maks odstp czasuKomunikatyKolor minyCzstotliwo pojawiania si min [1/s]Maks. energia minyMin. energia minyPromie minyRneNazwaNieLiczba sekwencjiOpcjeMiejscePunktyPozycjaOkres sprawdzania procesuRobotWspczynnik odbicia robotaMaks. szybko obrotu dziaka robota [rad/s]Poziomy energii robotaWspczynnik odbicia przodu robotaWspczynnik twardoci przodu robotaWspczynnik ochrony przodu robotaRozmiar przodu robota [radiany]Wspczynnik twardoci robotaMasa robotaMaks. przypieszenie robotaMaksymalna energia robotaMaks. szybko obrotu robota [rad/s]Min. przypieszenie robotaWspczynnik ochrony robotaMaks. szybko obrotu radaru robota [rad/s]Promie robotacieka poszukiwania robotaEnergia pocztkowa robotaCzas uruchamiania robota [s]Roboty w kataloguRoboty w turniejuRobotw na sekwencjTarcie przy obrociePunktacjaSekwUbytek energii od strzau (* energia strzau)StrzaSzybko narastania energii strzau [energ./s]Maks. energia strzauMin. energia strzauPromie strzauSzybko strzauWywietlanie okna arenyWywietlanie okna komunikatwWywietlanie okna punktacjiTarcie przy polizgu/hamowaniuPocztkowy czas CPU [s]Rozpocznij nowy turniejStatystykiCzas przeyciaBrak aren w turnieju.W turnieju uczestniczy zbyt mao robotw.W turnieju musz uczestniczy co najmniej dwa roboty.Ta akcja przerwie biecy turniej. Czy tego chcesz?CzasCzas oczekiwania [s]Skala czasuOgem punktwNie mona wczyta tornieju.Turniej nie moe zosta zapisany.Turniej nie moe zosta rozpoczty.Okres odwieania [s]Rozmiary okienTakrealtimebattle-1.0.8/po/pt.gmo0000644000175000017500000003700510321753016014420 0ustar moimoi @A6XN09IC;.Qj~{?z    & 1/> n|        &1:NVhz     '6>!M o y     1FXt  #4 L%Z  #%:MThz& $D!d!!!'C^~ -! 4A J!Vx  % ? S r "     !!=!T!$q! !!!!-! "!"6" J"X"^"$b""%""" " """#!#6#I# ^# i#&w#+#4#E#E$ J$ V$ `$m$$ $$ $$\$O&6f&w&3';I''I(?)= *I**+,>?- ~--- - ----- --..0!.R.a. |. .. .......... . / //4/8!D80f88+8)8)9%19W9w999'9990 : >:L:i::0:::: ;;$;.(;W;4\;;; ;;;; <'<D<]< q<}<&<"<.<6 =C=I=Y= i=w==!===>(GWo{U|]8bFxfsqwn '<$ ZJr"IkHVl =Oj0/pR6Qhe#Yg&5,XA@v: ?+M)`dDy}^;BLT_*[N7Eu-m ~K\a C>9z3!t2c1SP4i.% Quit --competition_mode, -c competition mode --debug_level [0-5], -D sets the initial debug level. Implies -d --debug_mode, -d debug mode --help, -h prints this message --log_file [file], -l make log file, if 'file' is '-' the log is sent to STDOUT --message_file [file], -m redirect messages to 'file'. With '-' as 'file', STDOUT is used. If both log and messages are sent to STDOUT, '-m' will be ignored --no_graphics, -g no graphics will be displayed --normal_mode, -n normal mode (default) --option_file [file], -o selects option-file (default: $HOME/.rtbrc) --replay [file] -r a log file to replay. if '-' is specified as file, input is taken from STDIN --statistics_file [file], -s file to print the statistics to when autostarting --tournament_file [file], -t specify a tournament file to autostart a tournament --version, -v prints the version number Add All All Arenas Apply Cancel Clear all messages Close Debug Level: Def Default End End Game Full Round Grab sizes and positions from present windows Grand Total Kill Marked Robot Load options Load tournament Max Message Min New Tournament Next Game Next Seq No Zoom Ok Options Options: Pause Prev Game Prev Seq Remove Replay Tournament Robot Save Statistics Save as default Save options Save tournament Select All Seq: Sequence Sequence Total Sequence: Show all Show only marked robot Start Statistics Step Step backward Step forward Total Unselect All Usage: RealTimeBattle [options] Zoom In Zoom Out *Exiting**Finished**Paused**Pausing after game**Running**Shutting down robots**Starting robots*Air resistanceArenaArena scaleArena search pathArenas in DirectoryArenas in TournamentBackground colourCPU time warning percentageChoose a log file to replayChoose a statistics file to saveChoose a tournament file to loadChoose an options file to loadChoose an options file to saveChoose file to save tournament intoColour for RTB messagesCookie colourCookie frequency [cookies per second]Cookie max energyCookie min energyCookie radiusCould not open file.Directory for temporary filesEnergyEnvironmentError inError in specified tournament file.Extra CPU period [s]Extra CPU time [s]ExtrasFast forward factorForeground colourGameGame %d of sequence %dGame %d of sequence %d begins on arenaGamesGames per sequenceGravitational ConstantInitial Arena window heightInitial Arena window widthInitial Arena window x positionInitial Arena window y positionInitial Control window x positionInitial Control window y positionInitial Message window heightInitial Message window widthInitial Message window x positionInitial Message window y positionInitial Score window heightInitial Score window widthInitial Score window x positionInitial Score window y positionInitial Statistics window heightInitial Statistics window widthLastLogging frequency [Each n:th update interval]Max robots allowed simultaneouslyMax timestepMessagesMine colourMine frequency [mines per second]Mine max energyMine min energyMine radiusMiscNameNoNumber of sequencesOptionsPlacePointsPositionProcess check intervalRobotRobot bounce coefficientRobot cannon max rotate speed [rad/s]Robot energy levelsRobot front bounce coefficientRobot front hardness coefficientRobot front protection coefficientRobot frontsize [radians]Robot hardness coefficientRobot massRobot max accelerationRobot max energyRobot max rotate speed [rad/s]Robot min accelerationRobot protection coefficientRobot radar max rotate speed [rad/s]Robot radiusRobot search pathRobot start energyRobot startup time [s]Robot with filename %s has not given any nameRobots in DirectoryRobots in TournamentRobots per sequenceRoll frictionScoreSeqShooting penalty (times shot energy)ShotShot energy increase speed [energy/s]Shot max energyShot min energyShot radiusShot speedShow arena windowShow message windowShow score windowSlide/brake frictionStart CPU time [s]Start New TournamentStatisticsSurvival TimeThere are no arenas in the tournament.There are too few robots in the tournament.There must be at least two robots in the tournament.This action will kill the current tournament. Do you want to do that?TimeTimeout [s]TimescaleTotal PointsTournament could not be loaded.Tournament could not be saved.Tournament could not be started.Update interval [s]Window sizesYesProject-Id-Version: RealTime Battle Report-Msgid-Bugs-To: jonico@users.sourceforge.net POT-Creation-Date: 2005-10-08 16:22+0200 PO-Revision-Date: 2004-11-12 20:10+0100 Last-Translator: Rui Sousa Language-Team: Rui Sousa MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Abandonar --competition_mode, -c modo de competio --debug_level [0-5], -D ajusta o nivel inicial de debug. Implica -d --debug_mode, -d modo de debug --help, -h escreve esta mensagem --log_file [ficheiro], -l produz ficheiro de relatrio, se o 'ficheiro' '-' o relatrio enviado para STDOUT --message_file [ficheiro], -m redirige mensagens para o 'ficheiro'. Com '-' como 'ficheiro', usado o STDOUT. Se mensagens e relatrios so ambos enviados para STDOUT, '-m' vai ser ignorado --no_graphics, -g no sero mostrados grficos --normal_mode, -n modo normal (automtico) --option_file [ficheiro], -o selecciona ficheiro de opes (automtico: $HOME/.rtbrc) --replay [ficheiro] -r um ficheiro de relatrio para repetir. se '-' for especificado como ficheiro, o input vem de STDIN --statistics_file [ficheiro],-s ficheiro para o qual escrever as estatsticas quando a comear automaticamente --tournament_file [ficheiro],-t especifica um ficheiro de torneio para comear automaticamente um torneio --version, -v escreve o nmero da verso Adicionar Todos Todas as Arenas Aplicar Cancelar Limpar mensagens Fechar Nvel de debug: Aut Automtico Acabar Acabar o Jogo Round Completo Recolher tamanhos e posies das janelas actuais Grande Total Matar Robot Seleccionado Ler opes Ler torneio Mx Mensagem Min Novo Torneio Jogo Seguinte Seq Seguinte Normal Ok Opes Opes: Parar Jogo Anter Seq Anter Remover Repetio do Torneio Robot Gravar Estatsticas Gravar como automtico Gravar opes Gravar torneio Selecionar Todos Seq: Sequncia Total desta sequncia Sequncia: Mostrar Todos Mostrar robot seleccionado Comear Estatsticas Passo a Passo Passo a trs Passo frente Total De-selecionar Todos Uso: RealTimeBattle [opes] Aproximar Afastar *A sair**Acabou**Parado**A parar aps o jogo**A correr**A Desligar robots**A Iniciar robots*Resistncia do arArenaEscala da arenaCaminho para procurar arenasArenas na DirectoriaArenas no TorneioCr de fundoPercentagem de tempo de CPU para avisoEscolha um ficheiro de relatrio para a repetioEscolha um ficheiro de estatsticas para gravarEscolha um ficheiro de torneio para lerEscolha um ficheiro de opes para lerEscolha um ficheiro de opes para gravarEscolha um ficheiro para o qual gravar o torneioCr das mensagens do RTBCr dos cookiesFrequncia dos cookies [cookies por segundo]Energia mx dos cookiesEnergia min dos cookiesRaio dos cookiesNo foi possvel abrir ficheiro.Directoria para ficheiros temporriosEnergiaAmbienteErro emErro no ficheiro de torneio especificado.Perodo extra de CPU [s]Tempo de CPU extra [s]ExtrasFactor de avano rpidoCr do primeiro planoJogoJogo %d da sequncia %dJogo %d da sequncia %d comea na arenaJogosJogos por sequnciaConstante GravitacionalAltura inicial da janela da ArenaLargura inicial da janela da ArenaCoordenada inicial da janela da ArenaOrdenada inicial da janela da ArenaCoordenada inicial da janela de ControleOrdenada inicial da janela de ControleAltura inicial da janela das MensagensLargura inicial da janela das MensagensCoordenada inicial da janela das MensagensOrdenada inicial da janela das MensagensAltura inicial da janela da PontuaoLargura inicial da janela da PontuaoCoordenada inicial da janela da PontuaoOrdenada inicial da janela da PontuaoAltura inicial da janela das EstatsticasLargura inicial da janela das EstatsticasltimoFrequncia de relatrio [A cada n intervalos de actualizao]Mx robots permitidos simultaneamenteIntervalo de tempo mxMensagensCr das minasFrequncia das minas [minas por segundo]Energia mx das minasEnergia min das minasRaio das minasVriosNomeNoNmero de sequnciasOpesLugarPontosPosioIntervalo de verificao do processoRobotCoeficiente de restituio do robotVelocidade de rotao mx do canho do robot [rad/s]Nveis de energia do robotCoeficiente de restituio da frente do robotCoeficiente de rigidez da frente do robotCoeficiente de proteco da frente do robotTamanho da frente do robot [radianos]Coeficiente de rigidez do robotMassa do robotMx acelerao do robotEnergia mx do robotVelocidade de rotao mx do robot [rad/s]Min acelerao do robotCoeficiente de proteco do robotVelocidade de rotao mx do radar do robot [rad/s]Raio do robotCaminho para procurar robotsEnergia inicial do robotTempo inicial do robot [s]Robot com nome de ficheiro %s no deu nenhum nomeRobots na DirectoriaRobots no TorneioRobots por sequnciaFrico de rolamentoPontuaoSeqPenalizao por disparar (vezes energia do tiro)TiroVelocidade do aumento da energia do tiro [energia/s]Energia mx do tiroEnergia min do tiroRaio do tiroVelocidade do tiroMostrar janela da arenaMostrar janela das mensagensMostrar janela da pontuaoFrico de derrapagem/travagemTempo de CPU inicial [s]Comear Novo TorneioEstatsticasTempo de sobrevivnciaNo existem nenhumas arenas no torneio.Existem robots a menos no torneio.Tm de haver pelo menos dois robots no torneio.Esta aco ir matar o presente torneio. Quer fazer isto?TempoDurao mxima [s]Escala de tempoPontos TotaisTorneio no pde ser lido.O torneio no pde ser gravado.No foi possivel comear o torneio.Intervalo das actualizaes [s]Tamanho da janelasSimrealtimebattle-1.0.8/po/sv.gmo0000644000175000017500000003504510321753016014427 0ustar moimoi PQ6hN09YC;>Qz~ ?    &0 6 A/N ~       " * 6AJ^fx       '7FN!]       -AVh  # D \%j  #5J]dx&4T!t!!!7Sn -!" DQ Z!f   %) O c "   !!.!M!d!$! !!!!-!"1"F" Z"h"n""$""%""" " ##"#6#H#]#p# # #&#+#4#E&$l$ q$ }$ $$$ $$ %%v%&2&D&/'>O''#(7<)2t)R))*0+9+ ++ , ,,",;, C,P, V,b,k, z,3,,,,,- -$-*- 9- F-S-f-k- {-- - - ------ . .). 1.;. N. Y.e.. .. ... .&. . / / /'/./H/W/l/ ~// / /// / //!0>0[0{0!00 0#011 /1<1R1r1 y11"11111 1 22$#2H2M2^2p22222223*3G3d3y33333323,4 H4 U4 a4#m444 44444 444 5 5)5/5$G5l555556 6(6?6$P6u66$6 6 66647F7Z7n7 7777%77&7 88 38>8M8_8v8888 8 888/ 9><9{9 9 9 9999::":(GWo{U|]8bFxfsqwn '<$ ZJr"IkHVl =Oj0/pR6Qhe#Yg&5,XA@v: ?+M)`dDy}^;BLT_*[N7Eu-m ~K\a C>9z3!t2c1SP4i.% Quit --competition_mode, -c competition mode --debug_level [0-5], -D sets the initial debug level. Implies -d --debug_mode, -d debug mode --help, -h prints this message --log_file [file], -l make log file, if 'file' is '-' the log is sent to STDOUT --message_file [file], -m redirect messages to 'file'. With '-' as 'file', STDOUT is used. If both log and messages are sent to STDOUT, '-m' will be ignored --no_graphics, -g no graphics will be displayed --normal_mode, -n normal mode (default) --option_file [file], -o selects option-file (default: $HOME/.rtbrc) --replay [file] -r a log file to replay. if '-' is specified as file, input is taken from STDIN --statistics_file [file], -s file to print the statistics to when autostarting --tournament_file [file], -t specify a tournament file to autostart a tournament --version, -v prints the version number Add All All Arenas Apply Cancel Clear all messages Close Debug Level: Def Default End End Game Full Round Grab sizes and positions from present windows Grand Total Kill Marked Robot Load options Load tournament Max Message Min New Tournament Next Game Next Seq No Zoom Ok Options Options: Pause Prev Game Prev Seq Remove Replay Tournament Robot Save Statistics Save as default Save options Save tournament Select All Seq: Sequence Sequence Total Sequence: Show all Show only marked robot Start Statistics Step Step backward Step forward Total Unselect All Usage: RealTimeBattle [options] Zoom In Zoom Out *Exiting**Finished**Paused**Pausing after game**Running**Shutting down robots**Starting robots*Air resistanceArenaArena scaleArena search pathArenas in DirectoryArenas in TournamentBackground colourCPU time warning percentageChoose a log file to replayChoose a statistics file to saveChoose a tournament file to loadChoose an options file to loadChoose an options file to saveChoose file to save tournament intoColour for RTB messagesCookie colourCookie frequency [cookies per second]Cookie max energyCookie min energyCookie radiusCould not open file.Directory for temporary filesEnergyEnvironmentError inError in specified tournament file.Extra CPU period [s]Extra CPU time [s]ExtrasFast forward factorForeground colourGameGame %d of sequence %dGame %d of sequence %d begins on arenaGamesGames per sequenceGravitational ConstantInitial Arena window heightInitial Arena window widthInitial Arena window x positionInitial Arena window y positionInitial Control window x positionInitial Control window y positionInitial Message window heightInitial Message window widthInitial Message window x positionInitial Message window y positionInitial Score window heightInitial Score window widthInitial Score window x positionInitial Score window y positionInitial Statistics window heightInitial Statistics window widthLastLogging frequency [Each n:th update interval]Max robots allowed simultaneouslyMax timestepMessagesMine colourMine frequency [mines per second]Mine max energyMine min energyMine radiusMiscNameNoNumber of sequencesOptionsPlacePointsPositionProcess check intervalRobotRobot bounce coefficientRobot cannon max rotate speed [rad/s]Robot energy levelsRobot front bounce coefficientRobot front hardness coefficientRobot front protection coefficientRobot frontsize [radians]Robot hardness coefficientRobot massRobot max accelerationRobot max energyRobot max rotate speed [rad/s]Robot min accelerationRobot protection coefficientRobot radar max rotate speed [rad/s]Robot radiusRobot search pathRobot start energyRobot startup time [s]Robot with filename %s has not given any nameRobots in DirectoryRobots in TournamentRobots per sequenceRoll frictionScoreSend robot coordinatesSeqShooting penalty (times shot energy)ShotShot energy increase speed [energy/s]Shot max energyShot min energyShot radiusShot speedShow arena windowShow message windowShow score windowSlide/brake frictionStart CPU time [s]Start New TournamentStatisticsSurvival TimeThere are no arenas in the tournament.There are too few robots in the tournament.There must be at least two robots in the tournament.This action will kill the current tournament. Do you want to do that?TimeTimeout [s]TimescaleTotal PointsTournament could not be loaded.Tournament could not be saved.Tournament could not be started.Update interval [s]Window sizesYesProject-Id-Version: RealTime Battle Report-Msgid-Bugs-To: jonico@users.sourceforge.net POT-Creation-Date: 2005-10-08 16:22+0200 PO-Revision-Date: 2004-11-12 20:11 +0100 Last-Translator: Erik Ouchterlony and Ragnar Ouchterlony Language-Team: Erik and Ragnar MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Avsluta --competition_mode, -c tvlingslge --debug_level [0-5], -D stt debug-niv. Implicerar -d --debug_mode, -d debuglge --help, -h skriv ut denna hjlptext --log_file [fil], -l skapa log-file, om 'fil' r '-' s skickas loggen till STDOUT --message_file [fil], -m skicka meddelanden till 'fil'. Om 'fil' r '-' anvnds STDOUT. Om bde loggen och meddelanden skickas till STDOUT kommer '-m' att ignoreras --no_graphics, -g visa ingen grafik --normal_mode, -n normalt lge --option_file [fil], -o vlj instllningsfil (normalt: $HOME/.rtbrc) --replay [fil] -r visa spel sparat i 'fil'. om filen r '-' kommer STDIN anvndas --statistics_file [fil], -s skriv statistik till fil vid automatisk turneringsstart --tournament_file [fil], -t vlj turneringsfil fr automatisk start av turneringen --version, -v visa versionsnummer Lgg till Alla Alla arenor Verkstll ngra Rensa alla meddelanden Stng Debugniv: Std terstll Stoppa Avsluta spel Full omgng Anvnd nuvarande fnsterstorlekar och -positioner Sammanlagd stllning Dda markerad robot Hmta instllningar Hmta turnering Max Meddelande Min Ny turnering Nsta spel Nsta sekv Ingen inzoomning Ok Instllningar Flaggor: Paus Freg spel Freg sekv Ta bort Repris av turnering Robot Spara statistik Spara som standard Spara instllningar Spara turnering Vlj alla Sekv: Sekvens Totalt i sekvens Sekvens: Visa alla Visa endast markerad robot Brja Statistik Stega Stega bakt Stega framt Totalt Vlj ingen Anvndning: RealTimeBattle [flaggor] Zooma in Zooma ut *Avslutar**Spelet slut**Paus**Paus efter spelets slut**Spelet pgr**Stnger av robotar**Startar robotar*LuftmotstndArenaArenaskalaArena skvgArenor i bibliotekArenor i bibliotekBakgrundsfrgLg processtidsvarning [procent]Vlj en log-fil att spela uppVlj fil att spara statistik tillVlj turneringsfil att hmtaVlj installnings-fil att hmtaVlj installnings-fil att sparaVlj turneringsfil att spara tillFrg p RTB-meddelandenKakors frgKakors talrikhet [kakor per sekund]Kakors hgsta energiKakors lgsta energiKakors radieKunde inte ppna fil.Bibliotek fr tillflliga filerEnergiOmgivningFel iFel i den angivna turneringsfilen.Extra processtid-intervall [s]Extra processtid [s]ExtraSnabbspolningsfaktorFrgrnudsfrgSpelSpel %d i sekvens %dSpel %d i sekvens %d brjar p arenaSpelSpel per sekvensTyngdaccelerationArenafnster hjdArenafnster breddArenafnster x-positionArenafnster y-positionkontrollfnster x-positionkontrollfnster y-positionMeddelandefnster hjdMeddelandefnster breddMeddelandefnster x-positionMeddelandefnster y-positionResultatfnster hjdResultatfnster breddResultatfnster x-positionResultatfnster y-positionStatistikfnster hjdStatistikfnster breddSenastLoggningsfrekvens [Var n:te uppdateringsintervall]Max antal samtidiga robotarMax tidshoppMeddelandenMinors frgMinors talrikhet [minor per sekund]Minors hgsta energiMinors lgsta energiMinors radievrigtNamnNejAntal sekvenserInstllningarPlatsPongPlaceringTid mellan processkontrollerRobotRobots studskoefficientKanons hgsta rotationshast. [rad/s]Antal energiniver fr robotRobotfronts studskoefficientRobotfronts hrdhetskoefficientRobotfronts skyddskoefficientRobots frontstorlek [radianer]Robots hrdhetskoefficientRobotviktRobots maxaccelerationRobots maxenergiRobots hgsta rotationshast. [rad/s]Robots minaccelerationRobots skyddskoefficientRadars hgsta rotationshast. [rad/s]RobotradieRobot skvgRobots startenergiStartupptid fr robotar [s]Roboten med filnamnet %s har inte skickat ngot namnRobotar i bibliotekRobotar i turneringRobotar per sekvensRullfriktionPongSkicka robotens koordinaterSekvSkada p skytt (mult. m skottenergin)SkottRobots skotttenegi-kning [per sekund]Skotts hgsta energiSkotts lgsta energiSkottradieSkotthastighetVisa arenafnsterVisa meddelandefnsterVisa resultatfnsterGlid/bromsfriktionProcesstid [s]Starta ny turneringStatistikTid i livetIngen arena har valts.Fr f robotar i turneringen.Det mste vara minst tv robtar i en turnering.Detta kommer avbryta den pgende turningen. Vill du gra det?TidMax tids [s]TidsskalaSumma pongTurneringen kunde inte hmtas.Turneringen kunde inte sparas.Turneringen kunde inte startas.Uppdateringsintervall [s]FnsterJarealtimebattle-1.0.8/po/en@quot.gmo0000644000175000017500000003543310323175164015417 0ustar moimoi `a6xN09/iC ;NQU2~p?06 <IQZow   / ' -7= N Z eo t ~    %0 A MXq y!     -7N`o u  'Hg# % (=[ bn#w& 39Lc!!<!Y!{ 5U-Z!  !    $ ' ; C I P Y p v %   " !,!F! a!l!!!!!$! ""+">"-U"""" """"$"#%#?#O# _# k#v###### # #&$++$4W$E$$ $ $ $$% 9%Z% n%{%i%&6'N7'0'9''"(C);)Q"*Ut**~+ ,?,,, ,,,, --"- (-2- 8- C-/P- ----- --- - - . . . .$. ,. 8.C.L.`.h.z... .. .. . .. / /"/)/9/H/P/!_/ / / / /// //// 0 00/0C0X0j00 0 001#"1F1 ^1%l111 1111 1 2#272L2_2f2z222&22222363V3!v3!333!3!494U4p44 444-4!$5 F5S5 \5!h555 5555555555 66%+6Q6e6 6"666 67707O7f7$7 7777-7838H8 \8j8p88$88%888 8 99$989J9_9r9 9 9&9+949E(:n: s: : ::: :: ;;)HXp|V}^9cGygtrxo!(= % [Ks#JlIWm>Pk10qS7Rif$Zh'6-YBAw; @,N*aeEz~_<CMU`+\O8Fv.n L]b D?: {4"u3d2TQ5j/& Quit --competition_mode, -c competition mode --debug_level [0-5], -D sets the initial debug level. Implies -d --debug_mode, -d debug mode --help, -h prints this message --log_file [file], -l make log file, if 'file' is '-' the log is sent to STDOUT --message_file [file], -m redirect messages to 'file'. With '-' as 'file', STDOUT is used. If both log and messages are sent to STDOUT, '-m' will be ignored --no_graphics, -g no graphics will be displayed --normal_mode, -n normal mode (default) --option_file [file], -o selects option-file (default: $HOME/.rtbrc) --port_number -p specifies the port to listen on (default 32134) --replay [file] -r a log file to replay. if '-' is specified as file, input is taken from STDIN --statistics_file [file], -s file to print the statistics to when autostarting --tournament_file [file], -t specify a tournament file to autostart a tournament --version, -v prints the version number Add All All Arenas Apply Cancel Clear all messages Close Debug Level: Def Default End End Game Full Round Grab sizes and positions from present windows Grand Total Kill Marked Robot Load options Load tournament Max Message Min New Tournament Next Game Next Seq No Zoom Ok Options Options: Pause Prev Game Prev Seq Remove Replay Tournament Robot Save Statistics Save as default Save options Save tournament Select All Seq: Sequence Sequence Total Sequence: Show all Show only marked robot Start Statistics Step Step backward Step forward Total Unselect All Usage: RealTimeBattle [options] Zoom In Zoom Out *Exiting**Finished**Paused**Pausing after game**Running**Shutting down robots**Starting robots*Air resistanceArenaArena scaleArena search pathArenas in DirectoryArenas in TournamentBackground colourCPU time warning percentageChoose a log file to replayChoose a statistics file to saveChoose a tournament file to loadChoose an options file to loadChoose an options file to saveChoose file to save tournament intoColour for RTB messagesCookie colourCookie frequency [cookies per second]Cookie max energyCookie min energyCookie radiusCould not open file.Directory for temporary filesEnergyEnvironmentError inError in specified tournament file.Extra CPU period [s]Extra CPU time [s]ExtrasFast forward factorForeground colourGameGame %d of sequence %dGame %d of sequence %d begins on arenaGamesGames per sequenceGravitational ConstantInitial Arena window heightInitial Arena window widthInitial Arena window x positionInitial Arena window y positionInitial Control window x positionInitial Control window y positionInitial Message window heightInitial Message window widthInitial Message window x positionInitial Message window y positionInitial Score window heightInitial Score window widthInitial Score window x positionInitial Score window y positionInitial Statistics window heightInitial Statistics window widthLastLogging frequency [Each n:th update interval]Max robots allowed simultaneouslyMax timestepMessagesMine colourMine frequency [mines per second]Mine max energyMine min energyMine radiusMiscNameNoNumber of sequencesOptionsPlacePointsPositionProcess check intervalRobotRobot bounce coefficientRobot cannon max rotate speed [rad/s]Robot energy levelsRobot front bounce coefficientRobot front hardness coefficientRobot front protection coefficientRobot frontsize [radians]Robot hardness coefficientRobot massRobot max accelerationRobot max energyRobot max rotate speed [rad/s]Robot min accelerationRobot protection coefficientRobot radar max rotate speed [rad/s]Robot radiusRobot search pathRobot start energyRobot startup time [s]Robot with filename %s has not given any nameRobots in DirectoryRobots in TournamentRobots per sequenceRoll frictionScoreSend robot coordinatesSeqShooting penalty (times shot energy)ShotShot energy increase speed [energy/s]Shot max energyShot min energyShot radiusShot speedShow arena windowShow message windowShow score windowSlide/brake frictionStart CPU time [s]Start New TournamentStatisticsSurvival TimeThere are no arenas in the tournament.There are too few robots in the tournament.There must be at least two robots in the tournament.This action will kill the current tournament. Do you want to do that?TimeTimeout [s]TimescaleTotal PointsTournament could not be loaded.Tournament could not be saved.Tournament could not be started.Update interval [s]Window sizesYesProject-Id-Version: RealTimeBattle Report-Msgid-Bugs-To: jonico@users.sourceforge.net POT-Creation-Date: 2005-10-08 16:22+0200 PO-Revision-Date: 2005-10-08 16:22+0200 Last-Translator: Automatically generated Language-Team: none MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); Quit --competition_mode, -c competition mode --debug_level [0-5], -D sets the initial debug level. Implies -d --debug_mode, -d debug mode --help, -h prints this message --log_file [file], -l make log file, if ‘file’ is ‘-’ the log is sent to STDOUT --message_file [file], -m redirect messages to 'file'. With ‘-’ as 'file', STDOUT is used. If both log and messages are sent to STDOUT, ‘-m’ will be ignored --no_graphics, -g no graphics will be displayed --normal_mode, -n normal mode (default) --option_file [file], -o selects option-file (default: $HOME/.rtbrc) --port_number -p specifies the port to listen on (default 32134) --replay [file] -r a log file to replay. if ‘-’ is specified as file, input is taken from STDIN --statistics_file [file], -s file to print the statistics to when autostarting --tournament_file [file], -t specify a tournament file to autostart a tournament --version, -v prints the version number Add All All Arenas Apply Cancel Clear all messages Close Debug Level: Def Default End End Game Full Round Grab sizes and positions from present windows Grand Total Kill Marked Robot Load options Load tournament Max Message Min New Tournament Next Game Next Seq No Zoom Ok Options Options: Pause Prev Game Prev Seq Remove Replay Tournament Robot Save Statistics Save as default Save options Save tournament Select All Seq: Sequence Sequence Total Sequence: Show all Show only marked robot Start Statistics Step Step backward Step forward Total Unselect All Usage: RealTimeBattle [options] Zoom In Zoom Out *Exiting**Finished**Paused**Pausing after game**Running**Shutting down robots**Starting robots*Air resistanceArenaArena scaleArena search pathArenas in DirectoryArenas in TournamentBackground colourCPU time warning percentageChoose a log file to replayChoose a statistics file to saveChoose a tournament file to loadChoose an options file to loadChoose an options file to saveChoose file to save tournament intoColour for RTB messagesCookie colourCookie frequency [cookies per second]Cookie max energyCookie min energyCookie radiusCould not open file.Directory for temporary filesEnergyEnvironmentError inError in specified tournament file.Extra CPU period [s]Extra CPU time [s]ExtrasFast forward factorForeground colourGameGame %d of sequence %dGame %d of sequence %d begins on arenaGamesGames per sequenceGravitational ConstantInitial Arena window heightInitial Arena window widthInitial Arena window x positionInitial Arena window y positionInitial Control window x positionInitial Control window y positionInitial Message window heightInitial Message window widthInitial Message window x positionInitial Message window y positionInitial Score window heightInitial Score window widthInitial Score window x positionInitial Score window y positionInitial Statistics window heightInitial Statistics window widthLastLogging frequency [Each n:th update interval]Max robots allowed simultaneouslyMax timestepMessagesMine colourMine frequency [mines per second]Mine max energyMine min energyMine radiusMiscNameNoNumber of sequencesOptionsPlacePointsPositionProcess check intervalRobotRobot bounce coefficientRobot cannon max rotate speed [rad/s]Robot energy levelsRobot front bounce coefficientRobot front hardness coefficientRobot front protection coefficientRobot frontsize [radians]Robot hardness coefficientRobot massRobot max accelerationRobot max energyRobot max rotate speed [rad/s]Robot min accelerationRobot protection coefficientRobot radar max rotate speed [rad/s]Robot radiusRobot search pathRobot start energyRobot startup time [s]Robot with filename %s has not given any nameRobots in DirectoryRobots in TournamentRobots per sequenceRoll frictionScoreSend robot coordinatesSeqShooting penalty (times shot energy)ShotShot energy increase speed [energy/s]Shot max energyShot min energyShot radiusShot speedShow arena windowShow message windowShow score windowSlide/brake frictionStart CPU time [s]Start New TournamentStatisticsSurvival TimeThere are no arenas in the tournament.There are too few robots in the tournament.There must be at least two robots in the tournament.This action will kill the current tournament. Do you want to do that?TimeTimeout [s]TimescaleTotal PointsTournament could not be loaded.Tournament could not be saved.Tournament could not be started.Update interval [s]Window sizesYesrealtimebattle-1.0.8/po/en@boldquot.gmo0000644000175000017500000003550310323175165016257 0ustar moimoi `a6xN09/iC ;NQU2~p?06 <IQZow   / ' -7= N Z eo t ~    %0 A MXq y!     -7N`o u  'Hg# % (=[ bn#w& 39Lc!!<!Y!{ 5U-Z!  !    $ ' ; C I P Y p v %   " !,!F! a!l!!!!!$! ""+">"-U"""" """"$"#%#?#O# _# k#v###### # #&$++$4W$E$$ $ $ $$% 9%Z% n%{%i%&6'N7'0'9''2(C);*QB*U**~+4,?,,, - ---3-;-J- P-Z- `- k-/x- ----- --. . . ).3. 8. B.L. T. `.k.t...... .. .. / //5/ =/J/Q/a/p/x/!/ / / / /// //0$030 90E0W0k0000 0 0 1+1#J1n1 1%111 1122 &222#;2_2t222222&2223'3C3^3~3!3!334!4!?4a4}444 445-5!L5 n5{5 5!555 5555556 66646:6%S6y66 6"66 7 %707G7X7w77$7 7778-8G8[8p8 8888$88%899 #9 /9:9L9`9r999 9 9&9+94:EP:: : : ::: :; 2;?;)HXp|V}^9cGygtrxo!(= % [Ks#JlIWm>Pk10qS7Rif$Zh'6-YBAw; @,N*aeEz~_<CMU`+\O8Fv.n L]b D?: {4"u3d2TQ5j/& Quit --competition_mode, -c competition mode --debug_level [0-5], -D sets the initial debug level. Implies -d --debug_mode, -d debug mode --help, -h prints this message --log_file [file], -l make log file, if 'file' is '-' the log is sent to STDOUT --message_file [file], -m redirect messages to 'file'. With '-' as 'file', STDOUT is used. If both log and messages are sent to STDOUT, '-m' will be ignored --no_graphics, -g no graphics will be displayed --normal_mode, -n normal mode (default) --option_file [file], -o selects option-file (default: $HOME/.rtbrc) --port_number -p specifies the port to listen on (default 32134) --replay [file] -r a log file to replay. if '-' is specified as file, input is taken from STDIN --statistics_file [file], -s file to print the statistics to when autostarting --tournament_file [file], -t specify a tournament file to autostart a tournament --version, -v prints the version number Add All All Arenas Apply Cancel Clear all messages Close Debug Level: Def Default End End Game Full Round Grab sizes and positions from present windows Grand Total Kill Marked Robot Load options Load tournament Max Message Min New Tournament Next Game Next Seq No Zoom Ok Options Options: Pause Prev Game Prev Seq Remove Replay Tournament Robot Save Statistics Save as default Save options Save tournament Select All Seq: Sequence Sequence Total Sequence: Show all Show only marked robot Start Statistics Step Step backward Step forward Total Unselect All Usage: RealTimeBattle [options] Zoom In Zoom Out *Exiting**Finished**Paused**Pausing after game**Running**Shutting down robots**Starting robots*Air resistanceArenaArena scaleArena search pathArenas in DirectoryArenas in TournamentBackground colourCPU time warning percentageChoose a log file to replayChoose a statistics file to saveChoose a tournament file to loadChoose an options file to loadChoose an options file to saveChoose file to save tournament intoColour for RTB messagesCookie colourCookie frequency [cookies per second]Cookie max energyCookie min energyCookie radiusCould not open file.Directory for temporary filesEnergyEnvironmentError inError in specified tournament file.Extra CPU period [s]Extra CPU time [s]ExtrasFast forward factorForeground colourGameGame %d of sequence %dGame %d of sequence %d begins on arenaGamesGames per sequenceGravitational ConstantInitial Arena window heightInitial Arena window widthInitial Arena window x positionInitial Arena window y positionInitial Control window x positionInitial Control window y positionInitial Message window heightInitial Message window widthInitial Message window x positionInitial Message window y positionInitial Score window heightInitial Score window widthInitial Score window x positionInitial Score window y positionInitial Statistics window heightInitial Statistics window widthLastLogging frequency [Each n:th update interval]Max robots allowed simultaneouslyMax timestepMessagesMine colourMine frequency [mines per second]Mine max energyMine min energyMine radiusMiscNameNoNumber of sequencesOptionsPlacePointsPositionProcess check intervalRobotRobot bounce coefficientRobot cannon max rotate speed [rad/s]Robot energy levelsRobot front bounce coefficientRobot front hardness coefficientRobot front protection coefficientRobot frontsize [radians]Robot hardness coefficientRobot massRobot max accelerationRobot max energyRobot max rotate speed [rad/s]Robot min accelerationRobot protection coefficientRobot radar max rotate speed [rad/s]Robot radiusRobot search pathRobot start energyRobot startup time [s]Robot with filename %s has not given any nameRobots in DirectoryRobots in TournamentRobots per sequenceRoll frictionScoreSend robot coordinatesSeqShooting penalty (times shot energy)ShotShot energy increase speed [energy/s]Shot max energyShot min energyShot radiusShot speedShow arena windowShow message windowShow score windowSlide/brake frictionStart CPU time [s]Start New TournamentStatisticsSurvival TimeThere are no arenas in the tournament.There are too few robots in the tournament.There must be at least two robots in the tournament.This action will kill the current tournament. Do you want to do that?TimeTimeout [s]TimescaleTotal PointsTournament could not be loaded.Tournament could not be saved.Tournament could not be started.Update interval [s]Window sizesYesProject-Id-Version: RealTimeBattle Report-Msgid-Bugs-To: jonico@users.sourceforge.net POT-Creation-Date: 2005-10-08 16:22+0200 PO-Revision-Date: 2005-10-08 16:22+0200 Last-Translator: Automatically generated Language-Team: none MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); Quit --competition_mode, -c competition mode --debug_level [0-5], -D sets the initial debug level. Implies -d --debug_mode, -d debug mode --help, -h prints this message --log_file [file], -l make log file, if ‘file’ is ‘-’ the log is sent to STDOUT --message_file [file], -m redirect messages to 'file'. With ‘-’ as 'file', STDOUT is used. If both log and messages are sent to STDOUT, ‘-m’ will be ignored --no_graphics, -g no graphics will be displayed --normal_mode, -n normal mode (default) --option_file [file], -o selects option-file (default: $HOME/.rtbrc) --port_number -p specifies the port to listen on (default 32134) --replay [file] -r a log file to replay. if ‘-’ is specified as file, input is taken from STDIN --statistics_file [file], -s file to print the statistics to when autostarting --tournament_file [file], -t specify a tournament file to autostart a tournament --version, -v prints the version number Add All All Arenas Apply Cancel Clear all messages Close Debug Level: Def Default End End Game Full Round Grab sizes and positions from present windows Grand Total Kill Marked Robot Load options Load tournament Max Message Min New Tournament Next Game Next Seq No Zoom Ok Options Options: Pause Prev Game Prev Seq Remove Replay Tournament Robot Save Statistics Save as default Save options Save tournament Select All Seq: Sequence Sequence Total Sequence: Show all Show only marked robot Start Statistics Step Step backward Step forward Total Unselect All Usage: RealTimeBattle [options] Zoom In Zoom Out *Exiting**Finished**Paused**Pausing after game**Running**Shutting down robots**Starting robots*Air resistanceArenaArena scaleArena search pathArenas in DirectoryArenas in TournamentBackground colourCPU time warning percentageChoose a log file to replayChoose a statistics file to saveChoose a tournament file to loadChoose an options file to loadChoose an options file to saveChoose file to save tournament intoColour for RTB messagesCookie colourCookie frequency [cookies per second]Cookie max energyCookie min energyCookie radiusCould not open file.Directory for temporary filesEnergyEnvironmentError inError in specified tournament file.Extra CPU period [s]Extra CPU time [s]ExtrasFast forward factorForeground colourGameGame %d of sequence %dGame %d of sequence %d begins on arenaGamesGames per sequenceGravitational ConstantInitial Arena window heightInitial Arena window widthInitial Arena window x positionInitial Arena window y positionInitial Control window x positionInitial Control window y positionInitial Message window heightInitial Message window widthInitial Message window x positionInitial Message window y positionInitial Score window heightInitial Score window widthInitial Score window x positionInitial Score window y positionInitial Statistics window heightInitial Statistics window widthLastLogging frequency [Each n:th update interval]Max robots allowed simultaneouslyMax timestepMessagesMine colourMine frequency [mines per second]Mine max energyMine min energyMine radiusMiscNameNoNumber of sequencesOptionsPlacePointsPositionProcess check intervalRobotRobot bounce coefficientRobot cannon max rotate speed [rad/s]Robot energy levelsRobot front bounce coefficientRobot front hardness coefficientRobot front protection coefficientRobot frontsize [radians]Robot hardness coefficientRobot massRobot max accelerationRobot max energyRobot max rotate speed [rad/s]Robot min accelerationRobot protection coefficientRobot radar max rotate speed [rad/s]Robot radiusRobot search pathRobot start energyRobot startup time [s]Robot with filename %s has not given any nameRobots in DirectoryRobots in TournamentRobots per sequenceRoll frictionScoreSend robot coordinatesSeqShooting penalty (times shot energy)ShotShot energy increase speed [energy/s]Shot max energyShot min energyShot radiusShot speedShow arena windowShow message windowShow score windowSlide/brake frictionStart CPU time [s]Start New TournamentStatisticsSurvival TimeThere are no arenas in the tournament.There are too few robots in the tournament.There must be at least two robots in the tournament.This action will kill the current tournament. Do you want to do that?TimeTimeout [s]TimescaleTotal PointsTournament could not be loaded.Tournament could not be saved.Tournament could not be started.Update interval [s]Window sizesYesrealtimebattle-1.0.8/po/ChangeLog0000644000175000017500000000070010170545361015037 0ustar moimoi2004-11-12 gettextize * Makefile.in.in: Upgrade to gettext-0.14.1. * boldquot.sed: New file, from gettext-0.14.1. * en@boldquot.header: New file, from gettext-0.14.1. * en@quot.header: New file, from gettext-0.14.1. * insert-header.sin: New file, from gettext-0.14.1. * quot.sed: New file, from gettext-0.14.1. * remove-potcdate.sin: New file, from gettext-0.14.1. * Rules-quot: New file, from gettext-0.14.1. realtimebattle-1.0.8/po/LINGUAS0000644000175000017500000000012510323173754014316 0ustar moimoi# Languages which your application supports de es gl ja pl pt sv en@quot en@boldquot realtimebattle-1.0.8/README0000644000175000017500000000527610260540301013531 0ustar moimoi*** PLEASE READ EXTRAROBOTS.README CAREFULLY IF YOU LIKE TO USE THE ROBOTS SUPPLIED WITH THIS PACKAGE *** RealTimeBattle -------------- RealTimeBattle is a programming game for Unix, in which robots controlled by programs are fighting each other. The goal is to destroy the enemies, using the radar to examine the environment and the cannon to shoot. RealTimeBattle is open source software, distributed under the General Public License (GPL). Read more about this license in the file COPYING. More Information ---------------- For info on installation, read the file INSTALL. More information on usage, construction of robots and more can be found in the user manual in the subdirectory Documentation. If you encounter a bug or some problem of any sort, please look in the files BUGS, TODO and FAQ in this directory, as well as the corresponding pages at the RealTimeBattle homepage at 'http://realtimebattle.sourceforge.net' Mailing lists ------------- There are three mailing-lists for RealTimeBattle. One for announcements, one for discussions and one for development. The announcement-list is called realtimebattle-announce. It is a moderated low traffic list where only posts of general interest to RealTimeBattle users get through. Here will, for example, new releases and competitions be announced. To subscribe, unsubscribe or set your preferences go to the web page 'http://lists.sourceforge.net/mailman/listinfo/realtimebattle-announce'. There is also an email-based interface, for help send an email to 'realtimebattle-announce-request@lists.sourceforge.net' with just the word 'help' in the subject or body. The discussion-list is called realtimebattle-discussion. Here can anything related to RealTimeBattle be discussed. It is not moderated. To subscribe, unsubscribe or set your preferences, go to 'http://lists.sourceforge.net/mailman/listinfo/realtimebattle-discussion'. There is also an email-based interface, for help send an email to 'realtimebattle-discussion-request@lists.sourceforge.net' with just the word 'help' in the subject or body. The development-list is called realtimebattle-devel. Here can anything related to RealTimeBattle development be discussed. It is not moderated. To subscribe, unsubscribe or set your preferences, go to 'http://lists.sourceforge.net/mailman/listinfo/realtimebattle-devel'. There is also an email-based interface, for help send an email to 'realtimebattle-devel-request@lists.sourceforge.net' with just the word 'help' in the subject or body. Contacts -------- Comments, bug reports and/or patches can be sent to the email address jonico@users.sourceforge.net Hope you will enjoy your time using the program! realtimebattle-1.0.8/configure.in0000644000175000017500000002070410324167643015172 0ustar moimoidnl Process this file with autoconf to produce a configure script. dnl Created by anjuta, later hardly modified by Johannes Nicolai AC_INIT(src/Robot.cc) AC_CONFIG_AUX_DIR(config) dnl Version numbers RTB_MAJOR_VERSION=1 RTB_MINOR_VERSION=0 RTB_MICRO_VERSION=8 RTB_EXTRA_VERSION=[-Ext] RTB_RPM_RELEASE=1 RTB_LAST_RELEASED_VERSION=1.0.8 RTB_LAST_RELEASED_RELEASE=2 RTB_VERSION=$RTB_MAJOR_VERSION.$RTB_MINOR_VERSION.$RTB_MICRO_VERSION$RTB_EXTRA_VERSION RTB_RPM_VERSION="$RTB_VERSION"-"$RTB_RPM_RELEASE" AC_SUBST(RTB_MAJOR_VERSION) AC_SUBST(RTB_MINOR_VERSION) AC_SUBST(RTB_MICRO_VERSION) AC_SUBST(RTB_RPM_RELEASE) AC_SUBST(RTB_RPM_VERSION) AC_SUBST(RTB_VERSION) VERSION=$RTB_VERSION PACKAGE=RealTimeBattle AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE",[Package name]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION",[version number]) AC_SUBST(PACKAGE) AC_SUBST(VERSION) dnl Automake initialization AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) AM_CONFIG_HEADER(config.h) dnl Search for install_info AC_PATH_PROG(install_info, install-info, no, $PATH:/sbin:/usr/sbin/:/usr/local/sbin) INSTALL_INFO=$install_info dnl Search for sgml-tools AC_CHECK_PROG(sgml2html, sgml2html, yes, no) AM_CONDITIONAL(SGML2HTML, test x$sgml2html = xyes) AC_CHECK_PROG(sgml2latex, sgml2latex, yes, no) AM_CONDITIONAL(SGML2LATEX, test x$sgml2latex = xyes) AC_CHECK_PROG(sgml2info, sgml2info, yes, no) AM_CONDITIONAL(SGML2INFO, test x$sgml2info = xyes) AC_CHECK_PROG(sgml2txt, sgml2txt, yes, no) AM_CONDITIONAL(SGML2TXT, test x$sgml2txt = xyes) AC_CHECK_PROG(sgml2lyx, sgml2lyx, yes, no) AM_CONDITIONAL(SGML2LYX, test x$sgml2lyx = xyes) AC_CHECK_PROG(sgml2rtf, sgml2rtf, yes, no) AM_CONDITIONAL(SGML2RTF, test x$sgml2rtf = xyes) dnl Checks for programs. AC_PROG_CXX AC_PROG_INSTALL AC_PREFIX_DEFAULT(/usr/local) dnl switch to C++ mode AC_LANG_SAVE AC_LANG_CPLUSPLUS AM_PROG_CC_STDC AC_ISC_POSIX dnl Check for header files AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h strings.h sys/time.h unistd.h floatingpoint.h sys/types.h) AC_EGREP_HEADER(RLIMIT_NPROC, sys/resource.h, AC_DEFINE(HAVE_RLIMIT_NPROC,1,[cheat_check])) # network support AC_ARG_ENABLE(network, [ --enable-network make a version with network support], enable_network=yes, enable_network=no) AM_CONDITIONAL(NO_NETWORK, test x$enable_network = xno) # graphics / GTK AC_ARG_ENABLE(graphics, [ --disable-graphics make a version without a GUI], enable_graphics=no, enable_graphics=yes) AM_CONDITIONAL(NO_GRAPHICS, test x$enable_graphics = xno) if test x$enable_graphics = "xyes"; then dnl Here we test whether we have to link against lsocket and lnsl ETR_SOCKET_NSL fi # Check for GTK+. if test "x$enable_graphics" = "xyes"; then dnl Checks for libraries. PKG_CHECK_MODULES([GTK], [gtk+-2.0 gdk-2.0],,[exit]) AC_SUBST(GTK_LIBS) AC_SUBST(GTK_CFLAGS) fi dnl debugging options AC_ARG_ENABLE(debug, [ RealTimeBattle options: --enable-debug[=no/yes] turn on debugging [default=no]],, enable_debug=no) dnl compile warning options AC_ARG_ENABLE(compile-warnings, [ --enable-compile-warnings turn on compile time warnings], , enable_compile_warnings=no) WARNING_FLAGS="-Wall" PROFILE_FLAGS="-pg" if test "x$enable_compile_warnings" = "xyes"; then CXXFLAGS="$CXXFLAGS $WARNING_FLAGS" fi dnl enable profiling AC_ARG_ENABLE(prof, [], enable_prof=yes, enable_prof=no) if test "x$enable_prof" = "xyes"; then CXXFLAGS="$CXXFLAGS $PROFILEFLAGS" fi changequote(,)dnl if test "x$enable_debug" = "xyes"; then case " $CXXFLAGS " in *[\ \ ]-g[\ \ ]*) ;; *) CXXFLAGS="$CXXFLAGS -g " ;; esac case " $CFLAGS " in *[\ \ ]-g[\ \ ]*) ;; *) CFLAGS="$CFLAGS -g " ;; esac CXXFLAGS=`echo "$CXXFLAGS " | sed "s/-O[0-9]* //"` CFLAGS=`echo "$CXXFLAGS " | sed "s/-O[0-9]* //"` else CXXFLAGS=`echo "$CXXFLAGS " | sed "s/-g //"` CFLAGS=`echo "$CFLAGS " | sed "s/-g //"` if test "x$enable_debug" = "xno"; then CPPFLAGS="$CPPFLAGS -DNDEBUG" fi fi changequote([,])dnl AC_ARG_ENABLE(rpm, [ --enable-rpm=[opts] used when making RPM-packages], use_rpm=yes, use_rpm=no) changequote(,)dnl if test "x$use_rpm" = "xyes"; then CXXFLAGS="$enable_rpm" CFLAGS="$enable_rpm" INSTALL_INFO=no fi changequote([,])dnl AM_CONDITIONAL(ENABLE_RPM, test x$use_rpm = xyes) AC_ARG_WITH(rtb_dir, [ --with-rtb-dir=[path] directory for rtb installation [EPREFIX/games/RealTimeBattle]],, with_rtb_dir=['${exec_prefix}/games/RealTimeBattle']) RTB_DIR=$with_rtb_dir AC_SUBST(RTB_DIR) DOCS_DIR=[${RTB_DIR}/Documentation] AC_SUBST(DOCS_DIR) AC_SUBST(INSTALL_INFO) RTB_EXPAND_DIR(ROBOTDIR, "${RTB_DIR}/Robots") AC_SUBST(ROBOTDIR) RTB_EXPAND_DIR(ARENADIR, "${RTB_DIR}/Arenas") AC_SUBST(ARENADIR) AC_DEFINE_UNQUOTED(ROBOTDIR, "$ROBOTDIR",[robothome]) AC_DEFINE_UNQUOTED(ARENADIR, "$ARENADIR",[arenahome]) AC_ARG_WITH(nls_localedir, [ --with-nls-localedir=[path] Data directory for NLS, parent of locale [DATADIR/locale]],, with_nls_localedir=['${datadir}/locale']) RTB_EXPAND_DIR(RTB_LOCALEDIR, "${with_nls_localedir}") AC_SUBST(RTB_LOCALEDIR) RTB_EXPAND_DIR(RTB_LOCALEDIR, "${RTB_LOCALEDIR}") #Need to expand twice! AC_DEFINE_UNQUOTED(RTB_LOCALEDIR, "$RTB_LOCALEDIR",[localehome]) AC_CHECK_LIB(stdc++, getc,stdcxx=yes, AC_MSG_ERROR(You need to have libstdc++ installed)) AC_CHECK_HEADER(vector,, AC_MSG_ERROR(You need to have the libstdc++ headers installed)) if test "x$stdcxx" = "xyes"; then STDCXX_LIBS=-lstdc++ fi AC_SUBST(STDCXX_LIBS) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE AC_TYPE_PID_T AC_HEADER_TIME dnl Checks for library functions. AC_TYPE_SIGNAL AC_CHECK_FUNCS(select) AC_CHECK_FUNC(getopt_long,, [getopt=yes]) AM_CONDITIONAL(NO_GETOPT_LONG, test x$getopt = xyes) AC_CHECK_LIB(xpg4, setlocale) dnl Initialize localization support AM_GNU_GETTEXT AM_GNU_GETTEXT_VERSION(0.14.1) dnl Checks for Additional stuffs. GETTEXT_PACKAGE=RealTimeBattle AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTTEXT_PACKAGE", [Package name for gettext]) dnl begin of robot specific checks (only needed for perl , joystick and java bots ) dnl Check if linux joystick api is availabe (used for joypad_robot) AC_CHECK_HEADERS(linux/joystick.h,[linuxjoystickavailable="yes"],[linuxjoystickavailable="false"; AC_MSG_WARN([No joystick API found, cannot compile joypad robot])]) AM_CONDITIONAL([linuxjoystickavailable],[test x$linuxjoystickavailable = "xyes"]) dnl now configure java AC_CHECK_CLASSPATH AC_PROG_JAVAC AM_CONDITIONAL([javacavailable],[test "x$JAVAC" != x]) AC_PROG_JAVA AM_CONDITIONAL([javaavailable],[test "x$JAVA" != x]) dnl now configure perl AX_SYS_PERLSHARPBANG AM_CONDITIONAL([perlavailable],[test "x$PERL_SHEBANG" != x ]) dnl now configure python AX_WITH_PYTHON(2.2, missing) AM_CONDITIONAL([pythonavailable],[test "x$PYTHON" != "xmissing"]) AC_SUBST(PYTHON) dnl now configure the RealTimeBattle Team Framework with the Brotfrucht strategy if test -d "$srcdir/team-framework"; then AC_CONFIG_SUBDIRS([team-framework]) else AC_MSG_WARN(["You have deleted the RealTimeBattle Team Framework, so this part is not to be built!"]) fi dnl restore language AC_LANG_RESTORE dnl Finally, the default behavior of msgmerge breaks 2-byte character dnl encodings, as used in ja.po and others. dnl We fix this by forcing the "-w 0" option on all msgmerge calls. AC_OUTPUT_COMMANDS( [if test -f po/Makefile ; then if grep 'MSGMERGE = PATH=../src:$$PATH msgmerge -w 0' po/Makefile >/dev/null 2>&1 ; then # has already been modified : else echo modifying po/Makefile mv -f po/Makefile po/Makefile.tmp sed -e 's/MSGMERGE = PATH=..\/src:$$PATH msgmerge/MSGMERGE = PATH=..\/src:$$PATH msgmerge -w 0/' po/Makefile.tmp > po/Makefile rm po/Makefile.tmp fi fi]) AC_OUTPUT([ m4/Makefile intl/Makefile Makefile po/Makefile.in Arenas/Makefile Packages/Makefile Packages/rpm/Makefile Packages/debian/Makefile Packages/freebsd/Makefile Documentation/Makefile Documentation/German/Makefile Documentation/Spanish/Makefile Documentation/French/Makefile src/Makefile Robots/Makefile Robots/seek_and_destroy/Makefile Robots/rotate_and_fire/Makefile Robots/empty/Makefile Robots/xt-bot/Makefile Robots/thomas2/Makefile Robots/joypad_robot/Makefile Robots/jBot/Makefile Robots/jBot/jBot.robot Robots/perl-Skeleton/perl-Skeleton.robot Robots/perl-Skeleton/Makefile Robots/perl/perl.robot Robots/perl/Makefile Robots/raziel/raziel.py.robot Robots/raziel/Makefile include/Makefile ]) realtimebattle-1.0.8/aclocal.m40000644000175000017500000012503110324167702014514 0ustar moimoi# generated automatically by aclocal 1.9.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This file 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. # -*- Autoconf -*- # Copyright (C) 2002, 2003 Free Software Foundation, Inc. # Generated from amversion.in; do not edit by hand. # 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 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.3])]) # AM_AUX_DIR_EXPAND # Copyright (C) 2001, 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 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. # serial 3 # This was merged into AC_PROG_CC in Autoconf. AU_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC AC_DIAGNOSE([obsolete], [$0: your code should no longer depend upon `am_cv_prog_cc_stdc', but upon `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when you adjust the code. You can also remove the above call to AC_PROG_CC if you already called it elsewhere.]) am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc ]) AU_DEFUN([fp_PROG_CC_STDC]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004 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. # serial 6 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # serial 7 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # 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. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # 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. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 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. # serial 7 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # 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. # serial 11 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright (C) 2001, 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. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # -*- Autoconf -*- # Copyright (C) 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. # serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 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. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 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. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # Copyright (C) 2003, 2004 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. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 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. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page dnl also defines GSTUFF_PKG_ERRORS on error AC_DEFUN(PKG_CHECK_MODULES, [ succeeded=no if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then AC_MSG_CHECKING(for $2) if $PKG_CONFIG --exists "$2" ; then AC_MSG_RESULT(yes) succeeded=yes AC_MSG_CHECKING($1_CFLAGS) $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` AC_MSG_RESULT($$1_CFLAGS) AC_MSG_CHECKING($1_LIBS) $1_LIBS=`$PKG_CONFIG --libs "$2"` AC_MSG_RESULT($$1_LIBS) else $1_CFLAGS="" $1_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` ifelse([$4], ,echo $$1_PKG_ERRORS,) fi AC_SUBST($1_CFLAGS) AC_SUBST($1_LIBS) else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then ifelse([$3], , :, [$3]) else ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) fi ]) # # Check to make sure that the build environment is sane. # # Copyright (C) 1996, 1997, 2000, 2001, 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. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # AM_PROG_INSTALL_STRIP # Copyright (C) 2001, 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. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004 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. # serial 1 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([config/acinclude.m4]) m4_include([m4/codeset.m4]) m4_include([m4/gettext.m4]) m4_include([m4/glibc21.m4]) m4_include([m4/iconv.m4]) m4_include([m4/intdiv0.m4]) m4_include([m4/intmax.m4]) m4_include([m4/inttypes-pri.m4]) m4_include([m4/inttypes.m4]) m4_include([m4/inttypes_h.m4]) m4_include([m4/lcmessage.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/longdouble.m4]) m4_include([m4/longlong.m4]) m4_include([m4/nls.m4]) m4_include([m4/po.m4]) m4_include([m4/printf-posix.m4]) m4_include([m4/progtest.m4]) m4_include([m4/signed.m4]) m4_include([m4/size_max.m4]) m4_include([m4/stdint_h.m4]) m4_include([m4/uintmax_t.m4]) m4_include([m4/ulonglong.m4]) m4_include([m4/wchar_t.m4]) m4_include([m4/wint_t.m4]) m4_include([m4/xsize.m4]) realtimebattle-1.0.8/Makefile.am0000644000175000017500000000074110324166165014712 0ustar moimoiSUBDIRS = m4 intl include po src Packages Arenas Robots $(subdirs) Documentation rtbextradir = $(RTB_DIR) rtbextra_DATA = RealTimeBattle.xpm tournament.txt rtblogo1024.jpg rtblogo1600.jpg rtb_logo.jpg EXTRA_DIST = config/config.rpath config/mkinstalldirs config/config.rpath $(rtbextra_DATA) debian freebsd rpm: cd Packages/$@ && $(MAKE) $@ packages: cd Packages && $(MAKE) packages ACLOCAL_AMFLAGS = -I m4 -I config AUTOMAKE_OPTIONS=dist-bzip2 dist-zip subdir-objects realtimebattle-1.0.8/Makefile.in0000644000175000017500000005734310324167714014736 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure $(top_srcdir)/intl/Makefile.in \ ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS TODO \ config/config.guess config/config.rpath config/config.sub \ config/depcomp config/install-sh config/missing \ config/mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.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)/config/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = intl/Makefile 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|^.*/||'`; am__installdirs = "$(DESTDIR)$(rtbextradir)" rtbextraDATA_INSTALL = $(INSTALL_DATA) DATA = $(rtbextra_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) 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 $(distdir).tar.bz2 $(distdir).zip GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ SUBDIRS = m4 intl include po src Packages Arenas Robots $(subdirs) Documentation rtbextradir = $(RTB_DIR) rtbextra_DATA = RealTimeBattle.xpm tournament.txt rtblogo1024.jpg rtblogo1600.jpg rtb_logo.jpg EXTRA_DIST = config/config.rpath config/mkinstalldirs config/config.rpath $(rtbextra_DATA) ACLOCAL_AMFLAGS = -I m4 -I config AUTOMAKE_OPTIONS = dist-bzip2 dist-zip subdir-objects all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu 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: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ uninstall-info-am: install-rtbextraDATA: $(rtbextra_DATA) @$(NORMAL_INSTALL) test -z "$(rtbextradir)" || $(mkdir_p) "$(DESTDIR)$(rtbextradir)" @list='$(rtbextra_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(rtbextraDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(rtbextradir)/$$f'"; \ $(rtbextraDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(rtbextradir)/$$f"; \ done uninstall-rtbextraDATA: @$(NORMAL_UNINSTALL) @list='$(rtbextra_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(rtbextradir)/$$f'"; \ rm -f "$(DESTDIR)$(rtbextradir)/$$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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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) config.h.in $(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) config.h.in $(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) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(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)/Robots/jBot $(distdir)/Robots/perl $(distdir)/Robots/perl-Skeleton $(distdir)/Robots/raziel $(distdir)/config $(distdir)/intl $(distdir)/m4 $(distdir)/po @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 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(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" \ --with-included-gettext \ $(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;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(rtbextradir)"; 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) 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 mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-rtbextraDATA install-exec-am: 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 pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-rtbextraDATA uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-recursive ctags \ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ dist-tarZ dist-zip distcheck distclean distclean-generic \ distclean-hdr 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-exec install-exec-am install-info \ install-info-am install-man install-rtbextraDATA install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am \ uninstall-rtbextraDATA debian freebsd rpm: cd Packages/$@ && $(MAKE) $@ packages: cd Packages && $(MAKE) packages # 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: realtimebattle-1.0.8/config.h.in0000644000175000017500000002222210404232714014670 0ustar moimoi/* config.h.in. Generated from configure.in by autoheader. */ /* arenahome */ #undef ARENADIR /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Package name for gettext */ #undef GETTEXT_PACKAGE /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_ARGZ_H /* Define to 1 if you have the `asprintf' function. */ #undef HAVE_ASPRINTF /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you don't. */ #undef HAVE_DECL_FEOF_UNLOCKED /* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if you don't. */ #undef HAVE_DECL_FGETS_UNLOCKED /* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you don't. */ #undef HAVE_DECL_GETC_UNLOCKED /* Define to 1 if you have the declaration of `_snprintf', and to 0 if you don't. */ #undef HAVE_DECL__SNPRINTF /* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you don't. */ #undef HAVE_DECL__SNWPRINTF /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FLOATINGPOINT_H /* Define to 1 if you have the `fwprintf' function. */ #undef HAVE_FWPRINTF /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `getegid' function. */ #undef HAVE_GETEGID /* Define to 1 if you have the `geteuid' function. */ #undef HAVE_GETEUID /* Define to 1 if you have the `getgid' function. */ #undef HAVE_GETGID /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the `getuid' function. */ #undef HAVE_GETUID /* Define if you have the iconv() function. */ #undef HAVE_ICONV /* Define if you have the 'intmax_t' type in or . */ #undef HAVE_INTMAX_T /* Define if exists and doesn't clash with . */ #undef HAVE_INTTYPES_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_INTTYPES_H_WITH_UINTMAX /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the `xpg4' library (-lxpg4). */ #undef HAVE_LIBXPG4 /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_JOYSTICK_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define if you have the 'long double' type. */ #undef HAVE_LONG_DOUBLE /* Define if you have the 'long long' type. */ #undef HAVE_LONG_LONG /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mempcpy' function. */ #undef HAVE_MEMPCPY /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define to 1 if you have the `munmap' function. */ #undef HAVE_MUNMAP /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_NL_TYPES_H /* Define if your printf() function supports format strings with positions. */ #undef HAVE_POSIX_PRINTF /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV /* cheat_check */ #undef HAVE_RLIMIT_NPROC /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_STDINT_H_WITH_UINTMAX /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `stpcpy' function. */ #undef HAVE_STPCPY /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the `tsearch' function. */ #undef HAVE_TSEARCH /* Define if you have the 'uintmax_t' type in or . */ #undef HAVE_UINTMAX_T /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define if you have the 'unsigned long long' type. */ #undef HAVE_UNSIGNED_LONG_LONG /* Define if you have the 'wchar_t' type. */ #undef HAVE_WCHAR_T /* Define to 1 if you have the `wcslen' function. */ #undef HAVE_WCSLEN /* Define if you have the 'wint_t' type. */ #undef HAVE_WINT_T /* Define to 1 if you have the `__argz_count' function. */ #undef HAVE___ARGZ_COUNT /* Define to 1 if you have the `__argz_next' function. */ #undef HAVE___ARGZ_NEXT /* Define to 1 if you have the `__argz_stringify' function. */ #undef HAVE___ARGZ_STRINGIFY /* Define to 1 if you have the `__fsetlocking' function. */ #undef HAVE___FSETLOCKING /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST /* Define if integer division by zero raises signal SIGFPE. */ #undef INTDIV0_RAISES_SIGFPE /* Package name */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define if exists and defines unusable PRI* macros. */ #undef PRI_MACROS_BROKEN /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* robothome */ #undef ROBOTDIR /* localehome */ #undef RTB_LOCALEDIR /* Define as the maximum value of type 'size_t', if the system doesn't define it. */ #undef SIZE_MAX /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* version number */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to `long' if does not define. */ #undef off_t /* Define to `int' if does not define. */ #undef pid_t /* Define as the type of the result of subtracting two pointers, if the system doesn't define it. */ #undef ptrdiff_t /* Define to empty if the C compiler doesn't support this keyword. */ #undef signed /* Define to `unsigned' if does not define. */ #undef size_t /* Define to unsigned long or unsigned long long if and don't define. */ #undef uintmax_t realtimebattle-1.0.8/configure0000755000175000017500000157431410324167716014605 0ustar moimoi#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="src/Robot.cc" ac_default_prefix=/usr/local # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subdirs_all="$ac_subdirs_all team-framework" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS RTB_MAJOR_VERSION RTB_MINOR_VERSION RTB_MICRO_VERSION RTB_RPM_RELEASE RTB_RPM_VERSION RTB_VERSION PACKAGE VERSION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar install_info sgml2html SGML2HTML_TRUE SGML2HTML_FALSE sgml2latex SGML2LATEX_TRUE SGML2LATEX_FALSE sgml2info SGML2INFO_TRUE SGML2INFO_FALSE sgml2txt SGML2TXT_TRUE SGML2TXT_FALSE sgml2lyx SGML2LYX_TRUE SGML2LYX_FALSE sgml2rtf SGML2RTF_TRUE SGML2RTF_FALSE CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXCPP EGREP NO_NETWORK_TRUE NO_NETWORK_FALSE NO_GRAPHICS_TRUE NO_GRAPHICS_FALSE ETR_SOCKET_LIBS PKG_CONFIG GTK_CFLAGS GTK_LIBS ENABLE_RPM_TRUE ENABLE_RPM_FALSE RTB_DIR DOCS_DIR INSTALL_INFO ROBOTDIR ARENADIR RTB_LOCALEDIR STDCXX_LIBS NO_GETOPT_LONG_TRUE NO_GETOPT_LONG_FALSE MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os RANLIB ac_ct_RANLIB ALLOCA GLIBC21 HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB GETTEXT_PACKAGE linuxjoystickavailable_TRUE linuxjoystickavailable_FALSE JAVAC javacavailable_TRUE javacavailable_FALSE JAVA uudecode javaavailable_TRUE javaavailable_FALSE PERLINTERP PERL_SHEBANG perlavailable_TRUE perlavailable_FALSE PYTHON pythonavailable_TRUE pythonavailable_FALSE subdirs LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP ac_env_PYTHON_set=${PYTHON+set} ac_env_PYTHON_value=$PYTHON ac_cv_env_PYTHON_set=${PYTHON+set} ac_cv_env_PYTHON_value=$PYTHON # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-network make a version with network support --disable-graphics make a version without a GUI RealTimeBattle options: --enable-debug=no/yes turn on debugging default=no --enable-compile-warnings turn on compile time warnings --enable-rpm=opts used when making RPM-packages --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-rtb-dir=path directory for rtb installation EPREFIX/games/RealTimeBattle --with-nls-localedir=path Data directory for NLS, parent of locale DATADIR/locale --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-included-gettext use the GNU gettext library included here --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir --with-perl-shebang override what perl thinks is the way for the kernel to start it (seldom needed) --with-python=PYTHON absolute path name of Python executable Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CXXCPP C++ preprocessor PYTHON Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd "$ac_popdir" done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config $srcdir/config; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. RTB_MAJOR_VERSION=1 RTB_MINOR_VERSION=0 RTB_MICRO_VERSION=8 RTB_EXTRA_VERSION=-Ext RTB_RPM_RELEASE=1 RTB_LAST_RELEASED_VERSION=1.0.8 RTB_LAST_RELEASED_RELEASE=2 RTB_VERSION=$RTB_MAJOR_VERSION.$RTB_MINOR_VERSION.$RTB_MICRO_VERSION$RTB_EXTRA_VERSION RTB_RPM_VERSION="$RTB_VERSION"-"$RTB_RPM_RELEASE" VERSION=$RTB_VERSION PACKAGE=RealTimeBattle cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF am__api_version="1.9" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=$PACKAGE VERSION=$VERSION # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" # Extract the first word of "install-info", so it can be a program name with args. set dummy install-info; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_install_info+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $install_info in [\\/]* | ?:[\\/]*) ac_cv_path_install_info="$install_info" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$PATH:/sbin:/usr/sbin/:/usr/local/sbin" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_install_info="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_install_info" && ac_cv_path_install_info="no" ;; esac fi install_info=$ac_cv_path_install_info if test -n "$install_info"; then echo "$as_me:$LINENO: result: $install_info" >&5 echo "${ECHO_T}$install_info" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi INSTALL_INFO=$install_info # Extract the first word of "sgml2html", so it can be a program name with args. set dummy sgml2html; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_sgml2html+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$sgml2html"; then ac_cv_prog_sgml2html="$sgml2html" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_sgml2html="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_sgml2html" && ac_cv_prog_sgml2html="no" fi fi sgml2html=$ac_cv_prog_sgml2html if test -n "$sgml2html"; then echo "$as_me:$LINENO: result: $sgml2html" >&5 echo "${ECHO_T}$sgml2html" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test x$sgml2html = xyes; then SGML2HTML_TRUE= SGML2HTML_FALSE='#' else SGML2HTML_TRUE='#' SGML2HTML_FALSE= fi # Extract the first word of "sgml2latex", so it can be a program name with args. set dummy sgml2latex; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_sgml2latex+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$sgml2latex"; then ac_cv_prog_sgml2latex="$sgml2latex" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_sgml2latex="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_sgml2latex" && ac_cv_prog_sgml2latex="no" fi fi sgml2latex=$ac_cv_prog_sgml2latex if test -n "$sgml2latex"; then echo "$as_me:$LINENO: result: $sgml2latex" >&5 echo "${ECHO_T}$sgml2latex" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test x$sgml2latex = xyes; then SGML2LATEX_TRUE= SGML2LATEX_FALSE='#' else SGML2LATEX_TRUE='#' SGML2LATEX_FALSE= fi # Extract the first word of "sgml2info", so it can be a program name with args. set dummy sgml2info; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_sgml2info+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$sgml2info"; then ac_cv_prog_sgml2info="$sgml2info" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_sgml2info="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_sgml2info" && ac_cv_prog_sgml2info="no" fi fi sgml2info=$ac_cv_prog_sgml2info if test -n "$sgml2info"; then echo "$as_me:$LINENO: result: $sgml2info" >&5 echo "${ECHO_T}$sgml2info" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test x$sgml2info = xyes; then SGML2INFO_TRUE= SGML2INFO_FALSE='#' else SGML2INFO_TRUE='#' SGML2INFO_FALSE= fi # Extract the first word of "sgml2txt", so it can be a program name with args. set dummy sgml2txt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_sgml2txt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$sgml2txt"; then ac_cv_prog_sgml2txt="$sgml2txt" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_sgml2txt="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_sgml2txt" && ac_cv_prog_sgml2txt="no" fi fi sgml2txt=$ac_cv_prog_sgml2txt if test -n "$sgml2txt"; then echo "$as_me:$LINENO: result: $sgml2txt" >&5 echo "${ECHO_T}$sgml2txt" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test x$sgml2txt = xyes; then SGML2TXT_TRUE= SGML2TXT_FALSE='#' else SGML2TXT_TRUE='#' SGML2TXT_FALSE= fi # Extract the first word of "sgml2lyx", so it can be a program name with args. set dummy sgml2lyx; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_sgml2lyx+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$sgml2lyx"; then ac_cv_prog_sgml2lyx="$sgml2lyx" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_sgml2lyx="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_sgml2lyx" && ac_cv_prog_sgml2lyx="no" fi fi sgml2lyx=$ac_cv_prog_sgml2lyx if test -n "$sgml2lyx"; then echo "$as_me:$LINENO: result: $sgml2lyx" >&5 echo "${ECHO_T}$sgml2lyx" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test x$sgml2lyx = xyes; then SGML2LYX_TRUE= SGML2LYX_FALSE='#' else SGML2LYX_TRUE='#' SGML2LYX_FALSE= fi # Extract the first word of "sgml2rtf", so it can be a program name with args. set dummy sgml2rtf; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_sgml2rtf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$sgml2rtf"; then ac_cv_prog_sgml2rtf="$sgml2rtf" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_sgml2rtf="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_sgml2rtf" && ac_cv_prog_sgml2rtf="no" fi fi sgml2rtf=$ac_cv_prog_sgml2rtf if test -n "$sgml2rtf"; then echo "$as_me:$LINENO: result: $sgml2rtf" >&5 echo "${ECHO_T}$sgml2rtf" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test x$sgml2rtf = xyes; then SGML2RTF_TRUE= SGML2RTF_FALSE='#' else SGML2RTF_TRUE='#' SGML2RTF_FALSE= fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5 echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C++ compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C++ compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc echo "$as_me:$LINENO: checking for library containing strerror" >&5 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 if test "${ac_cv_search_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_strerror=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror (); int main () { strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_strerror="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_strerror" = no; then for ac_lib in cposix; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror (); int main () { strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_strerror="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 echo "${ECHO_T}$ac_cv_search_strerror" >&6 if test "$ac_cv_search_strerror" != no; then test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in dir; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi else echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in x; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in fcntl.h strings.h sys/time.h unistd.h floatingpoint.h sys/types.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "RLIMIT_NPROC" >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define HAVE_RLIMIT_NPROC 1 _ACEOF fi rm -f conftest* # network support # Check whether --enable-network or --disable-network was given. if test "${enable_network+set}" = set; then enableval="$enable_network" enable_network=yes else enable_network=no fi; if test x$enable_network = xno; then NO_NETWORK_TRUE= NO_NETWORK_FALSE='#' else NO_NETWORK_TRUE='#' NO_NETWORK_FALSE= fi # graphics / GTK # Check whether --enable-graphics or --disable-graphics was given. if test "${enable_graphics+set}" = set; then enableval="$enable_graphics" enable_graphics=no else enable_graphics=yes fi; if test x$enable_graphics = xno; then NO_GRAPHICS_TRUE= NO_GRAPHICS_FALSE='#' else NO_GRAPHICS_TRUE='#' NO_GRAPHICS_FALSE= fi if test x$enable_graphics = "xyes"; then echo "$as_me:$LINENO: checking for libraries containing socket functions" >&5 echo $ECHO_N "checking for libraries containing socket functions... $ECHO_C" >&6 if test "${ac_cv_socket_libs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else oCFLAGS=$CFLAGS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_socket_libs=-lc else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_socket_libs=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test x"$ac_cv_socket_libs" = "xno" then CFLAGS="$oCFLAGS -lsocket" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_socket_libs=-lsocket else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_socket_libs=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test x"$ac_cv_socket_libs" = "xno" then CFLAGS="$oCFLAGS -lsocket -lnsl" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_socket_libs="-lsocket -lnsl" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_socket_libs=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS=$oCFLAGS fi echo "$as_me:$LINENO: result: $ac_cv_socket_libs" >&5 echo "${ECHO_T}$ac_cv_socket_libs" >&6 if test x"$ac_cv_socket_libs" = "xno" then { { echo "$as_me:$LINENO: error: Cannot find socket libraries" >&5 echo "$as_me: error: Cannot find socket libraries" >&2;} { (exit 1); exit 1; }; } elif test x"$ac_cv_socket_libs" = "x-lc" then ETR_SOCKET_LIBS="" else ETR_SOCKET_LIBS="$ac_cv_socket_libs" fi fi # Check for GTK+. if test "x$enable_graphics" = "xyes"; then succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo "$as_me:$LINENO: checking for gtk+-2.0 gdk-2.0" >&5 echo $ECHO_N "checking for gtk+-2.0 gdk-2.0... $ECHO_C" >&6 if $PKG_CONFIG --exists "gtk+-2.0 gdk-2.0" ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 succeeded=yes echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5 echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6 GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 gdk-2.0"` echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5 echo "${ECHO_T}$GTK_CFLAGS" >&6 echo "$as_me:$LINENO: checking GTK_LIBS" >&5 echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6 GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 gdk-2.0"` echo "$as_me:$LINENO: result: $GTK_LIBS" >&5 echo "${ECHO_T}$GTK_LIBS" >&6 else GTK_CFLAGS="" GTK_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 gdk-2.0"` fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then : else exit fi fi # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" else enable_debug=no fi; # Check whether --enable-compile-warnings or --disable-compile-warnings was given. if test "${enable_compile_warnings+set}" = set; then enableval="$enable_compile_warnings" else enable_compile_warnings=no fi; WARNING_FLAGS="-Wall" PROFILE_FLAGS="-pg" if test "x$enable_compile_warnings" = "xyes"; then CXXFLAGS="$CXXFLAGS $WARNING_FLAGS" fi # Check whether --enable-prof or --disable-prof was given. if test "${enable_prof+set}" = set; then enableval="$enable_prof" enable_prof=yes else enable_prof=no fi; if test "x$enable_prof" = "xyes"; then CXXFLAGS="$CXXFLAGS $PROFILEFLAGS" fi if test "x$enable_debug" = "xyes"; then case " $CXXFLAGS " in *[\ \ ]-g[\ \ ]*) ;; *) CXXFLAGS="$CXXFLAGS -g " ;; esac case " $CFLAGS " in *[\ \ ]-g[\ \ ]*) ;; *) CFLAGS="$CFLAGS -g " ;; esac CXXFLAGS=`echo "$CXXFLAGS " | sed "s/-O[0-9]* //"` CFLAGS=`echo "$CXXFLAGS " | sed "s/-O[0-9]* //"` else CXXFLAGS=`echo "$CXXFLAGS " | sed "s/-g //"` CFLAGS=`echo "$CFLAGS " | sed "s/-g //"` if test "x$enable_debug" = "xno"; then CPPFLAGS="$CPPFLAGS -DNDEBUG" fi fi # Check whether --enable-rpm or --disable-rpm was given. if test "${enable_rpm+set}" = set; then enableval="$enable_rpm" use_rpm=yes else use_rpm=no fi; if test "x$use_rpm" = "xyes"; then CXXFLAGS="$enable_rpm" CFLAGS="$enable_rpm" INSTALL_INFO=no fi if test x$use_rpm = xyes; then ENABLE_RPM_TRUE= ENABLE_RPM_FALSE='#' else ENABLE_RPM_TRUE='#' ENABLE_RPM_FALSE= fi # Check whether --with-rtb_dir or --without-rtb_dir was given. if test "${with_rtb_dir+set}" = set; then withval="$with_rtb_dir" else with_rtb_dir='${exec_prefix}/games/RealTimeBattle' fi; RTB_DIR=$with_rtb_dir DOCS_DIR=${RTB_DIR}/Documentation ROBOTDIR="${RTB_DIR}/Robots" ROBOTDIR=`( test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" eval echo \""$ROBOTDIR"\" )` ARENADIR="${RTB_DIR}/Arenas" ARENADIR=`( test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" eval echo \""$ARENADIR"\" )` cat >>confdefs.h <<_ACEOF #define ROBOTDIR "$ROBOTDIR" _ACEOF cat >>confdefs.h <<_ACEOF #define ARENADIR "$ARENADIR" _ACEOF # Check whether --with-nls_localedir or --without-nls_localedir was given. if test "${with_nls_localedir+set}" = set; then withval="$with_nls_localedir" else with_nls_localedir='${datadir}/locale' fi; RTB_LOCALEDIR="${with_nls_localedir}" RTB_LOCALEDIR=`( test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" eval echo \""$RTB_LOCALEDIR"\" )` RTB_LOCALEDIR="${RTB_LOCALEDIR}" RTB_LOCALEDIR=`( test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" eval echo \""$RTB_LOCALEDIR"\" )` #Need to expand twice! cat >>confdefs.h <<_ACEOF #define RTB_LOCALEDIR "$RTB_LOCALEDIR" _ACEOF echo "$as_me:$LINENO: checking for getc in -lstdc++" >&5 echo $ECHO_N "checking for getc in -lstdc++... $ECHO_C" >&6 if test "${ac_cv_lib_stdcpp_getc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lstdc++ $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getc (); int main () { getc (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_stdcpp_getc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_stdcpp_getc=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_stdcpp_getc" >&5 echo "${ECHO_T}$ac_cv_lib_stdcpp_getc" >&6 if test $ac_cv_lib_stdcpp_getc = yes; then stdcxx=yes else { { echo "$as_me:$LINENO: error: You need to have libstdc++ installed" >&5 echo "$as_me: error: You need to have libstdc++ installed" >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_vector+set}" = set; then echo "$as_me:$LINENO: checking for vector" >&5 echo $ECHO_N "checking for vector... $ECHO_C" >&6 if test "${ac_cv_header_vector+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_vector" >&5 echo "${ECHO_T}$ac_cv_header_vector" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking vector usability" >&5 echo $ECHO_N "checking vector usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking vector presence" >&5 echo $ECHO_N "checking vector presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: vector: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: vector: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: vector: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: vector: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: vector: present but cannot be compiled" >&5 echo "$as_me: WARNING: vector: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: vector: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: vector: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: vector: see the Autoconf documentation" >&5 echo "$as_me: WARNING: vector: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: vector: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: vector: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: vector: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: vector: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: vector: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: vector: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for vector" >&5 echo $ECHO_N "checking for vector... $ECHO_C" >&6 if test "${ac_cv_header_vector+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_vector=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_vector" >&5 echo "${ECHO_T}$ac_cv_header_vector" >&6 fi if test $ac_cv_header_vector = yes; then : else { { echo "$as_me:$LINENO: error: You need to have the libstdc++ headers installed" >&5 echo "$as_me: error: You need to have the libstdc++ headers installed" >&2;} { (exit 1); exit 1; }; } fi if test "x$stdcxx" = "xyes"; then STDCXX_LIBS=-lstdc++ fi echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((pid_t *) 0) return 0; if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef signal # undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main () { int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=int fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in select do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for getopt_long" >&5 echo $ECHO_N "checking for getopt_long... $ECHO_C" >&6 if test "${ac_cv_func_getopt_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define getopt_long to an innocuous variant, in case declares getopt_long. For example, HP-UX 11i declares gettimeofday. */ #define getopt_long innocuous_getopt_long /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getopt_long (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef getopt_long /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getopt_long (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_getopt_long) || defined (__stub___getopt_long) choke me #else char (*f) () = getopt_long; #endif #ifdef __cplusplus } #endif int main () { return f != getopt_long; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_getopt_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_getopt_long=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_getopt_long" >&5 echo "${ECHO_T}$ac_cv_func_getopt_long" >&6 if test $ac_cv_func_getopt_long = yes; then : else getopt=yes fi if test x$getopt = xyes; then NO_GETOPT_LONG_TRUE= NO_GETOPT_LONG_FALSE='#' else NO_GETOPT_LONG_TRUE='#' NO_GETOPT_LONG_FALSE= fi echo "$as_me:$LINENO: checking for setlocale in -lxpg4" >&5 echo $ECHO_N "checking for setlocale in -lxpg4... $ECHO_C" >&6 if test "${ac_cv_lib_xpg4_setlocale+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lxpg4 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char setlocale (); int main () { setlocale (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_xpg4_setlocale=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_xpg4_setlocale=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_xpg4_setlocale" >&5 echo "${ECHO_T}$ac_cv_lib_xpg4_setlocale" >&6 if test $ac_cv_lib_xpg4_setlocale = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXPG4 1 _ACEOF LIBS="-lxpg4 $LIBS" fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then case "$ac_aux_dir" in /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; esac fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi echo "$as_me:$LINENO: checking whether NLS is requested" >&5 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" USE_NLS=$enableval else USE_NLS=yes fi; echo "$as_me:$LINENO: result: $USE_NLS" >&5 echo "${ECHO_T}$USE_NLS" >&6 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then echo "$as_me:$LINENO: result: $MSGFMT" >&5 echo "${ECHO_T}$MSGFMT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GMSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then echo "$as_me:$LINENO: result: $GMSGFMT" >&5 echo "${ECHO_T}$GMSGFMT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then echo "$as_me:$LINENO: result: $XGETTEXT" >&5 echo "${ECHO_T}$XGETTEXT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f messages.po # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MSGMERGE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then echo "$as_me:$LINENO: result: $MSGMERGE" >&5 echo "${ECHO_T}$MSGMERGE" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$GMSGFMT" != ":"; then if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5 echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6 GMSGFMT=":" fi fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 XGETTEXT=":" fi rm -f messages.po fi ac_config_commands="$ac_config_commands default-1" # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi echo "$as_me:$LINENO: checking for signed" >&5 echo $ECHO_N "checking for signed... $ECHO_C" >&6 if test "${bh_cv_c_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { signed char x; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bh_cv_c_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 bh_cv_c_signed=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bh_cv_c_signed" >&5 echo "${ECHO_T}$bh_cv_c_signed" >&6 if test $bh_cv_c_signed = no; then cat >>confdefs.h <<\_ACEOF #define signed _ACEOF fi echo "$as_me:$LINENO: checking for off_t" >&5 echo $ECHO_N "checking for off_t... $ECHO_C" >&6 if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((off_t *) 0) return 0; if (sizeof (off_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_off_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 echo "${ECHO_T}$ac_cv_type_off_t" >&6 if test $ac_cv_type_off_t = yes; then : else cat >>confdefs.h <<_ACEOF #define off_t long _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking for long long" >&5 echo $ECHO_N "checking for long long... $ECHO_C" >&6 if test "${ac_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ long long ll = 1LL; int i = 63; int main () { long long llmax = (long long) -1; return ll << i | ll >> i | llmax / ll | llmax % ll; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long_long=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 echo "${ECHO_T}$ac_cv_type_long_long" >&6 if test $ac_cv_type_long_long = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_LONG 1 _ACEOF fi echo "$as_me:$LINENO: checking for long double" >&5 echo $ECHO_N "checking for long double... $ECHO_C" >&6 if test "${gt_cv_c_long_double+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$GCC" = yes; then gt_cv_c_long_double=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* The Stardent Vistra knows sizeof(long double), but does not support it. */ long double foo = 0.0; /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ int array [2*(sizeof(long double) >= sizeof(double)) - 1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_c_long_double=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_long_double=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $gt_cv_c_long_double" >&5 echo "${ECHO_T}$gt_cv_c_long_double" >&6 if test $gt_cv_c_long_double = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_DOUBLE 1 _ACEOF fi echo "$as_me:$LINENO: checking for wchar_t" >&5 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6 if test "${gt_cv_c_wchar_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include wchar_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_c_wchar_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_wchar_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5 echo "${ECHO_T}$gt_cv_c_wchar_t" >&6 if test $gt_cv_c_wchar_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WCHAR_T 1 _ACEOF fi echo "$as_me:$LINENO: checking for wint_t" >&5 echo $ECHO_N "checking for wint_t... $ECHO_C" >&6 if test "${gt_cv_c_wint_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include wint_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_c_wint_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_wint_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5 echo "${ECHO_T}$gt_cv_c_wint_t" >&6 if test $gt_cv_c_wint_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WINT_T 1 _ACEOF fi echo "$as_me:$LINENO: checking for inttypes.h" >&5 echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 if test "${jm_ac_cv_header_inttypes_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then jm_ac_cv_header_inttypes_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 jm_ac_cv_header_inttypes_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $jm_ac_cv_header_inttypes_h" >&5 echo "${ECHO_T}$jm_ac_cv_header_inttypes_h" >&6 if test $jm_ac_cv_header_inttypes_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H_WITH_UINTMAX 1 _ACEOF fi echo "$as_me:$LINENO: checking for stdint.h" >&5 echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 if test "${jm_ac_cv_header_stdint_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then jm_ac_cv_header_stdint_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 jm_ac_cv_header_stdint_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $jm_ac_cv_header_stdint_h" >&5 echo "${ECHO_T}$jm_ac_cv_header_stdint_h" >&6 if test $jm_ac_cv_header_stdint_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H_WITH_UINTMAX 1 _ACEOF fi echo "$as_me:$LINENO: checking for intmax_t" >&5 echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6 if test "${gt_cv_c_intmax_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_STDINT_H_WITH_UINTMAX #include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX #include #endif int main () { intmax_t x = -1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_c_intmax_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_intmax_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_c_intmax_t" >&5 echo "${ECHO_T}$gt_cv_c_intmax_t" >&6 if test $gt_cv_c_intmax_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_INTMAX_T 1 _ACEOF fi echo "$as_me:$LINENO: checking whether printf() supports POSIX/XSI format strings" >&5 echo $ECHO_N "checking whether printf() supports POSIX/XSI format strings... $ECHO_C" >&6 if test "${gt_cv_func_printf_posix+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ notposix #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "notposix" >/dev/null 2>&1; then gt_cv_func_printf_posix="guessing no" else gt_cv_func_printf_posix="guessing yes" fi rm -f conftest* else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include /* The string "%2$d %1$d", with dollar characters protected from the shell's dollar expansion (possibly an autoconf bug). */ static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; static char buf[100]; int main () { sprintf (buf, format, 33, 55); return (strcmp (buf, "55 33") != 0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_func_printf_posix=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gt_cv_func_printf_posix=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $gt_cv_func_printf_posix" >&5 echo "${ECHO_T}$gt_cv_func_printf_posix" >&6 case $gt_cv_func_printf_posix in *yes) cat >>confdefs.h <<\_ACEOF #define HAVE_POSIX_PRINTF 1 _ACEOF ;; esac # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo "$as_me:$LINENO: checking for working alloca.h" >&5 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 if test "${ac_cv_working_alloca_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi echo "$as_me:$LINENO: checking for alloca" >&5 echo $ECHO_N "checking for alloca... $ECHO_C" >&6 if test "${ac_cv_func_alloca_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # if HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_alloca_works=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 if test $ac_cv_func_alloca_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 if test "${ac_cv_os_cray+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined(CRAY) && ! defined(CRAY2) webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 echo "${ECHO_T}$ac_cv_os_cray" >&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 if test "${ac_cv_c_stack_direction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { exit (find_stack_direction () < 0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_stack_direction=1 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_header in stdlib.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for working mmap" >&5 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !STDC_HEADERS && !HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #if !HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ # if !HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # if HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; int i, pagesize; int fd; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) exit (1); for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) exit (1); if (write (fd, data, pagesize) != pagesize) exit (1); close (fd); /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) exit (1); data2 = (char *) malloc (2 * pagesize); if (!data2) exit (1); data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) exit (1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) exit (1); /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) exit (1); if (read (fd, data3, pagesize) != pagesize) exit (1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) exit (1); close (fd); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_mmap_fixed_mapped=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MMAP 1 _ACEOF fi rm -f conftest.mmap echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6 if test "${ac_cv_gnu_library_2_1+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then ac_cv_gnu_library_2_1=yes else ac_cv_gnu_library_2_1=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6 GLIBC21="$ac_cv_gnu_library_2_1" echo "$as_me:$LINENO: checking whether integer division by zero raises SIGFPE" >&5 echo $ECHO_N "checking whether integer division by zero raises SIGFPE... $ECHO_C" >&6 if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Guess based on the CPU. case "$host_cpu" in alpha* | i3456786 | m68k | s390*) gt_cv_int_divbyzero_sigfpe="guessing yes";; *) gt_cv_int_divbyzero_sigfpe="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static void #ifdef __cplusplus sigfpe_handler (int sig) #else sigfpe_handler (sig) int sig; #endif { /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ exit (sig != SIGFPE); } int x = 1; int y = 0; int z; int nan; int main () { signal (SIGFPE, sigfpe_handler); /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) signal (SIGTRAP, sigfpe_handler); #endif /* Linux/SPARC yields signal SIGILL. */ #if defined (__sparc__) && defined (__linux__) signal (SIGILL, sigfpe_handler); #endif z = x / y; nan = y / y; exit (1); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_int_divbyzero_sigfpe=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gt_cv_int_divbyzero_sigfpe=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5 echo "${ECHO_T}$gt_cv_int_divbyzero_sigfpe" >&6 case "$gt_cv_int_divbyzero_sigfpe" in *yes) value=1;; *) value=0;; esac cat >>confdefs.h <<_ACEOF #define INTDIV0_RAISES_SIGFPE $value _ACEOF echo "$as_me:$LINENO: checking for unsigned long long" >&5 echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 if test "${ac_cv_type_unsigned_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ unsigned long long ull = 1ULL; int i = 63; int main () { unsigned long long ullmax = (unsigned long long) -1; return ull << i | ull >> i | ullmax / ull | ullmax % ull; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_unsigned_long_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_unsigned_long_long=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6 if test $ac_cv_type_unsigned_long_long = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_UNSIGNED_LONG_LONG 1 _ACEOF fi if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then test $ac_cv_type_unsigned_long_long = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' cat >>confdefs.h <<_ACEOF #define uintmax_t $ac_type _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_UINTMAX_T 1 _ACEOF fi echo "$as_me:$LINENO: checking for inttypes.h" >&5 echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 if test "${gt_cv_header_inttypes_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_header_inttypes_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_header_inttypes_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5 echo "${ECHO_T}$gt_cv_header_inttypes_h" >&6 if test $gt_cv_header_inttypes_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H 1 _ACEOF fi if test $gt_cv_header_inttypes_h = yes; then echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5 echo $ECHO_N "checking whether the inttypes.h PRIxNN macros are broken... $ECHO_C" >&6 if test "${gt_cv_inttypes_pri_broken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef PRId32 char *p = PRId32; #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_inttypes_pri_broken=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_inttypes_pri_broken=yes fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5 echo "${ECHO_T}$gt_cv_inttypes_pri_broken" >&6 fi if test "$gt_cv_inttypes_pri_broken" = yes; then cat >>confdefs.h <<_ACEOF #define PRI_MACROS_BROKEN 1 _ACEOF fi for ac_header in stdint.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for SIZE_MAX" >&5 echo $ECHO_N "checking for SIZE_MAX... $ECHO_C" >&6 result= cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_STDINT_H #include #endif #ifdef SIZE_MAX Found it #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Found it" >/dev/null 2>&1; then result=yes fi rm -f conftest* if test -z "$result"; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((~(size_t)0 / 10) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((~(size_t)0 / 10) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((~(size_t)0 / 10) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((~(size_t)0 / 10) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((~(size_t)0 / 10) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) res_hi=$ac_lo;; '') result=? ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include long longval () { return ~(size_t)0 / 10; } unsigned long ulongval () { return ~(size_t)0 / 10; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if ((~(size_t)0 / 10) < 0) { long i = longval (); if (i != (~(size_t)0 / 10)) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != (~(size_t)0 / 10)) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then res_hi=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) result=? fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((~(size_t)0 % 10) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((~(size_t)0 % 10) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((~(size_t)0 % 10) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((~(size_t)0 % 10) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((~(size_t)0 % 10) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) res_lo=$ac_lo;; '') result=? ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include long longval () { return ~(size_t)0 % 10; } unsigned long ulongval () { return ~(size_t)0 % 10; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if ((~(size_t)0 % 10) < 0) { long i = longval (); if (i != (~(size_t)0 % 10)) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != (~(size_t)0 % 10)) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then res_lo=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) result=? fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) fits_in_uint=$ac_lo;; '') result=? ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include long longval () { return sizeof (size_t) <= sizeof (unsigned int); } unsigned long ulongval () { return sizeof (size_t) <= sizeof (unsigned int); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if ((sizeof (size_t) <= sizeof (unsigned int)) < 0) { long i = longval (); if (i != (sizeof (size_t) <= sizeof (unsigned int))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != (sizeof (size_t) <= sizeof (unsigned int))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then fits_in_uint=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) result=? fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val if test "$fits_in_uint" = 1; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern size_t foo; extern unsigned long foo; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then fits_in_uint=0 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test -z "$result"; then if test "$fits_in_uint" = 1; then result="$res_hi$res_lo"U else result="$res_hi$res_lo"UL fi else result='~(size_t)0' fi fi echo "$as_me:$LINENO: result: $result" >&5 echo "${ECHO_T}$result" >&6 if test "$result" != yes; then cat >>confdefs.h <<_ACEOF #define SIZE_MAX $result _ACEOF fi for ac_header in stdint.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by GCC" >&5 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${acl_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then echo "$as_me:$LINENO: result: $LD" >&5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${acl_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 with_gnu_ld=$acl_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for shared library run path origin" >&5 echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 if test "${acl_cv_rpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 echo "${ECHO_T}$acl_cv_rpath" >&6 wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then enableval="$enable_rpath" : else enable_rpath=yes fi; use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then withval="$with_libiconv_prefix" if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi fi; LIBICONV= LTLIBICONV= INCICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */lib | */lib/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/lib"; then haveit= if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6 if test "${ac_cv_type_ptrdiff_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((ptrdiff_t *) 0) return 0; if (sizeof (ptrdiff_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_ptrdiff_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ptrdiff_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6 if test $ac_cv_type_ptrdiff_t = yes; then : else cat >>confdefs.h <<\_ACEOF #define ptrdiff_t long _ACEOF fi for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in asprintf fwprintf getcwd getegid geteuid getgid getuid \ mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ __fsetlocking do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking whether _snprintf is declared" >&5 echo $ECHO_N "checking whether _snprintf is declared... $ECHO_C" >&6 if test "${ac_cv_have_decl__snprintf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef _snprintf char *p = (char *) _snprintf; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_have_decl__snprintf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl__snprintf=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_have_decl__snprintf" >&5 echo "${ECHO_T}$ac_cv_have_decl__snprintf" >&6 if test $ac_cv_have_decl__snprintf = yes; then gt_value=1 else gt_value=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL__SNPRINTF $gt_value _ACEOF echo "$as_me:$LINENO: checking whether _snwprintf is declared" >&5 echo $ECHO_N "checking whether _snwprintf is declared... $ECHO_C" >&6 if test "${ac_cv_have_decl__snwprintf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef _snwprintf char *p = (char *) _snwprintf; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_have_decl__snwprintf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl__snwprintf=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_have_decl__snwprintf" >&5 echo "${ECHO_T}$ac_cv_have_decl__snwprintf" >&6 if test $ac_cv_have_decl__snwprintf = yes; then gt_value=1 else gt_value=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL__SNWPRINTF $gt_value _ACEOF echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5 echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6 if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef feof_unlocked char *p = (char *) feof_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_have_decl_feof_unlocked=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_feof_unlocked=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5 echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6 if test $ac_cv_have_decl_feof_unlocked = yes; then gt_value=1 else gt_value=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FEOF_UNLOCKED $gt_value _ACEOF echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5 echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6 if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef fgets_unlocked char *p = (char *) fgets_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_have_decl_fgets_unlocked=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_fgets_unlocked=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5 echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6 if test $ac_cv_have_decl_fgets_unlocked = yes; then gt_value=1 else gt_value=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FGETS_UNLOCKED $gt_value _ACEOF echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6 if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef getc_unlocked char *p = (char *) getc_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_have_decl_getc_unlocked=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getc_unlocked=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6 if test $ac_cv_have_decl_getc_unlocked = yes; then gt_value=1 else gt_value=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED $gt_value _ACEOF case $gt_cv_func_printf_posix in *yes) HAVE_POSIX_PRINTF=1 ;; *) HAVE_POSIX_PRINTF=0 ;; esac if test "$ac_cv_func_asprintf" = yes; then HAVE_ASPRINTF=1 else HAVE_ASPRINTF=0 fi if test "$ac_cv_func_snprintf" = yes; then HAVE_SNPRINTF=1 else HAVE_SNPRINTF=0 fi if test "$ac_cv_func_wprintf" = yes; then HAVE_WPRINTF=1 else HAVE_WPRINTF=0 fi am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done echo "$as_me:$LINENO: checking for iconv" >&5 echo $ECHO_N "checking for iconv... $ECHO_C" >&6 if test "${am_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_lib_iconv=yes am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 echo "${ECHO_T}$am_cv_func_iconv" >&6 if test "$am_cv_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ICONV 1 _ACEOF fi if test "$am_cv_lib_iconv" = yes; then echo "$as_me:$LINENO: checking how to link with libiconv" >&5 echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $LIBICONV" >&5 echo "${ECHO_T}$LIBICONV" >&6 else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then echo "$as_me:$LINENO: checking for iconv declaration" >&5 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 if test "${am_cv_proto_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_proto_iconv_arg1="" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_proto_iconv_arg1="const" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` echo "$as_me:$LINENO: result: ${ac_t:- }$am_cv_proto_iconv" >&5 echo "${ECHO_T}${ac_t:- }$am_cv_proto_iconv" >&6 cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 if test "${am_cv_langinfo_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char* cs = nl_langinfo(CODESET); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_langinfo_codeset=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_langinfo_codeset=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 if test $am_cv_langinfo_codeset = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LANGINFO_CODESET 1 _ACEOF fi if test $ac_cv_header_locale_h = yes; then echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 if test "${am_cv_val_LC_MESSAGES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_val_LC_MESSAGES=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_val_LC_MESSAGES=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 if test $am_cv_val_LC_MESSAGES = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LC_MESSAGES 1 _ACEOF fi fi for ac_prog in bison do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_INTLBISON+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$INTLBISON"; then ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_INTLBISON="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi INTLBISON=$ac_cv_prog_INTLBISON if test -n "$INTLBISON"; then echo "$as_me:$LINENO: result: $INTLBISON" >&5 echo "${ECHO_T}$INTLBISON" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$INTLBISON" && break done if test -z "$INTLBISON"; then ac_verc_fail=yes else echo "$as_me:$LINENO: checking version of bison" >&5 echo $ECHO_N "checking version of bison... $ECHO_C" >&6 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac echo "$as_me:$LINENO: result: $ac_prog_version" >&5 echo "${ECHO_T}$ac_prog_version" >&6 fi if test $ac_verc_fail = yes; then INTLBISON=: fi echo "$as_me:$LINENO: checking whether NLS is requested" >&5 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" USE_NLS=$enableval else USE_NLS=yes fi; echo "$as_me:$LINENO: result: $USE_NLS" >&5 echo "${ECHO_T}$USE_NLS" >&6 BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no LIBINTL= LTLIBINTL= POSUB= if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no echo "$as_me:$LINENO: checking whether included gettext is requested" >&5 echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" nls_cv_force_use_gnu_gettext=$withval else nls_cv_force_use_gnu_gettext=no fi; echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5 echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6 if test "${gt_cv_func_gnugettext1_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main () { bindtextdomain ("", ""); return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_func_gnugettext1_libc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_gnugettext1_libc=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5 echo "${ECHO_T}$gt_cv_func_gnugettext1_libc" >&6 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix or --without-libintl-prefix was given. if test "${with_libintl_prefix+set}" = set; then withval="$with_libintl_prefix" if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi fi; LIBINTL= LTLIBINTL= INCINTL= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */lib | */lib/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/lib"; then haveit= if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6 if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (); int main () { bindtextdomain ("", ""); return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_func_gnugettext1_libintl=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_gnugettext1_libintl=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (); int main () { bindtextdomain ("", ""); return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" gt_cv_func_gnugettext1_libintl=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5 echo "${ECHO_T}$gt_cv_func_gnugettext1_libintl" >&6 fi if test "$gt_cv_func_gnugettext1_libc" = "yes" \ || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test "$gt_use_preinstalled_gnugettext" != "yes"; then nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV" LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then CATOBJEXT=.gmo fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF else USE_NLS=no fi fi echo "$as_me:$LINENO: checking whether to use NLS" >&5 echo $ECHO_N "checking whether to use NLS... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $USE_NLS" >&5 echo "${ECHO_T}$USE_NLS" >&6 if test "$USE_NLS" = "yes"; then echo "$as_me:$LINENO: checking where the gettext function comes from" >&5 echo $ECHO_N "checking where the gettext function comes from... $ECHO_C" >&6 if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi echo "$as_me:$LINENO: result: $gt_source" >&5 echo "${ECHO_T}$gt_source" >&6 fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then echo "$as_me:$LINENO: checking how to link with libintl" >&5 echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $LIBINTL" >&5 echo "${ECHO_T}$LIBINTL" >&6 for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi cat >>confdefs.h <<\_ACEOF #define HAVE_GETTEXT 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi POSUB=po fi if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi nls_cv_header_intl= nls_cv_header_libgt= DATADIRNAME=share INSTOBJEXT=.mo GENCAT=gencat if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi INTL_LIBTOOL_SUFFIX_PREFIX= INTLLIBS="$LIBINTL" GETTEXT_PACKAGE=RealTimeBattle cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTTEXT_PACKAGE" _ACEOF for ac_header in linux/joystick.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF linuxjoystickavailable="yes" else linuxjoystickavailable="false"; { echo "$as_me:$LINENO: WARNING: No joystick API found, cannot compile joypad robot" >&5 echo "$as_me: WARNING: No joystick API found, cannot compile joypad robot" >&2;} fi done if test x$linuxjoystickavailable = "xyes"; then linuxjoystickavailable_TRUE= linuxjoystickavailable_FALSE='#' else linuxjoystickavailable_TRUE='#' linuxjoystickavailable_FALSE= fi if test "x$CLASSPATH" = x; then echo "You have no CLASSPATH, I hope it is good" else echo "You have CLASSPATH $CLASSPATH, hope it is correct" fi if test "x$JAVAPREFIX" = x; then test "x$JAVAC" = x && for ac_prog in "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_JAVAC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$JAVAC"; then ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVAC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi JAVAC=$ac_cv_prog_JAVAC if test -n "$JAVAC"; then echo "$as_me:$LINENO: result: $JAVAC" >&5 echo "${ECHO_T}$JAVAC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$JAVAC" && break done else test "x$JAVAC" = x && for ac_prog in "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_JAVAC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$JAVAC"; then ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVAC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi JAVAC=$ac_cv_prog_JAVAC if test -n "$JAVAC"; then echo "$as_me:$LINENO: result: $JAVAC" >&5 echo "${ECHO_T}$JAVAC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$JAVAC" && break done test -n "$JAVAC" || JAVAC="$JAVAPREFIX" fi test "x$JAVAC" = x && { echo "$as_me:$LINENO: WARNING: no acceptable Java compiler found in \$PATH" >&5 echo "$as_me: WARNING: no acceptable Java compiler found in \$PATH" >&2;} echo "$as_me:$LINENO: checking if $JAVAC works" >&5 echo $ECHO_N "checking if $JAVAC works... $ECHO_C" >&6 if test "${ac_cv_prog_javac_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST /* #line 12762 "configure" */ public class Test { } EOF if { ac_try='$JAVAC $JAVACFLAGS $JAVA_TEST' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null 2>&1; then ac_cv_prog_javac_works=yes else { echo "$as_me:$LINENO: WARNING: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&5 echo "$as_me: WARNING: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&2;} echo "configure: failed program was:" >&5 cat $JAVA_TEST >&5 fi rm -f $JAVA_TEST $CLASS_TEST fi echo "$as_me:$LINENO: result: $ac_cv_prog_javac_works" >&5 echo "${ECHO_T}$ac_cv_prog_javac_works" >&6 if test "x$JAVAC" != x; then javacavailable_TRUE= javacavailable_FALSE='#' else javacavailable_TRUE='#' javacavailable_FALSE= fi if test x$JAVAPREFIX = x; then test x$JAVA = x && for ac_prog in kaffe$EXEEXT java$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_JAVA+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$JAVA"; then ac_cv_prog_JAVA="$JAVA" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVA="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi JAVA=$ac_cv_prog_JAVA if test -n "$JAVA"; then echo "$as_me:$LINENO: result: $JAVA" >&5 echo "${ECHO_T}$JAVA" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$JAVA" && break done else test x$JAVA = x && for ac_prog in kaffe$EXEEXT java$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_JAVA+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$JAVA"; then ac_cv_prog_JAVA="$JAVA" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVA="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi JAVA=$ac_cv_prog_JAVA if test -n "$JAVA"; then echo "$as_me:$LINENO: result: $JAVA" >&5 echo "${ECHO_T}$JAVA" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$JAVA" && break done test -n "$JAVA" || JAVA="$JAVAPREFIX" fi test x$JAVA = x && { echo "$as_me:$LINENO: WARNING: no acceptable Java virtual machine found in \$PATH" >&5 echo "$as_me: WARNING: no acceptable Java virtual machine found in \$PATH" >&2;} # Extract the first word of "uudecode$EXEEXT", so it can be a program name with args. set dummy uudecode$EXEEXT; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_uudecode+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$uudecode"; then ac_cv_prog_uudecode="$uudecode" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_uudecode="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi uudecode=$ac_cv_prog_uudecode if test -n "$uudecode"; then echo "$as_me:$LINENO: result: $uudecode" >&5 echo "${ECHO_T}$uudecode" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test x$uudecode = xyes; then echo "$as_me:$LINENO: checking if uudecode can decode base 64 file" >&5 echo $ECHO_N "checking if uudecode can decode base 64 file... $ECHO_C" >&6 if test "${ac_cv_prog_uudecode_base64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat << \EOF > Test.uue begin-base64 644 Test.class yv66vgADAC0AFQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51 bWJlclRhYmxlDAAKAAsBAARleGl0AQAEKEkpVgoADQAJBwAOAQAQamF2YS9s YW5nL1N5c3RlbQEABjxpbml0PgEAAygpVgwADwAQCgADABEBAApTb3VyY2VG aWxlAQAJVGVzdC5qYXZhACEAAQADAAAAAAACAAkABQAGAAEABwAAACEAAQAB AAAABQO4AAyxAAAAAQAIAAAACgACAAAACgAEAAsAAQAPABAAAQAHAAAAIQAB AAEAAAAFKrcAErEAAAABAAgAAAAKAAIAAAAEAAQABAABABMAAAACABQ= ==== EOF if uudecode$EXEEXT Test.uue; then ac_cv_prog_uudecode_base64=yes else echo "configure: 12940: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 echo "configure: failed file was:" >&5 cat Test.uue >&5 ac_cv_prog_uudecode_base64=no fi rm -f Test.uue fi echo "$as_me:$LINENO: result: $ac_cv_prog_uudecode_base64" >&5 echo "${ECHO_T}$ac_cv_prog_uudecode_base64" >&6 fi if test x$ac_cv_prog_uudecode_base64 != xyes; then rm -f Test.class { echo "$as_me:$LINENO: WARNING: I have to compile Test.class from scratch" >&5 echo "$as_me: WARNING: I have to compile Test.class from scratch" >&2;} if test x$ac_cv_prog_javac_works = xno; then { echo "$as_me:$LINENO: WARNING: Cannot compile java source. $JAVAC does not work properly" >&5 echo "$as_me: WARNING: Cannot compile java source. $JAVAC does not work properly" >&2;} fi if test x$ac_cv_prog_javac_works = x; then if test "x$JAVAPREFIX" = x; then test "x$JAVAC" = x && for ac_prog in "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_JAVAC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$JAVAC"; then ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVAC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi JAVAC=$ac_cv_prog_JAVAC if test -n "$JAVAC"; then echo "$as_me:$LINENO: result: $JAVAC" >&5 echo "${ECHO_T}$JAVAC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$JAVAC" && break done else test "x$JAVAC" = x && for ac_prog in "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_JAVAC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$JAVAC"; then ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVAC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi JAVAC=$ac_cv_prog_JAVAC if test -n "$JAVAC"; then echo "$as_me:$LINENO: result: $JAVAC" >&5 echo "${ECHO_T}$JAVAC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$JAVAC" && break done test -n "$JAVAC" || JAVAC="$JAVAPREFIX" fi test "x$JAVAC" = x && { echo "$as_me:$LINENO: WARNING: no acceptable Java compiler found in \$PATH" >&5 echo "$as_me: WARNING: no acceptable Java compiler found in \$PATH" >&2;} echo "$as_me:$LINENO: checking if $JAVAC works" >&5 echo $ECHO_N "checking if $JAVAC works... $ECHO_C" >&6 if test "${ac_cv_prog_javac_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST /* #line 13056 "configure" */ public class Test { } EOF if { ac_try='$JAVAC $JAVACFLAGS $JAVA_TEST' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null 2>&1; then ac_cv_prog_javac_works=yes else { echo "$as_me:$LINENO: WARNING: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&5 echo "$as_me: WARNING: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&2;} echo "configure: failed program was:" >&5 cat $JAVA_TEST >&5 fi rm -f $JAVA_TEST $CLASS_TEST fi echo "$as_me:$LINENO: result: $ac_cv_prog_javac_works" >&5 echo "${ECHO_T}$ac_cv_prog_javac_works" >&6 fi fi echo "$as_me:$LINENO: checking if $JAVA works" >&5 echo $ECHO_N "checking if $JAVA works... $ECHO_C" >&6 if test "${ac_cv_prog_java_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else JAVA_TEST=Test.java CLASS_TEST=Test.class TEST=Test cat << \EOF > $JAVA_TEST /* [#]line 13092 "configure" */ public class Test { public static void main (String args[]) { System.exit (0); } } EOF if test x$ac_cv_prog_uudecode_base64 != xyes; then if { ac_try='$JAVAC $JAVACFLAGS $JAVA_TEST' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && test -s $CLASS_TEST; then : else echo "configure: failed program was:" >&5 cat $JAVA_TEST >&5 { echo "$as_me:$LINENO: WARNING: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&5 echo "$as_me: WARNING: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&2;} fi fi if { ac_try='$JAVA $JAVAFLAGS $TEST' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null 2>&1; then ac_cv_prog_java_works=yes else echo "configure: failed program was:" >&5 cat $JAVA_TEST >&5 { echo "$as_me:$LINENO: WARNING: The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" >&5 echo "$as_me: WARNING: The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" >&2;} fi rm -fr $JAVA_TEST $CLASS_TEST Test.uue fi echo "$as_me:$LINENO: result: $ac_cv_prog_java_works" >&5 echo "${ECHO_T}$ac_cv_prog_java_works" >&6 if test "x$JAVA" != x; then javaavailable_TRUE= javaavailable_FALSE='#' else javaavailable_TRUE='#' javaavailable_FALSE= fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PERLINTERP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PERLINTERP in [\\/]* | ?:[\\/]*) ac_cv_path_PERLINTERP="$PERLINTERP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERLINTERP="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_PERLINTERP" && ac_cv_path_PERLINTERP="perl" ;; esac fi PERLINTERP=$ac_cv_path_PERLINTERP if test -n "$PERLINTERP"; then echo "$as_me:$LINENO: result: $PERLINTERP" >&5 echo "${ECHO_T}$PERLINTERP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ac_cv_path_perlinterp="$PERLINTERP" _sHpB='#!' # Check whether --with-perl-shebang or --without-perl-shebang was given. if test "${with_perl_shebang+set}" = set; then withval="$with_perl_shebang" opt_perl_shebang="$withval" else opt_perl_shebang="not_set" fi; echo "$as_me:$LINENO: checking whether explicit instead of detected sharpbang is to be used" >&5 echo $ECHO_N "checking whether explicit instead of detected sharpbang is to be used... $ECHO_C" >&6 if test "${ax_cv_opt_perl_shebang+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$opt_perl_shebang" in not_set ) ax_cv_opt_perl_shebang='' ;; * ) ax_cv_opt_perl_shebang=`echo "$opt_perl_shebang" | sed -e's|^#!\s*\(.*\)$|\1|'` esac fi echo "$as_me:$LINENO: result: $ax_cv_opt_perl_shebang" >&5 echo "${ECHO_T}$ax_cv_opt_perl_shebang" >&6 if test "A$ax_cv_opt_perl_shebang" != "A" then ac_cv_sys_kernshrpbang_perl="$ax_cv_opt_perl_shebang" PERL_SHEBANG="$ac_cv_sys_kernshrpbang_perl" { echo "$as_me:$LINENO: OK - PERL_SHEBANG is $_sHpB$PERL_SHEBANG." >&5 echo "$as_me: OK - PERL_SHEBANG is $_sHpB$PERL_SHEBANG." >&6;} # Automatic detection of sharpbang formula starts here else _somian_shbangperl=`$PERLINTERP -V:startperl` negclass="[^']"; # must leave this comment: m4 will remove the outer brackets for us, heheh echo "$as_me:$LINENO: checking for kernel sharpbang invocation to start perl" >&5 echo $ECHO_N "checking for kernel sharpbang invocation to start perl... $ECHO_C" >&6 if test "${ac_cv_sys_kernshrpbang_perl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else _somian_kspb_perl=`echo "$_somian_shbangperl" | sed -ne"s|.*='\($negclass*\)';$|\1|p"` if test "x$_somian_kspb_perl" == x then _somian_ksbp_warn_empty='durnit' else case "A$_somian_kspb_perl" in A#!*perl* ) ac_cv_sys_kernshrpbang_perl=`echo "$_somian_kspb_perl" | sed -e's|#!\(.*\)$|\1|'` ;; A* ) _somian_ksbp_warn_defau='trouble' ac_cv_sys_kernshrpbang_perl="$PERLINTERP" esac fi fi echo "$as_me:$LINENO: result: $ac_cv_sys_kernshrpbang_perl" >&5 echo "${ECHO_T}$ac_cv_sys_kernshrpbang_perl" >&6 # The above prints Checking ... result message to user. PERL_SHEBANG="$ac_cv_sys_kernshrpbang_perl" if test A${_somian_ksbp_warn_empty+set} == Aset then { echo "$as_me:$LINENO: WARNING: In last check, doing $PERLINTERP -V:startperl yielded empty result! That should not happen." >&5 echo "$as_me: WARNING: In last check, doing $PERLINTERP -V:startperl yielded empty result! That should not happen." >&2;} fi # Inform user after printing result value if test A${_somian_ksbp_warn_defau+set} == Aset then { echo "$as_me:$LINENO: Maybe Not good -" >&5 echo "$as_me: Maybe Not good -" >&6;} { echo "$as_me:$LINENO: WARNING: In last check perl's Config query did not work so we bunted: $_sHpB$PERLINTERP" >&5 echo "$as_me: WARNING: In last check perl's Config query did not work so we bunted: $_sHpB$PERLINTERP" >&2;} else { echo "$as_me:$LINENO: OK Good result - " >&5 echo "$as_me: OK Good result - " >&6;} { echo "$as_me:$LINENO: In last check we got a proper-looking answer from perl's Config: $_somian_shbangperl" >&5 echo "$as_me: In last check we got a proper-looking answer from perl's Config: $_somian_shbangperl" >&6;} fi fi if test "x$PERL_SHEBANG" != x ; then perlavailable_TRUE= perlavailable_FALSE='#' else perlavailable_TRUE='#' perlavailable_FALSE= fi if test -z "$PYTHON" then echo "$as_me:$LINENO: checking for --with-python" >&5 echo $ECHO_N "checking for --with-python... $ECHO_C" >&6 # Check whether --with-python or --without-python was given. if test "${with_python+set}" = set; then withval="$with_python" if test "$withval" != "yes" then PYTHON="$withval" echo "$as_me:$LINENO: result: $withval" >&5 echo "${ECHO_T}$withval" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; fi if test -z "$PYTHON" then # Extract the first word of "python", so it can be a program name with args. set dummy python; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PYTHON+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="missing" ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then echo "$as_me:$LINENO: result: $PYTHON" >&5 echo "${ECHO_T}$PYTHON" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test "$PYTHON" != "missing" then echo "$as_me:$LINENO: checking $PYTHON version >= 2.2" >&5 echo $ECHO_N "checking $PYTHON version >= 2.2... $ECHO_C" >&6 if test `$PYTHON -c "import sys; print sys.version[:3] >= \"2.2\" and \"OK\" or \"OLD\""` = "OK" then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 PYTHON="missing" fi fi if test "x$PYTHON" != "xmissing"; then pythonavailable_TRUE= pythonavailable_FALSE='#' else pythonavailable_TRUE='#' pythonavailable_FALSE= fi if test -d "$srcdir/team-framework"; then subdirs="$subdirs team-framework" else { echo "$as_me:$LINENO: WARNING: \"You have deleted the RealTimeBattle Team Framework, so this part is not to be built!\"" >&5 echo "$as_me: WARNING: \"You have deleted the RealTimeBattle Team Framework, so this part is not to be built!\"" >&2;} fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_commands="$ac_config_commands default-2" ac_config_files="$ac_config_files m4/Makefile intl/Makefile Makefile po/Makefile.in Arenas/Makefile Packages/Makefile Packages/rpm/Makefile Packages/debian/Makefile Packages/freebsd/Makefile Documentation/Makefile Documentation/German/Makefile Documentation/Spanish/Makefile Documentation/French/Makefile src/Makefile Robots/Makefile Robots/seek_and_destroy/Makefile Robots/rotate_and_fire/Makefile Robots/empty/Makefile Robots/xt-bot/Makefile Robots/thomas2/Makefile Robots/joypad_robot/Makefile Robots/jBot/Makefile Robots/jBot/jBot.robot Robots/perl-Skeleton/perl-Skeleton.robot Robots/perl-Skeleton/Makefile Robots/perl/perl.robot Robots/perl/Makefile Robots/raziel/raziel.py.robot Robots/raziel/Makefile include/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${SGML2HTML_TRUE}" && test -z "${SGML2HTML_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"SGML2HTML\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"SGML2HTML\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${SGML2LATEX_TRUE}" && test -z "${SGML2LATEX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"SGML2LATEX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"SGML2LATEX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${SGML2INFO_TRUE}" && test -z "${SGML2INFO_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"SGML2INFO\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"SGML2INFO\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${SGML2TXT_TRUE}" && test -z "${SGML2TXT_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"SGML2TXT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"SGML2TXT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${SGML2LYX_TRUE}" && test -z "${SGML2LYX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"SGML2LYX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"SGML2LYX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${SGML2RTF_TRUE}" && test -z "${SGML2RTF_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"SGML2RTF\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"SGML2RTF\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${NO_NETWORK_TRUE}" && test -z "${NO_NETWORK_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"NO_NETWORK\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"NO_NETWORK\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${NO_GRAPHICS_TRUE}" && test -z "${NO_GRAPHICS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"NO_GRAPHICS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"NO_GRAPHICS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ENABLE_RPM_TRUE}" && test -z "${ENABLE_RPM_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"ENABLE_RPM\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"ENABLE_RPM\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${NO_GETOPT_LONG_TRUE}" && test -z "${NO_GETOPT_LONG_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"NO_GETOPT_LONG\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"NO_GETOPT_LONG\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${linuxjoystickavailable_TRUE}" && test -z "${linuxjoystickavailable_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"linuxjoystickavailable\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"linuxjoystickavailable\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${javacavailable_TRUE}" && test -z "${javacavailable_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"javacavailable\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"javacavailable\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${javaavailable_TRUE}" && test -z "${javaavailable_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"javaavailable\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"javaavailable\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${perlavailable_TRUE}" && test -z "${perlavailable_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"perlavailable\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"perlavailable\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${pythonavailable_TRUE}" && test -z "${pythonavailable_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"pythonavailable\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"pythonavailable\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "intl/Makefile" ) CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "Arenas/Makefile" ) CONFIG_FILES="$CONFIG_FILES Arenas/Makefile" ;; "Packages/Makefile" ) CONFIG_FILES="$CONFIG_FILES Packages/Makefile" ;; "Packages/rpm/Makefile" ) CONFIG_FILES="$CONFIG_FILES Packages/rpm/Makefile" ;; "Packages/debian/Makefile" ) CONFIG_FILES="$CONFIG_FILES Packages/debian/Makefile" ;; "Packages/freebsd/Makefile" ) CONFIG_FILES="$CONFIG_FILES Packages/freebsd/Makefile" ;; "Documentation/Makefile" ) CONFIG_FILES="$CONFIG_FILES Documentation/Makefile" ;; "Documentation/German/Makefile" ) CONFIG_FILES="$CONFIG_FILES Documentation/German/Makefile" ;; "Documentation/Spanish/Makefile" ) CONFIG_FILES="$CONFIG_FILES Documentation/Spanish/Makefile" ;; "Documentation/French/Makefile" ) CONFIG_FILES="$CONFIG_FILES Documentation/French/Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "Robots/Makefile" ) CONFIG_FILES="$CONFIG_FILES Robots/Makefile" ;; "Robots/seek_and_destroy/Makefile" ) CONFIG_FILES="$CONFIG_FILES Robots/seek_and_destroy/Makefile" ;; "Robots/rotate_and_fire/Makefile" ) CONFIG_FILES="$CONFIG_FILES Robots/rotate_and_fire/Makefile" ;; "Robots/empty/Makefile" ) CONFIG_FILES="$CONFIG_FILES Robots/empty/Makefile" ;; "Robots/xt-bot/Makefile" ) CONFIG_FILES="$CONFIG_FILES Robots/xt-bot/Makefile" ;; "Robots/thomas2/Makefile" ) CONFIG_FILES="$CONFIG_FILES Robots/thomas2/Makefile" ;; "Robots/joypad_robot/Makefile" ) CONFIG_FILES="$CONFIG_FILES Robots/joypad_robot/Makefile" ;; "Robots/jBot/Makefile" ) CONFIG_FILES="$CONFIG_FILES Robots/jBot/Makefile" ;; "Robots/jBot/jBot.robot" ) CONFIG_FILES="$CONFIG_FILES Robots/jBot/jBot.robot" ;; "Robots/perl-Skeleton/perl-Skeleton.robot" ) CONFIG_FILES="$CONFIG_FILES Robots/perl-Skeleton/perl-Skeleton.robot" ;; "Robots/perl-Skeleton/Makefile" ) CONFIG_FILES="$CONFIG_FILES Robots/perl-Skeleton/Makefile" ;; "Robots/perl/perl.robot" ) CONFIG_FILES="$CONFIG_FILES Robots/perl/perl.robot" ;; "Robots/perl/Makefile" ) CONFIG_FILES="$CONFIG_FILES Robots/perl/Makefile" ;; "Robots/raziel/raziel.py.robot" ) CONFIG_FILES="$CONFIG_FILES Robots/raziel/raziel.py.robot" ;; "Robots/raziel/Makefile" ) CONFIG_FILES="$CONFIG_FILES Robots/raziel/Makefile" ;; "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@RTB_MAJOR_VERSION@,$RTB_MAJOR_VERSION,;t t s,@RTB_MINOR_VERSION@,$RTB_MINOR_VERSION,;t t s,@RTB_MICRO_VERSION@,$RTB_MICRO_VERSION,;t t s,@RTB_RPM_RELEASE@,$RTB_RPM_RELEASE,;t t s,@RTB_RPM_VERSION@,$RTB_RPM_VERSION,;t t s,@RTB_VERSION@,$RTB_VERSION,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@install_info@,$install_info,;t t s,@sgml2html@,$sgml2html,;t t s,@SGML2HTML_TRUE@,$SGML2HTML_TRUE,;t t s,@SGML2HTML_FALSE@,$SGML2HTML_FALSE,;t t s,@sgml2latex@,$sgml2latex,;t t s,@SGML2LATEX_TRUE@,$SGML2LATEX_TRUE,;t t s,@SGML2LATEX_FALSE@,$SGML2LATEX_FALSE,;t t s,@sgml2info@,$sgml2info,;t t s,@SGML2INFO_TRUE@,$SGML2INFO_TRUE,;t t s,@SGML2INFO_FALSE@,$SGML2INFO_FALSE,;t t s,@sgml2txt@,$sgml2txt,;t t s,@SGML2TXT_TRUE@,$SGML2TXT_TRUE,;t t s,@SGML2TXT_FALSE@,$SGML2TXT_FALSE,;t t s,@sgml2lyx@,$sgml2lyx,;t t s,@SGML2LYX_TRUE@,$SGML2LYX_TRUE,;t t s,@SGML2LYX_FALSE@,$SGML2LYX_FALSE,;t t s,@sgml2rtf@,$sgml2rtf,;t t s,@SGML2RTF_TRUE@,$SGML2RTF_TRUE,;t t s,@SGML2RTF_FALSE@,$SGML2RTF_FALSE,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CXXCPP@,$CXXCPP,;t t s,@EGREP@,$EGREP,;t t s,@NO_NETWORK_TRUE@,$NO_NETWORK_TRUE,;t t s,@NO_NETWORK_FALSE@,$NO_NETWORK_FALSE,;t t s,@NO_GRAPHICS_TRUE@,$NO_GRAPHICS_TRUE,;t t s,@NO_GRAPHICS_FALSE@,$NO_GRAPHICS_FALSE,;t t s,@ETR_SOCKET_LIBS@,$ETR_SOCKET_LIBS,;t t s,@PKG_CONFIG@,$PKG_CONFIG,;t t s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t s,@GTK_LIBS@,$GTK_LIBS,;t t s,@ENABLE_RPM_TRUE@,$ENABLE_RPM_TRUE,;t t s,@ENABLE_RPM_FALSE@,$ENABLE_RPM_FALSE,;t t s,@RTB_DIR@,$RTB_DIR,;t t s,@DOCS_DIR@,$DOCS_DIR,;t t s,@INSTALL_INFO@,$INSTALL_INFO,;t t s,@ROBOTDIR@,$ROBOTDIR,;t t s,@ARENADIR@,$ARENADIR,;t t s,@RTB_LOCALEDIR@,$RTB_LOCALEDIR,;t t s,@STDCXX_LIBS@,$STDCXX_LIBS,;t t s,@NO_GETOPT_LONG_TRUE@,$NO_GETOPT_LONG_TRUE,;t t s,@NO_GETOPT_LONG_FALSE@,$NO_GETOPT_LONG_FALSE,;t t s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t s,@USE_NLS@,$USE_NLS,;t t s,@MSGFMT@,$MSGFMT,;t t s,@GMSGFMT@,$GMSGFMT,;t t s,@XGETTEXT@,$XGETTEXT,;t t s,@MSGMERGE@,$MSGMERGE,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@ALLOCA@,$ALLOCA,;t t s,@GLIBC21@,$GLIBC21,;t t s,@HAVE_POSIX_PRINTF@,$HAVE_POSIX_PRINTF,;t t s,@HAVE_ASPRINTF@,$HAVE_ASPRINTF,;t t s,@HAVE_SNPRINTF@,$HAVE_SNPRINTF,;t t s,@HAVE_WPRINTF@,$HAVE_WPRINTF,;t t s,@LIBICONV@,$LIBICONV,;t t s,@LTLIBICONV@,$LTLIBICONV,;t t s,@INTLBISON@,$INTLBISON,;t t s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t s,@CATOBJEXT@,$CATOBJEXT,;t t s,@DATADIRNAME@,$DATADIRNAME,;t t s,@INSTOBJEXT@,$INSTOBJEXT,;t t s,@GENCAT@,$GENCAT,;t t s,@INTLOBJS@,$INTLOBJS,;t t s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t s,@INTLLIBS@,$INTLLIBS,;t t s,@LIBINTL@,$LIBINTL,;t t s,@LTLIBINTL@,$LTLIBINTL,;t t s,@POSUB@,$POSUB,;t t s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t s,@linuxjoystickavailable_TRUE@,$linuxjoystickavailable_TRUE,;t t s,@linuxjoystickavailable_FALSE@,$linuxjoystickavailable_FALSE,;t t s,@JAVAC@,$JAVAC,;t t s,@javacavailable_TRUE@,$javacavailable_TRUE,;t t s,@javacavailable_FALSE@,$javacavailable_FALSE,;t t s,@JAVA@,$JAVA,;t t s,@uudecode@,$uudecode,;t t s,@javaavailable_TRUE@,$javaavailable_TRUE,;t t s,@javaavailable_FALSE@,$javaavailable_FALSE,;t t s,@PERLINTERP@,$PERLINTERP,;t t s,@PERL_SHEBANG@,$PERL_SHEBANG,;t t s,@perlavailable_TRUE@,$perlavailable_TRUE,;t t s,@perlavailable_FALSE@,$perlavailable_FALSE,;t t s,@PYTHON@,$PYTHON,;t t s,@pythonavailable_TRUE@,$pythonavailable_TRUE,;t t s,@pythonavailable_FALSE@,$pythonavailable_FALSE,;t t s,@subdirs@,$subdirs,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; default-1 ) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; default-2 ) if test -f po/Makefile ; then if grep 'MSGMERGE = PATH=../src:$$PATH msgmerge -w 0' po/Makefile >/dev/null 2>&1 ; then # has already been modified : else echo modifying po/Makefile mv -f po/Makefile po/Makefile.tmp sed -e 's/MSGMERGE = PATH=..\/src:$$PATH msgmerge/MSGMERGE = PATH=..\/src:$$PATH msgmerge -w 0/' po/Makefile.tmp > po/Makefile rm po/Makefile.tmp fi fi ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file and --srcdir arguments so they do not pile up. ac_sub_configure_args= ac_prev= for ac_arg in $ac_configure_args; do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | --c=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d $srcdir/$ac_dir || continue { echo "$as_me:$LINENO: configuring in $ac_dir" >&5 echo "$as_me: configuring in $ac_dir" >&6;} { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'" elif test -f $ac_srcdir/configure; then ac_sub_configure="$SHELL '$ac_srcdir/configure'" elif test -f $ac_srcdir/configure.in; then ac_sub_configure=$ac_configure else { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative path. ac_sub_cache_file=$ac_top_builddir$cache_file ;; esac { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval $ac_sub_configure $ac_sub_configure_args \ --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir || { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} { (exit 1); exit 1; }; } fi cd "$ac_popdir" done fi realtimebattle-1.0.8/ABOUT-NLS0000644000175000017500000015113010170545351014101 0ustar moimoiNotes on the Free Translation Project ************************************* Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. Quick configuration advice ========================== If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext to force usage of internationalizing routines provided within this package, despite the existence of internationalizing capabilities in the operating system where this package is being installed. So far, only the `gettext' implementation in the GNU C library version 2 provides as many features (such as locale alias, message inheritance, automatic charset conversion or plural form handling) as the implementation here. It is also not possible to offer this additional functionality on top of a `catgets' implementation. Future versions of GNU `gettext' will very likely convey even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. So you need _not_ provide this option if you are using GNU libc 2 or you have installed a recent copy of the GNU gettext package with the included `libintl'. INSTALL Matters =============== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. If not, the included GNU `gettext' library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls will, respectively, bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might not be desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. Using This Package ================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your country by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. Translating Teams ================= For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `translation@iro.umontreal.ca' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skill are praised more than programming skill, here. Available Packages ================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of January 2004. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es +----------------------------------------------------+ a2ps | [] [] [] [] | aegis | () | ant-phone | () | anubis | | ap-utils | | aspell | [] | bash | [] [] [] [] | batchelor | | bfd | [] [] | binutils | [] [] | bison | [] [] [] | bluez-pin | [] [] [] | clisp | | clisp | [] [] [] | console-tools | [] [] | coreutils | [] [] [] [] | cpio | [] [] [] | darkstat | [] () [] | diffutils | [] [] [] [] [] [] [] | e2fsprogs | [] [] [] | enscript | [] [] [] [] | error | [] [] [] [] [] | fetchmail | [] () [] [] [] [] | fileutils | [] [] [] | findutils | [] [] [] [] [] [] [] | flex | [] [] [] [] | fslint | | gas | [] | gawk | [] [] [] [] | gbiff | [] | gcal | [] | gcc | [] [] | gettext | [] [] [] [] [] | gettext-examples | [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] [] | gimp-print | [] [] [] [] [] | gliv | | glunarclock | [] [] | gnubiff | [] | gnucash | [] () [] [] | gnucash-glossary | [] () [] | gnupg | [] () [] [] [] [] | gpe-aerial | [] | gpe-beam | [] [] | gpe-calendar | [] [] | gpe-clock | [] [] | gpe-conf | [] [] | gpe-contacts | [] [] | gpe-edit | [] | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] | gpe-taskmanager | [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | [] [] | gphoto2 | [] [] [] [] | gprof | [] [] [] | gpsdrive | () () () | gramadoir | [] | grep | [] [] [] [] [] [] | gretl | [] | gtick | [] () | hello | [] [] [] [] [] [] | id-utils | [] [] | indent | [] [] [] [] | iso_3166 | [] [] [] [] [] [] [] [] [] [] | iso_3166_1 | [] [] [] [] [] [] | iso_3166_2 | | iso_3166_3 | [] | iso_4217 | [] [] [] [] | iso_639 | | jpilot | [] [] [] | jtag | | jwhois | [] | kbd | [] [] [] [] [] | latrine | () | ld | [] [] | libc | [] [] [] [] [] [] | libgpewidget | [] [] | libiconv | [] [] [] [] [] | lifelines | [] () | lilypond | [] | lingoteach | | lingoteach_lessons | () () | lynx | [] [] [] [] | m4 | [] [] [] [] | mailutils | [] [] | make | [] [] [] | man-db | [] () [] [] () | minicom | [] [] [] | mysecretdiary | [] [] [] | nano | [] () [] [] [] | nano_1_0 | [] () [] [] [] | opcodes | [] | parted | [] [] [] [] [] | ptx | [] [] [] [] [] | python | | radius | [] | recode | [] [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] [] [] [] [] [] | sed | [] [] [] [] [] [] | sh-utils | [] [] [] | shared-mime-info | | sharutils | [] [] [] [] [] [] | silky | () | skencil | [] () [] | sketch | [] () [] | soundtracker | [] [] [] | sp | [] | tar | [] [] [] [] | texinfo | [] [] [] | textutils | [] [] [] [] | tin | () () | tp-robot | | tuxpaint | [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] [] | vorbis-tools | [] [] [] [] | wastesedge | () | wdiff | [] [] [] [] | wget | [] [] [] [] [] [] | xchat | [] [] [] [] | xfree86_xkb_xml | [] [] | xpad | [] | +----------------------------------------------------+ af am ar az be bg bs ca cs da de el en en_GB eo es 4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68 et eu fa fi fr ga gl he hr hu id is it ja ko lg +-------------------------------------------------+ a2ps | [] [] [] () () | aegis | | ant-phone | [] | anubis | [] | ap-utils | [] | aspell | [] [] | bash | [] [] | batchelor | [] [] | bfd | [] | binutils | [] [] | bison | [] [] [] [] | bluez-pin | [] [] [] [] [] | clisp | | clisp | [] | console-tools | | coreutils | [] [] [] [] [] [] | cpio | [] [] [] [] | darkstat | () [] [] [] | diffutils | [] [] [] [] [] [] [] | e2fsprogs | | enscript | [] [] | error | [] [] [] [] | fetchmail | [] | fileutils | [] [] [] [] [] [] | findutils | [] [] [] [] [] [] [] [] [] [] [] | flex | [] [] [] | fslint | [] | gas | [] | gawk | [] [] [] | gbiff | [] | gcal | [] | gcc | [] | gettext | [] [] [] | gettext-examples | [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] [] | gimp-print | [] [] | gliv | () | glunarclock | [] [] [] [] | gnubiff | [] | gnucash | () [] | gnucash-glossary | [] | gnupg | [] [] [] [] [] [] [] | gpe-aerial | [] | gpe-beam | [] | gpe-calendar | [] [] [] | gpe-clock | [] | gpe-conf | [] | gpe-contacts | [] [] | gpe-edit | [] [] | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] | gpe-sketchbook | [] | gpe-su | [] | gpe-taskmanager | [] | gpe-timesheet | [] [] [] | gpe-today | [] [] | gpe-todo | [] [] | gphoto2 | [] [] [] | gprof | [] [] | gpsdrive | () () () | gramadoir | [] [] | grep | [] [] [] [] [] [] [] [] [] [] [] | gretl | [] [] | gtick | [] [] [] | hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] [] | indent | [] [] [] [] [] [] [] [] [] | iso_3166 | [] [] [] [] [] [] [] | iso_3166_1 | [] [] [] [] [] | iso_3166_2 | | iso_3166_3 | | iso_4217 | [] [] [] [] [] [] | iso_639 | | jpilot | [] () | jtag | [] | jwhois | [] [] [] [] | kbd | [] | latrine | [] | ld | [] | libc | [] [] [] [] [] [] | libgpewidget | [] [] [] [] | libiconv | [] [] [] [] [] [] [] [] [] | lifelines | () | lilypond | [] | lingoteach | [] [] | lingoteach_lessons | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailutils | | make | [] [] [] [] [] [] | man-db | () () | minicom | [] [] [] [] | mysecretdiary | [] [] | nano | [] [] [] [] | nano_1_0 | [] [] [] [] | opcodes | [] | parted | [] [] [] | ptx | [] [] [] [] [] [] [] | python | | radius | [] | recode | [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] | sed | [] [] [] [] [] [] [] [] [] | sh-utils | [] [] [] [] [] [] [] | shared-mime-info | [] [] [] | sharutils | [] [] [] [] [] | silky | () [] () () | skencil | [] | sketch | [] | soundtracker | [] [] | sp | [] () | tar | [] [] [] [] [] [] [] [] [] | texinfo | [] [] [] [] | textutils | [] [] [] [] [] [] | tin | [] () | tp-robot | [] | tuxpaint | [] [] [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux | [] [] [] [] () [] | vorbis-tools | [] | wastesedge | () | wdiff | [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] | xchat | [] [] [] | xfree86_xkb_xml | [] [] | xpad | [] [] | +-------------------------------------------------+ et eu fa fi fr ga gl he hr hu id is it ja ko lg 22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0 lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru +-----------------------------------------------------+ a2ps | [] [] () () [] [] [] | aegis | () () () | ant-phone | [] [] | anubis | [] [] [] [] [] [] | ap-utils | [] () [] | aspell | [] | bash | [] [] [] | batchelor | [] | bfd | [] | binutils | [] | bison | [] [] [] [] [] | bluez-pin | [] [] [] | clisp | | clisp | [] | console-tools | [] | coreutils | [] [] | cpio | [] [] [] [] [] | darkstat | [] [] [] [] | diffutils | [] [] [] [] [] [] | e2fsprogs | [] | enscript | [] [] [] [] | error | [] [] [] | fetchmail | [] [] () [] | fileutils | [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] | fslint | [] [] | gas | | gawk | [] [] [] | gbiff | [] [] | gcal | | gcc | | gettext | [] [] [] | gettext-examples | [] [] [] | gettext-runtime | [] [] [] [] | gettext-tools | [] [] | gimp-print | [] | gliv | [] [] [] | glunarclock | [] [] [] [] | gnubiff | [] | gnucash | [] [] () [] | gnucash-glossary | [] [] | gnupg | [] | gpe-aerial | [] [] [] [] | gpe-beam | [] [] [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] | gpe-conf | [] [] [] [] | gpe-contacts | [] [] [] [] | gpe-edit | [] [] [] [] | gpe-go | [] [] [] | gpe-login | [] [] [] [] | gpe-ownerinfo | [] [] [] [] | gpe-sketchbook | [] [] [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] [] [] | gphoto2 | [] | gprof | [] [] | gpsdrive | () () [] | gramadoir | () [] | grep | [] [] [] [] [] | gretl | | gtick | [] [] [] | hello | [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] [] | indent | [] [] [] [] | iso_3166 | [] [] [] | iso_3166_1 | [] [] | iso_3166_2 | | iso_3166_3 | [] | iso_4217 | [] [] [] [] [] [] [] [] | iso_639 | [] | jpilot | () () | jtag | | jwhois | [] [] [] [] () | kbd | [] [] [] | latrine | [] | ld | | libc | [] [] [] [] | libgpewidget | [] [] [] | libiconv | [] [] [] [] [] | lifelines | | lilypond | | lingoteach | | lingoteach_lessons | | lynx | [] [] [] | m4 | [] [] [] [] [] | mailutils | [] [] [] | make | [] [] [] [] | man-db | [] | minicom | [] [] [] [] | mysecretdiary | [] [] [] | nano | [] [] [] [] [] | nano_1_0 | [] [] [] [] [] [] | opcodes | [] [] | parted | [] [] [] [] | ptx | [] [] [] [] [] [] [] [] | python | | radius | [] [] | recode | [] [] [] [] | rpm | [] [] [] | screem | | scrollkeeper | [] [] [] [] [] | sed | [] [] [] | sh-utils | [] [] | shared-mime-info | [] [] | sharutils | [] [] | silky | () | skencil | [] [] | sketch | [] [] | soundtracker | | sp | | tar | [] [] [] [] [] [] | texinfo | [] [] [] [] | textutils | [] [] | tin | | tp-robot | [] | tuxpaint | [] [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] | vorbis-tools | [] [] [] | wastesedge | | wdiff | [] [] [] [] [] | wget | [] [] [] | xchat | [] [] [] | xfree86_xkb_xml | [] [] | xpad | [] [] | +-----------------------------------------------------+ lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru 1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63 sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu +-----------------------------------------------------+ a2ps | [] [] [] [] | 16 aegis | | 0 ant-phone | | 3 anubis | [] [] | 9 ap-utils | () | 3 aspell | | 4 bash | | 9 batchelor | | 3 bfd | [] [] | 6 binutils | [] [] [] | 8 bison | [] [] | 14 bluez-pin | [] [] [] | 14 clisp | | 0 clisp | | 5 console-tools | | 3 coreutils | [] [] [] [] | 16 cpio | [] [] | 14 darkstat | [] [] [] () () | 12 diffutils | [] [] [] | 23 e2fsprogs | [] [] | 6 enscript | [] [] | 12 error | [] [] [] | 15 fetchmail | [] [] | 11 fileutils | [] [] [] [] [] | 17 findutils | [] [] [] [] [] [] | 29 flex | [] [] | 13 fslint | | 3 gas | [] | 3 gawk | [] [] | 12 gbiff | | 4 gcal | [] [] | 4 gcc | [] | 4 gettext | [] [] [] [] [] | 16 gettext-examples | [] [] [] [] [] | 14 gettext-runtime | [] [] [] [] [] [] [] [] | 22 gettext-tools | [] [] [] [] [] [] | 14 gimp-print | [] [] | 10 gliv | | 3 glunarclock | [] [] [] | 13 gnubiff | | 3 gnucash | [] [] | 9 gnucash-glossary | [] [] [] | 8 gnupg | [] [] [] [] | 17 gpe-aerial | [] | 7 gpe-beam | [] | 8 gpe-calendar | [] [] [] [] | 13 gpe-clock | [] [] [] | 10 gpe-conf | [] [] | 9 gpe-contacts | [] [] [] | 11 gpe-edit | [] [] [] [] [] | 12 gpe-go | | 5 gpe-login | [] [] [] [] [] | 13 gpe-ownerinfo | [] [] [] [] | 13 gpe-sketchbook | [] [] | 9 gpe-su | [] [] [] | 10 gpe-taskmanager | [] [] [] | 10 gpe-timesheet | [] [] [] [] | 12 gpe-today | [] [] [] [] [] | 13 gpe-todo | [] [] [] [] | 12 gphoto2 | [] [] [] | 11 gprof | [] [] | 9 gpsdrive | [] [] | 3 gramadoir | [] | 5 grep | [] [] [] [] | 26 gretl | | 3 gtick | | 7 hello | [] [] [] [] [] | 34 id-utils | [] [] | 12 indent | [] [] [] [] | 21 iso_3166 | [] [] [] [] [] [] [] | 27 iso_3166_1 | [] [] [] | 16 iso_3166_2 | | 0 iso_3166_3 | | 2 iso_4217 | [] [] [] [] [] [] | 24 iso_639 | | 1 jpilot | [] [] [] [] [] | 9 jtag | [] | 2 jwhois | () [] [] | 11 kbd | [] [] | 11 latrine | | 2 ld | [] [] | 5 libc | [] [] [] [] | 20 libgpewidget | [] [] [] [] | 13 libiconv | [] [] [] [] [] [] [] [] | 27 lifelines | [] | 2 lilypond | [] | 3 lingoteach | | 2 lingoteach_lessons | () | 0 lynx | [] [] [] | 14 m4 | [] [] | 15 mailutils | | 5 make | [] [] [] | 16 man-db | [] | 5 minicom | | 11 mysecretdiary | [] [] | 10 nano | [] [] [] [] | 17 nano_1_0 | [] [] [] | 17 opcodes | [] [] | 6 parted | [] [] [] | 15 ptx | [] [] | 22 python | | 0 radius | | 4 recode | [] [] [] | 20 rpm | [] [] | 9 screem | [] [] | 2 scrollkeeper | [] [] [] | 15 sed | [] [] [] [] [] [] | 24 sh-utils | [] [] | 14 shared-mime-info | [] [] | 7 sharutils | [] [] [] [] | 17 silky | () | 3 skencil | [] | 6 sketch | [] | 6 soundtracker | [] [] | 7 sp | [] | 3 tar | [] [] [] [] [] | 24 texinfo | [] [] [] | 14 textutils | [] [] [] [] | 16 tin | | 1 tp-robot | | 2 tuxpaint | [] [] [] [] [] | 29 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux | [] [] | 15 vorbis-tools | | 8 wastesedge | | 0 wdiff | [] [] [] | 18 wget | [] [] [] [] [] [] [] [] | 24 xchat | [] [] [] [] [] | 15 xfree86_xkb_xml | [] [] [] [] [] | 11 xpad | | 5 +-----------------------------------------------------+ 63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu 131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If January 2004 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. Using `gettext' in new packages =============================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `translation@iro.umontreal.ca' to make the `.pot' files available to the translation teams. realtimebattle-1.0.8/AUTHORS0000644000175000017500000000147510320513045013720 0ustar moimoiOriginal authors: Erik Ouchterlony Ragnar Ouchterlony Further development / maintaining / porting and bug fixes: Benoit Rousseau Mr. Friendly (Volker Strbel) Johannes Nicolai Remi Vanicat Moskvan Jaromir Translators: Andoni Ayala Rui Sousa Uwe Hermann Additional robots xt-bot: xt, bug fixes and some enhancements made by Falko Menge thomas2: Thomas Ouchterlony joypad_robot: Jiro Sekiba, some minor modifications made by Johannes Nicolai jBot: Ingo Beckmann perl-Skeleton: Shinsuke Noguchi perl: unknown raziel: Torsten Sachse, Johannes Nicolai brotfrucht: This is the first working strategy for the RTB Team Framework, see the AUTHORS file there for details and many other If you have contributed to RealTimeBattle and you are not on the list or want to be removed from it, please report to jonico@users.sourceforge.net realtimebattle-1.0.8/COPYING0000644000175000017500000004311010170545352013704 0ustar moimoi 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. Copyright (C) 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. , 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. realtimebattle-1.0.8/ChangeLog0000644000175000017500000000150410324172123014415 0ustar moimoi2005-10-15 Johannes Nicolai * Release RealTimeBattle 1.0.8, see release notes on sourceforge for further details 2005-09-19 Volker Stroebel * configure.in include/Makefile.am include/BroadCast.h include/ClientInterface.h src/Makefile.am src/Broadcast.cpp src/ClientInterface.cpp src/ArenaBase.cpp src/ArenaRealTime.cpp src/RealTimeBattle.cpp Added BroadCast class for new logging system Added ClientInterface class for experimental network support Changed ArenaRealTime to use BroadCast singleton for logfiles 2004-11-12 Johannes Nicolai * Created working autoconf / automake / autoheader structure * Imported some configuration data out of older versions and modified them so thatyou can install RealTime Battle on a modern system realtimebattle-1.0.8/INSTALL0000644000175000017500000001722710170545352013714 0ustar moimoiBasic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. realtimebattle-1.0.8/NEWS0000644000175000017500000000047210170545352013354 0ustar moimoiThis is the my first version of RTB as new maintainer. I tried to repair the autoconf mechanism and port some missing features, the older versions of RTB had to this new one that is compilable with gtk 2 and gcc >= 3.0 If you encounter any bugs, please report them to the sourceforge bug tracker. Johannes Nicolairealtimebattle-1.0.8/TODO0000644000175000017500000000074510260540741013345 0ustar moimoi- take a deeper look into the old configure.in files - improve the quality of the building process - add more robots to the distribution - try to port the map editor and the other utilities to gcc >=3.0 - fix the problems with the rpm packaging - add automatic debian and free bsd package support - add more arenas to the distribution - try to improve the old version of RTB step by step If you want to do one or even more of these points, please contact jonico@users.sourceforge.net realtimebattle-1.0.8/RealTimeBattle.xpm0000644000175000017500000000504710170545352016244 0ustar moimoi/* XPM */ static char *RealTimeBattle[] = { /* width height num_colors chars_per_pixel */ " 45 49 3 1", /* colors */ ". c #000000", "# c #00fa36", " c None", /* pixels */ ".... ", ".... ", ".... ", ".... ", " ", " ", " ", " ", " .... ", " .... ", " .... ", " .... ", " ", " ", " ", " ", " ", " ", " .... ", " .... ", " .... ", " .... ", " ", " ########## ", " ############## ", " ####.########### ", " #####..############# ", " ####....############ ", " ####.....############# ", " #####......###.######### ", " ######.....###..######## ", " #######......##..#########", " ########.....##..#########", " ########......#.##########", " #########.......##########", " #########....#..##########", " ######...#..##.###########", " ######......##.###########", " ##########.....###########", " ##########################", " ##########################", " ######################## ", " ######################## ", " ###################### ", " #################### ", " #################### ", " ################ ", " ############## ", " ########## " }; realtimebattle-1.0.8/tournament.txt0000644000175000017500000000020410170545353015604 0ustar moimoiRobots: empty.robot seek_and_destroy.robot rotate_and_fire_signal.robot Arenas: * Games/Sequence: * Robots/Sequence: 3 Sequences: 1 realtimebattle-1.0.8/rtblogo1024.jpg0000644000175000017500000024172010170545353015342 0ustar moimoiJFIFHH ExifMM*bj(1r2iHHAdobe Photoshop 7.02004:11:13 19:33:55(& HHJFIFHH Adobe_CMAdobed            `"?   3!1AQa"q2B#$Rb34rC%Scs5&DTdE£t6UeuF'Vfv7GWgw5!1AQaq"2B#R3$brCScs4%&5DTdEU6teuFVfv'7GWgw ?ĒIFI$JRI$I$$I)I$JRI$I$ĒIFI$JRI$I$$I)I$JRI$I$lumukF;O5`+OWa?wG@p0^P9Թqd*=˪ǧѐquY}?UPqH8}FR͑&c I ڴƙvMiDc2ָg&?9zj6 K' d5#W_1ec1:O#7/BwʟݟMhc-wWcC%u^oC]Llusv]B8ǝ,?sRr2>jg(7G^=i RԮ ?I)(nGHN\8 9OTqF( O8Ա&k MUi`22^~Ib5fobt1oԾ"?3~@"?_Rrٹl!,9H2/.g3q=WιƿI8[`muͮMJUOͳvEXY %6SKw^nHgwK&M?3I#?-9d"_?rئ|1OSȳ!\-;/}['2z6Xc]3uW]wK?3I&&g9IG|'% ~O '?⼽] ">k0YQp56?R̞c_ei==75ֹv.?I(^'$<4"3g<#xw\1f#7x~O3q(//c {_:m e4aTr _Xe2Y]/?g}m~w?H [{?dG,%) bg.3B7sf_-py+z%^mg>Z}/̮˨{]UvVҮfPv7H?zWsnOKC,..iٻnͭgx!xr18CӼc$'ĒIFI$JRI$I$$I)I$JRI$I$ĒIFI$JRI$I$$I)I$JRI$I$LPhotoshop 3.08BIM%8BIMHH8BIM&?8BIM 8BIM8BIM 8BIM 8BIM' 8BIMH/fflff/ff2Z5-8BIMp8BIM@@8BIM8BIMK rtblogo1600nullboundsObjcRct1Top longLeftlongBtomlongRghtlongslicesVlLsObjcslicesliceIDlonggroupIDlongoriginenum ESliceOrigin autoGeneratedTypeenum ESliceTypeImg boundsObjcRct1Top longLeftlongBtomlongRghtlongurlTEXTnullTEXTMsgeTEXTaltTagTEXTcellTextIsHTMLboolcellTextTEXT horzAlignenumESliceHorzAligndefault vertAlignenumESliceVertAligndefault bgColorTypeenumESliceBGColorTypeNone topOutsetlong leftOutsetlong bottomOutsetlong rightOutsetlong8BIM8BIM8BIM ` JFIFHH Adobe_CMAdobed            `"?   3!1AQa"q2B#$Rb34rC%Scs5&DTdE£t6UeuF'Vfv7GWgw5!1AQaq"2B#R3$brCScs4%&5DTdEU6teuFVfv'7GWgw ?ĒIFI$JRI$I$$I)I$JRI$I$ĒIFI$JRI$I$$I)I$JRI$I$lumukF;O5`+OWa?wG@p0^P9Թqd*=˪ǧѐquY}?UPqH8}FR͑&c I ڴƙvMiDc2ָg&?9zj6 K' d5#W_1ec1:O#7/BwʟݟMhc-wWcC%u^oC]Llusv]B8ǝ,?sRr2>jg(7G^=i RԮ ?I)(nGHN\8 9OTqF( O8Ա&k MUi`22^~Ib5fobt1oԾ"?3~@"?_Rrٹl!,9H2/.g3q=WιƿI8[`muͮMJUOͳvEXY %6SKw^nHgwK&M?3I#?-9d"_?rئ|1OSȳ!\-;/}['2z6Xc]3uW]wK?3I&&g9IG|'% ~O '?⼽] ">k0YQp56?R̞c_ei==75ֹv.?I(^'$<4"3g<#xw\1f#7x~O3q(//c {_:m e4aTr _Xe2Y]/?g}m~w?H [{?dG,%) bg.3B7sf_-py+z%^mg>Z}/̮˨{]UvVҮfPv7H?zWsnOKC,..iٻnͭgx!xr18CӼc$'ĒIFI$JRI$I$$I)I$JRI$I$ĒIFI$JRI$I$$I)I$JRI$I$8BIM!UAdobe PhotoshopAdobe Photoshop 7.08BIMHhttp://ns.adobe.com/xap/1.0/ adobe:docid:photoshop:c61b5d75-35a1-11d9-8bbe-8de394072d11 !Adobed@       )  0 !1"#@423$PA&%5 !1AQaq"2 0B5Rbr#3$6@CSc%&s4DdtPTU!1Qa2 0Aq"BRb@r#3`C4!1AQaq 0P  > C@@(*>@ J @yX_܅vW\'n*+l+`pU[zas0K %&Uc>(ͭ#UDuEUew%nuc4t&f kz?]]{7/Z,޷YA )Yd.ۺ^uj}&֑V3O5)X)YTK*wm[]r#+Ǖ7jL:F\0V xT[fsuk)2TVMRRX#Y*˥`eҴWm,'&2VJº廅w;nZ//wх@w-xuwF廝W;֮v.漫mEvw5 ƗgxWkowOG;f4ҢPj Fl + rҪp+gSGL۱~~zO' zfU`eƳ+Jv5!U6QZOf3V]*XNnk ƺVڮon1_7sqn]oλg;~4HeFR肒JʥeF)4U+K P[nrHJ]%JF.7-\ۺ]qjpqOr??jgpՍm\ Yk,%.q-+r|˝2dG_/9̼jې\pn庩miUS+Ijr.Cs-!p{a]Wa\iX:g53_tGX[lF:e Wm\.۪"6j'Fti􆕂^|]t nxz.+v%Lm56:nyc`|G.5JɌFR#*xLe"5a:w(Ξ2YT_rWKnwmWNeE~Rj^YuM:Z-Þ5K|-|9_K_~>qV}W/e9fmS,ݵvfzۖ?OV]+r6ɢ:&zÿWǟFx8ss;0VRps&y>xYuxGtyy~wyn^UL]r¢PXJ5ST>QZEZiY1lQ.BG\qk^ 9!GJ<;UQ4eMd_x+uDkI [ܥs~O{W/y/nکc>R)4vC@Ojro?az>uf"fr#ͽL˲1onːZAJGZOjeB|:T| 6w eU|ſMsLc\[rui O[ܲؿ_XKfyQVTY1,eE ?>=H?LpXKq=̯pƭj[m?y=7;m]oY]PMs^o<ܯJ=ҴI;̝biGV|RU%Invw-v-]vj׽nW~6N.Cd^غ]U8L*ɍdF[?^d}C0˻>[gpIdc^eWsθ7?^xCn|p_7 z7k֮w;P==igǟ(7҂3=#Sj"}eyZX΂uWmnpYwWvV^&Iboػ^W(L> U4gxF>wAA'g}+wv۫AJ[hzf}wЭJ\~O`ǵ^v}usJHFR_u&J+HHHðvo_>I矧>-]Q'iT6&gyܹFxwd98ӫOʎ۹9h}uxoќ4*>yn^' }sVi]s)Ĺݵsjv7?!ۯY(,߼߱ڟ {v>nv֎vj*G-xF^&Meb߯غݳU͍"RY2En?,v?Լ{)2Z-VnvmxQWl/g~ yMǽyG8 JxJ3IaW*&V֓kJªp^TOW?/;u*WarK73\{-Ecyݳ8R]+I ۭ\ݟ0} xW{7=N(/ku]ϯ~iZ<nڸݵQ(,l}?nħ֓Tk}I'[v>z>ZxΊo}f|2ýL3Gɲr\l+bUnHTL|[uwG"."1\-֙F>Exf+M {]WcW/9J5m`>w698.B22:8NP+ZOkgnvֳ>=+>v|&YհzXf߬Pb_VA]]Ǻv|N~ᄋY8O~'zc6/1޸AEϥ=L֡5w`sNԟ>Y:O3 Ƹ]tjz庩>9d뜚tQ(N3η_K~N ϠgEt~u5˕3}f<}+MtnXvIddyXN6E;y<t~6En.F5`uO ]=iIcIUf{/ǿBxC4_Žo;&Ž^rn庨Ib-[ΎHLe2ၛ/-Z]qke|S_h~׉ZGfDL*+º#-|n-Ns?^y{s%3G$} Ľ(?}[q\?\dfEٔוufv\\Svt5?;8ӫxEO;ܚۏJx7m;=?VVNNN6Gxfz"U;]:WY._~s}zLpNKfryDCd|>6JN'FcA&U;56N;ϧ_.OggGΑ?`\RNi}-_eu[ʟ8NYh|cf3eo/{zߛ]F]tjvǟb}I/NjV|>(ϔk.BPZӟ6+OExf*e %)^-up9Oú0玷oCv|Ҷ J瘖yғcIѤR:ST ١zռWz U53Go 绯]|o+w뽉z#7GO]'лggo Ȩ=lM?gڶ+]Y]qkzߺu>Smfr=dǿjzF_ Lpnr|n]_k⾁3gAqr3-K~9F헸U'W,w'ZW/6N}䌻3待7D8wnx<D>TX'pyB_g4p_:; wSǒfbK~+YG;vO>Ωz7ڳ7}BגIqnflt2wGMl#>4DAU,Az78\;?cӷj}m͹ן7nwjÝHgҹtfpIj|og>t6[OOkSu/*uitgr.v&mbxwJ=mнgin:ӒtǺ_==s𮹮{?-~~~fu=7 r<"zҤ*_ks\G)#<5߇t}w[x `4Թ?aŻo:l_s~]OpyҪ<|CZגmtR|i:1VhV&W}QG[tk;yi:srJ~+ʏ8윻yvݿ5 ~oh\CS ޡ.x윻xS|FE[9Y Uؽ/.o)W "lr%TQVMz"~;7,g֝z#lj57f^dc;^ #j.uo&;4;g({ }?"篠6E=L&ʓkIut_=+;qդ$CJmC_8VeIk}^yGb/nؼ?ӎu˟C}Wannww\xԶ\/Wνy5L#>ED5Ii.zv^<ǵE_(oo>,?;>8wny|okn^; Ϭ>&kN5ֽv]em;!}O3o>6CHoIRmii|_f*mDVTk&˥m89Fu%<=*6lOKӾ'̋,]<[%~~K_wɛ/m:=gBҐ*R* ӵ Cngwq`|4^`?37{ 3Q5ysutNɭF|TwV`9~r }j% bZW3Cqrl62%S0+Op㏤ҺvXWaƎsr ; Upg2lTQ7ϣ`^/Y~fazzGms?z/GZFRei|FrUOTEȪޥĈuiqjv=ofg菞S̍HX͕#>c*HNmW(91UT!]rLQ(L*RTJDe"2DETqj~7{knь>Zyʒ䨓FT$'En'I R()QeIՌRt6#)QM%.(BM%"5!:;sPSkA*l޷[O GU\sj~kk۟(Kia: w-֮[ܷZCn,e*2M* 2~Sy#>i +*FR#)4"bFbd V]+ +.JȢ5b'J5RTQ8UJ3+HHΡ@Z˭eֲ4VU+&HeұTuug򕄆J>E+ek.dkB5}>Q&T1}i6Qj |S(ZF|dҲiZhLeO H#: Z] +ighx4 3ChxJȪcf-#(l3AXGǎ4; o% 3V }Je4CI{',\i6@4IJ/!ISqC&:$6LEkXDCImFѴ8)N_MZG]w F\0JX#:lY e9 ][D+Ѳ?G~ ?IQJ罍=/7?#-X '1bP1讆PfGCa5j1>_D:Vb8? Fh1i:ex8>@*0P ꏔdWd% 13IgaiFHՈ^.WDo{scMn_Q+I6'WJxaH @3Sգ@F ;iH$0b͐=tqHBb;oЫIݔ:tx Vcyb>76[fq)0uY)M}&3;mdBt3Mm47dZ3A+tu ]m+FNV508̌8Ĝ2D% M @ ZPMKeh59Lf+ mh2eeώnI6/Q1鐣aN&h6֥k@':]TI{8c3XMjd yTt^Dbz2"F>*4~5sH-TQ(J1Q(un#f#c$ @Ki̕!Q^r3V:9[&$ISN;~f$tդ2ÉO_qy%ٜ$-ǯb_a>["UfC9#ezkOZ4h CLg(眸"j3$PWڴbq[peQ2LV؎2ƷEO鈫P-r& sa׆\Hs>W) (*22UpbԒ66:I qtяR7a[yuCQId+&uFYo fkѓPN3{9}c\1':odJ)gymvHw#ݏ)[CHuH=oGVնti >KiɭS>F.{`ڦW[i:cˌqՋ%*!$fsAgq3+qdlU=ߣt_c9YlAKNUᇛ}:u3"+_1u-,֪!7iro.ױ"J9 .z"' LvWek;FqK0c8{5AocI sROv'M# AB".1zD}c6f/mvYCh/xL4@gmkWet0K`e O4ڜT(;93Oк5vslt "ŮfO퉯I9݊I7/FC- J^|L#kNT ַ@li_uG&,2'%'7 y b֢Tޮ$@ffRFj8Dd1ܟ#X5)xuj4QyĖb=r;T1!o*pquCXim5rh76̧$'8|p`s ^0[5Aۉסr'JL9&Se-#{l6{RYK(!;>AMKkq<Ѳ0'ej؉U&QU- ZPQ'3(4`n%F>A})q6fЃDj5¾i{$RGW0`_͓#lkR]%v }dZe#ɑB5C4 ͎!qI 'cFRM 6fk*}.@o@.w`qgYSg.t;zL :[!\q0c9R2f;rbTwgdhAD3VY,L ѥ#(#F?VA8Kmߤ-YcIpIM(x:uBu /$C*P[;$YԽ}[ǐC 0-`*> eTHu.\(%\dfK S4ҵ+Z#K0 VTC]N7$2C߱BV1<JD~IT [0]VZgcz+FSY ecPK+0\DlYU!m ˍ&)Yc}Z57TȳG~8^A@ *!]FDVh={kE,mN ,qgmLi'F}R$<Jm L(72!L$QKi@4n3Mo&GC$"4%FDA%n/ $аPc"" FBC-BA,IWm%CMb4KiA dB!э e HA1cS4> hM:FѴ%8FД>/֟ t0_t4]\FM(.ކ-Ai)h$Ҷ@4 Ah4F@j6 A$hF@DHH"ttzuӡ ] HƢSC@Eu2 h4COƝ h4 EЁ h4CAC/N&1 @ @OPnOp r-r-r-plhhj͏nnn͏ljhhjp-v=l{ǹl{Ǻl{ǻ@h {ǹl{Ǹl{vǶl{fǶl{fǶl{fǶl{vǷl{Ǹl{Ƿl{vǷl{vǶl{fǶl{fǶl{Vǵl{Vh{Fh{&h{&h{&h{&h{&h{dy̏92AYJD#m+)4,8U~$j88ӮԱSN fL+,LIY{,?]g[xͰ5wHT iEl$K)i-veFm y>P6 #!tq#S%F2?#0WVBOC!$<)ⅹ~:_t^tm:DC!$B0I&1Zj`wdKxGqv5jѤoZHB`5C &BG A4ҝZÅ#h5bo!ld-U=yj]!ĄYHn _4̴,!S+P8mta<8Ґٖ Ս_%T#jpKiT n=9:_9/"K a?ԗ0Nh) O -@qhRM' dg&14*^2S-\xj(Ѷ#o^#Q51B1 q FP0`wJI K9PTlc#q7%X%F10 gwIc!7p7 pBMj5qx[  l謅tH:Ѡ0} Z5O^7%,)B}15ADfp Sw!)m@c?ܒMX曰WM9Ē=Ktmne epL;?sh[_W}cI Y؋ W)a qs.B}ۨ_qRӠ>5-[p3 #zA9ݭI&KLT~)p[OA0}RFZ|Wh׾ uۛ#Ѩ7Cuё0J[RFH(NK GVd,X!IKСdҵw^鈚{)m[*)QW`Pڜ3{i$թZWj I"`d.~@<_Zb6hϧ(gnHXުa!Aھpӵ~Rك놹O}Pk!-TwJHYC%ڰ:YT'H39%j)]1JWy)$IrSrDklօ{dVK#ƑBK7 p&il^MslXCKJg5֠Htf\T7Vd= CGm1{PKT[#dR$$Ԕndy%S+ۿ'V8u h&Fq _Ё},u㋌1IK$&Sqš %\ҙ'Vz[,% e(Bsc!1nALe$8IhӥzH^>5u%Z2v):Ymw4̄JM-]H'9Q-bs8h !ޫHO!3y &pz <ҭZJ&c3W:RB;$_SHO)BI'S\p\aͳH2 aZ,H$A8AD?N/- ΘXaiN&cd jjGb:0[j2(Z#UȔ"M2pEuě# YɈp GzV#d;6E?tu֩p'R㷚J /k- mSR( J[)ؗG$nV515B{ wcd~%R27u"bd%DK -I%e1; a&5_Uƽqk}Yvֱq a< h ǐ_n29]{28r6"5gX0d+׾?h{Y)!`@RZxYՠYmѨ"nP!웘B}l6/,rO%LHc!JTH[,0{$KCVr5a2 V"h\mӸͱA<܄8[IcdjpJ'Z8K7c0դu',a#!i"U:>Ĕ,-$/w6l<Ԕ,KiY*Zl!1:٨!rA/u$-i'N$B v@֧QXk`>YJJ#x)ff_F &[ ykuB^jKO'qJ5uq tFp/Pm{OuDaԐs0gEW5hz9s_0VPgէq+40ԧ YQNt˦8 t [_U2/_œ}VpQVpR” e.}p+ ۿe}[V.j$>椾=;/ 9J%zJ 0F cx5FQkj5 ^pR!Ѹ+A(j5`V|+'%?QMA]zS}`45 ~1>>`j5cQkס FVQ} j ƣPF5/V70`}& 0h=1=BǨXcӬzuN\\\=:ǥXc,z5F=ǤXcҬzeL=:ǨpzpzpzpzpzpzpzpzpzpzpzpzpzpztzGtzGtzGtzGtzGtzG]xx.\:<Gt5N  hcCƆ41 hcCƆ4141 hcCƆ41 hcCƆ41 hcCƆ41 m1Cj T6mPڡCi hcCƆ41 hcCciT6mPڡCj 41 hcCƆ41 hcCƆ41 hcCcj T6m1Ɔ41 h1~6AdBWW7666LֆcpĬe|2=Q٩3=e6Uno.ݸw Osn=͸7ۏqn=Ÿ+rsnA7W DZ0{1=f]tM35Zڅ[-!w7AWw;﯁__ބ]Mф]\up@m7-Ǹ1Ƕmnc\ormpstsv@fN%&}(C2'p΄qՑ=%&vm`ɀl;K0vmkj=ڏmj~C WW@{WWd ْnn&n.BmmZWVMԏFMՒTnQĪyɶJQ—3cih ׈79ek *C/Pש0fU! 5X*U!.HN{tWa! dn9^ʴk RijD(S䗓^pUz p4 )!|5%K14za h6H4?,Ŵ ܋"qYsGpqK*hG h9BtHUs?=%Ry\.2\a ^`1j58ܯʇ\j3Z}oUb?x&"pJT$=@:S t9VFIr>n_.2kQ5k*\k/[!!։9!oI&a!=8F&wBLdY4Aְǰ|\{;a7^vT H)AH # l`6wo[T6 $% 6h4HGzViqщr;Fk%/Xퟶ{`*apAl:8W"oq{/YW$JH$H  F(n8s= CLm9 } FRxdjx[>w'QC 1+)~4)Ě ܚ1o1͘-Nc,z]q)S $ Lv2٩#[~<#Pj*1<'UTPXXP0\}.qL$^F/4A H$h 8o35$E3n0nZ؜ܓ HχK@g4ĽȲ&1zrkA$iQnnDWl:t6^*OX-[٨6 x3Iq a 6,-E[fF3&PP~F/ X4r.AXw զ±ȤgQ'D|J $ LI>%jY6U2qt6ЊvEt}2Id0ӵADA . ܃#/nD I!h \$AOyY+EvdVnfKU]QmiD )OSu c$IAnnF ;)ةGNX[t' ԡ *>qFQA^nrV2ٽa7M?xv|y}L!3T.1E#i吕]_'Tک'w4E[mC:A^4PBhf]?b @@2Ǔ>2| RB1-ʲ <QC$Cc@CD H"h 4~m%U)wf4ڶ5C F`]#@F>!33M9_"1?|߹蔐IH@FnJ 0 $'{C㴿w7[BN{0mjQ%(+9p) ›"~NMWUq256dL2L$2O|\/ @2h ^M5xI!Z W!:{|v2rm lD :+d eJ956cY$h%>Ca& $4Ad7cg9Co6ֆB$m\-DAA@ƣQ#Ra&aaLnOI~2RJ&PP<uUo>aˏcI  &T9DKHn%i;%Ȱ}=]xŅ82G0M%fC;NOj $ y* ]8?r%8FX_S$5MNqVP;x%LY#0]mhF^3B!€ݕsV#RՎqHCmٖ_BL^00*BK"@h4AA)˶ hQ{<ጩ.ZX e]JGq28G50&Fz5 6W![h^AI4% 4s YU@8C"iH0vLõX(rQuvUy LQISu`m(N(݅l&"COxAˬY/;.q릌Z;Rd%U]Y27Dga&J_r2NcRWHC%(qczg#VGGɰN[pԠ XJA4 !$ —9∁_| 9& ѫ 9cQ)dC3 izvLʬ?';'m1F%!h (88ζڋ3,`oD~b=%ZHYw *uC7-VY-i'qU}H))*1 /o.kEr39m a&c > %UePu0ҁ6t# 0PVzh<<ў}=,3)1+Dj._VB7㙎3"ny3=Q?*d۰葐_'ȑ'{(%f !&I(L9"@q;{(9WnQ d<@Pñ^C;&dL:53_"@KuȘ~;Ia-5uu Rg*kz.N]K.UŘN\Rvp>|gok_m" L8Lߖ~1skGE9ū8N5ʥS!F/vvy?{ RnKP #a9&GzlA%C {etnj/0 0cQb<}gW,"%]YZJб9z+A,_Df5vnէw>cBfG:(n Q]$e|vy Px'_:!q}cl4ŐڡbT~V?q2<؂$x='t~DN:W.^㗱ȋyFşf 7^ iy?#6"@h4aAa|ɘ'_?]t4ھBŘ,O\qVF#i9#TTԑ!w| J=Q{i;XވI(ע۱R}2kM Jdhqu0ٚT]7(nPܡ@/-Ak`Bh5h&[}Z@y ,@z#IxțtpTo6h6㭈l 0`kmb%#I&^H 5ZFP&?poxZ %rgSkcBI#}LPYSKZi I-Dmqa}⣶R'('i$Z'b~)-:q8ty_o?໲|Or. ,"ఋ. ," . ,"ఋ. , . n n (ftT'Ow gF/VWCXa\r.XEa,"\r.XE,"ఋ. ,"ఋ. ,"ఋ. ,"\r._XSwno8.̋Ov{x/3o)<.?TQ]gۂ. , , , , , . ,"ఋ. ,"ఋ. a,"\r.XE,ఋ.AٮCG1ٔ2A76rHM7Lt]9{ A9YnS ie zMG #@dE歛ft] Ws*>9O-u3BPl]M1mDX-Љts<5 4'ЭYYnX N%SV /x(?0%m10jYУNzOvQUkymC3,Ŧ:ljt3*<ϛ'`S0\J`Q=&Պ=.c:< a9eb7"RUMڕ'ӣ|Am9f?))Z ~)Ʒp&`C\[{Aƒ,mt@' Z"i(Sqx3 VffuC|S'pg3x TG?%Çk.`Պ3L]MNd727,|f}d[~徂Ld.qPfNѻknS( }i+-&c+mm<$kH#R uif>(514(3hmo>hぐ̐x]S8y\9O^7):_e&DY$ eg;-, 'K%}V̬o8@6;ƈ5VY~?mr6aP_7q]9#%t7OlMf}AsEĘ|s]Y.6ΆfYnhMjE.j.162?b A`}J[ 9ɗB[ݣE=BXXٽY.l=}yBl| g>+)vpН`uLϺF6$x_4\o&9ɛ>:,4r%(N; nk~1! el7dD& ժ| 8^=2۪cT2k3eG5ѳ`Aeed4Y>;UGEf2#ܜ-E$*'e`0:]v'sbJg0CA,}$d " ஦٢Yn-6(?>K&{^~хmރF՘ѱ!i $iX2{a|uNE#WK9M޳<8̹.ދ-ƀ!lg8}'y>#ٲTnx1'=]g0䬌@,0QAp&h8z ĩOT'Ò->O~ϟMʛxs]َDh[FԦ?6(XcGC |S3 ϸW[xC퍦au)ٙ1qTx_ 3sEɶ$r5{^w{G5~яICRY?QeߦZWSg῞u&NynzM ӡjn`|qoTBdФU.4W46VwNkDHY$BsZ{ki#>cF |3Ɖ콻7E.G5i vrWHoz`9O33.7.JV3yKhxtr˶# ᷌-h0坞%'vMsޛZW聤Oğ骤\ 9.r{xRݟ?Tm"xUt*w9\Z#Lƫ Hv_lLAtq>:3k6fP hO%t&5{c}Pp: ۶Glۍ u9[pDB#aYm̦[$c,SNg Sz!Pƪi>%[k5U|ǂ* Ba_z|ʋDMgAcڠ֒PE;VI 5f콻7Bi*OAѿGK6U W@w!CvDlU i%u#m|~S>>$.V#zoXb7ޱo+Fo+FoXb7V7^V3y]Ь>wWAĬFo+b7Fޱ#zoXb7FV#zo+b7V#yXb7V#yXb7Fޱ#z7Nr]G9>*l*gGsw5gs++++fo+Fo+Fo+Fޱ#zoXb7Fޱ#yXi\JK\lQ!^mƀ,Qv%?'*ߣ\r9ŰhVr5Phwk?IP3ƵՁyBu&oo]9m jh}"R?ϔ/ S8IBl|7)Qc9O~Ufl5}G-mkaY1$O]Vzq[ħyTJ~+V|tRmP1o k(5yRPљbT2wp]ğ†JiQy "aw;38ޱ.m"}əhO{czXeVWkwJJQTxXz7 CHF&aYHxMiխb,u;-ԴT؜ix& Q  #L*UVô  X0w5g~Qk}E3Rei>(8ש{k5KCfz{[#mB*TSVp21$w+Rs?%ՙ߾VX&:9xe!uLICTWVf#OPS]QaÌiKmָۤ#Y/҆Hێ_Q#EBN»]w٦`GÄ?0r8w{DTnu~ۮ+qSeW7]q.x L#LqO+]XӨckkk"G:u0 (R.u'Z!kGxp=f06Jw>h$"-Q%aFMrSQGc|5Մ*&LHucVfXH`5-D ]W5u6 BNX: P{iORN:w8Ohvu3׼z4ߛYOA[DPu@^X'6q5,VmmTC/O|'di_n]4R;GEE nxH[m:Y;Ä}(j K(0eYs5chCqhq; \Mj$lf oB!EGVn:vQ;X/mwMdڈ Ϟj  eР^y4BC'+ܝ5 A<ˆ;Aq؝N$m*r,u#C;e7tƈ8|>GGXiNSa2Dֵ3>);Zdk`KO|wQY!mc6IՅ]9剎+ ~LhO)v_CmVH1w nَlP" 62 ܈DߍPN]S*!e>2ex1 3ddgz'<, zա v?TudB} +N#[PC-Rv{Yu;bi @]N)f#[kͼ?637ҴWES- 8Қ'eoԉY7/-Ƙy.[O%P #h6ݦ:1枑PPl-z.4Sv'Cp7F1&5HF$cp'i<i]IA/A:tlx҈tI TYS?ާuRQ; 'S9 )N+G0%o:k9 sFT6$vNnr5xά쓲qOh޺z? JġCjftZ+K|cxSf;MsOn xK,qrkG8eb*=;Ap\n>2p&O(䝒^6S\A_s#N?4QBW!x=L2S+񌻱,y:]Š{fo[9/~:$sz߬9Ή޴G~:-ͫ~:%ltsUs9jϟsُJjw9ZϟstY}atzVEe{sZ=31*_0FZiVCr$۽JEH:.¥ěEp:1KJHQPmFaFu=mIzVG~:'wA_yOU?.y]@YwҝG3;G΁ny#W˼8?yz9ΏKVatYatOj9j߬9ΏJatզw{gϹΏJ}at[VatKj9ΏKVwD׭Üm}!tzbs_letzj.UܻΉ0Ӽ%~mQ#tU*}ZKZ' 805Ig^s9XzVă~ \*H'`&. zJ1_0/ُI_ϹǤ}f='Wsu>:=)Ysҕ>9JϟsdsVBs9j߬9Ή[1wEwAlWHyΏLetzf.5Yw?lH\:(VcTZ} yd,6j*M-RL-{+?ϱA'P,2N ԯ[Ym-'ڠދؘSn!.!V) xõyNQat(wG?ftʤ2qw:AG@ Ik48%e4mh$Tu-*HP050I2m8[mKn&6[hJEVNzi)8[m"jQ;k&L3wB`)/:|jw# F,|aV؛N)p@MBdh<"&? 1T>"}?Gw]x{x HJL f&};#Z@: 3*w4 Mii>%6e%]])23%XuW2:%as A7sD/z%j-SJbeU*M~fMM%\ #kr4d:Ҕt8`VIFPIJeq)>fw:4FSS.7D$u-s>r<6$r-(v.S]=I*ѻPP?!un4(ԾqnT3ByE8 (V4+Y~^MPR ) Uj^hlxg}($pX&qecƖb׸DҳiU|J~ OGʸ|GmIp{ ]MD)Pr ƚr'˸{o@ _XR){e(@ĵX#kv6&(pmE PoaxT7@JS6mٽwenj/?ff*5AX?WoJ3%Wcl)_Οrm=.^oZlS4EDXl Դ8ALbg *ejZ0[򼵑j(BnYi8j*FT9)>oŧ }䫂9*",YʞxLaK)8)z/ejB\eAٌ$aω|qE fSڅJ2Zj4rfyTThv۴-B XE^Q+78#=`u': bH1 H; w=ChN5tSOOPSJ;@X :-n"?ߨXC,<Zp=[|0yggVFjQϓm܆e!YHCMS`[rTX #c؎Z8"-ʏ&>QLYўX>Qj7DQeiBlⰎV\o#W 07hT'Y֟#]+-qh7E©Xl?H 'xd7 ;/\]=2'Fj.4((ZD {<~gGI2D0&.))-|%YU*UaKr/j/DY-RU*S ‚n2|hK4cYD'ʕ!*-٥Ji8 $RLҡEr[pӹ)tkJՠKR^T Xy@񱯛jv9]TÈa< 6\B阯rqJIWprO XT"8D^ hጫڧlˋ2:Ipy)H5khХb#a^)$jP8֐l_j2HP݋5 6Z"G*/1/11b NMpPβXn]#ohi;[ U\E#$Yn!'X㚙R ܊j˜M{bO}l22)*)VӉ;gsӗERҎ'$++/"vT%Nf;ݷO(, 2<"Z"g,N%k1B̥Ѳ܌_QPMCmoim[S<@XYg%9sGo)3Z1UXJ!s,폟kFFY ĕ:# R8^MζJT4EkBlJT9ys6sH>1i~ͪC+$"DuBVF[lG[ Mpp6k*l C 2x^aYS++ugJfL2㧓tE!>XH 7 E(G9䘲 |^^Ҁʖ)灓STEVf|T04sCG@ :/J*]C"d$ V Nwa.i) Jq1xoFW[aЩRq< 0;mƄpUzR$brm,'9yՄ7+(]K,"<3OJ΄UHh FABdPI8aN#2OU,!'o(-R#6` Ty;vyM-;oESMh&CBS wOc,Z50iDe=63[81D(W%: [Sy2?,+ ;DD|RN DžNo1md GN?+U@ģ-qg|e߀9K.*)j{dRꑥmIJPzT$vٹ=MBOp7B<9T I#q,%VDS8zDD=%I[q~\qKq7Y*Zڎdky~ *<M8dmITԟ!J.Ue4PtfόJPF1Q֗Ҽ NZJԜ#c8"'Dn;!F.2xwa; ^WPRTQ-Vd NU;J(22AQazʙwXH6Fudҩ\OOHZe#X"$b`(jSTx;JDՆ{utKh8; $p#L0b.ľr PNyĴyN,alUPuފz%Tt[iRZXK&v *`9(w<ΉPS/MhкdJSC]O%1֙pLx nq}JXirKX@_X)GYXZDZ\Qb*!Ib@&"2߶2= I>_ WZ' P+'NП7JԸ18w9oU&n_ӷg4GKOzi=וQLQb)ydgZ#x)^5N>%>0Wsg!K+Y(D>/c~reM6]OmRɕR-x{k6]Y"IO`YrԶTbd!jQa`kP& m 2YnϒJ%`ro zZ,2kuLԆ()3yhsrV@XoΒnџݤi)PvSô g&OS2:v= S-UwV1XU4;ņ=]uejpf 4-Pv;^tm^sluOS(9tSL+).Jvw>cS;zJR &h::/&2 uxH8+zFk|kpK*Am'mo$ Qe:;ehVzK +P\B`>l|MWO$j''m|}z#d?[TSMA@ՈNbPp -'Y22Kw1}TUҫJ- }ūy"^v,zq[fa"%qI{,T"Ii * f&FIJ$(9}zZO(t톘e8lh}2B; 2ԨJEV05Q`ƠhQ\R[M0a& =+Ubw3ag,[C+ȖlJRF+ =-G Pj #d)Ĥ6"% Ĥ e#oN-Z9kP:tlVP*LM]ΝTbduJl*n[`cם4nx{*ek!"2 m.(m4T$b"ĬD-vB2L-BNv9G^ut ;NBw.t{dž 5l.z%6H.i"jR`mXs|Ŵ;Z*. ;c'QSuMSt{R=2u)6DԮ>5Y4b,92Jg1WM41*o7/&@Ww8 ̨63Z8$Oc'ʲVU idfa}(ҭBkYlx6AF,YK`\8u IGE[/dބJHIە(⇨!r}E8gF{sq*O~Q#v;Z{8aKK ,/c)[+X`r+*oI}K솛N]:a΅ r b~YP8F$L1P51-F&0dl 3팕y8#8:̻*- ϱ=6R)tŃj-IrLa24J ię)*`3Tf~97O9Q2SGpDSzΆ׉< })62>Q)ZL81̖ڰ4-KjE/]-23qFE@ zybb>h́^q'*}8UEugŠ2N}VqTT|]4P 4i!-2h]UP?:gcTE>ф٣S)*'X1+Rߛ7zp7a%K[Op"Pe⤴rܜdXjӛVN^kFP I첆Ɗt* fMR'$]L!VZu6M3Zн!0uIּ r̾|g&*+.;.GPjMjt(d+t:ጾPF9H8T_v ZDRBm ƒc<9j:FS+mN,f]<$ bˣ ,M*b UDme'{&Eo$=TzO"j!%֥ f-Vdg;g}Q,+1pã'F1/:̭gl٘;m6j2T4ZUzt-8N7a+sƁZ2[F+ XecL e ѱn+]6 ኼ|M[exF᏶"4fn2(%sL;Tn IqCyDVL&pQP5I1%85ufRl062JɤB'D*OٳER8i0q$\2%uoP|߀;"g6lհ,(TBTsNGISж'QL-+35Nr܇έuuoX]U) jw!|ι4m>YbJ ҩ:éa]x3hXL _ޅ4S>þ :Jͥ'Y eTGH4{Ϋ[mƘxF,hQL,&h^R;D튼1n%ǔ9&f͸Xo6# Aejž$0&i @Ysz&KʩZ[IuVONMk(IMVuaZy8&Iwr8phRm(3F.SugcUgYP87\XHNys$Xh]PV"0"fJs⩿m+R:'JT8X(Z܏08U }0º$e-I<Ys%Jq5H% beU-,tǜ}Iߋ"~Wqv^(߆*镁T!X 0i«_iҦwP'}F:jɴ|:y܉hQμ-bSZt.+kj\}-Ґ#}l<ٛo4'qB Cթ̚%cagN@FR+v%;:J#d7ъG*1=/< &w@߳qgdBŜ+}ڳ6 IkSG[Cw$ooe&N(j9?fU*Wk. WwaN/8):އrw&K4 EER&Cn'bL(MeU~(l()S;r*2q'nZ QfyyBƬZۅ-͕jCjƣ69[{FdžWRW2-æ,ԣ1(3^b!1xRJEHS>(kR4`tԤa쟫& +s|XN; )eXiZend+PVsF=*OzOT*;^-zD6lQm7mG(ŤF>cbXX [+# 9^Gr Jd ÿ :ŽGR+Lj٦{%m$nEJ9@a^؄nN"z)'Hf:,4vFc_$J0&-QēNŖl6p knڂIVN[t-h2FҁIv#L/ϊ[Q"6")RF؎QU&͉vEnƕn@%8DY')([=PLPw=6tJ䰁#uv` $m*Lsd YmAAqq`T'PAZDH@%0D#cwXЀL$(kdɦ,wH$ƨ#;PTlH.bDrFbdDIQeiLU)U+uԕvheGWg1l e-t]L[",Llٺ1tl[dn]]1G|Ģ#wfb3HRꭻ9oS*xσ.T6O>mUFަUp'2{s*n$se۴9U@~sȗ)?q'?QܟDFvs#gg"^;dKg'?m21/{O#;O 'ԇO8'w/2>?gd}ɨN0Q?{p8fHu39oR|Ϗu:#zS1G>KG> Kpl9*8Uܪ$s^TYG>*Q}ɩNUOLqG>>Ty#?Ro'Ou7ˑq/R|ρSlQܺ$sOuV8zUo?ٕV_ٵV'6ܞ|b=N |ueqG:>Vp':Y|K$s^Um'6r|m_Ϗ| ŽNG>>Vtz[h vΏĽPyBO>0Y=ğϏz)̪U|}ʩU:#rj8#UGr|ςRgŽLG>%m_yՓ7X|O}g9B[|}ЭO>0[?ztY%@B~Q-Ĝ)1MMNHkW)X3-&_(O?rdY,K%dY,K%dY,K%dY,K%dY,K%dY,K.\rdY,K%dY,K%d\rdY,K%dY,K%dY,K%dY,K%dY,[sˬ{C<)=//V_)ֿ \ǚ#11:'ܭ^}ه/?~'>^3),g~3gggg[_x[ ov>'<)1J|^a2sc>fzDy@w9hxi< xi{?G~#w?~'_~!~O߈~>%3xxx=>>3x3x3x>,߉{?G~#r=7~zk.~z4 nzH`C%=)k'!bG1>>OxxxxxS>>'>>>3x3x3%=?~#w~!wտψx,>!,^H0bﯔY2y>:^*dxRnDyϴR-|ⶼk+YPQoB[Js] W Rl:6y=ļy/%_Vbզl>usB<9"kM`-:ԌPbCs\|X*uuS@N٣< 2b?(/@:*+bEAmW7-B~vB69!8v~뗰e>aY?7ub{rAx:.fץ h>QWX:39mSԖgTRD,="u=I/S:S/k\u]yv!ЏơccΝBr1f̣_#=p>ʑAYbXB!H0`˗ d"ߣ޴{hrht%gw"G 7)rlrc/2[;WM ΘșP"j&DQ^-ԧFn\B,y"Ӿfx~}Q.jTsRwu}v{V}W}{цSa"&OR0Qp$Itr/ft ;/g~p%brP^FMwzTǦs=!Xڽf++yzK@}ܭy` 7]{F-Bz.\rˀ}'qUNL6I~JJNmjhk $N^ƵF]Wuse,b\;_LFTq]m̄kRuU:NҪG2?#Pb '7|z`CJ3^ٗ,c8p/u}Ͼܼ)#tqa /J(?< ς)WsoL=&}NU :{qk"W2|P翼 R.\r˂z_ M 0/K{oWC]~ 9*&SSNFЕ1<ۂ*Nnޢ\G/UHGJ q{K%Pb %WQ"v[ jS܆,bD U9i|S}YR<#Ӣ0,rwOE19W.sZ1uz W0/i}$b^`>^ J<.\r˃)p(S>с{7i^|E:=Meeygi/4a2shWiQս G&(#|&'X}N QEks!qBvƢDY\wU8 w" wԇ]x˃跠sV $(Bc& IU>He=x(vyھ /0A{=0Vrw2z\h+)T5f]C忟A?V9Ջ:ǁC[}.= rNjO@v8)+oӂ`@AgVԁ$H\qn0p`3KA눪CEiI|xKArc:+ʌ]v!5TWt4hA9"*2C.1k@ juD%q;8?qň8TfZ3B;'J4( i7BN ̟%IdcerA{8# h[ ehuˡ'nRy ENN%U9J{]WJM liWt%@6pXe˃--$cb9Ony#&0YkLp:kXk#U<տ&QSZo/=6=={lO!FRFYNNb HGcxhScSi`n0:(1n|N|i( Qfıv &a휨QfzW .C^|8>z9BY>]i׫펓_ݩo kz.\HZ}'Y%-~"!"[쵼CXmD|{Q26ڎn %S? ~vEDmkҾ*ey7ѿ|0 g҃ˣ}Ʀ;."2` !!TkEL􈳽;[=>bVzGG wZ VquπnF+h[B.8"VLŋ.\^U`zap|-/ .4Ա]$+zKDPr:ѸEheϪ|YyW$ gxR]~IQ\P` sQ茺˄q0`J9T^cb둱`-b-ǐef%-,Ŝ ˩ SvĸN_E>ȥ-|L]U݃b iͼ<燩z|xn1~G7 k`ƕL$wV~*TDE]M#Ex2^n˱N}ch`9_4-hۗ~%ыѻ+N[xSC]Z(9?9ۭ *,pS]9Aw =Wh>cܙ8?Y~p3͞ޱW*3ً ܃jǖSuiyI,|S0}W.(89urwc-}R(εp0'(%1݈b1euK'6hm5'  ;6}:]M#mxa{;Nq:IIo `OHhJd{M;_. :.TBQz;_!QH][V9F3wLH=@*T~_*(ДeitGfQ\VH$:=|GGT}O`#xONpQ0Ǖ"Īǐ+@-OXje ֺ _eR(ԱVh7<6ط{NUʽYeE}j,X*wVgTh0O$u:Ay+M}Kw\AIl([>` =OƲoZΣկG`xS ;PkY ;P6״i]h1 =va> ޿#Gh%Nof!!*1 ɨwFw>E#Yol`NC,;rY w(C4ndg.2HbZ+?XmNhn<yԡ&~II\}TE_6C [[=QaA7Hy:vKβj'T[)P%J^WW/rH葕ߧ룟8(-W];3Q 3}0:'>}5+v3 0\D];ݧQO (jUu_c1W"v{Tb1CCM o2, (!~5W.Et&I+:vsnWlˬ C/y丗jAEzJ>v}ߔ/g%濉T 2669y1\2k-sCm˫fүˀpUh%ֻGRcE9kn`Q){QEWϓFlrsuGV69t;Y1AF3ե826C d$XC[wHޚgt0"tJc#c{cQ!ָXTRgk;ů]d Ÿ/)P[z3BqRǓ^FD#Ǽhlp"Up靯GDКK7( :y Tz#]\XQH}& iU&R]J6|,CYۡ{yX[sK ~I>S|'%he=l оR=^ #e .i ?J*T.W|+4CH?1fvA(|DeP!t۞P 2IJš%!ePk' CδY`6 #@@-MDYu [} fThC S~b] F"!ü)R@/'k'@>: l=D: (j۠ p4BQX-=@*SsЧ5/TRJQ$c9 2erfO&%\ DW 6J\YL 2@* QS(5RҘ qe͑ `:`IQ#.<dBhjU+l3)"}{ԩRJe"F1FD>qT"4DT8$ ĉȣVg`N'cʥ2q 2p$1O8pJ_Δʕ*T RDlj@+G"q!$IQ"D8ԩQ"D*T,cԩQ"AIP AAD1e0UXfx6xx6xxx6Y忶?ՏgggafxxVxxxxVxxV]gcYXbxaX?x?מ- ----gggcN?Ӟ55555%5555555# w11111%?ڞ ?@?l³³³Ʊ̳d<# >cϘ  |:Ό'+'M׻cvy׼_.Q~~bߝi2ٿ3cw>g>>>>>3xSߘ> |} }̠ϐ_>*G-{Bi>g0o?g~g?b/?/r_{ۿ1̫2?}żgggܳ{}}0߿3w~aa _9|l&>۸fO,=KQ<~g>>OOOϸx3 , xyϹϹwߙ{ۿ0?;ۿ1?~gov1gq +<Ȇ_iK/-=nt@^*N),z۹RC>ρv9)qRB Xbŋ{׸rD@2B"6_c=I u|-R rWaM)"#5JLp<2Tŗ.\"@@`?.PWY31@vоmZcg%C{Gı\ǁQ"F1|F ȃ~nGAGS:][-YPgG䜝{1iGrTp J*%qc\kп_`Ԩ*s;"Ch,g`>|ߩSΣ4y/0>ab~ bŗ.\r⇩z6<]R=x(9A:"ߟ JA4If@~< S71"p$ chw \㮯cX$At5ut$S|pkkj hѿ46Җ5YKPjh;*W A&6՚ xyZs~rkݹfY^c$JH<;?_~ Qȯ;?b xf]jQ혴^QE>/hq<ٟ8A!!HW*ӛ^Ӌ2 ,%˗F li5Z~OlH57utW-ؙeXQ.줬 Lb7|yDC*,r˃ k>TԪ56jC=ש̟8N{h#9=V06+CKާ/} f]~FY),^TRpkъT ~ ]}T^ZZZvFbާ?U_I 6<\HBY}BW@z.5X ZB)supA"FW9=BsH "*$lsjӱMDUx\qE.\0cCl5ײ?1Q*НE|cѿ*ؔ!oKf Zh ]-bŗTRJ*$W[: ˼e,JE_(x: རu|#B#{8]ylw4r7 %q!)O el*o0e'ܾe٩>̥˰z,H t 2;ՏpX͇)\[vʄ! `t " 盶[/G7ZZq\r *xQSJMPu5&t_t5ŋ\лa1p˚9OeSUC͗_)"%3 _EA/Ĥ(UMOEZε|Yqė,>Z1 wqEYn 'A%J*55CWH"D*TLr dضW #,#BJM0.N`_sgc Tߪi,傼w5GhECsںLlo͇fC>NbfYx$%NΞ}>[?k!5C-_s(v3, zgX r`.)Sj#ݿcK>"-"O*&t :{%@ûe"Z=p.]**Pi>RC?)v=^u}DnĺYg_V\#,lA٭}.S|֘lk!7-{ʣǴ~c_G,P;%r&ѧR<Ƚĸ犿: Pk/?=NU*Q$Ep37p4M c__3 [?3>Y@:C:xE5Vִ7qovstlYy+A&jMS}Ow̰y\.3Wwi#MG!-5u{M\--|?R(W =aS`;fæ<'>1>K\}s-G5JRE (-8m~/PYcЩYQ* oZ<2CL4u(_A LEvĀXh?&!h BOc/ mjJ T bJ^ JL~|Aꇣa5duB1`>:2П!cR8\k;J<"BAڝg~"@1fe|&>7ӂ+.2TJӧXD;:z1 (]ubFIbcCuއ_4i9j+٦jh05#?C>⥸s_(MEh"uE4W!Wh˼dzr[|b#ư@cVs:8)Im{)0.[9Lfvm|DjTH-rzm\n_37H`B<=^jrpC.\r28k΂ĭ_2FU~`AOf@D0-Ntܯȉ :H K,YZXŗ*TWt2ah{Dc(qg9[E TZWx`?1le X_TYs*oyIدE>%YYl)𣇎tׅ$cJNPEW-}l}Z.\ruCq ߆v|xi]2n1\HB:e]\nPL`W_T,cfG KbPS.)p&r PeŖ|ٮ]+''''''''''''!IIIII xBxBxx?__1\dddd?)?OOOOOOL_W)t(O?>D9g_:IzNug']:I9g9gN9ΟgNuޓG='Q:IzNus?3L?3L?3s??OON9g9g& g& gf:ug='Y:IzNuޓw'_:IN::us?3L?33?ο:uޟmL q`% `#ŃҵrYw^)K$RXf{$4=҉ 0VrJ eըK k.,stf:`uV;& &Xav目Vu!UJAn.Skou Y_[)(֢ ‰9 뫬SQ֝Z6kIZ@ЇgOR^%˚bo2E?d8Wi= APH!h/;1qIc6^(u:5mjt,: A&L'G'VPbtO?4LMZ^x)s;z)YF GJ7&#hֽ攡Fa:.Ep̨"J\R UW >l_ҕ @ `RqI{lQ3ȕVC*hք^(a;MI}o YE  p2& -L ^$77[z`Ff+2ZuĢK[y/rMyJXx( ". sNh{ 1xAf6@?yb=Q>9]y7 iUzG$%F[qbӘZZ:ZrʃM94f7ZwcˏqPIä+#cn&dne7@w&s,Z#1FEUh8OxKCʹƄE Kiq :W8Lj_t0Jw CdeqR^@+`]2l+$A2-܆ŎT=A=ڏ%h`4ۮBWa>ӘI@hyK/nEsqI'sˁg1EQ`ڐ%Lu̠,L"\6k0.r@u3D948Q)YKL<]])f]|4&C(rջB䌫nOe J 7蝂@ݭV bUA],xJ6| .e4ҚPp] *"dCʴr-ǥ׼TZXaůQ~XKuy t02 !N-U݈ F׬4xpxNi摩m!~0j@ad[H_>e==P-@TK"BSEFP;Q우ymx*;bc_"G{#xr#0D8AdN-4X:t nd&6Y |g&.\A؎GdjBc'עQ97yNi948%Ȋ 2dߐZB،i7I B&*=i9*/`X?$$ VD t&Dyp'QT4j@2Q]o"WIqBH66Uzubp)E\M`=VjERphb;FXօ+vM)}XpVLಝMEjsjΎN[$q!YPF h$rt| 6l52z:$9vbmsuM4^nXoH?YT',b@oJƣ[5yhTw+9kl pw5U=g%C=E+Xr,Nv&v7Qdjʆzƈt -vRu GC,~I*SLy?64<8R~-Wq7;NC2E찋=NZlEVM*9GJoBR3W@ZaڮwT4,A%2*nЁKEdZn&Yu!nX tVɳ: |ߚg@ܗK@/XE,'"; ?W:0JB˭|RuAƧ !ec#̔Zm@W)U3ܶ WTTˣ5^p,oj+Aµ 4FP0 4;icn5 ٯ) s(yuP ժ|,ZC QYر-DBǃQ4Dg)OYt7C?l*" 5%Ypү[Flq]xXAZH\-yw!]v.Wn\m6 Eʋ5O@&%DD5sLfGl~fh-y0oހKoBqAkA'PG 1OyGzb hpd]]iBe yE>бW3o4vNy[@w@|2w8"∻Wϳ+hP&Ce$r g[%:5u:]^4%&h"/`oa}_'+yB\h9WhАWW1Ϯy6iX֔@n%uI&ީWb%U[QwXR\VjksS5zUev\z{v S87M+AG֑T},oWuX>C2"3 1j}ʢNG @[VbF\(xP5-)*o0O!w'dzHigGSj3FU 4`lޣoK:ыmBR҅tXYLv0t<1a82Mk^ (_6yb=x Ϥt.GE*^o@:hMt\] * 6~/`beet`lw # 僾Vs/w!ri|<ċ=,s\cAy[9LwA "m[]e=*yh`d]*١Q\@I2JS;yWP0}qQ|Zݍ)cɇ;wd Y 0 6zAX ) F<\R0#}sGyUױ4k Pk(7RHᎸذwr>Wmhz.ro2^Dc 0܁ KQ{]<HLG}؈M +Q/A[-Q%k"":[Vl9u*R@eRpּ&%as( vpyO<0R2# ^m [7!V5"D Gu8wpby"T,/Y sy"/OUmb^hwUEh?:ι2nF_lH±ڹIi^bU hk.Y޺'BZdZfs@̀yK+a&gW)܋M!E+#90C[sT6uY[dg?23(di]Ѹt誻 f]h껮e3ssE:MS@0楞t11˫!Pt}=A]@æ!oTH A:~1WΟdݞJۃ۬QLe^=W&Ձ6)@^|B3:]YjzzFbL'/{g/h,ZEؤ<ɇHJfg}s ZDa8x^5P:IFqmS"hJC6 @ȗL^%a($&NVxƘݶYgb.4H^K!}Va'L t3>%8F:sEd 4CZW5%.:. ? PJWai4=(Kn~C #F,[PWS0#Tw5<qccQbyb9 -VAՖQ]&5PF Mh [dj;|+ *W_g,hoKLT|(Diִ҃wKBYܑmz0|bfx]+tKS<s!u۔HHPJPij{HZ2|aKrOZN|NQ)VkulFؗBhJ m6 ל`Etq/$WvU _ZhhR-œW)Ӽa5Nʥ4Ї5 pWm +eH M׻ϓTn|.|:Cqnt?p2m[^P)ܬm1wJ ^MWFaX- Wڗ߲5Fe +R^"j03isoh;3VםiWKSMӧDv]e[[[[-.[[[[---------o9o>--񷜶[[[--o>y𷜷 orealtimebattle-1.0.8/rtblogo1600.jpg0000644000175000017500000041347410170545353015351 0ustar moimoiJFIFHH ExifMM*bj(1r2iHHAdobe Photoshop 7.02004:11:13 19:33:06@(& rHHJFIFHH Adobe_CMAdobed            `"?   3!1AQa"q2B#$Rb34rC%Scs5&DTdE£t6UeuF'Vfv7GWgw5!1AQaq"2B#R3$brCScs4%&5DTdEU6teuFVfv'7GWgw ?ĒIFI$JRI$I$$I)I$JRI$I$ĒIFI$JRI$I$$I)I$JRI$I$>Cj; יִ ] ,`& ñ^F@s ]]K/c<&rH1 ,@G==O9vڇw4GW_7*˳lhxk+u`lEg2Ssw &dW[ϡ?埇e)pBR2?nX?6\a ,~L}?oч9MQw>ߥAqm'K }ư-^S7 (sK곟+|A*rǎ1'dտXc_W뱖k;pd[A2iψ5w]gHY˝}M9lp ) ~3y 1˄~:Et i.EY^/nu޳14gwScuF܇DLNw<?G_Vp%WWR|9 M>LS_V{Ȩm8fE^o^zU^}=k\ ņ/l/vz}tغa'>OgK" ?}E ˖g$1x"o\?7ڣ28q9/?KjeV04?F>FNE~}:iUaeno7WKi?֯H#D Tn[HO$R Gxy幌фx!ns+#SPƿɱ-'Riy)Y "Ex͵uV\F}Uw7}37>Org3><+|+-B"<05oyqr-umk\m{C(s~ߡfIWͦ1k69dY7kӥl]z'k)_Kg_Q- re> d#(?d.bX)DԽ?y{:EME~^%c}Z,Ul=uew7sw.R:S: 1:?|0PČYlfu&G<\^kU{kyU?m~_(ezUo=f] g2ppsoH۶Y.w?ׯH#WJh~O2d|~w#xG-xY_԰[^S4[ avt5g}e/KQ+,dtk8Q:;(|_Zao[]g67m鲿c)ˋ:ĈXdc xzoĒIFI$JRI$I$$I)I$JRI$I$ĒIFI$JRI$I$$I)I$JRI$I$>Photoshop 3.08BIM%8BIMHH8BIM&?8BIM 8BIM8BIM 8BIM 8BIM' 8BIMH/fflff/ff2Z5-8BIMp8BIM@@8BIM8BIMK@ rtblogo1600@nullboundsObjcRct1Top longLeftlongBtomlongRghtlong@slicesVlLsObjcslicesliceIDlonggroupIDlongoriginenum ESliceOrigin autoGeneratedTypeenum ESliceTypeImg boundsObjcRct1Top longLeftlongBtomlongRghtlong@urlTEXTnullTEXTMsgeTEXTaltTagTEXTcellTextIsHTMLboolcellTextTEXT horzAlignenumESliceHorzAligndefault vertAlignenumESliceVertAligndefault bgColorTypeenumESliceBGColorTypeNone topOutsetlong leftOutsetlong bottomOutsetlong rightOutsetlong8BIM8BIM8BIM ` rJFIFHH Adobe_CMAdobed            `"?   3!1AQa"q2B#$Rb34rC%Scs5&DTdE£t6UeuF'Vfv7GWgw5!1AQaq"2B#R3$brCScs4%&5DTdEU6teuFVfv'7GWgw ?ĒIFI$JRI$I$$I)I$JRI$I$ĒIFI$JRI$I$$I)I$JRI$I$>Cj; יִ ] ,`& ñ^F@s ]]K/c<&rH1 ,@G==O9vڇw4GW_7*˳lhxk+u`lEg2Ssw &dW[ϡ?埇e)pBR2?nX?6\a ,~L}?oч9MQw>ߥAqm'K }ư-^S7 (sK곟+|A*rǎ1'dտXc_W뱖k;pd[A2iψ5w]gHY˝}M9lp ) ~3y 1˄~:Et i.EY^/nu޳14gwScuF܇DLNw<?G_Vp%WWR|9 M>LS_V{Ȩm8fE^o^zU^}=k\ ņ/l/vz}tغa'>OgK" ?}E ˖g$1x"o\?7ڣ28q9/?KjeV04?F>FNE~}:iUaeno7WKi?֯H#D Tn[HO$R Gxy幌фx!ns+#SPƿɱ-'Riy)Y "Ex͵uV\F}Uw7}37>Org3><+|+-B"<05oyqr-umk\m{C(s~ߡfIWͦ1k69dY7kӥl]z'k)_Kg_Q- re> d#(?d.bX)DԽ?y{:EME~^%c}Z,Ul=uew7sw.R:S: 1:?|0PČYlfu&G<\^kU{kyU?m~_(ezUo=f] g2ppsoH۶Y.w?ׯH#WJh~O2d|~w#xG-xY_԰[^S4[ avt5g}e/KQ+,dtk8Q:;(|_Zao[]g67m鲿c)ˋ:ĈXdc xzoĒIFI$JRI$I$$I)I$JRI$I$ĒIFI$JRI$I$$I)I$JRI$I$8BIM!UAdobe PhotoshopAdobe Photoshop 7.08BIMHhttp://ns.adobe.com/xap/1.0/ adobe:docid:photoshop:c61b5d75-35a1-11d9-8bbe-8de394072d11 !Adobed@        @-    0@!"1P2#3$4%p6D5& !1AQ aq"20BRr#$4@bCs53ScPdt%DTㄤ`p !1Q2 0Aaq@"PBbrpR#3вC!1AQaq 0@ ꟺ+막ZO15q1%>[CZqj+4Eq1ZEY"~|eLUQ1,JU-k&9ˉYb*GW$()1D[[j^ڶDW[&+'fd.&jUbEE Mk(1DmLUU4bh}WjLKz\ڷޗԤV1DLiDh(>Q*oFEm LU4VR|$*zK1q1]q1%%DU1;_8s2LOjޗLwsjj1Z3ozmmvWs2֌a㽿Y^B/9?y8WgUW1$ēW1$sO’R>ebY[VnKViv V{im /#7џ< f.-[2Rn-^M὆Ի3hjʼߪz3?e^ujGy# xu"I1,kDYڳLW5g ~C¨bY[Vչgyo[c]ݵ5 BS':ϹUv.?L~caOIk9R gV_;>]qNejrEY#x6U$Yڷ6ūqzj1,SM%'ȚD_Q$bkVkW>|9bp-g5ebp1O>W[>Ů:Ǘksȴњ*EQ$չn[㼽//KYW)&%՚bccOˆ!Zڶ{J_0ﭡ=23Z-'VJo^ 6.ŲrGqn97J53wno[Ի.[ՖbI)>DSUW12=@ux ;>/,MY>O/tuY}1//K%/%//gd˜!Jipy\S}H޷~u;?\WXKL`ɛ;9¾'&]q+O7jLB'n[Թ'W1Kh՞bkVYc)&*WW_7ƼStase£ŏzS1Y8zt_aqv7l!'Ovsߩ)>ILMh- m LcE L5Q1[g^A[EY&v]|[//K&;k\~3w<^U)q;k/uxo+qv[Džc}]!$eSJ"i3׳z{X~zv';12cɎ&;ՖbIDM4BMw{q+>ˇ[?piӪj/\LsL$&mo[G=G??Om\ڼ'iuj]^"iU1$[DZZLI5U}48}Xo{9ymwi|ǿ7g:zäP}IO˜ba';yE^ԍ=ﺿ܃>A&(hb`Xן\|Ƕ[bksO~Z[TCY&y>3g\;Լ/rR2R;ܔ;{VzJ>p,nõ]hNυ{ί_ :&>T1DY-mK_>oKH^;Â'q-'_e|٫="} .Ӵ?) 2RR/cɎ.&"oV>ZY@hKkVri?=sG?/[>'u6oWޢCo[[VgKR/Ǔ/+~ø>'m_ˋ)S.lY<91_d=\|)&8b쾂ۺS9Njot{o~Ӭ|6j`An&җǒΗqЛoIZ l'6y;=/_,jZ7թqjjhDIk-Yf$bU/> 9t:ѐ=}G+}zQ=Q1T>ִћr-|!{kYИk;sXL~Fft7x뎐} ~'_'eOBY]oJ_d{z]J_d}z^dͩ$Gӏ~?n5_kxW15a:y\g.wW[>g{o\ijZSfڷʙ,ΗǒҶnjc٭)|SQsqafÖˇ)K.+%.&U1SDLQ1D[wCtyYW{x\Y;0p{]Snsstcx~n7;~L16<9XddwK>1t>dگby|O*~38wͫuz\ڳZL1Ũ>"jȉ-LW1Z+SQC/믚k~?zhwOysî~LQ4DJa:3jy&rg%$`SLmiK?y?F4.՚W~iUQ|/__9#6NI_/=Ϗ;W7r9q__J^^Lw1ޗWȩh=oW^[]j$ĸ| ܎?+9 wX<}Jf޶ik:d{*^Ηୢo_ w6k6 |9rٰsaq5@ eBcLQ0VO}o=1z78q᭺=g {t*lFG&;Թg1- f5LW1R+STbI*5OQfݏ_|u>+Kd> }^ϭ"h+hk4EWc׹:_j3͏4M;Qy-tӝ-\ҔY&ڗ;1ϟbt^]uFݥu<{z]ޗLw1ޗwū\rـzK1%x|by''ˋexWϑ>6Oy?#1a[ִ/gLXgK'|^Tg>l92saŐɎԞ"JPfG3 w5a쟜#|@CaK}>LeO= +{wbˋŗ`yC{˃gb]nC&;'鶗̟Aum%/{/+uz]ڗ7Y&>&khcКD}*ERJU*T՚k[5Jrn'|%N?%5N=`'Hn۽o3iݧ'}o>7"L+7kwY.omCx_wf3a|OdՖbG fַ.| q>?Fg=៬7/b|͇x݅վ/} y8yA96'ey{씼.Kܘ﯎%//KYduʝSLW1kKhduznM0gxۺEe!DLQ0Vս-iKtiKs~7uxy;yl}d?Ł5M^m[Gsjy~oNϭLv/ŗ&+mϭ=%o΍{O~܍5Kc1eŵ~81ZWs! Z hDM) TERMhոn-Z.-[W|-א+^#vZ0g/K W^w8qy[zo?תugbecL16Ե2XbO>ij{LKR&;Ֆ۞[z9)}9&W1==h}/.캯0{/tj[JSLUx-iKR>~jOo=*ܺg6orO1c6 |9|rٰ⿾;zD*™Q3VG>ImkWJ>}o%1XsCY&%2Y1^dw?+ Rqbɋś/bt̛^mY|uˉ|9G+>rxK{VI5mo[[VbEDM0eR+Hb{V.Ky¿ccn׆{1 -0EN!px_qvp]O^~ꝋO9/Q:oYoՖcI mo[Ywp_y~Xo _[Tzev^bftׯ1ϣg_ }wX= `g{r\o/KɎɎ՞>g02Lǀ;DbYI1T>V؝gFlmj|)&)kEwo6:܅9>Iff×͇1[6l9,KVzVZqCTLig?~OsqΊ1l ؉/#lsf+MZLf,98r@:w?Qhq1 gyYL?/σ!^k6mmKVմh1ҟeR*sL\ZWyz^^w~/w= }gz _}{:OI)ku}G}AW /.[RkES"c{wfqn/΋MǬ?}WvXya-\Eڿ)zoͺgya_-^LwLwVp|ZB&Kj1%DU/KJ{k_巣h~tWCrޏ׾Û'&{Qڿy'aQml1ɏG/S.,lY|rٰaeŔ9As8Xǁ-b3<g-~8>ljs }7]^W)U$EqCDfy1pޏwOot?Ml׫d\8NӁσ) J^^Wū,C!qυkKZ/m[[EJ~C.]7kwz^^1ޗ~MW;^?t[z} @yq5/2RkVBڶaconKVծk-~%xkM{+ʂd>GAikɟHn1,5먽?CսxO>mCV|]ylr3X{z]^|vߘ__6\w12beŕ͋+%n蝗m#GQK/.{.HMw^.'?Gm?UOkkMڿJ$D+qaTLiɌŗ6+oK>V}>Ϯ7A{n#ޏԯ>w=5>9Iwc@mnG\}OɎVs{"]u/w^ӻOί>Y} ޖ-f3O8}d~}ݗqj]xԗWJ^J^^W} <+W183i^]fͫwz]ޗsZ'×ϓ~?d|bvVػ埢:3iy:so!a<KhͣGv?yງ&Ȟ7޳G>z1͹kctv.qogzyKܘKVIٍ}Oq|ImMj5RL?T|0km߻9zф= >t+yӏݫˋ3S.+%.K&<\y<'W;߱s.mx\žä!7^A{[6>ιϱ>~'MGwavQ<\$I%bH>`r[\9qx|g߯y7}SˋϚ7_g4g9{5fK&*z>~W/ /펥oQǞoMiҽy^U6+7RtmK[ܾA_Ѻe־ÉM+NĽ;ܔ//KӜO> }:=7Wcbm[Ysڷyj\^Qm?Oqk]]$q֓ڽG<_1i1!>wJN8kU#r}=~;=ݩ˹h=o1t]W+/}^g?_m?Eޗ,lu`en{o$ijYmLK5brŸQf-?Zciza~غuO:lr91I1==fWrxںx{mߋ_υG?Z|A]yl8Y)zY:ÿ># kF\S3&'%EH$$I\EP+Mk{c&3\^Ynk0}SkNS.P>:GlxQBfw9O'DֻG:y|,Z 3~)6{^1yȸn˃mKA[}œ֟>>>oM_א.ۛz},:K㻽.^Gvz>9/>g^mnߨoY͊Û%;RVƟLOj޷ ;} ~ԝ>|=?;L=н]ڟ1 Lh} nm[Sw7y~o5v"R?&iݗww4^wY]}o#y|fLKhk$F~ߌ~_:QoSGmλZv]OCw>֔^$$}Z{[ʞ潜+_mڇ+F޳rx&x_C>3پuf7y辊~9}}c\~|XI%bHU Q3 l|dˋŗ71k|۞wTeƿPm:~|w`ݱxXc<4iKRŨ[V}qv:e./Rϻsgj7Rtuj?Fww^}g}%=my<|"{wQt[_Pˋ9^_>nS_㯥2y}aq=?譅7YN=Cy =WiEx7$ijKj1\F^?ooscV&M1]9X>;ӏ~S5Mu69qGJ~wShN~Ww^98wO]Ry7#7L{4;x?QMn{~py\-yiHּ?r\w_+]MonWS^s?l!t/yƄzav=v܎\wuzM7hY뺝<&>*~%Ĵƙ,ʙ-){jZ*8%/^q<'rs9,IOտ:M#}}g<-]&}q*SN߽m!Wкs9OC?9^ñy3=Ls-Mfb~ӏ~%:c\?J,݇_ǰ1}10=%4EsLK1$Y$vSOl@fmzV>-Ms×]uUw}y$96;,1^O곳pt]iݿNN|?w7>a֮su} t-{oz?;6]>m/=[3ݾ?9IUq$\>S3k-bˍŗumo>T|.Ǽ{Srp?7޸>rV_YMjW7<n1xYϹWtmʹqb9:.oxgOt ^M#nB{ُ=_ v+L1o^[37﮺3fwz/}Kӏ$D"$poy|n,Y{qͻ㩼o`˰{gvVG.>|'eҳJҝ>Oh||Anl_zGs]Կ>W?7qI^??KBG+s|r:s>3g1ý/EgNzyN}97φ&;R՚ۿ쟃]-s'ukqubkʰŅ[,ƯN-W-0)ghgҿVddrc叠{6;kc&>W{R>{QzKzzN[eTzn߽3r>]zyޚzN_uG||We_~Zcpg`]o0ydrSLnNxon5msI$LU.Ͽ{sv'+_i|=RNn!p.;;7>`˲8ٶ l 7K<G?unc6Fomo28g>u+?+1ihc/_?Xmyw3͆gf 寢[wKh}6ٝ/kqucoDLQ{JͰVN+S-8JY8Woug#O/ft6JL~>LJ^x;.C6#RNm]qf|:ܽAâWԟ=jw/w9 ^MYoC^xyDU1khdJPl.ˮ8پF \]{':gek~lR+bIW1\H-}a~d>\ ~"ml&Gs8Oi.{:Kknظ2=pz3}M~zt <7rיuucl^ݬ>>lGuk~ip~3s}i׸&}'Ky:q;%I%c%v{͵g+ޚw䧠/3ysajk>3^qp|c;IYدI sx͗}M;b]mtsko3~dA{nmк[Xl_ru^;wZhժs>l7ū4[Dzav忢:Wy`km?w sDL{(͈iwJz7_;S*/Llm[蓼SBn?Nh>;TVv.]OzugJugjkʺNҟ~Okۯ;!~Ϛ;GfXv);.bv]vg6 \}޿]/@yQ[}_ʹ\rK >~Ź}g>&!BiҖ`ø\#YRy;^{nA㞳1-yW)<k ρ^VYvska-xw6'Wj}y5ۃz#yJX-b>Lim{Zda%I;Cl_W#$q'y~WYq:;zW6oFC.-:.{g y\M|֝]q e_;n{WM; {?+SrrΣv> }K&=|Ğk-IҞ+V\9F9YR93=Giz~ϙuܼx3x}>>Yyz^yzVZQuv g/?Kr-xKWp7bG[o 9\2-^1^q=$9f ?;NJIaWiׁ96girg&=v޺}5k}HbU1Z*H<^V;Wj#hZ("hZRŸf, 9?+>Z5KM1yos_6.[]`v=~mNfKX$EQaTio{Z䵝c&+^xkÚYN- R'97a͇qw]/3p_Apn?av=v:~Aj7sϹ~\L|C}ǐ^ZӝqsI1σ&o/If+*>;kFjۅpyجYaոd141eb'ˮf=Mq;YY㾱]iL#y25Yd2YqrnWx/oJ+!/\w3prq0nF+lv,u"iOTU1\sn[WLQ0VVc≨kMl)1((|umɏ򸼋dTƼ{.31͋9yzq7'3Ld⼾<k[ԉ.S3{Ö͇'Z{l>k~hU*\ʩVld2b-moYୠ&}$&ƙ!2pseÑˎIq8L#cqyq^uza\^UfÚσ' r8.e';8۝ԉkWXBG3 ͽm{ZVt /_0er,55jp2ڗr8r9qS%qr11L0X9|+ˋÛ9جYrٰrcpx37"ڗ2q^C&?KV.;Tcd''JVN?I\LrEÛ7m|> T3MorR&9e|)11ŬkZ\|-kZ^ΗୡQ@/ M/c%/kKDMHRڷwLy -[ܘ&K.+Y64ɈΗJZYmiS[STWJ^_ؽ^ҍ;5TeSI1\SL5zֶ){Z^ږ-OȚ%nmKժbimYf>ˆ11Vmix"D8p&I[VL\Y ﯏#G.;YY$d|#3 Zmhi&޶{z 1kz^(|OȟLI1$sW1\Ă`|1hi&(a1AD(Ghb`kzq4CM D){ y,{:^ ڈ}Ly1d2ce{|w6fGM-iKԵoiKִ14DM0I15{Rjr޳{J$b|ujҗ{DYk{J^{:dikj^-fHLI14ū>N[}GyuD/Ɂ$)|OYMm>&#L\Dh+GGTGhE$Jđ1+Jo1Lba1:]bBb9T Q)B+ &FPQ"h)-sJ~D!Jk`WYci&ERJR~5B|>J4 $!TOmf&ĊϤ3Ą!I I&(}J|hc&IEGOKX}QL>Dƙ+6vm7WwGa9ӷN;p;d탶S;`탶;d;pӷN;tӷN;tӷN;p÷;p;p÷;p÷;l;mN;d퓶;d퓶N;d퓶;`퓶;pӷ| G|g| 'vۧnvۇnvۇnvۇnvۇnvo|'|G|'vۧnvlv'lvʝvv'lvGmvGmvgmvۇnvo||vovgmv6ߦf˼Žw2 .vO_Hr!f2pt;*dwd]p;-=%r[Kk >bn U2|șˤGoZGCCmAEJ7J$Ljrڗ]n5Fk^-Z;HKk\o/h̶j[9!a,w8=jk!m q)5_eAiqȆfFh17oV^{5F8kRmol .w fK"ý,QOV- 5p{"75鈓],N+8P ƥLvZ[a3pǦoN_J1TH%Nΐb#R-njYܯX/mLL|$dzVAPGRfr S9n9wowD-ttHtHHtLr)EBJ:mܓhϷFsrWu-1N׍ۈ7oăp |(t9-ي-*? MdQ~iR&vw5Ċ9-r(bz]n~&ې].[tщA;n92aRkd ?VnPЂcap*I S4@Ui[Kyw5m 鼾-O{qG3L<\jgޯTlԥ $(P{}Jܾ"=?*")-.u ]F3$P$(h4 A}qȊHQ3^WH1pqd:Ii4)GaH4jnW޹-`bلѺ22Y[jm,9彴uʳ\Ibq9H mv򩞒;6]*4h4)SrINj92خU6i 2zz*#pΤkQ#$(rC%XTXX&pIF59D4GuEl>eE8خ08fV߆bB9G(rI9JrXm:,X#J?ϴKOjrmiarZ3[U)mnjStI4pK-y%}?SOM pʛb: O}-gXd'a,ya=! AF~w55&A?6T7- Lܫ 6Z3BIB=7Q ׫olvb ,<8W\L ^5TڒRv h/ LZgyxFe2nlw!A޿dۡfJz-K˶W{up.5~2äcF}jD/c~m?1wܤAsw*.VKnPˡsD X-0D{wkIo2. l-cߦb_or2}҉x˦HۑjF;&2_ކ oIf ͨAF kh'uM?N/mh>J4pۋ%˾ѯ^4m~%d>0\[ ϸڙH:{sLQpݐʘ봺30~TOk4vEf'صOkF'#щLKCmi5AGv0hoAPZAԢۿX'PkF"]K_WrTHH)mqމVQE9;\XiY-զ+?681=2W}] ,]rmS).ye ~R[#. m?1G"C7hh|}mҞmGl^n[HK[ٺ5ݖ ݶ۞qG ˍ q8_K1k( pAhK龙cT-N;RM 諸X'ͽ]2툂z晰W#-o6i1DR,tСBA+K6ܷ'XiJ sfmRߨKu6;%2ѨJǦlq2.3 S? A\$[ܲᾬ4jɮt3)̐,;2p\ 1rAK{A" N[ޥBkbRc䳻m|.jܖbYUʯ-_lK@'nk`K09o Xu'Z{щ:Ht.p;uVkGݶ?VG-oL"\kO^eReB!4J(h4PV e09qxbLF3+E˕*/ &4‹^o˧5+>`ߪ#L]Kt2lLٛLAgIy%#rɶ`iLKȤzj*PHoEh(Sԅ,:FhT(lE2ͳ"ǽ¥M[L OQE7 P' y^s&69p"׆Rϫ֯CkuF2{(kfdӜ&>9toH\+%վB:R!^)С_eHX^507XM*aۅ y6w_ N;Yyr 6%x(lӹw/*24\IܘmB K]7H +bFxn[/Z٬m:!5e)3l 2\A|Նo%~H`O^97\mv N㻬.抆^F:1Tt7}Qsuj~L]gtQs-Ʋ.;mQ10!X"%KO>NCxM% YX婴7L}^{zyM$iunI\lmi5[(i.YciIPݑ굅xm7? T@+5r6WӜf>1{4ZWmv~OB )?锶}[98B[]rqqlʘfcpbHcm] r}-Ja x6! 0ŸB˩Ue\7n: 76hdzkmgIjpas K,TK}s,p*/uȵ6=(f7ϨA̵დ]C~+ d\]Bzߓl76^g 3"D{\%HX&9IJe]~ brO72m]n}훗h`o ",Q+{7EjMb.j$..6ʫg?U9F2in~}\~*ZD>mN77 'enctC8Fփ\hn|1؆bǪRY3quqeܗX[QMvm& h!:HYP@݊6żܬu蠑lMiI8Cz-6~t/fKK-K0vsqKSy΋S7*bmgBuC}ڿ4A8nRo{ouaPsEBٗ h(A5\XXζl QSmZ[bQx!gfRߧ?9NxK}cpq7kWSEᵭDHIHܕJmAܸޚRKhwnE.(zw:nMX4y=-l$\^--UOE_6ɦ~bן Ҋ c1|Q$MsQ钷X$Qx"Tz5JSn^W:5JzPږJAYw&RB(9S%!qnx"*K-,l֡sݛ^a1GLAF:UǶ3mc`G[I\+A ySuín֌N7vqCG bت,kAoOlԶF #VACL9/ctƫ#C;X%'oWOVQlmwAn^.6ӉrF:PXS։QKl{iІjӪJpx^)-(m+5bb+V*!Ǿ6,g cRHUqt/zno;{EEsc.+lNj2/'V'抜'd6׍jT-D"Sm &\v-Z⢃28HAZP$28v^xF@L[eQm,jn籽t6uGcA5=֭.vVoHԽmvu `%K4S-mL!Gk-l0qef(kkȭg|dZN@x6B=#@+VE_a$.qo K4eݎ%D &]mhCaN+=.ݛ^eёCͭ-^bg)Ս k8퓋F^kޱf択kx)2zh1h*}@H*"jz%mEJqj 38Fx(6Qڎm9ү[QRASЂ )A(=RQ)=i{Zi4M#X5qiiPQ(iZ* $#"} b0kOCH֍#jh#AprT|cx)#iFQZPAFH”* Xi(PB (S T( QZiAGi("҅B pDA /f("{CrP("zrYШ+X,kx:*j 22$F '1OCЂqT3#J,ŠN44M&Ii)8NX)T3SЭ4i)*fosS{JEOJhSqAORAS= A= (PTB=СOf>8ӊ'PT)53v?Of>>YOM }U>}i2$Q{i-,Hu^| | |yםq!!֡֡!֡!֡֡!!!ססzzzzqס!!!!֡!4PPPPPP>D#䏒>D䏑>DO>H#䏒>H#O>DO>@뎹μ:::::::C::::::VVVӫiմum::ƝcNVXӬiմuM:KNRéa4XuM:vӫiա֡֡֡!qססס!!֡!!!4um:[NRөiԴu-:SIrL*fN;3;S;c;S;#;N;N;#;#C;#;#CC;c;c;c;3;LΟ:|͟6|:|ϝw 'pwGqwGqwGqw'pwϟ<|8|8|ϝw Grw1sw9ṡsw)ܧrw)܇rw!܇rwgqwGqwϟ<|<|!pw Gqw!܄[[-s>gH#EDYć!ƣм p/BkWIH0PF2:H o!qZ\bfZ \JC^[bm-h?菌Oöͫ6֓mOTZR}$joܖ5[b-tcOJKC$'t+θu1QJ^.v5_Z}JEr[c"d)sX (nbL&лn1Li+ri,3oɪ;{u-W!j9Qqa¨*S< VnXt+n CKDD`AmX\-)#VrYP%f-BZ8C9y9D˦5qkC0fQRj^DJ* ;n:7pۿJ-Z 29sTS$$s FګQT*[rI'u}eJG+*nj+hsӚsNi94A$5F۵I],t6wWݳ`bUQfC-T9FҊ[9wldL4z '_r騋9n]6?$I#n!X^`yr^xԨ֫\{f8ҺfLzbiq3\ȾҷLܟpEJ*T_EMbnbVOogޓSu.nq!N8jCqYr_v+эʾܼ>ジWN|TԶe߮UQE8g@ŢO1TiBGiLS] #EzsømNA?ٲ6[Us#q!R}.ә 6YE=rS .nf4 Pկ` ,$*+qi2N:Ծ:8tސNcQE_{k[BwFEz A3q~uǩ5t1qy jO37\A~)G6>*OnGe~Ye۵njrq4Tbm4\;u_kn>eՓꘑLawkfeW#(`RTFN;]AY+L9ԆF_^/ԩQw0ܹFdBKf 5\ \/ n_[Txm^t(.^\(P/~ RI7ljmp#IWUQEˇu¢)SZ**ee2xcqQ/ %mb2=3㞦5!R$ld49#.ܑFJ2XXL6K'/6ۧ ;xx^c;r}J!tQ۷-E#/(?&m1o- ̓8*(ۦ#ESY9Y_Zmd*e/)s kI"9!: 2RUJ6[ݣ՗:Of.lON~DKr.\~$HL{AEp[Ig\K=tێ2*MޞAv X"R,!El8.rKTUQE^ Rq8/+w|DR33o"x&uEȲھ/~8]!sڏl_aRRXJ5f[]:IquzSGq I22d -˛ܹP#_vPIWQQ@WՇ~>(1{8Tbl#  `drXH-#!%0gIdEQTE'H{ymvlm嫭dmjY`ckhPʙ<%8疉8!nj^Y2nI܉'5RrYz^Aȓ5ͺr۫g[?cl0o ɍо갹nԔQ FJE}UۺIYeϾ,Y ݆c~ԻG13޹Jp:r۲j2:q[Qoi+L-%ޝ>MЍ/cމr'&"rѠG%6{%TW }J[ZvLA"Qb^\e_khfha79_A [t^۶#Cp;\Ꮊl͙fL`m5ሰ[XXM[HEr)q LɣճBQx +Tomd{ioRjSӕǶ-6UKiyr/ Fu-lt~2;4Ӟ7n==;qf=8g_X, _rx¼R1^Jptkj=́.3nRI]9: hP!EB9I?+6wf_N6H̗JV}jNLnDu=Jrו $[wku-[GTb_gZ_[^M7C]%$wSQR+5ܫIXc,:bb1f(ly˷-qYrMEFn6V.;vJN1=4fc)ҢU%"P{wONg KbYqŊTRxaB::YTm*PR]%75Ps#M)x/īPبg5 ǟ?$Hi}Y`m\^wJYڥ}2kaPͥ'^tJec6ϛ5&L6~LaDiD.o[] ֫mU3Kl<⋂(U\)'`cI-<_U9N5G[G %mej@.amj0nֈf۷hEDR؛[c[t3̑el! Ǧ[wsaBtJAe%ms=kךr%Hi唵h[Ka[X!֨*иGd3Ƽr q~㋙5JEtmx H5.VMiq\v*y }BfBnGC y ϴw ?_xIߡ[ԗT%n[> d\n WJ4ɢ"E6*m#Pb:yk5R&]+q8ۯqk܎(&W 5EJ+3anG$ڭ']A7t6Φ:=*EFM:=vܩZ𹳎-kD8IFdm(bD\ۤ6e--11[(0/^m_y}&"pA;[ .x A#\NfO:T2iOKvI!,[\sڅ̺/PD>>)e14pii'sBEJ\6}R(V7Xܥfr.\QTqTIZfҽmIk}_HGpA=ۋ@ Mp7~jnT.+ۨk8)zEZj̒ G~z@Vt=^uug*gd FEhXg36daw~tu¹I` ࣤ/3E989ȅaK\5?¿c!/2K+ bfI %6VTmn'Yuܵ2ԑ*9 ssHo)VSr) > T&c'S}Ώdtշoy2)%Ⱦ܇:"ATSPȈO"<^1W=<*(.Yl o.1hnȎ / fY˧/ p Ÿ^pG琟/,x=ÔB;%$'c}wIE,r.&0gZgҗW[p$RIEgrsKʽ+QĈYܺŚ1;kB+$IqpQ̣B,6ntYM\d$IqEɜY79 7p4ۈ~zf&q%f}M\:U,Ȋove>M^:UV-B!%Ϣ7lۅi4K\3w IwԞB17|r1&_mQDwz;LKN?ڐU-xI8B(0;nկQ1ޥQ޶:]Qp+W})8E_BTcQTkPT _uҊ8}^j5C9¯GF\9DPG^JCo Њ1PkF<w#x5 PG*jEpF⣄Q#EJ*TRJRڈEk#$5E^ q^ "J(~̃C!QWݯ !9j!9E\/`plQ/T$*U^(Hsw sE'FQj5 Q0W"!+Gj5⢔0}!ME}^ƥxxE*j+ExWОЊT^xT_iJ5+ ƼkE*Wn{]RJDWRW_:{_c_r.Xt'@t@|y|yǟ|yBt'Dt*tJtJtjtjtjtjtJtjtJt*t'BBBt@t@t'Bt*tJt*tJtJtJtJtjtjtJtjtjtJtJt*t'@|y|q|a|b|a|iƟ|q|y)Н   Н Н   Н ЩЩЩ))(JtJtJtjtJtjtjtttt:G*#JHq))8t:U:e:W3NqӸt:g3q8TNNNNNNNNNHqҸt:g3Lq8bU(3ܬ?r 0DU?mof'/Z~hQCOMʉ_ڭviƟU P#jei+ܨ7̌my&[UO~i}y?p6/~݌O.1Q<~iU4?h?g_(wZa_.5AcD CbP|*zCL?|O;DT ?rȇ6& & -y_04~A| 4?r6O44wڂP_9wZݢO<0c|΍QFYm<,6f w 8e/6)""f'\ -}KJ((PADA"!AjC+QEFDQ\\n2ijsDe  ơz|v]3xKݻsj5QEߨ"#>*9s}hM̙Happ9 JAD}(P* r yLYxhCk_B)CpG8 h^\Լ˪L9fTk~((ADACha}ߩQEF7Co SP9"or[TEӟ;tͧy#QEA=T)좈)-s۵^*#A 噟aOYKri1,nbi޸f"!A4A=+=pTAPT0vpM8rBRAj-]ܗT}IGDJ*T*/AAPDB]s?I+FDQEF6H@HFZ;?qm##C![_B{~S"7-^#p" (PB )ꨟs`m>ݴbn?50nrO4nw@c~∳UcЖXykݖ^F7Ͷco Mp͛&$DΦX{X_uAA8T^pOaEAPT6͟sg($RGW .0lMR!V_)\%N| $9c)ʹaKڕ+ԩRJ*A  !N-_6DQo܊Bi"iomgw"NN:C[U5)p= 6` xLn[~a?)hTj PB (Sw98̶H7Ǔ2Ϲs*M&IJD^b䤁dܗwx(Ͽ9HRqAA=U {*(3n{-awPQb̷o]ὑ疥ݸ[k}Tԧ5%Ĉ%Ļ-oݷfuem+T*芢SQWb/n"UERH噌pA4AF' 8~˗FQe\XΙ`Kkh\nL;FM[.U7)yqqJqۺ۹ S'jQF PB (P{>=[g2Xqw\<5",{Zl{=nW(؜nS:#<[yV*zv.,mZoA֜N_RSjX&/] #ƾCj9NCCΝNy<9nbwry<͜ԕ*TEU6u7mʢj6>DMʥJ =ӬjAF4h'Io:J㖈d<Jk}<;#unxݥ5N6TK)NC[lG@("W^Pq6I &uThѣFAD(PB (P4-xxqܖdk8׼ A1(uGaG&BLl:tc[rK"Tm-& Fn}saAOaE*TRJlĒiw- 78m{F^dxPZrR%&:e |db|R Qqr>Pu\eX]udyGTE؎sH;nHƣa;Vٲxa 'RLBu[FKRKQ4hF'ifEs;mbw\I^bk9U9ó[\E+lR>l5?u+\+9*(b(0۹6Oɹo1/Z4`Pj AB (Px==LRx曍y'Ð/טK-EcFkKvt;d&gDlo"c(<=mԍ*Px&On≷d '"*TRJX){pèPI(%.;O†IqqqyyyyhTtLyݣ]UV-JQMtwI~#qrS5s4Z$1TqRwS$je#c5FQ4hqV3AEWHhnCh1%,sr1ks m9(hB(Ç +x9<#-/X 1!B (PTCƭ9pБ\5#sOsa&Y&W~mw7n/st.ԼpQG>(vܲ\f'Ӷ `hl5qc\s ")TRJ*TRfͽHExJy uX[uV>KPІEJFSklvͶY- Y(8ESgKe۴KyeޤרWBP5K(6J<[s]ڢHc|Geޢ7jTEF(`O}nC&X!U"kLtVcYFQE8QEYÏژ o9wJ*迆 b A"(PB s*I퍽>(3:9Yz,[~mz r{#M+sWR (Ë+eU?9l"9Al h!`cQ8jX2!MuLdO HJ"_J(yfEˆj`x*Vtc]oe! Z(Tj)SW2E~wpTZ!֑ƚloJ* *ld7=ٶ[JɞMLM(Ī4 b A … (Px-UiЗ,++PbjƄ6.qkqon+Ep^}ҞwU\Ky/-Z D (* J*TRJ("2% Cw7YkIaFD>FUsW!'roXBi\Vf P4 p}wj(*x׸wLI**nܸƗYܯs4担?,meL#>'E9qmhšظx -a!*7r[ B~,Į*Vl n29+&N1$Je7m321dUA2B T~zؽTAg0Aޓm ( *r6uBKxx{mlN<LA=Lۀu)5#X5уV_Kw67;bjNUbl&""1ݵ[bp=nb)œ)…8Ǐ5 gq_.-UBs&ۑm+HaXTSfm('Òrpz^$DSk픿k0tb6%nFmf6󋑛*O#ƺR,)9ѓqk¤RyBA,oc(DQ8xMyUYzt8R;Ton8fKnܶHF4TH%A )iVMmy+|=Cv9Jw%ݞfOw1jl pV*Mk S<ǸǾRgi.n_ ܗm+qfB (8Q- CcH߫rbZ!y L<1ڒK/塼p=͙k nZh˸-e:tX;?m{'< KlT("鸆Dga}E8|MQ:Ћ)ƥDQjS~Rkyjyo1^ik$DCryN.v׻$-d׸ImdB8SТ8pSR :4C0~3^y.>^ůP»5ǛqY\S7"vvq>۲|nn7𙙧$7Sa%c<͝}ᳶ Wc,&Xk6jQEH_:l(*Q8pQE,즼\n߆"ҍ-\y'&%#69thS 89^ڷ[m37I?^:QXmIu㚦NӮBb3QctG०u۵dɦm<hn)H\cꈣ\[Y{/uСB8SJ5ŗ-bʢQ=3é.`^ό -EGlL-[LEĮ/8,t;6Z&;o_8plj<:ơ ~6dնSrm[]bg&~?fK s>c͹XCOʬ7e~nՕX5L"D)gjg0{3b趾^exsqd#ӓl1DQEMr2y=6 `4EAHJJР% }aszEI>XfV'l먜@ -ՅnᑄػY_,Opˆqq9\9BnLjn/{ͷzB (P3v#MOOaRFԹ%JW\6B(XKx,ٳqn7YjuZRL]Ŧf/ˋ/&d-n]ߺWZd_Ghr5g!6[w{ee_:4ھfp*Y6e#}y!m޸pOJ(63',py#?N>gIR֯-ۨu$Y$Cqm|o7 GyCpș>N}̏Ur҉Q5*Hr^ˍ痸Ie|")^ cH#AEDQE [Q(CMAPT{*Ik*"p_RG3PS(c#Q4aB=*9(DQcAb*/B PrAE FA15YAPTGi4*)^4E8u2 B (PB APQE_B # %=J+Ѕ8/pAj'kPgj'(*PЂ* ( ' 4hCIBb)iOax(/JPІ4(PT SPhѣPj AF4(PTb PQE#r>畮l (PB (* (/AQE⾤hѣF 'B* (IB (POiEQEP*A9APADPj A" (* *AE_UJDSe}{}& encEݨ-m7dbZ+sSݵin:ةnQOJ7 ^; 3>rq[KHnM7Jv7u~7uW_ $Gn?X7 DnUnܟ S.s5 Њ֪_݌eh][m$;/xU[ةFy=w.EswQyѱ'bNRCrz n>w1:Mܪv(-n/v7$·nu.Uq;wJ*cwJ1ۥUlwKDJ.3v֎7Zc[u: ԂXnZS|^>?tUqSۡL^xV^a[S@Vϩq;a3A[-ʬvr./VvE\DvU\&AvhrFnrv;r*>>m~,^Ϩݫ.ϴL 7 ڻ wqB7oG){.;t[.Tnq\F>/tT\^PEZ.rQr5]7#Usq4]]Csm㶷;Uv}mn ,{]s˵<1e?WNbuXz7^׬ncuXz7^׬ncuXz'^:׬NbuXz'^:׬NcuXz'^:׬NcuXz'^׬NbuXz7^׬ncuXz7^׬ncuXz'^:׬NbuXz'^:׬NbuXz'^:׬NbuXz'^:׬NcuXz'^:׬NbuXz'^:׬NbuXz'^:׬NbuXz7^׬ncuXz7^׬ncuXz7^׬ncuXz7^׬NcuXz'^:׬NbuXz'^:׬NbuXz7^ףuC;Hy4Bb sK]Oҧ/+3~-S:8ЙD?־EņɞhY,boH~hu/!yM>Dp`P:X-âaFcX53*,$EP, W1@]QT:smbkޭ_0axXl36#`2"P~;{ CNӧA]*i1X5ӗmC/#->7J1QC}_l8E}/Ț}X VZrS$COUhή/BӕFE9pb1HX4~ [GXi_k4:NTrWt,b!Ǣ'}V{X*XW*5O{'j.4MDzE##cp_ݩb`*p,Xy)E~WTr0Ի谎*ok9\Q2r$AcܨyXB`TdN,HތFʆ`H#b=؇nG A:ӑ .WȆ6@P=;6*4 i}&ϧ;h"-$;~T O#;jM3 V)CrIEQO{<tofz8?Q$:(.'8vlS-5O.קwHvO!2C>A$;; Ƒ^Td>m4{޾0v|MXz#)Wwx3k3l {Cף^ߕN.lx_tz6y&à$&}a$5B)L秽BO ‰>j U#?i?w)!  /qU1;'tXٖD=S" (G."y`ӢfhP5538톓$c2C`$l,Ln"5CNfٸ_6u=oӝ %vy&b' >by`tBM2wlC-DFET"#!IN:iQChS!2Ⱦot:fSBhv*N#b>Jt_,f")m@w1ڇ n3eg4ɐ|LxaVflwxymDXD09$d!}u_k'jHMM>l0:gMt]M}dy*7yxɰdGpA#H6 :E$>Ms3;MrdM48iHiGwjhMzvxtS{2ɨsGH@ ǠS\ɦuh.&rk&Z\V d+K9Ɉk2\<mDt,Cq3wDŽ<3/5pM):ys#3?X}O=*X}ڻ|_廂hA<菈FYL_dSӧ߆'@ٮ_tѳL:mts|)3)<Kg(3"=%#\_r]ƈx&; r/aEoMyw׋l<;r ?7\ 4銭 :!MMݦ5ۭM2C{hs$(4=~EZ[,@VxjQ /.ɏ!Ʈc92&HF:vqH|ilwQ GЁfbcSFA}/&y>^z6ѕ|tcVն{6DƳdE0']M[A#W|X;a:㜙"j=gS~Gpo9 v!~:0!v1Ea2!K,4392î{dAȰu F 6)d 0Nb8jHSFwj U<ZS0lZb$+ ]&,SތMD)Lk4G-2I5!ѧa$@q;:]BO.x%-4Sb&xfo 󼨠REm0d!wy>EîLH*!m?Q A]Qך4C2@u2:5R&b~ !MZe2Hk}$=ɇ jW 7IXMS:L"]䵙M3KkZ.K|b{੅lTzoe|;B1.SD1z)6uZNы6X橅63u] ; l-s;tC5)l!7wFק#4#6FaM~U6&@j>~r5aO;˖w`=9߹E{wyg;ۡRň9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX!hX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX 9bX HT,Ar,Aʐ9bX 9bX!ʐTU"HR-TU"HbHT,Ar,Ar,Ar,Ar,Ar*C!hTHTU"HR"HTb`?;Zw,/a} X_rܰ,`}Xrܰ>,`}Xrܰ,/a} X_rܰ,/a} X_rܰ,/a} X_rܰ,/a}Xrܰ>,`}Xrܰ>,`} X_rܰ,/a} X_rܰ,/a} X_rܰ,/a} X_rܰ,/a} X_rܰ,/a} X_rܰ,/a} X_rܰ,/a} X_rܰ>,`}Xrܰ>,`}Xrܰ>,a}X_rܰ,/a} X_rܰ,/a} X_rܰ,/a} X_rܰ!m:9߄$Zf_"_&VC`Xa*)hZ _MgU8nۦX!,0&QaS?`XYk 6O|}ꦀo`Xl 6_o hoE0{O?"&h7Pmgζl^51620ÛVy Wͱ8;d y!=m]á:MbNcқ,)+MĘwY7l*o, ާ/v7(-iʮ>A yyᬨҲv='lK/մ.,w j,AR-T"_O4:O!0zn؃A]Vʿ"aK 9, yg:b퉪`}ڦBmTU*jmT1a0bîy~B4Fx蕱^S iʘhSꂿ7ꂁ x,_~I5vFPSpXmɤFO;K62L!ᄳފrᄳN@f}.:`]F#:EE|lxQ=} ˉ]}5Z%l'l4M> An/ϿlS&$;N~eKvjMHΓhhիG@ N>uۓnZu;'_,G^GފFn(qoe'PqY=xxlLU CPX7:(wlr}+E:BOa 6 { I72(ṡ(6~G},զ.נ{л<=yK"sBC92ya;}<54sfa%%7?n i#gx Iel%rS k,-D^=!oP~_sI͐:5B)x껢uٹ D1TADp<_\Pp;͂X3ga]\}.)>O$[{޻'X./M^WbnɞnXm$ذC`B `łFMMEџA6FGNy"*HJwqX٫2MBVVs̆2tuIyu" $[;DJ̬ b b%3X>AtAhH#SG>r=D|f-'CG>3[9 ;s Iiv'gޝ}<;"!?- xI"Nذ_[j}3Ͻrr>%3hSO#LV9ֻct0T8_/qZmw\ۥ~kGD{ZM>Л$CQTG'2MqpVT/T{eMnޟ`,$I{AZPP*lOl%KBl%vE(Pt򈭌P2{!?p`zu2g%;ۚ! vN\f Zz=W e:e;=0MЛ# v%20FH!: ޑa#2CWd EfgdDp#.h"SbHcaj8`wG$$o)T $;%~&e4X+0ï.z} ך`|򶘍'Fڰa+?RNJ nGwoKS {|QT{` Ӿ{b Fuۑm')" @HbGLd޾D眬 NYBaFl~7FWv#b>8ߖ6/EZ$ŶuGmoI"K7B0Y#/;:x5VUc]: >3gnj M#D\EҁIVTo/t+Iij=+FDTx5怒(&y'֩"Hb x& KygakLyrai=듲v۔ 4Dt ^t$[w7{de@J#˾&?W68#""@7Ҧd0WD>w(td0!t%F U+s,CY!=W9);/z`[4l*4@$B@j9A(:fsn'l8iɱFk򆶎| 5Xa}qFDSޘs=R\ Ia֧OFZwβ5}ngߡv0y7IeCl!"i6}9POD|{יؾ50p]Q#́e"O6}.^f,^|>G7M!5|n]:1BjqBHbEND> ruɗl?E$!sNIיhS'Sjl!:&E6W܏pPzN4 4.Eq2ϬFvD唝gôqC{d2$[M&}=LnD4) "blH|*u^MfFĻ5KnS06O|C3Bw|N?+,CJhHd``FիcM$j1(sybdܘ'L1CO :z&yP'9ND; gBi\3tNã^ ™ NQC96)Q6~+;@+PFMX͋NbwE4|Wl]ƍX6 ;ho|źU` u!{d|xZ;[@mӥ2ٔül)t"bh gnB*6&UWl/tABup>}Ӛ)4ofE' BO._!2oW1zsg!:=yHb T\};b&ih$M#+2D@tPr>AY!HƳZ= XiPy7?t!1 ڻj(g 9``S #\l7mBup|~Cޅؾ{ee2~| yw!$GVs4Ut4JFV^Yoyn|ZPo-B4$xi|.'#Mjh{y!qhB1CyXi{ېb:-fV`TRn oTZzrL5#'*&H?w"r;Z:SF"dN(; hnX TPhuk껡-Lߞ+6)DcB%\J0GDZjfCbB CHyfFi7iL]dƅ j őѶHkVRhu d1'ng(!LG9yA7u>PA}!ThA'C)* eV§ArJ$*T)iuZlTU[Wȓe"A_N|T_jlE AbWёg2(O ֕ !:͟pY؎3}yvwl0?ò5gYPvCVa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XMa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKa/XKPU zP^ ^% z^%ꂨ**6* bب6* /XKa/XKa/XKa/XKa/XKAzPVaTATATATAT3ji?ӈI/t$ 6s6fyn>g<^НM͏q>}w6莿l{زl{c܏Ŕ6}6=lqhOǸ~72=d~_gs"gȷG]̏̾yqtqd~]h/GG}2-s`GoM̏̾h빑s#?Esc_s طG?2?/>E?y鹑y]̏qWŴ&{͏pnd{زl{scܿQ~/6=ymcܿZ/ŴF{͋hg빱e 빱sb}w2,#ѧ#2 ad[1?hE(3{G2Y?hGgd~Xl~XGn7_̏ˌ~?2-#/G_}͏3ty鹑f2d[ϮG̏d~^gf>_̋tqqhf>}2,ч ohGEQ́e9f2Q̎6?s#2?,V?GF}2?,?s"gF=f?s#f>]̋h?#?ŴV6=yG`{ϥŴ_͏r>Q6=lb:ޗ}o6,>П]͏pnd{}̏p﹑̋h?빱}̏p>?2?/~dqhﹱ}͋tyn>?G̃Lz~dq4i;/GR?"-ч_9n?s#2?,>9srI??_̋4qȋty6ԏϮŚ1'h,P2>=ДMSY^jByl dNAJRu,;GB`=_쬟 ՟n[!E+Z{%S2E߳Or8Adh%^ ct]aK}lZ{}㘚EVҭ T9h9RqqA *jiZg~QxؗIy!: :[\T֮1l̞Ħ*UJ U#vɟls`GlYIw-I?3>dLu|LߚD{]%+g:5 eBO {C$όt*GWuvcT M$d"hm"Y0OH* -:ÎTv9t-H_~ El6qu9ϭ(Te.2+;8WlGmm$vҬяGF6Ŕ{{<܎=(szr6>qvv?i-c:DF}ᕔd th(.8FpLg9~MS:#G.҅m7w#6?DŀʼnQ|r_芧iCk!'e7 cGْ\G$f/q'"mgf#Oѧij|*a7]ZP!*™R3,;ZWԌhW,+"v@״X(H3p b 4Rl7ِ,uVN/Qjb` ʓ(5*nTT!B߆tBvҷҙ4GfO*qQO%k!Xl_MMJNGF-%"&n:[Ȇy#7'FUG-h*NjF;sQ*3ŀEyΦ-qzV"-(x|aܔ4=;B/I.ϞE*-<uN< sE4YJNk3MMHN Kyz'wǢI wo܀=uJ33ɵ8.8d!)QuER1 dO.`.P%S/Ɍc!lv)Ό? gC(P98ۣ5Ĭc\0R?C|^+Zb#ևt}P(cxäGJ葉tjȑp4pTg.Qbr谈ESEH=~e دbI,R< SJ ȑKH)~20%\ r©is}mVջfX|JN/Y=߷\V 5t]EtrcbpY۳Ԧ)&[VQy4Dѯ+-6۹UE?ؾ~JUR3$$b8>2bcnԩ!.NQZ>fNޫ.Թ$$zu91ofs>W] :h mq|a7AnҹqT2bQ$Uk45xejo8׉Eމr1GQގVrÂч96_O;H61h$HJ N !ڷyo8%UgG\ iŧй“70(~1˷UU܏xdA[Ⱥf-81111;aP"DY#ffrbʜm, kfNhݍ$ KhJN`0**)UQJ{nu[RNQ3f[m|- 4{a &ԩK4k MQaZ!'8ii͗Pi,DCn-"9{ގ2rX/z,X܋ LZ*Ad3hNr hM=+|eZ(TKU. Y"-W ʯII8wHR$Av&UUjGGo`BomiP3m\6uj*'\/j-5 ,l o,ISBJX+?(oK-&nɨvM0HU3sNؘ:4JykkM1 kV=-YNiN$Jo y7(OxɪĄ|퍓 z iDx׶x¨tSjI f2dp Q;f4s#0\"61t%46yj-qɞ>4J6p+I Aƿ^ӂc8o`ZoptuKqn!x? 8p:ӆᄅ 1.]Et\bض8ADp$V[f>F5(r:pҭgj,1-.$'\0QiQaS*;#8pGFoœ[/HVQ=$~*.=]h+=)DN4Ifp`n'c"g(*ډvK0Noبg߾.E4*e+Do|I8]Ov=2V%&Ei뛒 mY4qN[3u'7-. NIfo!LP3ޥJʛOn }iD?'(U6l6~rϖoTyj,0\"(zJ٧i  gU l)::mhပ^>7PԬ6ㅣqUfۋh&[.+ta+J@蚗1 {ÕjVr֫vXK7>x(Io<n7[^ x86I#vvqNE(n-D#HҖO52 j͵]Nne9N$ow]_n+\vq }iXo6Gѵyđi'\r^VrhS{UsgmӖ_E8+ddW mN{8#(;0\ECP oDޓJl^-ή}VULqDg4@V$o2ON` yIdxFH[h:G1 c؉bHH2kł7L))g5I0!'_RikRLQ5]XM0t^)r} Q[(I'Xv:w>lftkCjOzwmDq=0Y8r.HH܋PȵE'r-am; e DTI9qUh;Ji4Bc  67'AOo࠮𐔝`Kw7g4jd- UՍ|0 vG3=wOۥ)%x%T# >4SYҖ{ j=! yCҾWpd=?)DZ~bv ڏ|X4u'y BI<2͘((c#Zv8 WNݥ|;x'[EnG mֲ-q-*1ږ,2ޜKH14&#&i󣌊u^tJ6pGH+7* S).lqűcڞfHY;+5"g TG(X)<3*4b mÙF,LBo &M0$H;[?)YJQeSb{ۨPP1uYT"Jy*?҉ʲॵIؖꊔqŧQaQR9>~ѸF{Ey`1VW%bvJM Ƽ&jҥ"*TvE%IRf~`5zHRAG%i2P'9ueiaިfU%Xf cPdžˉN OVLnghF@ZI{έ)S/T70heU ;pN]qdT]Fa/rTcXٸtM= ]pNa=U'=avҏQ1״Bw䌉_@lۮGR*_֍mb,VXD[\@ws6}V1`㒆T>$ :/%V E.Q~6YxKOI]Amm]] 7+N#ؘ_%n'`LԸӧ `Nn䲙JyY@1"}FG`8HHd7vJguCg4˱Sqw|r;X >NɚJR &3B)U[84g8vҠwJV/ 8ei{] $nZM֩~{:fэ4e*k)$54U3>-r$rF|1PKMjEv\L3HѪ[Wu^ÎpFwT]im(3ħ6!H)1vRwY*J|'H= r6 vjmvfILLT5u7j5ju\ 4β\VgI*:q/sRTR6 +}IȻHllX"+z9[.Mm68ٹC!P;m[ Ynh$_XĢkmRU\ M.B;GXU--cQt:*O.Qu qx1`Ꜻn2z|7a. *QKk;pB;d\nE5 JIč*Q8 h#A1V6JҒfR%Dp|mg{:t+ݼ=%ǖD?倂N$ +J}#p28>039( j+_ݵڴQgDS.۔r9R zNΈZkѢZD8شTѡN:3 ˶ڻ@Hҏ'ôn1;x8zFz9L5ǣ' $ 0Z%ƕxT+HhWNyHFQ5AfZ!:H/=?6Jv+*qm 4P Ba[&j# z1)y8␜WBBNзC[,;:'!&(Xa98c&!4(|wIU-jqѦs|Sjw/ѝ}t"8!TϴDS! [jC5yH`NBvQ7ܫ'8@ذr I bX*ZpKe&' ڄĠ1t]∶ȶ,Hőp*(>][!BU6U:|ձ݌tw ;>/0iJo0AOHחj#zN.B QeU[3< +~G26)p {K =m%-8 ޟjYɂtOP۾ ߆ƶ=ⓃPs߶w9ᶓgk ޗj mY9Lu=3lqpnۀ+Hp6lfnWf!ACtB4v,ۚksUWI>[i\S/:gS!Ziڼ<)"Ysl#sI*w#ltiM3%@z7 d"y*Rq"j.t-bP2c5V&292'k'Va%kQ;y3 eFENRmX!)GLSm#J,'mlTzsPIҀ! jzKtȝ]YOЃ9[VkHlwۡҥ9NjIV&nkT O@QLVGd ;I ȗQʼnIߠIo=e3⍫eta[AYJAd0Uh䉺Q׎Sf V9.s98*&*JQmR=@i5L5[停ʳylCNɦ8قJB{\EbII'.-0|wN8 p$ReK1?dBJ$c @ R"l] QD hf % b7B4KUȞݳ¥ x=%ۇ(nM7"`rTˊIg1"ITJ԰ykA1>)0ڵ2V݁dVVN9(9 ˳ -JYL&qI@54Ie$ TK-,2N|Wk1R'>Bn JyM_ ſ56'nAiG)jGX_"ԙa&4zr>P84Ս,dlJ@Z)i2j{jQiO8+ƴ#tuLU%o`Heӷ6V!6le8קW$u@xۢTB>Aŭp>׊$mARm2Dn2⌚{й,h"c K_%^?&03We*Uۃ4AK@ (ZukkceFϴ 2${Qdl꒭q 81<4^X1 22›H It6ҋz4& +ъHc7 a^͜:Mb Im<0srS%PHX1үLEW+aHh!J1*\kAOc8/ BҁiDVLuNUep\pJ3$06aTp)Lm~m[\2I)ik 3yI܂Ie`H[s4|\ z@ؾPN@y#n,?iQH-.4Y`f:n*Rׂ܎CO ¡_]]bv}-P'Rjp*D9[qP-N,y *Z7pceBaCu)%clO֛:\r~*IN{PMB|bUt"Yu2#!`/:biCk\_L $Qπ]vc cڄ;U>m=f?"A) N7m/J!끵Ga"mƐH߷z !]Zh68.։"RTpdj,:CM'_{FJ8WдT(O:fꔧY rV$sNu:V.6o\tbH`^w0\B.֌AJc#,!t<, E[mzd :GLΔumfjxYnr Xz 0@<1ƥ@fiY8|T6R {Xdk GH9/(tSW 5%"@V֬!0jⴎ+HS8 eyGkPH j3uRgao6TlsWZ$$l(z1$rUV*Zspf}X7wpVhR3TܥₚF1q^|w`6Bfy.iPP.z Vˡ,Ӥd%"fS6q2#KyHq1xma \n#8Ho`5+ ԣ!Ҕu] +UVݒQWPҐӆIRb&0;9ɼ =jJZ-@*#~x+V4>B@;.3c|d1ҵb-+j )Ƶr!ʺ*QZo%FdNU7~z+!sXlJ oҽpL]]H\zIۧM%n ӭ.C;.լ6i*ZpAqJrCI{+rI)(^U:R~WB T& Tl!6Ȅ;!dla%NJ[V +YE-cbhoxJŭ " B1Lq\!s7`) ArkY$~ BD6JbihxGkmOұh@Z0a,KhKhu= JD6glR#7j,'rXv"5gmklJ1=JzH݊h;R*m$*sXK% NbL`M@gK r^P5ln!ZFƂz;Rv 2u뒛#`n,rPTmu+Lx# HLz3w낷c9PzI"ܐ M`鴛> Vt͍mV\7Z4hfYzEO~HP]@h\!.$D3chŸZ[i"jR&*k"#&SXK)SK*w PktCtmZ9d-hZ͋w[Y;_ÞҊV2T/Z 'FZfy2mgꝛ2X:x42HJ9 AjjsU+(RsSS2x1|i'i3)69VQQ:kԣ=q^l'F#ځ^q]XDRQRWH ǭ`䑔GBH# ]z.N@#?NFObpt^XKK Q*ug a&ԅxnA>ͪaR-0s> rG( %<FO0njVs|'H%_6ϛi*g_!Nz: vm)Ρ}֕pj p+?o &frv[(=lgTZ4: 0S&6wd <‚PT0FV%wF{F6g)n qi$!vXp3 Vh'Ɠ.+ޠ^`ԝْspAǭP/$BF%4 k7\!O H; ZeMڔ\2Szw TP:D db_Z[l^U(_7vJ+F~i݈%19v9FI"M=xgpGM\돯+*;c q<U4'eY3.ͩyJqYVbf iƃ(;#7:꒙1+ ƛT Ȗy.Jܺ8SY=YSfRA:ޓ}ʇ,TT@2Fr=JF-GLw6й H 'yf{AaIڅ#f}մbVezF!]ˍa1eefwMU8j*;AE*g\kY\ۑ=CT#u ͩgl1|ZJGTk>RbB{m~[ZVכz~NjxM;8Ψ9Fش,ݒ%@*]*v܆\]yEK6m83!x D :Zen 1U.Ks (FLFtѲ3<%pRQLc%5krݜ"t3,b Ĭ|u-!5kuyVxu)ˆt/3/ $ؔu ڻ0ԝ V@IŁ* FQ([bلd=Aֶ%piǁ#n'Q-hN g'v{{8xfMڙFz"F[ umrZV6RgrT}ʕ[IQIG^8Z&1ŋDY[l]f ؋0bm(1d[DK^-䂋-qƀX Nq։Md[0U#a$ h,8c !v #k1tجog'E&n(M1#3zMJQlexaM'oLn@QaXQ,EaqUeFX'*,,pI8$Dnq&F&LI,Zb( `۪\b`Do-THDJ6boG*h5V1Eiw'u6ņ/0 Zum79whp+Cmjj|.Žflű5nDe⌑!uC ΢b,J-[gì0Lߩ-/W~WФ\qCb@vtX; wf.$خUt]ғcJڟeC)*t$OTqjhW)\2* zn}0[m;rc^$hAצWU p MtU iUŴ5}^lycE\qJ68ug*!4u~꫇ɀ\V :tŤuUyQԫ/EymulEd݈u?UǸUXLgu:WϛY:9>v|Uh6XiW +l>ʻ>tWĺleH_`֜v|ؚ}p٥^I1>_W+)U:L{*X{5ʯ͉*-Uym uU_Jk6iKk,_F3UC]?cQVUyhkSJb}B=~lguW?G :E /~lg*9W4uvvNmxy4}tU+fneѧGW U\~_]twy1 2e!묿WǸWL`:>`ȎPL[bH3E[+O+f**rWj UǪ*ߙW&28֙YH)ꕹ?U-h7J|M-lCFr)+CǦK[DLV(3M5ǵuW'ǒ(RZE o3zt./,qqګ֏r}^lf.(^ *wJ~l |g͌E[,U^lg b}J/+͏rU^lf& _45U UCZuUġ$d_Z _ IyC nn^}Ub1h%^lqhWUpȿ6 f8 GUTfu*ዪ́E\f&=V&$hfnUygE[eʯ6=ʶ{9UWʕXLtƊ0ٝU/5{+WoRN6 npuUy*МY^l(H7{*ؚhkH]Lg 6} h*_klWǢWJ63:nu]Y~lf j63WAZ m*cWĿW\qM>c9z: ~lqh+/v_&)GVeɌӣʯ͌exLOun/U14unpWŴ/̀Ne]6WHZ._F8>6RϛW*rAOx`Yhe=BFg_GV]Y~l捭_:g,moy45bjѕs͌镲?`tz6S9y4etճ8:8X$hӱJ6'>@/͉OweǸVU1>[WwPc4օYgUV;Mi6 Ucr[V*w{_qU.]WiN6-{ؙݗqWQ>ltjաB 2`Z6ϛV2طE*mYtwy1?ՒݗӣkHvr{,Fs͎6,6:Oչ}YOɌhuU#*Gg,gIi:jR\HH 0d&/YG?#E5ʳFx=ך %$(7vU*5Ī.k̹5i˘S^ys^nW\W{D˽x] ^1HQ;xմv{Ƹw%ƸMy2L2^ h/91> ySZk̹yC^;yʚZe5֚ yT^ Mk候6aZ2]Tk;GhRVAKl~v;n; y2˙SZa0ZeMi5v /0,֘S^+Dk^$=hyr0 :_HKs?@)cI|$/ffd2ﻬ/o}'y>R\r˗.\p`_ A:GEg:Ոͣ#aM74"_{!$Ji߹g$ cĉ$H>!u*TRD$H8^ U5~X1}A?i^ yye Jjw69 sQ\. 0a n\[4 ,aCPs!(0QCyݒNU`A6}eNyh`fG:TjWB!"D1zsVEtn6压. 8Hp < bhurg3!Cg,۔!\qc?QB pSzsT>.\0`_Tprc9 C [1{uIn~3^ G7N kѽ>&I5#0BEpR ʾ{񶅻p} ?aw~^5 w #~߹j!?5P: 6~NMm_5ʩ#F|Z!S%|tNV ്ŗ"DmC}> }+u9Oci_( aWMGSGFa0˗˗.,Xbd!B 4~ʫ$rNZݗh7(ab 0tAcV_~M`{KǠ},3=}Roˈ9OCNce d0!@¥J*TQx'AoFBkV&eYMX^Amʭ|;Z/޲o]gMIHAJ*TM;Qk$~F/T;ga; -p8T֖k]K@09}JQ_`T0!Ba'﴾jr4 2/c!TZ]+kx~[!4XyB(hbU~ց MUDl3|i0]Ὥ\+/"z K.\+ƫ8y2._ FZ%*'B!B{ |@pc'-V5U#CF]P3]Գ \Ms?o=>e奥qً}f:;\:Ei7Oݭ !BJ*TRJP`~tyNyls]KŶD B%wC1@׀);|\Q>P=ͽ%w~Xz Ϲx ABmi%ugF˳W# J<~txKKKKKT9%0[Ѩ姃Nޝj1'##2f@&MG6˂FKȷR(+3<[<łL@6adcc;rw!B!q;?|R5B Zr(A ]̾[pv+;*Qш|٧U뮎-. Wݏ!@*TRJ*TI>,=/{WUhQ/Μ/Zr r)*-{6Q/ iy`. P i)Zgp!-$nP,6zh7@V .Y9P|ݕ+wEJԞA~@TRJ*T޻p7"D7)b":'&}?-1vj֞'׾%%Ni}rtl=gcX0b" ,GjU3Tѣ'̩L!C.\r˗._r"Y.|@z++_E˗.\3A=l>WUL}lc Ȣ%)s$n^?1-.!=TH+!0`mܞ3~>BdϨ߁.Wu1!Ōc1;;n:м6jn}J.\|*TIyr~lzFW5j`9=ĻMh^TٹOy.)cϼ,cm/,a#_Fm=>;JX R˗.\r˗X s4RNgATs4 J1e˅ |]ևaֆV끺FfO*}J&0~1Qϗ؊%~ Tpx.L(0` =FG>_wEiO~Q@t*At@OˣBn(wnZ)8VA 0`ۧ?ϘJp1/T:V $bFb2м8p~yt1>~Y>pA#˗.\2l~%cydR4L#a1c) _4J(s%J'.\r˗. 86L[V-pe_aMCSC"S,0x1!sQyK~J5y>&E=H,{4drW)!x:7GhețY0|_ܗ0aٵߤQN!S܋>dl(0` ^ѹ_M@OszPf~g$1#$Lju-vK}\AڈHrU} C Wu%p(ulN^S81pi~%J$H.\rB7h!޲Tԣ^䲵 4;)َ|ÒeZflQ*c"oSUtZ%Aٝj̡gv5&~G-^߶9rPw˒X6<!1EE84 Ӑʍ)@a6\ V󭝬zEJ¨ s b"tpMd=1*u0` sȟ=_Aq {'Mpir2ECclhߙg^pWP?Bv87V~eʕ2gw !|s*94D0@*$H|.\r!( #=زO4zicȫCg x~&|{@(Դa!1uwk:򡩞is^:D Z{}LfGwDf \cqG qZx ăk%0>c( /M=>EKZEs.UnoXAkYg~lk/v &j} GANW[|-~4uW/Wch}+} D p)7:tc}$QOtTQZqlU{S\0q.\$#t>B* O4jx#T5ȜBR@<4\=5Dc-tE~n!LK k q}b6 wN=Ss^a25cb{!zqC. ʝ+-at N0Xns[dWzWƍ@pxPlw\Bx$">"K3[ƚR@Xߦ!ƍ!}"W_`Eo%tN1ECw.7\t|fNöfvS3 ZF6|q-X{ Zy0#zkyubXGx'qb(U\ڽ^T'5c X7ܽVQ9;{>?.\._ g< }L P7UrmG`>}Є~…[,t}i*F=JNDȚ'k@ _B9KUȞ#0R8>b|bǤQtSaDlo95)q~4Wk:/߫Ǯ%U[^%Eq^᠄!BXںj )v``$ef'Uc2$l j+p萄%V5ph8כ\\~{..OL>|eu@甲 Ye[M)kԯk:5| -53p{^KTvv<ʭue__tgol2rHU?\WG"'*3yӲ]35_7ޯ=bk3%sRa<6 Ja6]oCcp2Qq}2*1֐VP}|M L_`]#g/HV4^wsEA.\r:8o@bv[‡z`2P h;u9_G# Avwc"x6ԡ ɛ5bZWUGZyc774Ÿj0b3iK=6A )eCɸ@Mt(F<*TB% z"19bKҌa]U|״N_o~8^׼^ݿN| Z9/c7@FM?נ1iK;@)'ʹB( n~'G_Hs.ARK&Cs*{ՎNR!!]%:¼TDA%D9/iفDqVm\vswrk3WWwvDc#yC[_35[cZ 7qƩRt]Yz_b6/GJuV#BX{>ѣgPb./ ]{˃3Js4'3ѱF1UYVVd]|jtoV\W 0`*l } aX`+Dz%ҝZQv)jz<~ɵn?#P*-.ǀ&í~-97j~azghAxGHKşO<E2.t1PQa0WWɽeYWæ[= 1Jqu,efCCv~})Q 𬗇)ԩSIT;M6Q^{:xp@@C[~cѬc*]a$Ūp2$a?QF*=f="gF5[U_ J(*Jz <չpzWu1{K.sW#:ջl5J}WT^*.ItDSa\ 'Ѻ-?Wz%, -g=]5^c tB6؍>ҹf84M<ߵJmlc  M>Kp=gI x\r!0j֯y|b- %Ⱦ[god>|C4CgѦ3¤{eZu/ igHc̨^iH'kY$RbDzf0djv|ĩ̝3=W*ڪkq~V'%䶺BStyΫ  3QvaEGHWUm}w@/}_ObŌX1ڪT:}Bb[;7a`9\#ãv+(pHs}V)[E^k euG50# {#/'[;*Q*!mgOĸt7i,uC]P( @4g0bO ?_ARW^[y|>IT7䚎Rnx ڃ`ؿaW%e= Wrf%^*5}^͏,W:*)/wp@|0&26;Yszr`5ulܔw7ǔ@ۄB1!~ EJ;C8^yFot}L "5&@ `YCO|EO\X= i{_7 W *Ͼ|+V;X-k8h1#:35 ";\ߑhlp0z. 0e΍«S 57tIG ?}Od~yzDh{wF-m(> !g0h s>[U*15@2Yuvh1%i[ːh p F]"Kk7])ӈ5]엣x^MML6(4Tˌ$6}]`5VՖb,E;B#F+x99!q5!G%Okw.;,e?lO`sĘ﷦QA=Rxy/Oz+J\^éi K+T 1pXSQ?3n*A bpťZ/X2K9""6:_H /Wzb("czCЇfJ{ *K0FVϤ8` f&B1npyޠA8Uz}hG #XK4Q V!фO\Z3lƶ.1KP;jw m0 "5Vl XŁan;#,sxwU?h;;  ˞W98fZluΜB5]ti 7,طWn?4#,{S`hVj6e:seK9XGPDzbͧK\; =`tTy 4!,K"s%y p0$rΝM\]+>Uv@vE`*z=Z%Mk qA܋/? ʟ*T\*W׷Дdiī 1nz8.D*nz7,WuF8NGx(A- =(nThqgoC;E+qyr1ƷiƓyax\6Fi<f>WRF<ԮPi9 c4+&U# 5{M` Ḡ?W<*TRJrzVkZpRîݝOF=} |\Qa0 <D 4@hrWSGcоٱ,r3)/ yz+7gpӋLPyrmGyH(1)g8YT9jǬQc#( ňjϨE/ J)<:R J\'6Xb!cvNIX Wkڍq 5A^#ޮQ5ל4Ad#^uOg",Z4suW\H\;V{~h>&v:>i\m)?$W`{xGnXUh}M|\ ׁ~ujI~>XVW 6>)NImA.kQH; Nɣb#(l}\dv%#CЇa';oFfOSEzHV.9.}~PW{"6v>:ݝ{+K;~eJ*TRM,@bY%}!|:M'[(~wLH`*ۿطCbJ*TRJ*$c?IBQ!@8F$c$ 1x$SJR,~+J$H"JB @ P*TH1\3?[u|RJ*TRJ$c$!/!B!c+DcJ*TRjTH"DTP @ @*TRD$c?E˗. O [־nb9!^jE_tE?*ބF?*WȧE?)#"rGGba~ȯG7G@y#BR,iEy#HR?܃GAWE ?t쟰E?OKO~趾/y>t?dS 5BZ"A~B!~b?؊dS"(W_r+_?+]{aE?,Ϲdv=G_$n{wdFZ"#?؏#b?փB.ǹC_$G_ԟ"~?s#O4U#R?Џ#$GG~ȳE߻N`rOxӇ{z?# 4n8=&LԚ&`䈫"FU1:E[hb I5&zm58o&`̉s#iթ7[*Y՘3SVd7[uDu10cFц0X"A,՘3  H+ RYɚ32v5&2f՚RjΉ0fԘ.VjMI+6R AH)`x &I5#i**H#uJҧ7;Dŝ0fhdm5f Ԙ3jLNRJL 5$fDw"jI11[V֯o֞Ԯ ČH8ξ(+USAY.E.ߪU}6W~ KzjyH?Vރ*TRJ+5D$HWNLO)}fw(tjhyT/`G/ZNh;!A |CQ]!_;~^Zg&SU$jN)6B!1b,^];J$H"JED:SJ)]¢4 ){kj۹&R}̩RJ+D$vEA}= %fd)}l5`RqrΏ!F8I|X1~w/ 0St;3wk0GXb\XIRMM vI+ @!1cs.=/jy5*TH"JKu:nyܢAWXBADǭ;f6^kz}ZETU:,Kh&%D1x_r \Ƽ΍&{h^߭Ngxd/{za?T;_nB.o 3@=|0|4X1\/8 wwn.8k X=ֈ;}K;=dA GG?R*TR@k1c˗5~ʻ_4 Q"Ak5YJ&wv[IBcj^GwO }9?\|-yf~?,CD1M&ҏ}= "D1/˗/˚;m745eӍlÂR|]2sگ5\r=`?#5Az?AOk\vO<7> NyK0E▯J>5+YG1c+pN/\N%>AP id!SJ!ު~B>M _5e}X`Z/e_iz'~f?% #?tTSx»2J*T8T{]ÛjRJ*Tt'B W >AnsWi~ d1c1;.ts4AM@d8znzK6 7ECUce˗.\r˗Ob3 :;$E*:&NnFvlMtۻuzk] "'l흰0 n/=;Wcb c?ZqORzKTwV99`lՌ9>"%e%%%%%x.33ǒ}=|=b6[Dz($8 Xi`[ϐ睠*=bͻyu T RTWe^D\ WPRJHUz6>GdD:zc1cǶC/~~%pHTJՌLKXpۦ󄹔'c_5Z4<l:!;! pRh4OgOz1Xe˗.\rˋZsmCc_9nXK]V-p y:3cV9~pR_kي%%+վd/޸o?c¸TI=s_MbYkB5}xivuϹŘ/_9zBb/j *Q+}'n𹰧rMGo R(Xɂ=W*W<_2m=|: c1c |7YbbGj z6bȚK~ܱ]2N GT||!*_o\z_@$!S1ۖ穉C?z011bŋ.\r˗.\_y:iv5C>F|wIZeU~ W.i;'vaWVi/x`B/3vQegiοf{~cDž?T5*TQKXDfPXz3fSUşc4E\rR%M7CAz}p_QB0o (L{m{ Q n o5u+S*Tx## v+c`Čc?G_Oz~eqc'bumNAoݿm%8?`T%KG&ΤW !B`y9z4V<zbŗ.\r˗._o JM6]H& i?R_A~h%~Žmp Ă{~ 0ԻbL|?TRJ+L&>ŗ~i^_*T":sg_b4  B*PzDTuw y %C31#EPTbF1#1Z?خAx%qټhAIG[$!Bct}-A{n&X(b˗0~ /i1 _MvG4AL_p==6H!F3cɨ`tGpc2pRJ*W D _./?1f\:i(! RE <4w_d|/[ńӓ"{_tq"}D! 򲡄G,AKPJA%j+䙷*t-D"DEw_ò1]rOz*'[w!p6vuvo32 ڏwy{7v6yEXx_|.\ uBmԅ}`˕+K._%_"H}CFF1b˗/+J*TRJ8(=o<i|?mzLF/_kM ~`{,zD gؓ~! ~ X$9/c1B;* nw"pZ^ m8[y+|1QH"D'龨/tʯpxX:Pp{@= ~CB 2^ؔ>]ήPL+t/ۗ8\E7 kqg' ːKC5ahD!b/winp,X˃.TRJ*TH)!P_a6 ٩XMIPv Q8NקFOdy`_uW,;R%:0~w0FeN!BlsNL›o$H"Dy_ɯm{>A *kLNJr{L 3~>Μ\E1IlErx̸Efμ<!2c_{)_%ZD +ט~/kz2h1|0=UmgcO:1PDB˝I/(!$bD'ĵ:</?!ecovA._ =Y{v]_V4gFM<Nӧ 8j/*=o aոQ˗0'deQl!&~|85dqF,^. 0ԩRD1c Wi vhrxh [>ͳڷrF8|>lwa9'4f&ɠٴc-8drpʨ }\˗\B ^f\_p?YRH!1#,mǐǃù|b)+XPt&xV|Y:~d7gAQNs ~'PΥyx Cbe2&4ە~p>|`ϵ0o.+`t6PݩCL:hy.y۬crjqx@x~.b]Fu9:7jD{z>s{w,~ OY591XMm,^}/^)F{,GhvܳZMQZ'D9W#PhbM<&ښ:6c%@y>Rtp˟BG:hBhH7b@PCs[/+ l:Ft58+TE[%c1ĤyGڇ AY'onYGGPƻ'AIф!Ʀyƽab48T |]Xc1u@\- ^^ "W 4& ́:bs'g^Z]m RŽn4?>5EwvQK uokuW,F,c.u̥<ְ{_lk=+=?IP毑}x`s[ƅ,F8x4̓5ETo-R࿮)K\*sow,DŽ =uF剰-GAl rXǻzco;Sѝ- ;W!Ƴuyg0~;8}wju$bFtR9X>rߢˌbK>H>~$cUytƯ (0¥J jm8Ub:<9ۂ_H\|XgF5eL93\A7&vuU#1O8< F_mO!4\9>b*<͙JNܞrcn%XƫEhGh:o~٨7u~z7?N? bmPvznaƩ~UuRZړN{ſore^CW6/dgy"O˃8,ьE=,QRd/FJrpt=.. t|\+֪ڈAG@&?OB-Zk4jesZ@ A"=Cv~75N-ĉ$H% ؽ ĄXA+X"Go&ne7,k7| h 5 {O)^5V>᎞cK`*n>`kNW?f/!_=_&!^4=hF-2n}l~Q}45K-,)<+ gg@)G0`e%%e`~ןXÓzVxW?B+^wCHCVЕ2h󞠐.}0 8Rsא髽z} tr:yGNv {3;_}%xX꿤8+f,wHĥ+{/fG11Tsľ[WlZ^IG(,S/ֆ .QU@Wx }@3zԭ+$HG߉S~P9!@Q"J[P͞&!S҇@ZnpN (r)&k\.`oS~/y?(l2~ }5>. ?;pKQ"DNvZ}|/6ETxz@XS[=#bj$Psϓul'cҥ>Zѱ(J|2_acVߓJ^1-z|˻u*Y1=p1&XB<IJWx*k{>Xo*;aP>\<R{?BvK8x6k򊦮 h 4?1l{Z >CN5zqsJCۆ*5(Ek{AwtbYЄ!=\ )zǿΩ/>ܩo!_#{?ZRW5/R/FԵ^c ._> /7:v`>,t04~w&t /@y w x &!<83M?Adv0yO@t-MYq߷}eSZT[%ԗ-x8cXMLo*Crtȏl1yş!B!řr>9#6 Rpʯw2.綾zqD?7KgO#.W6)Pj%2ղўcXE;f=3<|v3Zlv> @j%_g Hĉ*uB~=\Fg$׽ _6?CzwD~p>F@r1EOCWw@x놙؞Qƈ :&XfuA|:짎A^+K;^Jc;;g_Ty |,QSv란Oxp-v; e*sVP^ُP MvR't|74-7{rG̚Vē0*<=6y?s³,|ZZ\R-<&њN0b\p(57C۞ZGOj}ػ|浊:Z>.ϫ4ӣ`Yvh<{l_B% DnWX/\'0n&^JjTz>bN];-QosG f`F#BiA,Ɔi`4Pli6pH*6}sHgj=uFAn=SbJx{pazSohq,c#+z9;*4Ĺp;牾ީ=)0:mnCngyX@4Њ ypϢ]`F j'd>^j9{ v/-{TH/WVI.򌨽wH<|6s&}Sq=T|كGh5}6g6v|E`/?P5.\r\pڃ^\wZO~2~aݿmOxq4Ae7g$ZfB4|s[c c)A@_1+բt{ÃD'z _aڼ ψ{2L5D0"a z!1WΙz\ӈh} {̞_­x`5z6=FVAWI>q*T,,V }o/e^}q1X"lyupR482x1c¼yhp}?qX >G3iXhyy5NKCyK?DBkpEdt?F.W=*ǩO磈0aʻOA\[t\}ꌵ9e{Z)`({قk˗.\.\<5E7]Sw?shݭv0{GD`Khn/{0^Lczw:s%Nr Î_F[ rŚ ]^CQǀ#8Ez45+8E~ٟ"x"e!ta%=z2Dž, 4NgGG)yDRixMǙ8-[ӡwU"v:"hqVbOC\ڜB7l>hju|c;^: cz&^ oc>'1pZ'n}!ː}4T!卑Obx:H6jOu[?lfwxV+&wLyj}+{S ޾!5GU~|!2&MABx(S_Qɏ o3Z5MzT=3,s_cmfݷ&;[@WU`>e|ƟA\a'n= ˗.\ri4KuE\Toiò,Y#X*Yr !BTܤxW²,2+cq\5XbU7ԥƎ VJ,;NJE襮5sL foXeNOF 7PE"e˗.\rʙQ/~¥qWJF( %#f\1emĄ!*)T(U xeq!bmLʕW Xw:1M˔wXq^"*.1J~qkYH^ e@^PAYB;˗.\r˗K|C04NEc/F!X1eG0jr،Be[Ked(Q8*H#xXCrEb ì1<)6YFL])!bAbO0\._ .\r2B E H\~Cc"#pn0Wq5!_ B`\%Cc,QYrr._ bD/QWr\r˗.\0!'T1,c?B.\B2ǂ˗˗/!n\r˗ 0`1c,b\r B ƥJuyN6OU_/rܸ0!c8Oc1NaBNܾ/rD!!.\0`.\b1bŋ\r !B\kD-'v*Z_LG1oߋ!fE7CF?>`E/D~B?́G$]!??"B"k#C@ߢ#f$[b?̏#HD_!~ ?Ta?OE?E*~EPEEhF?> ?D iD@?ȇEoD_"D[Ob-gE.~W@/W@?ȋD_Ob.~AQbD Q!/G@ :?#?G^}@ߢ?ȍb?g?b0ܕArOk?DG ؁??DGGd!~3&3f&o{L3egj?#df-v ]jH=y޾M+^imҪ3gsfoa\mϤSAJS)+d4oXߴC#y87xd9}d۟H˯݉UumШFZ5 x)mk8cjy~Q Dtu6- vLFy1m= %]ߗX-f|n}cOѩVU1ab o|irh\K%f\4]eIz 쟔NdiϫsVty-7ɥk{{4PnoG&?gPvˬ}v.NR{bR:g7k=&9XoF%3Ε{o7udjaڷz*o,ӳ\ݻSf[Y_Ӟ4%^F"@n-Wx铴c&o-A_~65Y+N}]"rٵ eHkCdgcO]żuNƣ'9mܘ==f.OۗYMM z7YF,sdbob7͓QA1jӹ6:nx VoI7p,k~;@Q8en^v{׮CX:K+˖|uO'5olX!Wfo[ 6Wg5|cނa\M+^XΙ葵{s4+S8AY{ov2t/ sM *®O۟F=!E3@g\*œg,7PUZ/ n xT0B,4T7uc*WMVjY̓ptU5Hn#Z*0vbq@63t= J44 A E:,Л+X嵾3401m*1A~{L]c^,̨ɭ %,u^m4Vqi0/g]eqߙYQ٬7-k'Xf u,@oB6@`pW_4.,~e~ oB@l u:] s,4 !PB$g6N,jjXOqޡKK\AI$Eqxܸ0= *T* ims= jO0 UV;ԼDյ_,8P;౏ bDQf`$!Q4B] N:g\2 CZrhg 23xL (<^xR#L#0ܑqnh30V6BI$ A o@0GuR E&Z'k-A*&EVbHx.573Z$T V@\p !*W 0AA/Cz&0ҟ':0-sBט5uŶb[3:]X;1#DNtHbDw"z0G\gz&4,yH-}!hzIP \A08Ԩ}E**5:L '[T^ <5+p˯1홙RKBSf5˜ ,Xb,Xc 00QG0}%rk%AB8'N(Қssފ[5=;L`_m9:LJƏH5*p]Uw== (o6$;zV-%Rj}@:"a XtE2;PtL!+5k%(- n5tvUʫGPGP= ¼; f6ږYcM7PF)0.ؿA#DyWzGi_\ӽO, Rš*qP"n+vC )D FҝjMEB@iIP 5p̭rW!wUKSuV*Iu |f`ӾRokvD:-wk5Nܦ=Sౡݨ uwooƗFUyxa&F[* SGbˋbŋ,aYeÊa 0?ڛsk#RԗTӇRT5V[QYvވv/=]|γWӚ;[X <BSPֵ܆ݝO$|oR0\ ql,R \AJLUf5!.VMȭIddKV@5 ]1*Q7cybvY~%KeٛԸ-Ea|λZ̈́@ "`o H4(rRz cnf9􏕗~=xb\rQE rxMWb"AQ$W.` OPk5?Ś ȋ#h-Bf`-9?H)#SUbn;,"=a3н!eP NI;3q-z0y5J!xN5˗bŊ(r}׊ p^*`/n{A($ 8M 4LpB-W(C9y5@uXPCa2[;ZP ]GbaQ\G90+}y"z(x¢օ:lF[/ eQQ:u ~,ä {ꕘHe'k 4)+",ETnXN2ZvTyȑ&*3= PnڪVrf49Pt/:%*rljA5_Fߦ52|Pu#X|W< gr ~)2̭3Eӻs``M[} q%mPu, a(AgH5XI\xʠ)v|cA8gL,0z^6'+0iqs} XQN?~㵣4 Ayӈf"p4-6=hmIj=i8&2% eb(dȔTtβ*鿯`i1|? ()aa9Ɲ茲 oщMp*QEQEp tKؖp.msՄ:d/Vr",5^܂yڬ]ePl҂ч<^YftyV&4t3*&9V0zMGQ^b̫HNT ejAl2PiV܏ `8Yefmkvf/(W4-StisKq!7)]/[F9mR(60 BܽGd25l^Rֻr [ }@j fhm kBY6ʺS:r80`n;@%CmkEip،5X =FT .Pd `Hǀ<@ arͮt߭ۃf&˄N)vEjx>>DJu1JzʸȚjTu" z{98l ̐a/X9uuչuCycYCmgs›쥟$Z~=S`9Ԍu׉@CA8(6J7uX t5~%ڴu Ma?0N=`5@lE㴾sɕ]2fZzC6˧trTuqE vҸJNmjT񲴔,9@r9MO@i 2O~F+Fdk*}ij|_aIȉY@ @TlEU[%2L9;dI62ZV`" YY@Rk1h.&ڦ ӊieK՜4Ԅ&A͝&YEDejⳊ}A~ ]Vj$3 qr! I$郅2"p-eb%>tqϚwjCAd Fj#%BYшuc1Q<(Q8`(!rB\(+S _ycbbDhTCj/]j?Cɕs$rzgNΜp[F(ׯRHoɂ>1 O%G6J =f%khSź%D.S _čr( z5WNWlRT&~]sk kCl2*U| ŻzM܇#\tCZ)Dްf(M +*%UФ[z֦L{tmUXdei3VERϟMocVS1);VOkH8 AI'1%1`F ʨ&Yץ 2ⰿ3T-PeK>zDEns=5y=llT.ŸWwn#im Us@83V{`f񿔻Yu i+x/]x,ul.[*]InG_𗑊=_2>\h0q̹?)6/Fub,w~e>0M yQSB)4-'{@hÚu )VCPشw02j@9F|A;C5D@0$+M Puɓq\GYwV ^`DABbV`Gv˚CQwu!/>өz dPNų8%UV^lICᎣb}uy$I$"S6) j2[=PVaPx%2/^XM~Mxw?I5W7̲`FPIȺX45eyDsYao^ /U,:uuX ?[E.OO6bbT |Ѕ쪞S1Ce eZ^S\'wR.oa%AT  @*Tq P|T`᩻SdzTjI}zf :閶HɈx{r9J9A ?DVS{(1UtkMϘ=4 JgIF0I ,~I'ZqV\o]e.BԲdh1FokeO7ic3=zu؍0]Zޡ=I䕆߃ڣXެ'"9Z & 0ɰ= Z+< *CrzX8$.s>~ W.w; r/(i[6Ή״. h}wizlv#NpmAW"E.Q160G!Z+uSo6g}YvK(H .#_c L% ^QWkvߛp8 k{eP6l(  @*$x;0T\XV(F/r4@JvZ)9s4,NfhD0qXQʃ0C f  .QGgh-{7(?@E2I>R8KXfC*,o[#R `9_@yf1rMq'kIi.ԊH.tY-+e{0t/Y&Gٳh%DK2>[ Bx^M#&{sȶHN7\^qrG1I.ϜsF$"¹LPp8э,PkQծ#˜RA`GN+0J_C0e Afs FNm($V5䭬g﷓ yr %m3B^-B3 uţUb0t`DE{A t(/t =t(5)CQkSXk4}Eԁ iZ9 ^kGc4lejBbvˀq "D`X~tgef;>H}!"Ȣ#t"}[,"5jիEn5D|hE 2$ߍ`Q4r.¯D'>b; >OckiȈA+] fgg4+TɘEb\b5wjTk W[jxlsNzU=JGʧdu41"H-wjºXu-(8v jt-{pEkKJ@Hl.ڻt\U:` 4xkYbGQКiIn`+: n/Q\PfWHx}>‡!JFn fodwmu[F.JLfyYk)wMѠ%5d73a-;UٝgM[*Pt-*w\ n9] ټo<216h{ާ.ʆsoXHo/ 7ъGDp ,7| D)A&AmquB V³Jq6JMiM6{̌T,`AvP̤{p+Ӏ !HA A(dɏNyr6իl}Ag`!6$6:5di`IPO2^p 5P:*nrbต~Ah^vj"a [\uVVc)dHO&G&`7+z^~qQnPVt C 1e˗飚ٞ/RS Bd-=[PC5ˤR OQ3FL{s6ՏG`3_jNdK  9&Hu>xI]+gΐr11] ArRx{~fOCE@c]_Axu%\;*.Hi޵̼$^ޚx(}"^^qp-1N x_yYhjc`0r6}-;vJRxrW}1/A8 ќS)zBv' -e-AM۬d9`#;^OFW*)bbOC?a)vjkd#QW7YV\|tWJ {BsK`&Sy(b9;h!,h0onVD+!\{EVv*epa’vB3pYhavw[hb޲/@R(ԻlXڪԭ3*fY{|*AD!#R{ *8*!w ִiv|klط(:nId΢Ѷ@Yld2]%WNk- (A 6}bԂ|0Sgt6HQ(_g=Ҭ P֔:Yh(@ dmRʽb6ny4h%$W.f"Ј]R} YnEzEj:|]!),Y7Fj0P9W`%zWP1:3&"˺o8FDki4~f\j"X/p$YRWlK%k!\a\NU'F6yxߗ.R .,=vlY$OЋ/[ H*ߑeКʮ^+* *1 %*]Yr:Xke k$-(*Xs~HcSN6P= @Bloܩ"2)/(`Ժl Jg.MWXF@jW"bB e:8>\ l+ DMD0Lg<6eN(X)* iJiQ03sMUU{3#JQUi5 Z s`zo2' 0ZLk F^BW} ԉ3*,i9="(rX=ҠB *TH> 3ZzFg 'j["Um2 8 ixy*r@ނ ]B-E=BBY}m 2$Y'oԠQHD(nfN6%S9aIPz ^]aJv%'4Ui祳SBXj,O䗴G3Ҁhy) 9Br G`~i4v 3K^JJ>jI|l!l\zqJpaD9tCbP`%Z`7Yx]3rtub6*@9#GVHeȼoZ Cwx٤lhtKTK5nK ߨ 抴5Jx褰ȾV~Xh*܀YYv=> ɧrh6>j9"`hQ_C^x=Ʊ뎑iL Q=R"՜}sCnYWGZ5hD:a G/ogya͆ "9Z9c坥oq/1{YEuW5[b4 xS)]cM^әQǮ~@j*2H6,dڥIA`~5 @"P_Z7#-1ĺ9:J52{]b(z,ؖ[)b]{w"OhoLowP])i+ En {օl 3+_~ŜIPQ4p\IHA@BT+͔Zh-p :Q+XXۧ3M'^5M>so!T=Ǥze@N[Ev8+k*+]Eӕkb`wyWz|HYrT ԦF.)i*%-a c%{Lz1'.& z/:SX=Gcf6˧]+[1kT+a ہgPm-iUj*SEH @*W bĶ<Ӎѡ(OX~݃ic9#0vOU c֯VqPὅQ,DNLfF z_Y|*.{E]/5\j mX/!wb69;LƘ_w~9z@0~^K NAVjgnƮ s|"O*~ o e^ė`vnž(78rX呥oVµiw=z@٥zSRuTz4Zf:Aj|c[;aTM,IC\2%lW8i7(hg4dg5 cQG!:5aNl WjkU4X1ǭǸJgDt(pJgtbYS|ʍN EzYlxT=Σ/S`'`̦*7#%@V!8fV?ຘp iuAE׆ H h Wi}Z7qO tѪv sPya4agmmߧu?8$  [ lnUfo^JiT7߆D8FA]WQ%ĹiC^a V?0-UӇ #-&ְSjNzJ/m UkWz[6J.1W@en=$@PDA19W;59Ls]vYjޕUn0oh"d8 ` @%rXo#mU!4:{OWG+r˱A_CqRrLD#-N4S`΍oz@w1Z[Q-؛]];M& Aՙ$VX- Idg^֕ @aȎ{_$ d7/_Ynu}ì/=@KYFz) RkweYCs =&N 'Dmϙ{  *g5;VrXrua3 P> z:@FZ]6b@'$܁oM8NDz1Q 6"BF@,_K-k]B0U.p*l֎E0_131/kr?$.fdӘ0 QU2šjX# 3N~ hL\.K@*ޙ~McuD(AATΰE7J CojR&%oAT(*qR+h0U@T@JkPQH]pjaQF}gkPK.owwQchQze1.襮˪r@EjU? R®+nQyG0 Y=H)NLx#1 (2h.0: [|pA@=Qx鮞Š10GvIHDlGD~$Mi5zBH+:gCWc*19`yGZeV:]wQ7N񙋙!QV@B4HgM*66J0=W-jg3dWZ'WԲ eZ؜ֵ0ڂ^|j5b&,s0,{E5:sR*m.Ɩ.((Sk7co=8! 95ꊎ0F`niӄV oN^$I ` &hkY.QRM4p`.,%%k$4F7"|u@3Rf.J鍏tmUtEN\{͌J0fPFv&hXaOi5=XP.)WE:.:^ ةڲrRWw_L5-B0UYLǤ$ ~tZHe#5Sb?+8+O0DYbZ x=nPstih2{t'e:Ͻ~!1|&,@uu9+s00+n0Ѓ0^kihk _\ 16W;y?EbgfscaM=<-R_J[V![Z}o.˥S g Ose3q4%$nٺ:kEcBY QNwJ%"tH$Xv9qèmly55r=(9 U_#)Y]U7P}]K3xE] bDk#aq<5MyE$?7#CEBT7D07*2]xn+A^!ZLPȂ!y+:7`܁vn _M09$K"IN@o 0^W*k(;).3>ls\{^˿̢sjtOx/89j,ۙ. %J!P: ZpMsZgƹ9z[2o 4ʡ]0QQe6Q¾D!P@϶&Զ4ezl:QTWU]XBqR9x"E~XcI$IoQ؈B8ӱɒOѴc PTJ*k L+N_>QF)X%̐ՆUHň*_8{GJڅCL 4FZb46poge>VXvf,րpݯFK:ڹ5aA8=j#k5~K(0ŏaQ 8"Pգfjઅ1Y"f`!)љ;(EP1=!!`CK11[mAeF/sF *TfB@|Lm<) i7q&4OrYDVε7QVzU꾱Rx oԚ}?Eo)s ڶxdFLz\<PcINGR>mHr" NsMfUcMFsʺ_9b!6۫6ZjJo{}i.[Ъ0Ut6[)3y B}]ߤomw%0ڟÑN*uɇ==K\p bؗncə7r\k% ࢞ WZ=8{r#=PhdPu[aȽ`F@SU-XDl z EKI1'0EX'h1nWwi;%q- :`S#`ɣ-( QsjIPjrx'a-hpjBcAK+jԚ-j@B,U擺2sV׎I$IpV0{[05)qXe˼2̚1 ^QUeOTyԮRoOj5W?IZ`,tx=)jDJ.|{ Py#\9[%gZ?t9\|0AaJ;C/ͩEXeK Ȏz֪kE r8T[FK;y0*yސXiκe'|W*F9TjJE(9kh]p0/]sXӬCs` N1X2HؘEr崇<Y7̈́Roen# )˯ĺB[U#:gՔh([:s a-cLT Y֡ozS)p0EV6GM@Q/<_I$p鼳ZokaŮ)OuP.?l{6Uuh/\5(]D.^M?,B4Ka&)D LdZjȖ|8Ns(&}eD*gt݆ kwt`:e T[\@\ x0+s1ܧ]e*h((Js*8敛 *1XM㶡tҢF˴]ЍZGb=[5Z,Y3r9!]8Lܴt)#t60{\QT_"p>jYdΑlķ&LI}F"gӆ2mƭp0)JQvq9 :fu_ [\eP獿DQI$I$0pa DGA< X֢.9\4IE0e 4΢} 8vH%W#0 VAiSB29d>%9@*Wx((~:NkA5q!rv6eo)^#\)PIG^' 㦯 t~ $~Q`*@*T cEqEQEJ MC f8X M-uj Uf7+YaVrealtimebattle-1.0.8/rtb_logo.jpg0000644000175000017500000007577710170545353015213 0ustar moimoiJFIFddDuckyU&Adobed }7TR{   Y !1A"2B#$034P!1QAaq"234 BR#brC$0Scs⃣%1! AQa"q20#@P`BR!1AQaq @0 6.;-st\z*>ODW;cC`cjᓑO[UL~Ů]5)(y* XerLɴ)bNɀMlF=B9?\3؎^sʾON`dZ Y'Ҹ΁2vE󓣼߹snZY )lm|a7+B,͌i|bhKbQ'~64nL+^;h@5#{ *re0L\qsQT6z'(լ$7zlM_?TZ~{a"هmmޟn嵚F3O/rg؞"$l6ZMM4Y&|Z ,&Yeb`rX="@Ab@O2gh&0Ҕ%MJ6Q &dqOC=7&.m^EH !0=\s}gAio&Oa'd#§!V%#5#V7^Jݻkr騄d6kji`'1" Paflu'̠ƔZ8n#%b4m]ج㶎RJEj`9"j Z.{A N,MH(5)T19R0C4S6SHP+!hὂLMۖx-p*t*h$[ s4BwOlPu( ЂOS[:Auܨ>/bQ]λRiiUVS rE¨Z);+֜%n$WRLI(X7,޴HHB_0 C2K,_i&:;{#Va-.Wk(*gR"]䌗(g۷ğkk/VKWƐMkY{RjaYePkgOWL_ q\(сf0}6Kb59aCF9ƗQv~yqhuf6M.1!i, I{6@M@iaUt QXPJW|&([Wv}\B?cX/97dvI0]w erZoj*;gfw9yu?S@ڿUz-ȤGe27aK]iܛ9mqÖd܊2i.f]򓣽m³Ÿuif0ش #lrGr en;z 'T串?vpNNݻ%Wͭ j}f?0ϔˌaƵD j f bErLaV!heTqGK۫-KW\+ĨB/k|Z %qmaCQ1%I,'W%Dq`a Є%Y&. G1B!àYh`V%}Q)uȒ+9.1xT">Xl;aZ ư{`; s&d0BfVpa^6Ǭ@Da $&&{8;`pZPeVc\:{Y@c^=Ƹ:*]aY\C@:9Ђ (9=:L+`#@iƈ4R ˂.ͯJ00Ï0o9%{!?Wܞo~}$毉K`#/~?؞;HA6Ɓ&!~@E1c2Ď444$44$4R\ii HؑƑƐMqqqq$q$q$q$IIc0naW di######## HHHHH&8-JDA2!ME+` ǐ F@*Y'݇0|~>P 6$ΞNt/SƦZ䄖>uCS>Alc n)DDK%C_BjF%;1;$#&1c+qh/Z $M+sD,<1 jyBJ"w%)~6R!Vwme$ uk4RCZ _ZC-, 2(Aev-եr$Zl?$\RǯSg(oG15(?"9xC^ I(zI/08j,- ʩF:-Dvuym@S9FTG&h ^i Hlzzh1}3'  аV .Qq}r, E&,}DVTh8qVɨVYn-4ή63[磻**] AmI@#d7M(q*y*z1|MRr%*}S)7q;D ۄ!XҼ;Ѵlv"v24eIW/71x(~obV^Eaz`O ˩q"Z6\]m*r<4ZK)M,.#7]9N\J6#ViFּ6jꐯ?Hw3Se]33@L|."v 7ǞKn620}5-dZ[X8Q!T'VG38JEvɊU/ũKf)4B:=R> >-*v\Sa7Rz0"&eb%pYݦOWHCrWF$PzG)̕;d1x'\K8 Քhɫ}O6BZ7*?M(<-ӬhV+}JG 8ik^8N Lm Nq*JR ]'OiLeZDV !VjTG(;:’64B jD-h(oUꍄLxqKΪҊ&P-1RȮi<,~8kgpBDtzSAʺ)J>#MT"uL㇫ !nZ\B4J:)M/.0h٩2ޞ'ޝA64BthfZ!qPD #`6O$8RFiAhO-1(Cq 7Cq 7Cq 7Cq 5!,,"Fo!CzF7Cq 7Cy 7Ԇn!zyu>Ƥ5!5!צ 0~Ӈ"ȱ[x©ZCz"""*""""j0UL<u@PޡȡȠn(r(r(r(rrrr<tQa2DqʱʡʡʡʡȡʡȠN(r(r(r(r.nk@T L$Y ¬[0R0iL`$>p} rH$Xх"2x e6:VI3diVCXK>l̴ Ni= J5=\O* |ڞQ7a0`j5M;8:4] pd|R(I=&qQZ]wrQ ?Nh}iK27R.|"V\AktR޹ 88DF ?+5W6vj)q$OYiө=厯T^}uTrH E:b)jwV.Պ~і0b (>Ŷ==$f#V)Ae.((?}*ZpoV )‚~=q}WՓG2A:a6Ld_ u{&W@~J)B+"{LQ![QՂ#8aT^5"֩V[JJHIJ -۫|9jյ 5j;hީռ ΫʪJB_dXX L<$_+ipoRwxWJrBUM.+ss+skܙS^ۧGT.@sgk D^}Zlm*lQKPp6ٸnJ^pIK&`zKVxB-][Z/:4ލə D'._!;ZV"q(BɹA+NufE}Z#4R?!1ۉ`ο]ԅ(VV$+Rg|Z[ny,U+VmUw=nj5X=Tn: =-DqӫA ? f=tm5yk5.Eof\wH6^]LQv-%Jq-#k i)ecVGBL-V_nIVTSLekQd/$%Wjn>yPjPbL8iIcXl)J5g-!Y)-&CƳ1j&Iv>P85EUq&t"ܒR֤j3VnG9x5 ^O3g@/N^y!J޼Ԣ[񓗞OEdYEdYE,X,9mKc93rcUXHvwW5]pњ61h[1Guw-qVUlu݌q rݤ; 2кc!9(=]wߟJ_ԬV'9<>4Diy +yE tޛ![0553JK>vC"ZbЎ-Q22,"Wcf_Qˉ5SċiRK+\̺+7k{f1t4VJN)x#ںخ\-O"g H%NM IҜ} jX1mQ晖8a^GU< :f;~4JlVcqݬ{Y Y+M<*u#>_mB# 9ܮ(H+$v #܎;%EwrnSY `>?mbU%o3C?0.\9xQ}Y՝f/˗.\v]eu$>;\˗.\r˗.\u;>V^^f*\˲.˲r˗.\1+emeYم>Gw\ehZM>S4P2Ş(=vQQN˻~LMlǗҎk[:{_Q^gʮGħ液+͔-5">iEԟvFecD|iɞDIlLvlQ-Efd}O-}ivas.>MSzwyb:-Do/V?[qjF<1]i|?,y9c=޹=ޯ<˽c̻/<˽c;/<ýc;/<ýc̻ޯ<뜰iך6~Q?ԭYRL*G|xcqC VXcs_,vw0xX0xX2zXOw4zXOw2zX0xX(}EN4yFfFJO$j^`\4 ;;nS)%*j4KT]wiIqcZƩW!>.R8fuxv-J]'dzjwNs-Of*R:E-XVg ZTݳĿ0R$O;:y?SIN31,K Pe}JH3Ԅ^@FʪS!;K6mRӆ)=lú5̗ ۂńشA=Mnc֝Tm2TJJS+h0EgC BZJ_6r<g<1TZu,K&ٺTjк˧*RKӮ>$EE-=X`ecx=>\@Z+*KnfF&4lu,@ynug$ց-DF؋.3_ VG_zkmNy VKN*- f,1xԒxt䣠NHjJ*WN :޾X 2Xxy$o*.ʦuICZ(&c#̖әg_nu7Rws+}tTR>fxaV g;gXM ^Lx;<'FTғMK.)M!a2j0}Cw*吹{|UjJpGA\fXp %yJjma TSY/[%O1:jN@bzԜhYa&T &;P%DEuYa*#fNr V*K !(d^q|Ԥe'$?OewlE %IVmŇlHF%/CpL=ވL=U@'uƐ V )HBj:D'<7x M!+ȡ-h_Xr턨L7o~o&P6«) k75VÔ/mckCD{ ^$ l:xK0׎Om}!XE߉KzgCU6j[VBܦb1fCΨ}?ou\@L0k' d߁iTk *'4SPSNƓ` k҅zѪУPzG;)wאnlQ v7@62LUFU(2ZuO,K,d̒] ֦G=lЪpe4n> CeY XrgP澲S!+Ӓ6ԳjHg _(|ÈnP~J'+u#ZNT|TT= d&?u-̝8u6T'(>8U9@G &dL3U([*UgP#=S{<O=چ5qC''CkKG@rONLS>J1 XH;$sN%yU m4~#GH|7 ,Bge.|Ӆ+n)y)^9ζwGÎ=Z=JeGQazZIQyP4(?LéRC,sQu>Q.sÁu W؟ a/Y0 Tył4J[Cs(jS:OZkOWID3 yF*)͗\Xш\a{0/-6RCB KsPErԥTU*wT: i+Kq]8#&_Vԩ B?iWX'ėP⽭%ֽW ?@c؆N5dlSt!F}R˞b綩UEj.$*<J(me@;,1]dA!`}a2iRz7svR[RHjZoEXTA˵xN'd)pV57]ބ°.㫸+9/&9kE7.6Fb2mxsmͼqYVM拚$}FeNxw'=XGn @ã'9.r"@)%4Dxo@(TTA!EFfm' b^[eADf7WaMEds(>-+G({/7DDc%Q pEd&aJʇFRlyw!kp4ޅ@$=Li&Vg&OI:VV2bw-58}ǁ}lɫ$E'[H#TFTޕɘҸ7 L(vOB/d@F/RׅIJ捛)ZeZi R"F+)'Z&_)A옙+YM[͛9bXHl\NƬ2ia.X-(n qŕrBԥ ]HڊMWt'hKXzKzdxIY s$*-VLYZJqMפlbxGatLy4 CɖrX?s¤_e}8}!/>ꒋ.ۄ곃 'EF͔s Բe66@fb~+r43Q3Q:ZVG>ɀ ؜x"ZQO:6&wSt0P$0dJvI+‡,V)9Qp Ru2DPTEdh)F~3uYbjʲ(".+$uFcGqq1z,,ԷRQtřbޞt]1lM6EdQ^S=tz굆qծՙQ۷<}tǘo##OXGj^GXGjXGnXGn]o"Qڣ#F]GXDyLy4xMw6xMw2]1eC]tǘo눞a:;duvvZ}dnXGjXE##GXGlaz;D|GM;:iN;,Xߌ2 uvvQc|GHoHoHoJo4hQP jnj+Pn`zk߁ mzڛڻ񽩿Sr7 jh0=Pp?!%RiJHƯnv^&,mC˺X>09l)T3xQ(C0AXϓzuOf }%%z3`Wa{a˼Յ4cCY3y5sIF(Eq$qI͇J U>W SɌN[=Ih`QPZMR .fYE EʄSI񥾑@ap쨅p s1mH\/-aƣNβX2{V|P= (V|9_zǐǝyMX *(42C(?51.ǀZ+h=]nKkjலl,ޮ O,F~7%>@zzE*% c x4He0NsԆ.>3Oh Calt 1>>Tr ;jOPЮ&{r^TW.:dYlәe<фٸCA'v(zCB;u1=P _9+0>Zg02eXn ZU2}Pj@ *OH{Q#&z p_4:F(8/ZlL&iyG%  D4;T>VO9n>ABDs5 Bҿ2T/(Z K ozCֆۃbzx8 DJsGQ fI.)< }bu 꺂A4fܔ?NP:7Ћ(S$y{7b8ڥ>`k՚ RΥkCfzFN/:9Mz54*Sw&fhN{T,RAA>0 LK9kweK"a^BV^8V`۞nt3B`Ə,ٸj87ap1Pô* pi*!PjCk WS+\;vuoSu>>+ʣDAO)1Mf-1|"- (`hqJq L(5g)aw䁍/+d-3VtCC j#Z̾xNŠCM2qwmL h=;UME\ w}֕X@Y u%\V7h_70 &\dN<(_S_&Dc#e+^nUJp(l|(g&Q^ŝVz;b+|>q%z[EUtsHS0|9lC/pꟓ=& +V;K Ju:25۞#Eye>L0~ӜK/7T.DSl:ؖٔioבpw6)wu&M` K=KWn,B½WM-~WC <<}MZzDbe a5y&]r]Mf^j} su[j>`_6,XX90P`zx/$s#Tȯ2 CЋ3^f<QթzvA;܄WSE3'>d-rNU )\fT0Ŧ j5{ЄR?Zn>;#n|KbzRm&o=W2&.%_o+ /PP,L{ie`:EjRX `B%iZxx4@W8U1Eub=jXJn \, gj"F^_\+@\+KrṛZs0 vEb7Df%[!. q-:/&o4ɞ( :yNWnn6hb rIպ#(]g |a!@. 87t,鬿m>ajr * #rXրyR"M-՛0Ϛ㽇\oå#D6.Z~,X(TV%袔kocZt,CCHAVC1]0S*:#Zvve@Q\t%zE+䗹!E |q/4i0FRMVvm&6=Nv./&U{DSwvhVi^ NӺ/ZkPY (|ͤkhՇwK+Rګ P Gm N{>DOZD75c'߈Hl@DzEsKG@ChC-۹(Xpq h`aUy֦: |V[AA%9Y@4@pݚU})&CpjM[\ULShCPU{e3 x?{d' c5tϖKu3&gL$h\5` "|̦?u,2Ʒ/CMO"vgZEEԚ;FԀ{a A,u7 LB!*?f,{h:54}bIymX KaxNf0w[4yhv}if ' {QO4gC؇5q~O~<'ЏЦ`tOOOCb$[Gb8V{ڿ?HfD=q*t߬gXgDY3^dXQrTACݤοYXb(#E|LNj:1, F{>b;3yn,'m/O.0e7|M~'._\ OsI 2Y|~CɊKyB/re;/<_HT7ӯ#[#п,[|Radq_p~P_|J=_:m6ίCeJ)Dx©%풒astO8[ >xR]tyWgHx1o do<(kˬI\竏|ESFgtD[80],S>^cf2r5z:;zJ[}a̻[& :e'T!ٹO3R&#5\pcfx845" А3:|w%63E<]:b(߮ Roqc&`Aj7c4EQMHvbUy'۱@tyބ,!: ,>XҐ>}?+ρN桌 T맵mPdrR0l~/t}K.{MS/h5!d-'_?}9};KLRR~1ƌʗ 2xɘ{& kC.WM;‘ugGOX'XG(C(s)n *to=GNQ S YGޗ3:5cC)cKQ5;cxG?gq.ȟ XZn7V?&[+,>j ?d(CoiֵRmKG!4hLCϕEa׎'>b3AO*Gn 2UU~~ЏS/B㴥et{J=jϿ& ;Oo)}%J1Qf?,=g31PNmNˊbpCV;_M"k>'@A{f Q(oVhz8Ђ-zq3ҮeQ5 L*ag Ī<&wwɗQZ3F;lO E@eS"N9n*RMIc%->5Y0N}rT S/}!R>R' U+ڞ2ҵLXܯ <)Tqʅ(Yd)񘁌듮N:yNC듬GHxG4䓖N<듮Cu'Ti֝I'TRuHNNy"eeȤHx'R<䈔iGh'?!NǑ[ݖ` ƿYgb~G'Cs2!gQǕΫݝw:vu=y̹aTb;k_Üg)»gQg=={{gUλ݇3ݜG'"O&7QWi=}{?3?3?3gFvr9==={yR^?2ċ_Џ;͐A4 {iB4foD,r. ɘ%| N[ "߂LzUJ<QX%Q!Tk N 5!1)8y:tSWhB-bRJ,' *}6 3ROEIa{d^%αjW:EQaQE.b *T۞zk^ \%U1R4lP3v{v,z;˯S3_HnY_\J>'߁'DM<.)rv8KC5ߟ1dxsyCm^ib,xTJR:>+~ǢO-- z(6'-y?!2:cy|G\uGI}ֽਹ}ev^ٰiWYdQ#,3A5Jʗex̿W\M8&~kC6Tљ#cAm{\ECNn1>,.ҽ+=` V 'iΉ|+8`|Dy_b˚C|o6K>ʙ=a7>vl6" [t Lp.v/;=P?\.B\'Fb z4C}KSQZ"9? wt ҵk}q:߿9gz7fjAHa~fQ mu;J <Y_$LDCGCzj_kĵiirq|zf޸ho~)_K?F`p`,6m57\}` !Z;~dХahyvHx\[2NGc\exi+_.an1E*D!3y 7L4s"R߆Ⱦ"j7F9˟8Λ:l賦ÍNx#Λ:L8YЇGpc̏2u2aÅtJt'E6tYaΛ::e:lC^ |!M_53 4 46:"R p2Q/wi$;\I;p?$7MpyNWA(c?fYTj杞x8e(qΦy&]l0?Cރ8`;o(:skHșt'UDDߪ1#N!] [ݝ!dbv%Y gmؼwtAZLj-1:CٜF~@ Ç/W6HRI/A Aa~BURk=w\.@U+ƕOU#ɬ-76?&hi_.K~^k@!|JS-̧MX_f4=Y+dK@| r|Yp hYh. gY7TRBS$C 4PHLP΍.ɡ#7s<_+ogHtj.t<3 R0+Tj Z{?BK2mk :ɿHkcrWDif裨x+Fʕ*$I\oBr+j{iG uTK: doѯnj@I@-uĥJZAѿbͣy@-tK;J[W4 j)*E_5QgJ([A h껻Wx vS8Fd]j7zB/5LA숲LRY9SP;N0 UfŒj3N?"@?:} P՗EX5 ,OҴ\"!̼ٔ jHFVU(NiDzk!2{K.ǩ4/V+"zewHm0e$ȉM:5W{$b1nKމ҂]gHGeZ+b0`1"(=\JP sT%YU{ze )Pwt V=++_wEAB=OXI蕿1 `p 1Kɥ<j>#(kO$ Ş4*R4Dgo\iQ3^AGJJ~M*- 1EI|@8z4@5z2|Dzs]鐠]@JDUL&# ̐Ȕ-U|tjXĢ1lŕR!ne)sLYfdpuxx]h.RЯ : 颴۳jA`b3THfɿh)M{@ (ͻ9E+Eiv][#J5RCVsIR2rUT9cD ]ceN4B(XaYQ3229\z~ֈd FZKR~SPQ~.]ؕ+k4V,eK )5G2EQ7Exm|QaZ8 L1QV D{ HU~MI`!9R/o[c(_ؐeއe6ܭRTzO5b6]8uFv7kg(z&o%;0Nv5]֍T?\H.*@TϠCFH+).ƮDհct֪e!{۝p^&0񘡵f^Di u}{!(igŻ WA "d;,e\\8%h"!^}$\h6e%Qg#ɠw-7#B,3MZwJ@;*r&,)ev`I%WU&&9Ub% =_a@R՜-&SLiMZȔ#HܕXpS`r XCC8@&L DtJ10i*ޤZ e*]J9c` XO搉Y iƖ$%AFW8T")u+oA蝸tm7xq UXiqYV[Qp< !kGt UKh{0ѬS,Q\ɝrdI@C Ƭ{ gG56YN%cүm8HA]dr}J ;$LL7m)NjIMOIHL T9IytncBj۞ +|艄 ʅ<  \}X4պKeBCIsY%xeîxDTaʥmk-;.21]=S7DVJQ5Qˎp T7ˁQ,a%q\Lgxu:14; D{ȈZQ6guŨ!!:J]0Tk%ޤ52Evpf "֞0˨=5YwR &Rc_`VYE ]um (F[HrX *= s{Ii,=RF`>Ω0tWpXN:0#}G(nfM4.%cbtJ5%YOWbFRF%{EݸnwD9*?sF,#Л* yXgĢ@k :`RѱG7);\̭buݑ/v}+K G(S*Xʠ +:u apf,2*RQOܰ `5qn8hr ]̣_!HmU-͎P\\" 2y ZP`5\,1Yِ+&ixeZyiJ ՚md{@ZU4P@* P[%qUmKev*rԆ L9 V∣pC >5zcM50Ka.5H}Y6%it̰2j'IL%eV0Kܾ,\z]p<`>(ΣARj nn]z ыHKxpt<%fَ,>O&؆I(~+%/"UCV 0*K[شjA݌-̸^LeSTH(-3F%PSHs]'q%fBȺ%aҪeUh%[,xh\d2%>\:/]:&[7+U˂%Ӭt)YoaING@Oh!;̢J{B<˪(qV{Lri@7-~j-*ؘuTԔ6+MBr:C}M? W(T04ӂ(0əc\E_y3ҁB (gЉ( fC%v6 h=|JtR4A-̀U+:M7Qd'3ɩ xIϖ|ߣ1}MY<)Okv%O7y/WhM) ~m'؛^Ϧyޱ~4<π}ƧO>'?)|jz}09? Ym瑟QKUJ TV2BsBCq"+;~"\9PI0uFv!&}CKvyyy yyRY}F U*AN8_0#H;3`|sj]dj/3y<>PԻ|E<3y9<h<8%GsE.60]K>;{}]ٗ>}'_Q|1}G_Q#yY<|N}GyωJ ,Qď)x8V^ef%؃ǫoXрv* ~ s%73$(%R'g# ;CѤM -,QjkfZ;5A;/+[J~j.E3'j7@dއ,ЪQ*2Q˝+KK(x$jpo֠㞝W`ˌNe(ΞЬ~_۽&x, #g3; &w.,P+Tj:L+U Up9 <,i@/A GӜlUKf[zJb@IU>BJS(i  ,0WhJz76lģei]'` ObXDV!1 jҨ4wLO|CTP\vc(s[Nlhu|w[wS.Zg MogLPwŎ:ΑtƎoY$+GKG{T̵H kdƬBV-hmA}@ z++HӴ0\.ր 8ST4*W_OZ1D}C\g;WD=U0GmTS\5Џt}0eہA1]iH)%j!kC=c} zϬ3>"9>?Չ٨+}ب DC?TU2+@{^ 2f4c Ϧ${6xbevxӋL<"H<sAޟ/hsnlzhm} 1 {ؽ/ȭ,N0X  [6Zh>I*brU% HX˜jTu2BReV1i?QXrSܟ2k =Nߨk9.np6u\ c~Tbxq ҺнlY+nbݯC!WAd!jqkkp_G k \rdhW9f<fKC}RWP0D:к0وRRZW&]XX^UPU l12 %#+\ΉX-W L̩ -֍K< KɆUXN$4¨qN2*Lo3%n%۷p%;39KwL%$5u ,Syfju0 `uUo$.4=*XP]oKLƫʹW_FU?/rBIH-M,`P+Ա$83fHCr:g`0:a* ܞW\b+hrЬXf{&ZYL)cNHrxODp!FB;#pMp[qAb+='"??xOD_h <y{YBu'\Y" &{B'GIyG|a#hF1M645˟?FXEO9<@GиɄ?aϹlXưc{C9#5W({=89ϹN}/>id9 jZ\\=J?LɌBܥ=nc+<)}1~_p<$}+>痟sϹ?9 >gs-m/ܛ߫#/ϡGHe]XDZ%迨*yzl,v&Qdfдrb\(Tt8;o5;=_p~S,lː:J$P&4J mqn#ok@og? /oj,Jy37)^)"@(tAzPx+THAd)`NsQxY9blP™QAJhҍ\6X< $2[.zCQs 0E^,.-r-'kGxR.ev;˺w(r/q3Z}a)sF .\8(qO,,N]0zփ{bh޷wutcgnt>Z758JKkSimð>=,F"e5Vgڇp!ss߃փWi/2Ʊ*INx(hypW~ocyL*}Gj;FQ(6j ųyKP,c~WH]~E19.#i-5NS;KN8O8τA?$ؿȢ^w!Iy `I{?9sBfz!7]Vcji CE (m2o/ePe.yAоSz/Y7{~L1cGAmF5co_I@G<^SiWДBg5qٴ&=ZY@5mՋK@l^tR2տ>؈ V`p1>t[0,Q15[oMVkVz|h(ŵ  MԞBP{Z򖃑H{1.,m亭4 \R[wpC%։C/o/u>~X@et3}^ WşPYoˬ p:|{t K\`;L8]AF klq"d .Ȗk//oVU >VQsV ̦Nm v%՛ZAvEug`zPh.D"v6JfvWHXsDAQ}V?[pO K#Ij[צ5"tٕzO Wk>蜙b-#cPrգ?b@rnǍu] YUo #inu,N z:TIJ4XRSUL22ls4A=cdMs S ^hREw=U5B$2Bȴt݃c6cqwcrf߈=:fz]1 ˪~^&M{j:>r:з lAb7X*>%m"noZ8`F4BM m`NMNVN[U εMyeưXoqXm`Lip`{UuWWޤ+BqMm4_tTIw(ai+/%B=Lم_Kq0Oȸu߫mZSkJ "XVCKSMTl vnx(r?R%Q]T]"o}Fv ;{0*ӭNwued|@J iO`_Y1;E0Qy3@bKn'wKǰ9BU,m& D: "#ywa$NR";%i(iop UHk?19L=#rc?0:Cu{NCuӜ/aL ?3{GWcSL?`.;i{NtX3(P.: دh× DŽ"U`91aO6 c<F0m 4᧎!7<>?realtimebattle-1.0.8/include/0002755000175000017500000000000010404234035014270 5ustar moimoirealtimebattle-1.0.8/include/Messagetypes.h0000644000175000017500000001644310170545357017134 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __MESSAGETYPES__ #define __MESSAGETYPES__ enum message_to_robot_type { UNKNOWN_MESSAGE_TO_ROBOT = -1, INITIALIZE, YOUR_NAME, YOUR_COLOUR, // BIN_DATA_TO, // ASCII_DATA_TO, // LOAD_DATA_FINISHED, GAME_OPTION, GAME_STARTS, RADAR, INFO, COORDINATES, ROBOT_INFO, ROTATION_REACHED, ENERGY, ROBOTS_LEFT, COLLISION, WARNING, DEAD, GAME_FINISHES, // SAVE_DATA, EXIT_ROBOT }; enum message_from_robot_type { UNKNOWN_MESSAGE_FROM_ROBOT = -1, ROBOT_OPTION, NAME, COLOUR, // LOAD_DATA, ROTATE, ROTATE_TO, ROTATE_AMOUNT, SWEEP, ACCELERATE, BRAKE, BREAK, SHOOT, PRINT, DEBUG, DEBUG_LINE, DEBUG_CIRCLE // BIN_DATA_FROM, // ASCII_DATA_FROM, // SAVE_DATA_FINISHED }; enum argument_type { NONE, STRING, DOUBLE, INT, HEX // BINDATA }; enum warning_type { UNKNOWN_MESSAGE=0, PROCESS_TIME_LOW=1, // ENERGY_LOW, //VARIABLE_OUT_OF_RANGE, MESSAGE_SENT_IN_ILLEGAL_STATE=2, UNKNOWN_OPTION=3, OBSOLETE_KEYWORD=4, NAME_NOT_GIVEN=5, COLOUR_NOT_GIVEN=6 }; enum game_option_type { ROBOT_MAX_ROTATE=0, ROBOT_CANNON_MAX_ROTATE=1, ROBOT_RADAR_MAX_ROTATE=2, ROBOT_MAX_ACCELERATION=3, ROBOT_MIN_ACCELERATION=4, ROBOT_START_ENERGY=5, ROBOT_MAX_ENERGY=6, ROBOT_ENERGY_LEVELS=7, SHOT_SPEED=8, SHOT_MIN_ENERGY=9, SHOT_MAX_ENERGY=10, SHOT_ENERGY_INCREASE_SPEED=11, TIMEOUT=12, DEBUG_LEVEL=13, // 0 - no debug, 5 - highest debug level SEND_ROBOT_COORDINATES= 14 // 0 - no coordinates, // 1 - coordniates are given relative the starting position // 2 - absolute coordinates }; enum robot_option_type { SIGNAL=2, // 0 - no signal, > 1 - signal to send (e.g. SIGUSR1 or SIGUSR2) SEND_SIGNAL=0, // 0 - false, 1 - true SEND_ROTATION_REACHED=1, // 0 - no messages // 1 - messages when RotateTo and RotateAmount finished // 2 - messages also when sweep direction is changed USE_NON_BLOCKING=3 // 0 - false, 1 - true // This option should always be sent as soon as possible }; enum object_type { NOOBJECT = -1, ROBOT = 0, SHOT = 1, WALL = 2, COOKIE = 3, MINE = 4, LAST_OBJECT_TYPE = 5 }; static const int number_of_object_types = 5; struct Message { char* msg; int number_of_args; enum argument_type arg_type[4]; }; static const struct Message message_to_robot[25] = { {"Initialize", 1, {INT, NONE, NONE, NONE}}, // arg: if 1 this is the first sequence for the robot, send name and colour!! {"YourName", 1, {STRING, NONE, NONE, NONE}}, // arg: previous name, send new name only if you don't like it {"YourColour", 1, {HEX, NONE, NONE, NONE}}, // arg: previous colour // {"BinData", 2, {INT, BINDATA,NONE, NONE}}, // {"AsciiData", 1, {STRING, NONE, NONE, NONE}}, // {"LoadDataFinished",0, {NONE,NONE, NONE, NONE}}, {"GameOption", 2, {INT, DOUBLE, NONE, NONE}}, // arg 1: OPTION_NR, arg 2: value {"GameStarts", 0, {NONE, NONE, NONE, NONE}}, {"Radar", 3, {DOUBLE, INT, DOUBLE, NONE}}, // first arg: distance, second arg: object_type, third arg: radar_angle {"Info", 3, {DOUBLE, DOUBLE, DOUBLE, NONE}}, // first arg: time, second arg: speed, third arg: cannon_angle {"Coordinates",3, {DOUBLE, DOUBLE, DOUBLE, NONE}}, // first arg: x, second arg: y, third arg: angle {"RobotInfo", 2, {DOUBLE, INT, NONE, NONE}}, // first arg: Other robots energylevel, second arg: enemy - 0, teammate - 1 {"RotationReached",1,{INT, NONE, NONE, NONE}}, // first arg: what has finished rotation (see Rotate below) {"Energy", 1, {DOUBLE, NONE, NONE, NONE}}, // arg: energylevel {"RobotsLeft", 1, {INT, NONE, NONE, NONE}}, // arg: robots left {"Collision", 2, {INT, DOUBLE, NONE, NONE}}, // first arg: object_type, second arg: collision angle {"Warning", 2, {INT, STRING, NONE, NONE}}, // first arg: warning_type, second arg: string {"Dead", 0, {NONE, NONE, NONE, NONE}}, // Robot died {"GameFinishes",0,{NONE, NONE, NONE, NONE}}, // {"SaveData", 0, {NONE, NONE, NONE, NONE}}, {"ExitRobot", 0, {NONE, NONE, NONE, NONE}}, {"", 0, {}} }; static const struct Message message_from_robot[25] = { {"RobotOption", 2, {INT, INT}}, // arg 1: OPTION_NR, arg 2: value {"Name", 1, {STRING}}, // arg: name {"Colour", 2, {HEX, HEX}}, // first arg: home colour, second arg: away colour // {"LoadData", 1, {INT}}, // arg: type of data, 0 - binary, 1 - ascii {"Rotate", 2, {INT, DOUBLE}}, // first arg: what to rotate: 1 Robot, 2 cannon, 4 radar and apropriate sums for combinations // second arg: angular velocity (rad/s) {"RotateTo", 3, {INT, DOUBLE, DOUBLE}}, // first and second arg: as in 'Rotate', third arg: angle to move to {"RotateAmount", 3, {INT, DOUBLE, DOUBLE}}, // first and second arg: as in 'Rotate', third arg: angle to rotate {"Sweep", 4, {INT, DOUBLE, DOUBLE, DOUBLE}}, // first and second arg: as in 'Rotate', but only cannon and radar // third arg: left_angle, fourth arg: right_angle (relative robot) {"Accelerate", 1, {DOUBLE}}, // arg: accelerate (m/s^2) {"Brake", 1, {DOUBLE}}, // arg: brake precentage, 0 = no brake, 1 = full brake {"Break", 1, {DOUBLE}}, // Wrong spelling, included for compabillity reasons. {"Shoot", 1, {DOUBLE}}, // arg: amount of energy {"Print", 1, {STRING}}, // arg: message to print {"Debug", 1, {STRING}}, // arg: debug message {"DebugLine", 4, {DOUBLE, DOUBLE, DOUBLE, DOUBLE}}, // arg1,2: startpoint angle, radius (relative robot) // arg3,4: endpoint angle, radius (relative robot) {"DebugCircle", 3, {DOUBLE, DOUBLE, DOUBLE}}, // arg1,2: centerpoint angle, radius (relative robot) // arg3: circle radius // {"BinData", 2, {INT, BINDATA}}, // first arg: number of bytes, second arg: data // {"AsciiData", 1, {STRING}}, // arg: data // {"SaveDataFinished",0, {}}, {"", 0, {}} }; #endif realtimebattle-1.0.8/include/Makefile.am0000644000175000017500000000130510313540141016316 0ustar moimoi## Process this file with automake to produce Makefile.in ## Created by Anjuta, heavy modified by Johannes Nicolai ## If you don't want it to overwrite it, ## Please disable it in the Anjuta project configuration pkginclude_HEADERS = \ Messagetypes.h EXTRA_DIST = \ ControlWindow.h\ IntlDefs.h\ Options.h\ Various.h\ ArenaRealTime.h\ ArenaReplay.h\ ArenaController.h\ ArenaBase.h\ Gui.h\ Vector2D.h\ Structs.h\ Timer.h\ Shape.h\ Extras.h\ Shot.h\ Wall.h\ Robot.h\ MessageWindow.h\ ArenaWindow.h\ GeometricalObjects.h\ MovingObject.h\ OptionsWindow.h\ fdstream.h\ ScoreWindow.h\ StatisticsWindow.h\ Dialog.h\ StartTournamentWindow.h\ getopt.h\ Broadcast.h\ ClientInterface.h realtimebattle-1.0.8/include/Makefile.in0000644000175000017500000003530010324167713016345 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = include DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = 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)$(pkgincludedir)" pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ pkginclude_HEADERS = \ Messagetypes.h EXTRA_DIST = \ ControlWindow.h\ IntlDefs.h\ Options.h\ Various.h\ ArenaRealTime.h\ ArenaReplay.h\ ArenaController.h\ ArenaBase.h\ Gui.h\ Vector2D.h\ Structs.h\ Timer.h\ Shape.h\ Extras.h\ Shot.h\ Wall.h\ Robot.h\ MessageWindow.h\ ArenaWindow.h\ GeometricalObjects.h\ MovingObject.h\ OptionsWindow.h\ fdstream.h\ ScoreWindow.h\ StatisticsWindow.h\ Dialog.h\ StartTournamentWindow.h\ getopt.h\ Broadcast.h\ ClientInterface.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu include/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)" @list='$(pkginclude_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ 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: $(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) @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 $(HEADERS) installdirs: for dir in "$(DESTDIR)$(pkgincludedir)"; 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-pkgincludeHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ ctags distclean distclean-generic 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-pkgincludeHEADERS install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am \ uninstall-pkgincludeHEADERS # 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: realtimebattle-1.0.8/include/ControlWindow.h0000644000175000017500000001441510222311110017240 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __CONTROL_WINDOW__ #define __CONTROL_WINDOW__ #ifdef HAVE_CONFIG_H # include #endif #ifndef NO_GRAPHICS #include using namespace std; struct _GtkWidget; typedef struct _GtkWidget GtkWidget; union _GdkEvent; struct _GtkAdjustment; typedef struct _GtkAdjustment GtkAdjustment; typedef union _GdkEvent GdkEvent; typedef void* gpointer; struct dialog_result_t; class ControlWindow { public: enum displayed_t { NO_WIDGETS, DEBUG_WIDGETS, REPLAY_WIDGETS }; ControlWindow ( const int default_width = -1, const int default_height = -1, const int default_x_pos = -1, const int default_y_pos = -1 ); ~ControlWindow (); void set_window_title ( const string& text ); void remove_replay_widgets (); void clear_extra_widgets (); void display_debug_widgets (); void display_replay_widgets (); static void delete_event_occured ( GtkWidget* widget, GdkEvent* event, class ControlWindow* cw_p ); static void quit_rtb ( GtkWidget* widget, class ControlWindow* cw_p ); static void pause ( GtkWidget* widget, class ControlWindow* cw_p ); static void step ( GtkWidget* widget, gpointer data ); static void end_game ( GtkWidget* widget, gpointer data ); static void kill_robot ( GtkWidget* widget, gpointer data ); static void change_debug_level ( GtkAdjustment *adj, class ControlWindow* cw_p ); static void end_clicked ( GtkWidget* widget, gpointer data ); static void end_tournament ( int result ); static void options_clicked ( GtkWidget* widget, class ControlWindow* cw_p ); static void statistics_clicked ( GtkWidget* widget, class ControlWindow* cw_p ); static void new_tournament ( GtkWidget* widget, class ControlWindow* cw_p ); static void replay_tournament ( GtkWidget* widget, class ControlWindow* cw_p ); static void arena_window_toggle ( GtkWidget* widget, class ControlWindow* cw_p ); static void message_window_toggle( GtkWidget* widget, class ControlWindow* cw_p ); static void score_window_toggle ( GtkWidget* widget, class ControlWindow* cw_p ); static void replay ( GtkWidget* widget, class ControlWindow* cw_p ); static void rewind_pressed ( GtkWidget* widget, class ControlWindow* cw_p ); static void rewind_released ( GtkWidget* widget, class ControlWindow* cw_p ); static void fast_forward_pressed ( GtkWidget* widget, class ControlWindow* cw_p ); static void fast_forward_released( GtkWidget* widget, class ControlWindow* cw_p ); static void step_forward ( GtkWidget* widget, class ControlWindow* cw_p ); static void step_backward ( GtkWidget* widget, class ControlWindow* cw_p ); static void next_game ( GtkWidget* widget, class ControlWindow* cw_p ); static void prev_game ( GtkWidget* widget, class ControlWindow* cw_p ); static void next_seq ( GtkWidget* widget, class ControlWindow* cw_p ); static void prev_seq ( GtkWidget* widget, class ControlWindow* cw_p ); static void dummy ( GtkWidget* widget, class ControlWindow* cw_p ) {} static void change_current_replay_time( GtkAdjustment *adj, class ControlWindow* cw_p ); static void destroy_filesel ( GtkWidget* widget, class ControlWindow* cw_p ); static void kill_and_open_filesel( int result ); void open_replay_filesel (); displayed_t get_displayed () { return displayed; } GtkWidget* get_filesel () { return filesel; } GtkWidget* get_window_p () { return window_p; } bool is_arenawindow_checked (); bool is_messagewindow_checked (); bool is_scorewindow_checked (); GtkWidget* get_show_arena_menu_item() { return show_arena_menu_item; } GtkWidget* get_show_message_menu_item() { return show_message_menu_item; } GtkWidget* get_show_score_menu_item() { return show_score_menu_item; } void set_filesel ( GtkWidget* fs ) { filesel = fs; } void set_progress_time ( const double time ); void change_time_limitations (); private: GtkWidget* window_p; GtkWidget* debug_level; GtkWidget* filesel; GtkWidget* window_hbox; GtkWidget* vseparator; GtkWidget* extra_vbox; GtkWidget* show_arena_menu_item; GtkWidget* show_message_menu_item; GtkWidget* show_score_menu_item; GtkWidget* time_control; GtkAdjustment* current_replay_time_adjustment; displayed_t displayed; }; #endif #endif realtimebattle-1.0.8/include/IntlDefs.h0000644000175000017500000000261010170545357016162 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __INTLDEFS__ #define __INTLDEFS__ #ifdef HAVE_CONFIG_H #include #endif #ifdef ENABLE_NLS # include # define _(str) dgettext("RealTimeBattle",str) # ifdef gettext_noop # define N_(str) gettext_noop(str) # else # define N_(str) (str) # endif #else # define _(str) (str) # define N_(str) (str) # define gettext(str) (str) # define dgettext(dom,str) (str) # define dcgettext(dom,str,type) (str) # define textdomain(str) (str) # define bindtextdomain(dom,dir) (dom) #endif #endif realtimebattle-1.0.8/include/Options.h0000644000175000017500000001535310222311110016065 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __OPTIONS__ #define __OPTIONS__ #include "Various.h" class OptionsWindow; #ifndef NO_GRAPHICS struct _GtkWidget; typedef struct _GtkWidget GtkWidget; #endif enum option_double_t { OPTION_GRAV_CONST, OPTION_AIR_RESISTANCE, OPTION_ROLL_FRICTION, OPTION_SLIDE_FRICTION, OPTION_ROBOT_MAX_ACCELERATION, OPTION_ROBOT_MIN_ACCELERATION, OPTION_ROBOT_RADIUS, OPTION_ROBOT_MASS, OPTION_ROBOT_BOUNCE_COEFF, OPTION_ROBOT_HARDNESS, OPTION_ROBOT_PROTECTION, OPTION_ROBOT_FRONT_BOUNCE_COEFF, OPTION_ROBOT_FRONT_HARDNESS, OPTION_ROBOT_FRONT_PROTECTION, OPTION_ROBOT_FRONTSIZE, OPTION_ROBOT_START_ENERGY, OPTION_ROBOT_MAX_ENERGY, OPTION_ROBOT_MAX_ROTATE, OPTION_ROBOT_CANNON_MAX_ROTATE, OPTION_ROBOT_RADAR_MAX_ROTATE, OPTION_SHOT_RADIUS, OPTION_SHOT_SPEED, OPTION_SHOOTING_PENALTY, OPTION_SHOT_MIN_ENERGY, OPTION_SHOT_MAX_ENERGY, OPTION_SHOT_ENERGY_INCREASE_SPEED, OPTION_COOKIE_MAX_ENERGY, OPTION_COOKIE_MIN_ENERGY, OPTION_COOKIE_FREQUENCY, OPTION_COOKIE_RADIUS, OPTION_MINE_MAX_ENERGY, OPTION_MINE_MIN_ENERGY, OPTION_MINE_FREQUENCY, OPTION_MINE_RADIUS, OPTION_ARENA_SCALE, OPTION_FAST_FORWARD_FACTOR, OPTION_TIMEOUT, OPTION_MAX_TIMESTEP, OPTION_TIMESCALE, OPTION_UPDATE_INTERVAL, OPTION_ROBOT_STARTUP_TIME, OPTION_CPU_START_LIMIT, OPTION_CPU_EXTRA, OPTION_CPU_PERIOD, OPTION_CPU_WARNING_PERCENT, OPTION_CHECK_INTERVAL, LAST_DOUBLE_OPTION }; enum option_long_t { OPTION_SEND_ROBOT_COORDINATES, OPTION_MAX_ROBOTS_ALLOWED, OPTION_ROBOT_ENERGY_LEVELS, OPTION_BACKGROUND_COLOUR, OPTION_FOREGROUND_COLOUR, OPTION_RTB_MESSAGE_COLOUR, OPTION_COOKIE_COLOUR, OPTION_MINE_COLOUR, OPTION_LOG_EVERY_NTH_UPDATE_INTERVAL, OPTION_ARENA_WINDOW_SIZE_X, OPTION_ARENA_WINDOW_SIZE_Y, OPTION_ARENA_WINDOW_POS_X, OPTION_ARENA_WINDOW_POS_Y, OPTION_CONTROL_WINDOW_POS_X, OPTION_CONTROL_WINDOW_POS_Y, OPTION_MESSAGE_WINDOW_SIZE_X, OPTION_MESSAGE_WINDOW_SIZE_Y, OPTION_MESSAGE_WINDOW_POS_X, OPTION_MESSAGE_WINDOW_POS_Y, OPTION_SCORE_WINDOW_SIZE_X, OPTION_SCORE_WINDOW_SIZE_Y, OPTION_SCORE_WINDOW_POS_X, OPTION_SCORE_WINDOW_POS_Y, OPTION_STATISTICS_WINDOW_SIZE_X, OPTION_STATISTICS_WINDOW_SIZE_Y, LAST_LONG_OPTION }; enum option_string_t { OPTION_ROBOT_SEARCH_PATH, OPTION_ARENA_SEARCH_PATH, OPTION_TMP_RTB_DIR, LAST_STRING_OPTION }; enum option_bool_t { LAST_BOOL_OPTION }; enum pages_in_options_t { PAGE_ENVIRONMENT, PAGE_ROBOT, PAGE_SHOT, PAGE_EXTRAS, PAGE_TIME, PAGE_SIZE_OF_WINDOWS, PAGE_MISC, LAST_PAGE }; template struct option_info_t { option_info_t() {} option_info_t(const entry_datatype_t d, const pages_in_options_t p, const T v, const T mn, const T mx, const int l, const bool bo, const bool lo, const string& s, const string& t ) : datatype(d), page(p), value(v), default_value(v), min_value(mn), max_value(mx), max_letters_in_entry(l), broadcast_option(bo), log_option(lo), label(s), translated_label(t) {} option_info_t& operator=(const option_info_t& n) { datatype=n.datatype; page=n.page; value=n.value; default_value=n.default_value; min_value=n.min_value; max_value=n.max_value; max_letters_in_entry=n.max_letters_in_entry; broadcast_option=n.broadcast_option; log_option=n.log_option; label=n.label;translated_label=n.translated_label; #ifndef NO_GRAPHICS entry=n.entry; #endif return *this; } entry_datatype_t datatype; pages_in_options_t page; T value; T default_value; T min_value; T max_value; int max_letters_in_entry; bool broadcast_option; bool log_option; string label; string translated_label; #ifndef NO_GRAPHICS GtkWidget * entry; #endif }; struct option_return_t { option_return_t( const entry_datatype_t d, const int n ) : datatype(d), option_number(n) {} option_return_t& operator=( const option_return_t& n ) { datatype = n.datatype; option_number = n.option_number; return *this; } entry_datatype_t datatype; int option_number; }; class Options { public: Options (); ~Options () {} //static void set_options(); inline double get_d ( option_double_t option ) { return all_double_options[option].value; } inline long get_l ( option_long_t option ) { return all_long_options[option].value; } inline const string get_s ( option_string_t option ) { return all_string_options[option].value; } // inline bool get_b ( option_bool_t option ) // { return all_bool_options[option].value; } void broadcast_opts (); void log_all_options (); void save_all_options_to_file ( string filename, const bool as_default ); void get_options_from_rtbrc (); void read_options_file ( string file_string, const bool as_default ); option_info_t* get_all_double_options() { return all_double_options; } option_info_t* get_all_long_options () { return all_long_options; } option_info_t* get_all_string_options() { return all_string_options; } option_return_t get_option_from_string ( const string& option_name ); #ifndef NO_GRAPHICS OptionsWindow* get_optionswindow_p () { return optionswindow_p; } bool is_optionswindow_up (); void open_optionswindow (); void close_optionswindow (); #endif private: option_info_t all_double_options[LAST_DOUBLE_OPTION]; option_info_t all_long_options[LAST_LONG_OPTION]; option_info_t all_string_options[LAST_STRING_OPTION]; // option_info_t all_bool_options[LAST_BOOL_OPTION]; #ifndef NO_GRAPHICS OptionsWindow* optionswindow_p; #endif }; #endif realtimebattle-1.0.8/include/Various.h0000644000175000017500000000654610276173044016113 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __VARIOUS__ #define __VARIOUS__ #ifndef NO_GRAPHICS # include #include # include # include #endif #include "Dialog.h" struct start_tournament_info_t; typedef void (*StartTournamentFunction)( const list&, const list&, const int, const int, const int, void* ); #define min_rtb(a,b) ((a) < (b) ? (a) : (b)) #define max_rtb(a,b) ((a) > (b) ? (a) : (b)) #define abs_rtb(a) ((a) > 0 ? (a) : -(a)) #define sgn_rtb(a) ((a) > 0 ? 1 : -1) enum entry_datatype_t { ENTRY_INT, ENTRY_DOUBLE, ENTRY_HEX, ENTRY_CHAR, ENTRY_BOOL }; struct entry_t { entry_t(entry_datatype_t d, bool s) : datatype(d), allow_sign(s) {} entry_datatype_t datatype; bool allow_sign; }; void Error(const bool fatal, const string& error_msg, const string& function_name); void Quit(const bool success = true); static void ok_click(int result) {} int factorial(const int n); int binomial(const int n, const int k); void reorder_pointer_array(void** array, int size); void read_dirs_from_system(list& robotdirs, list& arenadirs); void split_colonseparated_dirs(string& dirs, list& arenadirs); bool check_if_filename_is_robot(const string& fname, bool* err_in_file ); bool check_if_filename_is_arena( string& fname, bool* err_in_file ); bool check_logfile( string& fname ); void check_for_robots_and_arenas( string& word, list& tour_list, list& dir_list, const bool check_robots ); void search_directories( string directory, list& tour_list, const bool check_robots ); bool parse_tournament_file( const string& fname, const StartTournamentFunction function, void* data, bool fatal_error_on_file_failure = true ); void create_tmp_rtb_dir(); #ifndef NO_GRAPHICS void entry_handler( GtkWidget * entry, entry_t * entry_info ); GdkColor make_gdk_colour(const long col); int long gdk2hex_colour(const GdkColor& col); gint int_compare(GtkCList *clist, gconstpointer row1, gconstpointer row2); gint float_compare(GtkCList *clist, gconstpointer row1, gconstpointer row2); gint string_case_sensitive_compare(GtkCList *clist, gconstpointer row1, gconstpointer row2); gint string_case_insensitive_compare(GtkCList *clist, gconstpointer row1, gconstpointer row2); #endif #endif realtimebattle-1.0.8/include/ArenaRealTime.h0000644000175000017500000000626010235455701017123 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __ARENA_REALTIME__ #define __ARENA_REALTIME__ #include "ArenaBase.h" class ArenaRealTime : public ArenaBase { public: ArenaRealTime(); virtual ~ArenaRealTime(); void clear(); bool timeout_function(); static void start_tournament_from_tournament_file ( const list& robotfilename_list, const list& arenafilename_list, const int robots_p_game, const int games_p_sequence, const int n_o_sequences, ArenaRealTime* ar_p ); void start_tournament(const list& robotfilename_list, const list& arenafilename_list, const int robots_p_game, const int games_p_sequence, const int n_o_sequences); bool end_game(); void broadcast(enum message_to_robot_type ...); bool parse_arena_file(string& filename); void set_filenames( string& log_fname, const string& statistics_fname, const string& tournament_fname, string& message_fname, const string& option_fname ); void print_to_logfile( char first_letter ... ); bool get_use_message_file() { return use_message_file; } Vector2D get_random_position(); vector get_arena_filenames() { return arena_filenames; } int get_current_arena_nr() { return current_arena_nr; } int set_debug_level( const int new_level); int get_max_debug_level() { return max_debug_level; } void quit_ordered(); long int find_free_colour(const long int home_colour, const long int away_colour, const class Robot*, const bool random_colours = false); private: void check_initialization(); void update(); void update_robots(); void read_robot_messages(); void check_robots(); void add_cookie(); void add_mine(); bool is_colour_allowed(const long int col, const double min_dist, const class Robot*); double colour_dist(const long int col1, const long int col2); bool start_game(); void start_sequence(); void end_sequence(); bool start_sequence_follow_up(); void end_sequence_follow_up(); void end_tournament(); string tournament_file_name; ofstream LOG_FILE; bool use_log_file; int update_count_for_logging; int** robots_in_sequence; double next_check_time; int number_of_arenas; int current_arena_nr; }; #endif realtimebattle-1.0.8/include/ArenaReplay.h0000644000175000017500000000742610235455701016662 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __ARENA_REPLAY__ #define __ARENA_REPLAY__ #include "ArenaBase.h" #include "fstream" using namespace std; class ArenaReplay : public ArenaBase { public: struct object_pos_info_t { object_pos_info_t( object_type o, int i, Vector2D p, float s, float e, Vector2D v ) : obj(o), id(i), pos(p), start_time(s), end_time(e), vel(v) {} object_pos_info_t( object_type o, int i, Vector2D p, float s, float e ) : obj(o), id(i), pos(p), start_time(s), end_time(e) {} object_type obj; int id; Vector2D pos; float start_time; float end_time; Vector2D vel; // For shots }; // enum speed_t { REWIND, PLAY, FAST_FORWARD }; ArenaReplay (); ~ArenaReplay (); bool timeout_function (); void start_tournament (); bool end_game (); void set_filenames ( string& replay_fname, string& message_fname, const string& statistics_fname, const string& option_fname ); void change_speed ( const bool forward, const bool fast ); void change_game ( const int inc_game, const int inc_seq ); bool step_forward ( const int n_o_steps, const bool clear_time = true ); void step_forward_or_backward(const bool forward ); void change_replay_time ( const double time ); char search_forward ( const string& search_letters ); string search_forward ( const list& search_strings ); string search_backwards ( const string& search_letters ); double get_current_replay_time() { return current_replay_time; } double get_length_of_current_game(); bool is_log_from_stdin () { return log_from_stdin; } private: void update (); bool start_game (); void start_sequence (); void end_sequence (); void end_tournament (); char parse_log_line (); void parse_log_line_forward ( const char first_letter ); void parse_log_line_rewind ( const char first_letter ); void parse_this_interval (); void parse_this_time_index (); void beginning_of_prev_line (); void beginning_of_current_line(); void recreate_lists (); void make_statistics_from_file(); void get_time_positions_in_game(); int find_streampos_for_time ( const float cur_time ); object_pos_info_t* find_object_in_log( object_type obj, int id ); ifstream log_file; // double last_replay_time; double current_replay_time; bool log_from_stdin; // speed_t speed; double fast_forward_factor; streampos** game_position_in_log; struct time_pos_info_t { streampos pos; float time; }; list object_positions_in_log; time_pos_info_t* time_position_in_log; int last_time_info; // These three vars are used when creating the arena double arena_scale; double arena_angle_factor; int arena_succession; }; #endif realtimebattle-1.0.8/include/ArenaController.h0000644000175000017500000000275310222311110017524 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __ARENA_CONTROLLER__ #define __ARENA_CONTROLLER__ #include "ArenaBase.h" class ArenaController { public: ArenaController(); ~ArenaController(); void start_realtime_arena(); void start_replay_arena(); void close_arena(); ArenaBase* get_the_arena() { return my_arena; } bool is_started() { return started; } bool is_realtime() { return realtime; } private: bool started; bool realtime; ArenaBase* my_arena; public: // global names etc. string option_filename; string statistics_filename; string log_filename; string tournament_filename; string message_filename; string replay_filename; int game_mode; int debug_level; bool auto_start_and_end; }; #endif realtimebattle-1.0.8/include/ArenaBase.h0000644000175000017500000001362610246642245016302 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __ARENA_BASE__ #define __ARENA_BASE__ #ifdef HAVE_CONFIG_H # include #endif #ifndef NO_GRAPHICS #include #include #endif #include #include #include #include using namespace std; #ifndef NO_GRAPHICS #include "Gui.h" #endif #include "Vector2D.h" #include "Messagetypes.h" #include "Structs.h" #include "Timer.h" #include "Shape.h" class ArenaController; class ArenaRealTime; class ArenaReplay; extern ArenaController the_arena_controller; #define the_arena (*( the_arena_controller.get_the_arena()) ) #define realtime_arena (*( (ArenaRealTime*) (the_arena_controller.get_the_arena()) )) #define replay_arena (*( (ArenaReplay*) (the_arena_controller.get_the_arena()) )) class Robot; class Options; class WallLine; class WallCircle; class WallInnerCircle; static const double infinity_rtb = 1.0e10; //approximately ;-) static const int max_debug_level = 5; extern class Options the_opts; //extern class ArenaRealTime the_arena; #ifndef NO_GRAPHICS extern class Gui the_gui; #endif extern bool no_graphics; class ArenaBase { public: ArenaBase(); virtual ~ArenaBase(); enum game_mode_t { DEBUG_MODE, NORMAL_MODE, COMPETITION_MODE }; double get_shortest_distance(const Vector2D& pos, const Vector2D& vel, const double size, enum object_type& closest_shape, Shape*& colliding_object, const class Robot* the_robot = NULL ); bool space_available(const Vector2D& pos, const double margin); virtual void interrupt_tournament(); virtual bool timeout_function() = 0; virtual bool end_game() = 0; protected: virtual void update() = 0; virtual bool start_game() = 0; virtual void start_sequence() = 0; virtual void end_sequence() = 0; virtual void end_tournament() = 0; public: void delete_lists(const bool kill_robots, const bool del_seq_list, const bool del_tourn_list, const bool del_arena_filename_list, const bool del_robot_obj_list=true); void save_statistics_to_file(string filename); list* get_object_lists() { return object_lists; } list* get_all_robots_in_sequence() { return &all_robots_in_sequence; } list* get_all_robots_in_tournament() { return &all_robots_in_tournament; } string get_current_arena_filename() { return current_arena_filename; } int get_game_nr() { return game_nr; } int get_games_per_sequence() { return games_per_sequence; } int get_sequence_nr() { return sequence_nr; } int get_sequences_in_tournament() { return sequences_in_tournament; } int get_robots_per_game() { return robots_per_game; } int get_number_of_robots() { return number_of_robots; } void print_message( const string& messager, const string& text ); int get_robots_left() { return robots_left; } double get_total_time() { return (double)total_time; } double get_shooting_penalty(); int increase_robot_count() { return robot_count++; } int increase_shot_count() { return shot_count++; } int increase_cookie_count() { return cookie_count++; } int increase_mine_count() { return mine_count++; } state_t get_state() { return state; } Vector2D * get_boundary() { return boundary; } enum game_mode_t get_game_mode() { return game_mode; } void set_game_mode( const enum game_mode_t gm ); int get_debug_level() { return debug_level; } bool is_max_debug_level() { return debug_level == max_debug_level; } virtual int set_debug_level( const int new_level); void pause_game_toggle(); void step_paused_game(); protected: void update_timer( const double factor = 1.0 ); void reset_timer(); void move_shots(const double time_period); void move_shots_no_check(const double time_period); bool parse_arena_line(ifstream& file, double& scale, int& succession, double& angle_factor); void set_state( const state_t ); bool find_object_by_id(list& obj_list, list::iterator & li, const int obj_id); bool find_object_by_id(list& obj_list, list::iterator & li, const int obj_id); list object_lists[LAST_OBJECT_TYPE]; list all_robots_in_tournament; list all_robots_in_sequence; list exclusion_points; string current_arena_filename; vector arena_filenames; // list of Strings string statistics_file_name; string option_file_name; ofstream message_file; bool use_message_file; int robot_count; int shot_count; int cookie_count; int mine_count; double timestep; double total_time; double current_timer; Timer timer; int game_nr; int games_per_sequence; int sequence_nr; int sequences_in_tournament; int number_of_robots; int robots_per_game; int robots_left; int robots_killed_this_round; Vector2D boundary[2]; // {top-left, bottom-right} state_t state; game_mode_t game_mode; int debug_level; bool halt_next; bool pause_after_next_game; }; #endif realtimebattle-1.0.8/include/Gui.h0000644000175000017500000000652110222311110015153 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __GUI__ #define __GUI__ #ifndef NO_GRAPHICS #include class ArenaWindow; class MessageWindow; class ScoreWindow; class StatisticsWindow; class StartTournamentWindow; class Robot; class Gui { public: Gui(); ~Gui() {} void set_colours(); GdkColor* get_bg_gdk_colour_p () { return &bg_gdk_colour; } GdkColor* get_fg_gdk_colour_p () { return &fg_gdk_colour; } GdkColor* get_rtb_message_gdk_colour_p () { return &rtb_message_gdk_colour; } long int get_bg_rgb_colour () { return bg_rgb_colour; } long int get_fg_rgb_colour () { return fg_rgb_colour; } long int get_rtb_message_rgb_colour () { return rtb_message_rgb_colour; } bool is_arenawindow_up () { return ( arenawindow_p != NULL ); } ArenaWindow* get_arenawindow_p () { return arenawindow_p; } void open_arenawindow (); void close_arenawindow (); bool is_messagewindow_up () { return ( messagewindow_p != NULL ); } MessageWindow* get_messagewindow_p () { return messagewindow_p; } void open_messagewindow (); void close_messagewindow (); bool is_scorewindow_up () { return ( scorewindow_p != NULL ); } ScoreWindow* get_scorewindow_p () { return scorewindow_p; } void open_scorewindow (); void close_scorewindow (); bool is_statisticswindow_up () { return ( statisticswindow_p != NULL ); } StatisticsWindow* get_statisticswindow_p () { return statisticswindow_p; } void open_statisticswindow (); void close_statisticswindow (); bool is_starttournamentwindow_up () { return ( starttournamentwindow_p != NULL ); } StartTournamentWindow* get_starttournament_p () { return starttournamentwindow_p; } static void kill_and_start_new_tournament ( int result ); void open_starttournamentwindow (); void close_starttournamentwindow (); private: long int bg_rgb_colour; long int fg_rgb_colour; long int rtb_message_rgb_colour; GdkColor bg_gdk_colour; GdkColor fg_gdk_colour; GdkColor rtb_message_gdk_colour; ArenaWindow* arenawindow_p; MessageWindow* messagewindow_p; ScoreWindow* scorewindow_p; StatisticsWindow* statisticswindow_p; StartTournamentWindow* starttournamentwindow_p; }; #endif #endif realtimebattle-1.0.8/include/Vector2D.h0000644000175000017500000000632510222311111016062 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __VECTOR2D__ #define __VECTOR2D__ #include using namespace std; class Vector2D { public: Vector2D() { vector[0] = 0.0; vector[1] = 0.0; } Vector2D(const Vector2D& v) { vector[0] = v.vector[0]; vector[1] = v.vector[1]; } Vector2D(const double x, const double y) { vector[0] = x; vector[1] = y; } ~Vector2D() {} friend Vector2D operator+(const Vector2D&, const Vector2D&); inline friend Vector2D operator-(const Vector2D&, const Vector2D&); friend Vector2D operator-(const Vector2D&); Vector2D& operator=(const Vector2D&); friend int operator==(const Vector2D&, const Vector2D&); //friend double operator*(const Vector2D&, const Vector2D&); friend Vector2D operator*(const Vector2D&, const double); friend Vector2D operator*(const double, const Vector2D&); friend Vector2D operator/(const Vector2D&, const double); friend ostream& operator<<(ostream&, const Vector2D&); friend istream& operator>>(istream&, Vector2D&); Vector2D& operator+=(const Vector2D&); Vector2D& operator-=(const Vector2D&); Vector2D& operator*=(const double); Vector2D& operator/=(const double); double operator[](int) const; friend double length(const Vector2D&); inline friend double lengthsqr(const Vector2D&); friend double vec2angle(const Vector2D&); friend Vector2D angle2vec(const double); Vector2D& normalize(); friend Vector2D unit(const Vector2D&); inline friend double vedge(const Vector2D&, const Vector2D&); inline friend double dot(const Vector2D&, const Vector2D&); friend Vector2D rotate(const Vector2D&, const double angle); friend Vector2D rotate90(const Vector2D&); private: double vector[2]; Vector2D& copy_vector(const Vector2D&); }; // The following functions are critical for the speed of RTB and // are therefore inlined inline Vector2D operator-(const Vector2D& vec1, const Vector2D& vec2) { return( Vector2D( vec1.vector[0] - vec2.vector[0], vec1.vector[1] - vec2.vector[1] ) ); } inline double dot(const Vector2D& vec1, const Vector2D& vec2) { return( vec1.vector[0] * vec2.vector[0] + vec1.vector[1] * vec2.vector[1] ); } inline double vedge(const Vector2D& vec1, const Vector2D& vec2) { return( vec1.vector[0]*vec2.vector[1] - vec1.vector[1]*vec2.vector[0] ); } inline double lengthsqr(const Vector2D& vec) { return( vec.vector[0]*vec.vector[0] + vec.vector[1]*vec.vector[1] ); } #endif realtimebattle-1.0.8/include/Structs.h0000644000175000017500000000506210222311111016076 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __STRUCTS__ #define __STRUCTS__ #ifndef NO_GRAPHICS # include #endif #include using namespace std; struct stat_t { stat_t(int s, int g, int pos, double p, double t, double tp) : sequence_nr(s), game_nr(g), position(pos), points(p), time_survived(t), total_points(tp) {} int sequence_nr; int game_nr; int position; double points; double time_survived; double total_points; }; enum rotation_mode_t { NORMAL_ROT, SWEEP_LEFT, SWEEP_RIGHT, ROTATE_TO_RIGHT, ROTATE_TO_LEFT }; struct rotation_t { rotation_t() : pos(0), vel(0), left(0), right(0), mode(NORMAL_ROT) {} rotation_t(const double p, const double v, const double l, const double r, const rotation_mode_t m) : pos(p), vel(v), left(l), right(r), mode(m) {} void set_rot(const double p, const double v, const double l, const double r, const rotation_mode_t m) { pos=p; vel=v; left=l; right=r; mode=m; } double pos; double vel; double left; double right; rotation_mode_t mode; }; enum state_t { NO_STATE, NOT_STARTED, STARTING_ROBOTS, GAME_IN_PROGRESS, PAUSING_BETWEEN_GAMES, PAUSED, BEFORE_GAME_START, SHUTTING_DOWN_ROBOTS, FINISHED, EXITING }; struct start_tournament_info_t { start_tournament_info_t(const int r, const bool s, const string fn, const string dir) : row(r), selected(s), filename(fn), directory(dir) {} int row; bool selected; string filename; string directory; }; #ifndef NO_GRAPHICS struct pixmap_t { pixmap_t() : pixmap(NULL), window(NULL) {} ~pixmap_t(); void set_pixmap(GdkColor& col, GdkWindow* win); void get_pixmap(GdkColor& col, GdkWindow* win, GdkPixmap*& pixm, GdkBitmap*& bitm); GdkPixmap* pixmap; GdkWindow* window; GdkBitmap* bitmap; }; #endif #endif realtimebattle-1.0.8/include/Timer.h0000644000175000017500000000245310170545357015537 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __TIMER__ #define __TIMER__ #ifdef HAVE_CONFIG_H # include #endif #ifdef TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif # include #include class Timer { public: Timer(); ~Timer() {} double get(); void reset(); unsigned int get_random_seed() { return (unsigned int)start.tv_usec; } private: struct timeval start; //struct timeval end; }; #endif realtimebattle-1.0.8/include/Shape.h0000644000175000017500000000610610170545357015516 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __SHAPE__ #define __SHAPE__ class Vector2D; #ifndef NO_GRAPHICS #include #include #endif /* Shape is the base class for all objects in the arena. The class hierarchy is as follows: --------- | Shape | --------- _____/ | \_____________ / | \ -------- ---------- --------------- | Line | | Circle | | InnerCircle | -------- ---------- --------------- | | | \ \ | | | \ \ ------------ | | -------------- ------------------- | WallLine | / | | WallCircle | | WallInnerCircle | ------------ / \ -------------- ------------------- / \ ---------- ---------------- | Extras | | MovingObject | ---------- ---------------- / \ | \ / \ | \ ---------- -------- -------- --------- | Cookie | | Mine | | Shot | | Robot | ---------- -------- -------- --------- */ class Shape { public: Shape(); Shape(int long colour); virtual ~Shape() {} virtual double get_distance(const Vector2D& pos, const Vector2D& vel, const double size) = 0; virtual bool within_distance(const Vector2D& pos, const double size) = 0; virtual Vector2D get_normal(const Vector2D& pos) = 0; int get_id() { return id; } long int get_rgb_colour() { return rgb_colour; } double get_bounce_coeff() { return bounce_coeff; } double get_hardness_coeff() { return hardness_coeff; } // virtual arenaobject_t get_arenaobject_t() = 0; // friend void bounce_on_wall(class Robot& robot, const class Shape& wall, const Vector2D& normal); #ifndef NO_GRAPHICS virtual void draw_shape(bool erase) = 0; GdkColor& get_gdk_colour() { return gdk_colour; } void set_colour(const GdkColor& gdk_colour); #endif void set_colour(const long int colour); protected: #ifndef NO_GRAPHICS GdkColor gdk_colour; #endif long int rgb_colour; double bounce_coeff; double hardness_coeff; int id; }; #endif realtimebattle-1.0.8/include/Extras.h0000644000175000017500000000331710170545357015725 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __EXTRAS__ #define __EXTRAS__ #include "GeometricalObjects.h" // --------------------- Extras : Circle --------------------- class Extras : public Circle { public: Extras(const Vector2D& c, const double r, const double e, const long int col); ~Extras() {} bool is_alive() { return alive; } virtual void die(); double get_energy() { return energy; } protected: double energy; bool alive; char log_file_char; }; // --------------------- Cookie : Extras --------------------- class Cookie : public Extras { public: Cookie(const Vector2D& c, const double e, const int c_id = -1); ~Cookie() {} // arenaobject_t get_arenaobject_t() { return COOKIE; } }; // --------------------- Mine : Extras --------------------- class Mine : public Extras { public: Mine(const Vector2D& c, const double e, const int m_id = -1); ~Mine() {} // arenaobject_t get_arenaobject_t() { return MINE; } }; #endif realtimebattle-1.0.8/include/Shot.h0000644000175000017500000000266710170545357015403 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __SHOT__ #define __SHOT__ #include "MovingObject.h" class Shot : public MovingObject { public: Shot(const Vector2D& c, const Vector2D& velocity, const double energy, const int shot_id = -1); ~Shot() {} void move(const double timestep); void move_no_check(const double timestep); void die(); bool is_alive() { return alive; } double get_energy() { return energy; } friend void shot_collision(Shot* shot1p, Shot* shot2p); friend void shot_collision(Shot* shot1p, const Vector2D& shot2_vel, const double shot2_en); // arenaobject_t get_arenaobject_t() { return SHOT; } private: bool alive; double energy; }; #endif realtimebattle-1.0.8/include/Wall.h0000644000175000017500000000362010170545357015353 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __WALL__ #define __WALL__ #include "GeometricalObjects.h" class WallCircle : public Circle { public: WallCircle(const Vector2D& c, const double r, const double b_c, const double hardn) : Circle(c, r) { bounce_coeff = b_c; hardness_coeff = hardn; } ~WallCircle() {} }; class WallInnerCircle : public InnerCircle { public: WallInnerCircle(const Vector2D& c, const double r, const double b_c, const double hardn) : InnerCircle(c, r) { bounce_coeff = b_c; hardness_coeff = hardn; } ~WallInnerCircle() {} }; class WallLine : public Line { public: WallLine(const Vector2D& sp, const Vector2D& d, const double len, const double th, const double b_c, const double hardn) : Line(sp, d, len, th) { bounce_coeff = b_c; hardness_coeff = hardn; } ~WallLine() {} }; class WallArc : public Arc { public: WallArc(const Vector2D& c, const double& r1, const double& r2, const double a1, const double a2, const double b_c, const double hardn) : Arc(c, r1, r2, a1, a2) { bounce_coeff = b_c; hardness_coeff = hardn; } ~WallArc() {} }; #endif realtimebattle-1.0.8/include/Robot.h0000644000175000017500000001467110321270010015524 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __ROBOT__ #define __ROBOT__ #ifndef NO_GRAPHICS # include #endif #include #include #include #include #include using namespace std; #include "Messagetypes.h" #include "Structs.h" #include "MovingObject.h" #include "fdstream.h" class Robot : public MovingObject { public: Robot(const string& filename); Robot(const int r_id, const long int col, const string& name); ~Robot(); //arenaobject_t get_arenaobject_t() { return ROBOT; } void move(const double timestep); void change_velocity(const double timestep); void update_radar_and_cannon(const double timestep); bool update_rotation(rotation_t& angle, const double timestep); void bounce_on_wall(const double bounce_c, const double hardness_c, const Vector2D& normal); friend void bounce_on_robot(Robot& robot1, Robot& robot2, const Vector2D& normal); void change_energy(const double energy_diff); void change_position( const double x, const double y, const double robot_a, const double cannon_a, const double radar_a, const double en ); void check_name_uniqueness(); void get_messages(); void send_message(enum message_to_robot_type ...); void set_values_before_game(const Vector2D& pos, double angle); void set_values_at_process_start_up(); void set_stats(const int robots_killed_same_time, const bool timeout=false); void set_stats(const double pnts, const int pos, const double time_survived, const bool make_stats); bool is_dead_but_stats_not_set() { return dead_but_stats_not_set; } bool is_networked() { return network_robot; } void start_process(); bool is_process_running(); void check_process(); void update_cpu_time_used(); void reset_cpu_time(); void send_signal(); void end_process(); void delete_pipes(); void kill_process_forcefully(); void live(); void die(); string get_robot_name() { return robot_name; } string get_robot_filename() { return robot_filename; } bool is_alive() { return alive; } double get_energy() { return energy; } pid_t get_pid() { return pid; } list* get_statistics() { return &statistics; } boost::fdostream* get_outstreamp() { return outstreamp; } int get_position_this_game() { return position_this_game; } double get_total_points(); // void add_points(double pts) { points_this_game += pts; total_points += pts; } // bool get_died_this_round() { return died_this_round; } int get_last_position(); bool is_colour_given() { return colour_given; } void set_colour_given( const bool c ) { colour_given = c; } bool is_name_given() { return name_given; } list::const_iterator get_current_game_stats(); rotation_t get_robot_angle() { return robot_angle; } bool set_and_get_has_competed() { if( has_competed ) return true; else { has_competed = true; return false; } } bool isRobotInTeam() const; const string& getTeamName() const; #ifndef NO_GRAPHICS int get_row_in_score_clist() { return row_in_score_clist; } void get_score_pixmap( GdkWindow* win, GdkPixmap*& pixm, GdkBitmap*& bitm ); void get_stat_pixmap( GdkWindow* win, GdkPixmap*& pixm, GdkBitmap*& bitm ); void set_row_in_score_clist( int row ) { row_in_score_clist = row; } void reset_last_displayed(); void display_score(); void draw_radar_and_cannon(); #endif private: message_from_robot_type name2msg_from_robot_type(char*); void move(const double timestep, int iterstep, const double eps); bool check_state_for_message(const message_from_robot_type msg_t, const enum state_t state1, const enum state_t state2 = NO_STATE); // void save_data(const bool bin, const bool rewrite); // void load_data(const bool bin); bool get_default_non_blocking_state(); void set_non_blocking_state(const bool use_non_blocking); bool alive; bool process_running; bool send_usr_signal; int signal_to_send; int send_rotation_reached; bool has_competed; double energy; double extra_air_resistance; double brake_percent; rotation_t robot_angle; rotation_t cannon_angle; rotation_t radar_angle; double acceleration; double shot_energy; Vector2D start_pos; double start_angle; Vector2D last_drawn_robot_center; double last_drawn_radar_angle; double last_drawn_cannon_angle; list statistics; int robot_name_uniqueness_number; string plain_robot_name; // Name given by robot string robot_name; // plain_robot_name + uniqueness number string robot_filename; // Filename with path string robot_plain_filename; // Filename without path bool colour_given; bool name_given; //class String robot_dir; // double total_points; // double points_this_game; int position_this_game; double time_survived_in_sequence; bool dead_but_stats_not_set; double cpu_used; double cpu_limit; double cpu_warning_limit; double cpu_timeout; double last_cpu; boost::fdistream* instreamp; boost::fdostream* outstreamp; int pipes[2]; pid_t pid; bool network_robot; list message_list; // For use by a network robot list::const_iterator current_game_stats; bool current_game_stats_set; bool use_non_blocking; int row_in_score_clist; int last_displayed_energy; int last_displayed_place; int last_displayed_last_place; long last_displayed_score; string teamname; string bufferstreamstring; istringstream bufferstream; char streambuffer [4097]; bool inteam; #ifndef NO_GRAPHICS pixmap_t score_pixmap; pixmap_t stat_pixmap; #endif // way to determine whether we can kill the robots static bool kill_robots; }; #endif realtimebattle-1.0.8/include/MessageWindow.h0000644000175000017500000000541310222311110017202 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __MESSAGE_WINDOW__ #define __MESSAGE_WINDOW__ #ifdef HAVE_CONFIG_H # include #endif #include using namespace std; struct _GtkWidget; typedef struct _GtkWidget GtkWidget; union _GdkEvent; typedef union _GdkEvent GdkEvent; class MessageWindow { public: MessageWindow ( const int default_width = -1, const int default_height = -1, const int default_x_pos = -1, const int default_y_pos = -1 ); ~MessageWindow (); void set_window_title (); void add_message ( const string& name_of_messager, const string& message ); static gboolean hide_window ( GtkWidget* widget, GdkEvent* event, class MessageWindow* messagewindow_p ); static void show_window ( GtkWidget* widget, class MessageWindow* messagewindow_p ); // warning Do not use the widget variable. It may be NULL. static void clear_clist ( GtkWidget* widget, class MessageWindow* messagewindow_p ); static void show_one_robot ( GtkWidget* widget, class MessageWindow* messagewindow_p ); static void show_all ( GtkWidget* widget, class MessageWindow* messagewindow_p ); void freeze_clist (); void thaw_clist (); void set_viewed_robot ( class Robot* robot_p ); void set_window_shown ( bool win_shown ); GtkWidget* get_window_p () { return window_p; } bool is_window_shown () { return window_shown; } GtkWidget* get_clist () { return clist; } private: GtkWidget* window_p; GtkWidget* clist; Robot* viewed_robot; GtkStyle* rtb_message_row_style; GtkStyle* robot_message_row_style; bool window_shown; }; #endif realtimebattle-1.0.8/include/ArenaWindow.h0000644000175000017500000001244210170545357016674 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __ARENA_WINDOW__ #define __ARENA_WINDOW__ #ifdef HAVE_CONFIG_H # include #endif #ifndef NO_GRAPHICS #include "Vector2D.h" struct _GtkWidget; typedef struct _GtkWidget GtkWidget; union _GdkEvent; typedef union _GdkEvent GdkEvent; struct _GdkEventKey; typedef struct _GdkEventKey GdkEventKey; struct _GdkEventExpose; typedef struct _GdkEventExpose GdkEventExpose; struct _GdkColor; typedef struct _GdkColor GdkColor; typedef void* gpointer; typedef int gint; class ArenaWindow { public: ArenaWindow ( const int default_width = -1, const int default_height = -1, const int default_x_pos = -1, const int default_y_pos = -1 ); ~ArenaWindow (); void set_window_title (); static gboolean hide_window ( GtkWidget* widget, GdkEvent* event, class ArenaWindow* arenawindow_p ); static void show_window ( GtkWidget* widget, class ArenaWindow* arenawindow_p ); static void no_zoom ( GtkWidget* widget, class ArenaWindow* arenawindow_p ); static void zoom_in ( GtkWidget* widget, class ArenaWindow* arenawindow_p ); static void zoom_out ( GtkWidget* widget, class ArenaWindow* arenawindow_p ); static gint redraw ( GtkWidget* widget, GdkEventExpose* event, class ArenaWindow* arenawindow_p ); static gint keyboard_handler ( GtkWidget *widget, GdkEventKey *event, class ArenaWindow* arenawindow_p ); inline int boundary2pixel_x ( const double x ); inline int boundary2pixel_y ( const double y ); void clear_area (); void draw_everything (); void draw_moving_objects ( const bool clear_objects_first ); void drawing_area_scale_changed ( const bool change_da_value = false ); void draw_circle ( const Vector2D& center, const double radius, GdkColor& colour, const bool filled ); void draw_arc ( const Vector2D& center, const double inner_radius, const double outer_radius, const double angle1, const double angle2, GdkColor& colour ); void draw_line ( const Vector2D& start, const Vector2D& direction, const double length, const double thickness, GdkColor& colour ); void draw_line ( const Vector2D& start, const Vector2D& direction, const double length, GdkColor& colour ); void draw_rectangle ( const Vector2D& start, const Vector2D& end, GdkColor& colour, const bool filled ); GtkWidget* get_drawing_area () { return drawing_area; } GtkWidget* get_scrolled_window () { return scrolled_window; } GtkWidget* get_window_p () { return window_p; } bool is_window_shown () { return window_shown; } void set_window_shown ( bool win_shown ); int get_zoom () { return zoom; } void set_zoom ( int z ) { zoom = z; } double get_drawing_area_scale () { return drawing_area_scale; } private: GtkWidget* window_p; GtkWidget* scrolled_window; GtkWidget* drawing_area; Vector2D scrolled_window_size; int zoom; // The zoom when pressed on one of the zoombuttons double drawing_area_scale; bool window_shown; }; #include "ArenaController.h" inline int ArenaWindow::boundary2pixel_x( const double x ) { return (int)( ( x - the_arena.get_boundary()[0][0] ) * drawing_area_scale + 0.5 ); } inline int ArenaWindow::boundary2pixel_y( const double y ) { return (int)( ( the_arena.get_boundary()[1][1] - y ) * drawing_area_scale + 0.5 ); } #endif #endif realtimebattle-1.0.8/include/GeometricalObjects.h0000644000175000017500000001105010170545357020215 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __GEOMETRICAL_OBJECTS__ #define __GEOMETRICAL_OBJECTS__ #include "Shape.h" #include "Vector2D.h" // --------------------- Line : Shape --------------------- class Line : public Shape { public: Line(); Line(const Vector2D& sp, const Vector2D& d, const double len, const double th); Line(const Vector2D& sp, const Vector2D& d, const double len, const double th, const double b_c, const double hardn); virtual ~Line() {} double get_distance(const Vector2D& pos, const Vector2D& vel, const double size); bool within_distance(const Vector2D& pos, const double size); Vector2D get_normal(const Vector2D& pos); #ifndef NO_GRAPHICS void draw_shape(bool erase); #endif Vector2D get_start_point() { return start_point; } Vector2D get_direction() { return direction; } double get_length() { return length; } double get_thickness() { return thickness; } protected: Vector2D start_point; Vector2D direction; double length; double thickness; Vector2D last_drawn_start_point; Vector2D last_drawn_direction; double last_drawn_length; double last_drawn_thickness; }; // --------------------- Circle : Shape --------------------- class Circle : public Shape { public: Circle(); Circle(const Vector2D& c, const double r); Circle(const Vector2D& c, const double r, const long int col); Circle(const Vector2D& c, const double r, const double b_c, const double hardn); virtual ~Circle() {} double get_distance(const Vector2D& pos, const Vector2D& dir, const double size); bool within_distance(const Vector2D& pos, const double size); Vector2D get_normal(const Vector2D& pos); #ifndef NO_GRAPHICS void draw_shape(bool erase); #endif double get_radius() { return radius; } Vector2D get_center() { return center; } protected: Vector2D center; double radius; Vector2D last_drawn_center; double last_drawn_radius; }; // --------------------- InnerCircle : Shape --------------------- class InnerCircle : public Shape { public: InnerCircle(); InnerCircle(const Vector2D& c, const double r); // InnerCircle(const Vector2D& c, const double r, const double b_c, const double hardn); ~InnerCircle() {} double get_distance(const Vector2D& pos, const Vector2D& dir, const double size); bool within_distance(const Vector2D& pos, const double size); Vector2D get_normal(const Vector2D& pos); #ifndef NO_GRAPHICS void draw_shape(bool erase); #endif double get_radius() { return radius; } Vector2D get_center() { return center; } protected: Vector2D center; double radius; Vector2D last_drawn_center; double last_drawn_radius; }; // --------------------- Arc : Shape --------------------- class Arc : public Shape { public: Arc(); Arc(const Vector2D& c, const double r1, const double r2, const double a1, const double a2 ); // Arc(const Vector2D& c, const double r1, const double r2, // const double a1, const double a2, // const double b_c, const double hardn); ~Arc() {} double get_distance(const Vector2D& pos, const Vector2D& dir, const double size); bool within_distance(const Vector2D& pos, const double size); Vector2D get_normal(const Vector2D& pos); #ifndef NO_GRAPHICS void draw_shape(bool erase); #endif double get_inner_radius() { return inner_radius; } double get_outer_radius() { return outer_radius; } Vector2D get_center() { return center; } double get_start_angle() { return start_angle; } double get_end_angle() { return end_angle; } protected: Vector2D center; double inner_radius; double outer_radius; // angles should be between -pi and pi double start_angle; double end_angle; Vector2D last_drawn_center; // double last_drawn_radius; private: bool within_angle( const double a); double mid_radiussqr; }; #endif realtimebattle-1.0.8/include/MovingObject.h0000644000175000017500000000225410170545357017044 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __MOVING_OBJECT__ #define __MOVING_OBJECT__ class Vector2D; #include "GeometricalObjects.h" class MovingObject : public Circle { public: MovingObject() {} MovingObject(const Vector2D& c, const double r, const Vector2D& vel) : Circle(c, r), velocity(vel) {} ~MovingObject() {} virtual void move(const double timestep) = 0; protected: Vector2D velocity; }; #endif realtimebattle-1.0.8/include/OptionsWindow.h0000644000175000017500000001124510222311110017251 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __OPTIONS_WINDOW__ #define __OPTIONS_WINDOW__ #ifdef HAVE_CONFIG_H # include #endif #ifndef NO_GRAPHICS struct _GtkWidget; typedef struct _GtkWidget GtkWidget; union _GdkEvent; typedef union _GdkEvent GdkEvent; typedef void* gpointer; template struct option_info_t; struct entry_t; class Options; class OptionsWindow { private: struct button_t { string label; bool used; GtkSignalFunc func; gpointer data; }; public: OptionsWindow ( const int default_width = -1, const int default_height = -1, const int default_x_pos = -1, const int default_y_pos = -1 ); ~OptionsWindow (); void add_option_to_notebook ( GtkWidget* description_table, GtkWidget* entry_table, GtkWidget* button_table, int row, string description, GtkWidget* entry, string entry_text, entry_t* info, button_t* buttons ); void update_all_gtk_entries (); void set_all_options (); static void default_opts ( GtkWidget* widget, class OptionsWindow* optionswindow_p ); static void load ( GtkWidget* widget, class OptionsWindow* optionswindow_p ); static void save ( GtkWidget* widget, class OptionsWindow* optionswindow_p ); static void save_def ( GtkWidget* widget, class OptionsWindow* optionswindow_p ); static void apply ( GtkWidget* widget, class OptionsWindow* optionswindow_p ); static void ok ( GtkWidget* widget, class OptionsWindow* optionswindow_p ); static void cancel ( GtkWidget* widget, class OptionsWindow* optionswindow_p ); static void delete_event_occured( GtkWidget* widget, GdkEvent* event, class OptionsWindow* optionswindow_p ); static void load_options ( GtkWidget* widget, class OptionsWindow* optionswindow_p ); static void save_options ( GtkWidget* widget, class OptionsWindow* optionswindow_p ); static void destroy_filesel ( GtkWidget* widget, class OptionsWindow* optionswindow_p ); static void grab_windows ( GtkWidget* widget, class OptionsWindow* optionswindow_p ); static void double_min ( GtkWidget* widget, option_info_t* option ); static void double_def ( GtkWidget* widget, option_info_t* option ); static void double_max ( GtkWidget* widget, option_info_t* option ); static void long_min ( GtkWidget* widget, option_info_t* option ); static void long_def ( GtkWidget* widget, option_info_t* option ); static void long_max ( GtkWidget* widget, option_info_t* option ); static void string_def ( GtkWidget* widget, option_info_t* option ); GtkWidget* get_window_p () { return window_p; } private: GtkWidget* get_filesel () { return filesel; } void set_filesel ( GtkWidget* fs ) { filesel = fs; } GtkWidget* window_p; GtkWidget* filesel; }; #endif #endif realtimebattle-1.0.8/include/fdstream.h0000644000175000017500000001123710202667062016256 0ustar moimoi/* The following code declares classes to read from and write to * file descriptore or file handles. * * See * http://www.josuttis.com/cppcode * for details and the latest version. * * - open: * - integrating BUFSIZ on some systems? * - optimized reading of multiple characters * - stream for reading AND writing * - i18n * * (C) Copyright Nicolai M. Josuttis 2001. * Permission to copy, use, modify, sell and distribute this software * is granted provided this copyright notice appears in all copies. * This software is provided "as is" without express or implied * warranty, and with no claim as to its suitability for any purpose. * * Version: Jul 28, 2002 * History: * Mar 27, 2003: resolved problems with gcc-2.95 * changes for RTB (MrF) * Jul 28, 2002: bugfix memcpy() => memmove() * fdinbuf::underflow(): cast for return statements * Aug 05, 2001: first public version */ #ifndef BOOST_FDSTREAM_HPP #define BOOST_FDSTREAM_HPP #include // for EOF: #include // for memmove(): #include // low-level read and write functions #ifdef _MSC_VER # include #else # include //extern "C" { // int write (int fd, const char* buf, int num); // int read (int fd, char* buf, int num); //} #endif using namespace std; // BEGIN namespace BOOST namespace boost { /************************************************************ * fdostream * - a stream that writes on a file descriptor ************************************************************/ class fdoutbuf : public std::streambuf { protected: int fd; // file descriptor public: // constructor fdoutbuf (int _fd) : fd(_fd) { } protected: // write one character virtual int overflow (int c) { if (c != EOF) { char z = c; if (write (fd, &z, 1) != 1) { return EOF; } } return c; } // write multiple characters virtual std::streamsize xsputn (const char* s, std::streamsize num) { return write(fd,s,num); } }; class fdostream : public std::ostream { protected: fdoutbuf buf; public: fdostream (int fd) : std::ostream(0), buf(fd) { rdbuf(&buf); } }; /************************************************************ * fdistream * - a stream that reads on a file descriptor ************************************************************/ class fdinbuf : public std::streambuf { protected: int fd; // file descriptor protected: /* data buffer: * - at most, pbSize characters in putback area plus * - at most, bufSize characters in ordinary read buffer */ static const int pbSize = 4; // size of putback area static const int bufSize = 1024; // size of the data buffer char buffer[bufSize+pbSize]; // data buffer public: /* constructor * - initialize file descriptor * - initialize empty data buffer * - no putback area * => force underflow() */ fdinbuf (int _fd) : fd(_fd) { setg (buffer+pbSize, // beginning of putback area buffer+pbSize, // read position buffer+pbSize); // end position } protected: // insert new characters into the buffer virtual int underflow () { #ifndef _MSC_VER using std::memmove; #endif // is read position before end of buffer? if (gptr() < egptr()) { return *gptr(); } /* process size of putback area * - use number of characters read * - but at most size of putback area */ int numPutback; numPutback = gptr() - eback(); if (numPutback > pbSize) { numPutback = pbSize; } /* copy up to pbSize characters previously read into * the putback area */ memmove (buffer+(pbSize-numPutback), gptr()-numPutback, numPutback); // read at most bufSize new characters int num; num = read (fd, buffer+pbSize, bufSize); if (num <= 0) { // ERROR or EOF return EOF; } // reset buffer pointers setg (buffer+(pbSize-numPutback), // beginning of putback area buffer+pbSize, // read position buffer+pbSize+num); // end of buffer // return next character return *gptr(); } }; class fdistream : public std::istream { protected: fdinbuf buf; public: fdistream (int fd) : std::istream(0), buf(fd) { rdbuf(&buf); } }; } // END namespace boost #endif /*BOOST_FDSTREAM_HPP*/ realtimebattle-1.0.8/include/ScoreWindow.h0000644000175000017500000000514110170545357016717 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __SCORE_WINDOW__ #define __SCORE_WINDOW__ #ifdef HAVE_CONFIG_H # include #endif #ifndef NO_GRAPHICS struct _GtkWidget; typedef struct _GtkWidget GtkWidget; union _GdkEvent; typedef union _GdkEvent GdkEvent; struct _GdkEventButton; typedef struct _GdkEventButton GdkEventButton; typedef int gint; typedef void* gpointer; class Robot; class ScoreWindow { public: ScoreWindow ( const int default_width = -1, const int default_height = -1, const int default_x_pos = -1, const int default_y_pos = -1 ); ~ScoreWindow (); void set_window_title (); void add_robots (); void update_robots (); static gboolean hide_window ( GtkWidget* widget, GdkEvent* event, class ScoreWindow* scorewindow_p ); static void show_window ( GtkWidget* widget, class ScoreWindow* scorewindow_p ); static void new_robot_selected ( GtkWidget* clist, gint row, gint column, GdkEventButton *event, class ScoreWindow* scorewindow_p ); GtkWidget* get_window_p () { return window_p; } GtkWidget* get_clist () { return clist; } Robot* get_selected_robot () { return selected_robot; } bool is_window_shown () { return window_shown; } void set_selected_robot ( Robot* rp ) { selected_robot = rp; } void set_window_shown ( bool r ) { window_shown = r; } private: bool window_shown; GtkWidget* window_p; GtkWidget* clist; Robot* selected_robot; }; #endif #endif realtimebattle-1.0.8/include/StatisticsWindow.h0000644000175000017500000001061410170545357017777 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __STATISTICS_WINDOW__ #define __STATISTICS_WINDOW__ #ifdef HAVE_CONFIG_H # include #endif #ifndef NO_GRAPHICS struct _GtkWidget; typedef struct _GtkWidget GtkWidget; union _GdkEvent; typedef union _GdkEvent GdkEvent; typedef void* gpointer; class Robot; struct stat_t; class StatisticsWindow { public: enum stat_types { STAT_TYPE_TOTAL, STAT_TYPE_SEQUENCE, STAT_TYPE_GAME, STAT_TYPE_ROBOT }; struct change_type_data_t { change_type_data_t ( const stat_types t, class StatisticsWindow* p ) : type(t), sw_p(p) {} stat_types type; StatisticsWindow* sw_p; }; struct change_stat_data_t { change_stat_data_t ( const int c, const bool e, class StatisticsWindow* p ) : change(c), extreme_change(e), sw_p(p) {} int change; bool extreme_change; StatisticsWindow* sw_p; }; StatisticsWindow ( const int default_width = -1, const int default_height = -1, const int default_x_pos = -1, const int default_y_pos = -1 ); ~StatisticsWindow (); void make_title_button (); void add_new_row ( Robot* robot_p, stat_t average_stat, int games_played ); static void delete_event_occured ( GtkWidget* widget, GdkEvent* event, class StatisticsWindow* sw_p ); static void exit ( GtkWidget* widget, class StatisticsWindow* sw_p ); static void save ( GtkWidget* widget, class StatisticsWindow* sw_p ); static void save_stats ( GtkWidget* widget, class StatisticsWindow* sw_p ); static void destroy_filesel ( GtkWidget* widget, class StatisticsWindow* sw_p ); static void change_table_type ( GtkWidget* widget, struct change_type_data_t* info_p ); static void change_stats_viewed ( GtkWidget* widget, struct change_stat_data_t* info_p ); static void add_the_statistics_to_clist( GtkWidget* widget, class StatisticsWindow* sw_p ); static void change_sorting_in_clist( GtkCList *clist, gint column, class StatisticsWindow* sw_p ); static void row_selected ( GtkWidget* clist, gint row, gint column, GdkEventButton *event, class StatisticsWindow* sw_p ); GtkWidget* get_window_p () { return window_p; } GtkWidget* get_clist () { return clist; } enum stat_types get_type () { return type; } int get_looking_at_nr () { return looking_at_nr; } void set_looking_at_nr ( const int number ) { looking_at_nr = number; } void set_type ( stat_types t ) { type = t; } private: GtkWidget* get_filesel () { return filesel; } void set_filesel ( GtkWidget* fs ) { filesel = fs; } GtkWidget* window_p; GtkWidget* clist; GtkWidget* title_button; GtkWidget* title_button_hbox; GtkWidget* filesel; stat_types type; int looking_at_nr; }; #endif // NO_GRAPHICS #endif // __STATISTICS_WINDOW__ realtimebattle-1.0.8/include/Dialog.h0000644000175000017500000000351110246642245015650 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __DIALOG__ #define __DIALOG__ #ifdef HAVE_CONFIG_H # include #endif #ifndef NO_GRAPHICS #include using namespace std; struct _GtkWidget; typedef struct _GtkWidget GtkWidget; union _GdkEvent; typedef union _GdkEvent GdkEvent; typedef int gint; typedef void (*DialogFunction)(int); class Dialog { public: struct result_t { result_t ( const int r, const DialogFunction f, GtkWidget* w ) : result(r), function(f), widget(w) {} int result; DialogFunction function; GtkWidget* widget; }; Dialog ( const string& info, const list& button_labels, const DialogFunction func, const gchar* window_title = "RealTimeBattle" ); ~Dialog () {} static void generate_result ( GtkWidget* widget, result_t* result_p ); private: GtkWidget* window_p; }; #endif #endif realtimebattle-1.0.8/include/StartTournamentWindow.h0000644000175000017500000001710610246642246021021 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifndef __START_TOURNAMENT_WINDOW__ #define __START_TOURNAMENT_WINDOW__ #ifdef HAVE_CONFIG_H # include #endif #ifndef NO_GRAPHICS struct _GtkWidget; typedef struct _GtkWidget GtkWidget; union _GdkEvent; typedef union _GdkEvent GdkEvent; struct _GdkEventButton; typedef struct _GdkEventButton GdkEventButton; typedef int gint; typedef void* gpointer; class StartTournamentWindow { public: enum min_max_full_t { MMF_MIN, MMF_MAX, MMF_FULL_ROUND, MMF_ALL_ARENAS }; enum start_tournament_button_t { START_TORUNAMENT_REMOVE = 0, START_TORUNAMENT_SELECT_ALL_TOURNAMENT = 1, START_TORUNAMENT_UNSELECT_ALL_TOURNAMENT = 2, START_TORUNAMENT_ADD = 3, START_TORUNAMENT_SELECT_ALL_DIRECTORY = 4, START_TORUNAMENT_UNSELECT_ALL_DIRECTORY = 5 }; struct select_buttons_t { select_buttons_t ( bool r, int b, class StartTournamentWindow* s ) : robot(r), button_nr(b), stw_p(s) {} bool robot; int button_nr; StartTournamentWindow* stw_p; }; struct min_max_full_buttons_t { min_max_full_buttons_t ( int e, min_max_full_t t, class StartTournamentWindow* s ) : entry(e), type(t), stw_p(s) {} int entry; min_max_full_t type; StartTournamentWindow* stw_p; }; StartTournamentWindow ( const int default_width = -1, const int default_height = -1, const int default_x_pos = -1, const int default_y_pos = -1); ~StartTournamentWindow (); GtkWidget* get_window_p () { return window_p; } static void delete_event_occured ( GtkWidget* widget, GdkEvent* event, class StartTournamentWindow* stw_p ); static void cancel_new_tournament ( GtkWidget* widget, class StartTournamentWindow* stw_p ); static void set_entry ( GtkWidget* widget, struct min_max_full_buttons_t* mmf_p ); static void kill_and_start_new_tournament( GtkWidget* widget, class StartTournamentWindow* stw_p ); static void start ( GtkWidget* widget, class StartTournamentWindow* stw_p ); static void load_tournament_selected ( GtkWidget* widget, class StartTournamentWindow* stw_p ); static void load_file_selected ( GtkWidget* widget, class StartTournamentWindow* stw_p ); static void save_tournament_selected ( GtkWidget* widget, class StartTournamentWindow* stw_p ); static void save_file_selected ( GtkWidget* widget, class StartTournamentWindow* stw_p ); static void destroy_filesel ( GtkWidget* widget, class StartTournamentWindow* stw_p ); static void button_selected ( GtkWidget* widget, struct select_buttons_t* button ); static void selection_made ( GtkWidget * clist, gint row, gint column, GdkEventButton *event, class StartTournamentWindow* stw_p ); static void new_tournament_from_tournament_file ( const list& robotfilename_list, const list& arenafilename_list, const int robots_p_game, const int games_p_sequence, const int n_o_sequences, StartTournamentWindow* stw_p ); void new_tournament ( const list& robotfilename_list, const list& arenafilename_list, const int robots_p_game, const int games_p_sequence, const int n_o_sequences ); bool get_tournament_started_flag () { return tournament_started_flag; } void set_tournament_started_flag ( bool started ) { tournament_started_flag = started; } static void dummy_result ( int result ) {} private: void add_clist ( GtkWidget* clist, GtkWidget* box ); void change_all_selection ( const bool robots, const bool dir, const bool all ); void add_all_selected ( const bool robots ); void remove_all_selected ( const bool robots ); start_tournament_info_t* find_row_in_clist ( const int row, list* info_list ); void load_tournament_file ( const string& full_filename, bool display_fail_message ); void save_tournament_file ( const string& full_filename, bool display_file_fail_message, bool display_tour_fail_message ); GtkWidget* get_filesel () { return filesel; } void set_filesel ( GtkWidget* fs ) { filesel = fs; } GtkWidget** get_entries () { return entries; } list* get_selected_robot_tournament() { return &selected_robot_tournament; }; list* get_selected_robot_directory () { return &selected_robot_directory; }; list* get_selected_arena_tournament() { return &selected_arena_tournament; }; list* get_selected_arena_directory () { return &selected_arena_directory; }; GtkWidget* get_robots_in_tournament_clist() { return robots_in_tournament_clist; } GtkWidget* get_robots_in_directory_clist () { return robots_in_directory_clist; } GtkWidget* get_arenas_in_tournament_clist() { return arenas_in_tournament_clist; } GtkWidget* get_arenas_in_directory_clist () { return arenas_in_directory_clist; } GtkWidget* window_p; GtkWidget* entries[3]; GtkWidget* filesel; GtkWidget* robots_in_tournament_clist; GtkWidget* robots_in_directory_clist; GtkWidget* arenas_in_tournament_clist; GtkWidget* arenas_in_directory_clist; list selected_robot_tournament; list selected_robot_directory; list selected_arena_tournament; list selected_arena_directory; bool tournament_started_flag; }; #endif // NO_GRAPHICS #endif // __START_TOURNAMENT_WINDOW__ realtimebattle-1.0.8/include/getopt.h0000644000175000017500000001056210202660027015745 0ustar moimoi/* Declarations for getopt. Copyright (C) 1989, 90, 91, 92, 93, 94 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. */ #ifndef _GETOPT_H #define _GETOPT_H 1 #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns EOF, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { #if defined (__STDC__) && __STDC__ const char *name; #else char *name; #endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ #define no_argument 0 #define required_argument 1 #define optional_argument 2 #if defined (__STDC__) && __STDC__ #ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int argc, char *const *argv, const char *shortopts); #else /* not __GNU_LIBRARY__ */ //extern int getopt (); #endif /* __GNU_LIBRARY__ */ extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind, int long_only); #else /* not __STDC__ */ extern int getopt (); extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); #endif /* __STDC__ */ #ifdef __cplusplus } #endif #endif /* _GETOPT_H */ realtimebattle-1.0.8/include/Broadcast.h0000644000175000017500000000343310313524764016356 0ustar moimoi/* * RealTimeBattle, a robot programming game * Copyright (C) 2005 Volker Stroebel * * 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. */ #ifndef BROADCAST_H #define BROADCAST_H #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include using namespace std; /** * The streambuf for the Broadcast class */ class BroadcastBuffer : public streambuf { public: BroadcastBuffer(); bool set_logfile(const string& filename); void close_logfile(); protected: #ifndef NO_NETWORK bool network_clients; #endif ofstream logfile; int overflow(int c); streamsize xsputn(const char* s, streamsize num); }; /** * An ostream for sending data to the client and writing the logfile */ class Broadcast : public ostream { public: static Broadcast* Instance() throw(bad_exception); void set_logfile(const string& filename); bool is_active(); void finalize(); protected: Broadcast(); BroadcastBuffer buffer; bool _use_logfile; static auto_ptr _instance; }; #endif //BROADCAST_H realtimebattle-1.0.8/include/ClientInterface.h0000644000175000017500000000423710320502121017473 0ustar moimoi/* * Network interface for RealTimeBattle clients * Copyright (C) 2005 Volker Stroebel * * 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. */ #ifndef __CLIENT_INTERFACE_H_ #define __CLIENT_INTERFACE_H_ #ifdef HAVE_CONFIG_H #include #endif #ifndef NO_NETWORK #include #include #include using namespace std; /** * A class that represents a connection to a client * and parses all commands that the client sends to the core */ class ClientConnection { public: ClientConnection(int sd); ~ClientConnection(); bool loop(); int send(const char* message, int len); protected: int _socket; char _buffer[4097]; // this is the standard size of a piped connection bool _initialized; bool _master; string _line; bool parse_line(string &message); void parse_command(const char command,const string& data); }; /** * A singleton that manages the network socket of the server * and stores a list of all connected clients */ class ClientInterface { public: ~ClientInterface(); static ClientInterface* Instance() throw(bad_exception); void loop(); int send(const char* message, int len); static void set_port(int port); void set_accepting(bool state=true); protected: ClientInterface(); int _sd; static int port; bool _is_accepting; list _clients; static auto_ptr _instance; }; #endif // NO_NETWORK #endif // __CLIENT_INTERFACE_H_ realtimebattle-1.0.8/src/0002755000175000017500000000000010404234035013434 5ustar moimoirealtimebattle-1.0.8/src/Makefile.am0000644000175000017500000000175110317475652015511 0ustar moimoiINCLUDES = \ -I$(top_srcdir)/include\ -I$(top_srcdir)/intl realtimebattle_LDADD = $(LIBINTL) realtimebattle_CXXFLAGS = realtimebattle_LDFLAGS = bin_PROGRAMS = realtimebattle realtimebattle_SOURCES = \ RealTimeBattle.cc\ ArenaBase.cc\ ArenaController.cc\ ArenaRealTime.cc\ ArenaReplay.cc\ Broadcast.cc\ Extras.cc\ GeometricalObjects.cc\ Options.cc\ Robot.cc\ Shape.cc\ Shot.cc\ Timer.cc\ Various.cc\ Vector2D.cc if NO_GETOPT_LONG realtimebattle_SOURCES += getopt.c endif if NO_GRAPHICS realtimebattle_CXXFLAGS += \ -DNO_GRAPHICS else realtimebattle_SOURCES += \ Gui.cc\ ArenaWindow.cc\ ControlWindow.cc\ Dialog.cc\ MessageWindow.cc\ OptionsWindow.cc\ StatisticsWindow.cc\ StartTournamentWindow.cc\ Structs.cc\ ScoreWindow.cc INCLUDES += \ $(GTK_CFLAGS) realtimebattle_LDADD += \ $(GTK_LIBS) endif if NO_NETWORK realtimebattle_CXXFLAGS += \ -DNO_NETWORK else realtimebattle_SOURCES += \ ClientInterface.cc realtimebattle_LDADD += @ETR_SOCKET_LIBS@ endif realtimebattle-1.0.8/src/Makefile.in0000644000175000017500000023031610324167714015516 0ustar moimoi# Makefile.in generated by automake 1.9.3 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 = $(realtimebattle_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ bin_PROGRAMS = realtimebattle$(EXEEXT) @NO_GETOPT_LONG_TRUE@am__append_1 = getopt.c @NO_GRAPHICS_TRUE@am__append_2 = \ @NO_GRAPHICS_TRUE@ -DNO_GRAPHICS @NO_GRAPHICS_FALSE@am__append_3 = \ @NO_GRAPHICS_FALSE@ Gui.cc\ @NO_GRAPHICS_FALSE@ ArenaWindow.cc\ @NO_GRAPHICS_FALSE@ ControlWindow.cc\ @NO_GRAPHICS_FALSE@ Dialog.cc\ @NO_GRAPHICS_FALSE@ MessageWindow.cc\ @NO_GRAPHICS_FALSE@ OptionsWindow.cc\ @NO_GRAPHICS_FALSE@ StatisticsWindow.cc\ @NO_GRAPHICS_FALSE@ StartTournamentWindow.cc\ @NO_GRAPHICS_FALSE@ Structs.cc\ @NO_GRAPHICS_FALSE@ ScoreWindow.cc @NO_GRAPHICS_FALSE@am__append_4 = \ @NO_GRAPHICS_FALSE@ $(GTK_CFLAGS) @NO_GRAPHICS_FALSE@am__append_5 = \ @NO_GRAPHICS_FALSE@ $(GTK_LIBS) @NO_NETWORK_TRUE@am__append_6 = \ @NO_NETWORK_TRUE@ -DNO_NETWORK @NO_NETWORK_FALSE@am__append_7 = \ @NO_NETWORK_FALSE@ ClientInterface.cc @NO_NETWORK_FALSE@am__append_8 = @ETR_SOCKET_LIBS@ subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__realtimebattle_SOURCES_DIST = RealTimeBattle.cc ArenaBase.cc \ ArenaController.cc ArenaRealTime.cc ArenaReplay.cc \ Broadcast.cc Extras.cc GeometricalObjects.cc Options.cc \ Robot.cc Shape.cc Shot.cc Timer.cc Various.cc Vector2D.cc \ getopt.c Gui.cc ArenaWindow.cc ControlWindow.cc Dialog.cc \ MessageWindow.cc OptionsWindow.cc StatisticsWindow.cc \ StartTournamentWindow.cc Structs.cc ScoreWindow.cc \ ClientInterface.cc @NO_GETOPT_LONG_TRUE@am__objects_1 = getopt.$(OBJEXT) @NO_GRAPHICS_FALSE@am__objects_2 = realtimebattle-Gui.$(OBJEXT) \ @NO_GRAPHICS_FALSE@ realtimebattle-ArenaWindow.$(OBJEXT) \ @NO_GRAPHICS_FALSE@ realtimebattle-ControlWindow.$(OBJEXT) \ @NO_GRAPHICS_FALSE@ realtimebattle-Dialog.$(OBJEXT) \ @NO_GRAPHICS_FALSE@ realtimebattle-MessageWindow.$(OBJEXT) \ @NO_GRAPHICS_FALSE@ realtimebattle-OptionsWindow.$(OBJEXT) \ @NO_GRAPHICS_FALSE@ realtimebattle-StatisticsWindow.$(OBJEXT) \ @NO_GRAPHICS_FALSE@ realtimebattle-StartTournamentWindow.$(OBJEXT) \ @NO_GRAPHICS_FALSE@ realtimebattle-Structs.$(OBJEXT) \ @NO_GRAPHICS_FALSE@ realtimebattle-ScoreWindow.$(OBJEXT) @NO_NETWORK_FALSE@am__objects_3 = \ @NO_NETWORK_FALSE@ realtimebattle-ClientInterface.$(OBJEXT) am_realtimebattle_OBJECTS = realtimebattle-RealTimeBattle.$(OBJEXT) \ realtimebattle-ArenaBase.$(OBJEXT) \ realtimebattle-ArenaController.$(OBJEXT) \ realtimebattle-ArenaRealTime.$(OBJEXT) \ realtimebattle-ArenaReplay.$(OBJEXT) \ realtimebattle-Broadcast.$(OBJEXT) \ realtimebattle-Extras.$(OBJEXT) \ realtimebattle-GeometricalObjects.$(OBJEXT) \ realtimebattle-Options.$(OBJEXT) \ realtimebattle-Robot.$(OBJEXT) realtimebattle-Shape.$(OBJEXT) \ realtimebattle-Shot.$(OBJEXT) realtimebattle-Timer.$(OBJEXT) \ realtimebattle-Various.$(OBJEXT) \ realtimebattle-Vector2D.$(OBJEXT) $(am__objects_1) \ $(am__objects_2) $(am__objects_3) realtimebattle_OBJECTS = $(am_realtimebattle_OBJECTS) am__DEPENDENCIES_1 = @NO_GRAPHICS_FALSE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) realtimebattle_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(realtimebattle_SOURCES) DIST_SOURCES = $(am__realtimebattle_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl \ $(am__append_4) realtimebattle_LDADD = $(LIBINTL) $(am__append_5) $(am__append_8) realtimebattle_CXXFLAGS = $(am__append_2) $(am__append_6) realtimebattle_LDFLAGS = realtimebattle_SOURCES = RealTimeBattle.cc ArenaBase.cc \ ArenaController.cc ArenaRealTime.cc ArenaReplay.cc \ Broadcast.cc Extras.cc GeometricalObjects.cc Options.cc \ Robot.cc Shape.cc Shot.cc Timer.cc Various.cc Vector2D.cc \ $(am__append_1) $(am__append_3) $(am__append_7) all: all-am .SUFFIXES: .SUFFIXES: .c .cc .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 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 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) realtimebattle$(EXEEXT): $(realtimebattle_OBJECTS) $(realtimebattle_DEPENDENCIES) @rm -f realtimebattle$(EXEEXT) $(CXXLINK) $(realtimebattle_LDFLAGS) $(realtimebattle_OBJECTS) $(realtimebattle_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-ArenaBase.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-ArenaController.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-ArenaRealTime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-ArenaReplay.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-ArenaWindow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-Broadcast.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-ClientInterface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-ControlWindow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-Dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-Extras.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-GeometricalObjects.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-Gui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-MessageWindow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-Options.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-OptionsWindow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-RealTimeBattle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-Robot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-ScoreWindow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-Shape.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-Shot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-StartTournamentWindow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-StatisticsWindow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-Structs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-Timer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-Various.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realtimebattle-Vector2D.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` realtimebattle-RealTimeBattle.o: RealTimeBattle.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-RealTimeBattle.o -MD -MP -MF "$(DEPDIR)/realtimebattle-RealTimeBattle.Tpo" -c -o realtimebattle-RealTimeBattle.o `test -f 'RealTimeBattle.cc' || echo '$(srcdir)/'`RealTimeBattle.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-RealTimeBattle.Tpo" "$(DEPDIR)/realtimebattle-RealTimeBattle.Po"; else rm -f "$(DEPDIR)/realtimebattle-RealTimeBattle.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RealTimeBattle.cc' object='realtimebattle-RealTimeBattle.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-RealTimeBattle.o `test -f 'RealTimeBattle.cc' || echo '$(srcdir)/'`RealTimeBattle.cc realtimebattle-RealTimeBattle.obj: RealTimeBattle.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-RealTimeBattle.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-RealTimeBattle.Tpo" -c -o realtimebattle-RealTimeBattle.obj `if test -f 'RealTimeBattle.cc'; then $(CYGPATH_W) 'RealTimeBattle.cc'; else $(CYGPATH_W) '$(srcdir)/RealTimeBattle.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-RealTimeBattle.Tpo" "$(DEPDIR)/realtimebattle-RealTimeBattle.Po"; else rm -f "$(DEPDIR)/realtimebattle-RealTimeBattle.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RealTimeBattle.cc' object='realtimebattle-RealTimeBattle.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-RealTimeBattle.obj `if test -f 'RealTimeBattle.cc'; then $(CYGPATH_W) 'RealTimeBattle.cc'; else $(CYGPATH_W) '$(srcdir)/RealTimeBattle.cc'; fi` realtimebattle-ArenaBase.o: ArenaBase.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ArenaBase.o -MD -MP -MF "$(DEPDIR)/realtimebattle-ArenaBase.Tpo" -c -o realtimebattle-ArenaBase.o `test -f 'ArenaBase.cc' || echo '$(srcdir)/'`ArenaBase.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ArenaBase.Tpo" "$(DEPDIR)/realtimebattle-ArenaBase.Po"; else rm -f "$(DEPDIR)/realtimebattle-ArenaBase.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ArenaBase.cc' object='realtimebattle-ArenaBase.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ArenaBase.o `test -f 'ArenaBase.cc' || echo '$(srcdir)/'`ArenaBase.cc realtimebattle-ArenaBase.obj: ArenaBase.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ArenaBase.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-ArenaBase.Tpo" -c -o realtimebattle-ArenaBase.obj `if test -f 'ArenaBase.cc'; then $(CYGPATH_W) 'ArenaBase.cc'; else $(CYGPATH_W) '$(srcdir)/ArenaBase.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ArenaBase.Tpo" "$(DEPDIR)/realtimebattle-ArenaBase.Po"; else rm -f "$(DEPDIR)/realtimebattle-ArenaBase.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ArenaBase.cc' object='realtimebattle-ArenaBase.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ArenaBase.obj `if test -f 'ArenaBase.cc'; then $(CYGPATH_W) 'ArenaBase.cc'; else $(CYGPATH_W) '$(srcdir)/ArenaBase.cc'; fi` realtimebattle-ArenaController.o: ArenaController.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ArenaController.o -MD -MP -MF "$(DEPDIR)/realtimebattle-ArenaController.Tpo" -c -o realtimebattle-ArenaController.o `test -f 'ArenaController.cc' || echo '$(srcdir)/'`ArenaController.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ArenaController.Tpo" "$(DEPDIR)/realtimebattle-ArenaController.Po"; else rm -f "$(DEPDIR)/realtimebattle-ArenaController.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ArenaController.cc' object='realtimebattle-ArenaController.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ArenaController.o `test -f 'ArenaController.cc' || echo '$(srcdir)/'`ArenaController.cc realtimebattle-ArenaController.obj: ArenaController.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ArenaController.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-ArenaController.Tpo" -c -o realtimebattle-ArenaController.obj `if test -f 'ArenaController.cc'; then $(CYGPATH_W) 'ArenaController.cc'; else $(CYGPATH_W) '$(srcdir)/ArenaController.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ArenaController.Tpo" "$(DEPDIR)/realtimebattle-ArenaController.Po"; else rm -f "$(DEPDIR)/realtimebattle-ArenaController.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ArenaController.cc' object='realtimebattle-ArenaController.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ArenaController.obj `if test -f 'ArenaController.cc'; then $(CYGPATH_W) 'ArenaController.cc'; else $(CYGPATH_W) '$(srcdir)/ArenaController.cc'; fi` realtimebattle-ArenaRealTime.o: ArenaRealTime.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ArenaRealTime.o -MD -MP -MF "$(DEPDIR)/realtimebattle-ArenaRealTime.Tpo" -c -o realtimebattle-ArenaRealTime.o `test -f 'ArenaRealTime.cc' || echo '$(srcdir)/'`ArenaRealTime.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ArenaRealTime.Tpo" "$(DEPDIR)/realtimebattle-ArenaRealTime.Po"; else rm -f "$(DEPDIR)/realtimebattle-ArenaRealTime.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ArenaRealTime.cc' object='realtimebattle-ArenaRealTime.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ArenaRealTime.o `test -f 'ArenaRealTime.cc' || echo '$(srcdir)/'`ArenaRealTime.cc realtimebattle-ArenaRealTime.obj: ArenaRealTime.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ArenaRealTime.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-ArenaRealTime.Tpo" -c -o realtimebattle-ArenaRealTime.obj `if test -f 'ArenaRealTime.cc'; then $(CYGPATH_W) 'ArenaRealTime.cc'; else $(CYGPATH_W) '$(srcdir)/ArenaRealTime.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ArenaRealTime.Tpo" "$(DEPDIR)/realtimebattle-ArenaRealTime.Po"; else rm -f "$(DEPDIR)/realtimebattle-ArenaRealTime.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ArenaRealTime.cc' object='realtimebattle-ArenaRealTime.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ArenaRealTime.obj `if test -f 'ArenaRealTime.cc'; then $(CYGPATH_W) 'ArenaRealTime.cc'; else $(CYGPATH_W) '$(srcdir)/ArenaRealTime.cc'; fi` realtimebattle-ArenaReplay.o: ArenaReplay.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ArenaReplay.o -MD -MP -MF "$(DEPDIR)/realtimebattle-ArenaReplay.Tpo" -c -o realtimebattle-ArenaReplay.o `test -f 'ArenaReplay.cc' || echo '$(srcdir)/'`ArenaReplay.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ArenaReplay.Tpo" "$(DEPDIR)/realtimebattle-ArenaReplay.Po"; else rm -f "$(DEPDIR)/realtimebattle-ArenaReplay.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ArenaReplay.cc' object='realtimebattle-ArenaReplay.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ArenaReplay.o `test -f 'ArenaReplay.cc' || echo '$(srcdir)/'`ArenaReplay.cc realtimebattle-ArenaReplay.obj: ArenaReplay.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ArenaReplay.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-ArenaReplay.Tpo" -c -o realtimebattle-ArenaReplay.obj `if test -f 'ArenaReplay.cc'; then $(CYGPATH_W) 'ArenaReplay.cc'; else $(CYGPATH_W) '$(srcdir)/ArenaReplay.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ArenaReplay.Tpo" "$(DEPDIR)/realtimebattle-ArenaReplay.Po"; else rm -f "$(DEPDIR)/realtimebattle-ArenaReplay.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ArenaReplay.cc' object='realtimebattle-ArenaReplay.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ArenaReplay.obj `if test -f 'ArenaReplay.cc'; then $(CYGPATH_W) 'ArenaReplay.cc'; else $(CYGPATH_W) '$(srcdir)/ArenaReplay.cc'; fi` realtimebattle-Broadcast.o: Broadcast.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Broadcast.o -MD -MP -MF "$(DEPDIR)/realtimebattle-Broadcast.Tpo" -c -o realtimebattle-Broadcast.o `test -f 'Broadcast.cc' || echo '$(srcdir)/'`Broadcast.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Broadcast.Tpo" "$(DEPDIR)/realtimebattle-Broadcast.Po"; else rm -f "$(DEPDIR)/realtimebattle-Broadcast.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Broadcast.cc' object='realtimebattle-Broadcast.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Broadcast.o `test -f 'Broadcast.cc' || echo '$(srcdir)/'`Broadcast.cc realtimebattle-Broadcast.obj: Broadcast.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Broadcast.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-Broadcast.Tpo" -c -o realtimebattle-Broadcast.obj `if test -f 'Broadcast.cc'; then $(CYGPATH_W) 'Broadcast.cc'; else $(CYGPATH_W) '$(srcdir)/Broadcast.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Broadcast.Tpo" "$(DEPDIR)/realtimebattle-Broadcast.Po"; else rm -f "$(DEPDIR)/realtimebattle-Broadcast.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Broadcast.cc' object='realtimebattle-Broadcast.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Broadcast.obj `if test -f 'Broadcast.cc'; then $(CYGPATH_W) 'Broadcast.cc'; else $(CYGPATH_W) '$(srcdir)/Broadcast.cc'; fi` realtimebattle-Extras.o: Extras.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Extras.o -MD -MP -MF "$(DEPDIR)/realtimebattle-Extras.Tpo" -c -o realtimebattle-Extras.o `test -f 'Extras.cc' || echo '$(srcdir)/'`Extras.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Extras.Tpo" "$(DEPDIR)/realtimebattle-Extras.Po"; else rm -f "$(DEPDIR)/realtimebattle-Extras.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Extras.cc' object='realtimebattle-Extras.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Extras.o `test -f 'Extras.cc' || echo '$(srcdir)/'`Extras.cc realtimebattle-Extras.obj: Extras.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Extras.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-Extras.Tpo" -c -o realtimebattle-Extras.obj `if test -f 'Extras.cc'; then $(CYGPATH_W) 'Extras.cc'; else $(CYGPATH_W) '$(srcdir)/Extras.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Extras.Tpo" "$(DEPDIR)/realtimebattle-Extras.Po"; else rm -f "$(DEPDIR)/realtimebattle-Extras.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Extras.cc' object='realtimebattle-Extras.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Extras.obj `if test -f 'Extras.cc'; then $(CYGPATH_W) 'Extras.cc'; else $(CYGPATH_W) '$(srcdir)/Extras.cc'; fi` realtimebattle-GeometricalObjects.o: GeometricalObjects.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-GeometricalObjects.o -MD -MP -MF "$(DEPDIR)/realtimebattle-GeometricalObjects.Tpo" -c -o realtimebattle-GeometricalObjects.o `test -f 'GeometricalObjects.cc' || echo '$(srcdir)/'`GeometricalObjects.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-GeometricalObjects.Tpo" "$(DEPDIR)/realtimebattle-GeometricalObjects.Po"; else rm -f "$(DEPDIR)/realtimebattle-GeometricalObjects.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GeometricalObjects.cc' object='realtimebattle-GeometricalObjects.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-GeometricalObjects.o `test -f 'GeometricalObjects.cc' || echo '$(srcdir)/'`GeometricalObjects.cc realtimebattle-GeometricalObjects.obj: GeometricalObjects.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-GeometricalObjects.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-GeometricalObjects.Tpo" -c -o realtimebattle-GeometricalObjects.obj `if test -f 'GeometricalObjects.cc'; then $(CYGPATH_W) 'GeometricalObjects.cc'; else $(CYGPATH_W) '$(srcdir)/GeometricalObjects.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-GeometricalObjects.Tpo" "$(DEPDIR)/realtimebattle-GeometricalObjects.Po"; else rm -f "$(DEPDIR)/realtimebattle-GeometricalObjects.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GeometricalObjects.cc' object='realtimebattle-GeometricalObjects.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-GeometricalObjects.obj `if test -f 'GeometricalObjects.cc'; then $(CYGPATH_W) 'GeometricalObjects.cc'; else $(CYGPATH_W) '$(srcdir)/GeometricalObjects.cc'; fi` realtimebattle-Options.o: Options.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Options.o -MD -MP -MF "$(DEPDIR)/realtimebattle-Options.Tpo" -c -o realtimebattle-Options.o `test -f 'Options.cc' || echo '$(srcdir)/'`Options.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Options.Tpo" "$(DEPDIR)/realtimebattle-Options.Po"; else rm -f "$(DEPDIR)/realtimebattle-Options.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Options.cc' object='realtimebattle-Options.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Options.o `test -f 'Options.cc' || echo '$(srcdir)/'`Options.cc realtimebattle-Options.obj: Options.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Options.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-Options.Tpo" -c -o realtimebattle-Options.obj `if test -f 'Options.cc'; then $(CYGPATH_W) 'Options.cc'; else $(CYGPATH_W) '$(srcdir)/Options.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Options.Tpo" "$(DEPDIR)/realtimebattle-Options.Po"; else rm -f "$(DEPDIR)/realtimebattle-Options.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Options.cc' object='realtimebattle-Options.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Options.obj `if test -f 'Options.cc'; then $(CYGPATH_W) 'Options.cc'; else $(CYGPATH_W) '$(srcdir)/Options.cc'; fi` realtimebattle-Robot.o: Robot.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Robot.o -MD -MP -MF "$(DEPDIR)/realtimebattle-Robot.Tpo" -c -o realtimebattle-Robot.o `test -f 'Robot.cc' || echo '$(srcdir)/'`Robot.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Robot.Tpo" "$(DEPDIR)/realtimebattle-Robot.Po"; else rm -f "$(DEPDIR)/realtimebattle-Robot.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Robot.cc' object='realtimebattle-Robot.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Robot.o `test -f 'Robot.cc' || echo '$(srcdir)/'`Robot.cc realtimebattle-Robot.obj: Robot.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Robot.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-Robot.Tpo" -c -o realtimebattle-Robot.obj `if test -f 'Robot.cc'; then $(CYGPATH_W) 'Robot.cc'; else $(CYGPATH_W) '$(srcdir)/Robot.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Robot.Tpo" "$(DEPDIR)/realtimebattle-Robot.Po"; else rm -f "$(DEPDIR)/realtimebattle-Robot.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Robot.cc' object='realtimebattle-Robot.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Robot.obj `if test -f 'Robot.cc'; then $(CYGPATH_W) 'Robot.cc'; else $(CYGPATH_W) '$(srcdir)/Robot.cc'; fi` realtimebattle-Shape.o: Shape.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Shape.o -MD -MP -MF "$(DEPDIR)/realtimebattle-Shape.Tpo" -c -o realtimebattle-Shape.o `test -f 'Shape.cc' || echo '$(srcdir)/'`Shape.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Shape.Tpo" "$(DEPDIR)/realtimebattle-Shape.Po"; else rm -f "$(DEPDIR)/realtimebattle-Shape.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Shape.cc' object='realtimebattle-Shape.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Shape.o `test -f 'Shape.cc' || echo '$(srcdir)/'`Shape.cc realtimebattle-Shape.obj: Shape.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Shape.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-Shape.Tpo" -c -o realtimebattle-Shape.obj `if test -f 'Shape.cc'; then $(CYGPATH_W) 'Shape.cc'; else $(CYGPATH_W) '$(srcdir)/Shape.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Shape.Tpo" "$(DEPDIR)/realtimebattle-Shape.Po"; else rm -f "$(DEPDIR)/realtimebattle-Shape.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Shape.cc' object='realtimebattle-Shape.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Shape.obj `if test -f 'Shape.cc'; then $(CYGPATH_W) 'Shape.cc'; else $(CYGPATH_W) '$(srcdir)/Shape.cc'; fi` realtimebattle-Shot.o: Shot.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Shot.o -MD -MP -MF "$(DEPDIR)/realtimebattle-Shot.Tpo" -c -o realtimebattle-Shot.o `test -f 'Shot.cc' || echo '$(srcdir)/'`Shot.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Shot.Tpo" "$(DEPDIR)/realtimebattle-Shot.Po"; else rm -f "$(DEPDIR)/realtimebattle-Shot.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Shot.cc' object='realtimebattle-Shot.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Shot.o `test -f 'Shot.cc' || echo '$(srcdir)/'`Shot.cc realtimebattle-Shot.obj: Shot.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Shot.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-Shot.Tpo" -c -o realtimebattle-Shot.obj `if test -f 'Shot.cc'; then $(CYGPATH_W) 'Shot.cc'; else $(CYGPATH_W) '$(srcdir)/Shot.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Shot.Tpo" "$(DEPDIR)/realtimebattle-Shot.Po"; else rm -f "$(DEPDIR)/realtimebattle-Shot.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Shot.cc' object='realtimebattle-Shot.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Shot.obj `if test -f 'Shot.cc'; then $(CYGPATH_W) 'Shot.cc'; else $(CYGPATH_W) '$(srcdir)/Shot.cc'; fi` realtimebattle-Timer.o: Timer.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Timer.o -MD -MP -MF "$(DEPDIR)/realtimebattle-Timer.Tpo" -c -o realtimebattle-Timer.o `test -f 'Timer.cc' || echo '$(srcdir)/'`Timer.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Timer.Tpo" "$(DEPDIR)/realtimebattle-Timer.Po"; else rm -f "$(DEPDIR)/realtimebattle-Timer.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Timer.cc' object='realtimebattle-Timer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Timer.o `test -f 'Timer.cc' || echo '$(srcdir)/'`Timer.cc realtimebattle-Timer.obj: Timer.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Timer.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-Timer.Tpo" -c -o realtimebattle-Timer.obj `if test -f 'Timer.cc'; then $(CYGPATH_W) 'Timer.cc'; else $(CYGPATH_W) '$(srcdir)/Timer.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Timer.Tpo" "$(DEPDIR)/realtimebattle-Timer.Po"; else rm -f "$(DEPDIR)/realtimebattle-Timer.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Timer.cc' object='realtimebattle-Timer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Timer.obj `if test -f 'Timer.cc'; then $(CYGPATH_W) 'Timer.cc'; else $(CYGPATH_W) '$(srcdir)/Timer.cc'; fi` realtimebattle-Various.o: Various.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Various.o -MD -MP -MF "$(DEPDIR)/realtimebattle-Various.Tpo" -c -o realtimebattle-Various.o `test -f 'Various.cc' || echo '$(srcdir)/'`Various.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Various.Tpo" "$(DEPDIR)/realtimebattle-Various.Po"; else rm -f "$(DEPDIR)/realtimebattle-Various.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Various.cc' object='realtimebattle-Various.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Various.o `test -f 'Various.cc' || echo '$(srcdir)/'`Various.cc realtimebattle-Various.obj: Various.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Various.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-Various.Tpo" -c -o realtimebattle-Various.obj `if test -f 'Various.cc'; then $(CYGPATH_W) 'Various.cc'; else $(CYGPATH_W) '$(srcdir)/Various.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Various.Tpo" "$(DEPDIR)/realtimebattle-Various.Po"; else rm -f "$(DEPDIR)/realtimebattle-Various.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Various.cc' object='realtimebattle-Various.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Various.obj `if test -f 'Various.cc'; then $(CYGPATH_W) 'Various.cc'; else $(CYGPATH_W) '$(srcdir)/Various.cc'; fi` realtimebattle-Vector2D.o: Vector2D.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Vector2D.o -MD -MP -MF "$(DEPDIR)/realtimebattle-Vector2D.Tpo" -c -o realtimebattle-Vector2D.o `test -f 'Vector2D.cc' || echo '$(srcdir)/'`Vector2D.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Vector2D.Tpo" "$(DEPDIR)/realtimebattle-Vector2D.Po"; else rm -f "$(DEPDIR)/realtimebattle-Vector2D.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Vector2D.cc' object='realtimebattle-Vector2D.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Vector2D.o `test -f 'Vector2D.cc' || echo '$(srcdir)/'`Vector2D.cc realtimebattle-Vector2D.obj: Vector2D.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Vector2D.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-Vector2D.Tpo" -c -o realtimebattle-Vector2D.obj `if test -f 'Vector2D.cc'; then $(CYGPATH_W) 'Vector2D.cc'; else $(CYGPATH_W) '$(srcdir)/Vector2D.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Vector2D.Tpo" "$(DEPDIR)/realtimebattle-Vector2D.Po"; else rm -f "$(DEPDIR)/realtimebattle-Vector2D.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Vector2D.cc' object='realtimebattle-Vector2D.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Vector2D.obj `if test -f 'Vector2D.cc'; then $(CYGPATH_W) 'Vector2D.cc'; else $(CYGPATH_W) '$(srcdir)/Vector2D.cc'; fi` realtimebattle-Gui.o: Gui.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Gui.o -MD -MP -MF "$(DEPDIR)/realtimebattle-Gui.Tpo" -c -o realtimebattle-Gui.o `test -f 'Gui.cc' || echo '$(srcdir)/'`Gui.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Gui.Tpo" "$(DEPDIR)/realtimebattle-Gui.Po"; else rm -f "$(DEPDIR)/realtimebattle-Gui.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Gui.cc' object='realtimebattle-Gui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Gui.o `test -f 'Gui.cc' || echo '$(srcdir)/'`Gui.cc realtimebattle-Gui.obj: Gui.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Gui.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-Gui.Tpo" -c -o realtimebattle-Gui.obj `if test -f 'Gui.cc'; then $(CYGPATH_W) 'Gui.cc'; else $(CYGPATH_W) '$(srcdir)/Gui.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Gui.Tpo" "$(DEPDIR)/realtimebattle-Gui.Po"; else rm -f "$(DEPDIR)/realtimebattle-Gui.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Gui.cc' object='realtimebattle-Gui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Gui.obj `if test -f 'Gui.cc'; then $(CYGPATH_W) 'Gui.cc'; else $(CYGPATH_W) '$(srcdir)/Gui.cc'; fi` realtimebattle-ArenaWindow.o: ArenaWindow.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ArenaWindow.o -MD -MP -MF "$(DEPDIR)/realtimebattle-ArenaWindow.Tpo" -c -o realtimebattle-ArenaWindow.o `test -f 'ArenaWindow.cc' || echo '$(srcdir)/'`ArenaWindow.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ArenaWindow.Tpo" "$(DEPDIR)/realtimebattle-ArenaWindow.Po"; else rm -f "$(DEPDIR)/realtimebattle-ArenaWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ArenaWindow.cc' object='realtimebattle-ArenaWindow.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ArenaWindow.o `test -f 'ArenaWindow.cc' || echo '$(srcdir)/'`ArenaWindow.cc realtimebattle-ArenaWindow.obj: ArenaWindow.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ArenaWindow.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-ArenaWindow.Tpo" -c -o realtimebattle-ArenaWindow.obj `if test -f 'ArenaWindow.cc'; then $(CYGPATH_W) 'ArenaWindow.cc'; else $(CYGPATH_W) '$(srcdir)/ArenaWindow.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ArenaWindow.Tpo" "$(DEPDIR)/realtimebattle-ArenaWindow.Po"; else rm -f "$(DEPDIR)/realtimebattle-ArenaWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ArenaWindow.cc' object='realtimebattle-ArenaWindow.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ArenaWindow.obj `if test -f 'ArenaWindow.cc'; then $(CYGPATH_W) 'ArenaWindow.cc'; else $(CYGPATH_W) '$(srcdir)/ArenaWindow.cc'; fi` realtimebattle-ControlWindow.o: ControlWindow.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ControlWindow.o -MD -MP -MF "$(DEPDIR)/realtimebattle-ControlWindow.Tpo" -c -o realtimebattle-ControlWindow.o `test -f 'ControlWindow.cc' || echo '$(srcdir)/'`ControlWindow.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ControlWindow.Tpo" "$(DEPDIR)/realtimebattle-ControlWindow.Po"; else rm -f "$(DEPDIR)/realtimebattle-ControlWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ControlWindow.cc' object='realtimebattle-ControlWindow.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ControlWindow.o `test -f 'ControlWindow.cc' || echo '$(srcdir)/'`ControlWindow.cc realtimebattle-ControlWindow.obj: ControlWindow.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ControlWindow.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-ControlWindow.Tpo" -c -o realtimebattle-ControlWindow.obj `if test -f 'ControlWindow.cc'; then $(CYGPATH_W) 'ControlWindow.cc'; else $(CYGPATH_W) '$(srcdir)/ControlWindow.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ControlWindow.Tpo" "$(DEPDIR)/realtimebattle-ControlWindow.Po"; else rm -f "$(DEPDIR)/realtimebattle-ControlWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ControlWindow.cc' object='realtimebattle-ControlWindow.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ControlWindow.obj `if test -f 'ControlWindow.cc'; then $(CYGPATH_W) 'ControlWindow.cc'; else $(CYGPATH_W) '$(srcdir)/ControlWindow.cc'; fi` realtimebattle-Dialog.o: Dialog.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Dialog.o -MD -MP -MF "$(DEPDIR)/realtimebattle-Dialog.Tpo" -c -o realtimebattle-Dialog.o `test -f 'Dialog.cc' || echo '$(srcdir)/'`Dialog.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Dialog.Tpo" "$(DEPDIR)/realtimebattle-Dialog.Po"; else rm -f "$(DEPDIR)/realtimebattle-Dialog.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Dialog.cc' object='realtimebattle-Dialog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Dialog.o `test -f 'Dialog.cc' || echo '$(srcdir)/'`Dialog.cc realtimebattle-Dialog.obj: Dialog.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Dialog.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-Dialog.Tpo" -c -o realtimebattle-Dialog.obj `if test -f 'Dialog.cc'; then $(CYGPATH_W) 'Dialog.cc'; else $(CYGPATH_W) '$(srcdir)/Dialog.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Dialog.Tpo" "$(DEPDIR)/realtimebattle-Dialog.Po"; else rm -f "$(DEPDIR)/realtimebattle-Dialog.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Dialog.cc' object='realtimebattle-Dialog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Dialog.obj `if test -f 'Dialog.cc'; then $(CYGPATH_W) 'Dialog.cc'; else $(CYGPATH_W) '$(srcdir)/Dialog.cc'; fi` realtimebattle-MessageWindow.o: MessageWindow.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-MessageWindow.o -MD -MP -MF "$(DEPDIR)/realtimebattle-MessageWindow.Tpo" -c -o realtimebattle-MessageWindow.o `test -f 'MessageWindow.cc' || echo '$(srcdir)/'`MessageWindow.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-MessageWindow.Tpo" "$(DEPDIR)/realtimebattle-MessageWindow.Po"; else rm -f "$(DEPDIR)/realtimebattle-MessageWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='MessageWindow.cc' object='realtimebattle-MessageWindow.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-MessageWindow.o `test -f 'MessageWindow.cc' || echo '$(srcdir)/'`MessageWindow.cc realtimebattle-MessageWindow.obj: MessageWindow.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-MessageWindow.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-MessageWindow.Tpo" -c -o realtimebattle-MessageWindow.obj `if test -f 'MessageWindow.cc'; then $(CYGPATH_W) 'MessageWindow.cc'; else $(CYGPATH_W) '$(srcdir)/MessageWindow.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-MessageWindow.Tpo" "$(DEPDIR)/realtimebattle-MessageWindow.Po"; else rm -f "$(DEPDIR)/realtimebattle-MessageWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='MessageWindow.cc' object='realtimebattle-MessageWindow.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-MessageWindow.obj `if test -f 'MessageWindow.cc'; then $(CYGPATH_W) 'MessageWindow.cc'; else $(CYGPATH_W) '$(srcdir)/MessageWindow.cc'; fi` realtimebattle-OptionsWindow.o: OptionsWindow.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-OptionsWindow.o -MD -MP -MF "$(DEPDIR)/realtimebattle-OptionsWindow.Tpo" -c -o realtimebattle-OptionsWindow.o `test -f 'OptionsWindow.cc' || echo '$(srcdir)/'`OptionsWindow.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-OptionsWindow.Tpo" "$(DEPDIR)/realtimebattle-OptionsWindow.Po"; else rm -f "$(DEPDIR)/realtimebattle-OptionsWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='OptionsWindow.cc' object='realtimebattle-OptionsWindow.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-OptionsWindow.o `test -f 'OptionsWindow.cc' || echo '$(srcdir)/'`OptionsWindow.cc realtimebattle-OptionsWindow.obj: OptionsWindow.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-OptionsWindow.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-OptionsWindow.Tpo" -c -o realtimebattle-OptionsWindow.obj `if test -f 'OptionsWindow.cc'; then $(CYGPATH_W) 'OptionsWindow.cc'; else $(CYGPATH_W) '$(srcdir)/OptionsWindow.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-OptionsWindow.Tpo" "$(DEPDIR)/realtimebattle-OptionsWindow.Po"; else rm -f "$(DEPDIR)/realtimebattle-OptionsWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='OptionsWindow.cc' object='realtimebattle-OptionsWindow.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-OptionsWindow.obj `if test -f 'OptionsWindow.cc'; then $(CYGPATH_W) 'OptionsWindow.cc'; else $(CYGPATH_W) '$(srcdir)/OptionsWindow.cc'; fi` realtimebattle-StatisticsWindow.o: StatisticsWindow.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-StatisticsWindow.o -MD -MP -MF "$(DEPDIR)/realtimebattle-StatisticsWindow.Tpo" -c -o realtimebattle-StatisticsWindow.o `test -f 'StatisticsWindow.cc' || echo '$(srcdir)/'`StatisticsWindow.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-StatisticsWindow.Tpo" "$(DEPDIR)/realtimebattle-StatisticsWindow.Po"; else rm -f "$(DEPDIR)/realtimebattle-StatisticsWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='StatisticsWindow.cc' object='realtimebattle-StatisticsWindow.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-StatisticsWindow.o `test -f 'StatisticsWindow.cc' || echo '$(srcdir)/'`StatisticsWindow.cc realtimebattle-StatisticsWindow.obj: StatisticsWindow.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-StatisticsWindow.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-StatisticsWindow.Tpo" -c -o realtimebattle-StatisticsWindow.obj `if test -f 'StatisticsWindow.cc'; then $(CYGPATH_W) 'StatisticsWindow.cc'; else $(CYGPATH_W) '$(srcdir)/StatisticsWindow.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-StatisticsWindow.Tpo" "$(DEPDIR)/realtimebattle-StatisticsWindow.Po"; else rm -f "$(DEPDIR)/realtimebattle-StatisticsWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='StatisticsWindow.cc' object='realtimebattle-StatisticsWindow.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-StatisticsWindow.obj `if test -f 'StatisticsWindow.cc'; then $(CYGPATH_W) 'StatisticsWindow.cc'; else $(CYGPATH_W) '$(srcdir)/StatisticsWindow.cc'; fi` realtimebattle-StartTournamentWindow.o: StartTournamentWindow.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-StartTournamentWindow.o -MD -MP -MF "$(DEPDIR)/realtimebattle-StartTournamentWindow.Tpo" -c -o realtimebattle-StartTournamentWindow.o `test -f 'StartTournamentWindow.cc' || echo '$(srcdir)/'`StartTournamentWindow.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-StartTournamentWindow.Tpo" "$(DEPDIR)/realtimebattle-StartTournamentWindow.Po"; else rm -f "$(DEPDIR)/realtimebattle-StartTournamentWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='StartTournamentWindow.cc' object='realtimebattle-StartTournamentWindow.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-StartTournamentWindow.o `test -f 'StartTournamentWindow.cc' || echo '$(srcdir)/'`StartTournamentWindow.cc realtimebattle-StartTournamentWindow.obj: StartTournamentWindow.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-StartTournamentWindow.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-StartTournamentWindow.Tpo" -c -o realtimebattle-StartTournamentWindow.obj `if test -f 'StartTournamentWindow.cc'; then $(CYGPATH_W) 'StartTournamentWindow.cc'; else $(CYGPATH_W) '$(srcdir)/StartTournamentWindow.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-StartTournamentWindow.Tpo" "$(DEPDIR)/realtimebattle-StartTournamentWindow.Po"; else rm -f "$(DEPDIR)/realtimebattle-StartTournamentWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='StartTournamentWindow.cc' object='realtimebattle-StartTournamentWindow.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-StartTournamentWindow.obj `if test -f 'StartTournamentWindow.cc'; then $(CYGPATH_W) 'StartTournamentWindow.cc'; else $(CYGPATH_W) '$(srcdir)/StartTournamentWindow.cc'; fi` realtimebattle-Structs.o: Structs.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Structs.o -MD -MP -MF "$(DEPDIR)/realtimebattle-Structs.Tpo" -c -o realtimebattle-Structs.o `test -f 'Structs.cc' || echo '$(srcdir)/'`Structs.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Structs.Tpo" "$(DEPDIR)/realtimebattle-Structs.Po"; else rm -f "$(DEPDIR)/realtimebattle-Structs.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Structs.cc' object='realtimebattle-Structs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Structs.o `test -f 'Structs.cc' || echo '$(srcdir)/'`Structs.cc realtimebattle-Structs.obj: Structs.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-Structs.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-Structs.Tpo" -c -o realtimebattle-Structs.obj `if test -f 'Structs.cc'; then $(CYGPATH_W) 'Structs.cc'; else $(CYGPATH_W) '$(srcdir)/Structs.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-Structs.Tpo" "$(DEPDIR)/realtimebattle-Structs.Po"; else rm -f "$(DEPDIR)/realtimebattle-Structs.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Structs.cc' object='realtimebattle-Structs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-Structs.obj `if test -f 'Structs.cc'; then $(CYGPATH_W) 'Structs.cc'; else $(CYGPATH_W) '$(srcdir)/Structs.cc'; fi` realtimebattle-ScoreWindow.o: ScoreWindow.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ScoreWindow.o -MD -MP -MF "$(DEPDIR)/realtimebattle-ScoreWindow.Tpo" -c -o realtimebattle-ScoreWindow.o `test -f 'ScoreWindow.cc' || echo '$(srcdir)/'`ScoreWindow.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ScoreWindow.Tpo" "$(DEPDIR)/realtimebattle-ScoreWindow.Po"; else rm -f "$(DEPDIR)/realtimebattle-ScoreWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ScoreWindow.cc' object='realtimebattle-ScoreWindow.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ScoreWindow.o `test -f 'ScoreWindow.cc' || echo '$(srcdir)/'`ScoreWindow.cc realtimebattle-ScoreWindow.obj: ScoreWindow.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ScoreWindow.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-ScoreWindow.Tpo" -c -o realtimebattle-ScoreWindow.obj `if test -f 'ScoreWindow.cc'; then $(CYGPATH_W) 'ScoreWindow.cc'; else $(CYGPATH_W) '$(srcdir)/ScoreWindow.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ScoreWindow.Tpo" "$(DEPDIR)/realtimebattle-ScoreWindow.Po"; else rm -f "$(DEPDIR)/realtimebattle-ScoreWindow.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ScoreWindow.cc' object='realtimebattle-ScoreWindow.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ScoreWindow.obj `if test -f 'ScoreWindow.cc'; then $(CYGPATH_W) 'ScoreWindow.cc'; else $(CYGPATH_W) '$(srcdir)/ScoreWindow.cc'; fi` realtimebattle-ClientInterface.o: ClientInterface.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ClientInterface.o -MD -MP -MF "$(DEPDIR)/realtimebattle-ClientInterface.Tpo" -c -o realtimebattle-ClientInterface.o `test -f 'ClientInterface.cc' || echo '$(srcdir)/'`ClientInterface.cc; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ClientInterface.Tpo" "$(DEPDIR)/realtimebattle-ClientInterface.Po"; else rm -f "$(DEPDIR)/realtimebattle-ClientInterface.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ClientInterface.cc' object='realtimebattle-ClientInterface.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ClientInterface.o `test -f 'ClientInterface.cc' || echo '$(srcdir)/'`ClientInterface.cc realtimebattle-ClientInterface.obj: ClientInterface.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -MT realtimebattle-ClientInterface.obj -MD -MP -MF "$(DEPDIR)/realtimebattle-ClientInterface.Tpo" -c -o realtimebattle-ClientInterface.obj `if test -f 'ClientInterface.cc'; then $(CYGPATH_W) 'ClientInterface.cc'; else $(CYGPATH_W) '$(srcdir)/ClientInterface.cc'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/realtimebattle-ClientInterface.Tpo" "$(DEPDIR)/realtimebattle-ClientInterface.Po"; else rm -f "$(DEPDIR)/realtimebattle-ClientInterface.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ClientInterface.cc' object='realtimebattle-ClientInterface.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realtimebattle_CXXFLAGS) $(CXXFLAGS) -c -o realtimebattle-ClientInterface.obj `if test -f 'ClientInterface.cc'; then $(CYGPATH_W) 'ClientInterface.cc'; else $(CYGPATH_W) '$(srcdir)/ClientInterface.cc'; fi` 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) @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 $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; 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-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS 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 pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ 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 pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am # 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: realtimebattle-1.0.8/src/RealTimeBattle.cc0000644000175000017500000003275310320474715016621 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif # include #include #ifdef HAVE_GETOPT_H # include #else # include "getopt.h" #endif #ifdef HAVE_LOCALE_H # include #endif #include #ifdef FLOATINGPOINT_H #include #endif #ifndef NO_GRAPHICS #include "ControlWindow.h" #endif #ifndef NO_NETWORK #include "ClientInterface.h" #endif #include "ArenaRealTime.h" #include "IntlDefs.h" #include "Options.h" #include "ArenaReplay.h" #include "ArenaController.h" #include #include #include "Various.h" //#include "Server.h" #ifndef WAIT_ANY #define WAIT_ANY (pid_t)-1 #endif class Options the_opts; //class ArenaRealTime the_arena; class ArenaController the_arena_controller; //class Server my_server; #ifndef NO_GRAPHICS class Gui the_gui; class ControlWindow* controlwindow_p; #endif bool no_graphics; void print_help_message() { cout << endl; cout << _(" Usage: RealTimeBattle [options] ") << endl << endl; cout << _(" Options:") << endl; cout << _(" --debug_mode, -d debug mode") << endl; cout << _(" --debug_level [0-5], -D sets the initial debug level. Implies -d") << endl; cout << _(" --normal_mode, -n normal mode (default)") << endl; cout << _(" --competition_mode, -c competition mode") << endl ; cout << endl; cout << _(" --no_graphics, -g no graphics will be displayed") << endl ; cout << _(" --option_file [file], -o selects option-file (default: $HOME/.rtbrc)") << endl; cout << endl; cout << _(" --log_file [file], -l make log file, if 'file' is '-'\n" " the log is sent to STDOUT") << endl; cout << endl; cout << _(" --tournament_file [file], -t specify a tournament file to\n" " autostart a tournament") << endl; cout << endl; cout << _(" --statistics_file [file], -s file to print the statistics to\n" " when autostarting") << endl; cout << endl; cout << _(" --message_file [file], -m redirect messages to 'file'.\n" " With '-' as 'file', STDOUT is used.\n" " If both log and messages are sent\n" " to STDOUT, '-m' will be ignored") << endl; cout << endl; cout << _(" --replay [file] -r a log file to replay.\n" " if '-' is specified as file,\n" " input is taken from STDIN") << endl; cout << endl; cout << _(" --help, -h prints this message") << endl; cout << _(" --version, -v prints the version number") << endl; #ifndef NO_NETWORK cout << _(" --port_number -p specifies the port to listen on (default 32134)") << endl; #endif cout << endl; } #ifndef NO_GRAPHICS gint update_function(gpointer data) { gint res = 1; if( the_arena_controller.is_started() ) res = (gint)the_arena.timeout_function(); #ifndef NO_NETWORK ClientInterface::Instance()->loop(); #endif return res; } #else void update_function(const long int interval_usec) { struct timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = interval_usec; bool res = true; do { timeout.tv_sec = 0; timeout.tv_usec = interval_usec; select(FD_SETSIZE, NULL, NULL, NULL, &timeout); if( the_arena_controller.is_started() ) res = the_arena.timeout_function(); #ifndef NO_NETWORK ClientInterface::Instance()->loop(); #endif } while( res ); } #endif void sig_handler (int signum) { int pid; int status; while (1) { pid = waitpid (WAIT_ANY, &status, WNOHANG); if (pid < 0) { if( errno != ECHILD ) Error(true, "waitpid failed", "RealTimeBattle.cc:sig_handler"); break; } if (pid == 0) break; } // if( signum == SIGCHLD ) cerr << "Sigchld caught!" << endl; // if( signum == SIGPIPE ) cerr << "Sigpipe caught!" << endl; signal(signum, sig_handler); } void sigfpe_handler(int signum) { signal(signum, sigfpe_handler); } void parse_command_line(int argc, char **argv) { int version_flag=false, help_flag=false, graphics_flag=true;int port=32134; int c; istringstream string2number; extern char* optarg; extern int optind; static struct option long_options[] = { //option, argument?, flag, value {"version", 0, &version_flag, true}, {"help", 0, &help_flag, true}, {"debug_mode", 0, &the_arena_controller.game_mode, ArenaBase::DEBUG_MODE}, {"debug_level", 1, 0, 0}, {"normal_mode", 0, &the_arena_controller.game_mode, ArenaBase::NORMAL_MODE}, {"competition_mode", 0, &the_arena_controller.game_mode, ArenaBase::COMPETITION_MODE}, {"option_file", 1, 0, 0}, {"log_file", 1, 0, 0}, {"statistics_file", 1, 0, 0}, {"tournament_file", 1, 0, 0}, {"message_file", 1, 0, 0}, {"replay", 1, 0, 0}, {"no_graphics", 0, &graphics_flag, false}, #ifndef NO_NETWORK {"port_number",1,0,0}, #endif {0, 0, 0, 0} }; for(;;) { int option_index = 0; #ifndef NO_NETWORK c = getopt_long( argc, argv, "dncD:vho:l:s:t:m:r:gp:", long_options, &option_index ); #else c = getopt_long( argc, argv, "dncD:vho:l:s:t:m:r:g", long_options, &option_index ); #endif // Detect the end of the options. if (c == -1) break; switch (c) { case 0: // If this option sets a flag, do nothing else now. if( long_options[option_index].flag != 0 ) break; switch( option_index ) { case 3: { string2number.clear(); string2number.str(optarg); int optarg_num; string2number >> optarg_num; the_arena_controller.debug_level = optarg_num; the_arena_controller.game_mode = ArenaBase::DEBUG_MODE; } break; case 6: the_arena_controller.option_filename = string(optarg); break; case 7: the_arena_controller.log_filename = string(optarg); break; case 8: the_arena_controller.statistics_filename = string(optarg); break; case 9: the_arena_controller.tournament_filename = string(optarg); the_arena_controller.auto_start_and_end = true; break; case 10: the_arena_controller.message_filename = string(optarg); break; case 11: the_arena_controller.replay_filename = string(optarg); break; #ifndef NO_NETWORK case 13: { string2number.clear(); string2number.str(optarg); int optarg_num(-1); string2number >> optarg_num; if (optarg_num<1||optarg_num>65535) { Error( true, "Illegal port number", "RealTimeBattle.cc:parse_command_line" ); exit( EXIT_FAILURE ); } else port=optarg_num; break; } #endif default: Error( true, "Bad error, this shouldn't happen", "RealTimeBattle.cc:parse_command_line" ); exit( EXIT_FAILURE ); } break; case 'd': the_arena_controller.game_mode = ArenaBase::DEBUG_MODE; break; case 'D': { string2number.clear(); string2number.str(optarg); int optarg_num; string2number >> optarg_num; the_arena_controller.debug_level = optarg_num; the_arena_controller.game_mode = ArenaBase::DEBUG_MODE; } break; case 'n': the_arena_controller.game_mode = ArenaBase::NORMAL_MODE; break; case 'c': the_arena_controller.game_mode = ArenaBase::COMPETITION_MODE; break; case 'v': version_flag = true; break; case 'h': help_flag = true; break; case 'o': the_arena_controller.option_filename = string(optarg); break; case 'l': the_arena_controller.log_filename = string(optarg); break; #ifndef NO_NETWORK case 'p': { string2number.clear(); string2number.str(optarg); int optarg_num(-1); string2number >> optarg_num; if (optarg_num<1||optarg_num>65535) { Error( true, "Illegal port number", "RealTimeBattle.cc:parse_command_line" ); exit( EXIT_FAILURE ); } else port=optarg_num; break; } #endif case 's': the_arena_controller.statistics_filename = string(optarg); break; case 't': the_arena_controller.tournament_filename = string(optarg); the_arena_controller.auto_start_and_end = true; break; case 'm': the_arena_controller.message_filename = string(optarg); break; case 'r': the_arena_controller.replay_filename = string(optarg); break; case 'g': graphics_flag = false; break; default: print_help_message(); exit( EXIT_FAILURE ); } } #ifndef NO_NETWORK ClientInterface::set_port(port); #endif if( the_arena_controller.debug_level > max_debug_level ) the_arena_controller.debug_level = 5; if( the_arena_controller.debug_level < 0 ) the_arena_controller.debug_level = 0; if(optind != argc) { print_help_message(); exit( EXIT_FAILURE ); } if( version_flag ) cout << "RealTimeBattle " << VERSION << endl; if( help_flag ) print_help_message(); if( help_flag || version_flag ) exit( EXIT_SUCCESS ); if( the_arena_controller.option_filename.empty() ) { the_opts.get_options_from_rtbrc(); the_arena_controller.option_filename = ".rtbrc"; } else the_opts.read_options_file( the_arena_controller.option_filename,true ); // the_arena_controller.auto_start_and_end // = ( ( the_arena_controller.tournament_filename != "" ) || // ( the_arena_controller.replay_filename == "-" ) ); the_arena_controller.auto_start_and_end = ( !the_arena_controller.tournament_filename.empty() ); no_graphics = !graphics_flag; if( the_arena_controller.auto_start_and_end == false #ifndef NO_GRAPHICS && no_graphics #endif ) { cerr << "No graphics and no tournament file gives me nothing to do. Leaving ..." << endl; exit( EXIT_SUCCESS ); } } int main ( int argc, char* argv[] ) { #ifdef FLOATINGPOINT_H fpsetmask ( ~ (FP_X_INV | FP_X_DZ | FP_X_IMP | FP_X_OFL | FP_X_UFL | FP_X_DNML) ); //fpsetmask ( ~ (FP_X_INV | FP_X_DZ | FP_X_IMP) ); #endif #ifdef HAVE_LOCALE_H setlocale( LC_MESSAGES, "" ); setlocale( LC_NUMERIC, "POSIX" ); #endif #ifdef ENABLE_NLS bindtextdomain ("RealTimeBattle", RTB_LOCALEDIR); // allow german umlauts bind_textdomain_codeset ("RealTimeBattle", "UTF-8"); textdomain ("RealTimeBattle"); #endif #ifndef NO_GRAPHICS gtk_init (&argc, &argv); #endif parse_command_line(argc, argv); if( !the_arena_controller.tournament_filename.empty() ) the_arena_controller.start_realtime_arena(); else if( !the_arena_controller.replay_filename.empty() ) the_arena_controller.start_replay_arena(); signal(SIGCHLD, sig_handler); signal(SIGPIPE, sig_handler); signal(SIGFPE, sigfpe_handler); #ifndef NO_GRAPHICS if( !no_graphics ) { the_gui.set_colours(); controlwindow_p = new ControlWindow( -1, -1, the_opts.get_l( OPTION_CONTROL_WINDOW_POS_X ), the_opts.get_l( OPTION_CONTROL_WINDOW_POS_Y ) ); } gint timeout_tag; double interval = 1000.0*the_opts.get_d( OPTION_UPDATE_INTERVAL ) - 10.0; //updating too fast? if ( interval < 40 ) interval = 40; timeout_tag = gtk_timeout_add( (unsigned int) interval, GtkFunction(update_function), (gpointer) NULL ); gtk_main(); #else update_function( (long int)(the_opts.get_d( OPTION_UPDATE_INTERVAL ) * 1000000.0) ); #endif return EXIT_SUCCESS; } realtimebattle-1.0.8/src/ArenaBase.cc0000644000175000017500000005751610313540141015575 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include using namespace std; #if HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) #else # define dirent direct # define NAMLEN(dirent) (dirent)->d_namlen # if HAVE_SYS_NDIR_H # include # endif # if HAVE_SYS_DIR_H # include # endif # if HAVE_NDIR_H # include # endif #endif //#include "Gui.h" #include "ArenaBase.h" #include "ArenaController.h" //#include "MovingObject.h" //#include "Shape.h" #include "IntlDefs.h" #include "Extras.h" #include "Various.h" #include "Shot.h" #include "Options.h" #include "Wall.h" #include "Robot.h" #ifndef NO_GRAPHICS # include "ControlWindow.h" # include "MessageWindow.h" extern class ControlWindow* controlwindow_p; #endif #ifndef NO_NETWORK #include "ClientInterface.h" #endif ArenaBase::ArenaBase() { state = NOT_STARTED; game_mode = NORMAL_MODE; sequence_nr = 0; sequences_in_tournament = 0; game_nr = 0; games_per_sequence = 0; halt_next = false; pause_after_next_game = false; reset_timer(); //object_lists[ROBOT].set_deletion_responsibility(false); //all_robots_in_sequence.set_deletion_responsibility(false); debug_level = 0; } ArenaBase::~ArenaBase() { // if( filep ) delete filep; state = EXITING; sleep(1); delete_lists(true, true, true, true); } void ArenaBase::set_state( const state_t st ) { state = st; #ifndef NO_GRAPHICS if( !no_graphics ) { string infotext; switch( state ) { case NO_STATE: case NOT_STARTED: infotext = "RealTimeBattle"; break; case STARTING_ROBOTS: infotext = "RTB " + string( _("*Starting robots*") ); break; case SHUTTING_DOWN_ROBOTS: infotext = "RTB " + string( _("*Shutting down robots*") ); break; case BEFORE_GAME_START: case GAME_IN_PROGRESS: infotext = "RealTimeBattle " + string( _("*Running*") ); if( pause_after_next_game ) infotext = "RTB " + string( _("*Pausing after game*") ); break; case PAUSING_BETWEEN_GAMES: case PAUSED: infotext = "RealTimeBattle " + string( _("*Paused*") ); break; case EXITING: infotext = "RealTimeBattle " + string( _("*Exiting*") ); break; case FINISHED: infotext = "RealTimeBattle " + string( _("*Finished*") ); #ifndef NO_NETWORK // set ClientInterface to accept new connection try{ ClientInterface::Instance()->set_accepting(true); }catch(const bad_exception &e){ cerr<< e.what() << endl; } #endif break; default: Error(true, "Unknown state", "ArenaBase::set_state"); } controlwindow_p->set_window_title( infotext ); } #endif } void ArenaBase::interrupt_tournament() { if( state == GAME_IN_PROGRESS || state == PAUSED || state == PAUSING_BETWEEN_GAMES ) { the_arena_controller.auto_start_and_end = false; #ifndef NO_GRAPHICS if( !no_graphics ) { controlwindow_p->remove_replay_widgets(); the_gui.close_scorewindow(); the_gui.close_arenawindow(); the_gui.close_messagewindow(); } #endif delete_lists(true, true, false, true); set_state( FINISHED ); } } // This function takes the statistics and saves into a selected file void ArenaBase::save_statistics_to_file(string filename) { ofstream file(filename.c_str()); stat_t* statp; Robot* robotp; list::const_iterator stat_li; for(list::const_iterator li(all_robots_in_tournament.begin()); li!=all_robots_in_tournament.end() ; ++li ) { robotp = *li; file << robotp->get_robot_name() << ": " << endl; for(stat_li = robotp->get_statistics()->begin(); stat_li != robotp->get_statistics()->end(); ++stat_li) { statp = *stat_li; file << "Seq: " << statp->sequence_nr << " Game: " << statp->game_nr << " Pos: " << statp->position << " Points: " << statp->points << " Time Survived: " << statp->time_survived << " Total Points: " << statp->total_points << endl; } } } void ArenaBase::print_message( const string& messager, const string& text ) { if( use_message_file ) message_file << messager << ": " << text << endl; #ifndef NO_GRAPHICS else if( !no_graphics && the_gui.is_messagewindow_up() ) the_gui.get_messagewindow_p()->add_message( messager, text ); #endif } bool ArenaBase::parse_arena_line(ifstream& file, double& scale, int& succession, double& angle_factor) { char text[20]; double radius, radius2, bounce_c, hardn, thickness; int vertices; Vector2D vec1, vec2, vec0, center; WallLine* wall_linep; WallCircle* wall_circlep; WallInnerCircle* wall_inner_circlep; WallArc* wall_arcp; file >> ws; file.get(text, 20, ' '); if( strcmp(text, "scale" ) == 0 ) { if( succession != 1 ) { Error(false, "Error in arenafile: 'scale' not first", "ArenaBase::parse_arena_line"); return false; } succession = 2; double scl; file >> scl; scale *= scl; } else if( strcmp(text, "angle_unit" ) == 0 ) { char unit[20]; file >> ws; file.get(unit, 20, '\n'); if( strcmp(unit, "radians" ) == 0) angle_factor = 1.0; else if( strcmp(unit, "degrees" ) == 0 ) angle_factor = M_PI / 180.0; else { Error(false, "Error in arenafile: Unknown angle unit: " + string(unit), "ArenaBase::parse_arena_line"); return false; } } else if( strcmp(text, "boundary" ) == 0 ) { if( succession > 2 ) { Error(false, "Error in arenafile: 'boundary' after wallpieces or duplicate", "ArenaBase::parse_arena_line"); return false; } succession = 3; double b1, b2; file >> b1; file >> b2; boundary[0] = Vector2D(scale*b1, scale*b2); file >> b1; file >> b2; boundary[1] = Vector2D(scale*b1, scale*b2); if( boundary[1][0] - boundary[0][0] <= 0 || boundary[1][1] - boundary[0][1] <= 0 ) { Error(false, "Error in arenafile: 'boundary' negative", "ArenaBase::parse_arena_line"); return false; } } else if( strcmp(text, "exclusion_point" ) == 0 ) { if( succession < 3 ) { Error(false, "Error in arenafile: 'boundary' after wallpieces or duplicate", "ArenaBase::parse_arena_line"); return false; } file >> vec1; exclusion_points.push_back(Vector2D(scale*vec1)); } else if( strcmp(text, "inner_circle" ) == 0 ) { if( succession < 3 ) { Error(false, "Error in arenafile: 'inner_circle' before boundary", "ArenaBase::parse_arena_line"); return false; } succession = 4; file >> bounce_c; file >> hardn; file >> vec1; file >> radius; wall_inner_circlep = new WallInnerCircle(scale*vec1, scale*radius, bounce_c, hardn); //object_lists[WALL].insert_first( wall_inner_circlep ); object_lists[WALL].push_front(wall_inner_circlep); } else if( strcmp(text, "circle" ) == 0 ) { if( succession < 3 ) { Error(false, "Error in arenafile: 'circle' before 'boundary'", "ArenaBase::parse_arena_line"); return false; } succession = 4; file >> bounce_c; file >> hardn; file >> vec1; file >> radius; wall_circlep = new WallCircle(scale*vec1, scale*radius, bounce_c, hardn); //object_lists[WALL].insert_last(wall_circlep); object_lists[WALL].push_back(wall_circlep); } else if( strcmp(text, "arc" ) == 0 ) { if( succession < 3 ) { Error(false, "Error in arenafile: 'arc' before 'boundary'", "ArenaBase::parse_arena_line"); return false; } succession = 4; double angle1, angle2; file >> bounce_c; file >> hardn; file >> center; file >> radius; file >> radius2; file >> angle1; file >> angle2; wall_arcp = new WallArc(scale*center, scale*radius, scale*radius2, angle1 * angle_factor, angle2 * angle_factor, bounce_c, hardn); //object_lists[WALL].insert_last(wall_arcp); object_lists[WALL].push_back(wall_arcp); } else if( strcmp(text, "line" ) == 0 ) { if( succession < 3 ) { Error(false, "Error in arenafile: 'line' before 'boundary'", "ArenaBase::parse_arena_line"); return false; } succession = 4; file >> bounce_c; file >> hardn; file >> thickness; thickness *= 0.5; file >> vec1; // start_point file >> vec2; // end_point if( length(vec2-vec1) == 0.0 ) { Error(false, "Error in arenafile: Zero length line", "ArenaBase::parse_arena_line"); return false; } wall_linep = new WallLine(scale*vec1, unit(vec2-vec1), scale*length(vec2-vec1), scale*thickness, bounce_c , hardn); //object_lists[WALL].insert_last( wall_linep ); object_lists[WALL].push_back(wall_linep); } else if( strcmp(text, "polygon" ) == 0 ) { if( succession < 3 ) { Error(false, "Error in arenafile: 'polygon' before 'boundary'", "ArenaBase::parse_arena_line"); return false; } succession = 4; file >> bounce_c; file >> hardn; file >> thickness; thickness *= 0.5; file >> vertices; // number of vertices file >> vec1; // first point wall_circlep = new WallCircle(scale*vec1, scale*thickness, bounce_c, hardn); //object_lists[WALL].insert_last( wall_circlep ); object_lists[WALL].push_back(wall_circlep); for(int i=1; i> vec1; // next point if( length(vec2-vec1) == 0.0 ) { Error(false, "Error in arenafile: Zero length line in polygon", "ArenaBase::parse_arena_line"); return false; } wall_linep = new WallLine(scale*vec2, unit(vec1-vec2), scale*length(vec1-vec2), scale*thickness, bounce_c , hardn); //object_lists[WALL].insert_last( wall_linep ); object_lists[WALL].push_back(wall_linep); wall_circlep = new WallCircle(scale*vec1, scale*thickness, bounce_c, hardn); //object_lists[WALL].insert_last( wall_circlep ); object_lists[WALL].push_back(wall_circlep); } } else if( strcmp(text, "closed_polygon" ) == 0 ) { if( succession < 3 ) { Error(false, "Error in arenafile: 'closed_polygon' before 'boundary'", "ArenaBase::parse_arena_line"); return false; } succession = 4; file >> bounce_c; file >> hardn; file >> thickness; thickness *= 0.5; file >> vertices; // number of vertices file >> vec1; // first point wall_circlep = new WallCircle(scale*vec1, scale*thickness, bounce_c, hardn); //object_lists[WALL].insert_last( wall_circlep ); object_lists[WALL].push_back(wall_circlep); vec0 = vec1; for(int i=1; i> vec1; // next point if( length(vec2-vec1) == 0.0 ) { Error(false, "Error in arenafile: Line in closed_polygon of zero length", "ArenaBase::parse_arena_line"); return false; } wall_linep = new WallLine(scale*vec2, unit(vec1-vec2), scale*length(vec1-vec2), scale*thickness, bounce_c , hardn); //object_lists[WALL].insert_last( wall_linep ); object_lists[WALL].push_back(wall_linep); wall_circlep = new WallCircle(scale*vec1, scale*thickness, bounce_c, hardn); //object_lists[WALL].insert_last( wall_circlep ); object_lists[WALL].push_back(wall_circlep); } if( length(vec0-vec1) == 0.0 ) { Error(false, "Error in arenafile: Last line in closed_polygon of zero length", "ArenaBase::parse_arena_line"); return false; } wall_linep = new WallLine(scale*vec1, unit(vec0-vec1), scale*length(vec0-vec1), scale*thickness, bounce_c , hardn); //object_lists[WALL].insert_last( wall_linep ); object_lists[WALL].push_back(wall_linep); } else if( strcmp(text, "poly_curve" ) == 0 ) { if( succession < 3 ) { Error(false, "Error in arenafile: 'closed_polygon' before 'boundary'", "ArenaBase::parse_arena_line"); return false; } succession = 4; file >> bounce_c; file >> hardn; file >> thickness; thickness *= 0.5; Vector2D current_pos, direction; file >> current_pos; // first point wall_circlep = new WallCircle(scale*current_pos, scale*thickness, bounce_c, hardn); //object_lists[WALL].insert_last( wall_circlep ); object_lists[WALL].push_back(wall_circlep); file >> direction; // start direction direction.normalize(); if( lengthsqr(direction) < 0.01 ) { Error(false, "Error in arenafile: directions must not be zero", "ArenaBase::parse_arena_line"); return false; } vec0 = current_pos; char c; double len, angle, start_angle, end_angle, tmp; bool finish = false; do { file >> c; switch( c ) { case 'L': // line file >> len; if( len <= 0.0 ) { Error(false, "Error in arenafile: Line in poly_curve must be positive", "ArenaBase::parse_arena_line"); return false; } wall_linep = new WallLine(scale*current_pos, direction, scale*len, scale*thickness, bounce_c , hardn); //object_lists[WALL].insert_last( wall_linep ); object_lists[WALL].push_back(wall_linep); current_pos += len * direction; wall_circlep = new WallCircle(scale*current_pos, scale*thickness, bounce_c, hardn); //object_lists[WALL].insert_last( wall_circlep ); object_lists[WALL].push_back(wall_circlep); break; case 'A': // Arc file >> angle; file >> radius; angle *= angle_factor; center = current_pos - rotate90( direction ) * radius * sgn_rtb( angle ); start_angle = vec2angle( current_pos - center ); current_pos = center + radius * angle2vec( start_angle - angle ); end_angle = vec2angle( current_pos - center ); if( angle > 0.0 ) { tmp = start_angle; start_angle = end_angle; end_angle = tmp; } wall_arcp = new WallArc(scale*center, scale*(radius - thickness), scale*(radius + thickness), start_angle, end_angle, bounce_c, hardn); //object_lists[WALL].insert_last(wall_arcp); object_lists[WALL].push_back(wall_arcp); direction = rotate(direction, -angle); wall_circlep = new WallCircle(scale*current_pos, scale*thickness, bounce_c, hardn); //object_lists[WALL].insert_last( wall_circlep ); object_lists[WALL].push_back(wall_circlep); break; case 'T': // Turn file >> angle; direction = rotate( direction, -angle*M_PI/180.0 ); break; case 'C': // connect to start point and quit if( length(vec0 - current_pos ) == 0.0 ) { Error(false, "Error in arenafile: Last line in poly_curve of zero length", "ArenaBase::parse_arena_line"); return false; } wall_linep = new WallLine(scale*current_pos, unit(vec0-current_pos), scale*length(vec0-current_pos), scale*thickness, bounce_c , hardn); //object_lists[WALL].insert_last( wall_linep ); object_lists[WALL].push_back(wall_linep); finish = true; break; case 'Q': // quit finish = true; break; default: Error(false, "Incorrect arenafile, unknown command in poly_curve: " + string(1,c), "ArenaBase::parse_arena_line"); return false; break; } } while( !finish ); } else if( text[0] != '\0' ) { Error(false, "Incorrect arenafile, unknown keyword: " + string(text), "ArenaBase::parse_arena_line"); return false; } return true; } double ArenaBase::get_shortest_distance(const Vector2D& pos, const Vector2D& dir, const double size, object_type& closest_shape, Shape*& colliding_object, const Robot* the_robot) { double dist = infinity_rtb; double d; closest_shape = NOOBJECT; for( int obj_type = ROBOT; obj_type < LAST_OBJECT_TYPE; obj_type++ ) { for( list::const_iterator li(object_lists[obj_type].begin()); li!=object_lists[obj_type].end(); ++li) { if( obj_type != ROBOT || (Robot*)(*li) != the_robot ) { d = (*li)->get_distance(pos, dir, size); if( d < dist) { closest_shape = (object_type)obj_type; colliding_object = *li; dist = d; } } } } return dist; } bool ArenaBase::space_available(const Vector2D& pos, const double margin) { for( int obj_type = ROBOT; obj_type < LAST_OBJECT_TYPE; obj_type++ ) { for( list::const_iterator li(object_lists[obj_type].begin()); li!=object_lists[obj_type].end(); ++li) if( (*li)->within_distance(pos, margin) ) return false; } // Check if it is possible to see any exclusion_points Vector2D vec; double dist; object_type obj_t; Shape* shapep; list::const_iterator li_ex; for( li_ex = exclusion_points.begin(); li_ex != exclusion_points.end(); ++li_ex) { vec = *li_ex; dist = length(vec - pos); if( dist <= margin || dist <= get_shortest_distance(pos, unit(vec - pos), 0.0, obj_t, shapep, (Robot*)NULL) ) return false; } return true; } double ArenaBase::get_shooting_penalty() { return min_rtb( the_opts.get_d(OPTION_SHOOTING_PENALTY), 0.5 / (double)robots_left ); } void ArenaBase::update_timer(const double factor) { double last_timer = current_timer; current_timer = timer.get(); double timescale = 1.0; if( state == GAME_IN_PROGRESS ) timescale = the_opts.get_d(OPTION_TIMESCALE); timestep = min_rtb( (current_timer - last_timer) * timescale, the_opts.get_d(OPTION_MAX_TIMESTEP) ); total_time += timestep*factor; total_time = max_rtb(total_time, 0.0); } void ArenaBase::reset_timer() { total_time = 0.0; current_timer = 0.0; timer.reset(); update_timer(); } void ArenaBase::move_shots(const double time_period) { Shot* shotp; for( list::iterator li(object_lists[SHOT].begin()); li!=object_lists[SHOT].end();) { shotp = (Shot*)(*li); if( shotp->is_alive() ) shotp->move(time_period); if( !shotp->is_alive() ) li=object_lists[SHOT].erase(li); else ++li; } } void ArenaBase::move_shots_no_check(const double time_period) { for( list::const_iterator li(object_lists[SHOT].begin()); li!=object_lists[SHOT].end(); ++li) { ((Shot*)(*li))->move_no_check(time_period); } } void ArenaBase::set_game_mode( const enum game_mode_t gm ) { game_mode = gm; if( game_mode == DEBUG_MODE ) { if( debug_level == 0 ) set_debug_level( the_arena_controller.debug_level ); } else { debug_level = 0; } } int ArenaBase::set_debug_level( const int new_level) { if( new_level > max_debug_level || new_level < 0 || new_level == debug_level ) return debug_level; debug_level = new_level; return debug_level; } void ArenaBase::pause_game_toggle() { if( game_mode != COMPETITION_MODE ) { if( state == GAME_IN_PROGRESS ) set_state( PAUSED ); else if( state == PAUSED ) set_state( GAME_IN_PROGRESS ); halt_next = false; } else { pause_after_next_game = !pause_after_next_game; set_state( state ); // to change control window title } } void ArenaBase::step_paused_game() { if( game_mode == DEBUG_MODE && state == PAUSED ) { halt_next = true; set_state( GAME_IN_PROGRESS ); } } void ArenaBase::delete_lists(const bool kill_robots, const bool del_seq_list, const bool del_tourn_list, const bool del_arena_filename_list, const bool del_robot_obj_list) { // clear the lists; for( int obj_type = ROBOT; obj_type < LAST_OBJECT_TYPE; obj_type++ ) if( obj_type != ROBOT || del_robot_obj_list ) object_lists[obj_type].clear(); exclusion_points.clear(); if( del_seq_list ) { if( kill_robots ) { list::const_iterator li; for( li = all_robots_in_sequence.begin(); li != all_robots_in_sequence.end(); ++li) (*li)->kill_process_forcefully(); } all_robots_in_sequence.clear(); } if( del_tourn_list ) { for(list::iterator li(all_robots_in_tournament.begin()); li!=all_robots_in_tournament.end();++li) delete *li; all_robots_in_tournament.clear(); } if( del_arena_filename_list ) arena_filenames.clear(); } bool ArenaBase::find_object_by_id( list& obj_list, list::iterator & li, const int obj_id ) { for( li = obj_list.begin(); li != obj_list.end(); ++li) { if( (*li)->get_id() == obj_id ) return true; } return false; } bool ArenaBase::find_object_by_id( list& obj_list, list::iterator & li, const int obj_id ) { for( li = obj_list.begin(); li != obj_list.end(); ++li) { if( (*li)->get_id() == obj_id ) return true; } return false; } realtimebattle-1.0.8/src/ArenaController.cc0000644000175000017500000000327210175160716017050 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include "ArenaController.h" #include "ArenaRealTime.h" #include "ArenaReplay.h" ArenaController::ArenaController() { started = false; option_filename = ""; statistics_filename = ""; log_filename = ""; tournament_filename = ""; message_filename = ""; replay_filename = ""; game_mode = ArenaBase::NORMAL_MODE; debug_level = 1; auto_start_and_end = false; } ArenaController::~ArenaController() { if( started ) close_arena(); } void ArenaController::start_realtime_arena() { if( started ) close_arena(); my_arena = new ArenaRealTime(); started = true; realtime = true; } void ArenaController::start_replay_arena() { if( started ) close_arena(); my_arena = new ArenaReplay(); started = true; realtime = false; } void ArenaController::close_arena() { if( started ) { delete my_arena; } started = false; } realtimebattle-1.0.8/src/ArenaRealTime.cc0000644000175000017500000010403210313540141016407 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include using namespace std; //#include "Gui.h" #include "ArenaRealTime.h" #include "ArenaController.h" #include "ArenaWindow.h" //#include "MovingObject.h" //#include "Shape.h" #include "IntlDefs.h" #include "Extras.h" #include "Various.h" #include "Shot.h" #include "Options.h" #include "Wall.h" #include "Robot.h" #include "Broadcast.h" #ifndef NO_GRAPHICS # include "ScoreWindow.h" # include "ControlWindow.h" # include "MessageWindow.h" #endif #ifndef NO_GRAPHICS extern class ControlWindow* controlwindow_p; #endif #ifndef NO_NETWORK #include "ClientInterface.h" #endif ArenaRealTime::ArenaRealTime() { set_game_mode( (ArenaBase::game_mode_t)the_arena_controller.game_mode ); set_filenames( the_arena_controller.log_filename, the_arena_controller.statistics_filename, the_arena_controller.tournament_filename, the_arena_controller.message_filename, the_arena_controller.option_filename ); robots_in_sequence = NULL; } ArenaRealTime::~ArenaRealTime() { for(int i=0; i < sequences_in_tournament; i++) delete [] robots_in_sequence[i]; if( robots_in_sequence != NULL ) delete robots_in_sequence; try{ Broadcast::Instance()->finalize(); }catch(const bad_exception &e){ cerr<< e.what() << endl; } if( use_message_file && message_file ) message_file.close(); } void ArenaRealTime::clear() { delete_lists(true, true, true, true); for(int i=0; i < sequences_in_tournament; i++) delete [] robots_in_sequence[i]; sequence_nr = 0; sequences_in_tournament = 0; set_state( NOT_STARTED ); } void ArenaRealTime::set_filenames( string& log_fname, const string& statistics_fname, const string& tournament_fname, string& message_fname, const string& option_fname ) { bool log_stdout = false; if( !log_fname.empty() ){ if( log_fname=="-" || log_fname=="STDOUT" ){ log_stdout = true; } try{ Broadcast::Instance()->set_logfile(log_fname); }catch(const bad_exception &e){ cerr<< e.what() << endl; } } if( message_fname.empty() ) { use_message_file = false; } else if( message_fname == "-" || message_fname == "STDOUT" ) { if( !log_stdout ) { use_message_file = true; //message_file.attach( STDOUT_FILENO ); message_file.ios::rdbuf(cout.rdbuf()); } else { use_message_file = false; } } else { use_message_file = true; message_file.open( message_fname.c_str(), ios::out); if( !message_file ) { Error( false, "Couldn't open message file. Message file disabled", "ArenaRealTime::set_filenames" ); use_message_file = false; } } statistics_file_name = statistics_fname; tournament_file_name = tournament_fname; option_file_name = option_fname; } bool ArenaRealTime::parse_arena_file(string& filename) { Vector2D vec1, vec2, vec0; ifstream file(filename.c_str()); if( !file ) { Error(false, "Couldn't open arena file" + filename, "ArenaRealtime::parse_arena_file"); return false; } int succession = 1; double scale = the_opts.get_d(OPTION_ARENA_SCALE); double angle_factor = 1.0; do { if ( !file.good() || !parse_arena_line(file, scale, succession, angle_factor) ) { Error(false, "Error parsing arena file " + filename, "ArenaRealtime::parse_arena_file"); file.close(); return false; } } while( !file.eof() ); file.close(); try{ if(Broadcast::Instance()->is_active()){ char buffer[500]; ifstream file(filename.c_str()); if( !file ) { Error(false, "Couldn't open arena file for log file " + filename, "ArenaRealtime::parse_arena_file"); return false; } do { file >> ws; file.get(buffer, 500, '\n'); if( buffer[0] != '\0' ) print_to_logfile('A', buffer); } while( buffer[0] != '\0' ); } }catch(const bad_exception &e){ cerr<< e.what() << endl; } return true; } void ArenaRealTime::print_to_logfile(char first_letter ... ) { try{ if(Broadcast::Instance()->is_active()==false) return; // broadcast is inactive ostream& bcast = *Broadcast::Instance(); va_list args; va_start(args, first_letter); // log 'R' only each OPTION_LOG_EVERY_NTH_UPDATE_INTERVAL if( update_count_for_logging != 0 && first_letter == 'R' ) { va_end(args); return; } bcast << first_letter; int prec = 2; bcast << setiosflags(ios::fixed) << setprecision(prec); ostringstream hex2string; switch(first_letter) { case 'R': // Robot position info bcast << va_arg(args, int ) << " "; // robot id; bcast << va_arg(args, double) << " "; // x bcast << va_arg(args, double) << " "; // y bcast << va_arg(args, double) << " "; // robot angle bcast << va_arg(args, double) << " "; // cannon angle bcast << va_arg(args, double) << " "; // radar angle bcast << va_arg(args, double); // energy break; case 'T': // Time bcast << setprecision(prec+1) << va_arg(args, double); // time elapsed break; case 'P': // Print a robot message bcast << va_arg(args, int ) << " "; // robot id bcast << va_arg(args, char* ); // message to print break; case 'C': // Cookie bcast << va_arg(args, int ) << " "; // cookie id bcast << va_arg(args, double) << " "; // x bcast << va_arg(args, double); // y break; case 'M': // Mine bcast << va_arg(args, int ) << " "; // mine id bcast << va_arg(args, double) << " "; // x bcast << va_arg(args, double); // y break; case 'S': // Shot bcast << va_arg(args, int ) << " "; // shot id bcast << va_arg(args, double) << " "; // x bcast << va_arg(args, double) << " "; // y bcast << setprecision(prec+1) << va_arg(args, double) << " "; // dx/dt bcast << setprecision(prec+1) << va_arg(args, double); // dy/dt break; case 'D': // Die { int obj_type = va_arg(args, int ); bcast << (char)obj_type << " "; // object type to kill bcast << va_arg(args, int) << " "; // object id if( obj_type == 'R' ) { bcast << setprecision(1) << va_arg(args, double) << " "; // robot points received bcast << va_arg(args, int); // position this game } } break; case 'G': // Game begins bcast << va_arg(args, int ) << " "; // sequence number bcast << va_arg(args, int ) << " "; // game number // LOG_FILE << va_arg(args, char*); // arena filename break; case 'H': // Header bcast << va_arg(args, int ) << " "; // number of games per sequence bcast << va_arg(args, int ) << " "; // number of robots per sequence bcast << va_arg(args, int ) << " "; // number of sequences bcast << va_arg(args, int ) << " "; // number of robots // LOG_FILE << va_arg(args, char*); // name of optionfile break; case 'L': // List of robot properties { bcast << va_arg(args, int ) << " "; // robot id hex2string << std::hex << va_arg(args, long ); bcast << hex2string.str() << " "; string name = va_arg(args, char*); // robot name if( name == "" ) name = "Anonymous"; bcast << name; } break; case 'A': // Arena file line bcast << va_arg(args, char*); // line of arena file break; case 'O': { char option_type = (char)va_arg(args, int); bcast << va_arg(args, char*); // Option label switch( option_type ) { case 'D': bcast << va_arg(args, double) ; // Option value break; case 'L': bcast << va_arg(args, long); // Option value break; case 'H': { hex2string << std::hex << va_arg(args, long); bcast << hex2string.str(); // Option value } break; case 'S': bcast << va_arg(args, char*); // Option value break; } } break; default: Error(true, "Unrecognized first letter in logfile", "ArenaRealTime::print_to_logfile"); break; } bcast << endl; va_end(args); }catch(const bad_exception &e){ cerr<< e.what() << endl; } } Vector2D ArenaRealTime::get_random_position() { return Vector2D( boundary[0][0] + (boundary[1][0] - boundary[0][0])* (double)rand()/(double)RAND_MAX, boundary[0][1] + (boundary[1][1] - boundary[0][1])* (double)rand()/(double)RAND_MAX ); } void ArenaRealTime::broadcast(const message_to_robot_type msg_type ...) { va_list args; va_start(args, msg_type); string str = string(message_to_robot[msg_type].msg) + " "; for(int i=0; i::const_iterator li(object_lists[ROBOT].begin()); li!=object_lists[ROBOT].end(); ++li) *(((Robot*)(*li))->get_outstreamp()) << str; } void ArenaRealTime::quit_ordered() { set_state( EXITING ); } bool ArenaRealTime::timeout_function() { #ifndef NO_GRAPHICS int old_total = (int)total_time; #endif if( state != PAUSED ) { update_timer (); } switch(state) { case NOT_STARTED: if( the_arena_controller.auto_start_and_end ) parse_tournament_file( tournament_file_name, (StartTournamentFunction) ArenaRealTime::start_tournament_from_tournament_file, this ); break; case FINISHED: if( the_arena_controller.auto_start_and_end ) { if( statistics_file_name != "" ) save_statistics_to_file( statistics_file_name ); Quit(); } break; case STARTING_ROBOTS: { read_robot_messages(); if( total_time > next_check_time ) if( !start_sequence_follow_up() ) { Error(false, "Error starting game sequence, ending tournament!", "ArenaRealTime::timeout_function"); // Finish tournament game_nr = games_per_sequence; sequence_nr = sequences_in_tournament; end_game(); } } break; case SHUTTING_DOWN_ROBOTS: { list::const_iterator li; for( li = all_robots_in_sequence.begin(); li != all_robots_in_sequence.end(); ++li ) (*li)->get_messages(); if( total_time > next_check_time ) end_sequence_follow_up(); } break; case GAME_IN_PROGRESS: { update(); #ifndef NO_GRAPHICS if((int)total_time > old_total && !no_graphics) the_gui.get_scorewindow_p()->set_window_title(); #endif if( robots_left <= 1 || total_time > the_opts.get_d(OPTION_TIMEOUT) ) { end_game(); } else { if( game_mode == COMPETITION_MODE && total_time > next_check_time ) check_robots(); // Place mines and cookies if( ((double)rand()) / (double)RAND_MAX <= timestep*the_opts.get_d(OPTION_COOKIE_FREQUENCY) ) add_cookie(); if( ((double)rand()) / (double)RAND_MAX <= timestep*the_opts.get_d(OPTION_MINE_FREQUENCY) ) add_mine(); if( halt_next ) { set_state( PAUSED ); halt_next = false; } } } break; case PAUSED: break; case PAUSING_BETWEEN_GAMES: if( !pause_after_next_game ) start_game(); break; case EXITING: return false; case BEFORE_GAME_START: case NO_STATE: Error(true, "Arena shouldn't be in this state here!!", "ArenaRealTime::timeout_function"); } return true; } void ArenaRealTime::update() { print_to_logfile('T', total_time); #ifndef NO_GRAPHICS if( state == GAME_IN_PROGRESS && !no_graphics) the_gui.get_messagewindow_p()->freeze_clist(); #endif read_robot_messages(); move_shots(timestep); update_robots(); #ifndef NO_GRAPHICS if( state == GAME_IN_PROGRESS && !no_graphics) { the_gui.get_arenawindow_p()->draw_moving_objects( true ); the_gui.get_messagewindow_p()->thaw_clist(); } #endif update_count_for_logging++; if( update_count_for_logging == the_opts.get_l(OPTION_LOG_EVERY_NTH_UPDATE_INTERVAL) ) update_count_for_logging = 0; } void ArenaRealTime::add_cookie() { double en = the_opts.get_d(OPTION_COOKIE_MIN_ENERGY) + (the_opts.get_d(OPTION_COOKIE_MAX_ENERGY) - the_opts.get_d(OPTION_COOKIE_MIN_ENERGY)) * (double)rand() / (double)RAND_MAX; bool found_space = false; double r = the_opts.get_d(OPTION_COOKIE_RADIUS); Vector2D pos; for( int i=0; i<100 && !found_space; i++ ) { pos = get_random_position(); found_space = space_available(pos, r*2.0); } if( !found_space ) return; Cookie* cookiep = new Cookie(pos, en); object_lists[COOKIE].push_back( cookiep ); print_to_logfile('C', cookiep->get_id(), pos[0], pos[1]); } void ArenaRealTime::add_mine() { double en = the_opts.get_d(OPTION_MINE_MIN_ENERGY) + (the_opts.get_d(OPTION_MINE_MAX_ENERGY) - the_opts.get_d(OPTION_MINE_MIN_ENERGY)) * (double)rand() / (double)RAND_MAX; bool found_space = false; double r = the_opts.get_d(OPTION_MINE_RADIUS); Vector2D pos; for( int i=0; i<100 && !found_space; i++) { pos = get_random_position(); found_space = space_available(pos, r*2.0); } if( !found_space ) return; Mine* minep = new Mine(pos, en); object_lists[MINE].push_back( minep ); print_to_logfile('M', minep->get_id(), pos[0], pos[1]); } void ArenaRealTime::check_robots() { list::const_iterator li; for( li = all_robots_in_sequence.begin(); li != all_robots_in_sequence.end(); ++li ) { if( (*li)->is_process_running() ) { (*li)->check_process(); } } next_check_time = total_time + the_opts.get_d(OPTION_CHECK_INTERVAL); } void ArenaRealTime::read_robot_messages() { list::const_iterator li; for( li = all_robots_in_sequence.begin(); li != all_robots_in_sequence.end(); ++li ) { if( (*li)->is_alive() || state != GAME_IN_PROGRESS ) (*li)->get_messages(); } } void ArenaRealTime::update_robots() { Robot* robotp; robots_killed_this_round = 0; for( list::const_iterator li(object_lists[ROBOT].begin()); li!=object_lists[ROBOT].end(); ++li) { robotp = (Robot*)(*li); if( robotp->is_alive() ) { robotp->update_radar_and_cannon(timestep); robotp->change_velocity(timestep); robotp->move(timestep); } if( robotp->is_alive() ) robotp->get_messages(); } // Check if robots have died and send energy level for( list::iterator li(object_lists[ROBOT].begin()); li!=object_lists[ROBOT].end();) { robotp = (Robot*)(*li); if( !robotp->is_alive() ) { li=object_lists[ROBOT].erase(li); robots_killed_this_round++; } else { double lvls = (double)the_opts.get_l(OPTION_ROBOT_ENERGY_LEVELS); robotp->send_message( ENERGY, rint( robotp->get_energy() / lvls ) * lvls ); ++li; } } robots_left -= robots_killed_this_round; if( robots_killed_this_round > 0 ) { for( list::const_iterator li(object_lists[ROBOT].begin()); li!=object_lists[ROBOT].end(); ++li) { robotp = (Robot*)(*li); // robotp->add_points(robots_killed_this_round); #ifndef NO_GRAPHICS if( robots_left < 15 && !no_graphics ) robotp->display_score(); #endif } list::const_iterator li2; for( li2 = all_robots_in_sequence.begin(); li2 != all_robots_in_sequence.end(); ++li2 ) if( (*li2)->is_dead_but_stats_not_set() ) (*li2)->set_stats(robots_killed_this_round); broadcast(ROBOTS_LEFT, robots_left); } for( list::const_iterator li(object_lists[ROBOT].begin()); li!=object_lists[ROBOT].end(); ++li) ((Robot*)(*li))->send_signal(); } // coulor_dist is supposed to be a subjective distance between two colours, normalized // to be between 0.0 (same colour) and 1.0 (furthest away). double ArenaRealTime::colour_dist(const long col1, const long int col2) { double red1 = (col1 & 0x0000ff); double green1 = (col1 & 0x00ff00) >> 8; double blue1 = (col1 & 0xff0000) >> 16; double red2 = (col2 & 0x0000ff); double green2 = (col2 & 0x00ff00) >> 8; double blue2 = (col2 & 0xff0000) >> 16; return ( fabs(red1 -red2 ) * log(1.0 + sqrt(red1 +red2 )) + fabs(green1-green2) * log(1.0 + sqrt(green1+green2)) + fabs(blue1 -blue2 ) * log(1.0 + sqrt(blue1 +blue2 )) ) / 2417.8; // return( ((double)abs((col1 & 0xff)*0x101 - col2.blue))* // log(1.0 + sqrt((col1 & 0xff)*0x101 + col2.blue))/log(2.0) + // ((double)abs(((col1 & 0xff00) >> 8)*0x101 - col2.green))* // log(1.0 + sqrt(((col1 & 0xff00) >> 8)*0x101 + col2.green))/log(2.0) + // ((double)abs(((col1 & 0xff0000) >> 16)*0x101 - col2.red))* // log(1.0 + sqrt(((col1 & 0xff0000) >> 16)*0x101 + col2.red))/log(2.0)); } bool ArenaRealTime::is_colour_allowed(const long colour, const double min_dist, const Robot* robotp) { double d; list::const_iterator li; for( li = all_robots_in_sequence.begin(); li != all_robots_in_sequence.end(); ++li ) { if(*li != robotp) { d = colour_dist( colour, (*li)->get_rgb_colour() ); if( d < min_dist ) return false; } } d = colour_dist( colour, the_opts.get_l( OPTION_BACKGROUND_COLOUR ) ); if( d < min_dist ) return false; return true; } long int ArenaRealTime::find_free_colour(const long int home_colour, const long int away_colour, const Robot* robotp, const bool random_colours) { // first check, if Robot is in a team if (robotp->isRobotInTeam()) { // robot will get the same color as its team mates list::const_iterator li; for( li = all_robots_in_sequence.begin(); li != all_robots_in_sequence.end(); ++li ) { if (*li!=robotp && (*li)->is_colour_given() && (*li)->isRobotInTeam() && (*li)->getTeamName()==robotp->getTeamName()) return (*li)->get_rgb_colour(); } } long int tmp_colour; for(double min_dist = 0.1; min_dist > 0.01 ; min_dist *= 0.8) { if( !random_colours ) { if( is_colour_allowed(home_colour, min_dist, robotp) ) return home_colour; if( is_colour_allowed(away_colour, min_dist, robotp) ) return away_colour; } for(int i=0; i<25; i++) { tmp_colour = rand() & 0xffffff; if( is_colour_allowed(tmp_colour, min_dist*2, robotp) ) return tmp_colour; } } Error(true, "Impossible to find colour", "ArenaRealTime::find_free_colour"); return 0; } int ArenaRealTime::set_debug_level( const int new_level) { ArenaBase::set_debug_level(new_level); if( GAME_IN_PROGRESS ) { broadcast(GAME_OPTION, DEBUG_LEVEL, (double)debug_level); } return debug_level; } bool ArenaRealTime::start_game() { // put the arena together if( pause_after_next_game ) { set_state( PAUSING_BETWEEN_GAMES ); return true; } current_arena_nr = current_arena_nr % number_of_arenas+1; string filename; try { filename = arena_filenames.at(current_arena_nr-1); } catch(...) { Error(true, "No such element", "ArenaRealTime::start_game" ); } print_to_logfile('G', sequence_nr, game_nr + 1); if ( !parse_arena_file(filename) ) { Error(false, "Error parsing arena file " + filename, "ArenaRealTime::start_game"); return false; } int charpos; try { if( (charpos = filename.rfind('/',filename.size())) != -1 ) current_arena_filename = filename.substr(charpos+1, filename.size()-charpos-1); else { Error(false, "Incomplete arena file path " + filename, "ArenaRealTime::start_game"); return false; } } catch(exception& e) { Error(true, e.what(), "ArenaRealTime::start_game"); } char msg[128]; snprintf( msg, 127, _("Game %d of sequence %d begins on arena"), game_nr+1, sequence_nr ); print_message( "RealTimeBattle", string(msg) + " " + current_arena_filename ); // reset some variables shot_count = 0; cookie_count = 0; mine_count = 0; // Place robots on the arena Robot* robotp; bool found_space; double angle; Vector2D pos; robots_left = 0; set_state( BEFORE_GAME_START ); list::const_iterator li; for( li = all_robots_in_sequence.begin(); li != all_robots_in_sequence.end(); ++li ) { robotp = *li; robotp->get_messages(); found_space = false; for( int i=0; i<100 && !found_space; i++) { pos = get_random_position(); found_space = space_available(pos, the_opts.get_d(OPTION_ROBOT_RADIUS)*1.2); } if( !found_space ) { Error(false, "Couldn't find space for all robots", "ArenaRealTime::start_game"); return false; } angle = ((double)rand())*2.0*M_PI/RAND_MAX; robotp->set_values_before_game(pos, angle); object_lists[ROBOT].push_back(robotp); robots_left++; robotp->live(); } // print_to_logfile('G', sequence_nr, games_per_sequence - games_remaining_in_sequence + 1); broadcast(GAME_STARTS); broadcast(ROBOTS_LEFT, robots_left); the_opts.broadcast_opts(); update_count_for_logging = 0; print_to_logfile('T', 0.0); for( list::const_iterator li(object_lists[ROBOT].begin()); li!=object_lists[ROBOT].end(); ++li) { robotp = (Robot*)(*li); robotp->send_signal(); robotp->move(0.0); // To log current position } set_state( GAME_IN_PROGRESS ); game_nr++; #ifndef NO_GRAPHICS if( !no_graphics ) { the_gui.get_arenawindow_p()->clear_area(); the_gui.get_arenawindow_p()->drawing_area_scale_changed(); the_gui.get_scorewindow_p()->update_robots(); reset_timer(); // Time should be zero in score window the_gui.get_scorewindow_p()->set_window_title(); the_gui.get_arenawindow_p()->set_window_title(); } #endif reset_timer(); // Game starts ! next_check_time = total_time + the_opts.get_d(OPTION_CHECK_INTERVAL); return true; } bool ArenaRealTime::end_game() { Robot* robotp; int robots_died_by_timeout = robots_left; robots_left = 0; list::const_iterator li; for( li = all_robots_in_sequence.begin(); li != all_robots_in_sequence.end(); ++li ) { robotp = *li; if( robotp->is_alive() || robotp->is_dead_but_stats_not_set() ) { robotp->die(); robotp->set_stats(robots_died_by_timeout, true); } } broadcast(GAME_FINISHES); delete_lists(false, false, false, false); if(game_nr == games_per_sequence) { end_sequence(); return true; } else return start_game(); } void ArenaRealTime::start_sequence() { game_nr = 0; current_arena_nr = 0; // Make list of robots in this sequence for(int i=0; i::const_iterator li(all_robots_in_tournament.begin()); for(int index(1); (li!=all_robots_in_tournament.end()) && (index::const_iterator li; for( li = all_robots_in_sequence.begin(); li != all_robots_in_sequence.end(); ++li ) { robotp = *li; if( robotp->is_networked() ) { *robotp->get_outstreamp() << "@R" << endl; robotp->set_values_at_process_start_up(); } else robotp->start_process(); } // wait a second before checking set_state( STARTING_ROBOTS ); sequence_nr++; reset_timer(); next_check_time = total_time + the_opts.get_d(OPTION_ROBOT_STARTUP_TIME); } bool ArenaRealTime::start_sequence_follow_up() { // check if the process have started correctly Robot* robotp = NULL; list::iterator li; for( li = all_robots_in_sequence.begin(); li != all_robots_in_sequence.end(); ) { robotp = *li; if( !(robotp->is_networked()) && !(robotp->is_process_running()) ) { li = all_robots_in_sequence.erase(li); robots_left--; } else { ++li; if( !robotp->set_and_get_has_competed() ) print_to_logfile('L', robotp->get_id(), robotp->get_rgb_colour(), robotp->get_robot_name().c_str()); if( !robotp->is_name_given() ) { robotp->send_message(WARNING, NAME_NOT_GIVEN, ""); char msg[128]; snprintf( msg, 127, _("Robot with filename %s has not given any name"), robotp->get_robot_filename().c_str() ); print_message( "RealTimeBattle", string(msg) ); } if( !robotp->is_colour_given() ) { robotp->send_message(WARNING, COLOUR_NOT_GIVEN, ""); robotp->set_colour( find_free_colour( 0, 0, robotp, true ) ); robotp->set_colour_given( true ); } } } return start_game(); } void ArenaRealTime::end_sequence() { // kill all robot processes list::const_iterator li; for( li = all_robots_in_sequence.begin(); li != all_robots_in_sequence.end(); ++li ) { (*li)->end_process(); } // wait a second before checking set_state( SHUTTING_DOWN_ROBOTS); next_check_time = total_time + 1.0; } void ArenaRealTime::end_sequence_follow_up() { // check if the process have stopped, otherwise kill Robot* robotp; list::iterator li; for( li = all_robots_in_sequence.begin(); li != all_robots_in_sequence.end(); ) { robotp = *li; if( robotp->is_process_running() ) robotp->kill_process_forcefully(); robotp->delete_pipes(); li = all_robots_in_sequence.erase(li); } if( sequence_nr == sequences_in_tournament ) end_tournament(); else start_sequence(); } void ArenaRealTime::start_tournament_from_tournament_file ( const list& robotfilename_list, const list& arenafilename_list, const int robots_p_game, const int games_p_sequence, const int n_o_sequences, ArenaRealTime* ar_p ) { ar_p->start_tournament( robotfilename_list, arenafilename_list, robots_p_game, games_p_sequence, n_o_sequences ); } void ArenaRealTime:: start_tournament(const list& robotfilename_list, const list& arenafilename_list, const int robots_p_game, const int games_p_sequence, const int n_o_sequences) { clear(); // Open windows if they were closed, else clear them #ifndef NO_GRAPHICS if( !no_graphics ) { if( the_gui.is_messagewindow_up() ) MessageWindow::clear_clist( NULL, the_gui.get_messagewindow_p() ); else //if( !use_message_file ) the_gui.open_messagewindow(); if( !the_gui.is_scorewindow_up() ) the_gui.open_scorewindow(); if( !the_gui.is_arenawindow_up() ) the_gui.open_arenawindow(); } #endif // Create robot classes and put them into start_sequencethe list all_robots_in_tournament number_of_robots = 0; robot_count = 0; Robot* robotp; start_tournament_info_t* infop = NULL; string stringp; list::const_iterator li; for( li = robotfilename_list.begin(); li != robotfilename_list.end(); ++li ) { infop = *li; robotp = new Robot(infop->filename); all_robots_in_tournament.push_back( robotp ); number_of_robots++; } // Create list of arena filenames number_of_arenas = 0; for( li = arenafilename_list.begin(); li != arenafilename_list.end(); ++li ) { stringp = string((*li)->filename); arena_filenames.push_back( stringp ); number_of_arenas++; } robots_per_game = robots_p_game; games_per_sequence = games_p_sequence; sequences_in_tournament = n_o_sequences; // make list of robots to compete in the sequences int games_per_round = binomial(number_of_robots, robots_per_game); int complete_rounds = n_o_sequences / games_per_round; int rem_games = n_o_sequences % games_per_round; robots_in_sequence = new int*[n_o_sequences]; for(int i=0; iset_accepting(false); }catch(const bad_exception &e){ cerr<< e.what() << endl; } #endif // start first sequence print_to_logfile('H', games_per_sequence, robots_per_game, sequences_in_tournament, number_of_robots); the_opts.log_all_options(); sequence_nr = 0; start_sequence(); } void ArenaRealTime::end_tournament() { set_state( FINISHED ); #ifndef NO_GRAPHICS if( !no_graphics ) { // if( !use_message_file ) // the_gui.close_messagewindow(); // the_gui.close_scorewindow(); the_gui.close_arenawindow(); } #endif } realtimebattle-1.0.8/src/ArenaReplay.cc0000644000175000017500000012021110235455375016157 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include using namespace std; #include "ArenaReplay.h" #include "ArenaController.h" #include "IntlDefs.h" #include "Various.h" #include "Options.h" #include "Extras.h" #include "Shot.h" #ifndef NO_GRAPHICS #include "MessageWindow.h" #include "ArenaWindow.h" #include "ScoreWindow.h" #include "ControlWindow.h" #endif #include "Robot.h" const int max_time_infos = 16384; extern class ControlWindow* controlwindow_p; ArenaReplay::ArenaReplay() { reset_timer(); // speed = PLAY; fast_forward_factor = 1.0; state = NOT_STARTED; current_replay_time = 0.0; game_position_in_log = NULL; time_position_in_log = NULL; set_game_mode( (ArenaBase::game_mode_t)the_arena_controller.game_mode ); set_filenames( the_arena_controller.replay_filename, the_arena_controller.message_filename, the_arena_controller.statistics_filename, the_arena_controller.option_filename ); } ArenaReplay::~ArenaReplay() { if( game_position_in_log != NULL ) { for( int i=0; i::const_iterator li; for(li = object_positions_in_log.begin(); li != object_positions_in_log.end(); ++li) delete *li; } bool ArenaReplay::timeout_function() { if( ( state == GAME_IN_PROGRESS || state == BEFORE_GAME_START ) ) update_timer( fast_forward_factor ); else if( state == PAUSED ) update_timer( 0.0 ); switch( state ) { case NOT_STARTED: start_tournament(); break; case GAME_IN_PROGRESS: { #ifndef NO_GRAPHICS int old_total = (int)current_replay_time; #endif parse_this_interval(); #ifndef NO_GRAPHICS if(state!= FINISHED && (int)current_replay_time - old_total != 0 && !no_graphics) { the_gui.get_scorewindow_p()->set_window_title(); if( !log_from_stdin ) controlwindow_p->set_progress_time( current_replay_time ); } #endif } break; case BEFORE_GAME_START: parse_this_interval(); #ifndef NO_GRAPHICS if( !no_graphics ) { if( controlwindow_p->get_displayed() != ControlWindow::REPLAY_WIDGETS && !log_from_stdin ) controlwindow_p->display_replay_widgets(); the_gui.get_arenawindow_p()->drawing_area_scale_changed(); the_gui.get_arenawindow_p()->draw_everything(); the_gui.get_scorewindow_p()->update_robots(); char msg[64]; snprintf(msg, 63, _("Game %d of sequence %d"), game_nr, sequence_nr); print_message( "RealTimeBattle", string(msg) ); } #endif set_state( GAME_IN_PROGRESS ); break; case FINISHED: if( the_arena_controller.auto_start_and_end ) { if( statistics_file_name != "" ) save_statistics_to_file( statistics_file_name ); Quit(); } break; default: break; } return true; } void ArenaReplay::parse_this_interval() { #ifndef NO_GRAPHICS if( state == GAME_IN_PROGRESS && !no_graphics) the_gui.get_messagewindow_p()->freeze_clist(); #endif if( fast_forward_factor > 0.0 ) while( !log_file.eof() && total_time >= current_replay_time ) { parse_this_time_index(); } else { while( !log_file.eof() && total_time <= current_replay_time && step_forward(-1, false) ) { parse_this_time_index(); } } #ifndef NO_GRAPHICS if( state == GAME_IN_PROGRESS && !no_graphics) the_gui.get_messagewindow_p()->thaw_clist(); #endif if( log_file.eof() ) { set_state( FINISHED ); #ifndef NO_GRAPHICS if( !no_graphics ) { controlwindow_p->remove_replay_widgets(); the_gui.close_arenawindow(); } #endif } } void ArenaReplay::parse_this_time_index() { double last_replay_time = current_replay_time; if( log_file.peek() == 'T' ) parse_log_line(); else { //cout << "'T' not first in log_file for parse_this_time_index()" << endl; //cout << "log_file.peek(): " << (char)log_file.peek() << endl; //cout << "current_replay_time: " << current_replay_time << endl; } double next_replay_time = current_replay_time; while( log_file.peek() != 'T' || current_replay_time == 0.0 ) { if( parse_log_line() == '?' ) return; if ( current_replay_time == 0.0 ) next_replay_time = 0.0; // A new game has started } current_replay_time = next_replay_time; move_shots_no_check( current_replay_time - last_replay_time ); #ifndef NO_GRAPHICS if( !no_graphics ) the_gui.get_arenawindow_p()->draw_moving_objects( true ); #endif // check if robots have died and set their points if( robots_killed_this_round != 0 ) { robots_left -= robots_killed_this_round; Robot* robotp; for( list::const_iterator li(object_lists[ROBOT].begin()); li!=object_lists[ROBOT].end(); ++li) { robotp = (Robot*)(*li); if( robotp->is_alive() ) { // robotp->add_points(robots_killed_this_round); #ifndef NO_GRAPHICS if( robots_left < 15 && !no_graphics ) robotp->display_score(); #endif } } robots_killed_this_round = 0; } } void ArenaReplay::start_tournament() { #ifndef NO_GRAPHICS if( !no_graphics ) { if( the_gui.is_messagewindow_up() ) MessageWindow::clear_clist( NULL, the_gui.get_messagewindow_p() ); else //if( !use_message_file ) the_gui.open_messagewindow(); if( !the_gui.is_scorewindow_up() ) the_gui.open_scorewindow(); if( !the_gui.is_arenawindow_up() ) the_gui.open_arenawindow(); } #endif if( !log_from_stdin ) make_statistics_from_file(); set_state( BEFORE_GAME_START ); } bool ArenaReplay::end_game() { } void ArenaReplay::update() { } bool ArenaReplay::start_game() { } void ArenaReplay::start_sequence() { } void ArenaReplay::end_sequence() { } void ArenaReplay::end_tournament() { } char ArenaReplay::parse_log_line() { char first_letter = '?'; log_file >> ws; log_file.get( first_letter ); if( log_file.eof() ) return '?'; // cerr << first_letter; switch( first_letter ) { case 'R': case 'S': case 'M': case 'C': case 'D': // these five are dependent on which direction we are replaying if ( fast_forward_factor > 0.0 ) parse_log_line_forward( first_letter ); else parse_log_line_rewind( first_letter ); break; case 'T': // Time { log_file >> current_replay_time; } break; case 'P': // Print a robot message { int robot_id; char message[200]; log_file >> robot_id; log_file.get( message, 200, '\n' ); list::iterator li; find_object_by_id( object_lists[ROBOT], li, robot_id ); if( li != object_lists[ROBOT].end() ) { Robot* robotp = (Robot*)(*li); print_message( robotp->get_robot_name(), string(message) ); } // else: robot sent a message before first game of sequences. // Robot data is not yet known to us, thus ignore! } break; case 'G': // Game begins { delete_lists(false, false, false, false); reset_timer(); current_replay_time = 0; robots_killed_this_round = 0; robots_left = robots_per_game; log_file >> sequence_nr >> game_nr; if( !log_from_stdin ) get_time_positions_in_game(); list::const_iterator li; for( li = all_robots_in_tournament.begin(); li != all_robots_in_tournament.end(); ++li ) (*li)->set_values_before_game(Vector2D(infinity_rtb,infinity_rtb), 0.0); arena_scale = the_opts.get_d(OPTION_ARENA_SCALE); arena_angle_factor = 1.0; arena_succession = 1; set_state( BEFORE_GAME_START ); #ifndef NO_GRAPHICS controlwindow_p->change_time_limitations(); #endif } break; case 'H': // Header { if( log_from_stdin ) log_file >> games_per_sequence >> robots_per_game >> sequences_in_tournament >> number_of_robots; else { char buffer[400]; log_file.get( buffer, 400, '\n' ); log_file >> ws; } } break; case 'L': // List of robot properties { if( log_from_stdin ) { int robot_id, col; char robot_colour[7]; char name[200]; log_file >> robot_id >> ws; log_file.get( robot_colour, 7, ' '); istringstream string2hex(robot_colour); string2hex >> std::hex >> col; log_file.get( name, 200, '\n' ); Robot* robotp = new Robot( robot_id, col, string(name) ); all_robots_in_tournament.push_back(robotp); // used by statistics } else { char buffer[400]; log_file.get( buffer, 400, '\n' ); log_file >> ws; } } break; case 'A': // Arena file line { parse_arena_line( log_file, arena_scale, arena_succession, arena_angle_factor ); } break; case 'O': // Option { char temp; char label[200]; log_file.get( label, 200, ':'); log_file.get( temp ); option_return_t opt = the_opts.get_option_from_string( string( label ) ); switch( opt.datatype ) { case ENTRY_INT: case ENTRY_HEX: { long val; log_file >> val; // cerr << label << ": " << val << endl; the_opts.get_all_long_options()[opt.option_number].value = val; } break; case ENTRY_DOUBLE: { double val; log_file >> val; // cerr << label << ": " << val << endl; the_opts.get_all_double_options()[opt.option_number].value = val; } break; case ENTRY_CHAR: { char val[400]; log_file.get( val, 400, '\n' ); // cerr << label << ": " << val << endl; the_opts.get_all_string_options()[opt.option_number].value = val; } break; case ENTRY_BOOL: break; default: Error( true, "Unknown datatype", "ArenaReplay::parse_log_line" ); break; } } break; case '?': default: Error( false, "Unrecognized first letter in logfile: " + string(1, first_letter), "ArenaReplay::parse_log_line" ); char buffer[400]; log_file.get( buffer, 400, '\n' ); log_file >> ws; log_file.clear(); break; } log_file >> ws; return first_letter; } void ArenaReplay::parse_log_line_forward( const char first_letter ) { switch( first_letter ) { case 'R': // Robot pos { int robot_id; double x, y, robot_angle, cannon_angle, radar_angle, energy; Robot* robotp = NULL; log_file >> robot_id >> x >> y >> robot_angle >> cannon_angle >> radar_angle >> energy; list::iterator li; if( find_object_by_id( object_lists[ROBOT], li, robot_id ) ) { robotp = (Robot*)(*li); } else { list::iterator li2; if( log_from_stdin && find_object_by_id( all_robots_in_tournament, li2, robot_id ) ) { object_lists[ROBOT].push_back(*li2); robotp = *li2; } else Error(true, "Robot not in list", "ArenaReplay::parse_log_line_forward"); } robotp->change_position( x, y, robot_angle, cannon_angle, radar_angle, energy ); robotp->live(); } break; case 'C': // Cookie { int cookie_id; double x, y; log_file >> cookie_id >> x >> y; Cookie* cookiep = new Cookie( Vector2D(x,y), 0.0, cookie_id); object_lists[COOKIE].push_back( cookiep ); } break; case 'M': // Mine { int mine_id; double x, y; log_file >> mine_id >> x >> y; Mine* minep = new Mine( Vector2D(x,y), 0.0, mine_id); object_lists[MINE].push_back( minep ); } break; case 'S': // Shot { int shot_id; double x, y, dx, dy; log_file >> shot_id >> x >> y >> dx >> dy; Shot* shotp = new Shot( Vector2D(x,y), Vector2D(dx,dy), 0, shot_id ); object_lists[SHOT].push_back( shotp ); } break; case 'D': // Die { char object_type = '?'; int object_id; log_file.get( object_type ); log_file >> object_id; switch( object_type ) { case 'R': { double points_received; int pos_this_game; log_file >> points_received >> pos_this_game; list::iterator li; find_object_by_id( object_lists[ROBOT], li, object_id ); if( li == object_lists[ROBOT].end() ) Error(true, "Dying robot not in list", "ArenaReplay::parse_log_line_forward"); Robot* robotp = (Robot*)(*li); if( robotp->is_alive() ) { robotp->die(); robots_killed_this_round++; robotp->set_stats( points_received, pos_this_game, current_replay_time, log_from_stdin); robotp->change_energy( -robotp->get_energy() ); } } break; case 'C': { list::iterator li; find_object_by_id( object_lists[COOKIE], li, object_id ); if( li == object_lists[COOKIE].end() ) Error(false, "Dying cookie not in list", "ArenaReplay::parse_log_line_forward"); else { ((Cookie*)(*li))->die(); object_lists[COOKIE].erase(li); } } break; case 'M': { list::iterator li; find_object_by_id( object_lists[MINE], li, object_id ); if( li == object_lists[MINE].end() ) Error(false, "Dying mine not in list", "ArenaReplay::parse_log_line_forward"); else { ((Mine*)(*li))->die(); object_lists[MINE].erase(li); } } break; case 'S': { list::iterator li; find_object_by_id( object_lists[SHOT], li, object_id ); if( li == object_lists[SHOT].end() ) Error(false, "Dying shot not in list", "ArenaReplay::parse_log_line_forward"); else { ((Shot*)(*li))->die(); object_lists[SHOT].erase(li); } } break; case '?': default: Error( false, "Unknown object type is dead", "ArenaReplay::parse_log_line_forward" ); break; } } break; } } void ArenaReplay::parse_log_line_rewind( const char first_letter ) { switch( first_letter ) { case 'R': { int robot_id; double x, y, robot_angle, cannon_angle, radar_angle, energy; log_file >> robot_id >> x >> y >> robot_angle >> cannon_angle >> radar_angle >> energy; list::iterator li; find_object_by_id( object_lists[ROBOT], li, robot_id ); if( li == object_lists[ROBOT].end() ) Error(true, "Robot not in list", "ArenaReplay::parse_log_line_rewind"); Robot* robotp = (Robot*)(*li); robotp->change_position( x, y, robot_angle, cannon_angle, radar_angle, energy ); if( !robotp->is_alive() ) { robotp->live(); robots_killed_this_round--; robotp->set_stats(0.0, 0, 0.0, false); // clear position_this_game } } break; case 'C': { int id; double x,y; log_file >> id >> x >> y; list::iterator li; find_object_by_id( object_lists[COOKIE], li, id ); if( li == object_lists[COOKIE].end() ) { // This happens if it dies the round as it is created //Error(false, "Dying cookie not in list", "ArenaReplay::parse_log_line_rewind"); } else { ((Cookie*)(*li))->die(); object_lists[COOKIE].erase(li); } } break; case 'M': { int id; double x,y; log_file >> id >> x >> y; list::iterator li; find_object_by_id( object_lists[MINE], li, id ); if( li == object_lists[MINE].end() ) { // This happens if it dies the round as it is created //Error(false, "Dying mine not in list", "ArenaReplay::parse_log_line_rewind"); } else { ((Mine*)(*li))->die(); object_lists[MINE].erase(li); } } break; case 'S': { int id; double x,y,vx,vy; log_file >> id >> x >> y >> vx >> vy; // cout << "Shot rewind_dying: " << id << endl; list::iterator li; find_object_by_id( object_lists[SHOT], li, id ); if( li == object_lists[SHOT].end() ) { // This happens if it dies the round as it is created //Error(false, "Dying shot not in list", "ArenaReplay::parse_log_line_rewind"); } else { ((Shot*)(*li))->die(); object_lists[SHOT].erase(li); } } break; case 'D': char object_type = '?'; int object_id; log_file.get( object_type ); log_file >> object_id; switch( object_type ) { case 'R': { double pnts; int pos; log_file >> pnts >> pos; // Robot will be revived at the next 'R' line. } break; case 'C': // Cookie { object_pos_info_t* info = find_object_in_log( COOKIE, object_id ); if( info->end_time > info->start_time ) object_lists[COOKIE].push_back ( new Cookie( info->pos, 0.0, info->id ) ); } break; case 'M': // Mine { object_pos_info_t* info = find_object_in_log( MINE, object_id ); if( info->end_time > info->start_time ) object_lists[MINE].push_back ( new Mine( info->pos, 0.0, info->id ) ); } break; case 'S': // Shot { object_pos_info_t* info = find_object_in_log( SHOT, object_id ); if( info->end_time > info->start_time ) object_lists[SHOT].push_back ( new Shot( info->pos + (current_replay_time - info->start_time) * info->vel, info->vel, 0, info->id ) ); } break; } break; } } void ArenaReplay::set_filenames( string& replay_fname, string& message_fname, const string& statistics_fname, const string& option_fname ) { if( replay_fname != "-" ) { log_file.open( replay_fname.c_str() ); if( !log_file ) Error( true, "Couldn't open replay file", "ArenaReplay::set_filenames" ); log_from_stdin = false; } else { // log_file.attach( STDIN_FILENO ); log_file.ios::rdbuf(cin.rdbuf()); if( !log_file ) Error( true, "Couldn't attach to STDIN", "ArenaRealTime::set_filenames" ); log_from_stdin = true; } if( message_fname.empty() ) use_message_file = false; else if( message_fname == "-" || message_fname == "STDOUT" ) { use_message_file = true; // message_file.attach( STDOUT_FILENO ); message_file.ios::rdbuf(cout.rdbuf()); } else { use_message_file = true; message_file.open( message_fname.c_str(), ios::out); if( !message_file ) { Error( false, "Couldn't open message file. Message file disabled", "ArenaRealTime::set_filenames" ); use_message_file = false; } } statistics_file_name = statistics_fname; option_file_name = option_fname; } // Changes game when replaying to fast forward, rewind or normal speed void ArenaReplay::change_speed( const bool forward, const bool fast ) { if( fast_forward_factor < 0 ) { // Parse current time_index in forward direction fast_forward_factor = 1.0; step_forward( 0, true ); } if( !fast || log_from_stdin ) { fast_forward_factor = 1.0; } else if( forward ) { fast_forward_factor = the_opts.get_d( OPTION_FAST_FORWARD_FACTOR ); } else { fast_forward_factor = -the_opts.get_d( OPTION_FAST_FORWARD_FACTOR ); step_forward( 0, true ); } } // Changes the game or sequence number. Mainly after pressing one of // the replay buttons in the control panel. void ArenaReplay::change_game( const int inc_game, const int inc_seq ) { int temp_game = game_nr; int temp_seq = sequence_nr; temp_game += inc_game; temp_seq += inc_seq; if( inc_seq == 0 ) { if( temp_game >= games_per_sequence + 1 ) { temp_game -= games_per_sequence; temp_seq++; } else if( temp_game <= 0 ) { temp_game += games_per_sequence; temp_seq--; } } else if( inc_seq < 0 ) temp_game = games_per_sequence; else if( inc_seq > 0 ) temp_game = 1; if( temp_seq < 1 || temp_seq > sequences_in_tournament ) return; // cout << "Seq: " << temp_seq << " Game: " << temp_game // << " game_pos: " << game_position_in_log[temp_seq-1][temp_game-1] << endl; log_file.seekg( game_position_in_log[temp_seq-1][temp_game-1] ); // cout << log_file.tellg() << " " << (char)log_file.peek() << endl; } // returns true if the step forward succeded bool ArenaReplay::step_forward( const int n_o_steps, const bool clear_time ) { if( !log_from_stdin ) { int index = find_streampos_for_time( current_replay_time ); index += n_o_steps; // cout << "Stepping to index: " << index << endl; if( index >= 0 && index <= max_time_infos && time_position_in_log[index].pos > 0 ) { double last_replay_time = current_replay_time; current_replay_time = time_position_in_log[index].time; log_file.seekg( time_position_in_log[index].pos ); if( clear_time ) { total_time = time_position_in_log[index].time + 0.00001; update_timer(0.0); parse_this_time_index(); } if( n_o_steps != 0 ) move_shots_no_check( current_replay_time - last_replay_time ); #ifndef NO_GRAPHICS if( !no_graphics && n_o_steps != 0 ) { the_gui.get_arenawindow_p()->draw_moving_objects( true ); the_gui.get_scorewindow_p()->set_window_title(); if( !log_from_stdin ) controlwindow_p->set_progress_time( current_replay_time ); } #endif return true; } else return false; } return true; } void ArenaReplay::step_forward_or_backward( const bool forward ) { double fff_tmp = fast_forward_factor; if( forward ) step_forward( 1, true ); else { fast_forward_factor = -1.0; step_forward( 0, true ); step_forward( -1, true); fast_forward_factor = 1.0; step_forward( 0, true ); } fast_forward_factor = fff_tmp; } void ArenaReplay::change_replay_time( const double time ) { if( !log_from_stdin && abs_rtb(time - current_replay_time) > 0.001 ) { int index = find_streampos_for_time( time ); index -= 1; // ?? // cout << "Changed to index: " << index << endl; if( index >= 0 && index <= max_time_infos && time_position_in_log[index].pos > 0 ) { current_replay_time = time_position_in_log[index].time; total_time = time_position_in_log[index].time + 0.00001; update_timer(0.0); log_file.seekg( time_position_in_log[index].pos ); recreate_lists(); } } } // Recreates the object_list[] array to hold what is correct for the current // time, not the old time. void ArenaReplay::recreate_lists() { // Kill och awaken robots that have died or began to live again. { list::iterator li; for( li = object_lists[ROBOT].begin(); li != object_lists[ROBOT].end(); ++li ) { Robot* robotp = (Robot*)(*li); int id = robotp->get_id(); object_pos_info_t* info; if( NULL != (info = find_object_in_log( ROBOT,id ) ) ) { if( info->end_time < current_replay_time && robotp->is_alive() ) { robotp->die(); // TODO: Something more here? robotp->change_energy( -robotp->get_energy() ); } else if( info->end_time > current_replay_time && !(robotp->is_alive()) ) { robotp->live(); // TODO: Something more here? } } else Error(false, "Robot in object_list is not in object_positions_in_log", "ArenaReplay::recreate_lists"); } } // Kill all Shots, mines and cookies that are in the object_list // Create new shots for the new time. { for( int type = SHOT; type <= MINE; (type == SHOT ? type+=2 : type++) ) { list::iterator li; for( li = object_lists[type].begin(); li != object_lists[type].end();) switch( type ) { case SHOT: { ((Shot*)(*li))->die(); li = object_lists[SHOT].erase(li); } break; case COOKIE: { ((Cookie*)(*li))->die(); li = object_lists[COOKIE].erase(li); } break; case MINE: { ((Mine*)(*li))->die(); li = object_lists[MINE].erase(li); } break; default: ++li; break; } } list::const_iterator li; for( li = object_positions_in_log.begin(); li != object_positions_in_log.end(); ++li ) { object_pos_info_t* info = *li; if( current_replay_time > info->start_time && current_replay_time < info->end_time ) { switch( info->obj ) { case SHOT: object_lists[SHOT].push_back ( new Shot( info->pos + (current_replay_time - info->start_time) * info->vel, info->vel, 0, info->id ) ); break; case COOKIE: object_lists[COOKIE].push_back ( new Cookie( info->pos, 0.0, info->id ) ); break; case MINE: object_lists[MINE].push_back ( new Mine( info->pos, 0.0, info->id ) ); break; case ROBOT: break; default: Error(true, "Variable 'type' has a forbidden value. Should never happen", "ArenaReplay::recreate_lists"); } } } } } // Searches the log_file for a line beginning with any of the // letters in 'search_letters'. // The file pointer will be directly after the found letter. // Returns the letter found, or '?' if none found. char ArenaReplay::search_forward( const string& search_letters ) { if( log_from_stdin ) return '?'; char letter; char buffer[400]; log_file >> ws; while( !log_file.eof() ) { log_file.clear(); log_file >> letter; // check first letter of line if( search_letters.find( letter ) != -1 ) { return letter; } log_file >> ws; log_file.get( buffer, 400, '\n' ); // go to next line } return '?'; } // Similar to the previous function, but the argument is a list // of strings (string lengths between 1 and 16) to serach for. // Returns the string found, or the empty string if none found. string ArenaReplay::search_forward( const list& search_strings ) { if( log_from_stdin ) return ""; bool found = false; char buffer[400]; list::const_iterator li; int i; int read_letters; char letter[16]; log_file >> ws; while( !log_file.eof() ) { log_file.clear(); read_letters = 0; for( li = search_strings.begin(); li != search_strings.end() && !found; ++li ) { found = true; for( i=0; i < li->size() && found; i++ ) { if( read_letters < i+1 ) { log_file >> letter[read_letters]; read_letters++; } if( (*li)[i] != letter[i] ) found = false; } if( found ) return *li; } log_file.get( buffer, 400, '\n' ); // go to next line } return ""; } string ArenaReplay::search_backwards( const string& search_letters ) { /* if( log_from_stdin ) return ""; char letter='?'; while( search_letters.find( letter ) == -1 && log_file.tellg() != 0 ) { beginning_of_prev_line(); letter = log_file.peek(); } if( log_file.tellg() == 0 ) return ""; else { char buffer[400]; log_file.get( buffer, 400, '\n' ); beginning_of_current_line(); return (String) buffer; } */ return ""; } void ArenaReplay::beginning_of_prev_line() { /* char letter='?'; bool already_found_one_line = false; while( ( letter != '\n' || !already_found_one_line ) && log_file.tellg() != 0 ) { log_file.seekg( -1, ios::cur ); letter = log_file.peek(); if( letter == '\n' && !already_found_one_line ) { already_found_one_line = true; letter = '?'; } } log_file.get( letter ); */ } void ArenaReplay::beginning_of_current_line() { /* char letter='?'; while( letter != '\n' && log_file.tellg() != 0 ) { log_file.seekg( -1, ios::cur ); letter = log_file.peek(); } log_file.get( letter ); */ } void ArenaReplay::make_statistics_from_file() { list str_list; str_list.push_back( string("DR") ); str_list.push_back( string("L") ); str_list.push_back( string("G") ); str_list.push_back( string("T") ); str_list.push_back( string("H") ); list::iterator li; double points_received; int pos_this_game, object_id; char buffer[400]; string letters; streampos old_pos = log_file.tellg(); while( (letters = search_forward( str_list )) != "" ) { switch( letters[0] ) { case 'D': log_file >> object_id >> points_received >> pos_this_game; find_object_by_id( object_lists[ROBOT], li, object_id ); if( li == object_lists[ROBOT].end() ) Error(true, "Dying robot not in list", "ArenaReplay::make_statistics_from_file"); ((Robot*)(*li))->set_stats( points_received, pos_this_game, current_replay_time, true); break; case 'L': { // check whether the L is not from the arena file if (log_file.peek()==' ') break; int robot_id, col; char robot_colour[7]; char name[200]; log_file >> robot_id >> ws; log_file.get( robot_colour, 7, ' '); istringstream string2hex(robot_colour); string2hex >> std::hex >> col; log_file >> ws; log_file.get( name, 200, '\n' ); Robot* robotp = new Robot( robot_id, col, string(name) ); object_lists[ROBOT].push_back(robotp); // array better? all_robots_in_tournament.push_back(robotp); // used by statistics } break; case 'G': { streampos temp_pos = log_file.tellg(); temp_pos-=1; log_file >> sequence_nr >> game_nr; game_position_in_log[sequence_nr-1][game_nr-1] = temp_pos; } break; case 'T': log_file >> current_replay_time; break; case 'H': if( game_position_in_log != NULL ) { log_file.seekg( old_pos ); return; } log_file >> games_per_sequence >> robots_per_game >> sequences_in_tournament >> number_of_robots; game_position_in_log = new streampos*[sequences_in_tournament]; for( int i=0; i::const_iterator li; for(li = object_positions_in_log.begin(); li != object_positions_in_log.end(); ++li) delete *li; object_positions_in_log.clear(); for(int i=0; i> cur_time; time_position_in_log[time_pos_index].time = cur_time; time_pos_index++; if( time_pos_index >= max_time_infos ) Error(false, "Too many time-info entries", "ArenaReplay::get_time_positions_in_game"); break; case 'S': { int shot_id; double x, y, dx, dy; log_file >> shot_id >> x >> y >> dx >> dy; object_positions_in_log.push_back ( new object_pos_info_t( SHOT, shot_id, Vector2D( x,y ), cur_time, the_opts.get_d( OPTION_TIMEOUT ), Vector2D( dx,dy ) ) ); } break; case 'M': { int mine_id; double x, y; log_file >> mine_id >> x >> y; object_positions_in_log.push_back ( new object_pos_info_t( MINE, mine_id, Vector2D( x,y ), cur_time, the_opts.get_d( OPTION_TIMEOUT ) ) ); } break; case 'C': { int cookie_id; double x, y; log_file >> cookie_id >> x >> y; object_positions_in_log.push_back ( new object_pos_info_t( COOKIE, cookie_id, Vector2D( x,y ), cur_time, the_opts.get_d( OPTION_TIMEOUT ) ) ); } break; case 'R': { int robot_id; double x, y, temp; log_file >> robot_id >> x >> y >> temp >> temp >> temp >> temp; if( NULL == ( find_object_in_log( ROBOT, robot_id ) ) ) { object_positions_in_log.push_back ( new object_pos_info_t( ROBOT, robot_id, Vector2D( x,y ), 0, the_opts.get_d( OPTION_TIMEOUT ) ) ); list::iterator li; find_object_by_id( all_robots_in_tournament, li, robot_id ); object_lists[ROBOT].push_back( *li ); } } break; case 'D': { char obj = '?'; int object_id; log_file.get( obj ); log_file >> object_id; object_type object = NOOBJECT; switch( obj ) { case 'S': object = SHOT; break; case 'M': object = MINE; break; case 'C': object = COOKIE; break; case 'R': object = ROBOT; break; default: break; } if( object != NOOBJECT ) { object_pos_info_t* obj_info; if( NULL != ( obj_info = find_object_in_log( object, object_id ) ) ) { obj_info->end_time = cur_time; } else { ostringstream number2string; number2string << object_id; Error(false, "Dying object not in list: " + string(1,obj) + " " + number2string.str(), "ArenaReplay::get_time_positions_in_game"); } } } break; case 'G': case 'H': last_time_info = time_pos_index - 1; log_file.clear(); log_file.seekg( old_pos ); log_file.clear(); return; break; default: Error(true, "Wrong log line found", "ArenaReplay::get_time_positions_in_game"); break; } log_file.get( buffer, 400, '\n' ); } log_file.clear(); log_file.seekg( old_pos ); log_file.clear(); last_time_info = time_pos_index - 1; } // Finds the index of time_position_in_log which has the largest time // smaller than cur_time int ArenaReplay::find_streampos_for_time(const float cur_time) { // Can be optimized if necessary for(int i=1; i -1; i++) if( cur_time < time_position_in_log[i].time ) return i-1; Error(false, "Time not found", "ArenaReplay::find_streampos_for_time"); return -1; } double ArenaReplay::get_length_of_current_game() { if( time_position_in_log != NULL ) if( last_time_info != 0 ) { // cout << "Game length: " << time_position_in_log[last_time_info].time << endl; return time_position_in_log[last_time_info].time; } // cout << the_opts.get_d( OPTION_TIMEOUT ) + 1.0 << endl; return the_opts.get_d( OPTION_TIMEOUT ) + 1.0; } // Returns NULL if the specified object is not found. ArenaReplay::object_pos_info_t* ArenaReplay::find_object_in_log( object_type obj, int id ) { list::const_iterator li; for( li = object_positions_in_log.begin(); li != object_positions_in_log.end(); ++li ) { if( obj == (*li)->obj && id == (*li)->id ) return *li; } return NULL; } realtimebattle-1.0.8/src/Broadcast.cc0000644000175000017500000000640410313524764015661 0ustar moimoi/* * RealTimeBattle, a robot programming game * Copyright (C) 2005 Volker Stroebel * * 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. */ #include "Broadcast.h" #include #ifndef NO_NETWORK #include "ClientInterface.h" #endif // NO_NETWORK BroadcastBuffer::BroadcastBuffer() #ifndef NO_NETWORK : network_clients(true) #endif { } int BroadcastBuffer::overflow(int c) { #ifndef NO_NETWORK if(network_clients){ if(c != EOF){ char z = c; try{ ClientInterface::Instance()->send(&z,1); }catch(const bad_exception &e){ cerr<< e.what() << endl; } } } #endif // NO_NETWORK if(logfile){ logfile.put(c); } return c; } streamsize BroadcastBuffer::xsputn(const char* s, streamsize num) { #ifndef NO_NETWORK if(network_clients){ try{ ClientInterface::Instance()->send(s,num); }catch(const bad_exception &e){ cerr<< e.what() << endl; } } #endif // NO_NETWORK if(logfile){ logfile.write(s,num); } //we always handle all chars return num; } /** * Set file used for logging */ bool BroadcastBuffer::set_logfile(const string& filename) { if(filename=="-" || filename=="STDOUT"){ logfile.ios::rdbuf(cout.rdbuf()); }else{ logfile.open(filename.c_str(), ios::out); if(!logfile){ cerr << "Warning: unable to open logfile -> " << filename << endl; return false; } } return true; } /** * Close logfile if open */ void BroadcastBuffer::close_logfile() { // if logfile uses cout it shouldn't be open if(logfile.is_open()){ logfile.close(); } } auto_ptr Broadcast::_instance(0); Broadcast::Broadcast() : ostream(0), _use_logfile(false) { rdbuf(&buffer); } Broadcast* Broadcast::Instance () throw(bad_exception) { Broadcast* bcast(Broadcast::_instance.get()); if(bcast==0){ Broadcast::_instance.reset(bcast=new Broadcast()); } return bcast; } /** * set name of the logfile */ void Broadcast::set_logfile(const string& filename) { _use_logfile = buffer.set_logfile(filename); } /** * returns whether broadcast is active */ bool Broadcast::is_active() { #ifndef NO_NETWORK // in network games the stream is always active return true; #else // the stream is active if the logfile is set return _use_logfile; #endif } /** * close logfile if used */ void Broadcast::finalize() { if(_use_logfile){ buffer.close_logfile(); _use_logfile = false; } } realtimebattle-1.0.8/src/Extras.cc0000644000175000017500000000415310175160717015224 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include using namespace std; #include "Extras.h" #include "ArenaController.h" #include "ArenaRealTime.h" #include "ArenaWindow.h" #include "Options.h" Extras::Extras(const Vector2D& c, const double r, const double e, const long int col) : Circle(c, r, col), energy(e) { alive = true; #ifndef NO_GRAPHICS if( !no_graphics ) draw_shape( false ); #endif } Cookie::Cookie(const Vector2D& c, const double e, const int c_id) : Extras(c, the_opts.get_d(OPTION_COOKIE_RADIUS), e, the_opts.get_l(OPTION_COOKIE_COLOUR)) { if( c_id == -1 ) id = the_arena.increase_cookie_count(); else id = c_id; log_file_char = 'C'; } Mine::Mine(const Vector2D& c, const double e, const int m_id ) : Extras(c, the_opts.get_d(OPTION_MINE_RADIUS), e, the_opts.get_l(OPTION_MINE_COLOUR)) { if( m_id == -1 ) id = the_arena.increase_mine_count(); else id = m_id; log_file_char = 'M'; } void Extras::die() { alive = false; #ifndef NO_GRAPHICS if (!no_graphics ) the_gui.get_arenawindow_p()-> draw_circle( last_drawn_center, last_drawn_radius, *(the_gui.get_bg_gdk_colour_p()), true ); #endif if( the_arena_controller.is_realtime() ) realtime_arena.print_to_logfile( 'D', (int)log_file_char, id ); } realtimebattle-1.0.8/src/GeometricalObjects.cc0000644000175000017500000002431110213044471017510 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "GeometricalObjects.h" #include "ArenaWindow.h" #include "Various.h" #include "Gui.h" #include "ArenaController.h" #include "ArenaRealTime.h" // infinity_rtb already #define'd in ArenaBase.h //extern const double infinity_rtb; Line::Line() { start_point = Vector2D(0.0, 0.0); direction = Vector2D(0.0, 0.0); length = 0.0; thickness = 0.0; last_drawn_start_point = Vector2D(-infinity_rtb,-infinity_rtb); last_drawn_direction = Vector2D(-infinity_rtb,-infinity_rtb); last_drawn_length = 0.0; last_drawn_thickness = 0.0; } Line::Line(const Vector2D& sp, const Vector2D& d, const double len, const double th) { last_drawn_start_point = start_point = sp; last_drawn_direction = direction = d; last_drawn_length = length = len; last_drawn_thickness = thickness = th; } // Line::Line(const Vector2D& sp, const Vector2D& d, const double len, // const double th, const double b_c, const double hardn) // { // last_drawn_start_point = start_point = sp; // last_drawn_direction = direction = d; // last_drawn_length = length = len; // last_drawn_thickness = thickness = th; // bounce_coeff = b_c; // hardness_coeff = hardn; // } inline double Line::get_distance(const Vector2D& pos, const Vector2D& vel, const double size) { double det, s, t, d, t_middle; Vector2D y = start_point - pos; det = 1.0 / vedge(direction, vel); t_middle = vedge(direction, y) * det; if( t_middle < 0 ) return infinity_rtb; d = size + thickness; if( det > 0 ) { t = (vedge(direction, y) - d) * det; s = (vedge(vel,y) - d * dot(vel, direction)) * det; } else { t = (vedge(direction, y) + d) * det; s = (vedge(vel,y) + d * dot(vel, direction)) * det; } if( s < 0 || s > length ) return infinity_rtb; if( t < 0 && ((d=-dot(y, direction)) < 0.0 || d > length ) ) return infinity_rtb; return max_rtb(t, 0); } Vector2D Line::get_normal(const Vector2D& pos) { if( vedge( direction , pos-start_point ) > 0.0 ) return rotate90(direction); else return -rotate90(direction); } bool Line::within_distance(const Vector2D& pos, const double size) { Vector2D y = start_point - pos; return ((fabs(vedge(y, direction)) <= (size+thickness)) && (-dot(y,direction) >= 0 && -dot(y,direction) <= length)); } #ifndef NO_GRAPHICS void Line::draw_shape( bool erase ) { if( erase ) the_gui.get_arenawindow_p()->draw_line( last_drawn_start_point, last_drawn_direction, last_drawn_length, last_drawn_thickness, *(the_gui.get_bg_gdk_colour_p()) ); last_drawn_start_point = start_point; last_drawn_direction = direction; last_drawn_length = length; last_drawn_thickness = thickness; the_gui.get_arenawindow_p()->draw_line( start_point, direction, length, thickness, gdk_colour ); } #endif Circle::Circle() { center = Vector2D(0.0, 0.0); radius = 0.0; last_drawn_center = Vector2D(-infinity_rtb,-infinity_rtb); last_drawn_radius = 0.0; } Circle::Circle(const Vector2D& c, const double r) { last_drawn_center = center = c; last_drawn_radius = radius = r; } Circle::Circle(const Vector2D& c, const double r, const long int col) : Shape(col) { last_drawn_center = center = c; last_drawn_radius = radius = r; } // Circle::Circle(const Vector2D& c, const double r, const double b_c, const double hardn) // { // last_drawn_center = center = c; // last_drawn_radius = radius = r; // bounce_coeff = b_c; // hardness_coeff = hardn; // } inline double Circle::get_distance(const Vector2D& pos, const Vector2D& vel, const double size) { Vector2D y = center - pos; double speedsqr = lengthsqr(vel); double dt = dot(vel, y); double r = size+radius; double c = dt*dt + speedsqr * (r*r - lengthsqr(y)); if( c < 0.0 || dt <= 0.0) return infinity_rtb; return max_rtb( (dt - sqrt(c))/speedsqr, 0); } bool Circle::within_distance(const Vector2D& pos, const double size) { return (lengthsqr(center-pos) <= (size+radius)*(size+radius)); } Vector2D Circle::get_normal(const Vector2D& pos) { return unit(pos - center); } #ifndef NO_GRAPHICS void Circle::draw_shape(bool erase) { if( erase ) the_gui.get_arenawindow_p()->draw_circle( last_drawn_center, last_drawn_radius, *(the_gui.get_bg_gdk_colour_p()), true ); last_drawn_center = center; last_drawn_radius = radius; the_gui.get_arenawindow_p()->draw_circle( center, radius, gdk_colour, true ); } #endif InnerCircle::InnerCircle() { center = Vector2D(0.0, 0.0); radius = 0.0; last_drawn_center = Vector2D(-infinity_rtb,-infinity_rtb); last_drawn_radius = 0.0; } InnerCircle::InnerCircle(const Vector2D& c, const double r) { last_drawn_center = center = c; last_drawn_radius = radius = r; } // InnerCircle::InnerCircle(const Vector2D& c, const double r, const double b_c, const double hardn) // { // last_drawn_center = center = c; // last_drawn_radius = radius = r; // bounce_coeff = b_c; // hardness_coeff = hardn; // } inline double InnerCircle::get_distance(const Vector2D& pos, const Vector2D& vel, const double size) { Vector2D y = center - pos; double speedsqr = lengthsqr(vel); if( speedsqr == 0.0 ) return infinity_rtb; double dt = dot(vel, y); double c = dt*dt + speedsqr*((size-radius)*(size-radius) - lengthsqr(y)); return max_rtb( (dt + sqrt(c))/speedsqr, 0 ); } bool InnerCircle::within_distance(const Vector2D& pos, const double size) { return (lengthsqr(center-pos) >= (size-radius)*(size-radius)); } Vector2D InnerCircle::get_normal(const Vector2D& pos) { return unit(center - pos); } #ifndef NO_GRAPHICS void InnerCircle::draw_shape(bool erase) { if( erase ) the_gui.get_arenawindow_p()-> draw_arc( last_drawn_center, last_drawn_radius, last_drawn_radius*1.5, 0.0, 2*M_PI, *(the_gui.get_bg_gdk_colour_p()) ); last_drawn_center = center; last_drawn_radius = radius; the_gui.get_arenawindow_p()-> draw_arc( center, radius, radius*1.5, 0.0, 2*M_PI, gdk_colour ); } #endif // ------- Arc ----------- Arc::Arc() { center = Vector2D(0.0, 0.0); inner_radius = outer_radius = mid_radiussqr = 0.0; start_angle = -M_PI; end_angle = M_PI; last_drawn_center = Vector2D(-infinity_rtb,-infinity_rtb); // last_drawn_radius = 0.0; } Arc::Arc(const Vector2D& c, const double r1, const double r2, const double a1, const double a2 ) { last_drawn_center = center = c; inner_radius = r1; outer_radius = r2; mid_radiussqr = 0.25 * (r1 + r2) * (r1 + r2); start_angle = a1; end_angle = a2; } // Arc::Arc(const Vector2D& c, const double r, const double b_c, const double hardn) // { // last_drawn_center = center = c; // last_drawn_radius = radius = r; // bounce_coeff = b_c; // hardness_coeff = hardn; // } inline double Arc::get_distance(const Vector2D& pos, const Vector2D& vel, const double size) { Vector2D d = center - pos; double speedsqr = lengthsqr(vel); if( speedsqr == 0.0 ) return infinity_rtb; double c, r, t; double dt = dot(vel, d); if( lengthsqr( d ) > mid_radiussqr ) { // Outside circle r = size + outer_radius; c = dt*dt + speedsqr * (r*r - lengthsqr(d)); if( c < 0.0 || dt <= 0.0) return infinity_rtb; t = max_rtb( (dt - sqrt(c))/speedsqr, 0); if( within_angle( vec2angle( vel * t - d ) ) ) return t; // Did hit the outer circle, but not within the angles. // Can still hit inner circle. } // Test inner circle r = size - inner_radius; c = dt*dt + speedsqr*( r*r - lengthsqr(d) ); if( c < 0.0 ) return infinity_rtb; // Can happen if object outside circle t = max_rtb( (dt + sqrt(c))/speedsqr, 0 ); if( !within_angle( vec2angle( vel * t - d ) ) ) return infinity_rtb; return t; } bool Arc::within_distance(const Vector2D& pos, const double size) { Vector2D d = pos - center; double l = lengthsqr( d ); return( l <= (size + outer_radius)*(size + outer_radius) && ( l >= (size - inner_radius)*(size - inner_radius) || size >= inner_radius ) && within_angle( vec2angle( d ) ) ); } // a, start_angle and end_angle should all be betwwen -pi and pi bool Arc::within_angle( const double a ) { if( start_angle <= end_angle ) return ( a >= start_angle && a <= end_angle ); else return ( a >= start_angle || a <= end_angle ); } Vector2D Arc::get_normal(const Vector2D& pos) { Vector2D d = center - pos; if( lengthsqr( d ) < mid_radiussqr ) return unit( d ); else return unit( -d ); } #ifndef NO_GRAPHICS void Arc::draw_shape(bool erase) { if( erase ) the_gui.get_arenawindow_p()->draw_arc( last_drawn_center, inner_radius, outer_radius, start_angle, end_angle, *(the_gui.get_bg_gdk_colour_p()) ); last_drawn_center = center; the_gui.get_arenawindow_p()->draw_arc( center, inner_radius, outer_radius, start_angle, end_angle, gdk_colour ); } #endif realtimebattle-1.0.8/src/Options.cc0000644000175000017500000007014210321161152015375 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include using namespace std; #ifdef HAVE_LOCALE_H # include #endif #include "IntlDefs.h" #include "Options.h" #include "IntlDefs.h" #include "ArenaRealTime.h" #include "ArenaController.h" #include "OptionsWindow.h" #include "Messagetypes.h" #include "Various.h" //extern class ArenaRealTime the_arena; //Warning!!! NO COLONS IN LABELS Options::Options() { #ifdef HAVE_LOCALE_H setlocale( LC_MESSAGES, "" ); setlocale( LC_NUMERIC, "POSIX" ); #endif #ifdef ENABLE_NLS // allow german umlauts bind_textdomain_codeset ("RealTimeBattle", "UTF-8"); #ifdef RTB_LOCALEDIR bindtextdomain( "RealTimeBattle", RTB_LOCALEDIR ); #else bindtextdomain( "RealTimeBattle", "/usr/local/share/locale" ); #endif textdomain( "RealTimeBattle" ); #endif // Entries are: entry_datatype, page in option, // default value, max value, min value, // max letters in entry, // broadcast option?, log option?, description all_double_options[OPTION_GRAV_CONST] = option_info_t(ENTRY_DOUBLE, PAGE_ENVIRONMENT, 9.82, 0.2, 20.0, 12, false, true, "Gravitational Constant", _("Gravitational Constant") ); all_double_options[OPTION_AIR_RESISTANCE] = option_info_t(ENTRY_DOUBLE, PAGE_ENVIRONMENT, 0.005, 0.0, 1.0, 12, false, true, "Air resistance", _("Air resistance") ); all_double_options[OPTION_ROLL_FRICTION] = option_info_t(ENTRY_DOUBLE, PAGE_ENVIRONMENT, 0.002, 0.0, 1.0, 12, false, true, "Roll friction", _("Roll friction") ); all_double_options[OPTION_SLIDE_FRICTION] = option_info_t(ENTRY_DOUBLE, PAGE_ENVIRONMENT, 0.1, 0.0, 5.0, 12, false, true, "Slide/brake friction", _("Slide/brake friction") ); all_long_options[OPTION_SEND_ROBOT_COORDINATES] = option_info_t(ENTRY_INT, PAGE_ENVIRONMENT, 2, 0, 2, 4, true, true, "Send robot coordinates", _("Send robot coordinates") ); all_double_options[OPTION_ROBOT_MAX_ACCELERATION] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, 2.0, 0.1, 10.0, 12, true, true, "Robot max acceleration", _("Robot max acceleration") ); all_double_options[OPTION_ROBOT_MIN_ACCELERATION] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, -0.5, -10.0, 0.0, 12, true, true, "Robot min acceleration", _("Robot min acceleration") ); all_double_options[OPTION_ROBOT_RADIUS] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, 0.5, 0.1, 10.0, 12, false, true, "Robot radius", _("Robot radius") ); all_double_options[OPTION_ROBOT_MASS] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, 1.0, 0.01, 100.0, 12, false, true, "Robot mass", _("Robot mass") ); all_double_options[OPTION_ROBOT_BOUNCE_COEFF] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, 0.7, 0.0, 1.0, 12, false, true, "Robot bounce coefficient", _("Robot bounce coefficient") ); all_double_options[OPTION_ROBOT_HARDNESS] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, 0.5, 0.0, 1.0, 12, false, true, "Robot hardness coefficient", _("Robot hardness coefficient") ); all_double_options[OPTION_ROBOT_PROTECTION] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, 0.5, 0.0, 1.0, 12, false, true, "Robot protection coefficient", _("Robot protection coefficient") ); all_double_options[OPTION_ROBOT_FRONTSIZE] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, M_PI/3.0, 0.0, M_PI*2.0, 12, false, true, "Robot frontsize [radians]", _("Robot frontsize [radians]") ); all_double_options[OPTION_ROBOT_FRONT_BOUNCE_COEFF] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, 0.7, 0.0, 1.0, 12, false, true, "Robot front bounce coefficient", _("Robot front bounce coefficient") ); all_double_options[OPTION_ROBOT_FRONT_HARDNESS] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, 0.9, 0.0, 1.0, 12, false, true, "Robot front hardness coefficient", _("Robot front hardness coefficient") ); all_double_options[OPTION_ROBOT_FRONT_PROTECTION] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, 0.9, 0.0, 1.0, 12, false, true, "Robot front protection coefficient", _("Robot front protection coefficient") ); all_double_options[OPTION_ROBOT_START_ENERGY] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, 100.0, 0.01, 10000.0, 12, true, true, "Robot start energy", _("Robot start energy") ); all_double_options[OPTION_ROBOT_MAX_ENERGY] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, 120.0, 0.01, 10000.0, 12, true, true, "Robot max energy", _("Robot max energy") ); all_double_options[OPTION_ROBOT_MAX_ROTATE] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, 2.0*M_PI / 8.0, 2.0*M_PI / 50.0, 2.0*M_PI * 5.0, 12, true, true, "Robot max rotate speed [rad/s]", _("Robot max rotate speed [rad/s]") ); all_double_options[OPTION_ROBOT_CANNON_MAX_ROTATE] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, 2.0*M_PI / 4.0, 2.0*M_PI / 50.0, 2.0*M_PI * 5.0, 12, true, true, "Robot cannon max rotate speed [rad/s]", _("Robot cannon max rotate speed [rad/s]") ); all_double_options[OPTION_ROBOT_RADAR_MAX_ROTATE] = option_info_t(ENTRY_DOUBLE, PAGE_ROBOT, 2.0*M_PI / 3.0, 2.0*M_PI / 50.0, 2.0*M_PI * 5.0, 12, true, true, "Robot radar max rotate speed [rad/s]", _("Robot radar max rotate speed [rad/s]") ); all_double_options[OPTION_CHECK_INTERVAL] = option_info_t(ENTRY_DOUBLE, PAGE_TIME, 1.0, 0.01, 1000000, 12, false, false, "Process check interval", _("Process check interval") ); all_long_options[OPTION_ROBOT_ENERGY_LEVELS] = option_info_t(ENTRY_INT, PAGE_ROBOT, 10, 1, 100, 4, true, true, "Robot energy levels", _("Robot energy levels") ); all_double_options[OPTION_SHOT_RADIUS] = option_info_t(ENTRY_DOUBLE, PAGE_SHOT, 0.1, 0.01, 1.0, 12, false, true, "Shot radius", _("Shot radius") ); all_double_options[OPTION_SHOT_SPEED] = option_info_t(ENTRY_DOUBLE, PAGE_SHOT, 10.0, 0.1, 100.0, 12, true, true, "Shot speed", _("Shot speed") ); all_double_options[OPTION_SHOOTING_PENALTY] = option_info_t(ENTRY_DOUBLE, PAGE_SHOT, 0.075, 0.0, 1.0, 12, false, true, "Shooting penalty (times shot energy)", _("Shooting penalty (times shot energy)") ); all_double_options[OPTION_SHOT_MIN_ENERGY] = option_info_t(ENTRY_DOUBLE, PAGE_SHOT, 0.5, 0.0, 100.0, 12, true, true, "Shot min energy", _("Shot min energy") ); all_double_options[OPTION_SHOT_MAX_ENERGY] = option_info_t(ENTRY_DOUBLE, PAGE_SHOT, 30.0, 0.0, 100000000.0, 12, true, true, "Shot max energy", _("Shot max energy") ); all_double_options[OPTION_SHOT_ENERGY_INCREASE_SPEED] = option_info_t(ENTRY_DOUBLE, PAGE_SHOT, 10.0, 0.0, 100000000.0, 12, true, true, "Shot energy increase speed [energy/s]", _("Shot energy increase speed [energy/s]") ); all_long_options[OPTION_BACKGROUND_COLOUR] = option_info_t(ENTRY_HEX, PAGE_MISC, 0xfaf0e6, 0x000000, 0xffffff, 6, false, false, "Background colour", _("Background colour") ); all_long_options[OPTION_FOREGROUND_COLOUR] = option_info_t(ENTRY_HEX, PAGE_MISC, 0x000000, 0x000000, 0xffffff, 6, false, false, "Foreground colour", _("Foreground colour") ); all_long_options[OPTION_RTB_MESSAGE_COLOUR] = option_info_t(ENTRY_HEX, PAGE_MISC, 0x1111ee, 0x000000, 0xffffff, 6, false, false, "Colour for RTB messages", _("Colour for RTB messages") ); all_double_options[OPTION_COOKIE_MAX_ENERGY] = option_info_t(ENTRY_DOUBLE, PAGE_EXTRAS, 15.0, 0.0, 100000000.0, 12, false, true, "Cookie max energy", _("Cookie max energy") ); all_double_options[OPTION_COOKIE_MIN_ENERGY] = option_info_t(ENTRY_DOUBLE, PAGE_EXTRAS, 10.0, 0.0, 100000000.0, 12, false, true, "Cookie min energy", _("Cookie min energy") ); all_double_options[OPTION_COOKIE_FREQUENCY] = option_info_t(ENTRY_DOUBLE, PAGE_EXTRAS, 0.03, 0.0, 100000000.0, 12, false, true, "Cookie frequency [cookies per second]", _("Cookie frequency [cookies per second]") ); all_double_options[OPTION_COOKIE_RADIUS] = option_info_t(ENTRY_DOUBLE, PAGE_EXTRAS, 0.3, 0.01, 1.0, 12, false, true, "Cookie radius", _("Cookie radius") ); all_long_options[OPTION_COOKIE_COLOUR] = option_info_t(ENTRY_HEX, PAGE_EXTRAS, 0x35d715, 0x000000, 0xffffff, 6, false, false, "Cookie colour", _("Cookie colour") ); all_double_options[OPTION_MINE_MAX_ENERGY] = option_info_t(ENTRY_DOUBLE, PAGE_EXTRAS, 25.0, 0.0, 100000000.0, 12, false, true, "Mine max energy", _("Mine max energy") ); all_double_options[OPTION_MINE_MIN_ENERGY] = option_info_t(ENTRY_DOUBLE, PAGE_EXTRAS, 15.0, 0.0, 100000000.0, 12, false, true, "Mine min energy", _("Mine min energy") ); all_double_options[OPTION_MINE_FREQUENCY] = option_info_t(ENTRY_DOUBLE, PAGE_EXTRAS, 0.06, 0.0, 100000000.0, 12, false, true, "Mine frequency [mines per second]", _("Mine frequency [mines per second]") ); all_double_options[OPTION_MINE_RADIUS] = option_info_t(ENTRY_DOUBLE, PAGE_EXTRAS, 0.3, 0.01, 1.0, 12, false, true, "Mine radius", _("Mine radius") ); all_long_options[OPTION_MINE_COLOUR] = option_info_t(ENTRY_HEX, PAGE_EXTRAS, 0xff0000, 0x000000, 0xffffff, 6, false, false, "Mine colour", _("Mine colour") ); all_double_options[OPTION_ARENA_SCALE] = option_info_t(ENTRY_DOUBLE, PAGE_MISC, 1.0, 0.001, 1000, 12, false, true, "Arena scale", _("Arena scale") ); all_double_options[OPTION_FAST_FORWARD_FACTOR] = option_info_t(ENTRY_DOUBLE, PAGE_MISC, 5.0, 0.001, 1000, 12, false, false, "Fast forward factor", _("Fast forward factor") ); all_double_options[OPTION_TIMEOUT] = option_info_t(ENTRY_DOUBLE, PAGE_TIME, 120.0, 1.0, 100000000.0, 12, false, true, "Timeout [s]", _("Timeout [s]") ); all_double_options[OPTION_MAX_TIMESTEP] = option_info_t(ENTRY_DOUBLE, PAGE_TIME, 0.1, 0.001, 1.0, 12, false, false, "Max timestep", _("Max timestep") ); all_double_options[OPTION_TIMESCALE] = option_info_t(ENTRY_DOUBLE, PAGE_TIME, 1.0, 0.01, 100.0, 12, false, false, "Timescale", _("Timescale") ); all_double_options[OPTION_UPDATE_INTERVAL] = option_info_t(ENTRY_DOUBLE, PAGE_TIME, 0.050, 0.010, 1.0, 12, false, false, "Update interval [s]", _("Update interval [s]") ); all_double_options[OPTION_ROBOT_STARTUP_TIME] = option_info_t(ENTRY_DOUBLE, PAGE_TIME, 2.0, 0.050, 1000000.0, 12, false, false, "Robot startup time [s]", _("Robot startup time [s]") ); all_double_options[OPTION_CPU_START_LIMIT] = option_info_t(ENTRY_DOUBLE, PAGE_TIME, 5.0, 0.01, 100000000.0, 12, false, false, "Start CPU time [s]", _("Start CPU time [s]") ); all_double_options[OPTION_CPU_EXTRA] = option_info_t(ENTRY_DOUBLE, PAGE_TIME, 2.5, 0.01, 100000000.0, 12, false, false, "Extra CPU time [s]", _("Extra CPU time [s]") ); all_double_options[OPTION_CPU_PERIOD] = option_info_t(ENTRY_DOUBLE, PAGE_TIME, 60.0, 1.0, 100000000.0, 12, false, false, "Extra CPU period [s]", _("Extra CPU period [s]") ); all_double_options[OPTION_CPU_WARNING_PERCENT] = option_info_t(ENTRY_DOUBLE, PAGE_TIME, 0.9, 0.1, 1.0, 12, false, false, "CPU time warning percentage", _("CPU time warning percentage") ); all_long_options[OPTION_LOG_EVERY_NTH_UPDATE_INTERVAL] = option_info_t(ENTRY_INT, PAGE_TIME, 1, 1, 1000, 5, false, false, "Logging frequency [Each nth update interval]", _("Logging frequency [Each n:th update interval]") ); all_long_options[OPTION_MAX_ROBOTS_ALLOWED] = option_info_t(ENTRY_INT, PAGE_MISC, 120, 1, 10000, 6, false, false, "Max robots allowed simultaneously", _("Max robots allowed simultaneously") ); all_string_options[OPTION_ROBOT_SEARCH_PATH] = option_info_t(ENTRY_CHAR, PAGE_MISC, "", "", "", 1000, false, false, "Robot search path", _("Robot search path") ); all_string_options[OPTION_ARENA_SEARCH_PATH] = option_info_t(ENTRY_CHAR, PAGE_MISC, "", "", "", 1000, false, false, "Arena search path", _("Arena search path") ); char* home_dir; string tmp_dir="/rtb"; if( NULL == ( home_dir = getenv("HOME") ) ) tmp_dir="/tmp"+tmp_dir; else tmp_dir=home_dir+tmp_dir; all_string_options[OPTION_TMP_RTB_DIR] = option_info_t(ENTRY_CHAR, PAGE_MISC, tmp_dir, "", "", 1000, false, false, "Directory for temporary files", _("Directory for temporary files") ); all_long_options[OPTION_ARENA_WINDOW_SIZE_X] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 350, 185, 10000, 6, false, false, "Initial Arena window width", _("Initial Arena window width") ); all_long_options[OPTION_ARENA_WINDOW_SIZE_Y] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 350, 120, 10000, 6, false, false, "Initial Arena window height", _("Initial Arena window height") ); all_long_options[OPTION_ARENA_WINDOW_POS_X] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 0, 0, 10000, 6, false, false, "Initial Arena window x position", _("Initial Arena window x position") ); all_long_options[OPTION_ARENA_WINDOW_POS_Y] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 0, 0, 10000, 6, false, false, "Initial Arena window y position", _("Initial Arena window y position") ); all_long_options[OPTION_CONTROL_WINDOW_POS_X] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 0, 0, 10000, 6, false, false, "Initial Control window x position", _("Initial Control window x position") ); all_long_options[OPTION_CONTROL_WINDOW_POS_Y] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 0, 0, 10000, 6, false, false, "Initial Control window y position", _("Initial Control window y position") ); all_long_options[OPTION_MESSAGE_WINDOW_SIZE_X] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 394, 300, 10000, 6, false, false, "Initial Message window width", _("Initial Message window width") ); all_long_options[OPTION_MESSAGE_WINDOW_SIZE_Y] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 210, 110, 10000, 6, false, false, "Initial Message window height", _("Initial Message window height") ); all_long_options[OPTION_MESSAGE_WINDOW_POS_X] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 0, 0, 10000, 6, false, false, "Initial Message window x position", _("Initial Message window x position") ); all_long_options[OPTION_MESSAGE_WINDOW_POS_Y] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 0, 0, 10000, 6, false, false, "Initial Message window y position", _("Initial Message window y position") ); all_long_options[OPTION_SCORE_WINDOW_SIZE_X] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 394, 175, 10000, 6, false, false, "Initial Score window width", _("Initial Score window width") ); all_long_options[OPTION_SCORE_WINDOW_SIZE_Y] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 374, 80, 10000, 6, false, false, "Initial Score window height", _("Initial Score window height") ); all_long_options[OPTION_SCORE_WINDOW_POS_X] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 0, 0, 10000, 6, false, false, "Initial Score window x position", _("Initial Score window x position") ); all_long_options[OPTION_SCORE_WINDOW_POS_Y] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 0, 0, 10000, 6, false, false, "Initial Score window y position", _("Initial Score window y position") ); all_long_options[OPTION_STATISTICS_WINDOW_SIZE_X] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 499, 320, 10000, 6, false, false, "Initial Statistics window width", _("Initial Statistics window width") ); all_long_options[OPTION_STATISTICS_WINDOW_SIZE_Y] = option_info_t(ENTRY_INT, PAGE_SIZE_OF_WINDOWS, 428, 130, 10000, 6, false, false, "Initial Statistics window height", _("Initial Statistics window height") ); #ifndef NO_GRAPHICS optionswindow_p = NULL; #endif } void Options::broadcast_opts() { realtime_arena.broadcast( GAME_OPTION, ROBOT_MAX_ROTATE, get_d(OPTION_ROBOT_MAX_ROTATE)); realtime_arena.broadcast( GAME_OPTION, ROBOT_CANNON_MAX_ROTATE, get_d(OPTION_ROBOT_CANNON_MAX_ROTATE)); realtime_arena.broadcast( GAME_OPTION, ROBOT_RADAR_MAX_ROTATE, get_d(OPTION_ROBOT_RADAR_MAX_ROTATE)); realtime_arena.broadcast( GAME_OPTION, ROBOT_MAX_ACCELERATION, get_d(OPTION_ROBOT_MAX_ACCELERATION)); realtime_arena.broadcast( GAME_OPTION, ROBOT_MIN_ACCELERATION, get_d(OPTION_ROBOT_MIN_ACCELERATION)); realtime_arena.broadcast( GAME_OPTION, ROBOT_START_ENERGY, get_d(OPTION_ROBOT_START_ENERGY)); realtime_arena.broadcast( GAME_OPTION, ROBOT_MAX_ENERGY, get_d(OPTION_ROBOT_MAX_ENERGY)); realtime_arena.broadcast( GAME_OPTION, ROBOT_ENERGY_LEVELS, (double)get_l(OPTION_ROBOT_ENERGY_LEVELS)); realtime_arena.broadcast( GAME_OPTION, SHOT_SPEED, get_d(OPTION_SHOT_SPEED)); realtime_arena.broadcast( GAME_OPTION, SHOT_MIN_ENERGY, get_d(OPTION_SHOT_MIN_ENERGY)); realtime_arena.broadcast( GAME_OPTION, SHOT_MAX_ENERGY, get_d(OPTION_SHOT_MAX_ENERGY)); realtime_arena.broadcast( GAME_OPTION, SHOT_ENERGY_INCREASE_SPEED, get_d(OPTION_SHOT_ENERGY_INCREASE_SPEED)); realtime_arena.broadcast( GAME_OPTION, TIMEOUT, get_d(OPTION_TIMEOUT)); realtime_arena.broadcast( GAME_OPTION, DEBUG_LEVEL, (double)the_arena.get_debug_level()); realtime_arena.broadcast( GAME_OPTION, SEND_ROBOT_COORDINATES, (double)get_l(OPTION_SEND_ROBOT_COORDINATES)); } void Options::log_all_options() { for(int i=0;i> ws; file.get(buffer,100,':'); file.get(temp); string option_name(buffer); if(option_name == "") break; for(int i=0;i> option_value; //file.get(buffer,100,'\n'); option_value = min_rtb( option_value, all_double_options[i].max_value ); option_value = max_rtb( option_value, all_double_options[i].min_value ); all_double_options[i].value = option_value; if(as_default) all_double_options[i].default_value = option_value; option_found_flag = true; } for(int i=0;i> option_value; if( all_long_options[i].datatype == ENTRY_HEX ) { string temp_string; file >> temp_string; while( temp_string[0] == ' ' ) temp_string = temp_string.substr(1); istringstream string2hex(temp_string); string2hex >> std::hex >> option_value; } //file.get(buffer,100,'\n'); option_value = min_rtb( option_value, all_long_options[i].max_value ); option_value = max_rtb( option_value, all_long_options[i].min_value ); all_long_options[i].value = option_value; if(as_default) all_long_options[i].default_value = option_value; option_found_flag = true; } for(int i=0;i> option_value; while( option_value[0] == ' ' ) option_value = option_value.substr(1); //file.get(buffer,100,'\n'); all_string_options[i].value = option_value; if(as_default) all_string_options[i].default_value = option_value; option_found_flag = true; } // if(!option_found_flag) // file.get(buffer,1000,'\n'); } } catch(exception& e) { Error(true, e.what(), "Options::read_options_file"); } } void Options::save_all_options_to_file(string filename, const bool as_default) { if(as_default) { char* home_dir; if( NULL == ( home_dir = getenv("HOME") ) ) return; filename = string(home_dir) + "/.rtbrc"; } ofstream file(filename.c_str(), ios::out); if( !file ) { cerr << "Couldn't open save file" << endl; return; } #ifndef NO_GRAPHICS if( !no_graphics && is_optionswindow_up() ) optionswindow_p->set_all_options(); #endif for(int i=0;i #endif #include #include #include #include #include using namespace std; #ifdef TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include #include #include #include #include "Robot.h" #include "ArenaController.h" #include "ArenaRealTime.h" #include "ArenaReplay.h" #include "Various.h" #include "Options.h" #include "Wall.h" #include "Shot.h" #include "Extras.h" #include "ArenaWindow.h" #ifndef NO_GRAPHICS # include "ScoreWindow.h" #endif // #include "Gui.h" // #include "MovingObject.h" // #include "Arena.h" // #include "Extras.h" // #include "Options.h" // #include "Messagetypes.h" Robot::Robot(const string& filename) { teamname="no team"; current_game_stats_set=false; inteam=false; velocity = Vector2D(0.0, 0.0); acceleration = 0.0; robot_filename = filename; int nr; if( ( nr = robot_filename.rfind( '/', robot_filename.size()) ) == -1 ) robot_plain_filename = robot_filename; else { try { robot_plain_filename = robot_filename.substr(nr+1,robot_filename.size()-nr-1); } catch(exception& e) { Error(true, e.what(), "Robot::Robot"); } } network_robot = false; plain_robot_name = ""; robot_name = ""; robot_name_uniqueness_number = 0; // robot_dir= getenv("RTB_ROBOTDIR"); extra_air_resistance = 0.0; process_running = false; send_usr_signal = false; signal_to_send = 0; send_rotation_reached = 0; alive = false; dead_but_stats_not_set = false; // total_points = 0.0; has_competed = false; id = the_arena.increase_robot_count(); instreamp = NULL; outstreamp = NULL; pipes[0] = pipes[1] = -1; pid = -1; last_drawn_robot_center = Vector2D(infinity_rtb,infinity_rtb); use_non_blocking = get_default_non_blocking_state(); } // Constructor used by ArenaReplay. No process needed. // Robot::Robot(const int r_id, const long int col, const string& name) { teamname="no team"; current_game_stats_set=false; inteam=false; id = r_id; robot_name = name; set_colour( col ); process_running = false; alive = false; // total_points = 0.0; has_competed = false; last_drawn_robot_center = Vector2D(infinity_rtb,infinity_rtb); radius = the_opts.get_d(OPTION_ROBOT_RADIUS); } // attribute is set to true in the parent processs bool Robot::kill_robots(true); Robot::~Robot() { if( the_arena_controller.is_realtime() ) { if( is_process_running() ) kill_process_forcefully(); delete_pipes(); } list::const_iterator li; for(li = statistics.begin(); li != statistics.end(); ++li) delete *li; } bool Robot::isRobotInTeam() const { return inteam; } const string& Robot::getTeamName() const { return teamname; } void Robot::start_process() { int pipe_in[2], pipe_out[2]; if (pipe (pipe_in)) Error(true, "Couldn't setup pipe_in for robot " + robot_filename, "Robot::start_process"); if (pipe (pipe_out)) Error(true, "Couldn't setup pipe_out for robot " + robot_filename, "Robot::start_process"); if( (pid = fork()) < 0 ) Error(true, "Couldn't fork childprocess for robot " + robot_filename, "Robot::start_process"); if(pid == 0) // Child process, to be the new robot { // we are the child process, so if we die before execution of another image, we should not kill the other robots kill_robots=false; // Make pipe_out the standard input for the robot close(pipe_out[1]); dup2(pipe_out[0], STDIN_FILENO); // Make pipe_in the standard output dup2(pipe_in[1],STDOUT_FILENO); close(pipe_in[0]); // Make the pipes non-blocking if( use_non_blocking ) { int pd_flags; if( (pd_flags = fcntl(pipe_out[0], F_GETFL, 0)) == -1 ) Error(true, "Couldn't get pd_flags for pipe_out in robot " + robot_filename, "Robot::start_process, child"); pd_flags |= O_NONBLOCK; if( fcntl(pipe_out[0], F_SETFL, pd_flags) == -1 ) Error(true, "Couldn't change pd_flags for pipe_out in robot " + robot_filename, "Robot::start_process, child"); if( (pd_flags = fcntl(pipe_in[1], F_GETFL, 0)) == -1 ) Error(true, "Couldn't get pd_flags for pipe_in in robot " + robot_filename, "Robot::start_process, child"); pd_flags |= O_NONBLOCK; if( fcntl(pipe_in[1], F_SETFL, pd_flags) == -1 ) Error(true, "Couldn't change pd_flags for pipe_in in robot " + robot_filename, "Robot::start_process, child"); } // Check file attributes struct stat filestat; if( 0 != stat( robot_filename.c_str(), &filestat ) ) Error(true, "Couldn't get stats for robot " + robot_filename, "Robot::start_process, child"); if( !S_ISREG( filestat.st_mode) ) Error(true, "Robot file isn't regular, error for robot " + robot_filename, "Robot::start_process, child"); if( !(filestat.st_mode & S_IXOTH) ) Error(true, "Robot file isn't executable for user, error for robot " + robot_filename, "Robot::start_process, child"); if( (filestat.st_mode & S_ISUID) ) Error(true, "Set user ID is not allowed, error for robot " + robot_filename, "Robot::start_process, child"); // Lower priority by one int old; if( (old = getpriority (PRIO_PROCESS, 0)) == -1 ) Error(true, "Couldn't get priority for robot " + robot_filename, "Robot::start_process, child"); if( setpriority (PRIO_PROCESS, 0, old + 1) == -1) Error(true, "Couldn't set priority for robot " + robot_filename, "Robot::start_process, child"); // Close all pipes not belonging to the robot Robot* robotp; list::const_iterator li; for( li = the_arena.get_all_robots_in_sequence()->begin(); li != the_arena.get_all_robots_in_sequence()->end(); ++li ) { robotp = *li; if( robotp != this ) robotp->delete_pipes(); } // file access and child process creation are now allowed // if( the_arena.get_game_mode() != ArenaBase::DEBUG_MODE ) // { // struct rlimit res_limit; // // Deny file access // if( getrlimit( RLIMIT_NOFILE, &res_limit ) == -1 ) // Error(true, "Couldn't get file limits for robot " + robot_filename, // "Robot::start_process, child"); // //res_limit.rlim_cur = 7; // Don't know why, but it is the lowest number that works // if( setrlimit( RLIMIT_NOFILE, &res_limit ) == -1 ) // Error(true, "Couldn't limit file access for robot " + robot_filename, // "Robot::start_process, child"); // Forbid creation of child processes // #ifdef HAVE_RLIMIT_NPROC // if( getrlimit( RLIMIT_NPROC, &res_limit ) == -1 ) // Error(true, "Couldn't get proc limits for robot " + robot_filename, // "Robot::start_process, child"); // res_limit.rlim_cur = 0; // if( setrlimit( RLIMIT_NPROC, &res_limit ) == -1 ) // Error(true, "Couldn't limit child processes for robot " + robot_filename, // "Robot::start_process, child"); // #endif // } // Execute process. Should not return! if( execl(robot_filename.c_str(), robot_filename.c_str(), NULL) == -1 ) // we are in another process so exiting does not solve the problem Error(true, "Couldn't open robot " + robot_filename, "Robot::start_process, child"); Error(true, "Robot didn't execute, SHOULD NEVER HAPPEN!, error for " + robot_filename, "Robot::start_process, child"); } else { close(pipe_out[0]); // Close input side of pipe_out close(pipe_in[1]); // Close output side of pipe_in pipes[0] = pipe_out[1]; pipes[1] = pipe_in[0]; // Make the pipes non-blocking int pd_flags; if( (pd_flags = fcntl(pipe_in[0], F_GETFL, 0)) == -1 ) Error(true, "Couldn't get pd_flags for pipe_in in robot " + robot_filename, "Robot::start_process, parent"); pd_flags |= O_NONBLOCK; if( fcntl(pipe_in[0], F_SETFL, pd_flags) == -1 ) Error(true, "Couldn't change pd_flags for pipe_in in robot " + robot_filename, "Robot::start_process, parent"); if( (pd_flags = fcntl(pipe_out[1], F_GETFL, 0)) == -1 ) Error(true, "Couldn't get pd_flags for pipe_out in robot " + robot_filename, "Robot::start_process, parent"); pd_flags |= O_NONBLOCK; if( fcntl(pipe_out[1], F_SETFL, pd_flags) == -1 ) Error(true, "Couldn't change pd_flags for pipe_out in robot " + robot_filename, "Robot::start_process, parent"); // Der Schrott geht nimmer in libstdc++ v3 // outstreamp = new ofstream(pipe_out[1]); // instreamp = new ifstream(pipe_in[0]); outstreamp = new boost::fdostream(pipe_out[1]); instreamp = new boost::fdistream(pipe_in[0]); } // wait some time to let process start up struct timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = 40000; // 1/25 s select(FD_SETSIZE, NULL, NULL, NULL, &timeout); set_values_at_process_start_up(); } bool Robot::is_process_running() { return process_running; } void Robot::update_cpu_time_used() { if( network_robot || !process_running ) return; ostringstream number2string; number2string << pid; string procfilename = "/proc/" + number2string.str() + "/stat"; ifstream procfile(procfilename.c_str()); if( !procfile ) return; char buf[64]; // step to the correct value for(int i=0; i<15; i++) procfile >> buf; // The next four values should be added to get the correct cpu usage double current_cpu = 0.0; int jiffies; for(int i=0; i<4; i++) { procfile >> jiffies; current_cpu += (double)jiffies / 100.0; } // if( getrusage( pid, &ru ) != 0 ) return; // current_cpu = ((double)( ru->ru_utime.tv_usec + ru->ru_stime.tv_usec )) / 1e6 + // (double)( ru->ru_utime.tv_sec + ru->ru_stime.tv_sec ); cpu_used += current_cpu - last_cpu; last_cpu = current_cpu; } void Robot::reset_cpu_time() { if( network_robot ) return; update_cpu_time_used(); cpu_used = 0; } void Robot::check_process() { // String procfilename = "/proc/" + String(pid) + "/stat"; if( !is_process_running() || !alive || network_robot ) return; // ifstream procfile(procfilename.chars()); // if( !procfile ) // { // process_running = false; // return; // } // char buf[16]; // for(int i=0; i<13; i++) // procfile >> buf; // int jiffies; // procfile >> jiffies; update_cpu_time_used(); double tot_time = the_arena.get_total_time() + time_survived_in_sequence; if( cpu_used > cpu_limit ) { if( tot_time >= cpu_timeout ) // ok, within time limit { // add extra time reset_cpu_time(); cpu_limit = the_opts.get_d(OPTION_CPU_EXTRA); cpu_warning_limit = cpu_limit * the_opts.get_d(OPTION_CPU_WARNING_PERCENT); cpu_timeout = tot_time + the_opts.get_d(OPTION_CPU_PERIOD); } else // cpu limit exceeded, robot disqualified { die(); // restart with full cpu_time next game reset_cpu_time(); cpu_limit = the_opts.get_d(OPTION_CPU_START_LIMIT); cpu_warning_limit = cpu_limit * the_opts.get_d(OPTION_CPU_WARNING_PERCENT); cpu_timeout = 0.0; } } else if( cpu_used > cpu_warning_limit && tot_time < cpu_timeout ) { ostringstream number2string; number2string << (cpu_limit - cpu_used); send_message( WARNING, PROCESS_TIME_LOW, number2string.str().c_str()); cpu_warning_limit = cpu_limit; // No more warnings } } void Robot::end_process() { send_message(EXIT_ROBOT); send_signal(); } void Robot::send_signal() { if( send_usr_signal ) { if( network_robot ) *outstreamp << "@S" << signal_to_send << endl; else if( pid > 0 ) kill(pid, signal_to_send); } } void Robot::kill_process_forcefully() { // only kill robots if we are the parent process if (kill_robots) { if( network_robot ) *outstreamp << "@K" << endl; else if( pid > 0 ) kill(pid, SIGKILL); delete_pipes(); process_running = false; } } void Robot::delete_pipes() { if( ! network_robot ) { if( instreamp != NULL ) delete instreamp; instreamp = NULL; if( outstreamp != NULL ) delete outstreamp; outstreamp = NULL; } if( pipes[0] != -1 ) { close(pipes[0]); pipes[0] = -1; } if( pipes[1] != -1 ) { close(pipes[1]); pipes[1] = -1; } } void Robot::live() { alive = true; dead_but_stats_not_set = false; } void Robot::die() { if( alive ) { alive = false; dead_but_stats_not_set = true; #ifndef NO_GRAPHICS if( !no_graphics ) { the_gui.get_arenawindow_p()-> draw_circle( last_drawn_center, last_drawn_radius, *(the_gui.get_bg_gdk_colour_p()), true ); last_drawn_robot_center = Vector2D( infinity_rtb, infinity_rtb ); } #endif } } void Robot::set_stats(const int robots_killed_same_time, const bool timeout) { dead_but_stats_not_set = false; int adjust = robots_killed_same_time - 1; if( timeout ) adjust *= 2; position_this_game = the_arena.get_robots_left() + 1; double points = the_arena.get_robots_per_game() - the_arena.get_robots_left() - ((double)adjust) * 0.5; time_survived_in_sequence += the_arena.get_total_time(); send_message(DEAD); send_signal(); realtime_arena.print_to_logfile('D', (int)'R', id, points, position_this_game); stat_t* statp = new stat_t ( the_arena.get_sequence_nr(), the_arena.get_game_nr(), position_this_game, points, the_arena.get_total_time(), get_total_points() + points ); statistics.push_back( statp ); #ifndef NO_GRAPHICS if( !no_graphics ) display_score(); #endif } // Version of set_stats used by ArenaReplay // void Robot::set_stats(const double pnts, const int pos, const double time_survived, const bool make_stats) { position_this_game = pos; time_survived_in_sequence += time_survived; if( make_stats ) { list::const_iterator li(statistics.end()); --li; double total_points = ( statistics.size() > 0 ? (*li)->total_points : 0.0 ); stat_t* statp = new stat_t ( the_arena.get_sequence_nr(), the_arena.get_game_nr(), pos, pnts, time_survived, total_points + pnts ); statistics.push_back( statp ); } #ifndef NO_GRAPHICS if( !no_graphics && !make_stats ) display_score(); #endif } void Robot::change_position( const double x, const double y, const double robot_a, const double cannon_a, const double radar_a, const double en ) { center = Vector2D(x, y); robot_angle.pos = robot_a; cannon_angle.pos = cannon_a; radar_angle.pos = radar_a; energy = en; #ifndef NO_GRAPHICS if( !no_graphics ) display_score(); #endif } void Robot::check_name_uniqueness() { Robot* robotp = NULL; int first_avail = 0; robot_name = plain_robot_name; list::iterator li; for( li = the_arena.get_all_robots_in_tournament()->begin(); li != the_arena.get_all_robots_in_tournament()->end(); ++li ) { robotp = *li; if( robotp != this && plain_robot_name == robotp->plain_robot_name ) { if( robotp->robot_name_uniqueness_number == 0 ) { robotp->robot_name_uniqueness_number = 1; robotp->robot_name += "(1)"; } first_avail = max_rtb( robotp->robot_name_uniqueness_number + 1, first_avail ); if( robot_name_uniqueness_number == robotp->robot_name_uniqueness_number || robot_name_uniqueness_number == 0 ) robot_name_uniqueness_number = first_avail; } } if( robot_name_uniqueness_number > 0 ) { ostringstream number2string; number2string << robot_name_uniqueness_number; robot_name += ('(' + number2string.str() + ')'); } } double Robot::get_total_points() { list::const_iterator li; double total_pnts; if( the_arena_controller.is_realtime() || replay_arena.is_log_from_stdin() ) { li = statistics.end(); --li; total_pnts = ( statistics.size() > 0 ? (*li)->total_points : 0.0 ); if( is_alive() ) total_pnts += the_arena.get_robots_per_game() - the_arena.get_robots_left(); } else // Replaying { list::const_iterator li=get_current_game_stats(); if( is_alive() ) { total_pnts = (*li)->total_points - (*li)->points + the_arena.get_robots_per_game() - the_arena.get_robots_left(); } else // if robot dead total_pnts = (*li)->total_points; } return total_pnts; } int Robot::get_last_position() { list::const_iterator li; if( the_arena_controller.is_realtime() || replay_arena.is_log_from_stdin() ) { li = statistics.end(); --li; if( statistics.size() == 0 ) return 0; if( (*li)->game_nr < the_arena.get_game_nr() ) return (*li)->position; } else { li = get_current_game_stats(); } if( li == statistics.end() ) return 0; if( li == statistics.begin() ) return 0; else li--; if( (*li)->sequence_nr == the_arena.get_sequence_nr() ) return (*li)->position; else return 0; } list::const_iterator Robot::get_current_game_stats() { if( !current_game_stats_set || (*current_game_stats)->sequence_nr != the_arena.get_sequence_nr() || (*current_game_stats)->game_nr != the_arena.get_game_nr() ) { list::const_iterator li; for( li = statistics.begin(); li != statistics.end(); ++li ) { if( (*li)->sequence_nr == the_arena.get_sequence_nr() && (*li)->game_nr == the_arena.get_game_nr() ) { current_game_stats = li; current_game_stats_set=true; return current_game_stats; } } Error(true, "Couldn't find stats", "Robot::get_current_game_stats"); } return current_game_stats; } bool Robot::update_rotation(rotation_t& angle, const double timestep) { angle.pos += timestep * angle.vel; bool rot_reached = false; if( angle.pos >= angle.right && angle.mode == ROTATE_TO_RIGHT ) { angle.set_rot( angle.right, 0.0, -infinity_rtb, infinity_rtb, NORMAL_ROT); if( send_rotation_reached >= 1 ) rot_reached = true; } if( angle.pos >= angle.right && angle.mode == SWEEP_RIGHT ) { angle.set_rot( angle.right, -angle.vel, angle.left, angle.right, SWEEP_LEFT); if( send_rotation_reached >= 2 ) rot_reached = true; } if( angle.pos <= angle.left && angle.mode == ROTATE_TO_LEFT ) { angle.set_rot( angle.left, 0.0, -infinity_rtb, infinity_rtb, NORMAL_ROT); if( send_rotation_reached >= 1 ) rot_reached = true; } if( angle.pos <= angle.left && angle.mode == SWEEP_LEFT ) { angle.set_rot( angle.left, -angle.vel, angle.left, angle.right, SWEEP_RIGHT); if( send_rotation_reached >= 2 ) rot_reached = true; } return rot_reached; } void Robot::update_radar_and_cannon(const double timestep) { int rot_reached = 0; if( update_rotation(robot_angle, timestep) ) rot_reached += 1; if( update_rotation(cannon_angle, timestep) ) rot_reached += 2; if( update_rotation(radar_angle, timestep) ) rot_reached += 4; if( rot_reached > 0 ) send_message(ROTATION_REACHED, rot_reached); shot_energy = min_rtb( the_opts.get_d(OPTION_SHOT_MAX_ENERGY), shot_energy+timestep*the_opts.get_d(OPTION_SHOT_ENERGY_INCREASE_SPEED) ); object_type closest_arenaobject; Shape* col_obj; double dist = the_arena. get_shortest_distance(center, angle2vec(radar_angle.pos+robot_angle.pos), 0.0, closest_arenaobject, col_obj, this); send_message(RADAR, dist, closest_arenaobject, radar_angle.pos); if( closest_arenaobject == ROBOT ) { double lvls = (double)the_opts.get_l(OPTION_ROBOT_ENERGY_LEVELS); // Here teammate information is added Robot* bot= (Robot*)col_obj; double en = bot->get_energy(); send_message(ROBOT_INFO, rint( en / lvls ) * lvls, inteam && bot->inteam && (teamname == bot->teamname)); } if( the_opts.get_l(OPTION_SEND_ROBOT_COORDINATES) == 1 ) // Relative starting pos send_message(COORDINATES, center[0] - start_pos[0], center[1] - start_pos[1], robot_angle.pos - start_angle); if( the_opts.get_l(OPTION_SEND_ROBOT_COORDINATES) == 2 ) // Absolute coordinates send_message(COORDINATES, center[0], center[1], robot_angle.pos); send_message(INFO, the_arena.get_total_time(), length(velocity), cannon_angle.pos); } void Robot::bounce_on_wall(const double bounce_c, const double hardness_c, const Vector2D& normal) { double h, p, b; if( -dot(normal, angle2vec(robot_angle.pos)) > cos(the_opts.get_d(OPTION_ROBOT_FRONTSIZE)*0.5) ) { h = the_opts.get_d(OPTION_ROBOT_FRONT_HARDNESS); b = the_opts.get_d(OPTION_ROBOT_FRONT_BOUNCE_COEFF); p = the_opts.get_d(OPTION_ROBOT_FRONT_PROTECTION); } else { h = the_opts.get_d(OPTION_ROBOT_HARDNESS); b = the_opts.get_d(OPTION_ROBOT_BOUNCE_COEFF); p = the_opts.get_d(OPTION_ROBOT_PROTECTION); } double e = b * bounce_c; Vector2D start_vel = velocity; velocity -= (1.0 + e) * dot(normal, velocity) * normal; double en_diff = 0.5 * the_opts.get_d(OPTION_ROBOT_MASS) * lengthsqr(start_vel - velocity); double injury = en_diff * 0.5 * (h + hardness_c ) * (1.0-e) * (1.0-p); change_energy(-injury); send_message(COLLISION, WALL, vec2angle(-normal)-robot_angle.pos); } void bounce_on_robot(Robot& robot1, Robot& robot2, const Vector2D& normal) { double h1, h2, p1, p2, b1, b2; Vector2D dir1_2 = unit(robot2.center - robot1.center); if( dot(dir1_2, angle2vec(robot1.robot_angle.pos)) > cos(the_opts.get_d(OPTION_ROBOT_FRONTSIZE)*0.5) ) { h1 = the_opts.get_d(OPTION_ROBOT_FRONT_HARDNESS); b1 = the_opts.get_d(OPTION_ROBOT_FRONT_BOUNCE_COEFF); p1 = the_opts.get_d(OPTION_ROBOT_FRONT_PROTECTION); } else { h1 = the_opts.get_d(OPTION_ROBOT_HARDNESS); b1 = the_opts.get_d(OPTION_ROBOT_BOUNCE_COEFF); p1 = the_opts.get_d(OPTION_ROBOT_PROTECTION); } if( -dot(dir1_2, angle2vec(robot2.robot_angle.pos)) > cos(the_opts.get_d(OPTION_ROBOT_FRONTSIZE)*0.5) ) { h2 = the_opts.get_d(OPTION_ROBOT_FRONT_HARDNESS); b2 = the_opts.get_d(OPTION_ROBOT_FRONT_BOUNCE_COEFF); p2 = the_opts.get_d(OPTION_ROBOT_FRONT_PROTECTION); } else { h2 = the_opts.get_d(OPTION_ROBOT_HARDNESS); b2 = the_opts.get_d(OPTION_ROBOT_BOUNCE_COEFF); p2 = the_opts.get_d(OPTION_ROBOT_PROTECTION); } double e = b1*b2; Vector2D start_vel1 = robot1.velocity; Vector2D start_vel2 = robot2.velocity; double mass = the_opts.get_d(OPTION_ROBOT_MASS); Vector2D tmp = ((1.0 + e) / 2.0) * dot(robot2.velocity - robot1.velocity, normal) * normal; robot1.velocity += tmp; robot2.velocity -= tmp; double an = vec2angle(-normal); double en_diff = 0.5 * mass * lengthsqr(start_vel1 - robot1.velocity); double injury = en_diff * 0.5 * (h1 + h2) * (1.0-e) * (1.0-p1); robot1.change_energy(-injury); robot1.send_message(COLLISION, ROBOT, an-robot1.robot_angle.pos); an = vec2angle(normal); en_diff = 0.5 * mass * lengthsqr(start_vel2 - robot2.velocity); injury = en_diff * 0.5 * (h1 + h2) * (1.0-e) * (1.0-p2); robot2.change_energy(-injury); robot2.send_message(COLLISION, ROBOT, an-robot2.robot_angle.pos); } void Robot::set_values_before_game(const Vector2D& pos, const double angle) { center = pos; start_pos = pos; start_angle = angle; robot_angle.set_rot (angle, 0.0, -infinity_rtb, infinity_rtb, NORMAL_ROT); cannon_angle.set_rot(0.0, 0.0, -infinity_rtb, infinity_rtb, NORMAL_ROT); radar_angle.set_rot (0.0, 0.0, -infinity_rtb, infinity_rtb, NORMAL_ROT); shot_energy = 0.0; radius = the_opts.get_d(OPTION_ROBOT_RADIUS); energy = the_opts.get_d(OPTION_ROBOT_START_ENERGY); velocity = Vector2D(0.0, 0.0); position_this_game = 0; // points_this_game = 0.0; brake_percent = 0.0; acceleration = 0.0; } void Robot::set_values_at_process_start_up() { process_running = true; if( !network_robot ) { reset_cpu_time(); cpu_limit = the_opts.get_d(OPTION_CPU_START_LIMIT); cpu_warning_limit = cpu_limit * the_opts.get_d(OPTION_CPU_WARNING_PERCENT); cpu_timeout = 0.0; } time_survived_in_sequence = 0.0; if( statistics.empty() ) // first sequence ! { send_message(INITIALIZE, 1); colour_given = false; name_given = false; } else // not first sequence ! { send_message(INITIALIZE, 0); send_message(YOUR_NAME, robot_name.c_str()); int long col = rgb_colour; int long newcol = realtime_arena.find_free_colour(col, col, this); if( col != newcol ) set_colour( newcol ); // TODO: probably free color! send_message(YOUR_COLOUR, newcol); } } void Robot::change_velocity(const double timestep) { Vector2D dir = angle2vec(robot_angle.pos); double gt = the_opts.get_d(OPTION_GRAV_CONST) * timestep; double fric = the_opts.get_d(OPTION_ROLL_FRICTION) * (1.0 - brake_percent) + the_opts.get_d(OPTION_SLIDE_FRICTION) * brake_percent; velocity = -velocity* min_rtb(the_opts.get_d(OPTION_AIR_RESISTANCE) * timestep, 0.5) + timestep*acceleration*dir + dot(velocity, dir) * max_rtb(0.0, 1.0-gt*fric) * dir + vedge(dir, velocity) * max_rtb(0.0, 1.0-gt*the_opts.get_d(OPTION_SLIDE_FRICTION)) * rotate90(dir); } void Robot::move(const double timestep) { move(timestep, 1, timestep / 50.0); if( is_alive() ) realtime_arena.print_to_logfile('R', id, center[0], center[1], robot_angle.pos, cannon_angle.pos, radar_angle.pos, energy); } void Robot::move(const double timestep, int iterstep, const double eps) { object_type closest_shape; Shape* colliding_object; double time_to_collision = the_arena.get_shortest_distance(center, velocity, radius, closest_shape, colliding_object, this); if( time_to_collision > timestep ) { center += timestep*velocity; } else { if( iterstep > 10 ) time_to_collision = max_rtb( time_to_collision , eps ); double time_remaining = timestep - time_to_collision; center += time_to_collision*velocity; // Vector2D new_center = center - min_rtb(eps, time_to_collision)*velocity; switch( closest_shape ) { case WALL: { Vector2D normal = colliding_object->get_normal(center); bounce_on_wall(colliding_object->get_bounce_coeff(), colliding_object->get_hardness_coeff(), normal); center += normal*eps; } break; case ROBOT: { Vector2D normal = ((Robot*)colliding_object)->get_normal(center); bounce_on_robot(*this, *(Robot*)colliding_object, normal); time_remaining = 0.0; } break; case SHOT: { Shot* shotp =(Shot*)colliding_object; double en = -shotp->get_energy(); change_energy( en ); send_message(COLLISION, SHOT, vec2angle(shotp->get_center()-center)-robot_angle.pos); shotp->die(); the_arena.get_object_lists()[SHOT].remove( shotp ); } break; case COOKIE: { Cookie* cookiep =(Cookie*)colliding_object; double en = cookiep->get_energy(); change_energy( en ); send_message(COLLISION, COOKIE, vec2angle(cookiep->get_center()-center)-robot_angle.pos); cookiep->die(); the_arena.get_object_lists()[COOKIE].remove( cookiep ); } break; case MINE: { Mine* minep =(Mine*)colliding_object; double en = -minep->get_energy(); change_energy( en ); send_message(COLLISION, MINE, vec2angle(minep->get_center()-center)-robot_angle.pos); minep->die(); the_arena.get_object_lists()[MINE].remove( minep ); } break; default: Error(true, "Collided with unknown object", "Robot::move"); break; } // center = new_center; //if( iterstep % 10 == 0 ) // cout << "Iterstep: " << iterstep << " time_remaining: " << time_remaining // << " Collided on: " << closest_shape << " time_to_col: " << time_to_collision << endl; if( iterstep > 65 ) Error(true, "Too many bounces, must be a bug!", "Robot::move"); if( alive && time_remaining > 0.0 ) move( time_remaining, iterstep + 1, eps ); } } void Robot::send_message(const message_to_robot_type msg_type ...) { va_list args; va_start(args, msg_type); *outstreamp << message_to_robot[msg_type].msg << " "; for(int i=0; iclear(); instreamp->peek(); if (!instreamp->good()) return; // we read 4k at maximum at a turn to avoid the situation where a robot do not stop sending junk // in order to stop other robot messages from beeing processed instreamp->read(streambuffer,4096); bufferstreamstring.assign(streambuffer,instreamp->gcount()); bufferstream.clear(); bufferstream.str(bufferstreamstring); bufferstream >> ws; // super buffer overflow possibility // while( !(*instreamp >> msg_name).eof() ) while( bufferstream.peek()!=istringstream::traits_type::eof()) { bufferstream.get(msg_name,80,' '); //bufferstream >> msg_name; msg_t = name2msg_from_robot_type(msg_name); // cerr << "Got message: " << msg_name << endl; bufferstream >> ws; switch(msg_t) { case UNKNOWN_MESSAGE_FROM_ROBOT: //cout << "Server: Warning sent for message: " << msg_name << endl; send_message(WARNING, UNKNOWN_MESSAGE, msg_name); bufferstream.get(buffer, 80, '\n'); break; case ROBOT_OPTION: if( check_state_for_message(msg_t, STARTING_ROBOTS) ) { int opt_nr, val; bufferstream >> opt_nr; switch(opt_nr) { case SEND_SIGNAL: bufferstream >> val; send_usr_signal = (val == true); signal_to_send = SIGUSR1; send_signal(); break; case SIGNAL: bufferstream >> val; if( val > 0 && val < NSIG ) { signal_to_send = val; send_usr_signal = true; send_signal(); } else { if( val >= NSIG ) send_message(WARNING, UNKNOWN_OPTION, msg_name); signal_to_send = 0; send_usr_signal = false; } break; case SEND_ROTATION_REACHED: bufferstream >> val; if( val < 0 ) val = 0; if( val > 2 ) val = 2; send_rotation_reached = val; break; case USE_NON_BLOCKING: bufferstream >> val; if( network_robot ) { *outstreamp << '@' << ( val ? 'N' : 'B' ) << endl; send_message(INITIALIZE, 1); } else set_non_blocking_state( val ); break; default: send_message(WARNING, UNKNOWN_OPTION, msg_name); break; } } break; case NAME: if( check_state_for_message(msg_t, STARTING_ROBOTS) ) { bufferstream.get(text, 80, '\n'); plain_robot_name = text; // Here I will insert the team code string::size_type position=plain_robot_name.rfind("Team: "); if (position!=string::npos) { inteam=true; teamname=string(plain_robot_name,position+6); } check_name_uniqueness(); name_given = true; } break; case COLOUR: if( check_state_for_message(msg_t, STARTING_ROBOTS) ) { long home_colour, away_colour; bufferstream >> std::hex >> home_colour >> away_colour >> std::dec; // TODO: check if colour is already allocated! set_colour( realtime_arena.find_free_colour(home_colour, away_colour, this) ); colour_given = true; } break; case ROTATE: if( check_state_for_message(msg_t, GAME_IN_PROGRESS) ) { int bits; double rot_speed; bufferstream >> bits >> rot_speed; double rot_sign = sgn_rtb(rot_speed); rot_speed = fabs(rot_speed); if( bits & 1 ) rot_speed = min_rtb( rot_speed, the_opts.get_d(OPTION_ROBOT_MAX_ROTATE) ); if( bits & 2 ) rot_speed = min_rtb( rot_speed, the_opts.get_d(OPTION_ROBOT_CANNON_MAX_ROTATE) ); if( bits & 4 ) rot_speed = min_rtb( rot_speed, the_opts.get_d(OPTION_ROBOT_RADAR_MAX_ROTATE) ); rot_speed *= rot_sign; if( bits & 1 ) robot_angle.set_rot( robot_angle.pos, rot_speed, -infinity_rtb, infinity_rtb, NORMAL_ROT ); if( bits & 2 ) cannon_angle.set_rot( cannon_angle.pos, rot_speed, -infinity_rtb, infinity_rtb, NORMAL_ROT ); if( bits & 4 ) radar_angle.set_rot( radar_angle.pos, rot_speed, -infinity_rtb, infinity_rtb, NORMAL_ROT ); } break; case ROTATE_TO: if( check_state_for_message(msg_t, GAME_IN_PROGRESS) ) { int bits; double rot_speed, rot_end_angle, rot_amount; bufferstream >> bits >> rot_speed >> rot_end_angle; rot_end_angle = max_rtb(min_rtb(rot_end_angle, infinity_rtb), -infinity_rtb); rot_speed = fabs(rot_speed); if( bits & 2 ) rot_speed = min_rtb( rot_speed, the_opts.get_d(OPTION_ROBOT_CANNON_MAX_ROTATE) ); if( bits & 4 ) rot_speed = min_rtb( rot_speed, the_opts.get_d(OPTION_ROBOT_RADAR_MAX_ROTATE) ); if( bits & 2 ) { cannon_angle.pos -= rint( (cannon_angle.pos-rot_end_angle) / (2.0*M_PI) ) * 2.0 * M_PI; rot_amount = rot_end_angle - cannon_angle.pos; if( rot_amount > 0 ) cannon_angle.set_rot( cannon_angle.pos, rot_speed, -infinity_rtb, cannon_angle.pos + rot_amount, ROTATE_TO_RIGHT ); else cannon_angle.set_rot( cannon_angle.pos, -rot_speed, cannon_angle.pos + rot_amount, infinity_rtb, ROTATE_TO_LEFT ); } if( bits & 4 ) { radar_angle.pos -= rint( (radar_angle.pos-rot_end_angle) / (2.0*M_PI) ) * 2.0 * M_PI; rot_amount = rot_end_angle - radar_angle.pos; if( rot_amount > 0 ) radar_angle.set_rot( radar_angle.pos, rot_speed, -infinity_rtb, radar_angle.pos + rot_amount, ROTATE_TO_RIGHT ); else radar_angle.set_rot( radar_angle.pos, -rot_speed, radar_angle.pos + rot_amount, infinity_rtb, ROTATE_TO_LEFT ); } } break; case ROTATE_AMOUNT: if( check_state_for_message(msg_t, GAME_IN_PROGRESS) ) { int bits; double rot_speed, rot_amount; bufferstream >> bits >> rot_speed >> rot_amount; rot_speed = fabs(rot_speed); if( bits & 1 ) rot_speed = min_rtb( rot_speed, the_opts.get_d(OPTION_ROBOT_MAX_ROTATE) ); if( bits & 2 ) rot_speed = min_rtb( rot_speed, the_opts.get_d(OPTION_ROBOT_CANNON_MAX_ROTATE) ); if( bits & 4 ) rot_speed = min_rtb( rot_speed, the_opts.get_d(OPTION_ROBOT_RADAR_MAX_ROTATE) ); if( bits & 1 ) { if( rot_amount > 0 ) robot_angle.set_rot( robot_angle.pos, rot_speed, -infinity_rtb, robot_angle.pos + rot_amount, ROTATE_TO_RIGHT ); else robot_angle.set_rot( robot_angle.pos, -rot_speed, robot_angle.pos + rot_amount, infinity_rtb, ROTATE_TO_LEFT ); } if( bits & 2 ) { if( rot_amount > 0 ) cannon_angle.set_rot( cannon_angle.pos, rot_speed, -infinity_rtb, cannon_angle.pos + rot_amount, ROTATE_TO_RIGHT ); else cannon_angle.set_rot( cannon_angle.pos, -rot_speed, cannon_angle.pos + rot_amount, infinity_rtb, ROTATE_TO_LEFT ); } if( bits & 4 ) { if( rot_amount > 0 ) radar_angle.set_rot( radar_angle.pos, rot_speed, -infinity_rtb, radar_angle.pos + rot_amount, ROTATE_TO_RIGHT ); else radar_angle.set_rot( radar_angle.pos, -rot_speed, radar_angle.pos + rot_amount, infinity_rtb, ROTATE_TO_LEFT ); } } break; case SWEEP: if( check_state_for_message(msg_t, GAME_IN_PROGRESS) ) { int bits; double rot_speed, sweep_left, sweep_right; bufferstream >> bits >> rot_speed >> sweep_left >> sweep_right; sweep_left = max_rtb(min_rtb(sweep_left, infinity_rtb), -infinity_rtb); sweep_right = max_rtb(min_rtb(sweep_right, infinity_rtb), -infinity_rtb); rotation_mode_t rot_dir; rot_dir = ( rot_speed < 0 ? SWEEP_LEFT : SWEEP_RIGHT ); if( bits & 2 ) rot_speed = min_rtb( fabs(rot_speed), the_opts.get_d(OPTION_ROBOT_CANNON_MAX_ROTATE) ); if( bits & 4 ) rot_speed = min_rtb( fabs(rot_speed), the_opts.get_d(OPTION_ROBOT_RADAR_MAX_ROTATE) ); if( bits & 2 ) { cannon_angle.pos -= rint( (cannon_angle.pos - 0.5*(sweep_left+sweep_right)) / (2.0*M_PI) ) * 2.0 * M_PI; if( fabs(cannon_angle.vel) > 1e-10 ) rot_dir = ( cannon_angle.vel < 0 ? SWEEP_LEFT : SWEEP_RIGHT ); if( cannon_angle.pos <= sweep_left ) rot_dir = SWEEP_RIGHT; if( cannon_angle.pos >= sweep_right ) rot_dir = SWEEP_LEFT; double cannon_speed = rot_speed; if( rot_dir == SWEEP_LEFT ) cannon_speed = -rot_speed; cannon_angle.set_rot( cannon_angle.pos, cannon_speed, sweep_left, sweep_right, rot_dir ); } if( bits & 4 ) { radar_angle.pos -= rint( (radar_angle.pos - 0.5*(sweep_left+sweep_right)) / (2.0*M_PI) ) * 2.0 * M_PI; if( fabs(radar_angle.vel) > 1e-10 ) rot_dir = ( radar_angle.vel < 0 ? SWEEP_LEFT : SWEEP_RIGHT ); if( radar_angle.pos <= sweep_left ) rot_dir = SWEEP_RIGHT; if( radar_angle.pos >= sweep_right ) rot_dir = SWEEP_LEFT; double radar_speed = rot_speed; if( rot_dir == SWEEP_LEFT ) radar_speed = -rot_speed; radar_angle.set_rot( radar_angle.pos, radar_speed, sweep_left, sweep_right, rot_dir ); } } break; case PRINT: { bufferstream.get(text, 160, '\n'); realtime_arena.print_to_logfile('P', id, text); the_arena.print_message( robot_name, text ); } break; case DEBUG: { bufferstream.get(text, 160, '\n'); if( realtime_arena.get_game_mode() == ArenaBase::DEBUG_MODE ) { realtime_arena.print_to_logfile('P', id, text); the_arena.print_message( robot_name, text ); } } break; case DEBUG_LINE: if( check_state_for_message(msg_t, GAME_IN_PROGRESS) ) { if( !the_arena.is_max_debug_level() ) { send_message(WARNING, MESSAGE_SENT_IN_ILLEGAL_STATE, message_from_robot[msg_t].msg); } #ifndef NO_GRAPHICS else if( !no_graphics ) { double a1, d1, a2, d2; bufferstream >> a1 >> d1 >> a2 >> d2; Vector2D start = d1 * angle2vec(a1 + robot_angle.pos); Vector2D direction = d2 * angle2vec(a2 + robot_angle.pos) - start; the_gui.get_arenawindow_p()-> draw_line(start + center, direction, 1.0, gdk_colour); } #endif } break; case DEBUG_CIRCLE: if( check_state_for_message(msg_t, GAME_IN_PROGRESS) ) { if( !the_arena.is_max_debug_level() ) { send_message(WARNING, MESSAGE_SENT_IN_ILLEGAL_STATE, message_from_robot[msg_t].msg); } #ifndef NO_GRAPHICS else if( !no_graphics ) { double a, d, r; bufferstream >> a >> d >> r; Vector2D c = d * angle2vec(a + robot_angle.pos) + center; the_gui.get_arenawindow_p()-> draw_circle(c, r, gdk_colour, false); } #endif } break; case SHOOT: if( check_state_for_message(msg_t, GAME_IN_PROGRESS) ) { double en; bufferstream >> en; en = min_rtb(en, shot_energy); if( en < the_opts.get_d(OPTION_SHOT_MIN_ENERGY) ) break; shot_energy -= en; Vector2D dir = angle2vec(cannon_angle.pos+robot_angle.pos); double shot_radius = the_opts.get_d(OPTION_SHOT_RADIUS); Vector2D shot_center = center + (radius+1.5*shot_radius)*dir; Vector2D shot_vel = velocity + dir * the_opts.get_d(OPTION_SHOT_SPEED); if( realtime_arena.space_available( shot_center, shot_radius*1.00001 ) ) { Shot* shotp = new Shot( shot_center, shot_vel, en ); realtime_arena.get_object_lists()[SHOT].push_back( shotp ); realtime_arena.print_to_logfile('S', shotp->get_id(), shot_center[0], shot_center[1], shot_vel[0], shot_vel[1]); } else // No space for shot, direct hit!! { Shape* col_obj; object_type cl_shape; double dist; if( (dist = realtime_arena.get_shortest_distance ( center, dir, shot_radius*1.00001, cl_shape, col_obj, this)) > radius+1.5*shot_radius ) { cerr << "dist: " << dist << " r+1.5sh_r: " << radius+1.5*shot_radius << endl; cerr << "col_shape: " << (int)cl_shape << endl; Error(false, "Shot has space available after all?", "Robot::get_messages"); } switch(cl_shape) { case WALL: break; case ROBOT: { Robot* robotp = (Robot*)col_obj; robotp->change_energy(-en); robotp->send_message(COLLISION, SHOT, vec2angle(center+dir*radius-robotp->get_center()) - robotp->get_robot_angle().pos); } break; case SHOT: shot_collision((Shot*)col_obj, shot_vel, en); break; case COOKIE: { Cookie* cookiep =(Cookie*)col_obj; cookiep->die(); the_arena.get_object_lists()[COOKIE].remove( cookiep ); } break; case MINE: { Mine* minep =(Mine*)col_obj; minep->die(); the_arena.get_object_lists()[MINE].remove( minep ); } break; default: Error(true, "Shot on unknown object", "Robot::get_messages"); } } change_energy(-en * realtime_arena.get_shooting_penalty() ); } break; case ACCELERATE: if( check_state_for_message(msg_t, GAME_IN_PROGRESS) ) { double acc; bufferstream >> acc; acc = max_rtb( acc, the_opts.get_d(OPTION_ROBOT_MIN_ACCELERATION) ); acc = min_rtb( acc, the_opts.get_d(OPTION_ROBOT_MAX_ACCELERATION) ); acceleration = acc; } break; case BREAK: // Included only for compatibility reasons send_message(WARNING, OBSOLETE_KEYWORD, msg_name); case BRAKE: if( check_state_for_message(msg_t, GAME_IN_PROGRESS) ) { double brk; bufferstream >> brk; brk = max_rtb( brk, 0.0); brk = min_rtb( brk, 1.0); brake_percent = brk; } break; // case LOAD_DATA: // if( check_state_for_message(msg_t, STARTING_ROBOTS) ) // { // bool bin; // bufferstream >> bin; // load_data(bin); // } // break; // case SAVE_DATA_FINISHED: // if( check_state_for_message(msg_t, SHUTTING_DOWN_ROBOTS) ) // { // send_message(EXIT_ROBOT); // send_signal(); // } // break; // case BIN_DATA_FROM: // if( check_state_for_message(msg_t, SHUTTING_DOWN_ROBOTS) ) // { // save_data(true, has_saved); // has_saved = true; // } // break; // case ASCII_DATA_FROM: // if( check_state_for_message(msg_t, SHUTTING_DOWN_ROBOTS) ) // { // save_data(false, has_saved); // has_saved = true; // } // break; default: Error(true, "Message_type not implemented, " + string(msg_name), "Robot::get_messages"); } bufferstream >> ws; } } message_from_robot_type Robot::name2msg_from_robot_type(char* msg_name) { for(int i=0; message_from_robot[i].msg[0] != '\0'; i++) { if( strcmp(message_from_robot[i].msg, msg_name) == 0 ) return (message_from_robot_type)i; } return UNKNOWN_MESSAGE_FROM_ROBOT; } bool Robot::check_state_for_message(const message_from_robot_type msg_t, const state_t state1, const state_t state2) { if( the_arena.get_state() != state1 && the_arena.get_state() != state2 ) { //cout << "Server: Warning sent for message: " << msg_name << " State: " << the_arena.get_state() << endl; if( the_arena.get_state() != BEFORE_GAME_START ) send_message(WARNING, MESSAGE_SENT_IN_ILLEGAL_STATE, message_from_robot[msg_t].msg); char buffer[80]; instreamp->get(buffer, 80, '\n'); return false; } return true; } bool Robot::get_default_non_blocking_state() { string filename = the_opts.get_s( OPTION_TMP_RTB_DIR ) + "/" + robot_plain_filename; int fd; if( ( fd = open(filename.c_str(), O_RDONLY) ) != -1 ) { close(fd); return false; } return true; } // If non_blocking is _not_ used, a file, OPTION_TMP_RTB_DIR/"robotname" // , is created. void Robot::set_non_blocking_state(const bool non_bl) { if( non_bl == use_non_blocking ) return; string filename = the_opts.get_s( OPTION_TMP_RTB_DIR ) + "/" + robot_plain_filename; create_tmp_rtb_dir(); if( non_bl ) remove( filename.c_str() ); else { int fd = open(filename.c_str(), O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH ); if( fd != -1 ) close( fd ); } use_non_blocking = non_bl; // restart_process kill_process_forcefully(); start_process(); } // void // Robot::save_data(const bool binary, const bool append) // { // cerr << "Sorry, save_data is broken at the moment!" << endl; // return; // String filename; // // if( robot_name_uniqueness_number == 0 ) // // filename = the_gui.get_robotdir() + plain_robot_name + ".robotdata"; // // else // // filename = the_gui.get_robotdir() + robot_name + ".robotdata"; // int mode = _IO_OUTPUT; // if( append ) mode = _IO_APPEND; // ofstream file(filename.chars(), mode); // if( !file ) Error(true, "Couldn't open file " + filename, "Robot::save_bin_data"); // if( binary ) // { // int bytes; // char c; // *instreamp >> bytes; // // TODO: check if data is avalable (peek), wait otherwise (select) // for(int i=0; i < bytes; i++) // { // instreamp->get(c); // file.put(c); // } // } // else // { // char buf[256]; // instreamp->get(buf, 256 ,'\n'); // file << buf << endl; // // TODO: continue saving if next message is SAVE_DATA // } // } // void // Robot::load_data(const bool binary) // { // cerr << "Sorry, load_data is broken at the moment!" << endl; // return; // String filename; // ifstream file; // // if( robot_name_uniqueness_number == 0 ) // // { // // filename = the_gui.get_robotdir() + "RobotSave/" + plain_robot_name + ".robotdata"; // // file.open(filename.chars()); // // } // // if( !file ) // // { // // filename = the_gui.get_robotdir() + "RobotSave/" + robot_name + ".robotdata"; // // file.open(filename.chars()); // // } // if (!file) // { // send_message(LOAD_DATA_FINISHED); // return; // } // char buf[256]; // if( binary ) // { // char c; // int i; // while( !file.eof() ) // { // for(i=0; i < 255 && file.get(c) ; i++) // buf[i] = c; // buf[i] = '\0'; // send_message(BIN_DATA_TO, i, buf); // } // } // else // { // while( !file.eof() ) // { // file.get(buf, 256 ,'\n'); // send_message(ASCII_DATA_TO, buf); // } // } // send_message(LOAD_DATA_FINISHED); // } void Robot::change_energy(const double energy_diff) { energy = min_rtb(energy+energy_diff, the_opts.get_d(OPTION_ROBOT_MAX_ENERGY)); #ifndef NO_GRAPHICS if( !no_graphics ) display_score(); #endif if( energy <= 0.0 ) die(); } #ifndef NO_GRAPHICS void Robot::reset_last_displayed() { last_displayed_energy = -1; last_displayed_place = 0; last_displayed_last_place = 0; last_displayed_score = -1; } void Robot::display_score() { int p; if( last_displayed_energy != (int)energy ) { last_displayed_energy = (int)energy; ostringstream number2string; number2string << (int)energy; gtk_clist_set_text(GTK_CLIST(the_gui.get_scorewindow_p()->get_clist()), row_in_score_clist, 2, number2string.str().c_str()); } if( last_displayed_place != position_this_game ) { string str; if( position_this_game != 0 ) { ostringstream number2string; number2string << position_this_game ; str = number2string.str(); } last_displayed_place = position_this_game; gtk_clist_set_text(GTK_CLIST(the_gui.get_scorewindow_p()->get_clist()), row_in_score_clist, 3, str.c_str()); } p = get_last_position(); if( p != 0 && p != last_displayed_last_place ) { last_displayed_last_place = p; ostringstream number2string; number2string << p ; gtk_clist_set_text(GTK_CLIST(the_gui.get_scorewindow_p()->get_clist()), row_in_score_clist, 4, number2string.str().c_str()); } double pnts = get_total_points(); if( last_displayed_score != (int)(10 * pnts) ) { last_displayed_score = (int)(10 * pnts); ostringstream number2string; number2string << pnts ; gtk_clist_set_text(GTK_CLIST(the_gui.get_scorewindow_p()->get_clist()), row_in_score_clist, 5, number2string.str().c_str()); } } void Robot::draw_radar_and_cannon() { double scale = the_gui.get_arenawindow_p()->get_drawing_area_scale(); if( radius*scale < 2.5 ) return; // Draw Cannon the_gui.get_arenawindow_p()-> draw_line( center, angle2vec(cannon_angle.pos+robot_angle.pos), radius - the_opts.get_d(OPTION_SHOT_RADIUS) - 1.0 / scale, the_opts.get_d(OPTION_SHOT_RADIUS), *(the_gui.get_fg_gdk_colour_p()) ); // Draw radar lines Vector2D radar_dir = angle2vec(radar_angle.pos+robot_angle.pos); the_gui.get_arenawindow_p()-> draw_line( center - radius * 0.25 * radar_dir, rotate( radar_dir, M_PI / 4.0 ), radius / 1.5, radius / 20.0, *(the_gui.get_fg_gdk_colour_p()) ); the_gui.get_arenawindow_p()-> draw_line( center - radius * 0.25 * radar_dir, rotate( radar_dir, - (M_PI / 4.0) ), radius / 1.5, radius / 20.0, *(the_gui.get_fg_gdk_colour_p()) ); // Draw robot angle line the_gui.get_arenawindow_p()-> draw_line( center, angle2vec(robot_angle.pos), radius * 0.9 - 2.0 / scale, *(the_gui.get_fg_gdk_colour_p()) ); } void Robot::get_score_pixmap( GdkWindow* win, GdkPixmap*& pixm, GdkBitmap*& bitm ) { score_pixmap.get_pixmap( gdk_colour, win, pixm, bitm ); } void Robot::get_stat_pixmap( GdkWindow* win, GdkPixmap*& pixm, GdkBitmap*& bitm ) { stat_pixmap.get_pixmap( gdk_colour, win, pixm, bitm ); } #endif realtimebattle-1.0.8/src/Shape.cc0000644000175000017500000000263510175160720015013 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include #include using namespace std; //#include "Gui.h" #include "Shape.h" #include "Various.h" #include "Options.h" extern class Options the_opts; Shape::Shape() { set_colour(the_opts.get_l(OPTION_FOREGROUND_COLOUR)); } Shape::Shape(int long colour) { set_colour(colour); } void Shape::set_colour(long int colour) { rgb_colour = colour; #ifndef NO_GRAPHICS gdk_colour = make_gdk_colour( colour ); #endif } #ifndef NO_GRAPHICS void Shape::set_colour(const GdkColor& colour) { gdk_colour = colour; rgb_colour = gdk2hex_colour( colour ); } #endif realtimebattle-1.0.8/src/Shot.cc0000644000175000017500000001037410175160720014667 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include "Robot.h" #include "Shot.h" #include "ArenaController.h" #include "ArenaRealTime.h" #include "ArenaWindow.h" #include "Extras.h" #include "Various.h" #include "Options.h" Shot::Shot(const Vector2D& c, //const double r, const Vector2D& vel, const double en, const int shot_id) : MovingObject(c, the_opts.get_d(OPTION_SHOT_RADIUS), vel) { alive = true; energy = en; if( shot_id == -1 ) id = the_arena.increase_shot_count(); else id = shot_id; } void Shot::move(const double timestep) { object_type closest_shape; Shape* colliding_object; double time_to_collision = the_arena. get_shortest_distance(center, velocity, radius, closest_shape, colliding_object); if( time_to_collision > timestep ) { center += timestep*velocity; } else { switch( closest_shape ) { case WALL: die(); break; case ROBOT: { Robot* robotp = (Robot*)colliding_object; robotp->change_energy(-energy); robotp->send_message(COLLISION, SHOT, vec2angle(center-robotp->get_center()) - robotp->get_robot_angle().pos); die(); } break; case SHOT: { Shot* shotp = (Shot*)colliding_object; shot_collision(this, shotp); } break; case COOKIE: { Cookie* cookiep =(Cookie*)colliding_object; cookiep->die(); the_arena.get_object_lists()[COOKIE].remove( cookiep ); die(); } break; case MINE: { Mine* minep =(Mine*)colliding_object; minep->die(); the_arena.get_object_lists()[MINE].remove( minep ); die(); } break; default: Error(true, "Collided with unknown object", "Robot::move"); break; } } } void Shot::move_no_check(const double timestep) { center += timestep*velocity; } void Shot::die() { if( alive ) { alive = false; #ifndef NO_GRAPHICS if (!no_graphics ) the_gui.get_arenawindow_p()-> draw_circle( last_drawn_center, last_drawn_radius, *(the_gui.get_bg_gdk_colour_p()), true ); #endif if( the_arena_controller.is_realtime() ) realtime_arena.print_to_logfile('D', (int)'S', id); } } void shot_collision(Shot* shot1p, Shot* shot2p) { shot_collision(shot1p, shot2p->velocity, shot2p->energy); shot2p->die(); the_arena.get_object_lists()[SHOT].remove( shot2p ); } void shot_collision(Shot* shot1p, const Vector2D& shot2_vel, const double shot2_en) { Vector2D vel = ( shot1p->energy * shot1p->velocity + shot2_en * shot2_vel ) / ( shot1p->energy + shot2_en ); double en = dot( shot1p->energy * unit(shot1p->velocity) + shot2_en * unit(shot2_vel), unit(vel)); if( en < the_opts.get_d(OPTION_SHOT_MIN_ENERGY) || length(vel) < the_opts.get_d(OPTION_SHOT_SPEED) * 0.5 ) { shot1p->die(); } else { shot1p->velocity = vel; shot1p->energy = en; realtime_arena.print_to_logfile('D', (int)'S', shot1p->id); shot1p->id = the_arena.increase_shot_count(); realtime_arena.print_to_logfile('S', shot1p->id, shot1p->center[0], shot1p->center[1], shot1p->velocity[0], shot1p->velocity[1]); } } realtimebattle-1.0.8/src/Timer.cc0000644000175000017500000000251410175160720015027 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include "Timer.h" Timer::Timer() { gettimeofday(&start, NULL); } void Timer::reset() { gettimeofday(&start, NULL); } double Timer::get() { timeval current_time; gettimeofday(¤t_time, NULL); if (start.tv_usec > current_time.tv_usec) { current_time.tv_usec += 1000000; current_time.tv_sec--; } double elapsed; elapsed = ((double)( current_time.tv_usec - start.tv_usec )) / 1e6; elapsed += (double)( current_time.tv_sec - start.tv_sec ); return elapsed; } realtimebattle-1.0.8/src/Various.cc0000644000175000017500000005464410276173055015421 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #ifndef NO_GRAPHICS #include #include #endif #include #if HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) #else # define dirent direct # define NAMLEN(dirent) (dirent)->d_namlen # if HAVE_SYS_NDIR_H # include # endif # if HAVE_SYS_DIR_H # include # endif # if HAVE_NDIR_H # include # endif #endif #include #include #include #include #include #include #include #include using namespace std; #include "Various.h" #include "IntlDefs.h" #include #include "Options.h" #include "Structs.h" extern class Options the_opts; #ifndef NO_GRAPHICS # include "ControlWindow.h" extern class ControlWindow* controlwindow_p; #endif extern bool no_graphics; void Error(const bool fatal, const string& error_msg, const string& function_name) { // This code is disabled due to the following reasons: // First, if a fatal error occurs, you won't see the error message at all // Second: The error function in rtb is called many times even in cases of "warnings", a dialog distracts the user too much // Perhaps, we can reenable it again, when point one is saved in a satisfiable manner // Note: Making the dialog modal is not an option, because we have timers in the background that will trigger in any case /*#ifndef NO_GRAPHICS string info_text = "Error in " + function_name + ":\n\n" + error_msg + "\n"; if( fatal ) info_text += "\nFatal Error - program will terminate!"; list string_list; string_list.push_back( string( _("Ok") ) ); Dialog( info_text, string_list, (DialogFunction) ok_click, "Error" ); #else */ cerr << "RealTimeBattle: " << _("Error in") << " " << function_name << ": " << error_msg << endl; // perror("RealTimeBattle: errno message"); //#endif if( fatal == true ) { Quit(false); } } void Quit(const bool success) { #ifndef NO_GRAPHICS if( gtk_main_level() != 0 ) { gtk_main_quit(); if( !no_graphics ) delete controlwindow_p; } #endif if( !success ) exit(EXIT_FAILURE); exit(EXIT_SUCCESS); } int factorial(const int n) { double fact = 1.0; for(int i=1; i<=n; i++) fact *= i; if( fact < (double)INT_MAX ) return (int)fact; else return INT_MAX; } int binomial(const int n, const int k) { int k2 = min_rtb(k, n-k); double bin = 1; for(int i=n; i>n-k2; i--) bin *= i; for(int i=1; i<=k2; i++) bin /= i; if( bin < (double)INT_MAX ) return (int)bin; else return INT_MAX; } void reorder_pointer_array(void** array, int size) { int n1, n2; void* temp_p; for(int i=0; i> 16 ) * 0x101; colour.green = ((col & 0x00ff00) >> 8 ) * 0x101; colour.blue = (col & 0x0000ff) * 0x101; if( !gdk_color_alloc (cmap, &colour) ) Error(true, "Couldn't allocate colour", "Various:make_gdk_color"); return colour; } long gdk2hex_colour(const GdkColor& col) { return ( (col.blue & 0xff) | ((col.green & 0xff) << 8) | ((col.red & 0xff) << 16) ); } #endif void read_dirs_from_system(list& robotdirs, list& arenadirs) { string dirs; robotdirs.clear(); arenadirs.clear(); dirs = the_opts.get_s(OPTION_ROBOT_SEARCH_PATH); split_colonseparated_dirs(dirs, robotdirs); #ifdef ROBOTDIR string str(ROBOTDIR "/"); robotdirs.push_back( str ); #endif dirs = the_opts.get_s(OPTION_ARENA_SEARCH_PATH); split_colonseparated_dirs(dirs, arenadirs); #ifdef ARENADIR str = string(ARENADIR "/"); arenadirs.push_back( str ); #endif } // This function splits a string of colonseparated directories into a glist void split_colonseparated_dirs(string& dirs, list& str_list) { string current_dir = dirs; int pos, lastpos = 0; try { while( (pos = dirs.find(':', lastpos)) != -1 ) { current_dir = string( dirs.substr(lastpos, pos-lastpos)); if(current_dir.at(current_dir.size() - 1) != '/') current_dir += '/'; string str(current_dir); str_list.push_back( str ); lastpos = pos+1; } if(current_dir != "") { current_dir = dirs.substr(lastpos, dirs.size()-lastpos); if(current_dir.at(current_dir.size() - 1) != '/') current_dir += '/'; string str(current_dir); str_list.push_back( str ); } } catch(exception& e) { Error(true, e.what(), "split_colonseparated_dirs"); } } bool check_if_filename_is_robot(const string& fname, bool* err_in_file ) // err_in_file not currently used { struct stat filestat; if( stat( fname.c_str(), &filestat ) != 0 ) return false; // Check if file is a regular file that can be executed and ends with .robot (or .robot.exe for cygwin) try { if( S_ISREG( filestat.st_mode) && ( filestat.st_mode & ( S_IXOTH | S_IXGRP | S_IXUSR )) && #ifdef __CYGWIN__ ( string(".robot") == fname.substr(fname.size()-6, 6) || string(".robot.exe") == fname.substr(fname.size()-10, 10) ) ) #else ( string(".robot") == fname.substr(fname.size()-6, 6) ) ) #endif return true; } catch(exception& e) { Error(true, e.what(), "check_if_filename_is_robot"); } return false; } bool check_if_filename_is_arena( string& fname, bool* err_in_file) { bool retval = false; struct stat filestat; try { if( 0 == stat( fname.c_str(), &filestat ) && fname.size() > 6 ) // Check if file is a regular file that is readable and ends with .arena if( S_ISREG( filestat.st_mode) && ( filestat.st_mode & ( S_IROTH | S_IRGRP | S_IRUSR ) ) && ( string(".arena") == fname.substr(fname.size()-6,6) ) ) { // So far so good. Now do a rudimentary sanity check. ifstream fin( fname.c_str() ); char text[20]; fin.get(text, 7); if( 0 == strcmp(text, "scale " ) ) retval = true; else { Error(false, "Error in arenafile '" + fname + "': 'scale' not first command. Skipping file.", "Various::check_if_filename_is_arena"); *err_in_file = true; } fin.close(); } } catch(exception& e) { Error(true, e.what(), "check_if_filename_is_arena"); } return retval; } bool check_logfile( string& fname ) { struct stat filestat; if( 0 == stat( fname.c_str(), &filestat ) ) // Check if file is a regular and readable file if( S_ISREG( filestat.st_mode) && ( filestat.st_mode & ( S_IROTH | S_IRGRP | S_IRUSR ) ) ) { // So far so good. Now do a rudimentary sanity check. ifstream fin( fname.c_str() ); long line = 0; for(;;) { char buffer[200]; fin.getline(buffer, 200); if( fin.eof() ) { fin.close(); return true; } line++; switch(buffer[0]) { case 'H': if( 1 != line ) { Error(false, "Header not first line in logfile!", "Various::check_logfile"); return false; } case 'A': case 'G': case 'O': case 'L': case 'R': case 'T': case 'P': case 'C': case 'M': case 'S': case 'D': // Ok break; default: if( 1 == line ) Error(false, "No header found in logfile!", "Various::check_logfile"); else { ostringstream number2string; number2string << line; Error(false, "Unrecognized first letter in logfile line " + number2string.str() + ": " + string(1,buffer[0]), "Various::check_logfile"); } fin.close(); return false; } } } } void check_for_robots_and_arenas( string& word, list& tour_list, list& dir_list, const bool check_robots ) { bool found = false; bool err_in_file = false; string full_file_name = ""; try { if( word.size() > 1 ) if( word.substr(word.size()-2, 2 ) == "/*" ) { search_directories( word.substr(0, word.size()-1), tour_list, check_robots ); return; } } catch(exception& e) { Error(true, e.what(), "check_for_robots_and_arenas"); } if( word.size() == 1 && word[0] == '*' ) { list::const_iterator li; for( li = dir_list.begin(); li != dir_list.end(); ++li ) search_directories( *li, tour_list, check_robots ); return; } if( word.find('/') != -1 ) { if((check_robots && check_if_filename_is_robot( word, &err_in_file )) || (!check_robots && check_if_filename_is_arena( word, &err_in_file ))) { full_file_name = word; found = true; } } // if( !found && !err_in_file ) if( !found ) { list::const_iterator li; for( li = dir_list.begin(); li != dir_list.end(); ++li ) { string temp_name = *li + word; if((check_robots && check_if_filename_is_robot( temp_name, &err_in_file )) || (!check_robots && check_if_filename_is_arena( temp_name, &err_in_file ))) { full_file_name= temp_name; found = true; break; } } } if( found ) { start_tournament_info_t* info; info = new start_tournament_info_t(0, false, full_file_name, ""); tour_list.push_back( info ); } else if(!err_in_file) { if(check_robots) cerr << "Couldn't find an executable robot with filename " << word << endl; else cerr << "Couldn't find an arena with filename " << word << endl; } } void search_directories( string directory, list& tour_list, const bool check_robots ) { bool err_in_file = false; DIR* dir; if( NULL != ( dir = opendir(directory.c_str()) ) ) { struct dirent* entry; while( NULL != ( entry = readdir( dir ) ) ) { string full_file_name = directory + entry->d_name; bool res = false; if(check_robots) res = check_if_filename_is_robot(full_file_name, &err_in_file); else res = check_if_filename_is_arena(full_file_name, &err_in_file); if(res) { start_tournament_info_t* info; info = new start_tournament_info_t(0, false, full_file_name, ""); tour_list.push_back( info ); } } closedir(dir); } } bool parse_tournament_file( const string& fname, const StartTournamentFunction function, void* data, bool fatal_error_on_file_failure ) { list robotdirs; list arenadirs; read_dirs_from_system(robotdirs, arenadirs); ifstream file(fname.c_str()); if( !file ) { if( fatal_error_on_file_failure ) Error( true, "Can't open specified tournament file.", "parse_tournament_file" ); else return false; } int games_p_s = 1; int robots_p_s = 2; int n_o_sequences = 1; int looking_for = 0; // 0 = keyword, 1 = robot, 2 = arena istringstream string2number; list robot_list; list arena_list; for(;;) { char buffer[200]; if ((file >> buffer).eof()){ int robots_counted = robot_list.size(); int arenas_counted = arena_list.size(); if (games_p_s == -1) games_p_s = arenas_counted; if (robots_p_s == -1) robots_p_s = robots_counted; if (n_o_sequences == -1) n_o_sequences=binomial(robots_counted, games_p_s); robots_p_s = min_rtb(robots_counted,robots_p_s); if(robots_p_s < 2) { if( fatal_error_on_file_failure ) { ostringstream number2string; number2string << robots_p_s; Error(true, "Can't start tournament with only " + number2string.str() + " robots per sequence", "parse_tournament_file"); } else return false; } if(games_p_s < 1) { if(fatal_error_on_file_failure) { ostringstream number2string; number2string << games_p_s; Error(true, "Must have at least one game per sequence. " "Current value is: " + number2string.str(), "parse_tournament_file"); } else return false; } if(n_o_sequences < 1) { if(fatal_error_on_file_failure) { ostringstream number2string; number2string << n_o_sequences; Error(true, "Must have at least one sequence. Current value is: " + number2string.str(), "parse_tournament_file"); } else return false; } // Startup the tournament (*function)( robot_list, arena_list, robots_p_s, games_p_s, n_o_sequences, data ); return true; } string word(buffer); string word_lower; word_lower.resize(word.size()); transform (word.begin(),word.end(), word_lower.begin(), (int(*)(int))tolower); if((word_lower == "games/sequence:") || (word_lower == "g/s:")) { looking_for = 0; file >> buffer; if( buffer[0] == '*' ) games_p_s = -1; else { string2number.clear(); string2number.str(buffer); string2number >> games_p_s; } } else if((word_lower == "robots/sequence:") || (word_lower == "r/s:")) { looking_for = 0; file >> buffer; if( buffer[0] == '*' ) robots_p_s = -1; else { string2number.clear(); string2number.str(buffer); string2number >> robots_p_s; } } else if((word_lower == "sequences:") || (word_lower == "seq:")) { looking_for = 0; file >> buffer; if( buffer[0] == '*' ) n_o_sequences = -1; else { string2number.clear(); string2number.str(buffer); string2number >> n_o_sequences; } } else if((word_lower == "robots:") || (word_lower == "r:")) looking_for = 1; else if((word_lower == "arenas:") || (word_lower == "a:")) looking_for = 2; else { switch(looking_for) { case 0: looking_for = 0; cerr << "Unrecognized keyword in tournament file: " << word << endl; break; case 1: check_for_robots_and_arenas( word, robot_list, robotdirs, true); break; case 2: check_for_robots_and_arenas( word, arena_list, arenadirs, false); break; } } } return false; } void create_tmp_rtb_dir() { string dirname = the_opts.get_s( OPTION_TMP_RTB_DIR ); struct stat filestat; if( 0 != stat( dirname.c_str(), &filestat ) ) mkdir( dirname.c_str(), S_IRWXU | S_IRWXG | S_IRWXO ); } #ifndef NO_GRAPHICS void entry_handler( GtkWidget * entry, entry_t * entry_info ) { string entry_text = gtk_entry_get_text(GTK_ENTRY(entry)); string old_entry_text = entry_text; bool point_found = false; try { for(int i=0;idatatype ) { case ENTRY_INT: if( !((entry_text[i] >= '0' && entry_text[i] <= '9') || (entry_text[i] == '-' && i == 0 && entry_info->allow_sign )) ) entry_text.erase(i,1); break; case ENTRY_DOUBLE: /* if( !((entry_text[i] >= '0' && entry_text[i] <= '9') || (entry_text[i] == '.') || (entry_text[i] == '-' && i == 0 && entry_info->allow_sign )) ) entry_text.erase(i); if( entry_text[i] == '.' && !point_found ) point_found = true; else if( entry_text[i] == '.' && point_found ) entry_text.erase(i);*/ break; case ENTRY_HEX: if( !(((entry_text[i] >= '0' && entry_text[i] <= '9') || (entry_text[i] >= 'a' && entry_text[i] <= 'f') || (entry_text[i] >= 'A' && entry_text[i] <= 'F')) || (entry_text[i] == '-' && i == 0 ) && entry_info->allow_sign ) ) entry_text.erase(i,1); break; case ENTRY_CHAR: break; case ENTRY_BOOL: break; } } } catch(exception& e) { Error(true, e.what(), "entry_handler"); } if(old_entry_text != entry_text) gtk_entry_set_text(GTK_ENTRY(entry),entry_text.c_str()); } gint int_compare(GtkCList* clist, gconstpointer ptr1, gconstpointer ptr2) { char* text1 = NULL; char* text2 = NULL; GtkCListRow* row1 = (GtkCListRow*) ptr1; GtkCListRow* row2 = (GtkCListRow*) ptr2; switch (row1->cell[clist->sort_column].type) { case GTK_CELL_TEXT: text1 = GTK_CELL_TEXT (row1->cell[clist->sort_column])->text; break; case GTK_CELL_PIXTEXT: text1 = GTK_CELL_PIXTEXT (row1->cell[clist->sort_column])->text; break; default: break; } switch (row2->cell[clist->sort_column].type) { case GTK_CELL_TEXT: text2 = GTK_CELL_TEXT (row2->cell[clist->sort_column])->text; break; case GTK_CELL_PIXTEXT: text2 = GTK_CELL_PIXTEXT (row2->cell[clist->sort_column])->text; break; default: break; } if (!text2) return (text1 != NULL); if (!text1) return -1; istringstream text1_c(text1), text2_c(text2); int text1_num, text2_num; text1_c >> text1_num; text2_c >> text2_num; return (text1_num - text2_num); } gint float_compare(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2) { char* text1 = NULL; char* text2 = NULL; GtkCListRow* row1 = (GtkCListRow*) ptr1; GtkCListRow* row2 = (GtkCListRow*) ptr2; switch (row1->cell[clist->sort_column].type) { case GTK_CELL_TEXT: text1 = GTK_CELL_TEXT (row1->cell[clist->sort_column])->text; break; case GTK_CELL_PIXTEXT: text1 = GTK_CELL_PIXTEXT (row1->cell[clist->sort_column])->text; break; default: break; } switch (row2->cell[clist->sort_column].type) { case GTK_CELL_TEXT: text2 = GTK_CELL_TEXT (row2->cell[clist->sort_column])->text; break; case GTK_CELL_PIXTEXT: text2 = GTK_CELL_PIXTEXT (row2->cell[clist->sort_column])->text; break; default: break; } if (!text2) return (text1 != NULL); if (!text1) return -1; istringstream text1_c(text1), text2_c(text2); double n1, n2; text1_c >> n1; text2_c >> n2; if(n1 > n2) return 1; else if(n2 > n1) return -1; return 0; } gint string_case_sensitive_compare(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2) { char *text1 = NULL; char *text2 = NULL; GtkCListRow *row1 = (GtkCListRow *) ptr1; GtkCListRow *row2 = (GtkCListRow *) ptr2; switch (row1->cell[clist->sort_column].type) { case GTK_CELL_TEXT: text1 = GTK_CELL_TEXT (row1->cell[clist->sort_column])->text; break; case GTK_CELL_PIXTEXT: text1 = GTK_CELL_PIXTEXT (row1->cell[clist->sort_column])->text; break; default: break; } switch (row2->cell[clist->sort_column].type) { case GTK_CELL_TEXT: text2 = GTK_CELL_TEXT (row2->cell[clist->sort_column])->text; break; case GTK_CELL_PIXTEXT: text2 = GTK_CELL_PIXTEXT (row2->cell[clist->sort_column])->text; break; default: break; } if (!text2) return (text1 != NULL); if (!text1) return -1; return strcmp (text1, text2); } gint string_case_insensitive_compare(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2) { char *text1 = NULL; char *text2 = NULL; GtkCListRow *row1 = (GtkCListRow *) ptr1; GtkCListRow *row2 = (GtkCListRow *) ptr2; switch (row1->cell[clist->sort_column].type) { case GTK_CELL_TEXT: text1 = GTK_CELL_TEXT (row1->cell[clist->sort_column])->text; break; case GTK_CELL_PIXTEXT: text1 = GTK_CELL_PIXTEXT (row1->cell[clist->sort_column])->text; break; default: break; } switch (row2->cell[clist->sort_column].type) { case GTK_CELL_TEXT: text2 = GTK_CELL_TEXT (row2->cell[clist->sort_column])->text; break; case GTK_CELL_PIXTEXT: text2 = GTK_CELL_PIXTEXT (row2->cell[clist->sort_column])->text; break; default: break; } if (!text2) return (text1 != NULL); if (!text1) return -1; return strcasecmp (text1, text2); } #endif realtimebattle-1.0.8/src/Vector2D.cc0000644000175000017500000001015210214022774015374 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "Vector2D.h" #include using namespace std; void Error(const bool fatal, const string& function_name, const string& error_msg); // Vector2D::Vector2D() // { // vector[0] = 0.0; // vector[1] = 0.0; // } // Vector2D::Vector2D(const Vector2D& old) // { // vector[0] = old.vector[0]; // vector[1] = old.vector[1]; // } // Vector2D::Vector2D(const double x, const double y) // { // vector[0] = x; // vector[1] = y; // } Vector2D& Vector2D::copy_vector(const Vector2D& other) { vector[0] = other.vector[0]; vector[1] = other.vector[1]; return( *this ); } Vector2D operator+(const Vector2D& vec1, const Vector2D& vec2) { return( Vector2D( vec1.vector[0] + vec2.vector[0], vec1.vector[1] + vec2.vector[1] ) ); } Vector2D operator-(const Vector2D& vec) { return Vector2D( -vec.vector[0], -vec.vector[1] ); } Vector2D rotate(const Vector2D& vec, const double angle) { return( Vector2D( cos(angle)*vec.vector[0] - sin(angle)*vec.vector[1], sin(angle)*vec.vector[0] + cos(angle)*vec.vector[1] ) ); } Vector2D rotate90(const Vector2D& vec) { return Vector2D( -vec.vector[1], vec.vector[0] ); } Vector2D operator*(const Vector2D& vec, const double factor) { return Vector2D( vec.vector[0] * factor, vec.vector[1] * factor ); } Vector2D operator*(const double factor, const Vector2D& vec) { return( vec*factor ); } Vector2D operator/(const Vector2D& vec, const double denom) { return Vector2D( vec.vector[0]/denom, vec.vector[1]/denom ); } Vector2D& Vector2D::operator=(const Vector2D& other) { copy_vector(other); return( *this ); } int operator==(const Vector2D& vec1, const Vector2D& vec2) { return( vec1.vector[0] == vec2.vector[0] && vec1.vector[1] == vec2.vector[1] ); } ostream& operator<<(ostream& os, const Vector2D& vec) { os.setf(ios::fixed , ios::floatfield); os.precision(6); os << "( " << vec.vector[0] << " , " << vec.vector[1] << " )"; return( os ); } istream& operator>>(istream& is, Vector2D& vec) { is >> vec.vector[0] >> vec.vector[1]; return( is ); } double Vector2D::operator[](int index) const { if( index >= 0 && index <= 1 ) return( vector[index] ); Error(true, "Vector index out of range", "Vector2D::operator[]"); return 0.0; } Vector2D& Vector2D::operator+=(const Vector2D& other) { vector[0] += other.vector[0]; vector[1] += other.vector[1]; return( *this ); } Vector2D& Vector2D::operator-=(const Vector2D& other) { vector[0] -= other.vector[0]; vector[1] -= other.vector[1]; return( *this ); } Vector2D& Vector2D::operator*=(const double factor) { vector[0] *= factor; vector[1] *= factor; return( *this ); } Vector2D& Vector2D::operator/=(const double denom) { vector[0] /= denom; vector[1] /= denom; return( *this ); } double length(const Vector2D& vec) { return( sqrt(vec.vector[0]*vec.vector[0] + vec.vector[1]*vec.vector[1]) ); } double vec2angle(const Vector2D& vec) { return atan2(vec.vector[1], vec.vector[0]); } Vector2D angle2vec(const double angle) { return Vector2D(cos(angle),sin(angle)); } Vector2D& Vector2D::normalize() { *this /= length(*this); return( *this ); } Vector2D unit(const Vector2D& vec) { Vector2D uvec(vec); uvec /= length(vec); return( uvec ); } realtimebattle-1.0.8/src/getopt.c0000644000175000017500000005767010202365472015125 0ustar moimoi/* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 1996 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. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO #define _NO_PROTO #endif #ifdef HAVE_CONFIG_H #include #endif #if !defined (__STDC__) || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #if defined (_LIBC) || !defined (__GNU_LIBRARY__) /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ #include #include #endif /* GNU C library. */ #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ #ifdef HAVE_LIBINTL_H # include # define _(msgid) gettext (msgid) #else # define _(msgid) (msgid) #endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg = NULL; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns EOF, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* XXX 1003.2 says this must be 1 before any call. */ int optind = 0; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return EOF with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ #include #define my_index strchr #else /* Avoid depending on library functions or files whose names are inconsistent. */ char *getenv (); static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ #if !defined (__STDC__) || !__STDC__ /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); #endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ static const char *nonoption_flags; static int nonoption_flags_len; /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined (__STDC__) && __STDC__ static void exchange (char **); #endif static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined (__STDC__) && __STDC__ static const char *_getopt_initialize (const char *); #endif static const char * _getopt_initialize (optstring) const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind = 1; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; if (posixly_correct == NULL) { /* Bash 2.0 puts a special variable in the environment for each command it runs, specifying which ARGV elements are the results of file name wildcard expansion and therefore should not be considered as options. */ char var[100]; sprintf (var, "_%d_GNU_nonoption_argv_flags_", getpid ()); nonoption_flags = getenv (var); if (nonoption_flags == NULL) nonoption_flags_len = 0; else nonoption_flags_len = strlen (nonoption_flags); } return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns `EOF'. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { optarg = NULL; if (optind == 0) { optstring = _getopt_initialize (optstring); optind = 1; /* Don't scan ARGV[0], the program name. */ } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. */ #define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ && nonoption_flags[optind] == '1')) if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return EOF; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return EOF; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if (nameend - nextchar == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (opterr) if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); nextchar += strlen (nextchar); optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (opterr) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (opterr) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } int getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } #endif /* _LIBC or not __GNU_LIBRARY__. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == EOF) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ realtimebattle-1.0.8/src/Gui.cc0000644000175000017500000001160410246642253014500 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include "Gui.h" #include "IntlDefs.h" #include "ArenaController.h" #include "ArenaWindow.h" #include "MessageWindow.h" #include "ScoreWindow.h" #include "StatisticsWindow.h" #include "StartTournamentWindow.h" #include "Dialog.h" #include "Options.h" #include using namespace std; Gui::Gui() { arenawindow_p = NULL; messagewindow_p = NULL; scorewindow_p = NULL; statisticswindow_p = NULL; starttournamentwindow_p = NULL; } void Gui::set_colours() { bg_rgb_colour = the_opts.get_l( OPTION_BACKGROUND_COLOUR ); fg_rgb_colour = the_opts.get_l( OPTION_FOREGROUND_COLOUR ); rtb_message_rgb_colour = the_opts.get_l( OPTION_RTB_MESSAGE_COLOUR ); bg_gdk_colour = make_gdk_colour( bg_rgb_colour ); fg_gdk_colour = make_gdk_colour( fg_rgb_colour ); rtb_message_gdk_colour = make_gdk_colour( rtb_message_rgb_colour ); } void Gui::open_arenawindow() { if( NULL == arenawindow_p ) arenawindow_p = new ArenaWindow( the_opts.get_l( OPTION_ARENA_WINDOW_SIZE_X ), the_opts.get_l( OPTION_ARENA_WINDOW_SIZE_Y ), the_opts.get_l( OPTION_ARENA_WINDOW_POS_X ), the_opts.get_l( OPTION_ARENA_WINDOW_POS_Y ) ); } void Gui::close_arenawindow() { if( NULL != arenawindow_p ) { delete arenawindow_p; arenawindow_p = NULL; } } void Gui::open_messagewindow() { if( NULL == messagewindow_p ) messagewindow_p = new MessageWindow( the_opts.get_l( OPTION_MESSAGE_WINDOW_SIZE_X ), the_opts.get_l( OPTION_MESSAGE_WINDOW_SIZE_Y ), the_opts.get_l( OPTION_MESSAGE_WINDOW_POS_X ), the_opts.get_l( OPTION_MESSAGE_WINDOW_POS_Y ) ); } void Gui::close_messagewindow() { if( NULL != messagewindow_p ) { delete messagewindow_p; messagewindow_p = NULL; } } void Gui::open_scorewindow() { if( NULL == scorewindow_p ) scorewindow_p = new ScoreWindow( the_opts.get_l( OPTION_SCORE_WINDOW_SIZE_X ), the_opts.get_l( OPTION_SCORE_WINDOW_SIZE_Y ), the_opts.get_l( OPTION_SCORE_WINDOW_POS_X ), the_opts.get_l( OPTION_SCORE_WINDOW_POS_Y ) ); } void Gui::close_scorewindow() { if( NULL != scorewindow_p ) { delete scorewindow_p; scorewindow_p = NULL; } } void Gui::open_statisticswindow() { if( the_arena_controller.is_started() ) if( NULL == statisticswindow_p && the_arena.get_state() != NOT_STARTED ) statisticswindow_p = new StatisticsWindow( the_opts.get_l( OPTION_STATISTICS_WINDOW_SIZE_X ), the_opts.get_l( OPTION_STATISTICS_WINDOW_SIZE_Y ), -1, -1 ); } void Gui::close_statisticswindow() { if( NULL != statisticswindow_p ) { delete statisticswindow_p; statisticswindow_p = NULL; } } void Gui::open_starttournamentwindow() { bool open = false; if( NULL == starttournamentwindow_p ) { if( the_arena_controller.is_started() ) if( the_arena.get_state() != NOT_STARTED && the_arena.get_state() != FINISHED ) { string info_text( _("This action will kill the current tournament.\n" "Do you want to do that?")); list string_list; string_list.push_back( string( "Yes" ) ); string_list.push_back( string( "No" ) ); Dialog( info_text, string_list, (DialogFunction) Gui::kill_and_start_new_tournament ); } else open = true; else open = true; } if( open ) starttournamentwindow_p = new StartTournamentWindow( -1, -1, -1, -1 ); } void Gui::kill_and_start_new_tournament( int result ) { if( the_arena_controller.is_started() && result == 1 ) { the_arena.interrupt_tournament(); the_gui.open_starttournamentwindow(); } } void Gui::close_starttournamentwindow() { if( NULL != starttournamentwindow_p ) { delete starttournamentwindow_p; starttournamentwindow_p = NULL; } } realtimebattle-1.0.8/src/ArenaWindow.cc0000644000175000017500000004146310235455375016205 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #include #include #include #include "ArenaWindow.h" #include "IntlDefs.h" #include "ArenaBase.h" #include "ArenaController.h" #include "ArenaRealTime.h" #include "ControlWindow.h" #include "Extras.h" #include "Robot.h" #include "Shot.h" #include "Structs.h" #include "Vector2D.h" #define GDK_360_DEGREES 23040 // 64 * 360 degrees extern class ControlWindow* controlwindow_p; ArenaWindow::ArenaWindow( const int default_width, const int default_height, const int default_x_pos, const int default_y_pos ) { // The window widget window_p = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_widget_set_name( window_p, "RTB Arena" ); set_window_title(); gtk_container_border_width( GTK_CONTAINER( window_p ), 12 ); if( default_width != -1 && default_height != -1 ) { gtk_window_set_default_size( GTK_WINDOW( window_p ), default_width, default_height ); gtk_widget_set_usize( window_p , 185, 120 ); } if( default_x_pos != -1 && default_y_pos != -1 ) gtk_widget_set_uposition( window_p, default_x_pos, default_y_pos ); gtk_signal_connect( GTK_OBJECT( window_p ), "delete_event", (GtkSignalFunc) ArenaWindow::hide_window, (gpointer) this ); // Main box GtkWidget* vbox = gtk_vbox_new( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window_p ), vbox ); gtk_widget_show( vbox ); // Zoom buttons struct button_t { string label; GtkSignalFunc func; }; struct button_t buttons[] = { { string( _(" No Zoom ") ) + string("[0] "), (GtkSignalFunc) ArenaWindow::no_zoom }, { string( _(" Zoom In ") ) + string("[+] "), (GtkSignalFunc) ArenaWindow::zoom_in }, { string( _(" Zoom Out ") ) + string("[-] "), (GtkSignalFunc) ArenaWindow::zoom_out } }; GtkWidget* button_table = gtk_table_new( 1, 3, TRUE ); gtk_box_pack_start( GTK_BOX( vbox ), button_table, FALSE, FALSE, 0 ); for( int i=0; i < 3; i++ ) { GtkWidget* button = gtk_button_new_with_label( buttons[i].label.c_str() ); gtk_signal_connect( GTK_OBJECT( button ), "clicked", buttons[i].func, (gpointer) this ); gtk_table_attach_defaults( GTK_TABLE( button_table ), button, i, i+1, 0, 1 ); gtk_widget_show( button ); } gtk_table_set_col_spacings( GTK_TABLE( button_table ), 5 ); gtk_widget_show( button_table ); // Scrolled Window scrolled_window = gtk_scrolled_window_new( NULL, NULL ); gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolled_window ), GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS ); gtk_container_add( GTK_CONTAINER( vbox ), scrolled_window ); gtk_widget_show( scrolled_window ); // Drawing Area drawing_area = gtk_drawing_area_new(); gtk_drawing_area_size( GTK_DRAWING_AREA( drawing_area ), default_width - 48, default_height - 80 ); gtk_signal_connect( GTK_OBJECT( drawing_area ), "expose_event", (GtkSignalFunc) ArenaWindow::redraw, (gpointer) this ); gtk_widget_set_events( drawing_area, GDK_EXPOSURE_MASK ); gtk_scrolled_window_add_with_viewport ( GTK_SCROLLED_WINDOW( scrolled_window ), drawing_area ); gtk_widget_show( drawing_area ); window_shown = controlwindow_p->is_arenawindow_checked(); zoom = 1; gtk_signal_connect( GTK_OBJECT( window_p ), "key_press_event", (GtkSignalFunc) ArenaWindow::keyboard_handler, this ); gtk_widget_show_now( window_p ); gdk_window_set_background( drawing_area->window, the_gui.get_bg_gdk_colour_p() ); gdk_window_clear( drawing_area->window ); if( !window_shown ) gtk_widget_hide( window_p ); } ArenaWindow::~ArenaWindow() { gtk_widget_destroy( window_p ); } void ArenaWindow::set_window_title() { string title = string( _("Arena") ) + " " + the_arena.get_current_arena_filename(); gtk_window_set_title( GTK_WINDOW( window_p ), title.c_str() ); } void ArenaWindow::set_window_shown( bool win_shown ) { window_shown = win_shown; } // Warning: event can be NULL, do not use event! gboolean ArenaWindow::hide_window( GtkWidget* widget, GdkEvent* event, class ArenaWindow* arenawindow_p ) { if( arenawindow_p->is_window_shown() ) { gtk_widget_hide( arenawindow_p->get_window_p() ); arenawindow_p->set_window_shown( false ); if( controlwindow_p->is_arenawindow_checked() ) { GtkWidget* menu_item = controlwindow_p->get_show_arena_menu_item(); gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( menu_item ), FALSE ); } } return true; } void ArenaWindow::show_window( GtkWidget* widget, class ArenaWindow* arenawindow_p ) { if( !arenawindow_p->is_window_shown() ) { gtk_widget_show( arenawindow_p->get_window_p() ); arenawindow_p->set_window_shown( true ); arenawindow_p->draw_everything(); } } void ArenaWindow::clear_area() { if( window_shown ) { GdkGC * colour_gc; colour_gc = gdk_gc_new( drawing_area->window ); gdk_gc_set_foreground( colour_gc, the_gui.get_bg_gdk_colour_p() ); gdk_draw_rectangle( drawing_area->window, colour_gc, true, 0, 0, drawing_area->allocation.width, drawing_area->allocation.height ); gdk_gc_destroy( colour_gc ); } } void ArenaWindow::draw_everything() { if( window_shown ) { clear_area(); if( ( scrolled_window->allocation.width - 24 != scrolled_window_size[0]) || ( scrolled_window->allocation.height - 24 != scrolled_window_size[1]) ) { drawing_area_scale_changed(); return; } list* object_lists; object_lists = the_arena.get_object_lists(); list::iterator li; // Must begin with innercircles (they are destructive) for( int obj_type=WALL; obj_type < LAST_OBJECT_TYPE ; obj_type++) { for( li = object_lists[obj_type].begin(); li != object_lists[obj_type].end(); ++li ) { if( !( ( obj_type == MINE || obj_type == COOKIE ) && !( (Extras*)(*li) )->is_alive() ) ) { (*li)->draw_shape( false ); } } } draw_moving_objects( false ); } } void ArenaWindow::draw_moving_objects( const bool clear_objects_first ) { if( window_shown ) { list* object_lists = the_arena.get_object_lists(); Robot* robotp; if( ( scrolled_window->allocation.width - 24 != scrolled_window_size[0]) || ( scrolled_window->allocation.height - 24 != scrolled_window_size[1]) ) { drawing_area_scale_changed(); return; } list::iterator li; for( li = object_lists[SHOT].begin(); li != object_lists[SHOT].end(); ++li ) if( ((Shot*)(*li))->is_alive() ) ((Shot*)(*li))->draw_shape( clear_objects_first ); list::iterator li2; for( li2 = object_lists[ROBOT].begin(); li2 != object_lists[ROBOT].end(); ++li2 ) { robotp = (Robot*)(*li2); if( robotp->is_alive() ) { robotp->draw_shape( clear_objects_first ); robotp->draw_radar_and_cannon(); } } } } void ArenaWindow::draw_circle( const Vector2D& center, const double radius, GdkColor& colour, const bool filled ) { if( window_shown ) { GdkGC * colour_gc; colour_gc = gdk_gc_new( drawing_area->window ); gdk_gc_set_foreground( colour_gc, &colour ); double r; if( ( r = radius * drawing_area_scale ) > 1.0 ) { gdk_draw_arc( drawing_area->window, colour_gc, filled, boundary2pixel_x( center[0]-radius ), boundary2pixel_y( center[1]+radius ), (int)(r*2.0 + 0.5), (int)(r*2.0 + 0.5), 0, GDK_360_DEGREES ); } else { gdk_draw_point( drawing_area->window, colour_gc, boundary2pixel_x( center[0] ), boundary2pixel_y( center[1] ) ); } gdk_gc_destroy( colour_gc ); } } void ArenaWindow::draw_arc( const Vector2D& center, const double inner_radius, const double outer_radius, const double angle1, const double angle2, GdkColor& colour ) { if( window_shown ) { const double rad2GDK = ((double)GDK_360_DEGREES) / ( 2.0 * M_PI ); gint a1 = (gint)( ( angle1 < 0.0 ? angle1 + 2 * M_PI : angle1 ) * rad2GDK + 0.5 ); double angle_diff = angle2 - angle1; gint a2 = (gint)( ( angle_diff < 0.0 ? angle_diff + 2 * M_PI : angle_diff ) * rad2GDK + 0.5 ); GdkGC * colour_gc; colour_gc = gdk_gc_new( drawing_area->window ); gdk_gc_set_foreground( colour_gc, &colour ); int line_width = (int)((outer_radius - inner_radius) * drawing_area_scale + 0.5); gdk_gc_set_line_attributes (colour_gc, line_width, GDK_LINE_SOLID, GDK_CAP_NOT_LAST, GDK_JOIN_MITER); double r = 0.5 * ( outer_radius + inner_radius ); int box_size = (int)( r*2.0*drawing_area_scale + 0.5 ); if( box_size >= 2.0 ) { gdk_draw_arc( drawing_area->window, colour_gc, false, boundary2pixel_x( center[0] - r ), boundary2pixel_y( center[1] + r ), box_size, box_size, a1, a2 ); } else { gdk_draw_point( drawing_area->window, colour_gc, boundary2pixel_x( center[0] ), boundary2pixel_y( center[1] ) ); } gdk_gc_destroy( colour_gc ); } } void ArenaWindow::draw_rectangle( const Vector2D& start, const Vector2D& end, GdkColor& colour, const bool filled ) { if( window_shown ) { GdkGC * colour_gc; colour_gc = gdk_gc_new( drawing_area->window ); gdk_gc_set_foreground( colour_gc, &colour ); gdk_draw_rectangle( drawing_area->window, colour_gc, filled, boundary2pixel_x( start[0] ), boundary2pixel_y( end[1] ), boundary2pixel_x( end[0] - start[0] ), boundary2pixel_y( end[1] - start[1] ) ); gdk_gc_destroy( colour_gc ); } } void ArenaWindow::draw_line( const Vector2D& start, const Vector2D& direction, const double length, const double thickness, GdkColor& colour ) { if( window_shown ) { GdkGC * colour_gc; GdkPoint g_points[4]; Vector2D vector_points[4]; colour_gc = gdk_gc_new( drawing_area->window ); gdk_gc_set_foreground( colour_gc, &colour ); Vector2D line_thick = unit( direction ); line_thick = rotate90( line_thick ); line_thick *= thickness; vector_points[0] = start + line_thick; vector_points[1] = start - line_thick; vector_points[2] = start - line_thick + direction * length; vector_points[3] = start + line_thick + direction * length; for(int i=0;i<4;i++) { g_points[i].x = boundary2pixel_x( vector_points[i][0] ); g_points[i].y = boundary2pixel_y( vector_points[i][1] ); } gdk_draw_polygon( drawing_area->window, colour_gc, true, g_points, 4 ); gdk_gc_destroy( colour_gc ); } } void ArenaWindow::draw_line( const Vector2D& start, const Vector2D& direction, const double length, GdkColor& colour ) { if( window_shown ) { GdkGC * colour_gc; colour_gc = gdk_gc_new( drawing_area->window ); gdk_gc_set_foreground( colour_gc, &colour ); Vector2D end_point = start + length * direction; gdk_draw_line( drawing_area->window, colour_gc, boundary2pixel_x( start[0] ), boundary2pixel_y( start[1] ), boundary2pixel_x( end_point[0] ), boundary2pixel_y( end_point[1] ) ); gdk_gc_destroy( colour_gc ); } } void ArenaWindow::drawing_area_scale_changed( const bool change_da_value ) { if( window_shown ) { int width = scrolled_window->allocation.width - 24; int height = scrolled_window->allocation.height - 24; scrolled_window_size = Vector2D( (double)width, (double)height ); double w = (double)( width * zoom ); double h = (double)( height * zoom ); double bw = the_arena.get_boundary()[1][0] - the_arena.get_boundary()[0][0]; double bh = the_arena.get_boundary()[1][1] - the_arena.get_boundary()[0][1]; if( w / bw >= h / bh ) { drawing_area_scale = h / bh; w = drawing_area_scale * bw; } else { drawing_area_scale = w / bw; h = drawing_area_scale * bh; } gtk_widget_set_usize( drawing_area, (int)w, (int)h ); if( change_da_value ) { GtkAdjustment* hadj = gtk_scrolled_window_get_hadjustment ( (GtkScrolledWindow*) scrolled_window ); gtk_adjustment_set_value( hadj, ( ( hadj->value + hadj->page_size / 2 ) / ( hadj->upper - hadj->lower ) ) * (int)w - hadj->page_size / 2 ); GtkAdjustment* vadj = gtk_scrolled_window_get_vadjustment ( (GtkScrolledWindow*) scrolled_window ); gtk_adjustment_set_value( vadj, ( ( vadj->value + vadj->page_size / 2 ) / ( vadj->upper - vadj->lower ) ) * (int)h - vadj->page_size / 2 ); } else draw_everything(); } } // Warning! Do not use widget, may be NULL or undefined void ArenaWindow::no_zoom( GtkWidget* widget, class ArenaWindow* arenawindow_p ) { arenawindow_p->set_zoom( 1 ); arenawindow_p->drawing_area_scale_changed(); } // Warning! Do not use widget, may be NULL or undefined void ArenaWindow::zoom_in( GtkWidget* widget, class ArenaWindow* arenawindow_p ) { int z = arenawindow_p->get_zoom(); z++; arenawindow_p->set_zoom( z ); arenawindow_p->drawing_area_scale_changed( true ); } // Warning! Do not use widget, may be NULL or undefined void ArenaWindow::zoom_out( GtkWidget* widget, class ArenaWindow* arenawindow_p ) { int z = arenawindow_p->get_zoom(); if( z > 1 ) z--; arenawindow_p->set_zoom( z ); arenawindow_p->drawing_area_scale_changed( true ); } gint ArenaWindow::keyboard_handler( GtkWidget* widget, GdkEventKey *event, class ArenaWindow* arenawindow_p ) { switch (event->keyval) { case GDK_plus: case GDK_KP_Add: zoom_in( NULL, arenawindow_p ); break; case GDK_minus: case GDK_KP_Subtract: zoom_out( NULL, arenawindow_p ); break; case GDK_0: case GDK_KP_0: case GDK_KP_Insert: no_zoom( NULL, arenawindow_p ); break; default: return FALSE; } gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "key_press_event" ); return FALSE; } gint ArenaWindow::redraw( GtkWidget* widget, GdkEventExpose* event, class ArenaWindow* arenawindow_p ) { if( the_arena_controller.is_started() ) arenawindow_p->draw_everything(); return FALSE; } realtimebattle-1.0.8/src/ControlWindow.cc0000644000175000017500000006011510404234035016554 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #include #include "ControlWindow.h" #include "IntlDefs.h" #include "ArenaWindow.h" #include "MessageWindow.h" #include "ScoreWindow.h" #include "StatisticsWindow.h" #include "Gui.h" #include "Dialog.h" #include "ArenaController.h" #include "ArenaRealTime.h" #include "ArenaReplay.h" #include "Robot.h" #include "Options.h" #include "Various.h" #include using namespace std; extern class ControlWindow* controlwindow_p; ControlWindow::ControlWindow( const int default_width, const int default_height, const int default_x_pos, const int default_y_pos ) { // The window widget window_p = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_widget_set_name( window_p, "RTB Control" ); gtk_window_set_policy( GTK_WINDOW( window_p ), FALSE, FALSE, FALSE ); set_window_title( "RealTimeBattle" ); gtk_container_border_width( GTK_CONTAINER( window_p ), 12 ); if( default_width != -1 && default_height != -1 ) gtk_widget_set_usize( window_p, default_width, default_height ); if( default_x_pos != -1 && default_y_pos != -1 ) gtk_widget_set_uposition( window_p, default_x_pos, default_y_pos ); gtk_signal_connect( GTK_OBJECT( window_p ), "delete_event", (GtkSignalFunc) ControlWindow::delete_event_occured, (gpointer) this ); // Main boxes window_hbox = gtk_hbox_new ( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window_p ), window_hbox ); gtk_widget_show( window_hbox ); GtkWidget* vbox = gtk_vbox_new( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window_hbox ), vbox ); gtk_widget_show( vbox ); // Buttons for all modes struct button_t { string label; GtkSignalFunc func; int pack; }; struct button_t buttons[] = { { string( _(" New Tournament ") ), (GtkSignalFunc) ControlWindow::new_tournament , TRUE }, { string( _(" Replay Tournament ") ), (GtkSignalFunc) ControlWindow::replay_tournament , TRUE }, { string( _(" Pause ") ), (GtkSignalFunc) ControlWindow::pause , TRUE }, { string( _(" End ") ), (GtkSignalFunc) ControlWindow::end_clicked , TRUE }, { string( _(" Options ") ), (GtkSignalFunc) ControlWindow::options_clicked , TRUE }, { string( _(" Statistics ") ), (GtkSignalFunc) ControlWindow::statistics_clicked, TRUE }, { string( _(" Quit ") ), (GtkSignalFunc) ControlWindow::quit_rtb , FALSE } }; GtkWidget* button_hbox[3] = { NULL,NULL,NULL }; int hbox_index = -1; for(int i = 0;i < 7; i++) { if( i == 0 || i == 4 || i == 6 ) { hbox_index++; button_hbox[hbox_index] = gtk_hbox_new( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), button_hbox[hbox_index], FALSE, FALSE, 0); gtk_widget_show( button_hbox[hbox_index] ); } GtkWidget* button = gtk_button_new_with_label( buttons[i].label.c_str() ); gtk_signal_connect( GTK_OBJECT( button ), "clicked", (GtkSignalFunc) buttons[i].func, (gpointer) this ); gtk_box_pack_start( GTK_BOX( button_hbox[hbox_index] ), button, TRUE, buttons[i].pack , 0 ); gtk_widget_show( button ); } struct button_t menu_items_data[] = { { string( _("Show arena window") ), (GtkSignalFunc) ControlWindow::arena_window_toggle, TRUE }, { string( _("Show message window") ), (GtkSignalFunc) ControlWindow::message_window_toggle, TRUE }, { string( _("Show score window") ), (GtkSignalFunc) ControlWindow::score_window_toggle, TRUE } }; GtkWidget* omenu = gtk_option_menu_new(); GtkWidget* menu = gtk_menu_new(); for( int i = 0;i < 3; i++ ) { GtkWidget* menu_item = gtk_check_menu_item_new_with_label( menu_items_data[i].label.c_str() ); gtk_signal_connect( GTK_OBJECT( menu_item ), "toggled", menu_items_data[i].func, (gpointer) this ); gtk_menu_append (GTK_MENU (menu), menu_item); gtk_check_menu_item_set_show_toggle( GTK_CHECK_MENU_ITEM( menu_item ), TRUE ); gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( menu_item ), TRUE ); gtk_widget_show( menu_item ); switch( i ) { case 0: show_arena_menu_item = menu_item; break; case 1: show_message_menu_item = menu_item; break; case 2: show_score_menu_item = menu_item; break; } } gtk_box_pack_start( GTK_BOX( button_hbox[1] ), omenu, TRUE, TRUE, 0 ); gtk_option_menu_set_menu( GTK_OPTION_MENU( omenu ), menu ); gtk_widget_show( omenu ); vseparator = NULL; extra_vbox = NULL; filesel = NULL; remove_replay_widgets(); gtk_widget_show( window_p ); } void ControlWindow::remove_replay_widgets() { if( the_arena_controller.game_mode == ArenaBase::DEBUG_MODE ) display_debug_widgets(); else clear_extra_widgets(); } void ControlWindow::clear_extra_widgets() { if( extra_vbox != NULL ) gtk_widget_destroy( extra_vbox ); if( vseparator != NULL ) gtk_widget_destroy( vseparator ); extra_vbox = NULL; vseparator = NULL; displayed = NO_WIDGETS; } void ControlWindow::display_debug_widgets() { clear_extra_widgets(); vseparator = gtk_vseparator_new(); gtk_box_pack_start( GTK_BOX (window_hbox), vseparator, FALSE, FALSE, 0 ); gtk_widget_show( vseparator ); extra_vbox = gtk_vbox_new( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window_hbox ), extra_vbox ); gtk_widget_show( extra_vbox ); struct button_t { string label; GtkSignalFunc func; int pack; }; struct button_t debug_buttons[] = { { string( _(" Step ") ), (GtkSignalFunc) ControlWindow::step , TRUE }, { string( _(" End Game ") ), (GtkSignalFunc) ControlWindow::end_game , TRUE }, { string( _(" Kill Marked Robot ") ), (GtkSignalFunc) ControlWindow::kill_robot, TRUE } }; GtkWidget* button_hbox = NULL; for(int i = 0;i < 3; i++) { if( i == 0 || i == 2 ) { button_hbox = gtk_hbox_new( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( extra_vbox ), button_hbox, FALSE, FALSE, 0); gtk_widget_show( button_hbox ); } GtkWidget* button = gtk_button_new_with_label( debug_buttons[i].label.c_str() ); gtk_signal_connect( GTK_OBJECT( button ), "clicked", (GtkSignalFunc) debug_buttons[i].func, (gpointer) NULL ); gtk_box_pack_start( GTK_BOX( button_hbox ), button, TRUE, debug_buttons[i].pack , 0); gtk_widget_show( button ); } button_hbox = gtk_hbox_new( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( extra_vbox ), button_hbox, FALSE, FALSE, 0); gtk_widget_show( button_hbox ); GtkWidget* label = gtk_label_new( _(" Debug Level: ") ); gtk_box_pack_start( GTK_BOX( button_hbox ), label, TRUE, FALSE, 0 ); gtk_widget_show( label ); GtkAdjustment* adj = (GtkAdjustment*) gtk_adjustment_new( the_arena_controller.debug_level, 0, max_debug_level, 1, 1, 0 ); debug_level = gtk_spin_button_new( adj, 0, 0 ); gtk_signal_connect( GTK_OBJECT( adj ), "value_changed", (GtkSignalFunc) change_debug_level, (gpointer) this ); gtk_box_pack_start( GTK_BOX( button_hbox ), debug_level, TRUE, FALSE, 0 ); gtk_widget_show( debug_level ); displayed = DEBUG_WIDGETS; } void ControlWindow::display_replay_widgets() { clear_extra_widgets(); vseparator = gtk_vseparator_new(); gtk_box_pack_start( GTK_BOX (window_hbox), vseparator, FALSE, FALSE, 0 ); gtk_widget_show( vseparator ); extra_vbox = gtk_vbox_new( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window_hbox ), extra_vbox ); gtk_widget_show( extra_vbox ); GtkWidget* hbox = gtk_hbox_new( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( extra_vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); current_replay_time_adjustment = (GtkAdjustment*) gtk_adjustment_new ( 0.0, 0.0, replay_arena.get_length_of_current_game()+1, 0.1, 1.0, 1.0 ); gtk_signal_connect( GTK_OBJECT( current_replay_time_adjustment ), "value_changed", (GtkSignalFunc) change_current_replay_time, (gpointer) this ); time_control = gtk_hscale_new( GTK_ADJUSTMENT( current_replay_time_adjustment ) ); gtk_widget_set_usize( GTK_WIDGET( time_control ), 150, 30 ); gtk_range_set_update_policy( GTK_RANGE( time_control ), GTK_UPDATE_DELAYED ); gtk_scale_set_value_pos( GTK_SCALE( time_control ), GTK_POS_TOP); gtk_scale_set_digits( GTK_SCALE( time_control ), 0 ); gtk_scale_set_draw_value( GTK_SCALE( time_control ), TRUE ); gtk_box_pack_start( GTK_BOX( hbox ), time_control, TRUE, TRUE, 0 ); gtk_widget_show( time_control ); char* rew_xpm[13] = { "18 10 2 1", " c None", "x c #000000000000", " xx xx", " xxxx xxxx", " xxxxxx xxxxxx", " xxxxxxxx xxxxxxxx", "xxxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxx", " xxxxxxxx xxxxxxxx", " xxxxxx xxxxxx", " xxxx xxxx", " xx xx" }; char* ffw_xpm[13] = { "18 10 2 1", " c None", "x c #000000000000", "xx xx ", "xxxx xxxx ", "xxxxxx xxxxxx ", "xxxxxxxx xxxxxxxx ", "xxxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxx", "xxxxxxxx xxxxxxxx ", "xxxxxx xxxxxx ", "xxxx xxxx ", "xx xx " }; struct button_t { char** xpm; string label; GtkSignalFunc clicked_func; GtkSignalFunc pressed_func; GtkSignalFunc released_func; }; struct button_t replay_buttons[] = { { rew_xpm, string(""), (GtkSignalFunc) ControlWindow::dummy, (GtkSignalFunc) ControlWindow::rewind_pressed, (GtkSignalFunc) ControlWindow::rewind_released }, { ffw_xpm, string(""), (GtkSignalFunc) ControlWindow::dummy, (GtkSignalFunc) ControlWindow::fast_forward_pressed, (GtkSignalFunc) ControlWindow::fast_forward_released }, { NULL, string( _(" Step forward ") ), (GtkSignalFunc) ControlWindow::step_forward, (GtkSignalFunc) ControlWindow::dummy, (GtkSignalFunc) ControlWindow::dummy }, { NULL, string( _(" Step backward ") ), (GtkSignalFunc) ControlWindow::step_backward, (GtkSignalFunc) ControlWindow::dummy, (GtkSignalFunc) ControlWindow::dummy }, { NULL, string( _(" Next Game ") ), (GtkSignalFunc) ControlWindow::next_game, (GtkSignalFunc) ControlWindow::dummy, (GtkSignalFunc) ControlWindow::dummy }, { NULL, string( _(" Prev Game ") ), (GtkSignalFunc) ControlWindow::prev_game, (GtkSignalFunc) ControlWindow::dummy, (GtkSignalFunc) ControlWindow::dummy }, { NULL, string( _(" Next Seq ") ), (GtkSignalFunc) ControlWindow::next_seq, (GtkSignalFunc) ControlWindow::dummy, (GtkSignalFunc) ControlWindow::dummy }, { NULL, string( _(" Prev Seq ") ), (GtkSignalFunc) ControlWindow::prev_seq, (GtkSignalFunc) ControlWindow::dummy, (GtkSignalFunc) ControlWindow::dummy } }; GtkWidget* button_hbox = NULL; for(int i = 0;i < 8; i++) { if( i == 0 || i == 4 ) { button_hbox = gtk_hbox_new( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( extra_vbox ), button_hbox, FALSE, FALSE, 0); gtk_widget_show( button_hbox ); } GtkWidget* button_w; if( replay_buttons[i].xpm != NULL ) { button_w = gtk_button_new(); GdkPixmap* pixmap; GdkBitmap* bitmap_mask; pixmap = gdk_pixmap_create_from_xpm_d( window_p->window, &bitmap_mask, &(window_p->style->black), replay_buttons[i].xpm ); GtkWidget* pixmap_widget = gtk_pixmap_new( pixmap, bitmap_mask ); gtk_widget_show( pixmap_widget ); gtk_container_add( GTK_CONTAINER( button_w ), pixmap_widget ); gtk_widget_set_usize( button_w, 32, 20 ); } else button_w = gtk_button_new_with_label( replay_buttons[i].label.c_str() ); gtk_signal_connect( GTK_OBJECT( button_w ), "clicked", (GtkSignalFunc) replay_buttons[i].clicked_func, (gpointer) NULL ); gtk_signal_connect( GTK_OBJECT( button_w ), "pressed", (GtkSignalFunc) replay_buttons[i].pressed_func, (gpointer) NULL ); gtk_signal_connect( GTK_OBJECT( button_w ), "released", (GtkSignalFunc) replay_buttons[i].released_func, (gpointer) NULL ); gtk_box_pack_start( GTK_BOX( button_hbox ), button_w, TRUE, TRUE , 0); gtk_widget_show( button_w ); } displayed = REPLAY_WIDGETS; } void ControlWindow::change_time_limitations() { if( displayed == REPLAY_WIDGETS ) { // Possible memory leak: Do not know how to destroy old adjustment // possibly destroyed by gtk_range_set_adjustment() current_replay_time_adjustment = (GtkAdjustment*) gtk_adjustment_new ( 0.0, 0.0, replay_arena.get_length_of_current_game(), 0.1, 1.0, 1.0 ); gtk_signal_connect( GTK_OBJECT( current_replay_time_adjustment ), "value_changed", (GtkSignalFunc) change_current_replay_time, (gpointer) this ); gtk_range_set_adjustment( GTK_RANGE( time_control ), current_replay_time_adjustment ); } } ControlWindow::~ControlWindow() { gtk_widget_destroy( window_p ); } void ControlWindow::set_window_title( const string& text) { string title = text; gtk_window_set_title( GTK_WINDOW( window_p ), title.c_str() ); } void ControlWindow::delete_event_occured( GtkWidget* widget, GdkEvent* event, class ControlWindow* cw_p ) { Quit(); } void ControlWindow::quit_rtb( GtkWidget* widget, class ControlWindow* cw_p ) { Quit(); } void ControlWindow::pause( GtkWidget* widget, class ControlWindow* cw_p ) { if( the_arena_controller.is_started() ) the_arena.pause_game_toggle(); } void ControlWindow::step( GtkWidget* widget, gpointer data ) { if( the_arena_controller.is_started() ) the_arena.step_paused_game(); } void ControlWindow::end_game( GtkWidget* widget, gpointer data ) { if( the_arena_controller.is_started() ) if( the_arena.get_state() != NOT_STARTED && the_arena.get_state() != FINISHED ) the_arena.end_game(); } void ControlWindow::kill_robot( GtkWidget* widget, gpointer data ) { if( the_arena_controller.is_started() ) if(the_arena.get_state() == GAME_IN_PROGRESS || the_arena.get_state() == PAUSED ) { Robot* robotp = the_gui.get_scorewindow_p()->get_selected_robot(); if( robotp != NULL ) robotp->die(); } } void ControlWindow::change_debug_level( GtkAdjustment *adj, class ControlWindow* cw_p ) { if( the_arena_controller.is_started() ) the_arena.set_debug_level ( gtk_spin_button_get_value_as_int ( GTK_SPIN_BUTTON( cw_p->debug_level ) ) ); } void ControlWindow::new_tournament( GtkWidget* widget, class ControlWindow* cw_p ) { the_gui.open_starttournamentwindow(); } void ControlWindow::replay_tournament( GtkWidget* widget, class ControlWindow* cw_p ) { if( the_arena_controller.is_started() && ( the_arena.get_state() != NOT_STARTED && the_arena.get_state() != FINISHED ) ) { string info_text( _("This action will kill the current tournament.\n" "Do you want to do that?") ); list string_list; string_list.push_back( string( _("Yes") ) ); string_list.push_back( string( _("No") ) ); Dialog( info_text, string_list, (DialogFunction) ControlWindow::kill_and_open_filesel ); } else cw_p->open_replay_filesel(); } void ControlWindow::open_replay_filesel() { if( filesel == NULL ) { filesel = gtk_file_selection_new( _("Choose a log file to replay") ); gtk_signal_connect( GTK_OBJECT( filesel ), "destroy", (GtkSignalFunc) ControlWindow::destroy_filesel, (gpointer) this ); gtk_signal_connect ( GTK_OBJECT( GTK_FILE_SELECTION( filesel )->cancel_button ), "clicked", (GtkSignalFunc) ControlWindow::destroy_filesel, (gpointer) this ); gtk_signal_connect ( GTK_OBJECT( GTK_FILE_SELECTION( filesel )->ok_button ), "clicked", (GtkSignalFunc) ControlWindow::replay, (gpointer) this ); gtk_widget_show( filesel ); } } void ControlWindow::kill_and_open_filesel( int result ) { if( the_arena_controller.is_started() && result == 1 ) { the_arena.interrupt_tournament(); controlwindow_p->open_replay_filesel(); } } void ControlWindow::arena_window_toggle( GtkWidget* widget, class ControlWindow* cw_p ) { bool active = GTK_CHECK_MENU_ITEM( widget )->active; if( the_gui.is_arenawindow_up() ) { if( active ) the_gui.get_arenawindow_p()-> show_window( the_gui.get_arenawindow_p()->get_window_p(), the_gui.get_arenawindow_p() ); else the_gui.get_arenawindow_p()-> hide_window( the_gui.get_arenawindow_p()->get_window_p(), NULL, the_gui.get_arenawindow_p() ); } } bool ControlWindow::is_arenawindow_checked() { return GTK_CHECK_MENU_ITEM( show_arena_menu_item )->active; } void ControlWindow::message_window_toggle( GtkWidget* widget, class ControlWindow* cw_p ) { bool active = GTK_CHECK_MENU_ITEM( widget )->active; if( the_gui.is_messagewindow_up() ) { if( active ) the_gui.get_messagewindow_p()-> show_window( the_gui.get_messagewindow_p()->get_window_p(), the_gui.get_messagewindow_p() ); else the_gui.get_messagewindow_p()-> hide_window( the_gui.get_messagewindow_p()->get_window_p(), NULL, the_gui.get_messagewindow_p() ); } } bool ControlWindow::is_messagewindow_checked() { return GTK_CHECK_MENU_ITEM( show_message_menu_item )->active; } void ControlWindow::score_window_toggle( GtkWidget* widget, class ControlWindow* cw_p ) { bool active = GTK_CHECK_MENU_ITEM( widget )->active; if( the_gui.is_scorewindow_up() ) { if( active ) the_gui.get_scorewindow_p()-> show_window( the_gui.get_scorewindow_p()->get_window_p(), the_gui.get_scorewindow_p() ); else the_gui.get_scorewindow_p()-> hide_window( the_gui.get_scorewindow_p()->get_window_p(), NULL, the_gui.get_scorewindow_p() ); } } bool ControlWindow::is_scorewindow_checked() { return GTK_CHECK_MENU_ITEM( show_score_menu_item )->active; } void ControlWindow::replay( GtkWidget* widget, class ControlWindow* cw_p ) { try { string filename = gtk_file_selection_get_filename ( GTK_FILE_SELECTION( cw_p->get_filesel() ) ); destroy_filesel( cw_p->get_filesel(), cw_p ); if( filename.at(filename.size() - 1) == '/' ) return; // no file is selected // rudimentary sanity check if( check_logfile( filename ) ) { the_arena_controller.replay_filename = filename; the_arena_controller.start_replay_arena(); } } catch(exception& e) { Error(true, e.what(), "ControlWindow::replay"); } } void ControlWindow::destroy_filesel( GtkWidget* widget, class ControlWindow* cw_p ) { gtk_widget_destroy( cw_p->get_filesel() ); cw_p->set_filesel( NULL ); } void ControlWindow::end_clicked( GtkWidget* widget, gpointer data ) { if( the_arena_controller.is_started() ) if( the_arena.get_state() != NOT_STARTED && the_arena.get_state() != FINISHED ) { string info_text( _("This action will kill the current tournament.\n" "Do you want to do that?") ); list string_list; string_list.push_back( string( _("Yes") ) ); string_list.push_back( string( _("No") ) ); Dialog( info_text, string_list, (DialogFunction) ControlWindow::end_tournament ); } } void ControlWindow::end_tournament( int result ) { if( the_arena_controller.is_started() && result == 1 ) the_arena.interrupt_tournament(); } void ControlWindow::options_clicked( GtkWidget* widget, class ControlWindow* cw_p ) { the_opts.open_optionswindow(); } void ControlWindow::statistics_clicked( GtkWidget* widget, class ControlWindow* cw_p ) { the_gui.open_statisticswindow(); } void ControlWindow::rewind_pressed( GtkWidget* widget, class ControlWindow* cw_p ) { // cout << "rewinding ... " << endl; replay_arena.change_speed( false, true ); } void ControlWindow::rewind_released( GtkWidget* widget, class ControlWindow* cw_p ) { // cout << "until released" << endl; replay_arena.change_speed( false, false ); } void ControlWindow::fast_forward_pressed( GtkWidget* widget, class ControlWindow* cw_p ) { // cout << "forwarding ... " << endl; replay_arena.change_speed( true, true ); } void ControlWindow::fast_forward_released( GtkWidget* widget, class ControlWindow* cw_p ) { // cout << "until released" << endl; replay_arena.change_speed( true, false ); } void ControlWindow::step_forward( GtkWidget* widget, class ControlWindow* cw_p ) { // cout << "Stepping forward" << endl; replay_arena.step_forward_or_backward( true ); } void ControlWindow::step_backward( GtkWidget* widget, class ControlWindow* cw_p ) { // cout << "Stepping backward" << endl; replay_arena.step_forward_or_backward( false ); } void ControlWindow::next_game( GtkWidget* widget, class ControlWindow* cw_p ) { replay_arena.change_game( 1, 0 ); } void ControlWindow::prev_game( GtkWidget* widget, class ControlWindow* cw_p ) { replay_arena.change_game( -1, 0 ); } void ControlWindow::next_seq( GtkWidget* widget, class ControlWindow* cw_p ) { replay_arena.change_game( 0, 1 ); } void ControlWindow::prev_seq( GtkWidget* widget, class ControlWindow* cw_p ) { replay_arena.change_game( 0, -1 ); } void ControlWindow::change_current_replay_time( GtkAdjustment *adj, class ControlWindow* cw_p ) { replay_arena.change_replay_time( adj->value ); } void ControlWindow::set_progress_time( const double time ) { gtk_adjustment_set_value( current_replay_time_adjustment, time ); } realtimebattle-1.0.8/src/Dialog.cc0000644000175000017500000000563110235455376015164 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #include #include "Dialog.h" #include #include "IntlDefs.h" // // The value returned from Dialog is the order of button_labels, // beginning with 1. // If the delete_event is received, no value will be returned // Dialog::Dialog( const string& info, const list& button_labels, const DialogFunction func, const gchar* window_title ) { // The window window_p = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( window_p ), window_title ); gtk_widget_set_name( window_p, "RTB Dialog" ); gtk_window_set_policy( GTK_WINDOW( window_p ), FALSE, FALSE, FALSE ); gtk_window_position( GTK_WINDOW( window_p ), GTK_WIN_POS_CENTER ); gtk_container_border_width( GTK_CONTAINER( window_p ), 12 ); gtk_signal_connect( GTK_OBJECT( window_p ), "delete_event", (GtkSignalFunc) gtk_widget_destroy, (gpointer) NULL ); // Main box GtkWidget* vbox = gtk_vbox_new( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window_p ), vbox ); gtk_widget_show( vbox ); // The info text GtkWidget* label = gtk_label_new( info.c_str() ); gtk_box_pack_start( GTK_BOX( vbox ), label, TRUE, TRUE, 0 ); gtk_widget_show( label ); // The buttons GtkWidget* hbox = gtk_hbox_new( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, TRUE, TRUE, 0 ); gtk_widget_show( hbox ); list::const_iterator li; string str; GtkWidget* button_w; int list_nr = 0; for( li = button_labels.begin(); li != button_labels.end(); ++li ) { list_nr++; str = *li; button_w = gtk_button_new_with_label( str.c_str() ); gtk_signal_connect( GTK_OBJECT( button_w ), "clicked", (GtkSignalFunc) Dialog::generate_result, (gpointer) new result_t( list_nr, func, window_p ) ); gtk_box_pack_start( GTK_BOX( hbox ), button_w, TRUE, TRUE, 0 ); gtk_widget_show( button_w ); } gtk_widget_show( window_p ); } void Dialog::generate_result( GtkWidget* widget, result_t* result_p ) { (*(result_p->function))(result_p->result); gtk_widget_destroy( result_p->widget ); } realtimebattle-1.0.8/src/MessageWindow.cc0000644000175000017500000002321210222311121016503 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #include #include "MessageWindow.h" #include "IntlDefs.h" #include "ScoreWindow.h" #include "ControlWindow.h" #include "Gui.h" #include "ArenaController.h" #include "ArenaRealTime.h" #include "Robot.h" #include "Various.h" extern class ControlWindow* controlwindow_p; MessageWindow::MessageWindow( const int default_width, const int default_height, const int default_x_pos, const int default_y_pos ) { // The window widget viewed_robot = NULL; window_p = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_widget_set_name( window_p, "RTB Message" ); set_window_title(); gtk_container_border_width( GTK_CONTAINER( window_p ), 12 ); if( default_width != -1 && default_height != -1 ) { gtk_window_set_default_size( GTK_WINDOW( window_p ), default_width, default_height ); gtk_widget_set_usize( window_p , 300, 110 ); } if( default_x_pos != -1 && default_y_pos != -1 ) gtk_widget_set_uposition( window_p, default_x_pos, default_y_pos ); gtk_signal_connect( GTK_OBJECT( window_p ), "delete_event", (GtkSignalFunc) MessageWindow::hide_window, (gpointer) this ); // Main box GtkWidget* vbox = gtk_vbox_new( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window_p ), vbox ); gtk_widget_show( vbox ); // Buttons GtkWidget* hbox = gtk_hbox_new( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); struct button_t { string label; GtkSignalFunc func; }; struct button_t buttons[] = { { string( _(" Clear all messages ") ), (GtkSignalFunc) MessageWindow::clear_clist }, { string( _(" Show only marked robot ") ), (GtkSignalFunc) MessageWindow::show_one_robot }, { string( _(" Show all ") ), (GtkSignalFunc) MessageWindow::show_all } }; for(int i = 0;i < 3; i++) { GtkWidget* button = gtk_button_new_with_label( buttons[i].label.c_str() ); gtk_signal_connect( GTK_OBJECT( button ), "clicked", (GtkSignalFunc) buttons[i].func, (gpointer) this ); gtk_box_pack_start( GTK_BOX( hbox ), button, TRUE, TRUE, 0 ); gtk_widget_show( button ); } GtkObject* hadj = gtk_adjustment_new( 0.0, 0.0, 100.0, 1.0, 1.0, 1.0 ); GtkObject* vadj = gtk_adjustment_new( 0.0, 0.0, 100.0, 1.0, 1.0, 1.0 ); GtkWidget* scrolled_win = gtk_scrolled_window_new( GTK_ADJUSTMENT( hadj ), GTK_ADJUSTMENT( vadj ) ); gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolled_win ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); gtk_box_pack_start( GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0 ); gtk_widget_show( scrolled_win ); char* titles[2] = { _(" Robot "), _(" Message ") }; clist = gtk_clist_new_with_titles( 2, titles ); gtk_clist_set_selection_mode( GTK_CLIST( clist ), GTK_SELECTION_BROWSE ); gtk_clist_set_column_width( GTK_CLIST( clist ), 0, 130 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 1, 1000 ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 0, GTK_JUSTIFY_LEFT ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 1, GTK_JUSTIFY_LEFT ); gtk_clist_column_titles_passive( GTK_CLIST( clist ) ); gtk_clist_set_shadow_type( GTK_CLIST( clist ), GTK_SHADOW_IN ); gtk_container_add( GTK_CONTAINER( scrolled_win ), clist ); GtkStyle* clist_style = gtk_rc_get_style(window_p); if( clist_style == NULL ) clist_style = gtk_style_new(); else clist_style = gtk_style_copy(clist_style); clist_style->base[GTK_STATE_NORMAL] = *(the_gui.get_bg_gdk_colour_p()); clist_style->base[GTK_STATE_ACTIVE] = make_gdk_colour( 0xffffff ); clist_style->bg[GTK_STATE_SELECTED] = make_gdk_colour( 0xf0d2b4 ); clist_style->fg[GTK_STATE_SELECTED] = *(the_gui.get_fg_gdk_colour_p()); gtk_widget_set_style( clist, clist_style ); gtk_widget_show( clist ); rtb_message_row_style = gtk_rc_get_style(window_p); if( rtb_message_row_style == NULL ) rtb_message_row_style = gtk_style_new(); else rtb_message_row_style = gtk_style_copy(rtb_message_row_style); rtb_message_row_style->base[GTK_STATE_NORMAL] = make_gdk_colour( the_gui.get_bg_rgb_colour() ); rtb_message_row_style->base[GTK_STATE_ACTIVE] = make_gdk_colour( 0xffffff ); rtb_message_row_style->bg[GTK_STATE_SELECTED] = make_gdk_colour( 0xf0d2b4 ); rtb_message_row_style->fg[GTK_STATE_NORMAL] = *( the_gui.get_rtb_message_gdk_colour_p() ); rtb_message_row_style->fg[GTK_STATE_SELECTED] = *( the_gui.get_rtb_message_gdk_colour_p() ); robot_message_row_style = gtk_rc_get_style(window_p); if( robot_message_row_style == NULL ) robot_message_row_style = gtk_style_new(); else robot_message_row_style = gtk_style_copy(robot_message_row_style); robot_message_row_style->base[GTK_STATE_NORMAL] = make_gdk_colour( the_gui.get_bg_rgb_colour() ); robot_message_row_style->base[GTK_STATE_ACTIVE] = make_gdk_colour( 0xffffff ); robot_message_row_style->bg[GTK_STATE_SELECTED] = make_gdk_colour( 0xf0d2b4 ); robot_message_row_style->fg[GTK_STATE_NORMAL] = *( the_gui.get_fg_gdk_colour_p() ); robot_message_row_style->fg[GTK_STATE_SELECTED] = *( the_gui.get_fg_gdk_colour_p() ); if( window_shown = ( controlwindow_p->is_messagewindow_checked() ) ) gtk_widget_show_now( window_p ); } MessageWindow::~MessageWindow() { gtk_widget_destroy( window_p ); } void MessageWindow::set_window_title() { string title = string( _("Messages") ); if( viewed_robot != NULL ) title += " - " + viewed_robot->get_robot_name(); else title += " - " + string( _(" All ") ); gtk_window_set_title( GTK_WINDOW( window_p ), title.c_str() ); } void MessageWindow::add_message( const string& name_of_messager, const string& message ) { if( window_shown ) { if( viewed_robot != NULL && viewed_robot->get_robot_name() != name_of_messager && name_of_messager != "RealTimeBattle" ) return; char tmp_name_of_messager[name_of_messager.size()+1]; char tmp_message[message.size()+1]; strcpy(tmp_name_of_messager, name_of_messager.c_str()); strcpy(tmp_message, message.c_str()); char* lst[2] = { tmp_name_of_messager/*.non_const_chars()*/, g_utf8_normalize (tmp_message/*.non_const_chars()*/, -1, G_NORMALIZE_ALL) }; int row = 0; row = gtk_clist_insert( GTK_CLIST( clist ), row, lst ); if( name_of_messager == "RealTimeBattle" ) gtk_clist_set_row_style( GTK_CLIST( clist ), row, rtb_message_row_style ); else gtk_clist_set_row_style( GTK_CLIST( clist ), row, robot_message_row_style ); } } void MessageWindow::freeze_clist() { if( window_shown ) gtk_clist_freeze( GTK_CLIST( clist ) ); } void MessageWindow::thaw_clist() { if( window_shown ) gtk_clist_thaw( GTK_CLIST( clist ) ); } void MessageWindow::set_viewed_robot( class Robot* robot_p ) { viewed_robot = robot_p; } void MessageWindow::set_window_shown( bool win_shown ) { window_shown = win_shown; } // Warning: event can be NULL, do not use event! gboolean MessageWindow::hide_window( GtkWidget* widget, GdkEvent* event, class MessageWindow* messagewindow_p ) { if( messagewindow_p->is_window_shown() ) { gtk_widget_hide( messagewindow_p->get_window_p() ); messagewindow_p->set_window_shown( false ); if( controlwindow_p->is_messagewindow_checked() ) { GtkWidget* menu_item = controlwindow_p->get_show_message_menu_item(); gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( menu_item ), FALSE ); } } return true; } void MessageWindow::show_window( GtkWidget* widget, class MessageWindow* messagewindow_p ) { if( !messagewindow_p->is_window_shown() ) { gtk_widget_show_now( messagewindow_p->get_window_p() ); messagewindow_p->set_window_shown( true ); } } // warning Do not use the widget variable. It may be NULL. void MessageWindow::clear_clist( GtkWidget* widget, class MessageWindow* messagewindow_p ) { gtk_clist_clear( GTK_CLIST( messagewindow_p->get_clist() ) ); } void MessageWindow::show_one_robot( GtkWidget* widget, class MessageWindow* messagewindow_p ) { messagewindow_p->set_viewed_robot ( the_gui.get_scorewindow_p()->get_selected_robot() ); messagewindow_p->set_window_title(); } void MessageWindow::show_all( GtkWidget* widget, class MessageWindow* messagewindow_p ) { messagewindow_p->set_viewed_robot( NULL ); messagewindow_p->set_window_title(); } realtimebattle-1.0.8/src/OptionsWindow.cc0000644000175000017500000006326110222311121016562 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #include #include #include using namespace std; #include "OptionsWindow.h" #include "IntlDefs.h" #include "ArenaRealTime.h" #include "ArenaController.h" #include "ArenaWindow.h" #include "ControlWindow.h" #include "MessageWindow.h" #include "ScoreWindow.h" #include "StatisticsWindow.h" #include "Options.h" #include "Various.h" extern class Options the_opts; extern class Gui the_gui; extern class ControlWindow* controlwindow_p; OptionsWindow::OptionsWindow( const int default_width, const int default_height, const int default_x_pos, const int default_y_pos ) { // The window widget window_p = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_widget_set_name( window_p, "RTB Options" ); gtk_window_set_title( GTK_WINDOW( window_p ), _("Options") ); gtk_container_border_width( GTK_CONTAINER( window_p ), 12 ); if( default_width != -1 && default_height != -1 ) gtk_widget_set_usize( window_p, default_width, default_height ); if( default_x_pos != -1 && default_y_pos != -1 ) gtk_widget_set_uposition( window_p, default_x_pos, default_y_pos ); gtk_signal_connect( GTK_OBJECT( window_p ), "delete_event", (GtkSignalFunc) OptionsWindow::delete_event_occured, (gpointer) this ); // Main box GtkWidget* vbox = gtk_vbox_new( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window_p ), vbox ); gtk_widget_show( vbox ); // The notebook with all options GtkWidget* notebook = gtk_notebook_new(); gtk_notebook_set_tab_pos( GTK_NOTEBOOK( notebook ), GTK_POS_LEFT ); gtk_box_pack_start( GTK_BOX( vbox ), notebook, TRUE, TRUE, 0 ); gtk_widget_show( notebook ); const char* page_titles[LAST_PAGE] = { _("Environment"), _("Robot"), _("Shot"), _("Extras"), _("Time"), _("Window sizes"), _("Misc") }; option_info_t* double_opts = the_opts.get_all_double_options(); option_info_t* long_opts = the_opts.get_all_long_options(); option_info_t* string_opts = the_opts.get_all_string_options(); for( int i=0; i < LAST_PAGE; i++ ) { int number_of_options = 0; for( int opt=0; opt* double_opts = the_opts.get_all_double_options(); option_info_t* long_opts = the_opts.get_all_long_options(); option_info_t* string_opts = the_opts.get_all_string_options(); for(int i=0;i> entry_value; if( entry_value > double_opts[i].max_value ) entry_value = double_opts[i].max_value; if( entry_value < double_opts[i].min_value ) entry_value = double_opts[i].min_value; double_opts[i].value = entry_value; } for(int i=0;i> entry_value; } if( long_opts[i].datatype == ENTRY_HEX ) { string2number.clear(); string2number.str(gtk_entry_get_text( GTK_ENTRY( long_opts[i].entry ) )); string2number >> std::hex >> entry_value >> std::dec; } if( entry_value > long_opts[i].max_value ) entry_value = long_opts[i].max_value; if( entry_value < long_opts[i].min_value ) entry_value = long_opts[i].min_value; long_opts[i].value = entry_value; } for(int i=0;i* double_opts = the_opts.get_all_double_options(); option_info_t* long_opts = the_opts.get_all_long_options(); option_info_t* string_opts = the_opts.get_all_string_options(); for(int i=0;i* double_opts = the_opts.get_all_double_options(); option_info_t* long_opts = the_opts.get_all_long_options(); option_info_t* string_opts = the_opts.get_all_string_options(); for(int i=0;iupdate_all_gtk_entries(); } void OptionsWindow::load( GtkWidget* widget, class OptionsWindow* optionswindow_p ) { if( optionswindow_p->get_filesel() == NULL ) { GtkWidget* fs = gtk_file_selection_new( _("Choose an options file to load") ); gtk_signal_connect( GTK_OBJECT( fs ), "destroy", (GtkSignalFunc) OptionsWindow::destroy_filesel, (gpointer) optionswindow_p ); gtk_signal_connect ( GTK_OBJECT( GTK_FILE_SELECTION( fs )->cancel_button ), "clicked", (GtkSignalFunc) OptionsWindow::destroy_filesel, (gpointer) optionswindow_p ); gtk_signal_connect ( GTK_OBJECT( GTK_FILE_SELECTION( fs )->ok_button ), "clicked", (GtkSignalFunc) OptionsWindow::load_options, (gpointer) optionswindow_p ); gtk_widget_show( fs ); optionswindow_p->set_filesel( fs ); } } void OptionsWindow::save( GtkWidget* widget, class OptionsWindow* optionswindow_p ) { if( optionswindow_p->get_filesel() == NULL ) { GtkWidget* fs = gtk_file_selection_new( _("Choose an options file to save") ); gtk_signal_connect( GTK_OBJECT( fs ), "destroy", (GtkSignalFunc) OptionsWindow::destroy_filesel, (gpointer) optionswindow_p ); gtk_signal_connect ( GTK_OBJECT( GTK_FILE_SELECTION( fs )->cancel_button ), "clicked", (GtkSignalFunc) OptionsWindow::destroy_filesel, (gpointer) optionswindow_p ); gtk_signal_connect ( GTK_OBJECT( GTK_FILE_SELECTION( fs )->ok_button ), "clicked", (GtkSignalFunc) OptionsWindow::save_options, (gpointer) optionswindow_p ); gtk_widget_show( fs ); optionswindow_p->set_filesel( fs ); } } void OptionsWindow::load_options( GtkWidget* widget, class OptionsWindow* optionswindow_p ) { the_opts.read_options_file ( gtk_file_selection_get_filename ( GTK_FILE_SELECTION( optionswindow_p->get_filesel() )), false ); optionswindow_p->update_all_gtk_entries(); destroy_filesel( optionswindow_p->get_filesel(), optionswindow_p ); } void OptionsWindow::save_options( GtkWidget* widget, class OptionsWindow* optionswindow_p ) { the_opts.save_all_options_to_file ( gtk_file_selection_get_filename ( GTK_FILE_SELECTION( optionswindow_p->get_filesel() )), false ); destroy_filesel( optionswindow_p->get_filesel(), optionswindow_p ); } void OptionsWindow::destroy_filesel( GtkWidget* widget, class OptionsWindow* optionswindow_p ) { gtk_widget_destroy( optionswindow_p->get_filesel() ); optionswindow_p->set_filesel( NULL ); } void OptionsWindow::save_def( GtkWidget* widget, class OptionsWindow* optionswindow_p ) { the_opts.save_all_options_to_file("",true); } void OptionsWindow::apply( GtkWidget* widget, class OptionsWindow* optionswindow_p ) { optionswindow_p->set_all_options(); } void OptionsWindow::ok( GtkWidget* widget, class OptionsWindow* optionswindow_p ) { optionswindow_p->set_all_options(); the_opts.close_optionswindow(); } void OptionsWindow::cancel( GtkWidget* widget, class OptionsWindow* optionswindow_p ) { the_opts.close_optionswindow(); } void OptionsWindow::delete_event_occured( GtkWidget* widget, GdkEvent* event, class OptionsWindow* optionswindow_p ) { the_opts.close_optionswindow(); } void OptionsWindow::grab_windows( GtkWidget* widget, class OptionsWindow* optionswindow_p ) { option_info_t* long_opts = the_opts.get_all_long_options(); if( the_gui.is_arenawindow_up() ) { ArenaWindow* aw_p = the_gui.get_arenawindow_p(); int width, height; int xpos, ypos; gdk_window_get_size( aw_p->get_window_p()->window, &width, &height ); gdk_window_get_root_origin( aw_p->get_window_p()->window, &xpos, &ypos ); long_opts[OPTION_ARENA_WINDOW_SIZE_X].value = width; long_opts[OPTION_ARENA_WINDOW_SIZE_Y].value = height; long_opts[OPTION_ARENA_WINDOW_POS_X].value = xpos; long_opts[OPTION_ARENA_WINDOW_POS_Y].value = ypos; optionswindow_p->update_all_gtk_entries(); } { int xpos, ypos; gdk_window_get_root_origin( controlwindow_p->get_window_p()->window, &xpos, &ypos ); long_opts[OPTION_CONTROL_WINDOW_POS_X].value = xpos; long_opts[OPTION_CONTROL_WINDOW_POS_Y].value = ypos; optionswindow_p->update_all_gtk_entries(); } if( the_gui.is_messagewindow_up() ) { MessageWindow* mw_p = the_gui.get_messagewindow_p(); int width, height; int xpos, ypos; gdk_window_get_size( mw_p->get_window_p()->window, &width, &height ); gdk_window_get_root_origin( mw_p->get_window_p()->window, &xpos, &ypos ); long_opts[OPTION_MESSAGE_WINDOW_SIZE_X].value = width; long_opts[OPTION_MESSAGE_WINDOW_SIZE_Y].value = height; long_opts[OPTION_MESSAGE_WINDOW_POS_X].value = xpos; long_opts[OPTION_MESSAGE_WINDOW_POS_Y].value = ypos; optionswindow_p->update_all_gtk_entries(); } if( the_gui.is_scorewindow_up() ) { ScoreWindow* sw_p = the_gui.get_scorewindow_p(); int width, height; int xpos, ypos; gdk_window_get_size( sw_p->get_window_p()->window, &width, &height ); gdk_window_get_root_origin( sw_p->get_window_p()->window, &xpos, &ypos ); long_opts[OPTION_SCORE_WINDOW_SIZE_X].value = width; long_opts[OPTION_SCORE_WINDOW_SIZE_Y].value = height; long_opts[OPTION_SCORE_WINDOW_POS_X].value = xpos; long_opts[OPTION_SCORE_WINDOW_POS_Y].value = ypos; optionswindow_p->update_all_gtk_entries(); } if( the_gui.is_statisticswindow_up() ) { StatisticsWindow* sw_p = the_gui.get_statisticswindow_p(); int width, height; gdk_window_get_size( sw_p->get_window_p()->window, &width, &height ); long_opts[OPTION_STATISTICS_WINDOW_SIZE_X].value = width; long_opts[OPTION_STATISTICS_WINDOW_SIZE_Y].value = height; optionswindow_p->update_all_gtk_entries(); } } void OptionsWindow::double_min( GtkWidget* widget, option_info_t* option ) { ostringstream number2string; number2string << option->min_value; gtk_entry_set_text( GTK_ENTRY( option->entry ), number2string.str().c_str() ); } void OptionsWindow::double_def( GtkWidget* widget, option_info_t* option ) { ostringstream number2string; number2string << option->default_value; gtk_entry_set_text( GTK_ENTRY( option->entry ), number2string.str().c_str() ); } void OptionsWindow::double_max( GtkWidget* widget, option_info_t* option ) { ostringstream number2string; number2string << option->max_value; gtk_entry_set_text( GTK_ENTRY( option->entry ), number2string.str().c_str() ); } void OptionsWindow::long_min( GtkWidget* widget, option_info_t* option ) { if( option->datatype == ENTRY_INT ) { ostringstream number2string; number2string << option->min_value; gtk_entry_set_text( GTK_ENTRY( option->entry ), number2string.str().c_str() ); } else if( option->datatype == ENTRY_HEX ) { ostringstream hex2string; hex2string << std::hex << option->min_value; gtk_entry_set_text( GTK_ENTRY( option->entry ), hex2string.str().c_str() ); } } void OptionsWindow::long_def( GtkWidget* widget, option_info_t* option ) { if( option->datatype == ENTRY_INT ) { ostringstream number2string; number2string << option->default_value; gtk_entry_set_text( GTK_ENTRY( option->entry ), number2string.str().c_str() ); } else if( option->datatype == ENTRY_HEX ) { ostringstream hex2string; hex2string << std::hex << option->default_value; gtk_entry_set_text( GTK_ENTRY( option->entry ), hex2string.str().c_str() ); } } void OptionsWindow::long_max( GtkWidget* widget, option_info_t* option ) { if( option->datatype == ENTRY_INT ) { ostringstream number2string; number2string << option->max_value; gtk_entry_set_text( GTK_ENTRY( option->entry ), number2string.str().c_str() ); } else if( option->datatype == ENTRY_HEX ) { ostringstream hex2string; hex2string << std::hex << option->max_value; gtk_entry_set_text( GTK_ENTRY( option->entry ), hex2string.str().c_str() ); } } void OptionsWindow::string_def( GtkWidget* widget, option_info_t* option ) { gtk_entry_set_text( GTK_ENTRY( option->entry ), option->default_value.c_str() ); } realtimebattle-1.0.8/src/StatisticsWindow.cc0000644000175000017500000007245210235455376017314 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #include #include "StatisticsWindow.h" #include "IntlDefs.h" #include "Gui.h" #include "ArenaController.h" #include "Various.h" #include "Robot.h" #include #include using namespace std; //extern class Gui the_gui; StatisticsWindow::StatisticsWindow( const int default_width, const int default_height, const int default_x_pos, const int default_y_pos ) { type = STAT_TYPE_TOTAL; looking_at_nr = 1; filesel = NULL; // The window widget window_p = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_widget_set_name( window_p, "RTB Statistics" ); gtk_window_set_title( GTK_WINDOW( window_p ), _("Statistics") ); gtk_container_border_width( GTK_CONTAINER( window_p ), 12 ); if( default_width != -1 && default_height != -1 ) { gtk_window_set_default_size( GTK_WINDOW( window_p ), default_width, default_height ); gtk_widget_set_usize( window_p , 364, 130 ); } if( default_x_pos != -1 && default_y_pos != -1 ) gtk_widget_set_uposition( window_p, default_x_pos, default_y_pos ); gtk_signal_connect( GTK_OBJECT( window_p ), "delete_event", (GtkSignalFunc) StatisticsWindow::delete_event_occured, (gpointer) this ); // Main box GtkWidget* vbox = gtk_vbox_new( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window_p ) ,vbox ); gtk_widget_show( vbox ); // Buttons for displaying different types of statistics GtkWidget* hbox = gtk_hbox_new( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); { struct button_t { string label; GtkSignalFunc func; gpointer data; }; struct button_t buttons[] = { { string( _(" Close ") ), (GtkSignalFunc) StatisticsWindow::exit, (gpointer) this }, { string( _(" Save Statistics ") ), (GtkSignalFunc) StatisticsWindow::save, (gpointer) this }, { string( _(" Total ") ), (GtkSignalFunc) StatisticsWindow::change_table_type, (gpointer) new change_type_data_t( STAT_TYPE_TOTAL, this ) }, { string( _(" Sequence Total ") ), (GtkSignalFunc) StatisticsWindow::change_table_type, (gpointer) new change_type_data_t( STAT_TYPE_SEQUENCE, this ) }, { string( " " ) + string( _("Game") ) + string( " " ), (GtkSignalFunc) StatisticsWindow::change_table_type, (gpointer) new change_type_data_t( STAT_TYPE_GAME, this ) }, { string( _(" Robot ") ), (GtkSignalFunc) StatisticsWindow::change_table_type, (gpointer) new change_type_data_t( STAT_TYPE_ROBOT, this ) } }; GtkWidget* button_w; for( int i=0; i<6; i++ ) { button_w = gtk_button_new_with_label( buttons[i].label.c_str() ); gtk_signal_connect( GTK_OBJECT( button_w ), "clicked", buttons[i].func, buttons[i].data ); gtk_box_pack_start( GTK_BOX( hbox ), button_w, TRUE, TRUE, 0 ); gtk_widget_show( button_w ); } } gtk_widget_show( window_p ); hbox = gtk_hbox_new( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); { char* first_xpm[13] = { "13 10 2 1", " c None", "x c #000000000000", "xx xx", "xx xxxx", "xx xxxxxx", "xx xxxxxxxx", "xx xxxxxxxxx", "xx xxxxxxxxx", "xx xxxxxxxx", "xx xxxxxx", "xx xxxx", "xx xx" }; char* prev_xpm[13] = { "9 10 2 1", " c None", "x c #000000000000", " xx", " xxxx", " xxxxxx", " xxxxxxxx", "xxxxxxxxx", "xxxxxxxxx", " xxxxxxxx", " xxxxxx", " xxxx", " xx" }; char* next_xpm[13] = { "9 10 2 1", " c None", "x c #000000000000", "xx ", "xxxx ", "xxxxxx ", "xxxxxxxx ", "xxxxxxxxx", "xxxxxxxxx", "xxxxxxxx ", "xxxxxx ", "xxxx ", "xx " }; char* last_xpm[13] = { "13 10 2 1", " c None", "x c #000000000000", "xx xx", "xxxx xx", "xxxxxx xx", "xxxxxxxx xx", "xxxxxxxxx xx", "xxxxxxxxx xx", "xxxxxxxx xx", "xxxxxx xx", "xxxx xx", "xx xx" }; struct button_t { char** xpm; GtkSignalFunc func; gpointer data; int pack; }; struct button_t buttons[] = { { first_xpm, (GtkSignalFunc) StatisticsWindow::change_stats_viewed, (gpointer) new change_stat_data_t( -1, true, this ), FALSE }, { prev_xpm, (GtkSignalFunc) StatisticsWindow::change_stats_viewed, (gpointer) new change_stat_data_t( -1, false, this ), FALSE }, { NULL, (GtkSignalFunc) StatisticsWindow::add_the_statistics_to_clist, (gpointer) this, TRUE }, { next_xpm, (GtkSignalFunc) StatisticsWindow::change_stats_viewed, (gpointer) new change_stat_data_t( 1, false, this ), FALSE }, { last_xpm, (GtkSignalFunc) StatisticsWindow::change_stats_viewed, (gpointer) new change_stat_data_t( 1, true, this ), FALSE } }; for( int i=0; i<5; i++ ) { GtkWidget* button_w = gtk_button_new(); if( buttons[i].xpm != NULL ) { GdkPixmap* pixmap; GdkBitmap* bitmap_mask; pixmap = gdk_pixmap_create_from_xpm_d( window_p->window, &bitmap_mask, &(window_p->style->black), buttons[i].xpm ); GtkWidget* pixmap_widget = gtk_pixmap_new( pixmap, bitmap_mask ); gtk_widget_show( pixmap_widget ); gtk_container_add( GTK_CONTAINER( button_w ), pixmap_widget ); gtk_widget_set_usize( button_w, 24, 20 ); } else { title_button = button_w; title_button_hbox = NULL; } gtk_signal_connect( GTK_OBJECT( button_w ), "clicked", buttons[i].func, buttons[i].data ); gtk_box_pack_start( GTK_BOX( hbox ), button_w, buttons[i].pack, buttons[i].pack, 0 ); gtk_widget_show( button_w ); } } GtkObject* hadj = gtk_adjustment_new( 0.0, 0.0, 100.0, 1.0, 1.0, 1.0 ); GtkObject* vadj = gtk_adjustment_new( 0.0, 0.0, 100.0, 1.0, 1.0, 1.0 ); GtkWidget* scrolled_win = gtk_scrolled_window_new( GTK_ADJUSTMENT( hadj ), GTK_ADJUSTMENT( vadj ) ); gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolled_win ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); gtk_box_pack_start( GTK_BOX( vbox ), scrolled_win, TRUE, TRUE, 0); gtk_widget_show( scrolled_win ); char * titles[7] = { "",_("Name"), _("Position"), _("Points"), _("Games"), _("Survival Time"), _("Total Points") }; clist = gtk_clist_new_with_titles(7, titles ); gtk_clist_set_selection_mode( GTK_CLIST( clist ), GTK_SELECTION_BROWSE ); gtk_clist_set_column_width( GTK_CLIST( clist ), 0, 5 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 1, 120 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 2, 45 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 3, 35 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 4, 45 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 5, 75 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 6, 60 ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 0, GTK_JUSTIFY_CENTER ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 1, GTK_JUSTIFY_LEFT ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 2, GTK_JUSTIFY_RIGHT ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 3, GTK_JUSTIFY_RIGHT ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 4, GTK_JUSTIFY_RIGHT ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 5, GTK_JUSTIFY_RIGHT ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 6, GTK_JUSTIFY_RIGHT ); gtk_clist_column_title_passive( GTK_CLIST( clist ), 0 ); gtk_signal_connect( GTK_OBJECT( clist ), "select_row", (GtkSignalFunc) row_selected, this ); gtk_clist_set_column_resizeable( GTK_CLIST( clist ), 0, FALSE ); gtk_clist_set_column_max_width( GTK_CLIST( clist ), 0, 5 ); gtk_clist_set_shadow_type( GTK_CLIST( clist ), GTK_SHADOW_IN ); gtk_clist_set_compare_func( GTK_CLIST( clist ), float_compare ); gtk_clist_set_sort_column( GTK_CLIST( clist ), 6 ); gtk_clist_set_sort_type( GTK_CLIST( clist ), GTK_SORT_DESCENDING ); for( int i=2; i <=6; i++ ) gtk_clist_set_column_auto_resize( GTK_CLIST( clist ), i, TRUE ); gtk_signal_connect( GTK_OBJECT( clist ), "click_column", (GtkSignalFunc) change_sorting_in_clist, (gpointer) this ); gtk_container_add( GTK_CONTAINER( scrolled_win ), clist ); GtkStyle* clist_style = gtk_rc_get_style(window_p); if( clist_style == NULL ) clist_style = gtk_style_new(); else clist_style = gtk_style_copy(clist_style); clist_style->base[GTK_STATE_NORMAL] = *(the_gui.get_bg_gdk_colour_p()); clist_style->base[GTK_STATE_ACTIVE] = make_gdk_colour( 0xffffff ); clist_style->bg[GTK_STATE_SELECTED] = make_gdk_colour( 0xf0d2b4 ); clist_style->fg[GTK_STATE_SELECTED] = *(the_gui.get_fg_gdk_colour_p()); gtk_widget_set_style( clist, clist_style ); gtk_widget_show( clist ); add_the_statistics_to_clist( clist, this ); } StatisticsWindow::~StatisticsWindow() { gtk_widget_destroy( window_p ); } void StatisticsWindow::delete_event_occured( GtkWidget* widget, GdkEvent* event, class StatisticsWindow* sw_p ) { the_gui.close_statisticswindow(); } void StatisticsWindow::exit( GtkWidget* widget, class StatisticsWindow* sw_p ) { the_gui.close_statisticswindow(); } void StatisticsWindow::save( GtkWidget* widget, class StatisticsWindow* sw_p ) { if( sw_p->get_filesel() != NULL ) return; GtkWidget* fs = gtk_file_selection_new( _("Choose a statistics file to save") ); gtk_signal_connect( GTK_OBJECT( fs ), "destroy", (GtkSignalFunc) StatisticsWindow::destroy_filesel, (gpointer) sw_p ); gtk_signal_connect ( GTK_OBJECT( GTK_FILE_SELECTION( fs )->cancel_button ), "clicked", (GtkSignalFunc) StatisticsWindow::destroy_filesel, (gpointer) sw_p ); gtk_signal_connect ( GTK_OBJECT( GTK_FILE_SELECTION( fs )->ok_button ), "clicked", (GtkSignalFunc) StatisticsWindow::save_stats, (gpointer) sw_p ); gtk_widget_show( fs ); sw_p->set_filesel( fs ); } void StatisticsWindow::save_stats( GtkWidget* widget, class StatisticsWindow* sw_p ) { the_arena.save_statistics_to_file ( gtk_file_selection_get_filename ( GTK_FILE_SELECTION( sw_p->get_filesel() ) ) ); destroy_filesel( sw_p->get_filesel(), sw_p ); } void StatisticsWindow::destroy_filesel( GtkWidget* widget, class StatisticsWindow* sw_p ) { gtk_widget_destroy( sw_p->get_filesel() ); sw_p->set_filesel( NULL ); } void StatisticsWindow::change_table_type( GtkWidget* widget, struct change_type_data_t* info_p ) { GtkWidget* clist = info_p->sw_p->get_clist(); stat_types sw_type = info_p->sw_p->get_type(); int number = info_p->sw_p->get_looking_at_nr(); gtk_clist_freeze( GTK_CLIST( clist ) ); if( info_p->type != sw_type ) { if( info_p->type == STAT_TYPE_TOTAL || info_p->type == STAT_TYPE_SEQUENCE ) { gtk_clist_set_column_visibility( GTK_CLIST( clist ),4, TRUE ); } else { gtk_clist_set_column_visibility ( GTK_CLIST( clist ),4,FALSE ); } if(sw_type == STAT_TYPE_ROBOT && info_p->type != STAT_TYPE_ROBOT) { gtk_clist_set_column_resizeable( GTK_CLIST( clist ), 0, FALSE ); gtk_clist_set_column_max_width( GTK_CLIST( clist ), 0, 5 ); gtk_clist_set_column_auto_resize( GTK_CLIST( clist ), 0, FALSE ); gtk_clist_set_column_auto_resize( GTK_CLIST( clist ), 1, FALSE ); gtk_clist_set_column_title( GTK_CLIST( clist ), 0, "" ); gtk_clist_set_column_title( GTK_CLIST( clist ), 1, _("Name") ); gtk_clist_column_title_passive( GTK_CLIST( clist ), 0 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 0, 5 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 1, 120 ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 0, GTK_JUSTIFY_CENTER ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 1, GTK_JUSTIFY_LEFT ); } if(sw_type != STAT_TYPE_ROBOT && info_p->type == STAT_TYPE_ROBOT) { gtk_clist_set_column_resizeable( GTK_CLIST( clist ), 0, TRUE ); gtk_clist_set_column_max_width( GTK_CLIST( clist ), 0, 10000 ); gtk_clist_set_column_auto_resize( GTK_CLIST( clist ), 0, TRUE ); gtk_clist_set_column_auto_resize( GTK_CLIST( clist ), 1, TRUE ); gtk_clist_set_column_title( GTK_CLIST( clist ), 0, _("Seq") ); gtk_clist_set_column_title( GTK_CLIST( clist ), 1, _("Game") ); gtk_clist_column_title_active( GTK_CLIST( clist ), 0 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 0, 40 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 1, 45 ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 0, GTK_JUSTIFY_RIGHT ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 1, GTK_JUSTIFY_RIGHT ); } info_p->sw_p->set_type( info_p->type ); switch( info_p->type ) { case STAT_TYPE_TOTAL: change_sorting_in_clist( GTK_CLIST( clist ), 6, info_p->sw_p ); break; case STAT_TYPE_SEQUENCE: change_sorting_in_clist( GTK_CLIST( clist ), 6, info_p->sw_p ); number = the_arena.get_sequence_nr(); break; case STAT_TYPE_GAME: change_sorting_in_clist( GTK_CLIST( clist ), 3, info_p->sw_p ); number = ( the_arena.get_sequence_nr() - 1 ) * the_arena.get_games_per_sequence() + the_arena.get_game_nr(); break; case STAT_TYPE_ROBOT: change_sorting_in_clist( GTK_CLIST( clist ), 0, info_p->sw_p ); number = 1; break; } info_p->sw_p->set_looking_at_nr( number ); } add_the_statistics_to_clist( clist, info_p->sw_p ); gtk_clist_thaw( GTK_CLIST( clist ) ); } void StatisticsWindow::change_stats_viewed( GtkWidget* widget, struct change_stat_data_t* info_p ) { GtkWidget* clist = info_p->sw_p->get_clist(); stat_types sw_type = info_p->sw_p->get_type(); int number = info_p->sw_p->get_looking_at_nr(); int game = the_arena.get_game_nr(); int max_nr = -1; switch( sw_type ) { case STAT_TYPE_TOTAL: max_nr = 1; break; case STAT_TYPE_SEQUENCE: max_nr = the_arena.get_sequence_nr(); break; case STAT_TYPE_GAME: max_nr = ( the_arena.get_sequence_nr() - 1 ) * the_arena.get_games_per_sequence() + game; break; case STAT_TYPE_ROBOT: max_nr = the_arena.get_all_robots_in_tournament()->size(); break; } if( info_p->extreme_change && max_nr > 0 ) { if( info_p->change < 0 ) number = abs_rtb( info_p->change ); else if( info_p->change > 0 ) number = max_rtb( max_nr - info_p->change + 1, 1 ); } else { number += info_p->change; number = min_rtb( number, max_nr ); number = max_rtb( number, 1 ); } info_p->sw_p->set_looking_at_nr( number ); add_the_statistics_to_clist( clist, info_p->sw_p ); } void StatisticsWindow::make_title_button() { if( title_button_hbox != NULL ) gtk_widget_destroy( title_button_hbox ); title_button_hbox = gtk_hbox_new( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( title_button ), title_button_hbox ); gtk_widget_show( title_button_hbox ); string title; switch( type ) { case STAT_TYPE_TOTAL: title = _(" Grand Total "); break; case STAT_TYPE_SEQUENCE: { ostringstream number2string; number2string << looking_at_nr; title = string( _(" Sequence ") ) + number2string.str(); } break; case STAT_TYPE_GAME: { int gps = the_arena.get_games_per_sequence(); int game = looking_at_nr % gps; int sequence = (looking_at_nr / gps ) + 1; if( game == 0 ) { game = gps; sequence--; } ostringstream sequence_str, game_str; sequence_str << sequence; game_str << game; title = string( _(" Sequence: ") ) + sequence_str.str() + " " + _("Game") + ": " + game_str.str(); } break; case STAT_TYPE_ROBOT: { Robot* robot_p; int i=0; list::iterator li; for( li = the_arena.get_all_robots_in_tournament()->begin(); li != the_arena.get_all_robots_in_tournament()->end(); ++li ) { i++; robot_p = *li; if( looking_at_nr == i ) { GdkPixmap* col_pixmap; GdkBitmap* bitmap_mask; robot_p->get_stat_pixmap(window_p->window, col_pixmap, bitmap_mask); GtkWidget* pixmap_w = gtk_pixmap_new( col_pixmap, bitmap_mask ); gtk_box_pack_start( GTK_BOX( title_button_hbox ), pixmap_w, FALSE, FALSE, 0 ); gtk_widget_show( pixmap_w ); title = robot_p->get_robot_name(); } } } break; } GtkWidget* label = gtk_label_new( title.c_str() ); gtk_box_pack_start( GTK_BOX( title_button_hbox ), label, TRUE, TRUE, 0 ); gtk_widget_show( label ); } void StatisticsWindow::add_new_row( Robot* robot_p, stat_t average_stat, int games_played ) { char* empty_list[] = { "", "", "", "", "", "", "", "" }; int row = gtk_clist_append( GTK_CLIST( clist ), empty_list ); gtk_clist_set_foreground( GTK_CLIST( clist ), row, the_gui.get_fg_gdk_colour_p() ); gtk_clist_set_background( GTK_CLIST( clist ), row, the_gui.get_bg_gdk_colour_p() ); if( type == STAT_TYPE_GAME || type == STAT_TYPE_SEQUENCE || type == STAT_TYPE_TOTAL) { GdkPixmap * colour_pixmap; GdkBitmap * bitmap_mask; robot_p->get_stat_pixmap( window_p->window, colour_pixmap, bitmap_mask ); gtk_clist_set_pixmap( GTK_CLIST( clist ), row, 0, colour_pixmap, bitmap_mask ); gtk_clist_set_text( GTK_CLIST( clist ), row, 1, robot_p->get_robot_name().c_str()/*non_const_chars()*/ ); } if( type == STAT_TYPE_ROBOT) { ostringstream sequence_nr_str, game_nr_str; sequence_nr_str << average_stat.sequence_nr; game_nr_str << average_stat.game_nr; gtk_clist_set_text( GTK_CLIST( clist ), row, 0, sequence_nr_str.str().c_str() ); gtk_clist_set_text( GTK_CLIST( clist ), row, 1, game_nr_str.str().c_str() ); } ostringstream position_str; position_str << average_stat.position; gtk_clist_set_text( GTK_CLIST( clist ), row, 2, position_str.str().c_str() ); ostringstream points_str; if( type == STAT_TYPE_SEQUENCE || type == STAT_TYPE_TOTAL) points_str << setiosflags(ios::fixed) << setprecision(2) << average_stat.points; else points_str << average_stat.points; gtk_clist_set_text( GTK_CLIST( clist ), row, 3, points_str.str().c_str() ); if( type == STAT_TYPE_TOTAL || type == STAT_TYPE_SEQUENCE ) { ostringstream games_played_str; games_played_str << games_played; gtk_clist_set_text( GTK_CLIST( clist ), row, 4, games_played_str.str().c_str() ); } else gtk_clist_set_text( GTK_CLIST( clist ), row, 4, string( "" ).c_str() ); ostringstream time_survived_str; time_survived_str << setiosflags(ios::fixed) << setprecision(2) << average_stat.time_survived; gtk_clist_set_text( GTK_CLIST( clist ), row, 5, time_survived_str.str().c_str() ); ostringstream total_points_str; total_points_str << average_stat.total_points; gtk_clist_set_text( GTK_CLIST( clist ), row, 6, total_points_str.str().c_str() ); } void StatisticsWindow::add_the_statistics_to_clist( GtkWidget* widget, class StatisticsWindow* sw_p ) { Robot* robot_p = NULL; stat_t* stat_p = NULL; list::iterator li; list::const_iterator stat_li; GtkWidget* clist = sw_p->get_clist(); stat_types sw_type = sw_p->get_type(); int number = sw_p->get_looking_at_nr(); sw_p->make_title_button(); gtk_clist_freeze( GTK_CLIST( clist ) ); gtk_clist_clear( GTK_CLIST( clist ) ); switch( sw_type ) { case STAT_TYPE_TOTAL: case STAT_TYPE_SEQUENCE: { int number_of_robots = the_arena.get_number_of_robots(); double points[number_of_robots]; int position[number_of_robots]; int robot_nr = -1; for( li = the_arena.get_all_robots_in_tournament()->begin(); li != the_arena.get_all_robots_in_tournament()->end(); ++li ) { robot_nr++; robot_p = *li; points[robot_nr] = 0; for(stat_li = robot_p->get_statistics()->begin(); stat_li != robot_p->get_statistics()->end(); ++stat_li) { stat_p = *stat_li; if( ( sw_type == STAT_TYPE_SEQUENCE && stat_p->sequence_nr == number ) || sw_type == STAT_TYPE_TOTAL ) points[robot_nr] += (*stat_li)->points; } } for(int i = 0;i points[i]) temp_pos++; position[i] = temp_pos; } robot_nr = -1; for( li = the_arena.get_all_robots_in_tournament()->begin(); li != the_arena.get_all_robots_in_tournament()->end(); ++li ) { robot_nr++; robot_p = *li; stat_t average_stat(0,0,0,0.0,0.0,0.0); int number_of_stat_found = 0; for(stat_li = robot_p->get_statistics()->begin(); stat_li != robot_p->get_statistics()->end(); ++stat_li) { stat_p = *stat_li; if( ( sw_type == STAT_TYPE_SEQUENCE && stat_p->sequence_nr == number ) || sw_type == STAT_TYPE_TOTAL ) { number_of_stat_found++; average_stat.points += stat_p->points; average_stat.time_survived += stat_p->time_survived; average_stat.total_points += stat_p->points; } } if( number_of_stat_found > 0 ) { average_stat.position = position[robot_nr]; average_stat.points /= number_of_stat_found; average_stat.time_survived /= number_of_stat_found; sw_p->add_new_row( robot_p, average_stat, number_of_stat_found ); } } } break; case STAT_TYPE_GAME: { int gps = the_arena.get_games_per_sequence(); int game = number % gps; int sequence = ( number / gps ) + 1; if( game == 0 ) { game = gps; sequence--; } for( li = the_arena.get_all_robots_in_tournament()->begin(); li != the_arena.get_all_robots_in_tournament()->end(); ++li ) { robot_p = *li; for(stat_li = robot_p->get_statistics()->begin(); stat_li != robot_p->get_statistics()->end(); ++stat_li) { stat_p = *stat_li; if(stat_p->sequence_nr == sequence && stat_p->game_nr == game) sw_p->add_new_row( robot_p, *stat_p, -1 ); } } } break; case STAT_TYPE_ROBOT: { int i=0; for( li = the_arena.get_all_robots_in_tournament()->begin(); li != the_arena.get_all_robots_in_tournament()->end(); ++li ) { i++; robot_p = *li; if( i == number ) for(stat_li = robot_p->get_statistics()->begin(); stat_li != robot_p->get_statistics()->end(); ++stat_li) { stat_p = *stat_li; sw_p->add_new_row( robot_p, *stat_p, -1 ); } } } break; } gtk_clist_sort( GTK_CLIST( clist ) ); gtk_clist_thaw( GTK_CLIST( clist ) ); } void StatisticsWindow::change_sorting_in_clist( GtkCList* clist, gint column, class StatisticsWindow* sw_p ) { stat_types sw_type = sw_p->get_type(); gtk_clist_freeze( clist ); switch(column) { case 0: if( sw_type == STAT_TYPE_ROBOT ) { gtk_clist_set_compare_func( clist, float_compare ); gtk_clist_set_sort_column( clist, column ); gtk_clist_set_sort_type( clist, GTK_SORT_ASCENDING ); gtk_clist_sort( clist ); } break; case 1: if( sw_type != STAT_TYPE_ROBOT ) { gtk_clist_set_compare_func( clist, string_case_insensitive_compare ); gtk_clist_set_sort_column( clist, column ); gtk_clist_set_sort_type( clist, GTK_SORT_ASCENDING ); gtk_clist_sort( clist ); } else { gtk_clist_set_compare_func( clist, float_compare ); gtk_clist_set_sort_column( clist, column ); gtk_clist_set_sort_type( clist, GTK_SORT_ASCENDING ); gtk_clist_sort( clist ); } break; case 2: gtk_clist_set_compare_func( clist, float_compare ); gtk_clist_set_sort_column( clist, column ); gtk_clist_set_sort_type( clist, GTK_SORT_ASCENDING ); gtk_clist_sort( clist ); break; case 3: case 5: case 6: gtk_clist_set_compare_func( clist, float_compare ); gtk_clist_set_sort_column( clist, column ); gtk_clist_set_sort_type( clist, GTK_SORT_DESCENDING ); gtk_clist_sort( clist ); break; case 4: if( sw_type == STAT_TYPE_TOTAL || sw_type == STAT_TYPE_SEQUENCE ) { gtk_clist_set_compare_func( clist, float_compare ); gtk_clist_set_sort_column( clist, column ); gtk_clist_set_sort_type( clist, GTK_SORT_ASCENDING ); gtk_clist_sort( clist ); } break; } add_the_statistics_to_clist( GTK_WIDGET( clist ), sw_p ); gtk_clist_thaw( clist ); } void StatisticsWindow::row_selected( GtkWidget* clist, gint row, gint column, GdkEventButton *event, class StatisticsWindow* sw_p ) { stat_types sw_type = sw_p->get_type(); if( column == 1 && sw_type != STAT_TYPE_ROBOT ) { gtk_clist_freeze( GTK_CLIST( clist ) ); gchar* clist_text; gtk_clist_get_text( GTK_CLIST( clist ), row, column, &clist_text ); string robot_name; if( clist_text != NULL ) robot_name = clist_text; list::iterator li; Robot* robot_p = NULL; int counter = 0; bool found_robot = false; for( li = the_arena.get_all_robots_in_tournament()->begin(); (li != the_arena.get_all_robots_in_tournament()->end()) && (!found_robot); ++li ) { counter--; robot_p = *li; if( robot_p->get_robot_name() == robot_name ) { found_robot = true; change_type_data_t type_data( STAT_TYPE_ROBOT, sw_p ); change_table_type( clist, &type_data ); change_stat_data_t stat_data( counter, true, sw_p ); change_stats_viewed( clist, &stat_data ); } } gtk_clist_thaw( GTK_CLIST( clist ) ); } } realtimebattle-1.0.8/src/StartTournamentWindow.cc0000644000175000017500000011373210246642253020323 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #include #define HAVE_DIRENT_H 1 #if HAVE_DIRENT_H # if HAVE_SYS_TYPES_H # include # endif # include # define NAMLEN(dirent) strlen((dirent)->d_name) #else # define dirent direct # define NAMLEN(dirent) (dirent)->d_namlen # if HAVE_SYS_NDIR_H # include # endif # if HAVE_SYS_DIR_H # include # endif # if HAVE_NDIR_H # include # endif #endif #include "ArenaController.h" #include "IntlDefs.h" #include "ArenaRealTime.h" #include "StartTournamentWindow.h" #include "Various.h" #include "Dialog.h" #include "Options.h" #include #include using namespace std; const string tmp_tournament_file( "/tmp.tour" ); StartTournamentWindow::StartTournamentWindow( const int default_width, const int default_height, const int default_x_pos, const int default_y_pos ) { tournament_started_flag = false; filesel = NULL; // The window widget window_p = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_widget_set_name( window_p, "RTB StartTournament" ); gtk_window_set_title( GTK_WINDOW( window_p ), _("Start New Tournament") ); gtk_container_border_width( GTK_CONTAINER( window_p ), 12 ); if( default_width != -1 && default_height != -1 ) gtk_window_set_default_size( GTK_WINDOW( window_p ), default_width, default_height ); if( default_x_pos != -1 && default_y_pos != -1 ) gtk_widget_set_uposition( window_p, default_x_pos, default_y_pos ); gtk_signal_connect( GTK_OBJECT( window_p ), "delete_event", (GtkSignalFunc) StartTournamentWindow::delete_event_occured, (gpointer) this ); // Lists for clists list robotdirs; list arenadirs; read_dirs_from_system( robotdirs, arenadirs ); // Main box GtkWidget* vbox = gtk_vbox_new( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window_p ), vbox ); gtk_widget_show( vbox ); // Clists and buttons for selecting robots for( int j = 0; j < 2; j++ ) { list* tour_list; list* dir_list; GtkWidget* tour_clist; GtkWidget* dir_clist; char** tour_title; char** dir_title; bool robot; if( j == 0 ) { tour_list = &selected_robot_tournament; dir_list = &selected_robot_directory; tour_clist = robots_in_tournament_clist; dir_clist = robots_in_directory_clist; tour_title = new char*( _("Robots in Tournament") ); dir_title = new char*( _("Robots in Directory") ); robot = true; } else { tour_list = &selected_arena_tournament; dir_list = &selected_arena_directory; tour_clist = arenas_in_tournament_clist; dir_clist = arenas_in_directory_clist; tour_title = new char*( _("Arenas in Tournament") ); dir_title = new char*( _("Arenas in Directory") ); robot = false; // Make a horizontal ruler between robots and arenas GtkWidget* hsep = gtk_hseparator_new(); gtk_box_pack_start( GTK_BOX( vbox ), hsep, FALSE, TRUE, 0 ); gtk_widget_show( hsep ); } GtkWidget* hbox = gtk_hbox_new( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( vbox ), hbox ); gtk_widget_show( hbox ); tour_clist = gtk_clist_new_with_titles( 1, tour_title ); add_clist( tour_clist, hbox ); char* button_labels[] = { _(" Remove "), _(" Select All "), _(" Unselect All "), _(" Add "), _(" Select All "), _(" Unselect All ") }; GtkWidget* vbox2 = NULL; for( int i=START_TORUNAMENT_REMOVE; i<= START_TORUNAMENT_UNSELECT_ALL_DIRECTORY; i++ ) { if( i == START_TORUNAMENT_REMOVE || i == START_TORUNAMENT_ADD ) { vbox2 = gtk_vbox_new( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( hbox ), vbox2, FALSE, FALSE, 0 ); gtk_widget_show( vbox2 ); } GtkWidget* button = gtk_button_new_with_label( button_labels[i] ); struct select_buttons_t* s_button; s_button = new select_buttons_t( robot, i, this ); gtk_signal_connect( GTK_OBJECT( button ), "clicked", (GtkSignalFunc) StartTournamentWindow::button_selected, (gpointer) s_button ); gtk_box_pack_start( GTK_BOX( vbox2 ), button, TRUE, FALSE, 0 ); gtk_widget_show( button ); } dir_clist = gtk_clist_new_with_titles( 1, dir_title ); add_clist( dir_clist, hbox ); list::const_iterator li; if( robot ) li = robotdirs.begin(); else li = arenadirs.begin(); bool temp(robot); for( ; ; ++li ) { if( (robot && (li == robotdirs.end() ) ) || (!robot && (li == arenadirs.end() ) ) ) break; string current_dir = *li; DIR* dir; bool err_in_file = false; // set by called functions but not currently checked here if( dir = opendir(current_dir.c_str()) ) { struct dirent * entry; while (NULL != ( entry = readdir( dir ) ) ) { string full_file_name = current_dir + entry->d_name; if( ( robot && check_if_filename_is_robot( full_file_name, &err_in_file ) ) || ( !robot && check_if_filename_is_arena( full_file_name, &err_in_file ) ) ) { char* lst[] = { entry->d_name }; int row = gtk_clist_append( GTK_CLIST( dir_clist ), lst ); gtk_clist_set_foreground( GTK_CLIST( dir_clist ), row, the_gui.get_fg_gdk_colour_p()); gtk_clist_set_background( GTK_CLIST( dir_clist ), row, the_gui.get_bg_gdk_colour_p()); start_tournament_info_t* info; info = new start_tournament_info_t ( row, false, entry->d_name, current_dir.c_str() ); dir_list->push_back( info ); } } closedir( dir ); } } if( j == 0 ) { robots_in_tournament_clist = tour_clist; robots_in_directory_clist = dir_clist; } else { arenas_in_tournament_clist = tour_clist; arenas_in_directory_clist = dir_clist; robot = false; } } GtkWidget* hsep = gtk_hseparator_new(); gtk_box_pack_start( GTK_BOX( vbox ), hsep, FALSE, FALSE, 0 ); gtk_widget_show( hsep ); // Choose Number of games per sequence, Number of robots per sequence // and Number of sequences char * label_titles[] = { _("Games per sequence"), _("Robots per sequence"), _("Number of sequences") }; GtkWidget * hbox2 = gtk_hbox_new (FALSE, 10); gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 0); gtk_widget_show (hbox2); GtkWidget * internal_hbox = gtk_hbox_new( FALSE, 10 ); gtk_box_pack_start (GTK_BOX (hbox2), internal_hbox, TRUE, FALSE, 0); gtk_widget_show (internal_hbox); GtkWidget * description_table = gtk_table_new( 3, 1, TRUE ); GtkWidget * entry_table = gtk_table_new( 3, 1, TRUE ); GtkWidget * button_table = gtk_table_new( 3, 12, TRUE ); gtk_box_pack_start (GTK_BOX (internal_hbox), description_table, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (internal_hbox), entry_table, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (internal_hbox), button_table, FALSE, FALSE, 0); for( int i=0;i<3;i++ ) { GtkWidget * internal_hbox = gtk_hbox_new( FALSE, 10 ); gtk_table_attach_defaults( GTK_TABLE( description_table ), internal_hbox, 0, 1, i, i + 1 ); gtk_widget_show (internal_hbox); GtkWidget * label = gtk_label_new(label_titles[i]); gtk_box_pack_start (GTK_BOX (internal_hbox), label, FALSE, FALSE, 0); gtk_widget_show(label); entries[i] = gtk_entry_new_with_max_length(4); switch(i) { case 0: case 2: gtk_entry_set_text( GTK_ENTRY( entries[i] ), "1" ); break; case 1: gtk_entry_set_text( GTK_ENTRY( entries[i] ), "2" ); break; } entry_t * info = new entry_t( ENTRY_INT, false ); gtk_signal_connect(GTK_OBJECT(entries[i]), "changed", (GtkSignalFunc) entry_handler, info); gtk_table_attach_defaults( GTK_TABLE( entry_table ), entries[i], 0, 1, i, i + 1 ); gtk_widget_set_usize(entries[i], 36,18); gtk_widget_show(entries[i]); GtkWidget * button; int add = 0; if( i == 1 ) add = 3; button = gtk_button_new_with_label (_(" Min ")); min_max_full_buttons_t* mmf_button; mmf_button = new min_max_full_buttons_t( i, MMF_MIN, this ); gtk_signal_connect (GTK_OBJECT (button), "clicked", (GtkSignalFunc) StartTournamentWindow::set_entry, (gpointer) mmf_button ); gtk_table_attach_defaults( GTK_TABLE( button_table ), button, 0, 3 + add, i, i + 1 ); gtk_widget_show (button); if( i == 0 ) { button = gtk_button_new_with_label (_(" All Arenas ")); mmf_button = new min_max_full_buttons_t( i, MMF_ALL_ARENAS, this ); gtk_signal_connect (GTK_OBJECT (button), "clicked", (GtkSignalFunc) StartTournamentWindow::set_entry, (gpointer) mmf_button ); gtk_table_attach_defaults( GTK_TABLE( button_table ), button, 3, 9, i, i + 1 ); gtk_widget_show (button); } if( i == 2 ) { button = gtk_button_new_with_label (_(" Full Round ")); mmf_button = new min_max_full_buttons_t( i, MMF_FULL_ROUND, this ); gtk_signal_connect( GTK_OBJECT( button ), "clicked", (GtkSignalFunc) StartTournamentWindow::set_entry, (gpointer) mmf_button ); gtk_table_attach_defaults( GTK_TABLE( button_table ), button, 3, 9, i, i + 1 ); gtk_widget_show( button ); } button = gtk_button_new_with_label (_(" Max ")); mmf_button = new min_max_full_buttons_t( i, MMF_MAX, this ); gtk_signal_connect (GTK_OBJECT (button), "clicked", (GtkSignalFunc) StartTournamentWindow::set_entry, (gpointer) mmf_button ); gtk_table_attach_defaults( GTK_TABLE( button_table ), button, 9 - add, 12, i, i + 1 ); gtk_widget_show (button); } gtk_table_set_row_spacings( GTK_TABLE( description_table ) , 5 ); gtk_table_set_col_spacings( GTK_TABLE( description_table ) , 5 ); gtk_table_set_row_spacings( GTK_TABLE( entry_table ) , 5 ); gtk_table_set_col_spacings( GTK_TABLE( entry_table ) , 5 ); gtk_table_set_row_spacings( GTK_TABLE( button_table ) , 5 ); gtk_table_set_col_spacings( GTK_TABLE( button_table ) , 5 ); gtk_widget_show( description_table ); gtk_widget_show( entry_table ); gtk_widget_show( button_table ); GtkWidget* vsep = gtk_vseparator_new(); gtk_box_pack_start( GTK_BOX( hbox2 ), vsep, FALSE, FALSE, 0 ); gtk_widget_show( vsep ); GtkWidget* vbox2 = gtk_vbox_new( FALSE, 10 ); gtk_box_pack_start( GTK_BOX(hbox2), vbox2, TRUE, FALSE, 0); gtk_widget_show (vbox2); { char * button_labels[] = { _(" Load tournament "), _(" Save tournament ") }; for(int i=0;i<2;i++) { GtkWidget* button = gtk_button_new_with_label( button_labels[i] ); if(i==0) gtk_signal_connect( GTK_OBJECT( button ), "clicked", (GtkSignalFunc) StartTournamentWindow::load_tournament_selected, (gpointer) this ); if(i==1) gtk_signal_connect( GTK_OBJECT( button ), "clicked", (GtkSignalFunc) StartTournamentWindow::save_tournament_selected, (gpointer) this ); gtk_box_pack_start( GTK_BOX(vbox2), button, TRUE, FALSE, 0); gtk_widget_show( button ); } } vbox2 = gtk_vbox_new( FALSE, 10 ); gtk_box_pack_end( GTK_BOX(hbox2), vbox2, TRUE, FALSE, 0); gtk_widget_show (vbox2); { char * button_labels[] = { _(" Start "), _(" Cancel ") }; for(int i=0;i<2;i++) { GtkWidget* button = gtk_button_new_with_label( button_labels[i] ); if(i==0) gtk_signal_connect( GTK_OBJECT( button ), "clicked", (GtkSignalFunc) StartTournamentWindow::start, (gpointer) this ); if(i==1) gtk_signal_connect( GTK_OBJECT( button ), "clicked", (GtkSignalFunc) StartTournamentWindow::cancel_new_tournament, (gpointer) this ); gtk_box_pack_start( GTK_BOX(vbox2), button, TRUE, FALSE, 0); gtk_widget_show( button ); } } load_tournament_file( the_opts.get_s( OPTION_TMP_RTB_DIR ) + tmp_tournament_file, false ); gtk_widget_show( window_p ); } StartTournamentWindow::~StartTournamentWindow() { gtk_widget_destroy( window_p ); list::const_iterator li; for(li = selected_robot_tournament.begin(); li != selected_robot_tournament.end(); ++li) delete *li; for(li = selected_robot_directory.begin(); li != selected_robot_directory.end(); ++li) delete *li; for(li = selected_arena_tournament.begin(); li != selected_arena_tournament.end(); ++li) delete *li; for(li = selected_arena_directory.begin(); li != selected_arena_directory.end(); ++li) delete *li; } void StartTournamentWindow::add_clist( GtkWidget* clist, GtkWidget* box ) { int all_clists_width=150; int all_clists_height= 150; GtkObject* hadj = gtk_adjustment_new( 0.0, 0.0, 100.0, 1.0, 1.0, 1.0 ); GtkObject* vadj = gtk_adjustment_new( 0.0, 0.0, 100.0, 1.0, 1.0, 1.0 ); GtkWidget* scrolled_win = gtk_scrolled_window_new( GTK_ADJUSTMENT ( hadj ), GTK_ADJUSTMENT ( vadj ) ); gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolled_win ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); gtk_box_pack_start( GTK_BOX( box ), scrolled_win, TRUE, TRUE, 5 ); gtk_widget_show( scrolled_win ); gtk_clist_set_selection_mode( GTK_CLIST( clist ), GTK_SELECTION_MULTIPLE ); gtk_clist_set_column_width( GTK_CLIST( clist ), 0, 90 ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 0, GTK_JUSTIFY_LEFT); gtk_clist_column_titles_passive( GTK_CLIST( clist ) ); gtk_signal_connect( GTK_OBJECT( clist ), "select_row", (GtkSignalFunc) StartTournamentWindow::selection_made, this ); gtk_signal_connect( GTK_OBJECT( clist ), "unselect_row", (GtkSignalFunc) StartTournamentWindow::selection_made, this ); gtk_clist_set_shadow_type( GTK_CLIST( clist ), GTK_SHADOW_IN ); gtk_widget_set_usize( clist, all_clists_width, all_clists_height ); gtk_container_add( GTK_CONTAINER( scrolled_win ), clist ); GtkStyle* clist_style = gtk_rc_get_style(window_p); if( clist_style == NULL ) clist_style = gtk_style_new(); else clist_style = gtk_style_copy(clist_style); clist_style->base[GTK_STATE_NORMAL] = *(the_gui.get_bg_gdk_colour_p()); clist_style->base[GTK_STATE_ACTIVE] = make_gdk_colour( 0xffffff ); clist_style->bg[GTK_STATE_SELECTED] = make_gdk_colour( 0xf0d2b4 ); clist_style->fg[GTK_STATE_SELECTED] = *(the_gui.get_fg_gdk_colour_p()); gtk_widget_set_style( clist, clist_style ); gtk_widget_show( clist ); } void StartTournamentWindow::delete_event_occured( GtkWidget* widget, GdkEvent* event, class StartTournamentWindow* stw_p ) { the_gui.close_starttournamentwindow(); } void StartTournamentWindow::cancel_new_tournament( GtkWidget* widget, class StartTournamentWindow* stw_p ) { the_gui.close_starttournamentwindow(); } void StartTournamentWindow::load_tournament_selected( GtkWidget* widget, class StartTournamentWindow* stw_p ) { if( stw_p->get_filesel() != NULL ) return; GtkWidget* fs = gtk_file_selection_new( _("Choose a tournament file to load") ); gtk_signal_connect( GTK_OBJECT( fs ), "destroy", (GtkSignalFunc) StartTournamentWindow::destroy_filesel, (gpointer) stw_p ); gtk_signal_connect ( GTK_OBJECT( GTK_FILE_SELECTION( fs )->cancel_button ), "clicked", (GtkSignalFunc) StartTournamentWindow::destroy_filesel, (gpointer) stw_p ); gtk_signal_connect ( GTK_OBJECT( GTK_FILE_SELECTION( fs )->ok_button ), "clicked", (GtkSignalFunc) StartTournamentWindow::load_file_selected, (gpointer) stw_p ); gtk_widget_show( fs ); stw_p->set_filesel( fs ); } void StartTournamentWindow::load_file_selected( GtkWidget* widget, class StartTournamentWindow* stw_p ) { stw_p->load_tournament_file ( string( gtk_file_selection_get_filename ( GTK_FILE_SELECTION( stw_p->get_filesel() ) ) ), true ); destroy_filesel( stw_p->get_filesel(), stw_p ); } void StartTournamentWindow::save_tournament_selected( GtkWidget* widget, class StartTournamentWindow* stw_p ) { if( stw_p->get_filesel() != NULL ) return; GtkWidget* fs = gtk_file_selection_new( _("Choose file to save tournament into") ); gtk_signal_connect( GTK_OBJECT( fs ), "destroy", (GtkSignalFunc) StartTournamentWindow::destroy_filesel, (gpointer) stw_p ); gtk_signal_connect ( GTK_OBJECT( GTK_FILE_SELECTION( fs )->cancel_button ), "clicked", (GtkSignalFunc) StartTournamentWindow::destroy_filesel, (gpointer) stw_p ); gtk_signal_connect ( GTK_OBJECT( GTK_FILE_SELECTION( fs )->ok_button ), "clicked", (GtkSignalFunc) StartTournamentWindow::save_file_selected, (gpointer) stw_p ); gtk_widget_show( fs ); stw_p->set_filesel( fs ); } void StartTournamentWindow::save_file_selected( GtkWidget* widget, class StartTournamentWindow* stw_p ) { stw_p->save_tournament_file ( string( gtk_file_selection_get_filename ( GTK_FILE_SELECTION( stw_p->get_filesel() ) ) ), true, true ); destroy_filesel( stw_p->get_filesel(), stw_p ); } void StartTournamentWindow::destroy_filesel( GtkWidget* widget, class StartTournamentWindow* stw_p ) { gtk_widget_destroy( stw_p->get_filesel() ); stw_p->set_filesel( NULL ); } void StartTournamentWindow::load_tournament_file( const string& full_filename, bool display_fail_message ) { if(!parse_tournament_file( full_filename, (StartTournamentFunction) StartTournamentWindow::new_tournament_from_tournament_file, this, false ) && display_fail_message ) { string error_msg( _("Error in specified tournament file.") ); list button_list; button_list.push_back( string( _(" Ok ") ) ); string info_text = _("Tournament could not be loaded.") + string(1, '\n') + error_msg; Dialog( info_text, button_list, (DialogFunction) StartTournamentWindow::dummy_result ); } } void StartTournamentWindow::new_tournament_from_tournament_file ( const list& robotfilename_list, const list& arenafilename_list, const int robots_p_game, const int games_p_sequence, const int n_o_sequences, StartTournamentWindow* stw_p ) { stw_p->new_tournament( robotfilename_list, arenafilename_list, robots_p_game, games_p_sequence, n_o_sequences ); } void StartTournamentWindow:: new_tournament( const list& robotfilename_list, const list& arenafilename_list, const int robots_p_game, const int games_p_sequence, const int n_o_sequences ) { try { for( int i = 0; i<2; i++ ) { GtkWidget* tour_clist; list* tour_list; bool robot; if( i == 0 ) { tour_list = &selected_robot_tournament; tour_clist = robots_in_tournament_clist; robot = true; } else { tour_list = &selected_arena_tournament; tour_clist = arenas_in_tournament_clist; robot = false; } gtk_clist_clear( GTK_CLIST( tour_clist ) ); list::const_iterator li2; for(li2 = tour_list->begin(); li2 != tour_list->end(); ++li2) delete *li2; tour_list->clear(); list::const_iterator li; for( robot ? li = robotfilename_list.begin() : li = arenafilename_list.begin(); (!robot || li != robotfilename_list.end()) && (robot || li != arenafilename_list.end()); ++li) { start_tournament_info_t* info = *li; char* lst[] = { "" }; int row = gtk_clist_append( GTK_CLIST( tour_clist ), lst ); gtk_clist_set_foreground( GTK_CLIST( tour_clist ), row, the_gui.get_fg_gdk_colour_p()); gtk_clist_set_background( GTK_CLIST( tour_clist ), row, the_gui.get_bg_gdk_colour_p()); string fname = info->filename; fname = fname.substr(fname.rfind( '/', fname.size() ) + 1); gtk_clist_set_text( GTK_CLIST( tour_clist ), row, 0, fname.c_str() ); info->selected = false; info->row = row; tour_list->push_back( new start_tournament_info_t ( info->row, false, info->filename, info->directory ) ); } } } catch(exception& e) { Error(true, e.what(), "StartTournamentWindow::new_tournament"); } ostringstream robots_p_game_str, games_p_sequence_str, n_o_sequences_str; robots_p_game_str << robots_p_game; games_p_sequence_str << games_p_sequence; n_o_sequences_str << n_o_sequences; gtk_entry_set_text( GTK_ENTRY( entries[1] ), robots_p_game_str.str().c_str() ); gtk_entry_set_text( GTK_ENTRY( entries[0] ), games_p_sequence_str.str().c_str() ); gtk_entry_set_text( GTK_ENTRY( entries[2] ), n_o_sequences_str.str().c_str() ); } void StartTournamentWindow::save_tournament_file( const string& full_filename, bool display_file_fail_message, bool display_tour_fail_message ) { int value[3]; int robot_number = get_selected_robot_tournament()->size(); istringstream string2number; for( int i = 0; i < 3; i++ ) { int min_value; int max_value; if(i != 1) max_value = 10000; else { max_value = min_rtb( the_opts.get_l( OPTION_MAX_ROBOTS_ALLOWED ),robot_number); } if(i != 1) min_value = 1; else min_value = 2; string2number.clear(); string2number.str(gtk_entry_get_text( GTK_ENTRY( get_entries()[i] ) )); int tmp; string2number >> tmp; value[i] = tmp; value[i] = min_rtb( max_value, value[i] ); value[i] = max_rtb( min_value, value[i] ); } ofstream file(full_filename.c_str(), ios::out); if( robot_number > 1 && file && !( selected_arena_tournament.empty() ) ) { file << "Robots: " << endl; list::const_iterator li; for( li = selected_robot_tournament.begin(); li != selected_robot_tournament.end(); ++li ) file << (*li)->filename << " " << endl; file << "Arenas: " << endl; for( li = selected_arena_tournament.begin(); li != selected_arena_tournament.end(); ++li ) file << (*li)->filename << " " << endl; file << "Robots/Sequence: " << value[1] << endl; file << "Games/Sequence: " << value[0] << endl; file << "Sequences: " << value[2] << endl; } else if( display_file_fail_message || display_tour_fail_message ) { string error_msg( "" ); if( display_tour_fail_message ) { if( robot_number <= 1 ) error_msg += string(1, '\n') + _("There are too few robots in the tournament."); if( selected_arena_tournament.empty() ) error_msg += string(1, '\n') + _("There are no arenas in the tournament."); } if( display_file_fail_message && !file ) error_msg += string(1, '\n') + _("Could not open file."); if( error_msg != "" ) { list button_list; button_list.push_back( string( _(" Ok ") ) ); string info_text = string( _("Tournament could not be saved.") ) + error_msg; Dialog( info_text, button_list, (DialogFunction) StartTournamentWindow::dummy_result ); } } } void StartTournamentWindow::set_entry( GtkWidget* widget, struct min_max_full_buttons_t* mmf_p ) { switch( mmf_p->type ) { case MMF_MIN: { if( mmf_p->entry != 1 ) gtk_entry_set_text( GTK_ENTRY( mmf_p->stw_p->get_entries()[mmf_p->entry] ), "1" ); else gtk_entry_set_text( GTK_ENTRY( mmf_p->stw_p->get_entries()[mmf_p->entry] ), "2" ); } break; case MMF_MAX: { if( mmf_p->entry != 1 ) gtk_entry_set_text( GTK_ENTRY( mmf_p->stw_p->get_entries()[mmf_p->entry] ), "9999" ); else { int number_of_robots = mmf_p->stw_p-> get_selected_robot_tournament()->size(); if( number_of_robots > the_opts.get_l( OPTION_MAX_ROBOTS_ALLOWED ) ) number_of_robots = the_opts.get_l( OPTION_MAX_ROBOTS_ALLOWED ); ostringstream number_of_robots_str; number_of_robots_str << number_of_robots; gtk_entry_set_text ( GTK_ENTRY( mmf_p->stw_p->get_entries()[mmf_p->entry] ), number_of_robots_str.str().c_str() ); } } break; case MMF_FULL_ROUND: { int number_of_robots = mmf_p->stw_p-> get_selected_robot_tournament()->size(); istringstream string2number(gtk_entry_get_text ( GTK_ENTRY( mmf_p->stw_p->get_entries()[1] ) )); int robots_per_sequence; string2number >> robots_per_sequence; if( number_of_robots < robots_per_sequence ) robots_per_sequence = number_of_robots; if( robots_per_sequence > the_opts.get_l( OPTION_MAX_ROBOTS_ALLOWED ) ) robots_per_sequence = the_opts.get_l( OPTION_MAX_ROBOTS_ALLOWED ); if( robots_per_sequence < 2 ) robots_per_sequence = 2; ostringstream number2string; number2string << min ( 9999, binomial( number_of_robots, robots_per_sequence) ); gtk_entry_set_text ( GTK_ENTRY( mmf_p->stw_p->get_entries()[mmf_p->entry] ), number2string.str().c_str() ); } break; case MMF_ALL_ARENAS: { int number_of_arenas = mmf_p->stw_p-> get_selected_arena_tournament()->size(); if( number_of_arenas > the_opts.get_l( OPTION_MAX_ROBOTS_ALLOWED ) ) number_of_arenas = the_opts.get_l( OPTION_MAX_ROBOTS_ALLOWED ); if( number_of_arenas < 1 ) number_of_arenas = 1; ostringstream number_of_arenas_str; number_of_arenas_str << number_of_arenas; gtk_entry_set_text ( GTK_ENTRY( mmf_p->stw_p->get_entries()[mmf_p->entry] ), number_of_arenas_str.str().c_str() ); } break; } } void StartTournamentWindow::start( GtkWidget* widget, class StartTournamentWindow* stw_p ) { if( stw_p->get_tournament_started_flag() == true ) return; if( the_arena_controller.is_started() ) if( the_arena.get_state() != NOT_STARTED && the_arena.get_state() != FINISHED ) return; int value[3]; int robot_number = stw_p->get_selected_robot_tournament()->size(); istringstream string2number; for( int i = 0; i < 3; i++ ) { int min_value; int max_value; if(i != 1) max_value = 10000; else { max_value = min_rtb(the_opts.get_l( OPTION_MAX_ROBOTS_ALLOWED ),robot_number); } if(i != 1) min_value = 1; else min_value = 2; string2number.clear(); string2number.str(gtk_entry_get_text( GTK_ENTRY( stw_p->get_entries()[i] ) )); int tmp; string2number >> tmp; value[i] = tmp; value[i] = min_rtb( max_value, value[i] ); value[i] = max_rtb( min_value, value[i] ); } if( robot_number > 1 && !( stw_p->get_selected_arena_tournament()->empty() ) ) { stw_p->set_tournament_started_flag( true ); the_arena_controller.start_realtime_arena(); realtime_arena.start_tournament( *( stw_p->get_selected_robot_tournament() ), *( stw_p->get_selected_arena_tournament() ), value[1], value[0], value[2] ); // create the tmp rtb dir if it exists and save the current tournament there create_tmp_rtb_dir(); stw_p->save_tournament_file( the_opts.get_s( OPTION_TMP_RTB_DIR ) + tmp_tournament_file, false, false ); // close down StartTournamentWindow the_gui.close_starttournamentwindow(); } else { string error_msg( "" ); if( robot_number <= 1 ) error_msg += string(1,'\n') + _("There must be at least two robots in the tournament."); if( stw_p->selected_arena_tournament.empty() ) error_msg += string(1,'\n') + _("There are no arenas in the tournament."); if( error_msg != "" ) { list button_list; button_list.push_back( string( _(" Ok ") ) ); string info_text = _("Tournament could not be started.") + error_msg; Dialog( info_text, button_list, (DialogFunction) StartTournamentWindow::dummy_result ); } } } void StartTournamentWindow::button_selected( GtkWidget* widget, struct select_buttons_t* button ) { switch( button->button_nr ) { case START_TORUNAMENT_REMOVE: button->stw_p->remove_all_selected( button->robot ); break; case START_TORUNAMENT_SELECT_ALL_TOURNAMENT: button->stw_p->change_all_selection( button->robot,false,true ); break; case START_TORUNAMENT_UNSELECT_ALL_TOURNAMENT: button->stw_p->change_all_selection( button->robot,false,false ); break; case START_TORUNAMENT_ADD: button->stw_p->add_all_selected( button->robot ); break; case START_TORUNAMENT_SELECT_ALL_DIRECTORY: button->stw_p->change_all_selection( button->robot,true,true ); break; case START_TORUNAMENT_UNSELECT_ALL_DIRECTORY: button->stw_p->change_all_selection( button->robot,true,false ); break; } } void StartTournamentWindow::change_all_selection( const bool robots, const bool dir, const bool all ) { list::const_iterator li; list* info_list = NULL; GtkWidget * clist = NULL; if( robots && dir ) { info_list = get_selected_robot_directory(); clist = get_robots_in_directory_clist(); } else if(robots && !dir) { info_list = get_selected_robot_tournament(); clist = get_robots_in_tournament_clist(); } else if(!robots && dir) { info_list = get_selected_arena_directory(); clist = get_arenas_in_directory_clist(); } else if(!robots && !dir) { info_list = get_selected_arena_tournament(); clist = get_arenas_in_tournament_clist(); } for( li = info_list->begin(); li != info_list->end(); ++li ) { start_tournament_info_t* info_p = *li; if( all ) { info_p->selected = true; gtk_clist_select_row( GTK_CLIST( clist ), info_p->row, 0); } else { info_p->selected = false; gtk_clist_unselect_row( GTK_CLIST( clist ), info_p->row, 0); } } } void StartTournamentWindow::add_all_selected( const bool robots ) { list::const_iterator li; list* info_dir_list; list* info_tourn_list; GtkWidget * clist_tourn; if(robots) { info_dir_list = get_selected_robot_directory(); info_tourn_list = get_selected_robot_tournament(); clist_tourn = get_robots_in_tournament_clist(); } else { info_dir_list = get_selected_arena_directory(); info_tourn_list = get_selected_arena_tournament(); clist_tourn = get_arenas_in_tournament_clist(); } for( li = info_dir_list->begin(); li != info_dir_list->end() ; ++li ) { start_tournament_info_t* info_dir_p = *li; if( info_dir_p->selected ) { char * list[] = { "" }; int row = gtk_clist_append( GTK_CLIST( clist_tourn ), list ); gtk_clist_set_foreground( GTK_CLIST( clist_tourn ), row, the_gui.get_fg_gdk_colour_p() ); gtk_clist_set_background( GTK_CLIST( clist_tourn ), row, the_gui.get_bg_gdk_colour_p() ); gtk_clist_set_text( GTK_CLIST( clist_tourn ), row, 0, info_dir_p->filename.c_str()/*.non_const_chars()*/ ); start_tournament_info_t* info_tourn_p; string full_filename; if(robots) full_filename = info_dir_p->directory + info_dir_p->filename; else full_filename = info_dir_p->directory + info_dir_p->filename; info_tourn_p = new start_tournament_info_t ( row, false, full_filename.c_str(), info_dir_p->directory ); info_tourn_list->push_back( info_tourn_p ); } } } void StartTournamentWindow::remove_all_selected( const bool robots ) { list::iterator li; list::const_iterator li2; list* info_dir_list; GtkWidget * clist_tourn; if(robots) { info_dir_list = get_selected_robot_tournament(); clist_tourn = get_robots_in_tournament_clist(); } else { info_dir_list = get_selected_arena_tournament(); clist_tourn = get_arenas_in_tournament_clist(); } for( li = info_dir_list->begin() ; li != info_dir_list->end(); ) { start_tournament_info_t* info_p = *li; if( info_p->selected ) { gtk_clist_remove(GTK_CLIST(clist_tourn), info_p->row); for( li2 = info_dir_list->begin(); li2 != info_dir_list->end(); ++li2 ) { start_tournament_info_t* info2_p = *li2; if(info2_p->row > info_p->row) info2_p->row = info2_p->row - 1; } delete *li; li = info_dir_list->erase(li); } else ++li; } } void StartTournamentWindow::selection_made( GtkWidget* clist, gint row, gint column, GdkEventButton *event, class StartTournamentWindow* stw_p ) { if( event == NULL ) return; list* info_list = NULL; if(clist == stw_p->get_robots_in_tournament_clist() ) info_list = stw_p->get_selected_robot_tournament(); else if(clist == stw_p->get_robots_in_directory_clist() ) info_list = stw_p->get_selected_robot_directory(); else if(clist == stw_p->get_arenas_in_tournament_clist() ) info_list = stw_p->get_selected_arena_tournament(); else if(clist == stw_p->get_arenas_in_directory_clist() ) info_list = stw_p->get_selected_arena_directory(); start_tournament_info_t* info_p; info_p = stw_p->find_row_in_clist( row, info_list ); if( info_p->selected ) info_p->selected = false; else info_p->selected = true; } start_tournament_info_t* StartTournamentWindow::find_row_in_clist( const int row, list* info_list ) { list::const_iterator li; for( li = info_list->begin(); li != info_list->end() ; ++li ) { start_tournament_info_t* info_p = *li; if( info_p->row == row ) return info_p; } return NULL; } realtimebattle-1.0.8/src/Structs.cc0000644000175000017500000000407110175160720015416 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #ifdef HAVE_CONFIG_H #include #endif #ifndef NO_GRAPHICS #include "Structs.h" #include "ArenaController.h" #include "ArenaRealTime.h" pixmap_t::~pixmap_t() { if( pixmap != NULL ) { // gdk_pixmap_unref(pixmap); // gdk_bitmap_unref(bitmap); //TODO: check if window is open before unrefing } } void pixmap_t::set_pixmap(GdkColor& col, GdkWindow* win) { if( pixmap != NULL ) { gdk_pixmap_unref(pixmap); gdk_bitmap_unref(bitmap); } gchar square_bits[] = { 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f}; pixmap = gdk_pixmap_create_from_data( win, square_bits, 16, 16, -1, &col, the_gui.get_bg_gdk_colour_p() ); bitmap = gdk_bitmap_create_from_data( win, square_bits, 16, 16 ); } void pixmap_t::get_pixmap(GdkColor& col, GdkWindow* win, GdkPixmap*& pixm, GdkBitmap*& bitm ) { if( win != window && pixmap != NULL ) { gdk_pixmap_unref(pixmap); pixmap = NULL; gdk_bitmap_unref(bitmap); bitmap = NULL; } if( pixmap == NULL ) set_pixmap(col, win); pixm = pixmap; bitm = bitmap; } #endif realtimebattle-1.0.8/src/ScoreWindow.cc0000644000175000017500000002431210235455376016225 0ustar moimoi/* RealTimeBattle, a robot programming game for Unix Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony 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. */ #include #include "ScoreWindow.h" #include "IntlDefs.h" #include "ControlWindow.h" #include "ArenaController.h" #include "Robot.h" #include "Various.h" #include using namespace std; extern class ControlWindow* controlwindow_p; // // The constructor. The window will be set up here. // ScoreWindow::ScoreWindow( const int default_width, const int default_height, const int default_x_pos, const int default_y_pos ) { window_p = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_widget_set_name( window_p, "RTB Score" ); set_window_title(); gtk_container_border_width( GTK_CONTAINER( window_p ), 12 ); if( default_width != -1 && default_height != -1 ) { gtk_window_set_default_size( GTK_WINDOW( window_p ), default_width, default_height ); gtk_widget_set_usize( window_p , 175, 80 ); } if( default_x_pos != -1 && default_y_pos != -1 ) gtk_widget_set_uposition( window_p, default_x_pos, default_y_pos ); gtk_signal_connect( GTK_OBJECT( window_p ), "delete_event", (GtkSignalFunc) ScoreWindow::hide_window, (gpointer) this ); GtkObject* hadj = gtk_adjustment_new ( 0.0, 0.0, 100.0, 1.0, 1.0, 1.0 ); GtkObject* vadj = gtk_adjustment_new ( 0.0, 0.0, 100.0, 1.0, 1.0, 1.0 ); GtkWidget* scrolled_win = gtk_scrolled_window_new( GTK_ADJUSTMENT ( hadj ), GTK_ADJUSTMENT ( vadj ) ); gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_win ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); gtk_container_add( GTK_CONTAINER( window_p ), scrolled_win ); gtk_widget_show ( scrolled_win ); char * titles[6] = { "", _("Name"), _("Energy"), _("Place"), _("Last"), _("Score") }; clist = gtk_clist_new_with_titles( 6, titles ); gtk_clist_set_selection_mode( GTK_CLIST( clist ), GTK_SELECTION_BROWSE ); gtk_clist_set_column_width( GTK_CLIST( clist ), 0, 5 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 1, 120 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 2, 44 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 3, 38 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 4, 35 ); gtk_clist_set_column_width( GTK_CLIST( clist ), 5, 45 ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 0, GTK_JUSTIFY_CENTER ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 1, GTK_JUSTIFY_LEFT ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 2, GTK_JUSTIFY_RIGHT ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 3, GTK_JUSTIFY_RIGHT ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 4, GTK_JUSTIFY_RIGHT ); gtk_clist_set_column_justification( GTK_CLIST( clist ), 5, GTK_JUSTIFY_RIGHT ); gtk_clist_column_titles_passive( GTK_CLIST( clist ) ); gtk_signal_connect( GTK_OBJECT( clist ), "select_row", (GtkSignalFunc) new_robot_selected, this ); gtk_clist_set_column_resizeable( GTK_CLIST( clist ), 0, FALSE ); gtk_clist_set_column_max_width( GTK_CLIST( clist ), 0, 5 ); gtk_clist_set_shadow_type( GTK_CLIST( clist ), GTK_SHADOW_IN ); gtk_container_add( GTK_CONTAINER( scrolled_win ), clist ); for( int i=2; i <=5; i++ ) gtk_clist_set_column_auto_resize( GTK_CLIST( clist ), i, TRUE ); GtkStyle* clist_style = gtk_rc_get_style(window_p); if( clist_style == NULL ) clist_style = gtk_style_new(); else clist_style = gtk_style_copy(clist_style); clist_style->base[GTK_STATE_NORMAL] = *(the_gui.get_bg_gdk_colour_p()); clist_style->base[GTK_STATE_ACTIVE] = make_gdk_colour( 0xffffff ); clist_style->bg[GTK_STATE_SELECTED] = make_gdk_colour( 0xf0d2b4 ); clist_style->fg[GTK_STATE_SELECTED] = *(the_gui.get_fg_gdk_colour_p()); gtk_widget_set_style( clist, clist_style ); gtk_widget_show( clist ); if( window_shown = ( controlwindow_p->is_scorewindow_checked() ) ) gtk_widget_show_now( window_p ); selected_robot = NULL; } // // The destructor // ScoreWindow::~ScoreWindow() { gtk_widget_destroy( window_p ); } // // Sets the window title in the form of: // Score Seq: 1 (2) Game: 3 (4) Time: 56 // void ScoreWindow::set_window_title() { ostringstream sequence_nr_str, sequences_in_tournament_str, game_nr_str, games_per_sequence_str, total_time_str; sequence_nr_str << the_arena.get_sequence_nr(); sequences_in_tournament_str << the_arena.get_sequences_in_tournament(); game_nr_str << the_arena.get_game_nr(); games_per_sequence_str << the_arena.get_games_per_sequence(); total_time_str << (int)the_arena.get_total_time(); string title = string( _("Score") ) + " " + string( _(" Seq: ") ) + sequence_nr_str.str() + " (" + sequences_in_tournament_str.str() + ") " + string( _("Game") ) + ": " + game_nr_str.str() + " (" + games_per_sequence_str.str() + ") " + string( _("Time") ) + ": " + total_time_str.str(); gtk_window_set_title( GTK_WINDOW( window_p ), title.c_str() ); } // // This function hides the window // Warning: event can be NULL, do not use event! // gboolean ScoreWindow::hide_window( GtkWidget* widget, GdkEvent* event, class ScoreWindow* scorewindow_p ) { if( scorewindow_p->is_window_shown() ) { gtk_widget_hide( scorewindow_p->get_window_p() ); scorewindow_p->set_window_shown( false ); if( controlwindow_p->is_scorewindow_checked() ) { GtkWidget* menu_item = controlwindow_p->get_show_score_menu_item(); gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( menu_item ), FALSE ); } } return true; } // // This function shows the window again // void ScoreWindow::show_window( GtkWidget* widget, class ScoreWindow* scorewindow_p ) { if( !scorewindow_p->is_window_shown() ) { gtk_widget_show_now( scorewindow_p->get_window_p() ); scorewindow_p->set_window_shown( true ); } } // // This function is called whenever the user selects a robot in // the clist. Remebers this robot as the selected one. // void ScoreWindow::new_robot_selected( GtkWidget * clist, gint row, gint column, GdkEventButton *event, class ScoreWindow* scorewindow_p ) { if( event == NULL ) return; Robot* robotp; list::iterator li; for( li = the_arena.get_object_lists()[ROBOT].begin(); li != the_arena.get_object_lists()[ROBOT].end(); ++li ) { robotp = (Robot*)(*li); if( row == robotp->get_row_in_score_clist() ) scorewindow_p->set_selected_robot( robotp ); } } // // This function updates all information about all robots in the sequence // void ScoreWindow::update_robots() { if( the_arena.get_game_nr() == 1 ) { add_robots(); return; } Robot* robot_p; list* object_lists = the_arena.get_object_lists(); list::iterator li; for( li = object_lists[ROBOT].begin(); li != object_lists[ROBOT].end(); ++li ) { robot_p = (Robot*)(*li); robot_p->reset_last_displayed(); for( int i = 2; i <=5 ; i++ ) gtk_clist_set_text( GTK_CLIST( clist ), robot_p->get_row_in_score_clist(), i, "" ); robot_p->display_score(); } } // // This function resets score window and adds all robots in sequence // to the score window. Sets the selected robot to the first one. // void ScoreWindow::add_robots() { gtk_clist_clear( GTK_CLIST( clist ) ); Robot* robot_p; list* object_lists = the_arena.get_object_lists(); list::iterator li; bool found_robot = false; for( li = object_lists[ROBOT].begin(); li != object_lists[ROBOT].end(); ++li ) { robot_p = (Robot*)(*li); char* empty_list[] = { "", "", "", "", "", "" }; int row = gtk_clist_append( GTK_CLIST( clist ), empty_list ); gtk_clist_set_foreground( GTK_CLIST( clist ), row, the_gui.get_fg_gdk_colour_p() ); gtk_clist_set_background( GTK_CLIST( clist ), row, the_gui.get_bg_gdk_colour_p() ); robot_p->set_row_in_score_clist( row ); GdkPixmap* colour_pixmap; GdkBitmap* bitmap_mask; robot_p->get_score_pixmap( window_p->window, colour_pixmap, bitmap_mask ); gtk_clist_set_pixmap( GTK_CLIST( clist ), row, 0, colour_pixmap, bitmap_mask ); gtk_clist_set_text( GTK_CLIST( clist ), row, 1, robot_p->get_robot_name().c_str()/*.non_const_chars()*/ ); gtk_clist_set_text( GTK_CLIST( clist ), row, 3, "" ); robot_p->reset_last_displayed(); robot_p->display_score(); if( selected_robot == NULL && row == 0 ) selected_robot = robot_p; if( selected_robot == robot_p ) { found_robot = true; gtk_clist_select_row( GTK_CLIST( clist ), row, 1 ); } } if( !found_robot ) for( li = object_lists[ROBOT].begin(); li != object_lists[ROBOT].end(); ++li ) { robot_p = (Robot*)(*li); if( robot_p->get_row_in_score_clist() == 0 ) { selected_robot = robot_p; gtk_clist_select_row( GTK_CLIST( clist ), 0, 1 ); } } } realtimebattle-1.0.8/src/ClientInterface.cc0000644000175000017500000001723110320510551017001 0ustar moimoi/* * Network interface for RealTimeBattle clients * Copyright (C) 2005 Volker Stroebel * * 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. */ #include "ClientInterface.h" #include "ArenaController.h" #include "ArenaRealTime.h" #include "Various.h" #include #include #include #include #include #include #include #include /* * The first client that registers itself to the server * automatically becomes the master client that is * allowed to control the core (start/end tournaments). * This is a dirty hack and should be removed with a real * authentification system in the future. */ static bool has_master = false; ClientConnection::ClientConnection(int sd):_socket(sd), _initialized(false), _master(false) { //we only need to set the socket nonblocking int opts = fcntl(_socket, F_GETFL); if (opts < 0) { cerr << "ClientConnection: Unable to get flags for stream -> " << strerror(errno) << endl; } opts = (opts | O_NONBLOCK); if (fcntl(_socket, F_SETFL, opts) < 0) { cerr << "ClientConnection: Unable to set flags for stream -> " << strerror(errno) << endl; } } /** * Sends exiting message to client and closes the socket */ ClientConnection::~ClientConnection() { write(_socket, "Cexiting\n", 10); close(_socket); } /** * Check for messages from the client * Returns false if client connection is broken */ bool ClientConnection::loop() { int rc; // read only once per 'tick' to minimize denial of service attacks if ((rc = read(_socket, _buffer,4096)) > 0) { char *pos = _buffer; for (int i = 0; i < 4096; ++i) { // received last byte, but no valid line was constructed at this moment // => wait until we get the next part of the message if (i == rc) { _buffer[i]='\0'; _line += pos; break; // got a newline, now we can append the received data to the already received data in the previous ticks } else if (_buffer[i] == '\n') { _buffer[i] = '\0'; _line += pos; if (!parse_line(_line)) { //client talks not our language return false; } // now we clean the line _line.clear(); pos = _buffer+i+1; // string termination should only appear after a newline } else if (_buffer[i] == '\0') { // just ignore pos= _buffer+i+1; continue; } } // we have received some data, so client is still alive return true; } if (rc == 0) { // EOF if (!_line.empty()) { parse_line(_line); } return false; } else if (errno != EAGAIN) { cerr << "ClientConnection::Loop() -- Error receiving data from client -> " << strerror(errno) << endl; return false; } return true; } /** * Send message to client */ int ClientConnection::send(const char *message, int len) { return::send(_socket, message, len, 0); } /** * Parse line received from clients */ bool ClientConnection::parse_line(string & message) { if (_initialized) { switch (_line[0]) { case 'C': if (_master) { if (_line.length() > 4) { parse_command(_line[1], message.substr(3)); } else { cerr << "Received Command with no argument from client" << endl; } } break; default: cerr << "Unknown message from client" << endl; } } else { //performing handshake with client if possible if (message == "WELCOME SERVER") { if (!has_master) { write(_socket, "WELCOME MASTER\n", 16); cout << "register client as master" << endl; has_master = true; _master = true; } else { write(_socket, "WELCOME OBSERVER\n", 18); cout << "register client as observer" << endl; } _initialized = true; } else { cerr << "Cannot understand client: " << message << endl; return false; } } return true; } /** * Parse command received from clients */ void ClientConnection::parse_command(const char command,const string& data) { switch (command) { case 'N': cout << "Start new game: " << data << endl; the_arena_controller.start_realtime_arena(); parse_tournament_file(data, (StartTournamentFunction) ArenaRealTime:: start_tournament_from_tournament_file, &realtime_arena); break; default: cerr << "Unknown command from client" << endl; } } auto_ptr < ClientInterface > ClientInterface::_instance(0); int ClientInterface::port(32134); void ClientInterface::set_port(int portnumber) { ClientInterface::port=portnumber; } ClientInterface::ClientInterface():_is_accepting(true) { struct sockaddr_in servAddr; // create socket _sd = socket(AF_INET, SOCK_STREAM, 0); if (_sd < 0) { cerr << "cannot open socket: " << strerror(errno) << endl; return; } // set socket nonblocking { int opts; opts = fcntl(_sd, F_GETFL); if (opts < 0) { cerr << "fcntl(F_GETFL): " << strerror(errno) << endl; } opts = (opts | O_NONBLOCK); if (fcntl(_sd, F_SETFL, opts) < 0) { cerr << "fcntl(F_SETFL): " << strerror(errno) << endl; } } // bind server port servAddr.sin_family = AF_INET; servAddr.sin_addr.s_addr = htonl(INADDR_ANY); servAddr.sin_port = htons(ClientInterface::port); if (bind(_sd, (struct sockaddr *) &servAddr, sizeof(servAddr)) < 0) { cerr << "cannot bind port: " << strerror(errno) << endl; return; } listen(_sd, 5); } /** * Deletes all registered ClientConnections * and closes network connection */ ClientInterface::~ClientInterface() { list < ClientConnection * >::iterator it=_clients.begin(); while (it!= _clients.end()) { delete(*it); it = _clients.erase(it); } close(_sd); } /** * Return pointer to the instance */ ClientInterface *ClientInterface::Instance() throw(bad_exception) { ClientInterface *iface(ClientInterface::_instance.get()); if (iface == 0) { ClientInterface::_instance.reset(iface = new ClientInterface()); } return iface; } /** * Chechs for new connections and messages from the client */ void ClientInterface::loop() { int newSd; struct sockaddr_in cliAddr; static size_t cliLen = sizeof(cliAddr); if (_is_accepting) { #ifndef NDEBUG cout << "a" << flush; #endif //check for new connections while ((newSd = accept(_sd, (struct sockaddr *) &cliAddr, &cliLen)) > 0) { _clients.push_back(new ClientConnection(newSd)); } } else { #ifndef NDEBUG cout << "." << flush; #endif } // check for client messages list < ClientConnection * >::iterator it(_clients.begin()); while (it != _clients.end()) { if (!(*it)->loop()) { cerr << "client disconnected" << endl; delete(*it); it = _clients.erase(it); } else ++it; } } /** * Send messages to all connected clients */ int ClientInterface::send(const char *message, int len) { list < ClientConnection * >::iterator it; for (it = _clients.begin(); it != _clients.end(); it++) { (*it)->send(message, len); } } /** * Set whether the server should listen to new connections */ void ClientInterface::set_accepting(bool state) { _is_accepting = state; } realtimebattle-1.0.8/Packages/0002755000175000017500000000000010404234034014362 5ustar moimoirealtimebattle-1.0.8/Packages/Makefile.am0000644000175000017500000000021410170545360016420 0ustar moimoiSUBDIRS = rpm debian freebsd PACKAGES = rpm debian freebsd packages: $(PACKAGES) .PHONY: $(PACKAGES) $(PACKAGES): cd $@ && $(MAKE) $@ realtimebattle-1.0.8/Packages/Makefile.in0000644000175000017500000004132710324167707016451 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = Packages DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = 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 ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ SUBDIRS = rpm debian freebsd PACKAGES = rpm debian freebsd all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Packages/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Packages/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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) @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 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: 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) 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 mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-recursive ctags ctags-recursive \ distclean distclean-generic distclean-recursive 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 \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am packages: $(PACKAGES) .PHONY: $(PACKAGES) $(PACKAGES): cd $@ && $(MAKE) $@ # 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: realtimebattle-1.0.8/Packages/rpm/0002755000175000017500000000000010404234034015160 5ustar moimoirealtimebattle-1.0.8/Packages/rpm/Makefile.am0000644000175000017500000000177710170545360017235 0ustar moimoiEXTRA_DIST = RealTimeBattle.spec.in SPECDIR = $(shell rpm --showrc | grep "^specdir" | sed "s/specdir[ ]*: *//") SOURCEDIR = $(shell rpm --showrc | grep "^sourcedir" | sed "s/sourcedir[ ]*: *//") RPMDIR = $(shell rpm --showrc | grep "^rpmdir" | sed "s/rpmdir[ ]*: *//") BUILDARCH = $(shell rpm --showrc | grep "^build arch" | sed "s/build arch[ ]*: *//") SRCRPMDIR = $(shell rpm --showrc | grep "^srcrpmdir" | sed "s/srcrpmdir[ ]*: *//") .PHONY: rpm rpm: echo "It seems as if this target rule is broken due to new versions of rpm. Please correct!" if test "x$(VERSION)" != "x"; then \ cp ../../../$(PACKAGE)-$(VERSION).tar.gz $(SOURCEDIR) && \ cp RealTimeBattle.spec $(SPECDIR)/RealTimeBattle-$(RTB_RPM_VERSION).spec && \ rpm -ba --clean --rmsource $(SPECDIR)/RealTimeBattle-$(RTB_RPM_VERSION).spec && \ cp $(RPMDIR)/$(BUILDARCH)/RealTimeBattle-$(RTB_RPM_VERSION).$(BUILDARCH).rpm . && \ cp $(SRCRPMDIR)/RealTimeBattle-$(RTB_RPM_VERSION).src.rpm . ; \ else \ cd ../../ && $(MAKE) rpm ; \ fi realtimebattle-1.0.8/Packages/rpm/Makefile.in0000644000175000017500000003064510324167710017242 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = Packages/rpm DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ EXTRA_DIST = RealTimeBattle.spec.in SPECDIR = $(shell rpm --showrc | grep "^specdir" | sed "s/specdir[ ]*: *//") SOURCEDIR = $(shell rpm --showrc | grep "^sourcedir" | sed "s/sourcedir[ ]*: *//") RPMDIR = $(shell rpm --showrc | grep "^rpmdir" | sed "s/rpmdir[ ]*: *//") BUILDARCH = $(shell rpm --showrc | grep "^build arch" | sed "s/build arch[ ]*: *//") SRCRPMDIR = $(shell rpm --showrc | grep "^srcrpmdir" | sed "s/srcrpmdir[ ]*: *//") all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Packages/rpm/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Packages/rpm/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 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: 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic 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 -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic 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-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am .PHONY: rpm rpm: echo "It seems as if this target rule is broken due to new versions of rpm. Please correct!" if test "x$(VERSION)" != "x"; then \ cp ../../../$(PACKAGE)-$(VERSION).tar.gz $(SOURCEDIR) && \ cp RealTimeBattle.spec $(SPECDIR)/RealTimeBattle-$(RTB_RPM_VERSION).spec && \ rpm -ba --clean --rmsource $(SPECDIR)/RealTimeBattle-$(RTB_RPM_VERSION).spec && \ cp $(RPMDIR)/$(BUILDARCH)/RealTimeBattle-$(RTB_RPM_VERSION).$(BUILDARCH).rpm . && \ cp $(SRCRPMDIR)/RealTimeBattle-$(RTB_RPM_VERSION).src.rpm . ; \ else \ cd ../../ && $(MAKE) rpm ; \ fi # 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: realtimebattle-1.0.8/Packages/rpm/RealTimeBattle.spec.in0000644000175000017500000000351010170545360021303 0ustar moimoi# # spec file for package RealTimeBattle (for version see below) # # Author: CW Zuckschwerdt , Nov 1999 # %define prefix /usr %define name RealTimeBattle %define version @VERSION@ %define release @RTB_RPM_RELEASE@ Summary: RealTimeBattle, a robot programming game for Unix Name: %{name} Version: %{version} Release: %{release} Copyright: GPL Group: X11/Games Source: http://realtimebattle.sourceforge.net URL: http://realtimebattle.sourceforge.net BuildRoot: /tmp/%{name}-%{version} Packager: CW Zuckschwerdt %description RealTimeBattle is a programming game, in which robots controlled by programs are fighting each other. The goal is to destroy the enemies, using the radar to examine the environment and the cannon to shoot. %prep %setup %build ./configure --prefix=%{prefix} --enable-rpm="$RPM_OPT_FLAGS" make %install make prefix=$RPM_BUILD_ROOT%{prefix} install %post /sbin/install-info /usr/info/RealTimeBattle.info.gz --info-dir=/usr/info/dir --menuentry="* RealTimeBattle: (RealTimeBattle). A robot programming game." --description="RealTimeBattle: A robot programming game." %preun if [ $1 = 0 ]; then /sbin/install-info --remove /usr/info/RealTimeBattle.info.gz --info-dir=/usr/info/dir --menuentry="* RealTimeBattle: (RealTimeBattle). A robot programming game." --description="RealTimeBattle: A robot programming game." fi %files %doc ABOUT-NLS BUGS COPYING CVS-Help FAQ ChangeLog README TODO %doc Documentation/*.html %doc Documentation/*.gif %doc Documentation/*.dvi %{prefix}/bin/* %{prefix}/include/* %{prefix}/share/* %{prefix}/info/* %{prefix}/games/RealTimeBattle/*.h %{prefix}/games/RealTimeBattle/*.xpm %{prefix}/games/RealTimeBattle/*.txt %{prefix}/games/RealTimeBattle/Arenas/* %{prefix}/games/RealTimeBattle/Robots/* realtimebattle-1.0.8/Packages/debian/0002755000175000017500000000000010404234034015604 5ustar moimoirealtimebattle-1.0.8/Packages/debian/Makefile.am0000644000175000017500000000013010170545360017637 0ustar moimoidebian: echo "We do not have a procedure to produce debfiles yet. Please insert here!" realtimebattle-1.0.8/Packages/debian/Makefile.in0000644000175000017500000002701210324167707017666 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = Packages/debian DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Packages/debian/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Packages/debian/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 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: 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic 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 -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic 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-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am debian: echo "We do not have a procedure to produce debfiles yet. Please insert here!" # 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: realtimebattle-1.0.8/Packages/freebsd/0002755000175000017500000000000010404234034015774 5ustar moimoirealtimebattle-1.0.8/Packages/freebsd/Makefile.am0000644000175000017500000000014110170545361020032 0ustar moimoifreebsd: echo "We do not have a procedure to create packages for Free BSD. Please insert here!" realtimebattle-1.0.8/Packages/freebsd/Makefile.in0000644000175000017500000002702610324167710020055 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = Packages/freebsd DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Packages/freebsd/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Packages/freebsd/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 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: 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic 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 -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic 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-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am freebsd: echo "We do not have a procedure to create packages for Free BSD. Please insert here!" # 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: realtimebattle-1.0.8/Arenas/0002755000175000017500000000000010404234034014055 5ustar moimoirealtimebattle-1.0.8/Arenas/Makefile.am0000644000175000017500000000054310170545353016122 0ustar moimoiarenadatadir = $(RTB_DIR)/Arenas arenadata_DATA = \ Circle.arena Circles.arena Cross.arena Diamond.arena Flower.arena \ Forest.arena Labyrinth.arena Nippon.arena Pool.arena Rooms.arena \ Square.arena Star.arena Triangle.arena MrFriendly.arena my_Star2.arena \ my_Star.arena PPconquest.arena Maze.arena Propeller.arena EXTRA_DIST = $(arenadata_DATA) realtimebattle-1.0.8/Arenas/Makefile.in0000644000175000017500000003163510324167706016144 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = Arenas DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = 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)$(arenadatadir)" arenadataDATA_INSTALL = $(INSTALL_DATA) DATA = $(arenadata_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ arenadatadir = $(RTB_DIR)/Arenas arenadata_DATA = \ Circle.arena Circles.arena Cross.arena Diamond.arena Flower.arena \ Forest.arena Labyrinth.arena Nippon.arena Pool.arena Rooms.arena \ Square.arena Star.arena Triangle.arena MrFriendly.arena my_Star2.arena \ my_Star.arena PPconquest.arena Maze.arena Propeller.arena EXTRA_DIST = $(arenadata_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Arenas/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Arenas/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-arenadataDATA: $(arenadata_DATA) @$(NORMAL_INSTALL) test -z "$(arenadatadir)" || $(mkdir_p) "$(DESTDIR)$(arenadatadir)" @list='$(arenadata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(arenadataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(arenadatadir)/$$f'"; \ $(arenadataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(arenadatadir)/$$f"; \ done uninstall-arenadataDATA: @$(NORMAL_UNINSTALL) @list='$(arenadata_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(arenadatadir)/$$f'"; \ rm -f "$(DESTDIR)$(arenadatadir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 $(DATA) installdirs: for dir in "$(DESTDIR)$(arenadatadir)"; 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-arenadataDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-arenadataDATA uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-arenadataDATA 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-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-arenadataDATA \ uninstall-info-am # 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: realtimebattle-1.0.8/Arenas/Circle.arena0000644000175000017500000000012010170545353016266 0ustar moimoiscale 1.0 boundary -10.0 -10.0 10.0 10.0 inner_circle 0.9 1.0 0.0 0.0 9.9 realtimebattle-1.0.8/Arenas/Circles.arena0000644000175000017500000000040410170545353016456 0ustar moimoiscale 0.595 boundary -25.0 -25.0 25.0 25.0 inner_circle 0.7 0.7 0.0 0.0 24.5 circle 1.0 0.5 -24.5 0.0 5.0 circle 1.0 0.5 24.5 0.0 5.0 circle 1.0 0.5 0.0 -24.5 5.0 circle 1.0 0.5 0.0 24.5 5.0 realtimebattle-1.0.8/Arenas/Cross.arena0000644000175000017500000000025710170545353016171 0ustar moimoiscale 0.5 boundary -25.0 -25.0 25.0 25.0 inner_circle 0.7 0.7 0.0 0.0 24.5 polygon 0.7 0.7 0.7 2 -8.0 -8.0 8.0 8.0 polygon 0.7 0.7 0.7 2 8.0 -8.0 -8.0 8.0realtimebattle-1.0.8/Arenas/Diamond.arena0000644000175000017500000000026710170545353016454 0ustar moimoiscale 0.5 boundary -20.0 -20.0 20.0 20.0 inner_circle 0.7 0.7 0.0 0.0 19.5 closed_polygon 0.7 0.7 1.0 4 5.0 0.0 0.0 5.0 -5.0 0.0 0.0 -5.0 exclusion_point 0.0 0.0 realtimebattle-1.0.8/Arenas/Flower.arena0000644000175000017500000000127310170545353016335 0ustar moimoiscale 1.8 angle_unit degrees boundary -11.4 -10.4 11.4 10.4 poly_curve 0.9 0.6 0.3 4.1 -4.1 1.0 0.0 A 300 3.0 T -120 L 3.0 T -120 A 300 3.0 T -120 L 3.0 T -120 A 300 3.0 T -120 L 3.0 T -120 A 300 3.0 T -120 L 3.0 T -120 A 300 3.0 T -120 L 3.0 T -120 A 300 3.0 C exclusion_point 5.4 -3.3 exclusion_point 5.4 3.3 exclusion_point -5.4 3.3 exclusion_point -5.4 -3.3 exclusion_point 0.0 6.3 exclusion_point 0.0 -6.3 exclusion_point 16.2 -9.9 exclusion_point 16.2 9.9 exclusion_point -16.2 9.9 exclusion_point -16.2 -9.9 exclusion_point 0.0 18.9 exclusion_point 0.0 -18.9 realtimebattle-1.0.8/Arenas/Forest.arena0000644000175000017500000000102610170545353016335 0ustar moimoiscale 5.0 boundary -4 -3 4 3 inner_circle 0.9 0.9 0 0 4.2 line 0.9 0.9 1.4 -4.0 3.6 4.0 3.6 line 0.9 0.9 0.4 4.1 3.0 4.1 -3.0 line 0.9 0.9 1.4 4.0 -3.6 -4.0 -3.6 line 0.9 0.9 0.4 -4.1 -3.0 -4.1 3.0 circle 0.9 0.9 2.0 1.5 0.4 circle 0.9 0.9 -2.7 1.9 0.3 circle 0.9 0.9 2.4 -2.1 0.35 circle 0.9 0.9 0.1 0.5 0.3 circle 0.9 0.9 1.0 -1.1 0.35 circle 0.9 0.9 -1.4 -1.7 0.37 circle 0.9 0.9 -0.2 2.3 0.25 circle 0.9 0.9 -2.0 0.1 0.28 circle 0.9 0.9 3.2 0.3 0.21 realtimebattle-1.0.8/Arenas/Labyrinth.arena0000644000175000017500000000076310170545353017036 0ustar moimoiscale 0.35 boundary -50.0 -30.0 50.0 30.0 line 1.0 0.5 2.0 -50.0 30.0 50.0 30.0 line 1.0 0.5 2.0 50.0 30.0 50.0 -30.0 line 1.0 0.5 2.0 50.0 -30.0 -50.0 -30.0 line 1.0 0.5 2.0 -50.0 -30.0 -50.0 30.0 polygon 0.7 0.7 2.0 2 -40.0 -20.0 -5.0 -20.0 polygon 0.7 0.7 2.0 3 -10.0 0.0 -40.0 0.0 -40.0 20.0 polygon 0.7 0.7 2.0 3 40.0 0.0 40.0 20.0 -5.0 20.0 polygon 0.7 0.7 2.0 3 40.0 -20.0 15.0 -20.0 15.0 0.0realtimebattle-1.0.8/Arenas/Nippon.arena0000644000175000017500000000043410170545353016340 0ustar moimoiscale 1.0 boundary -14.0 -14.0 14.0 14.0 circle 1.0 0.5 0.0 0.0 3.1415927 line 1.0 0.5 1.0 -14.0 14.0 14.0 14.0 line 1.0 0.5 1.0 14.0 14.0 14.0 -14.0 line 1.0 0.5 1.0 14.0 -14.0 -14.0 -14.0 line 1.0 0.5 1.0 -14.0 -14.0 -14.0 14.0 realtimebattle-1.0.8/Arenas/Pool.arena0000644000175000017500000000130710170545353016006 0ustar moimoiscale 5 angle_unit degrees boundary -2.7 -4.45 2.7 4.5 poly_curve 0.96 0.1 0.2 1.51 -4.1 1.0 0.0 A 45 0.4 A -180 0.3 A 45 0.4 L 3.1 A 90 0.15 A -180 0.3 A 90 0.15 L 3.1 A 45 0.4 A -180 0.3 A 45 0.4 L 3.1 A 45 0.4 A -180 0.3 A 45 0.4 L 3.1 A 90 0.15 A -180 0.3 A 90 0.15 L 3.1 A 45 0.4 A -180 0.3 A 45 0.4 C exclusion_point 0 10 exclusion_point 0 -10 exclusion_point 10 0 exclusion_point -10 0realtimebattle-1.0.8/Arenas/Rooms.arena0000644000175000017500000000075310170545353016200 0ustar moimoiscale 5.0 boundary -3 -3 3 3 line 0.9 0.9 0.2 -3.0 3.0 3.0 3.0 line 0.9 0.9 0.2 3.0 3.0 3.0 -3.0 line 0.9 0.9 0.2 3.0 -3.0 -3.0 -3.0 line 0.9 0.9 0.2 -3.0 -3.0 -3.0 3.0 polygon 0.9 0.9 0.1 2 -1 0 1 0 polygon 0.9 0.9 0.1 2 0 -1 0 1 polygon 0.9 0.9 0.1 2 0 -3 0 -2 polygon 0.9 0.9 0.1 2 0 3 0 2 polygon 0.9 0.9 0.1 2 3 0 2 0 polygon 0.9 0.9 0.1 2 -3 0 -2 0 realtimebattle-1.0.8/Arenas/Square.arena0000644000175000017500000000036210170545353016335 0ustar moimoiscale 1.0 boundary -10.0 -10.0 10.0 10.0 line 0.6 0.8 0.6 -10.0 10.0 10.0 10.0 line 0.6 0.8 0.6 10.0 10.0 10.0 -10.0 line 0.6 0.8 0.6 10.0 -10.0 -10.0 -10.0 line 0.6 0.8 0.6 -10.0 -10.0 -10.0 10.0 realtimebattle-1.0.8/Arenas/Star.arena0000644000175000017500000000053410170545353016007 0ustar moimoiscale 20.0 boundary -0.826 -0.971 1.02 0.971 closed_polygon 0.7 0.7 0.04 10 0.309 0.951 0.405 0.294 1 0 0.405 -0.294 0.309 -0.951 -0.155 -0.476 -0.809 -0.588 -0.5 0 -0.806 0.588 -0.155 0.476 exclusion_point 0.809 0.588 exclusion_point 0.809 -0.588 exclusion_point -0.309 -0.951 exclusion_point -1 0 exclusion_point -0.309 0.951realtimebattle-1.0.8/Arenas/Triangle.arena0000644000175000017500000000025510170545353016643 0ustar moimoiscale 16.0 boundary -1.0 -1.0 1.0 0.73205 closed_polygon 0.7 0.7 0.06 3 -1.0 0.73205 0.0 -1.0 1.0 0.73205 exclusion_point -1.0 -1.0 exclusion_point 1.0 -1.0 realtimebattle-1.0.8/Arenas/MrFriendly.arena0000644000175000017500000000026710170545353017154 0ustar moimoiscale 4.0 boundary -7 -7 7 7 inner_circle 0.9 0.9 0 0 5.8 circle 0.9 0.9 -2.0 2.30 0.7 circle 0.9 0.9 2.00 2.30 0.7 polygon 3.0 3.0 0.1 2 -2.5 -2.5 2.5 -2.5 realtimebattle-1.0.8/Arenas/my_Star2.arena0000644000175000017500000000053410170545353016576 0ustar moimoiscale 8.0 boundary -0.826 -0.971 1.02 0.971 closed_polygon 0.7 0.7 0.04 10 0.309 0.951 0.405 0.294 1 0 0.405 -0.294 0.309 -0.951 -0.155 -0.476 -0.809 -0.588 -0.5 0 -0.806 0.588 -0.155 0.476 exclusion_point 0.809 0.588 exclusion_point 0.809 -0.588 exclusion_point -0.309 -0.951 exclusion_point -1 0 exclusion_point -0.309 0.951 realtimebattle-1.0.8/Arenas/my_Star.arena0000644000175000017500000000053510170545353016515 0ustar moimoiscale 15.0 boundary -0.826 -0.971 1.02 0.971 closed_polygon 0.7 0.7 0.04 10 0.309 0.951 0.405 0.294 1 0 0.405 -0.294 0.309 -0.951 -0.155 -0.476 -0.809 -0.588 -0.5 0 -0.806 0.588 -0.155 0.476 exclusion_point 0.809 0.588 exclusion_point 0.809 -0.588 exclusion_point -0.309 -0.951 exclusion_point -1 0 exclusion_point -0.309 0.951 realtimebattle-1.0.8/Arenas/PPconquest.arena0000644000175000017500000000274310170545353017203 0ustar moimoiscale 5.0 boundary -8 -8 8 8 inner_circle 0.9 0.9 0 0 7.9 circle 0.9 0.9 0.00 8.00 0.6 circle 0.9 0.9 0.00 -8.0 0.6 circle 0.9 0.9 -8.0 0.00 0.6 circle 0.9 0.9 8.00 0.00 0.6 circle 0.9 0.9 5.60 5.60 0.6 circle 0.9 0.9 -5.6 -5.6 0.6 circle 0.9 0.9 5.60 -5.6 0.6 circle 0.9 0.9 -5.6 5.60 0.6 polygon 3.0 3.0 0.1 2 -2.0 0 2.0 0 polygon 3.0 3.0 0.1 2 0 -2.0 0 2.0 circle 1.0 1.0 2.0 2.0 0.4 circle 1.0 1.0 -2.0 2.0 0.4 circle 1.0 1.0 -2.0 -2.0 0.4 circle 1.0 1.0 2.0 -2.0 0.4 polygon 0.8 0.8 0.1 2 0 6.5 -2.5 4.5 polygon 0.8 0.8 0.1 2 0 6.5 2.5 4.5 circle 0.8 0.8 0 6.5 0.5 circle 0.8 0.8 -2.4 4.5 0.3 circle 0.8 0.8 2.5 4.5 0.3 polygon 0.8 0.8 0.1 2 -0.5 4.5 0.5 4.5 polygon 0.8 0.8 0.1 2 -1 5.0 1 5.0 polygon 0.8 0.8 0.1 2 -2 -5.0 2 -5.0 polygon 0.8 0.8 0.1 2 -2 -4.0 -2 -6.0 polygon 0.8 0.8 0.1 2 2 -4.0 2 -6.0 circle 0.8 0.8 -6.0 0.3 0.4 circle 0.8 0.8 -4.0 1.0 0.3 circle 0.8 0.8 -4.8 2 0.4 circle 0.8 0.8 -6.2 -2.2 0.2 circle 0.8 0.8 -3.8 -2.4 0.5 circle 0.8 0.8 -4.7 -1.6 0.4 circle 0.8 0.8 -3.3 -1.2 0.25 circle 0.8 0.8 -4.2 0.0 0.2 circle 0.8 0.8 4.7 0.750 0.69 circle 0.8 0.8 4.7 -0.75 0.69 circle 0.8 0.8 4.0 0.000 0.69 circle 0.8 0.8 5.4 0.000 0.69 polygon 0.8 0.8 0.1 2 3.2 -1.5 6.2 1.5 polygon 0.8 0.8 0.1 2 6.2 -1.5 3.2 1.5 realtimebattle-1.0.8/Arenas/Maze.arena0000644000175000017500000000113610170545353015771 0ustar moimoiscale 0.35 boundary -50.0 -50.0 50.0 50.0 line 1.0 0.5 2.0 -50.0 50.0 50.0 50.0 line 1.0 0.5 2.0 50.0 50.0 50.0 -50.0 line 1.0 0.5 2.0 50.0 -50.0 -50.0 -50.0 line 1.0 0.5 2.0 -50.0 -50.0 -50.0 50.0 polygon 0.7 0.7 2.0 4 -5.0 -20.0 -20.0 -20.0 -20.0 20.0 -5.0 20.0 polygon 0.7 0.7 2.0 4 5.0 -20.0 20.0 -20.0 20.0 20.0 5.0 20.0 polygon 0.7 0.7 2.0 2 -10.0 -27.0 10.0 -27.0 polygon 0.7 0.7 2.0 2 -10.0 27.0 10.0 27.0 polygon 0.7 0.7 2.0 4 -35 -5 -35 -35 35 -35 35 -5.0 polygon 0.7 0.7 2.0 4 -35 5 -35 35 35 35 35 5.0 realtimebattle-1.0.8/Arenas/Propeller.arena0000644000175000017500000000102610170545353017037 0ustar moimoiscale 3 angle_unit degrees boundary -7.0 -10.0 7.0 3.0 poly_curve 0.5 0.3 0.2 -1.0 -10.0 1.0 0.0 L 2.0 A -105 2.0 L 2.0 A 90 1.5 L 2.0 A -105 2.0 L 2.0 A -105 2.0 L 2.0 A 90 1.5 L 2.0 A -105 2.0 L 2.0 A -105 2.0 L 2.0 A 90 1.5 L 2.0 A -105 2.0 C exclusion_point 10 10 exclusion_point 10 -10 exclusion_point -10 10 exclusion_point -10 -10 realtimebattle-1.0.8/team-framework/0002755000175000017500000000000010404234035015566 5ustar moimoirealtimebattle-1.0.8/team-framework/buildinternal/0002755000175000017500000000000010324172250020423 5ustar moimoirealtimebattle-1.0.8/team-framework/buildinternal/acinclude.m40000644000175000017500000017114610227233217022627 0ustar moimoidnl @synopsis AC_CXX_BOOL dnl dnl If the compiler recognizes bool as a separate built-in type, dnl define HAVE_BOOL. Note that a typedef is not a separate dnl type since you cannot overload a function such that it accepts either dnl the basic type or the typedef. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_BOOL], [AC_CACHE_CHECK(whether the compiler recognizes bool as a built-in type, ac_cv_cxx_bool, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ int f(int x){return 1;} int f(char x){return 1;} int f(bool x){return 1;} ],[bool b = true; return f(b);], ac_cv_cxx_bool=yes, ac_cv_cxx_bool=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_bool" = yes; then AC_DEFINE(HAVE_BOOL,,[define if bool is a built-in type]) fi ]) dnl @synopsis AC_CXX_COMPLEX_MATH_IN_NAMESPACE_STD dnl dnl If the C math functions are in the cmath header file and std:: namespace, dnl define HAVE_MATH_FN_IN_NAMESPACE_STD. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_COMPLEX_MATH_IN_NAMESPACE_STD], [AC_CACHE_CHECK(whether complex math functions are in std::, ac_cv_cxx_complex_math_in_namespace_std, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include namespace S { using namespace std; complex pow(complex x, complex y) { return std::pow(x,y); } }; ],[using namespace S; complex x = 1.0, y = 1.0; S::pow(x,y); return 0;], ac_cv_cxx_complex_math_in_namespace_std=yes, ac_cv_cxx_complex_math_in_namespace_std=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_complex_math_in_namespace_std" = yes; then AC_DEFINE(HAVE_COMPLEX_MATH_IN_NAMESPACE_STD,, [define if complex math functions are in std::]) fi ]) dnl @synopsis AC_CXX_CONST_CAST dnl dnl If the compiler supports const_cast<>, define HAVE_CONST_CAST. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_CONST_CAST], [AC_CACHE_CHECK(whether the compiler supports const_cast<>, ac_cv_cxx_const_cast, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE(,[int x = 0;const int& y = x;int& z = const_cast(y);return z;], ac_cv_cxx_const_cast=yes, ac_cv_cxx_const_cast=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_const_cast" = yes; then AC_DEFINE(HAVE_CONST_CAST,,[define if the compiler supports const_cast<>]) fi ]) dnl @synopsis AC_CXX_DEFAULT_TEMPLATE_PARAMETERS dnl dnl If the compiler supports default template parameters, dnl define HAVE_DEFAULT_TEMPLATE_PARAMETERS. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_DEFAULT_TEMPLATE_PARAMETERS], [AC_CACHE_CHECK(whether the compiler supports default template parameters, ac_cv_cxx_default_template_parameters, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ template class A {public: int f() {return 0;}}; ],[A a; return a.f();], ac_cv_cxx_default_template_parameters=yes, ac_cv_cxx_default_template_parameters=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_default_template_parameters" = yes; then AC_DEFINE(HAVE_DEFAULT_TEMPLATE_PARAMETERS,, [define if the compiler supports default template parameters]) fi ]) dnl @synopsis AC_CXX_DTOR_AFTER_ATEXIT dnl dnl If the C++ compiler calls global destructors after atexit functions, dnl define HAVE_DTOR_AFTER_ATEXIT. dnl WARNING: If cross-compiling, the test cannot be performed, the dnl default action is to define HAVE_DTOR_AFTER_ATEXIT. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_DTOR_AFTER_ATEXIT], [AC_CACHE_CHECK(whether the compiler calls global destructors after functions registered through atexit, ac_cv_cxx_dtor_after_atexit, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_RUN([ #include #include static int dtor_called = 0; class A { public : ~A () { dtor_called = 1; } }; static A a; void f() { _exit(dtor_called); } int main (int , char **) { atexit (f); return 0; } ], ac_cv_cxx_dtor_after_atexit=yes, ac_cv_cxx_dtor_after_atexit=yes=no, ac_cv_cxx_dtor_after_atexit=yes) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_dtor_after_atexit" = yes; then AC_DEFINE(HAVE_DTOR_AFTER_ATEXIT,, [define if the compiler calls global destructors after functions registered through atexit]) fi ]) dnl @synopsis AC_CXX_DYNAMIC_CAST dnl dnl If the compiler supports dynamic_cast<>, define HAVE_DYNAMIC_CAST. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_DYNAMIC_CAST], [AC_CACHE_CHECK(whether the compiler supports dynamic_cast<>, ac_cv_cxx_dynamic_cast, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include class Base { public : Base () {} virtual void f () = 0;}; class Derived : public Base { public : Derived () {} virtual void f () {} };],[ Derived d; Base& b=d; return dynamic_cast(&b) ? 0 : 1;], ac_cv_cxx_dynamic_cast=yes, ac_cv_cxx_dynamic_cast=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_dynamic_cast" = yes; then AC_DEFINE(HAVE_DYNAMIC_CAST,,[define if the compiler supports dynamic_cast<>]) fi ]) dnl @synopsis AC_CXX_ENUM_COMPUTATIONS dnl dnl If the compiler handle computations inside an enum, define dnl HAVE_ENUM_COMPUTATIONS. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_ENUM_COMPUTATIONS], [AC_CACHE_CHECK(whether the compiler handle computations inside an enum, ac_cv_cxx_enum_computations, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ struct A { enum { a = 5, b = 7, c = 2 }; }; struct B { enum { a = 1, b = 6, c = 9 }; }; template struct Z { enum { a = (T1::a > T2::a) ? T1::a : T2::b, b = T1::b + T2::b, c = (T1::c * T2::c + T2::a + T1::a) }; };],[ return (((int)Z::a == 5) && ((int)Z::b == 13) && ((int)Z::c == 24)) ? 0 : 1;], ac_cv_cxx_enum_computations=yes, ac_cv_cxx_enum_computations=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_enum_computations" = yes; then AC_DEFINE(HAVE_ENUM_COMPUTATIONS,, [define if the compiler handle computations inside an enum]) fi ]) dnl @synopsis AC_CXX_ENUM_COMPUTATIONS_WITH_CAST dnl dnl If the compiler handle (int) casts in enum computations, define dnl HAVE_ENUM_COMPUTATIONS_WITH_CAST. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_ENUM_COMPUTATIONS_WITH_CAST], [AC_CACHE_CHECK(whether the compiler handles (int) casts in enum computations, ac_cv_cxx_enum_computations_with_cast, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ struct A { enum { a = 5, b = 7, c = 2 }; }; struct B { enum { a = 1, b = 6, c = 9 }; }; template struct Z { enum { a = ((int)T1::a > (int)T2::a) ? (int)T1::a : (int)T2::b, b = (int)T1::b + (int)T2::b, c = ((int)T1::c * (int)T2::c + (int)T2::a + (int)T1::a) }; };],[ return (((int)Z::a == 5) && ((int)Z::b == 13) && ((int)Z::c == 24)) ? 0 : 1;], ac_cv_cxx_enum_computations_with_cast=yes, ac_cv_cxx_enum_computations_with_cast=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_enum_computations_with_cast" = yes; then AC_DEFINE(HAVE_ENUM_COMPUTATIONS_WITH_CAST,, [define if the compiler handles (int) casts in enum computations]) fi ]) dnl @synopsis AC_CXX_EXCEPTIONS dnl dnl If the C++ compiler supports exceptions handling (try, dnl throw and catch), define HAVE_EXCEPTIONS. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_EXCEPTIONS], [AC_CACHE_CHECK(whether the compiler supports exceptions, ac_cv_cxx_exceptions, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE(,[try { throw 1; } catch (int i) { return i; }], ac_cv_cxx_exceptions=yes, ac_cv_cxx_exceptions=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_exceptions" = yes; then AC_DEFINE(HAVE_EXCEPTIONS,,[define if the compiler supports exceptions]) fi ]) dnl @synopsis AC_CXX_EXPLICIT_INSTANTIATIONS dnl dnl If the C++ compiler supports explicit instanciations syntax, dnl define HAVE_INSTANTIATIONS. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_EXPLICIT_INSTANTIATIONS], [AC_CACHE_CHECK(whether the compiler supports explicit instantiations, ac_cv_cxx_explinst, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([template class A { T t; }; template class A;], [], ac_cv_cxx_explinst=yes, ac_cv_cxx_explinst=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_explinst" = yes; then AC_DEFINE(HAVE_INSTANTIATIONS,, [define if the compiler supports explicit instantiations]) fi ]) dnl @synopsis AC_CXX_EXPLICIT dnl dnl If the compiler can be asked to prevent using implicitly one argument dnl constructors as converting constructors with the explicit dnl keyword, define HAVE_EXPLICIT. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_EXPLICIT], [AC_CACHE_CHECK(whether the compiler supports the explicit keyword, ac_cv_cxx_explicit, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([class A{public:explicit A(double){}};], [double c = 5.0;A x(c);return 0;], ac_cv_cxx_explicit=yes, ac_cv_cxx_explicit=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_explicit" = yes; then AC_DEFINE(HAVE_EXPLICIT,,[define if the compiler supports the explicit keyword]) fi ]) dnl @synopsis AC_CXX_EXPLICIT_TEMPLATE_FUNCTION_QUALIFICATION dnl dnl If the compiler supports explicit template function qualification, dnl define HAVE_EXPLICIT_TEMPLATE_FUNCTION_QUALIFICATION. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_EXPLICIT_TEMPLATE_FUNCTION_QUALIFICATION], [AC_CACHE_CHECK(whether the compiler supports explicit template function qualification, ac_cv_cxx_explicit_template_function_qualification, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ template class A { public : A() {} }; template A to (const A&) { return A(); } ],[A x; A y = to(x); return 0;], ac_cv_cxx_explicit_template_function_qualification=yes, ac_cv_cxx_explicit_template_function_qualification=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_explicit_template_function_qualification" = yes; then AC_DEFINE(HAVE_EXPLICIT_TEMPLATE_FUNCTION_QUALIFICATION,, [define if the compiler supports explicit template function qualification]) fi ]) dnl @synopsis AC_CXX_FULL_SPECIALIZATION_SYNTAX dnl dnl If the compiler recognizes the full specialization syntax, define dnl HAVE_FULL_SPECIALIZATION_SYNTAX. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_FULL_SPECIALIZATION_SYNTAX], [AC_CACHE_CHECK(whether the compiler recognizes the full specialization syntax, ac_cv_cxx_full_specialization_syntax, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ template class A { public : int f () const { return 1; } }; template<> class A { public: int f () const { return 0; } };],[ A a; return a.f();], ac_cv_cxx_full_specialization_syntax=yes, ac_cv_cxx_full_specialization_syntax=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_full_specialization_syntax" = yes; then AC_DEFINE(HAVE_FULL_SPECIALIZATION_SYNTAX,, [define if the compiler recognizes the full specialization syntax]) fi ]) dnl @synopsis AC_CXX_FUNCTION_NONTYPE_PARAMETERS dnl dnl If the compiler supports function templates with non-type parameters, dnl define HAVE_FUNCTION_NONTYPE_PARAMETERS. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_FUNCTION_NONTYPE_PARAMETERS], [AC_CACHE_CHECK(whether the compiler supports function templates with non-type parameters, ac_cv_cxx_function_nontype_parameters, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ template class A {}; template int f(const A& x) { return 0; } ],[A z; return f(z);], ac_cv_cxx_function_nontype_parameters=yes, ac_cv_cxx_function_nontype_parameters=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_function_nontype_parameters" = yes; then AC_DEFINE(HAVE_FUNCTION_NONTYPE_PARAMETERS,, [define if the compiler supports function templates with non-type parameters]) fi ]) dnl @synopsis AC_CXX_HAVE_COMPLEX dnl dnl If the compiler has complex, define HAVE_COMPLEX. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_HAVE_COMPLEX], [AC_CACHE_CHECK(whether the compiler has complex, ac_cv_cxx_have_complex, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace std; #endif],[complex a; complex b; return 0;], ac_cv_cxx_have_complex=yes, ac_cv_cxx_have_complex=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_complex" = yes; then AC_DEFINE(HAVE_COMPLEX,,[define if the compiler has complex]) fi ]) dnl @synopsis AC_CXX_HAVE_COMPLEX_MATH1 dnl dnl If the compiler has the complex math functions cos, cosh, exp, log, dnl pow, sin, sinh, sqrt, tan and tanh, define HAVE_COMPLEX_MATH1. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_HAVE_COMPLEX_MATH1], [AC_CACHE_CHECK(whether the compiler has complex math functions, ac_cv_cxx_have_complex_math1, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS ac_save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_TRY_LINK([#include #ifdef HAVE_NAMESPACES using namespace std; #endif],[complex x(1.0, 1.0), y(1.0, 1.0); cos(x); cosh(x); exp(x); log(x); pow(x,1); pow(x,double(2.0)); pow(x, y); pow(double(2.0), x); sin(x); sinh(x); sqrt(x); tan(x); tanh(x); return 0;], ac_cv_cxx_have_complex_math1=yes, ac_cv_cxx_have_complex_math1=no) LIBS="$ac_save_LIBS" AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_complex_math1" = yes; then AC_DEFINE(HAVE_COMPLEX_MATH1,,[define if the compiler has complex math functions]) fi ]) dnl @synopsis AC_CXX_HAVE_COMPLEX_MATH2 dnl dnl If the compiler has the complex math functions acos, asin, dnl atan, atan2 and log10, define HAVE_COMPLEX_MATH2. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_HAVE_COMPLEX_MATH2], [AC_CACHE_CHECK(whether the compiler has more complex math functions, ac_cv_cxx_have_complex_math2, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS ac_save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_TRY_LINK([#include #ifdef HAVE_NAMESPACES using namespace std; #endif],[complex x(1.0, 1.0), y(1.0, 1.0); acos(x); asin(x); atan(x); atan2(x,y); atan2(x, double(3.0)); atan2(double(3.0), x); log10(x); return 0;], ac_cv_cxx_have_complex_math2=yes, ac_cv_cxx_have_complex_math2=no) LIBS="$ac_save_LIBS" AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_complex_math2" = yes; then AC_DEFINE(HAVE_COMPLEX_MATH2,,[define if the compiler has more complex math functions]) fi ]) dnl dnl @synopsis AC_CXX_HAVE_EMPTY_IOSTREAM dnl dnl Check if the compiler allow the empty iostream constructor. Ok dnl before gcc3, not after. dnl dnl @author Alain BARBET dnl @version $1.0 09/04/2002$ dnl AC_DEFUN([AC_CXX_HAVE_EMPTY_IOSTREAM], [AC_CACHE_CHECK(whether the compiler allow empty iostream, ac_cv_cxx_have_empty_iostream, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace std; #endif],[iostream iostr; return 0;], ac_cv_cxx_have_empty_iostream=yes, ac_cv_cxx_have_empty_iostream=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_empty_iostream" = yes; then AC_DEFINE(HAVE_EMPTY_IOSTREAM,,[define if the compiler allow empty iostream]) fi ]) dnl @synopsis AC_CXX_HAVE_EXT_HASH_MAP dnl dnl Check if the compiler has ext/hash_map dnl Eg: dnl dnl #if defined(HAVE_EXT_HASH_MAP) dnl #include dnl #else dnl #if defined(HAVE_STL) dnl #include dnl #else dnl # Can't find hash_map header ! dnl #endif dnl #endif dnl dnl This file is Alain BARBET's AC_CXX_HAVE_EXT_HASH_SET 1.1 dnl with s/set/map/g :) dnl dnl @author Perceval ANICHINI dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl AC_DEFUN([AC_CXX_HAVE_EXT_HASH_MAP], [AC_CACHE_CHECK(whether the compiler has ext/hash_map, ac_cv_cxx_have_ext_hash_map, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace std; #endif],[hash_map t; return 0;], ac_cv_cxx_have_ext_hash_map=yes, ac_cv_cxx_have_ext_hash_map=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_ext_hash_map" = yes; then AC_DEFINE(HAVE_EXT_HASH_MAP,,[define if the compiler has ext/hash_map]) fi ]) dnl dnl @synopsis AC_CXX_HAVE_EXT_HASH_SET dnl dnl Check if the compiler has ext/hash_set dnl Eg: dnl dnl #if defined(HAVE_EXT_HASH_SET) dnl #include dnl #else dnl #if defined(HAVE_STL) dnl #include dnl #else dnl # Can't find hash_set header ! dnl #endif dnl #endif dnl dnl @author Alain BARBET dnl @version $1.1 09/04/2002$ dnl AC_DEFUN([AC_CXX_HAVE_EXT_HASH_SET], [AC_CACHE_CHECK(whether the compiler has ext/hash_set, ac_cv_cxx_have_ext_hash_set, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace std; #endif],[hash_set t; return 0;], ac_cv_cxx_have_ext_hash_set=yes, ac_cv_cxx_have_ext_hash_set=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_ext_hash_set" = yes; then AC_DEFINE(HAVE_EXT_HASH_SET,,[define if the compiler has ext/hash_set]) fi ]) dnl dnl @synopsis AC_CXX_HAVE_EXT_SLIST dnl dnl Check if the compiler has ext/slist. dnl Eg: dnl dnl #if defined(HAVE_EXT_SLIST) dnl #include dnl #else dnl #if defined(HAVE_STL) dnl #include dnl #else dnl # Can't find slist header ! dnl #endif dnl #endif dnl dnl @author Alain BARBET dnl @version $1.1 09/04/2002$ dnl AC_DEFUN([AC_CXX_HAVE_EXT_SLIST], [AC_CACHE_CHECK(whether the compiler has ext/slist, ac_cv_cxx_have_ext_slist, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace std; #endif],[slist s; return 0;], ac_cv_cxx_have_ext_slist=yes, ac_cv_cxx_have_ext_slist=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_ext_slist" = yes; then AC_DEFINE(HAVE_EXT_SLIST,,[define if the compiler has ext/slist]) fi ]) dnl dnl @synopsis AC_CXX_HAVE_FREEZE_SSTREAM dnl dnl Check if the compiler has (need) freeze method call in stringstream/ dnl strstream. Seems that Win32 and STLPort have it, libstdc++ not ... dnl dnl Eg: dnl dnl #include dnl #ifdef HAVE_NAMESPACES dnl using namespace std; dnl #endif dnl #ifdef HAVE_SSTREAM dnl stringstream message; dnl #else dnl strstream message; dnl #endif dnl message << "Hello"; dnl #ifdef HAVE_FREEZE_SSTREAM dnl message.freeze(0); dnl #endif dnl dnl dnl @author Alain BARBET dnl @version $2.0 09/04/2002$ dnl AC_DEFUN([AC_CXX_HAVE_FREEZE_SSTREAM], [AC_CACHE_CHECK(whether the compiler has freeze in stringstream, ac_cv_cxx_have_freeze_sstream, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_REQUIRE([AC_CXX_HAVE_SSTREAM]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace std; #endif], [#ifdef HAVE_SSTREAM stringstream message; #else strstream message; #endif message << "Hello"; message.freeze(0); return 0;], ac_cv_cxx_have_freeze_sstream=yes, ac_cv_cxx_have_freeze_sstream=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_freeze_sstream" = yes; then AC_DEFINE(HAVE_FREEZE_SSTREAM,,[define if the compiler has freeze in stringstream]) fi ]) dnl @synopsis AC_CXX_HAVE_IEEE_MATH dnl dnl If the compiler has the double math functions acosh, dnl asinh, atanh, expm1, erf, erfc, isnan, j0, j1, lgamma, logb, dnl log1p, rint, y0 and y1, define HAVE_IEEE_MATH. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_HAVE_IEEE_MATH], [AC_CACHE_CHECK(whether the compiler supports IEEE math library, ac_cv_cxx_have_ieee_math, [AC_LANG_SAVE AC_LANG_CPLUSPLUS ac_save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_TRY_LINK([ #ifndef _ALL_SOURCE #define _ALL_SOURCE #endif #ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE #endif #ifndef _XOPEN_SOURCE_EXTENDED #define _XOPEN_SOURCE_EXTENDED 1 #endif #include ],[double x = 1.0; double y = 1.0; acosh(x); asinh(x); atanh(x); expm1(x); erf(x); erfc(x); isnan(x); j0(x); j1(x); lgamma(x); logb(x); log1p(x); rint(x); y0(x); y1(x); return 0;], ac_cv_cxx_have_ieee_math=yes, ac_cv_cxx_have_ieee_math=no) LIBS="$ac_save_LIBS" AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_ieee_math" = yes; then AC_DEFINE(HAVE_IEEE_MATH,,[define if the compiler supports IEEE math library]) fi ]) dnl dnl @synopsis AC_CXX_HAVE_LONG_LONG_FOR_IOSTREAM dnl dnl Check if the compiler allow long long for [i|o]stream dnl Seems that OpenBSD / gcc-3 don't have it. dnl dnl Eg: dnl dnl #include dnl #ifdef HAVE_SSTREAM dnl #include dnl #else dnl #include dnl #endif dnl #ifdef HAVE_NAMESPACES dnl using namespace std; dnl #endif dnl ostream str((streambuf *)0); dnl long long lo=1; dnl str << dnl #ifdef HAVE_LONG_LONG_FOR_IOSTREAM dnl (long int) dnl #endif dnl lo; dnl dnl @author Alain BARBET dnl @version $2.0 09/04/2002$ dnl AC_DEFUN([AC_CXX_HAVE_LONG_LONG_FOR_IOSTREAM], [AC_CACHE_CHECK(whether the compiler allow long long for [i|o]stream, ac_cv_cxx_have_ll_for_iostream, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_REQUIRE([AC_CXX_HAVE_SSTREAM]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #ifdef HAVE_SSTREAM #include #else #include #endif #ifdef HAVE_NAMESPACES using namespace std; #endif],[ ostream str((streambuf *)0); long long l=1; str << l; return 0;], ac_cv_cxx_have_ll_for_iostream=yes, ac_cv_cxx_have_ll_for_iostream=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_ll_for_iostream" = yes; then AC_DEFINE(HAVE_LONG_LONG_FOR_IOSTREAM,,[define if the compiler allow long long for [i|o]stream]) fi ]) dnl @synopsis AC_CXX_HAVE_NUMERIC_LIMITS dnl dnl If the compiler has numeric_limits, define HAVE_NUMERIC_LIMITS. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_HAVE_NUMERIC_LIMITS], [AC_CACHE_CHECK(whether the compiler has numeric_limits, ac_cv_cxx_have_numeric_limits, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace std; #endif],[double e = numeric_limits::epsilon(); return 0;], ac_cv_cxx_have_numeric_limits=yes, ac_cv_cxx_have_numeric_limits=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_numeric_limits" = yes; then AC_DEFINE(HAVE_NUMERIC_LIMITS,,[define if the compiler has numeric_limits]) fi ]) dnl @synopsis AC_CXX_HAVE_SSTREAM dnl dnl If the C++ library has a working stringstream, define HAVE_SSTREAM. dnl dnl @author Ben Stanley dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl AC_DEFUN([AC_CXX_HAVE_SSTREAM], [AC_CACHE_CHECK(whether the compiler has stringstream, ac_cv_cxx_have_sstream, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace std; #endif],[stringstream message; message << "Hello"; return 0;], ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_sstream" = yes; then AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream]) fi ]) dnl @synopsis AC_CXX_HAVE_STD dnl dnl If the compiler supports ISO C++ standard library (i.e., can include the dnl files iostream, map, iomanip and cmath}), define HAVE_STD. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_HAVE_STD], [AC_CACHE_CHECK(whether the compiler supports ISO C++ standard library, ac_cv_cxx_have_std, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #include #include #include #ifdef HAVE_NAMESPACES using namespace std; #endif],[return 0;], ac_cv_cxx_have_std=yes, ac_cv_cxx_have_std=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_std" = yes; then AC_DEFINE(HAVE_STD,,[define if the compiler supports ISO C++ standard library]) fi ]) dnl @synopsis AC_CXX_HAVE_STL dnl dnl If the compiler supports the Standard Template Library, define HAVE_STL. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_HAVE_STL], [AC_CACHE_CHECK(whether the compiler supports Standard Template Library, ac_cv_cxx_have_stl, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #include #ifdef HAVE_NAMESPACES using namespace std; #endif],[list x; x.push_back(5); list::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;], ac_cv_cxx_have_stl=yes, ac_cv_cxx_have_stl=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_stl" = yes; then AC_DEFINE(HAVE_STL,,[define if the compiler supports Standard Template Library]) fi ]) dnl @synopsis AC_CXX_HAVE_STRING_PUSH_BACK dnl dnl If the implementation of the C++ library provides the method dnl std::string::push_back (char), define HAVE_STRING_PUSH_BACK. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Jan Langer dnl AC_DEFUN([AC_CXX_HAVE_STRING_PUSH_BACK], [AC_CACHE_CHECK(whether the compiler has std::string::push_back (char), ac_cv_cxx_have_string_push_back, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace std; #endif],[string message; message.push_back ('a'); return 0;], ac_cv_cxx_have_string_push_back=yes, ac_cv_cxx_have_string_push_back=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_string_push_back" = yes; then AC_DEFINE(HAVE_STRING_PUSH_BACK,,[define if the compiler has the method std::string::push_back (char)]) fi ])dnl dnl @synopsis AC_CXX_HAVE_SYSTEM_V_MATH dnl dnl If the compiler has the double math functions _class, dnl ilogb, itrunc, nearest, rsqrt, uitrunc, copysign, drem, fmod, hypot, dnl nextafter, remainder, scalb and unordered, define HAVE_SYSTEM_V_MATH. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_HAVE_SYSTEM_V_MATH], [AC_CACHE_CHECK(whether the compiler supports System V math library, ac_cv_cxx_have_system_v_math, [AC_LANG_SAVE AC_LANG_CPLUSPLUS ac_save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_TRY_LINK([ #ifndef _ALL_SOURCE #define _ALL_SOURCE #endif #ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE #endif #ifndef _XOPEN_SOURCE_EXTENDED #define _XOPEN_SOURCE_EXTENDED 1 #endif #include ],[double x = 1.0; double y = 1.0; _class(x); ilogb(x); itrunc(x); nearest(x); rsqrt(x); uitrunc(x); copysign(x,y); drem(x,y); fmod(x,y); hypot(x,y); nextafter(x,y); remainder(x,y); scalb(x,y); unordered(x,y); return 0;], ac_cv_cxx_have_system_v_math=yes, ac_cv_cxx_have_system_v_math=no) LIBS="$ac_save_LIBS" AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_system_v_math" = yes; then AC_DEFINE(HAVE_SYSTEM_V_MATH,,[define if the compiler supports System V math library]) fi ]) dnl @synopsis AC_CXX_HAVE_VALARRAY dnl dnl If the compiler has valarray, define HAVE_VALARRAY. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_HAVE_VALARRAY], [AC_CACHE_CHECK(whether the compiler has valarray, ac_cv_cxx_have_valarray, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace std; #endif],[valarray x(100); return 0;], ac_cv_cxx_have_valarray=yes, ac_cv_cxx_have_valarray=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_valarray" = yes; then AC_DEFINE(HAVE_VALARRAY,,[define if the compiler has valarray]) fi ]) dnl @synopsis AC_CXX_HAVE_VECTOR_AT dnl dnl If the implementation of the C++ library provides the method dnl std::vector::at(std::size_t), define HAVE_VECTOR_AT. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Jan Langer dnl AC_DEFUN([AC_CXX_HAVE_VECTOR_AT], [AC_CACHE_CHECK(whether the compiler has std::vector::at (std::size_t), ac_cv_cxx_have_vector_at, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace std; #endif],[vector v (1); message.at (0); return 0;], ac_cv_cxx_have_vector_at=yes, ac_cv_cxx_have_vector_at=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_vector_at" = yes; then AC_DEFINE(HAVE_VECTOR_AT,,[define if the compiler has the method std::vector::at (std::size_t)]) fi ])dnl dnl @synopsis AC_CXX_MEMBER_CONSTANTS dnl dnl If the compiler supports member constants, define HAVE_MEMBER_CONSTANTS. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_MEMBER_CONSTANTS], [AC_CACHE_CHECK(whether the compiler supports member constants, ac_cv_cxx_member_constants, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([class C {public: static const int i = 0;}; const int C::i;], [return C::i;], ac_cv_cxx_member_constants=yes, ac_cv_cxx_member_constants=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_member_constants" = yes; then AC_DEFINE(HAVE_MEMBER_CONSTANTS,,[define if the compiler supports member constants]) fi ]) dnl @synopsis AC_CXX_MEMBER_TEMPLATES dnl dnl If the compiler supports member templates, define HAVE_MEMBER_TEMPLATES. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_MEMBER_TEMPLATES], [AC_CACHE_CHECK(whether the compiler supports member templates, ac_cv_cxx_member_templates, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ template class A { public: template A operator=(const A& z) { return A(); } };],[A x; A y; x = y; return 0;], ac_cv_cxx_member_templates=yes, ac_cv_cxx_member_templates=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_member_templates" = yes; then AC_DEFINE(HAVE_MEMBER_TEMPLATES,,[define if the compiler supports member templates]) fi ]) dnl @synopsis AC_CXX_MEMBER_TEMPLATES_OUTSIDE_CLASS dnl dnl If the compiler supports member templates outside the class declaration, dnl define HAVE_MEMBER_TEMPLATES_OUTSIDE_CLASS. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_MEMBER_TEMPLATES_OUTSIDE_CLASS], [AC_CACHE_CHECK(whether the compiler supports member templates outside the class declaration, ac_cv_cxx_member_templates_outside_class, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ template class A { public : template A operator=(const A& z); }; template template A A::operator=(const A& z){ return A(); }],[ A x; A y; x = y; return 0;], ac_cv_cxx_member_templates_outside_class=yes, ac_cv_cxx_member_templates_outside_class=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_member_templates_outside_class" = yes; then AC_DEFINE(HAVE_MEMBER_TEMPLATES_OUTSIDE_CLASS,, [define if the compiler supports member templates outside the class declaration]) fi ]) dnl @synopsis AC_CXX_MUTABLE dnl dnl If the compiler allows modifying class data members flagged with dnl the mutable keyword even in const objects (for example in the dnl body of a const member function), define HAVE_MUTABLE. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_MUTABLE], [AC_CACHE_CHECK(whether the compiler supports the mutable keyword, ac_cv_cxx_mutable, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ class A { mutable int i; public: int f (int n) const { i = n; return i; } }; ],[A a; return a.f (1);], ac_cv_cxx_mutable=yes, ac_cv_cxx_mutable=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_mutable" = yes; then AC_DEFINE(HAVE_MUTABLE,,[define if the compiler supports the mutable keyword]) fi ]) dnl @synopsis AC_CXX_NAMESPACES dnl dnl If the compiler can prevent names clashes using namespaces, define dnl HAVE_NAMESPACES. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_NAMESPACES], [AC_CACHE_CHECK(whether the compiler implements namespaces, ac_cv_cxx_namespaces, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], [using namespace Outer::Inner; return i;], ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_namespaces" = yes; then AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) fi ]) dnl @synopsis AC_CXX_NCEG_RESTRICT dnl dnl If the compiler supports the Numerical C Extensions Group dnl restrict keyword, define HAVE_NCEG_RESTRICT. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_NCEG_RESTRICT], [AC_CACHE_CHECK(whether the compiler supports the Numerical C Extensions Group restrict keyword, ac_cv_cxx_nceg_restrict, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ void add(int length, double * restrict a, const double * restrict b, const double * restrict c) { for (int i=0; i < length; ++i) a[i] = b[i] + c[i];} ],[double a[10], b[10], c[10]; for (int i=0; i < 10; ++i) { a[i] = 0.0; b[i] = 0.0; c[i] = 0.0;} add(10,a,b,c); return 0;], ac_cv_cxx_nceg_restrict=yes, ac_cv_cxx_nceg_restrict=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_nceg_restrict" = yes; then AC_DEFINE(HAVE_NCEG_RESTRICT,, [define if the compiler supports the Numerical C Extensions Group restrict keyword]) fi ]) dnl @synopsis AC_CXX_NEW_FOR_SCOPING dnl dnl If the compiler accepts the new for scoping rules (the scope of a dnl variable declared inside the parentheses is restricted to the dnl for-body), define HAVE_NEW_FOR_SCOPING. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_NEW_FOR_SCOPING], [AC_CACHE_CHECK(whether the compiler accepts the new for scoping rules, ac_cv_cxx_new_for_scoping, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE(,[ int z = 0; for (int i = 0; i < 10; ++i) z = z + i; for (int i = 0; i < 10; ++i) z = z - i; return z;], ac_cv_cxx_new_for_scoping=yes, ac_cv_cxx_new_for_scoping=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_new_for_scoping" = yes; then AC_DEFINE(HAVE_NEW_FOR_SCOPING,,[define if the compiler accepts the new for scoping rules]) fi ]) dnl @synopsis AC_CXX_OLD_FOR_SCOPING dnl dnl If the compiler accepts the old for scoping rules (the scope of a dnl variable declared inside the parentheses extends outside the dnl for-body), define HAVE_OLD_FOR_SCOPING. Note that some dnl compilers (notably g++ and egcs) support both new and old dnl rules since they accept the old rules and only generate a warning. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_OLD_FOR_SCOPING], [AC_CACHE_CHECK(whether the compiler accepts the old for scoping rules, ac_cv_cxx_old_for_scoping, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE(,[int z;for (int i=0; i < 10; ++i)z=z+i;z=i;return z;], ac_cv_cxx_old_for_scoping=yes, ac_cv_cxx_old_for_scoping=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_old_for_scoping" = yes; then AC_DEFINE(HAVE_OLD_FOR_SCOPING,,[define if the compiler accepts the old for scoping rules]) fi ]) dnl @synopsis AC_CXX_PARTIAL_ORDERING dnl dnl If the compiler supports partial ordering, define HAVE_PARTIAL_ORDERING. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_PARTIAL_ORDERING], [AC_CACHE_CHECK(whether the compiler supports partial ordering, ac_cv_cxx_partial_ordering, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ template struct I {}; template struct A { int r; template int operator() (T1, T2) { r = 0; return r; } template int operator() (I, I) { r = 1; return r; } };],[A x, y; I<0> a; I<1> b; return x (a,b) + y (float(), double());], ac_cv_cxx_partial_ordering=yes, ac_cv_cxx_partial_ordering=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_partial_ordering" = yes; then AC_DEFINE(HAVE_PARTIAL_ORDERING,, [define if the compiler supports partial ordering]) fi ]) dnl @synopsis AC_CXX_PARTIAL_SPECIALIZATION dnl dnl If the compiler supports partial specialization, dnl define HAVE_PARTIAL_SPECIALIZATION. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_PARTIAL_SPECIALIZATION], [AC_CACHE_CHECK(whether the compiler supports partial specialization, ac_cv_cxx_partial_specialization, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ template class A { public : enum e { z = 0 }; }; template class A { public : enum e { z = 1 }; }; template class A { public : enum e { z = 2 }; }; ],[return (A::z == 0) && (A::z == 1) && (A::z == 2);], ac_cv_cxx_partial_specialization=yes, ac_cv_cxx_partial_specialization=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_partial_specialization" = yes; then AC_DEFINE(HAVE_PARTIAL_SPECIALIZATION,, [define if the compiler supports partial specialization]) fi ]) dnl @synopsis AC_CXX_REINTERPRET_CAST dnl dnl If the compiler supports reinterpret_cast<>, define HAVE_REINTERPRET_CAST. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_REINTERPRET_CAST], [AC_CACHE_CHECK(whether the compiler supports reinterpret_cast<>, ac_cv_cxx_reinterpret_cast, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include class Base { public : Base () {} virtual void f () = 0;}; class Derived : public Base { public : Derived () {} virtual void f () {} }; class Unrelated { public : Unrelated () {} }; int g (Unrelated&) { return 0; }],[ Derived d;Base& b=d;Unrelated& e=reinterpret_cast(b);return g(e);], ac_cv_cxx_reinterpret_cast=yes, ac_cv_cxx_reinterpret_cast=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_reinterpret_cast" = yes; then AC_DEFINE(HAVE_REINTERPRET_CAST,, [define if the compiler supports reinterpret_cast<>]) fi ]) dnl @synopsis AC_CXX_RTTI dnl dnl If the compiler supports Run-Time Type Identification (typeinfo dnl header and typeid keyword), define HAVE_RTTI. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_RTTI], [AC_CACHE_CHECK(whether the compiler supports Run-Time Type Identification, ac_cv_cxx_rtti, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include class Base { public : Base () {} virtual int f () { return 0; } }; class Derived : public Base { public : Derived () {} virtual int f () { return 1; } }; ],[Derived d; Base *ptr = &d; return typeid (*ptr) == typeid (Derived); ], ac_cv_cxx_rtti=yes, ac_cv_cxx_rtti=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_rtti" = yes; then AC_DEFINE(HAVE_RTTI,, [define if the compiler supports Run-Time Type Identification]) fi ]) dnl @synopsis AC_CXX_STATIC_CAST dnl dnl If the compiler supports static_cast<>, define HAVE_STATIC_CAST. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_STATIC_CAST], [AC_CACHE_CHECK(whether the compiler supports static_cast<>, ac_cv_cxx_static_cast, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include class Base { public : Base () {} virtual void f () = 0; }; class Derived : public Base { public : Derived () {} virtual void f () {} }; int g (Derived&) { return 0; }],[ Derived d; Base& b = d; Derived& s = static_cast (b); return g (s);], ac_cv_cxx_static_cast=yes, ac_cv_cxx_static_cast=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_static_cast" = yes; then AC_DEFINE(HAVE_STATIC_CAST,, [define if the compiler supports static_cast<>]) fi ]) dnl @synopsis AC_CXX_TEMPLATE_KEYWORD_QUALIFIER dnl dnl If the compiler supports use of the template keyword as a qualifier, dnl define HAVE_TEMPLATE_KEYWORD_QUALIFIER. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen, Bernardo Innocenti, and Luc Maisonobe dnl AC_DEFUN([AC_CXX_TEMPLATE_KEYWORD_QUALIFIER], [AC_CACHE_CHECK(whether the compiler supports use of the template keyword as a qualifier, ac_cv_cxx_template_keyword_qualifier, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ class X { public: template void member() {} template static void static_member() {} }; template void f(T* p) { p->template member<200>(); // OK: < starts template argument T::template static_member<100>(); // OK: < starts explicit qualification } ],[X x; f(&x); return 0;], ac_cv_cxx_template_keyword_qualifier=yes, ac_cv_cxx_template_keyword_qualifier=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_template_keyword_qualifier" = yes; then AC_DEFINE(HAVE_TEMPLATE_KEYWORD_QUALIFIER,, [define if the compiler supports use of the template keyword as a qualifier]) fi ]) dnl @synopsis AC_CXX_TEMPLATE_OBJS dnl dnl This macro tries to find the place where the objects files resulting dnl from templates instantiations are stored and the associated compiler dnl flags. This is particularly useful to include these files in dnl libraries. Currently only g++/egcs and SUN CC are supported (there is dnl nothing to be done for the formers while the latter uses directory dnl ./Templates.DB if you use the -ptr. flag). This macro sets the dnl CXXFLAGS if needed, it also sets the output variable dnl TEMPLATES_OBJ. Note that if you use libtool, this macro does work dnl correctly with the SUN compilers ONLY while building static dnl libraries. Since there are sometimes problems with exception handling dnl with multiple levels of shared libraries even with g++ on this dnl platform, you may wish to enforce the usage of static libraires dnl there. You can do this by putting the following statements in your dnl configure.in file: dnl dnl AC_CANONICAL_HOST dnl case x$host_os in dnl xsolaris*) AC_DISABLE_SHARED ;; dnl esac dnl AM_PROG_LIBTOOL dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Luc Maisonobe dnl AC_DEFUN([AC_CXX_TEMPLATE_OBJS], [AC_CACHE_CHECK(where template objects are stored, ac_cv_cxx_templobjs, [ ac_cv_cxx_templobjs='unknown' if test "$GXX" = yes; then ac_cv_cxx_templobjs='nowhere' else case $CXX in CC|*/CC) cat > conftest.cc < class A { public : A () {} }; template void f (const A&) {} main() { A d; A i; f (d); f (i); return 0; } EOF if test "$ac_cv_cxx_templobjs" = 'unknown' ; then if test -d Templates.DB ; then rm -fr Templates.DB fi if $CXX $CXXFLAGS -ptr. -c conftest.cc 1> /dev/null 2>&1; then if test -d Templates.DB ; then # this should be Sun CC <= 4.2 CXXFLAGS="$CXXFLAGS -ptr." if test x"$LIBTOOL" = x ; then ac_cv_cxx_templobjs='Templates.DB/*.o' else ac_cv_cxx_templobjs='Templates.DB/*.lo' fi rm -fr Templates.DB fi fi fi if test "$ac_cv_cxx_templobjs" = 'unknown' ; then if test -d SunWS_cache ; then rm -fr SunWS_cache fi if $CXX $CXXFLAGS -c conftest.cc 1> /dev/null 2>&1; then if test -d SunWS_cache ; then # this should be Sun WorkShop C++ compiler 5.x # or Sun Forte C++ compiler >= 6.x if test x"$LIBTOOL" = x ; then ac_cv_cxx_templobjs='SunWS_cache/*/*.o' else ac_cv_cxx_templobjs='SunWS_cache/*/*.lo' fi rm -fr SunWS_cache fi fi fi rm -f conftest* ;; esac fi case "x$ac_cv_cxx_templobjs" in xunknown|xnowhere) TEMPLATE_OBJS="" ;; *) TEMPLATE_OBJS="$ac_cv_cxx_templobjs" ;; esac AC_SUBST(TEMPLATE_OBJS)])]) dnl @synopsis AC_CXX_TEMPLATE_QUALIFIED_BASE_CLASS dnl dnl If the compiler supports template-qualified base class specifiers, dnl define HAVE_TEMPLATE_QUALIFIED_BASE_CLASS. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_TEMPLATE_QUALIFIED_BASE_CLASS], [AC_CACHE_CHECK(whether the compiler supports template-qualified base class specifiers, ac_cv_cxx_template_qualified_base_class, [AC_REQUIRE([AC_CXX_TYPENAME]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ #ifndef HAVE_TYPENAME #define typename #endif class Base1 { public : int f () const { return 1; } }; class Base2 { public : int f () const { return 0; } }; template struct base_trait { typedef Base1 base; }; struct base_trait { typedef Base2 base; }; template class Weird : public base_trait::base { public : typedef typename base_trait::base base; int g () const { return f (); } };],[ Weird z; return z.g ();], ac_cv_cxx_template_qualified_base_class=yes, ac_cv_cxx_template_qualified_base_class=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_template_qualified_base_class" = yes; then AC_DEFINE(HAVE_TEMPLATE_QUALIFIED_BASE_CLASS,, [define if the compiler supports template-qualified base class specifiers]) fi ]) dnl @synopsis AC_CXX_TEMPLATE_QUALIFIED_RETURN_TYPE dnl dnl If the compiler supports template-qualified return types, define dnl HAVE_TEMPLATE_QUALIFIED_RETURN_TYPE. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_TEMPLATE_QUALIFIED_RETURN_TYPE], [AC_CACHE_CHECK(whether the compiler supports template-qualified return types, ac_cv_cxx_template_qualified_return_type, [AC_REQUIRE([AC_CXX_TYPENAME]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ #ifndef HAVE_TYPENAME #define typename #endif template struct promote_trait { typedef X T; }; template<> struct promote_trait { typedef float T; }; template class A { public : A () {} }; template A::T> operator+ (const A&, const A&) { return A::T>(); } ],[A x; A y; A z = x + y; return 0;], ac_cv_cxx_template_qualified_return_type=yes, ac_cv_cxx_template_qualified_return_type=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_template_qualified_return_type" = yes; then AC_DEFINE(HAVE_TEMPLATE_QUALIFIED_RETURN_TYPE,, [define if the compiler supports template-qualified return types]) fi ]) dnl @synopsis AC_CXX_TEMPLATES_AS_TEMPLATE_ARGUMENTS dnl dnl If the compiler supports templates as template arguments, define dnl HAVE_TEMPLATES_AS_TEMPLATE_ARGUMENTS. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_TEMPLATES_AS_TEMPLATE_ARGUMENTS], [AC_CACHE_CHECK(whether the compiler supports templates as template arguments, ac_cv_cxx_templates_as_template_arguments, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ template class allocator { public : allocator() {}; }; template class T_alloc> class A { public : A() {} private : T_alloc alloc_; }; ],[A x; return 0;], ac_cv_cxx_templates_as_template_arguments=yes, ac_cv_cxx_templates_as_template_arguments=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_templates_as_template_arguments" = yes; then AC_DEFINE(HAVE_TEMPLATES_AS_TEMPLATE_ARGUMENTS,, [define if the compiler supports templates as template arguments]) fi ]) dnl @synopsis AC_CXX_TEMPLATE_SCOPED_ARGUMENT_MATCHING dnl dnl If the compiler supports function matching with argument types which are dnl template scope-qualified, define HAVE_TEMPLATE_SCOPED_ARGUMENT_MATCHING. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_TEMPLATE_SCOPED_ARGUMENT_MATCHING], [AC_CACHE_CHECK(whether the compiler supports function matching with argument types which are template scope-qualified, ac_cv_cxx_template_scoped_argument_matching, [AC_REQUIRE([AC_CXX_TYPENAME]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ #ifndef HAVE_TYPENAME #define typename #endif template class A { public : typedef X W; }; template class B {}; template void operator+(B d1, typename Y::W d2) {} ],[B > z; z + 0.5f; return 0;], ac_cv_cxx_template_scoped_argument_matching=yes, ac_cv_cxx_template_scoped_argument_matching=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_template_scoped_argument_matching" = yes; then AC_DEFINE(HAVE_TEMPLATE_SCOPED_ARGUMENT_MATCHING,, [define if the compiler supports function matching with argument types which are template scope-qualified]) fi ]) dnl @synopsis AC_CXX_TEMPLATES dnl dnl If the compiler supports basic templates, define HAVE_TEMPLATES. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_TEMPLATES], [AC_CACHE_CHECK(whether the compiler supports basic templates, ac_cv_cxx_templates, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([template class A {public:A(){}}; template void f(const A& ){}],[ A d; A i; f(d); f(i); return 0;], ac_cv_cxx_templates=yes, ac_cv_cxx_templates=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_templates" = yes; then AC_DEFINE(HAVE_TEMPLATES,,[define if the compiler supports basic templates]) fi ]) dnl @synopsis AC_CXX_TYPENAME dnl dnl If the compiler recognizes the typename keyword, define HAVE_TYPENAME. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_TYPENAME], [AC_CACHE_CHECK(whether the compiler recognizes typename, ac_cv_cxx_typename, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([templateclass X {public:X(){}};], [X z; return 0;], ac_cv_cxx_typename=yes, ac_cv_cxx_typename=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_typename" = yes; then AC_DEFINE(HAVE_TYPENAME,,[define if the compiler recognizes typename]) fi ]) dnl @synopsis AC_CXX_USE_NUMTRAIT dnl dnl If the compiler supports numeric traits promotions, define dnl HAVE_USE_NUMTRAIT. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Todd Veldhuizen and Luc Maisonobe dnl AC_DEFUN([AC_CXX_USE_NUMTRAIT], [AC_CACHE_CHECK(whether the compiler supports numeric traits promotions, ac_cv_cxx_use_numtrait, [AC_REQUIRE([AC_CXX_TYPENAME]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ #ifndef HAVE_TYPENAME #define typename #endif template class SumType { public : typedef T_numtype T_sumtype; }; template<> class SumType { public : typedef int T_sumtype; }; template class A {}; template A::T_sumtype> sum(A) { return A::T_sumtype>(); } ],[A x; sum(x); return 0;], ac_cv_cxx_use_numtrait=yes, ac_cv_cxx_use_numtrait=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_use_numtrait" = yes; then AC_DEFINE(HAVE_USE_NUMTRAIT,,[define if the compiler supports numeric traits promotions]) fi ]) dnl @synopsis AC_CXX_VERBOSE_TERMINATE_HANDLER dnl dnl If the compiler does have the verbose terminate handler, define dnl HAVE_VERBOSE_TERMINATE_HANDLER. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Lapo Luchini dnl AC_DEFUN([AC_CXX_VERBOSE_TERMINATE_HANDLER], [AC_CACHE_CHECK(whether the compiler has __gnu_cxx::__verbose_terminate_handler, ac_cv_verbose_terminate_handler, [ AC_REQUIRE([AC_CXX_EXCEPTIONS]) AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE( [#include ], [std::set_terminate(__gnu_cxx::__verbose_terminate_handler);], ac_cv_verbose_terminate_handler=yes, ac_cv_verbose_terminate_handler=no ) AC_LANG_RESTORE ]) if test "$ac_cv_verbose_terminate_handler" = yes; then AC_DEFINE(HAVE_VERBOSE_TERMINATE_HANDLER, , [define if the compiler has __gnu_cxx::__verbose_terminate_handler]) fi ]) dnl @synopsis AX_CXX_GCC_ABI_DEMANGLE dnl dnl If the compiler supports GCC C++ ABI name demangling (has header cxxabi.h dnl and abi::__cxa_demangle() function), define HAVE_GCC_ABI_DEMANGLE dnl dnl Adapted from AC_CXX_RTTI by Luc Maisonobe dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Neil Ferguson dnl AC_DEFUN([AX_CXX_GCC_ABI_DEMANGLE], [AC_CACHE_CHECK(whether the compiler supports GCC C++ ABI name demangling, ac_cv_cxx_gcc_abi_demangle, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #include #include template class A {}; ],[A instance; int status = 0; char* c_name = 0; c_name = abi::__cxa_demangle(typeid(instance).name(), 0, 0, &status); std::string name(c_name); free(c_name); return name == "A"; ], ac_cv_cxx_gcc_abi_demangle=yes, ac_cv_cxx_gcc_abi_demangle=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_gcc_abi_demangle" = yes; then AC_DEFINE(HAVE_GCC_ABI_DEMANGLE,1, [define if the compiler supports GCC C++ ABI name demangling]) fi ]) dnl @synopsis MDL_CXX_FUNCTION_TRY_BLOCKS dnl dnl If the C++ compiler supports function try blocks, define dnl `HAVE_FUNCTION_TRY_BLOCKS'. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Matthew D. Langston dnl AC_DEFUN([MDL_CXX_FUNCTION_TRY_BLOCKS], [ AC_REQUIRE([AC_PROG_CXX]) changequote(,)dnl AC_MSG_CHECKING(whether ${CXX} supports function try blocks) changequote([,])dnl AC_CACHE_VAL(mdl_cv_have_function_try_blocks, [ AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([void foo() try{} catch( ... ){}], [foo();], mdl_cv_have_function_try_blocks=yes, mdl_cv_have_function_try_blocks=no) AC_LANG_RESTORE ]) AC_MSG_RESULT($mdl_cv_have_function_try_blocks) if test "$mdl_cv_have_function_try_blocks" = yes; then AC_DEFINE(HAVE_FUNCTION_TRY_BLOCKS) fi]) dnl @synopsis mni_CXX_HAVE_KOENIG_LOOKUP dnl dnl Define CXX_HAVE_KOENIG_LOOKUP if the C++ compiler has dnl argument-dependent name lookup (a.k.a. Koenig lookup). dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Steve Robbins dnl AC_DEFUN([mni_CXX_HAVE_KOENIG_LOOKUP], [AC_CACHE_CHECK(whether the compiler implements Koenig lookup, ac_cv_cxx_have_koenig_lookup, [AC_LANG_PUSH(C++) AC_TRY_COMPILE([ namespace N1 { class C {}; void f1(const C& c) {} } namespace N2 { void f2() { N1::C x; f1(x); // resolves to N1::f1() if we have Koenig lookup, // otherwise this will fail to compile. } } ],[], ac_cv_cxx_have_koenig_lookup=yes, ac_cv_cxx_have_koenig_lookup=no) AC_LANG_POP]) if test "$ac_cv_cxx_have_koenig_lookup" = yes; then AC_DEFINE(CXX_HAVE_KOENIG_LOOKUP,1, [define to 1 if the compiler implements Koenig lookup]) fi ]) dnl RTB_EXPAND_DIR(VARNAME, DIR) dnl expands occurrences of ${prefix} and ${exec_prefix} in the given DIR, dnl and assigns the resulting string to VARNAME dnl example: RTB_EXPAND_DIR(ROBOTDIR, "${RTB_DIR}/Robots") dnl eg, then: AC_DEFINE_UNQUOTED(ROBOTDIR, "$ROBOTDIR") dnl by Alexandre Oliva dnl from http://www.cygnus.com/ml/automake/1998-Aug/0040.html AC_DEFUN(RTB_EXPAND_DIR, [ $1=$2 $1=`( test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" eval echo \""[$]$1"\" )` ]) dnl @synopsis ETR_SOCKET_NSL dnl dnl This macro figures out what libraries are required on this platform dnl to link sockets programs. It's usually -lsocket and/or -lnsl or dnl neither. We test for all three combinations. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/04/13 15:11:11 jonico Exp $ dnl @author Warren Young dnl AC_DEFUN([ETR_SOCKET_NSL], [ AC_CACHE_CHECK(for libraries containing socket functions, ac_cv_socket_libs, [ oCFLAGS=$CFLAGS AC_TRY_LINK([ #include #include #include #include ], [ struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); ], ac_cv_socket_libs=-lc, ac_cv_socket_libs=no) if test x"$ac_cv_socket_libs" = "xno" then CFLAGS="$oCFLAGS -lsocket" AC_TRY_LINK([ #include #include #include #include ], [ struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); ], ac_cv_socket_libs=-lsocket, ac_cv_socket_libs=no) fi if test x"$ac_cv_socket_libs" = "xno" then CFLAGS="$oCFLAGS -lsocket -lnsl" AC_TRY_LINK([ #include #include #include #include ], [ struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); ], ac_cv_socket_libs="-lsocket -lnsl", ac_cv_socket_libs=no) fi CFLAGS=$oCFLAGS ]) if test x"$ac_cv_socket_libs" = "xno" then AC_MSG_ERROR([Cannot find socket libraries]) elif test x"$ac_cv_socket_libs" = "x-lc" then ETR_SOCKET_LIBS="" else ETR_SOCKET_LIBS="$ac_cv_socket_libs" fi AC_SUBST(ETR_SOCKET_LIBS) ]) dnl ETR_SOCKET_NSL realtimebattle-1.0.8/team-framework/buildinternal/depcomp0000755000175000017500000003554510227230173022013 0ustar moimoi#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2004-05-31.23 # Copyright (C) 1999, 2000, 2003, 2004 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 . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit 0 ;; -v | --v*) echo "depcomp $scriptversion" exit 0 ;; esac 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 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} 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 # Dependencies are output in .lo.d with libtool 1.4. # With libtool 1.5 they are output both in $dir.libs/$base.o.d # and in $dir.libs/$base.o.d and $dir$base.o.d. We process the # latter, because the former will be cleaned when $dir.libs is # erased. tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir$base.o.d" tmpdepfile3="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" tmpdepfile3="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" elif test -f "$tmpdepfile2"; then tmpdepfile="$tmpdepfile2" else tmpdepfile="$tmpdepfile3" 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 # 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: realtimebattle-1.0.8/team-framework/buildinternal/install-sh0000755000175000017500000002201110227230173022422 0ustar moimoi#!/bin/sh # install - install a program, script, or datafile scriptversion=2004-10-22.00 # 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}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit 0;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $cpprog "$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 $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # 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 test -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 || { (exit 1); exit; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: realtimebattle-1.0.8/team-framework/buildinternal/missing0000755000175000017500000002453310227230173022030 0ustar moimoi#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2004-09-07.08 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 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 msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -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] Send bug reports to ." exit 0 ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit 0 ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. 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) echo 1>&2 "\ WARNING: \`$1' is $msg. 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) echo 1>&2 "\ WARNING: \`$1' is $msg. 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*) echo 1>&2 "\ WARNING: \`$1' is $msg. 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) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. 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' $msg. 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 $msg. 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) echo 1>&2 "\ WARNING: \`$1' is $msg. 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) echo 1>&2 "\ WARNING: \`$1' is $msg. 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 # 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 is $msg. 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 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: realtimebattle-1.0.8/team-framework/buildinternal/mkinstalldirs0000755000175000017500000000370410227230173023234 0ustar moimoi#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # 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 realtimebattle-1.0.8/team-framework/README0000644000175000017500000000066410260541576016465 0ustar moimoiFor further information about this package, please visit http://rtb-team.sourceforge.net and the corresponding sourceforge project site. There are lots of interesting materials in the documentation manager on sourceforge. Furthermore, we provide a mailing list and two online tutorials. If you have further questions or like to participate in this project (we really need more developers), please contact jonico@users.sourceforge.net realtimebattle-1.0.8/team-framework/configure.in0000644000175000017500000000340410324165255020106 0ustar moimoidnl -*- Autoconf -*- dnl Process this file with autoconf to produce a configure script. AC_INIT([initcomponents.cpp]) AC_CONFIG_AUX_DIR(buildinternal) AM_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([RealTimeBattleTeamFrameWork] , [1.1]) dnl Checks for programs. dnl AC_PROG_CC AC_PROG_CXX dnl Checks for libraries and language features, the next setp will be to use the information AC_CHECK_LIB([rt],[clock_gettime]) AC_CXX_HAVE_STL AC_CXX_HAVE_STD AC_CXX_EXCEPTIONS AC_CXX_HAVE_SSTREAM AC_CXX_HAVE_STRING_PUSH_BACK AC_CXX_MEMBER_CONSTANTS AC_CXX_NAMESPACES AC_CXX_REINTERPRET_CAST AC_CXX_STATIC_CAST AC_CXX_TEMPLATES mni_CXX_HAVE_KOENIG_LOOKUP dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h stdlib.h string.h syslog.h unistd.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_CXX_BOOL dnl Checks for library functions. AC_FUNC_ERROR_AT_LINE AC_FUNC_SELECT_ARGTYPES AC_FUNC_STAT AC_CHECK_FUNCS([select socket strerror]) dnl Here we test whether we have to link against lsocket and lnsl ETR_SOCKET_NSL dnl Find out where RealTime Battle lives AC_PREFIX_DEFAULT(/usr/local) AC_ARG_WITH(rtb_dir, [ --with-rtb-dir=[path] directory for rtb installation [EPREFIX/games/RealTimeBattle]],, with_rtb_dir=['${exec_prefix}/games/RealTimeBattle']) RTB_DIR=$with_rtb_dir AC_SUBST(RTB_DIR) AC_SUBST(RTB_LOCALEDIR) DOCS_DIR=[${RTB_DIR}/Documentation] AC_SUBST(DOCS_DIR) RTB_EXPAND_DIR(ROBOTDIR, "${RTB_DIR}/Robots") AC_SUBST(ROBOTDIR) RTB_EXPAND_DIR(ARENADIR, "${RTB_DIR}/Arenas") AC_SUBST(ARENADIR) AC_DEFINE_UNQUOTED(ROBOTDIR, "$ROBOTDIR",[robothome]) AC_DEFINE_UNQUOTED(ARENADIR, "$ARENADIR",[arenahome]) dnl Do the output now AC_OUTPUT([ Makefile conf/Makefile ]) realtimebattle-1.0.8/team-framework/aclocal.m40000644000175000017500000011514710324165322017440 0ustar moimoi# generated automatically by aclocal 1.9.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This file 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. # -*- Autoconf -*- # Copyright (C) 2002, 2003 Free Software Foundation, Inc. # Generated from amversion.in; do not edit by hand. # 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 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.3])]) # AM_AUX_DIR_EXPAND # Copyright (C) 2001, 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004 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. # serial 6 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # serial 7 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # 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. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # 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. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 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. # serial 7 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # 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. # serial 11 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright (C) 2001, 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. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # -*- Autoconf -*- # Copyright (C) 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. # serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 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. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 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. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # Copyright (C) 2003, 2004 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. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 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. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright (C) 1996, 1997, 2000, 2001, 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. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # AM_PROG_INSTALL_STRIP # Copyright (C) 2001, 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. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004 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. # serial 1 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([buildinternal/acinclude.m4]) realtimebattle-1.0.8/team-framework/Makefile.am0000644000175000017500000001757410324166220017637 0ustar moimoiAUTOMAKE_OPTIONS=dist-bzip2 dist-zip subdir-objects ACLOCAL_AMFLAGS = -I buildinternal SUBDIRS=conf frameworkdir=$(ROBOTDIR)/rtb-team-framework framework_PROGRAMS = rtb-team noinst_SCRIPTS= createrobot.sh createrobotconf.sh EXTRA_DIST=$(noinst_SCRIPTS) rtb_team_LDADD= @ETR_SOCKET_LIBS@ rtb_team_SOURCES=\ common.h \ initcomponents.h \ stdnamespace.h \ exceptions/confignotloadedexception.h \ exceptions/configurationparserexception.h \ exceptions/exceptionsnamespace.h \ exceptions/ioexception.h \ exceptions/keynotfoundexception.h \ exceptions/parserexception.h \ exceptions/resourcenotfoundexception.h \ exceptions/rtbexception.h \ exceptions/serverispresentexception.h \ exceptions/strategyexception.h \ gamecontrol/clientcoordinator.h \ gamecontrol/clientgamecontroller.h \ gamecontrol/coordinator.h \ gamecontrol/coordinatorcomposite.h \ gamecontrol/coordinatorleaf.h \ gamecontrol/gamecontroller.h \ gamecontrol/gamecontrolnamespace.h \ gamecontrol/gameoptionsrepository.h \ gamecontrol/servercoordinator.h \ gamecontrol/servergamecontroller.h \ io/clientcommunicator.h \ io/clientconnection.h \ io/connection.h \ io/iofactory.h \ io/ionamespace.h \ io/localclientconnection.h \ io/remoteclientconnection.h \ io/rtbconnection.h \ io/servercommunicator.h \ io/serverconnection.h \ io/unixclientcommunicator.h \ io/unixinstream.h \ io/unixinstreambuf.h \ io/unixiofactory.h \ io/unixoutstream.h \ io/unixoutstreambuf.h \ io/unixremoteclientconnection.h \ io/unixrtbconnection.h \ io/unixservercommunicator.h \ io/unixserverconnection.h \ log/logdriver.h \ log/logger.h \ log/lognamespace.h \ log/nulllogdriver.h \ log/rtblogdriver.h \ log/sysloglogdriver.h \ log/unixfilelogdriver.h \ parser/argument_type.h \ parser/configurationparser.h \ parser/game_option_type.h \ parser/message_from_robot_type.h \ parser/message_to_robot_type.h \ parser/object_type.h \ parser/parsernamespace.h \ parser/robot_option_type.h \ parser/rtbparser.h \ parser/rtbparseresult.h \ parser/warning_type.h \ rtbglobal/masterresourcecontrol.h \ rtbglobal/pmap.h \ rtbglobal/pvector.h \ rtbglobal/rtbglobalnamespace.h \ rtbglobal/rtbinit.h \ strategies/clientspecificrepository.h \ strategies/clientstate.h \ strategies/clientstatedata.h \ strategies/internalserverspecificrepository.h \ strategies/serverstate.h \ strategies/serverstatedata.h \ strategies/sharedserverspecificrepository.h \ strategies/specificrepository.h \ strategies/state.h \ strategies/strategiesnamespace.h \ strategies/strategyfactory.h \ bots/brotfrucht/bfclientbasicstate.h \ bots/brotfrucht/bfclientshoothalfstate.h \ bots/brotfrucht/bfclientshoottwicestate.h \ bots/brotfrucht/bfclientspecificrepository.h \ bots/brotfrucht/bfclientstateenum.h \ bots/brotfrucht/bffactory.h \ bots/brotfrucht/bfinternalserverspecificrepository.h \ bots/brotfrucht/bfserverbasicstate.h \ bots/brotfrucht/bfservernorotatestate.h \ bots/brotfrucht/bfserverrotatestate.h \ bots/brotfrucht/bfserverstateenum.h \ bots/brotfrucht/bfsharedserverspecificrepository.h \ bots/brotfrucht/brotfruchtnamespace.h \ bots/empty/empty_client_basicstate.h \ bots/empty/empty_client_derivatedstate.h \ bots/empty/empty_clientspecificrepository.h \ bots/empty/empty_factory.h \ bots/empty/empty_internalserverspecificrepository.h \ bots/empty/empty_namespace.h \ bots/empty/empty_server_basicstate.h \ bots/empty/empty_server_derivatedstate.h \ bots/empty/empty_sharedserverspecificrepository.h \ initcomponents.cpp \ initexceptions.cpp \ main.cpp \ exceptions/confignotloadedexception.cpp \ exceptions/configurationparserexception.cpp \ exceptions/ioexception.cpp \ exceptions/keynotfoundexception.cpp \ exceptions/parserexception.cpp \ exceptions/resourcenotfoundexception.cpp \ exceptions/rtbexception.cpp \ exceptions/serverispresentexception.cpp \ exceptions/strategyexception.cpp \ gamecontrol/clientcoordinator.cpp \ gamecontrol/clientgamecontroller.cpp \ gamecontrol/coordinatorcomposite.cpp \ gamecontrol/coordinatorleaf.cpp \ gamecontrol/servercoordinator.cpp \ gamecontrol/servergamecontroller.cpp \ io/localclientconnection.cpp \ io/unixclientcommunicator.cpp \ io/unixinstream.cpp \ io/unixinstreambuf.cpp \ io/unixiofactory.cpp \ io/unixoutstream.cpp \ io/unixoutstreambuf.cpp \ io/unixremoteclientconnection.cpp \ io/unixrtbconnection.cpp \ io/unixservercommunicator.cpp \ io/unixserverconnection.cpp \ log/logger.cpp \ log/rtblogdriver.cpp \ log/sysloglogdriver.cpp \ log/unixfilelogdriver.cpp \ parser/configurationparser.cpp \ parser/rtbparser.cpp \ rtbglobal/masterresourcecontrol.cpp \ rtbglobal/rtbinit.cpp \ strategies/clientstate.cpp \ strategies/clientstatedata.cpp \ strategies/serverstate.cpp \ strategies/serverstatedata.cpp \ bots/brotfrucht/bfclientbasicstate.cpp \ bots/brotfrucht/bfclientshoothalfstate.cpp \ bots/brotfrucht/bfclientshoottwicestate.cpp \ bots/brotfrucht/bfclientspecificrepository.cpp \ bots/brotfrucht/bffactory.cpp \ bots/brotfrucht/bfinternalserverspecificrepository.cpp \ bots/brotfrucht/bfserverbasicstate.cpp \ bots/brotfrucht/bfservernorotatestate.cpp \ bots/brotfrucht/bfserverrotatestate.cpp \ bots/brotfrucht/bfsharedserverspecificrepository.cpp\ bots/empty/empty_client_basicstate.cpp \ bots/empty/empty_client_derivatedstate.cpp \ bots/empty/empty_clientspecificrepository.cpp \ bots/empty/empty_factory.cpp \ bots/empty/empty_internalserverspecificrepository.cpp \ bots/empty/empty_server_basicstate.cpp \ bots/empty/empty_server_derivatedstate.cpp \ bots/empty/empty_sharedserverspecificrepository.cpp \ bots/columbus/columbusinternalserverspecificrepository.cpp \ bots/columbus/columbusinternalserverspecificrepository.h \ bots/columbus/columbusclientstateenum.h \ bots/columbus/columbusserverstateenum.h \ bots/columbus/columbusnamespace.h \ bots/columbus/columbusserverattackstate.cpp \ bots/columbus/columbusserverattackstate.h \ bots/columbus/columbusserverbasestate.cpp \ bots/columbus/columbusserverbasestate.h \ bots/columbus/columbusserverdiscoverystate.cpp \ bots/columbus/columbusserverdiscoverystate.h \ bots/columbus/columbusserverescapestate.cpp \ bots/columbus/columbusserverescapestate.h \ bots/columbus/columbusserverinitstate.cpp \ bots/columbus/columbusserverinitstate.h \ bots/columbus/columbusserverstateenum.h \ bots/columbus/columbusservertrackstate.cpp \ bots/columbus/columbusservertrackstate.h \ bots/columbus/columbusclientspecificrepository.cpp \ bots/columbus/columbusclientspecificrepository.h \ bots/columbus/columbusclientattackstate.cpp \ bots/columbus/columbusclientattackstate.h \ bots/columbus/columbusclientbasestate.cpp \ bots/columbus/columbusclientbasestate.h \ bots/columbus/columbusclientdrivestate.cpp \ bots/columbus/columbusclientdrivestate.h \ bots/columbus/columbussharedserverspecificrepository.cpp \ bots/columbus/columbussharedserverspecificrepository.h \ bots/columbus/columbusstrategyfactory.cpp \ bots/columbus/columbusstrategyfactory.h \ bots/general/teaminfo.cpp\ bots/general/teaminfo.h\ bots/general/enemiesinfo.cpp\ bots/general/enemiesinfo.h\ bots/general/generalnamespace.h\ bots/general/maps/basemap.h\ bots/general/maps/topographicmap.h\ bots/general/maps/topographicmap_float.h\ bots/general/maps/mapsnamespace.h\ bots/general/maps/navigatemap.h\ bots/general/maps/navigatemap.cpp\ bots/general/maps/potentialmap.h\ bots/general/maps/potentialmap.cpp\ bots/cobra/cobra_client_basicstate.cpp\ bots/cobra/cobra_client_basicstate.h\ bots/cobra/cobra_clientspecificrepository.cpp\ bots/cobra/cobra_clientspecificrepository.h\ bots/cobra/cobra_factory.cpp\ bots/cobra/cobra_factory.h\ bots/cobra/cobra_internalserverspecificrepository.cpp\ bots/cobra/cobra_internalserverspecificrepository.h\ bots/cobra/cobra_namespace.h\ bots/cobra/cobra_server_basicstate.cpp\ bots/cobra/cobra_server_basicstate.h\ bots/cobra/cobra_sharedserverspecificrepository.cpp\ bots/cobra/cobra_sharedserverspecificrepository.h realtimebattle-1.0.8/team-framework/Makefile.in0000644000175000017500000016220510324166226017646 0ustar moimoi# Makefile.in generated by automake 1.9.3 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 = $(rtb_team_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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 = : framework_PROGRAMS = rtb-team$(EXEEXT) subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ buildinternal/depcomp buildinternal/install-sh \ buildinternal/missing buildinternal/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/buildinternal/acinclude.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)/buildinternal/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(frameworkdir)" frameworkPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(framework_PROGRAMS) am__dirstamp = $(am__leading_dot)dirstamp am_rtb_team_OBJECTS = initcomponents.$(OBJEXT) \ initexceptions.$(OBJEXT) main.$(OBJEXT) \ exceptions/confignotloadedexception.$(OBJEXT) \ exceptions/configurationparserexception.$(OBJEXT) \ exceptions/ioexception.$(OBJEXT) \ exceptions/keynotfoundexception.$(OBJEXT) \ exceptions/parserexception.$(OBJEXT) \ exceptions/resourcenotfoundexception.$(OBJEXT) \ exceptions/rtbexception.$(OBJEXT) \ exceptions/serverispresentexception.$(OBJEXT) \ exceptions/strategyexception.$(OBJEXT) \ gamecontrol/clientcoordinator.$(OBJEXT) \ gamecontrol/clientgamecontroller.$(OBJEXT) \ gamecontrol/coordinatorcomposite.$(OBJEXT) \ gamecontrol/coordinatorleaf.$(OBJEXT) \ gamecontrol/servercoordinator.$(OBJEXT) \ gamecontrol/servergamecontroller.$(OBJEXT) \ io/localclientconnection.$(OBJEXT) \ io/unixclientcommunicator.$(OBJEXT) io/unixinstream.$(OBJEXT) \ io/unixinstreambuf.$(OBJEXT) io/unixiofactory.$(OBJEXT) \ io/unixoutstream.$(OBJEXT) io/unixoutstreambuf.$(OBJEXT) \ io/unixremoteclientconnection.$(OBJEXT) \ io/unixrtbconnection.$(OBJEXT) \ io/unixservercommunicator.$(OBJEXT) \ io/unixserverconnection.$(OBJEXT) log/logger.$(OBJEXT) \ log/rtblogdriver.$(OBJEXT) log/sysloglogdriver.$(OBJEXT) \ log/unixfilelogdriver.$(OBJEXT) \ parser/configurationparser.$(OBJEXT) \ parser/rtbparser.$(OBJEXT) \ rtbglobal/masterresourcecontrol.$(OBJEXT) \ rtbglobal/rtbinit.$(OBJEXT) strategies/clientstate.$(OBJEXT) \ strategies/clientstatedata.$(OBJEXT) \ strategies/serverstate.$(OBJEXT) \ strategies/serverstatedata.$(OBJEXT) \ bots/brotfrucht/bfclientbasicstate.$(OBJEXT) \ bots/brotfrucht/bfclientshoothalfstate.$(OBJEXT) \ bots/brotfrucht/bfclientshoottwicestate.$(OBJEXT) \ bots/brotfrucht/bfclientspecificrepository.$(OBJEXT) \ bots/brotfrucht/bffactory.$(OBJEXT) \ bots/brotfrucht/bfinternalserverspecificrepository.$(OBJEXT) \ bots/brotfrucht/bfserverbasicstate.$(OBJEXT) \ bots/brotfrucht/bfservernorotatestate.$(OBJEXT) \ bots/brotfrucht/bfserverrotatestate.$(OBJEXT) \ bots/brotfrucht/bfsharedserverspecificrepository.$(OBJEXT) \ bots/empty/empty_client_basicstate.$(OBJEXT) \ bots/empty/empty_client_derivatedstate.$(OBJEXT) \ bots/empty/empty_clientspecificrepository.$(OBJEXT) \ bots/empty/empty_factory.$(OBJEXT) \ bots/empty/empty_internalserverspecificrepository.$(OBJEXT) \ bots/empty/empty_server_basicstate.$(OBJEXT) \ bots/empty/empty_server_derivatedstate.$(OBJEXT) \ bots/empty/empty_sharedserverspecificrepository.$(OBJEXT) \ bots/columbus/columbusinternalserverspecificrepository.$(OBJEXT) \ bots/columbus/columbusserverattackstate.$(OBJEXT) \ bots/columbus/columbusserverbasestate.$(OBJEXT) \ bots/columbus/columbusserverdiscoverystate.$(OBJEXT) \ bots/columbus/columbusserverescapestate.$(OBJEXT) \ bots/columbus/columbusserverinitstate.$(OBJEXT) \ bots/columbus/columbusservertrackstate.$(OBJEXT) \ bots/columbus/columbusclientspecificrepository.$(OBJEXT) \ bots/columbus/columbusclientattackstate.$(OBJEXT) \ bots/columbus/columbusclientbasestate.$(OBJEXT) \ bots/columbus/columbusclientdrivestate.$(OBJEXT) \ bots/columbus/columbussharedserverspecificrepository.$(OBJEXT) \ bots/columbus/columbusstrategyfactory.$(OBJEXT) \ bots/general/teaminfo.$(OBJEXT) \ bots/general/enemiesinfo.$(OBJEXT) \ bots/general/maps/navigatemap.$(OBJEXT) \ bots/general/maps/potentialmap.$(OBJEXT) \ bots/cobra/cobra_client_basicstate.$(OBJEXT) \ bots/cobra/cobra_clientspecificrepository.$(OBJEXT) \ bots/cobra/cobra_factory.$(OBJEXT) \ bots/cobra/cobra_internalserverspecificrepository.$(OBJEXT) \ bots/cobra/cobra_server_basicstate.$(OBJEXT) \ bots/cobra/cobra_sharedserverspecificrepository.$(OBJEXT) rtb_team_OBJECTS = $(am_rtb_team_OBJECTS) rtb_team_DEPENDENCIES = SCRIPTS = $(noinst_SCRIPTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/buildinternal/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(rtb_team_SOURCES) DIST_SOURCES = $(rtb_team_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 ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) 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 $(distdir).tar.bz2 $(distdir).zip GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ 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@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ 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@ AUTOMAKE_OPTIONS = dist-bzip2 dist-zip subdir-objects ACLOCAL_AMFLAGS = -I buildinternal SUBDIRS = conf frameworkdir = $(ROBOTDIR)/rtb-team-framework noinst_SCRIPTS = createrobot.sh createrobotconf.sh EXTRA_DIST = $(noinst_SCRIPTS) rtb_team_LDADD = @ETR_SOCKET_LIBS@ rtb_team_SOURCES = \ common.h \ initcomponents.h \ stdnamespace.h \ exceptions/confignotloadedexception.h \ exceptions/configurationparserexception.h \ exceptions/exceptionsnamespace.h \ exceptions/ioexception.h \ exceptions/keynotfoundexception.h \ exceptions/parserexception.h \ exceptions/resourcenotfoundexception.h \ exceptions/rtbexception.h \ exceptions/serverispresentexception.h \ exceptions/strategyexception.h \ gamecontrol/clientcoordinator.h \ gamecontrol/clientgamecontroller.h \ gamecontrol/coordinator.h \ gamecontrol/coordinatorcomposite.h \ gamecontrol/coordinatorleaf.h \ gamecontrol/gamecontroller.h \ gamecontrol/gamecontrolnamespace.h \ gamecontrol/gameoptionsrepository.h \ gamecontrol/servercoordinator.h \ gamecontrol/servergamecontroller.h \ io/clientcommunicator.h \ io/clientconnection.h \ io/connection.h \ io/iofactory.h \ io/ionamespace.h \ io/localclientconnection.h \ io/remoteclientconnection.h \ io/rtbconnection.h \ io/servercommunicator.h \ io/serverconnection.h \ io/unixclientcommunicator.h \ io/unixinstream.h \ io/unixinstreambuf.h \ io/unixiofactory.h \ io/unixoutstream.h \ io/unixoutstreambuf.h \ io/unixremoteclientconnection.h \ io/unixrtbconnection.h \ io/unixservercommunicator.h \ io/unixserverconnection.h \ log/logdriver.h \ log/logger.h \ log/lognamespace.h \ log/nulllogdriver.h \ log/rtblogdriver.h \ log/sysloglogdriver.h \ log/unixfilelogdriver.h \ parser/argument_type.h \ parser/configurationparser.h \ parser/game_option_type.h \ parser/message_from_robot_type.h \ parser/message_to_robot_type.h \ parser/object_type.h \ parser/parsernamespace.h \ parser/robot_option_type.h \ parser/rtbparser.h \ parser/rtbparseresult.h \ parser/warning_type.h \ rtbglobal/masterresourcecontrol.h \ rtbglobal/pmap.h \ rtbglobal/pvector.h \ rtbglobal/rtbglobalnamespace.h \ rtbglobal/rtbinit.h \ strategies/clientspecificrepository.h \ strategies/clientstate.h \ strategies/clientstatedata.h \ strategies/internalserverspecificrepository.h \ strategies/serverstate.h \ strategies/serverstatedata.h \ strategies/sharedserverspecificrepository.h \ strategies/specificrepository.h \ strategies/state.h \ strategies/strategiesnamespace.h \ strategies/strategyfactory.h \ bots/brotfrucht/bfclientbasicstate.h \ bots/brotfrucht/bfclientshoothalfstate.h \ bots/brotfrucht/bfclientshoottwicestate.h \ bots/brotfrucht/bfclientspecificrepository.h \ bots/brotfrucht/bfclientstateenum.h \ bots/brotfrucht/bffactory.h \ bots/brotfrucht/bfinternalserverspecificrepository.h \ bots/brotfrucht/bfserverbasicstate.h \ bots/brotfrucht/bfservernorotatestate.h \ bots/brotfrucht/bfserverrotatestate.h \ bots/brotfrucht/bfserverstateenum.h \ bots/brotfrucht/bfsharedserverspecificrepository.h \ bots/brotfrucht/brotfruchtnamespace.h \ bots/empty/empty_client_basicstate.h \ bots/empty/empty_client_derivatedstate.h \ bots/empty/empty_clientspecificrepository.h \ bots/empty/empty_factory.h \ bots/empty/empty_internalserverspecificrepository.h \ bots/empty/empty_namespace.h \ bots/empty/empty_server_basicstate.h \ bots/empty/empty_server_derivatedstate.h \ bots/empty/empty_sharedserverspecificrepository.h \ initcomponents.cpp \ initexceptions.cpp \ main.cpp \ exceptions/confignotloadedexception.cpp \ exceptions/configurationparserexception.cpp \ exceptions/ioexception.cpp \ exceptions/keynotfoundexception.cpp \ exceptions/parserexception.cpp \ exceptions/resourcenotfoundexception.cpp \ exceptions/rtbexception.cpp \ exceptions/serverispresentexception.cpp \ exceptions/strategyexception.cpp \ gamecontrol/clientcoordinator.cpp \ gamecontrol/clientgamecontroller.cpp \ gamecontrol/coordinatorcomposite.cpp \ gamecontrol/coordinatorleaf.cpp \ gamecontrol/servercoordinator.cpp \ gamecontrol/servergamecontroller.cpp \ io/localclientconnection.cpp \ io/unixclientcommunicator.cpp \ io/unixinstream.cpp \ io/unixinstreambuf.cpp \ io/unixiofactory.cpp \ io/unixoutstream.cpp \ io/unixoutstreambuf.cpp \ io/unixremoteclientconnection.cpp \ io/unixrtbconnection.cpp \ io/unixservercommunicator.cpp \ io/unixserverconnection.cpp \ log/logger.cpp \ log/rtblogdriver.cpp \ log/sysloglogdriver.cpp \ log/unixfilelogdriver.cpp \ parser/configurationparser.cpp \ parser/rtbparser.cpp \ rtbglobal/masterresourcecontrol.cpp \ rtbglobal/rtbinit.cpp \ strategies/clientstate.cpp \ strategies/clientstatedata.cpp \ strategies/serverstate.cpp \ strategies/serverstatedata.cpp \ bots/brotfrucht/bfclientbasicstate.cpp \ bots/brotfrucht/bfclientshoothalfstate.cpp \ bots/brotfrucht/bfclientshoottwicestate.cpp \ bots/brotfrucht/bfclientspecificrepository.cpp \ bots/brotfrucht/bffactory.cpp \ bots/brotfrucht/bfinternalserverspecificrepository.cpp \ bots/brotfrucht/bfserverbasicstate.cpp \ bots/brotfrucht/bfservernorotatestate.cpp \ bots/brotfrucht/bfserverrotatestate.cpp \ bots/brotfrucht/bfsharedserverspecificrepository.cpp\ bots/empty/empty_client_basicstate.cpp \ bots/empty/empty_client_derivatedstate.cpp \ bots/empty/empty_clientspecificrepository.cpp \ bots/empty/empty_factory.cpp \ bots/empty/empty_internalserverspecificrepository.cpp \ bots/empty/empty_server_basicstate.cpp \ bots/empty/empty_server_derivatedstate.cpp \ bots/empty/empty_sharedserverspecificrepository.cpp \ bots/columbus/columbusinternalserverspecificrepository.cpp \ bots/columbus/columbusinternalserverspecificrepository.h \ bots/columbus/columbusclientstateenum.h \ bots/columbus/columbusserverstateenum.h \ bots/columbus/columbusnamespace.h \ bots/columbus/columbusserverattackstate.cpp \ bots/columbus/columbusserverattackstate.h \ bots/columbus/columbusserverbasestate.cpp \ bots/columbus/columbusserverbasestate.h \ bots/columbus/columbusserverdiscoverystate.cpp \ bots/columbus/columbusserverdiscoverystate.h \ bots/columbus/columbusserverescapestate.cpp \ bots/columbus/columbusserverescapestate.h \ bots/columbus/columbusserverinitstate.cpp \ bots/columbus/columbusserverinitstate.h \ bots/columbus/columbusserverstateenum.h \ bots/columbus/columbusservertrackstate.cpp \ bots/columbus/columbusservertrackstate.h \ bots/columbus/columbusclientspecificrepository.cpp \ bots/columbus/columbusclientspecificrepository.h \ bots/columbus/columbusclientattackstate.cpp \ bots/columbus/columbusclientattackstate.h \ bots/columbus/columbusclientbasestate.cpp \ bots/columbus/columbusclientbasestate.h \ bots/columbus/columbusclientdrivestate.cpp \ bots/columbus/columbusclientdrivestate.h \ bots/columbus/columbussharedserverspecificrepository.cpp \ bots/columbus/columbussharedserverspecificrepository.h \ bots/columbus/columbusstrategyfactory.cpp \ bots/columbus/columbusstrategyfactory.h \ bots/general/teaminfo.cpp\ bots/general/teaminfo.h\ bots/general/enemiesinfo.cpp\ bots/general/enemiesinfo.h\ bots/general/generalnamespace.h\ bots/general/maps/basemap.h\ bots/general/maps/topographicmap.h\ bots/general/maps/topographicmap_float.h\ bots/general/maps/mapsnamespace.h\ bots/general/maps/navigatemap.h\ bots/general/maps/navigatemap.cpp\ bots/general/maps/potentialmap.h\ bots/general/maps/potentialmap.cpp\ bots/cobra/cobra_client_basicstate.cpp\ bots/cobra/cobra_client_basicstate.h\ bots/cobra/cobra_clientspecificrepository.cpp\ bots/cobra/cobra_clientspecificrepository.h\ bots/cobra/cobra_factory.cpp\ bots/cobra/cobra_factory.h\ bots/cobra/cobra_internalserverspecificrepository.cpp\ bots/cobra/cobra_internalserverspecificrepository.h\ bots/cobra/cobra_namespace.h\ bots/cobra/cobra_server_basicstate.cpp\ bots/cobra/cobra_server_basicstate.h\ bots/cobra/cobra_sharedserverspecificrepository.cpp\ bots/cobra/cobra_sharedserverspecificrepository.h all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .cpp .o .obj am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu 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: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-frameworkPROGRAMS: $(framework_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(frameworkdir)" || $(mkdir_p) "$(DESTDIR)$(frameworkdir)" @list='$(framework_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(frameworkPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(frameworkdir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(frameworkPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(frameworkdir)/$$f" || exit 1; \ else :; fi; \ done uninstall-frameworkPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(framework_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(frameworkdir)/$$f'"; \ rm -f "$(DESTDIR)$(frameworkdir)/$$f"; \ done clean-frameworkPROGRAMS: -test -z "$(framework_PROGRAMS)" || rm -f $(framework_PROGRAMS) exceptions/$(am__dirstamp): @$(mkdir_p) exceptions @: > exceptions/$(am__dirstamp) exceptions/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) exceptions/$(DEPDIR) @: > exceptions/$(DEPDIR)/$(am__dirstamp) exceptions/confignotloadedexception.$(OBJEXT): \ exceptions/$(am__dirstamp) \ exceptions/$(DEPDIR)/$(am__dirstamp) exceptions/configurationparserexception.$(OBJEXT): \ exceptions/$(am__dirstamp) \ exceptions/$(DEPDIR)/$(am__dirstamp) exceptions/ioexception.$(OBJEXT): exceptions/$(am__dirstamp) \ exceptions/$(DEPDIR)/$(am__dirstamp) exceptions/keynotfoundexception.$(OBJEXT): exceptions/$(am__dirstamp) \ exceptions/$(DEPDIR)/$(am__dirstamp) exceptions/parserexception.$(OBJEXT): exceptions/$(am__dirstamp) \ exceptions/$(DEPDIR)/$(am__dirstamp) exceptions/resourcenotfoundexception.$(OBJEXT): \ exceptions/$(am__dirstamp) \ exceptions/$(DEPDIR)/$(am__dirstamp) exceptions/rtbexception.$(OBJEXT): exceptions/$(am__dirstamp) \ exceptions/$(DEPDIR)/$(am__dirstamp) exceptions/serverispresentexception.$(OBJEXT): \ exceptions/$(am__dirstamp) \ exceptions/$(DEPDIR)/$(am__dirstamp) exceptions/strategyexception.$(OBJEXT): exceptions/$(am__dirstamp) \ exceptions/$(DEPDIR)/$(am__dirstamp) gamecontrol/$(am__dirstamp): @$(mkdir_p) gamecontrol @: > gamecontrol/$(am__dirstamp) gamecontrol/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) gamecontrol/$(DEPDIR) @: > gamecontrol/$(DEPDIR)/$(am__dirstamp) gamecontrol/clientcoordinator.$(OBJEXT): gamecontrol/$(am__dirstamp) \ gamecontrol/$(DEPDIR)/$(am__dirstamp) gamecontrol/clientgamecontroller.$(OBJEXT): \ gamecontrol/$(am__dirstamp) \ gamecontrol/$(DEPDIR)/$(am__dirstamp) gamecontrol/coordinatorcomposite.$(OBJEXT): \ gamecontrol/$(am__dirstamp) \ gamecontrol/$(DEPDIR)/$(am__dirstamp) gamecontrol/coordinatorleaf.$(OBJEXT): gamecontrol/$(am__dirstamp) \ gamecontrol/$(DEPDIR)/$(am__dirstamp) gamecontrol/servercoordinator.$(OBJEXT): gamecontrol/$(am__dirstamp) \ gamecontrol/$(DEPDIR)/$(am__dirstamp) gamecontrol/servergamecontroller.$(OBJEXT): \ gamecontrol/$(am__dirstamp) \ gamecontrol/$(DEPDIR)/$(am__dirstamp) io/$(am__dirstamp): @$(mkdir_p) io @: > io/$(am__dirstamp) io/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) io/$(DEPDIR) @: > io/$(DEPDIR)/$(am__dirstamp) io/localclientconnection.$(OBJEXT): io/$(am__dirstamp) \ io/$(DEPDIR)/$(am__dirstamp) io/unixclientcommunicator.$(OBJEXT): io/$(am__dirstamp) \ io/$(DEPDIR)/$(am__dirstamp) io/unixinstream.$(OBJEXT): io/$(am__dirstamp) \ io/$(DEPDIR)/$(am__dirstamp) io/unixinstreambuf.$(OBJEXT): io/$(am__dirstamp) \ io/$(DEPDIR)/$(am__dirstamp) io/unixiofactory.$(OBJEXT): io/$(am__dirstamp) \ io/$(DEPDIR)/$(am__dirstamp) io/unixoutstream.$(OBJEXT): io/$(am__dirstamp) \ io/$(DEPDIR)/$(am__dirstamp) io/unixoutstreambuf.$(OBJEXT): io/$(am__dirstamp) \ io/$(DEPDIR)/$(am__dirstamp) io/unixremoteclientconnection.$(OBJEXT): io/$(am__dirstamp) \ io/$(DEPDIR)/$(am__dirstamp) io/unixrtbconnection.$(OBJEXT): io/$(am__dirstamp) \ io/$(DEPDIR)/$(am__dirstamp) io/unixservercommunicator.$(OBJEXT): io/$(am__dirstamp) \ io/$(DEPDIR)/$(am__dirstamp) io/unixserverconnection.$(OBJEXT): io/$(am__dirstamp) \ io/$(DEPDIR)/$(am__dirstamp) log/$(am__dirstamp): @$(mkdir_p) log @: > log/$(am__dirstamp) log/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) log/$(DEPDIR) @: > log/$(DEPDIR)/$(am__dirstamp) log/logger.$(OBJEXT): log/$(am__dirstamp) \ log/$(DEPDIR)/$(am__dirstamp) log/rtblogdriver.$(OBJEXT): log/$(am__dirstamp) \ log/$(DEPDIR)/$(am__dirstamp) log/sysloglogdriver.$(OBJEXT): log/$(am__dirstamp) \ log/$(DEPDIR)/$(am__dirstamp) log/unixfilelogdriver.$(OBJEXT): log/$(am__dirstamp) \ log/$(DEPDIR)/$(am__dirstamp) parser/$(am__dirstamp): @$(mkdir_p) parser @: > parser/$(am__dirstamp) parser/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) parser/$(DEPDIR) @: > parser/$(DEPDIR)/$(am__dirstamp) parser/configurationparser.$(OBJEXT): parser/$(am__dirstamp) \ parser/$(DEPDIR)/$(am__dirstamp) parser/rtbparser.$(OBJEXT): parser/$(am__dirstamp) \ parser/$(DEPDIR)/$(am__dirstamp) rtbglobal/$(am__dirstamp): @$(mkdir_p) rtbglobal @: > rtbglobal/$(am__dirstamp) rtbglobal/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) rtbglobal/$(DEPDIR) @: > rtbglobal/$(DEPDIR)/$(am__dirstamp) rtbglobal/masterresourcecontrol.$(OBJEXT): rtbglobal/$(am__dirstamp) \ rtbglobal/$(DEPDIR)/$(am__dirstamp) rtbglobal/rtbinit.$(OBJEXT): rtbglobal/$(am__dirstamp) \ rtbglobal/$(DEPDIR)/$(am__dirstamp) strategies/$(am__dirstamp): @$(mkdir_p) strategies @: > strategies/$(am__dirstamp) strategies/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) strategies/$(DEPDIR) @: > strategies/$(DEPDIR)/$(am__dirstamp) strategies/clientstate.$(OBJEXT): strategies/$(am__dirstamp) \ strategies/$(DEPDIR)/$(am__dirstamp) strategies/clientstatedata.$(OBJEXT): strategies/$(am__dirstamp) \ strategies/$(DEPDIR)/$(am__dirstamp) strategies/serverstate.$(OBJEXT): strategies/$(am__dirstamp) \ strategies/$(DEPDIR)/$(am__dirstamp) strategies/serverstatedata.$(OBJEXT): strategies/$(am__dirstamp) \ strategies/$(DEPDIR)/$(am__dirstamp) bots/brotfrucht/$(am__dirstamp): @$(mkdir_p) bots/brotfrucht @: > bots/brotfrucht/$(am__dirstamp) bots/brotfrucht/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) bots/brotfrucht/$(DEPDIR) @: > bots/brotfrucht/$(DEPDIR)/$(am__dirstamp) bots/brotfrucht/bfclientbasicstate.$(OBJEXT): \ bots/brotfrucht/$(am__dirstamp) \ bots/brotfrucht/$(DEPDIR)/$(am__dirstamp) bots/brotfrucht/bfclientshoothalfstate.$(OBJEXT): \ bots/brotfrucht/$(am__dirstamp) \ bots/brotfrucht/$(DEPDIR)/$(am__dirstamp) bots/brotfrucht/bfclientshoottwicestate.$(OBJEXT): \ bots/brotfrucht/$(am__dirstamp) \ bots/brotfrucht/$(DEPDIR)/$(am__dirstamp) bots/brotfrucht/bfclientspecificrepository.$(OBJEXT): \ bots/brotfrucht/$(am__dirstamp) \ bots/brotfrucht/$(DEPDIR)/$(am__dirstamp) bots/brotfrucht/bffactory.$(OBJEXT): bots/brotfrucht/$(am__dirstamp) \ bots/brotfrucht/$(DEPDIR)/$(am__dirstamp) bots/brotfrucht/bfinternalserverspecificrepository.$(OBJEXT): \ bots/brotfrucht/$(am__dirstamp) \ bots/brotfrucht/$(DEPDIR)/$(am__dirstamp) bots/brotfrucht/bfserverbasicstate.$(OBJEXT): \ bots/brotfrucht/$(am__dirstamp) \ bots/brotfrucht/$(DEPDIR)/$(am__dirstamp) bots/brotfrucht/bfservernorotatestate.$(OBJEXT): \ bots/brotfrucht/$(am__dirstamp) \ bots/brotfrucht/$(DEPDIR)/$(am__dirstamp) bots/brotfrucht/bfserverrotatestate.$(OBJEXT): \ bots/brotfrucht/$(am__dirstamp) \ bots/brotfrucht/$(DEPDIR)/$(am__dirstamp) bots/brotfrucht/bfsharedserverspecificrepository.$(OBJEXT): \ bots/brotfrucht/$(am__dirstamp) \ bots/brotfrucht/$(DEPDIR)/$(am__dirstamp) bots/empty/$(am__dirstamp): @$(mkdir_p) bots/empty @: > bots/empty/$(am__dirstamp) bots/empty/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) bots/empty/$(DEPDIR) @: > bots/empty/$(DEPDIR)/$(am__dirstamp) bots/empty/empty_client_basicstate.$(OBJEXT): \ bots/empty/$(am__dirstamp) \ bots/empty/$(DEPDIR)/$(am__dirstamp) bots/empty/empty_client_derivatedstate.$(OBJEXT): \ bots/empty/$(am__dirstamp) \ bots/empty/$(DEPDIR)/$(am__dirstamp) bots/empty/empty_clientspecificrepository.$(OBJEXT): \ bots/empty/$(am__dirstamp) \ bots/empty/$(DEPDIR)/$(am__dirstamp) bots/empty/empty_factory.$(OBJEXT): bots/empty/$(am__dirstamp) \ bots/empty/$(DEPDIR)/$(am__dirstamp) bots/empty/empty_internalserverspecificrepository.$(OBJEXT): \ bots/empty/$(am__dirstamp) \ bots/empty/$(DEPDIR)/$(am__dirstamp) bots/empty/empty_server_basicstate.$(OBJEXT): \ bots/empty/$(am__dirstamp) \ bots/empty/$(DEPDIR)/$(am__dirstamp) bots/empty/empty_server_derivatedstate.$(OBJEXT): \ bots/empty/$(am__dirstamp) \ bots/empty/$(DEPDIR)/$(am__dirstamp) bots/empty/empty_sharedserverspecificrepository.$(OBJEXT): \ bots/empty/$(am__dirstamp) \ bots/empty/$(DEPDIR)/$(am__dirstamp) bots/columbus/$(am__dirstamp): @$(mkdir_p) bots/columbus @: > bots/columbus/$(am__dirstamp) bots/columbus/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) bots/columbus/$(DEPDIR) @: > bots/columbus/$(DEPDIR)/$(am__dirstamp) bots/columbus/columbusinternalserverspecificrepository.$(OBJEXT): \ bots/columbus/$(am__dirstamp) \ bots/columbus/$(DEPDIR)/$(am__dirstamp) bots/columbus/columbusserverattackstate.$(OBJEXT): \ bots/columbus/$(am__dirstamp) \ bots/columbus/$(DEPDIR)/$(am__dirstamp) bots/columbus/columbusserverbasestate.$(OBJEXT): \ bots/columbus/$(am__dirstamp) \ bots/columbus/$(DEPDIR)/$(am__dirstamp) bots/columbus/columbusserverdiscoverystate.$(OBJEXT): \ bots/columbus/$(am__dirstamp) \ bots/columbus/$(DEPDIR)/$(am__dirstamp) bots/columbus/columbusserverescapestate.$(OBJEXT): \ bots/columbus/$(am__dirstamp) \ bots/columbus/$(DEPDIR)/$(am__dirstamp) bots/columbus/columbusserverinitstate.$(OBJEXT): \ bots/columbus/$(am__dirstamp) \ bots/columbus/$(DEPDIR)/$(am__dirstamp) bots/columbus/columbusservertrackstate.$(OBJEXT): \ bots/columbus/$(am__dirstamp) \ bots/columbus/$(DEPDIR)/$(am__dirstamp) bots/columbus/columbusclientspecificrepository.$(OBJEXT): \ bots/columbus/$(am__dirstamp) \ bots/columbus/$(DEPDIR)/$(am__dirstamp) bots/columbus/columbusclientattackstate.$(OBJEXT): \ bots/columbus/$(am__dirstamp) \ bots/columbus/$(DEPDIR)/$(am__dirstamp) bots/columbus/columbusclientbasestate.$(OBJEXT): \ bots/columbus/$(am__dirstamp) \ bots/columbus/$(DEPDIR)/$(am__dirstamp) bots/columbus/columbusclientdrivestate.$(OBJEXT): \ bots/columbus/$(am__dirstamp) \ bots/columbus/$(DEPDIR)/$(am__dirstamp) bots/columbus/columbussharedserverspecificrepository.$(OBJEXT): \ bots/columbus/$(am__dirstamp) \ bots/columbus/$(DEPDIR)/$(am__dirstamp) bots/columbus/columbusstrategyfactory.$(OBJEXT): \ bots/columbus/$(am__dirstamp) \ bots/columbus/$(DEPDIR)/$(am__dirstamp) bots/general/$(am__dirstamp): @$(mkdir_p) bots/general @: > bots/general/$(am__dirstamp) bots/general/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) bots/general/$(DEPDIR) @: > bots/general/$(DEPDIR)/$(am__dirstamp) bots/general/teaminfo.$(OBJEXT): bots/general/$(am__dirstamp) \ bots/general/$(DEPDIR)/$(am__dirstamp) bots/general/enemiesinfo.$(OBJEXT): bots/general/$(am__dirstamp) \ bots/general/$(DEPDIR)/$(am__dirstamp) bots/general/maps/$(am__dirstamp): @$(mkdir_p) bots/general/maps @: > bots/general/maps/$(am__dirstamp) bots/general/maps/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) bots/general/maps/$(DEPDIR) @: > bots/general/maps/$(DEPDIR)/$(am__dirstamp) bots/general/maps/navigatemap.$(OBJEXT): \ bots/general/maps/$(am__dirstamp) \ bots/general/maps/$(DEPDIR)/$(am__dirstamp) bots/general/maps/potentialmap.$(OBJEXT): \ bots/general/maps/$(am__dirstamp) \ bots/general/maps/$(DEPDIR)/$(am__dirstamp) bots/cobra/$(am__dirstamp): @$(mkdir_p) bots/cobra @: > bots/cobra/$(am__dirstamp) bots/cobra/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) bots/cobra/$(DEPDIR) @: > bots/cobra/$(DEPDIR)/$(am__dirstamp) bots/cobra/cobra_client_basicstate.$(OBJEXT): \ bots/cobra/$(am__dirstamp) \ bots/cobra/$(DEPDIR)/$(am__dirstamp) bots/cobra/cobra_clientspecificrepository.$(OBJEXT): \ bots/cobra/$(am__dirstamp) \ bots/cobra/$(DEPDIR)/$(am__dirstamp) bots/cobra/cobra_factory.$(OBJEXT): bots/cobra/$(am__dirstamp) \ bots/cobra/$(DEPDIR)/$(am__dirstamp) bots/cobra/cobra_internalserverspecificrepository.$(OBJEXT): \ bots/cobra/$(am__dirstamp) \ bots/cobra/$(DEPDIR)/$(am__dirstamp) bots/cobra/cobra_server_basicstate.$(OBJEXT): \ bots/cobra/$(am__dirstamp) \ bots/cobra/$(DEPDIR)/$(am__dirstamp) bots/cobra/cobra_sharedserverspecificrepository.$(OBJEXT): \ bots/cobra/$(am__dirstamp) \ bots/cobra/$(DEPDIR)/$(am__dirstamp) rtb-team$(EXEEXT): $(rtb_team_OBJECTS) $(rtb_team_DEPENDENCIES) @rm -f rtb-team$(EXEEXT) $(CXXLINK) $(rtb_team_LDFLAGS) $(rtb_team_OBJECTS) $(rtb_team_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f bots/brotfrucht/bfclientbasicstate.$(OBJEXT) -rm -f bots/brotfrucht/bfclientshoothalfstate.$(OBJEXT) -rm -f bots/brotfrucht/bfclientshoottwicestate.$(OBJEXT) -rm -f bots/brotfrucht/bfclientspecificrepository.$(OBJEXT) -rm -f bots/brotfrucht/bffactory.$(OBJEXT) -rm -f bots/brotfrucht/bfinternalserverspecificrepository.$(OBJEXT) -rm -f bots/brotfrucht/bfserverbasicstate.$(OBJEXT) -rm -f bots/brotfrucht/bfservernorotatestate.$(OBJEXT) -rm -f bots/brotfrucht/bfserverrotatestate.$(OBJEXT) -rm -f bots/brotfrucht/bfsharedserverspecificrepository.$(OBJEXT) -rm -f bots/cobra/cobra_client_basicstate.$(OBJEXT) -rm -f bots/cobra/cobra_clientspecificrepository.$(OBJEXT) -rm -f bots/cobra/cobra_factory.$(OBJEXT) -rm -f bots/cobra/cobra_internalserverspecificrepository.$(OBJEXT) -rm -f bots/cobra/cobra_server_basicstate.$(OBJEXT) -rm -f bots/cobra/cobra_sharedserverspecificrepository.$(OBJEXT) -rm -f bots/columbus/columbusclientattackstate.$(OBJEXT) -rm -f bots/columbus/columbusclientbasestate.$(OBJEXT) -rm -f bots/columbus/columbusclientdrivestate.$(OBJEXT) -rm -f bots/columbus/columbusclientspecificrepository.$(OBJEXT) -rm -f bots/columbus/columbusinternalserverspecificrepository.$(OBJEXT) -rm -f bots/columbus/columbusserverattackstate.$(OBJEXT) -rm -f bots/columbus/columbusserverbasestate.$(OBJEXT) -rm -f bots/columbus/columbusserverdiscoverystate.$(OBJEXT) -rm -f bots/columbus/columbusserverescapestate.$(OBJEXT) -rm -f bots/columbus/columbusserverinitstate.$(OBJEXT) -rm -f bots/columbus/columbusservertrackstate.$(OBJEXT) -rm -f bots/columbus/columbussharedserverspecificrepository.$(OBJEXT) -rm -f bots/columbus/columbusstrategyfactory.$(OBJEXT) -rm -f bots/empty/empty_client_basicstate.$(OBJEXT) -rm -f bots/empty/empty_client_derivatedstate.$(OBJEXT) -rm -f bots/empty/empty_clientspecificrepository.$(OBJEXT) -rm -f bots/empty/empty_factory.$(OBJEXT) -rm -f bots/empty/empty_internalserverspecificrepository.$(OBJEXT) -rm -f bots/empty/empty_server_basicstate.$(OBJEXT) -rm -f bots/empty/empty_server_derivatedstate.$(OBJEXT) -rm -f bots/empty/empty_sharedserverspecificrepository.$(OBJEXT) -rm -f bots/general/enemiesinfo.$(OBJEXT) -rm -f bots/general/maps/navigatemap.$(OBJEXT) -rm -f bots/general/maps/potentialmap.$(OBJEXT) -rm -f bots/general/teaminfo.$(OBJEXT) -rm -f exceptions/confignotloadedexception.$(OBJEXT) -rm -f exceptions/configurationparserexception.$(OBJEXT) -rm -f exceptions/ioexception.$(OBJEXT) -rm -f exceptions/keynotfoundexception.$(OBJEXT) -rm -f exceptions/parserexception.$(OBJEXT) -rm -f exceptions/resourcenotfoundexception.$(OBJEXT) -rm -f exceptions/rtbexception.$(OBJEXT) -rm -f exceptions/serverispresentexception.$(OBJEXT) -rm -f exceptions/strategyexception.$(OBJEXT) -rm -f gamecontrol/clientcoordinator.$(OBJEXT) -rm -f gamecontrol/clientgamecontroller.$(OBJEXT) -rm -f gamecontrol/coordinatorcomposite.$(OBJEXT) -rm -f gamecontrol/coordinatorleaf.$(OBJEXT) -rm -f gamecontrol/servercoordinator.$(OBJEXT) -rm -f gamecontrol/servergamecontroller.$(OBJEXT) -rm -f io/localclientconnection.$(OBJEXT) -rm -f io/unixclientcommunicator.$(OBJEXT) -rm -f io/unixinstream.$(OBJEXT) -rm -f io/unixinstreambuf.$(OBJEXT) -rm -f io/unixiofactory.$(OBJEXT) -rm -f io/unixoutstream.$(OBJEXT) -rm -f io/unixoutstreambuf.$(OBJEXT) -rm -f io/unixremoteclientconnection.$(OBJEXT) -rm -f io/unixrtbconnection.$(OBJEXT) -rm -f io/unixservercommunicator.$(OBJEXT) -rm -f io/unixserverconnection.$(OBJEXT) -rm -f log/logger.$(OBJEXT) -rm -f log/rtblogdriver.$(OBJEXT) -rm -f log/sysloglogdriver.$(OBJEXT) -rm -f log/unixfilelogdriver.$(OBJEXT) -rm -f parser/configurationparser.$(OBJEXT) -rm -f parser/rtbparser.$(OBJEXT) -rm -f rtbglobal/masterresourcecontrol.$(OBJEXT) -rm -f rtbglobal/rtbinit.$(OBJEXT) -rm -f strategies/clientstate.$(OBJEXT) -rm -f strategies/clientstatedata.$(OBJEXT) -rm -f strategies/serverstate.$(OBJEXT) -rm -f strategies/serverstatedata.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initcomponents.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initexceptions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/brotfrucht/$(DEPDIR)/bfclientbasicstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/brotfrucht/$(DEPDIR)/bfclientshoothalfstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/brotfrucht/$(DEPDIR)/bfclientshoottwicestate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/brotfrucht/$(DEPDIR)/bfclientspecificrepository.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/brotfrucht/$(DEPDIR)/bffactory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/brotfrucht/$(DEPDIR)/bfinternalserverspecificrepository.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/brotfrucht/$(DEPDIR)/bfserverbasicstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/brotfrucht/$(DEPDIR)/bfservernorotatestate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/brotfrucht/$(DEPDIR)/bfserverrotatestate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/brotfrucht/$(DEPDIR)/bfsharedserverspecificrepository.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/cobra/$(DEPDIR)/cobra_client_basicstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/cobra/$(DEPDIR)/cobra_clientspecificrepository.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/cobra/$(DEPDIR)/cobra_factory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/cobra/$(DEPDIR)/cobra_internalserverspecificrepository.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/cobra/$(DEPDIR)/cobra_server_basicstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/cobra/$(DEPDIR)/cobra_sharedserverspecificrepository.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/columbus/$(DEPDIR)/columbusclientattackstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/columbus/$(DEPDIR)/columbusclientbasestate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/columbus/$(DEPDIR)/columbusclientdrivestate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/columbus/$(DEPDIR)/columbusclientspecificrepository.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/columbus/$(DEPDIR)/columbusinternalserverspecificrepository.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/columbus/$(DEPDIR)/columbusserverattackstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/columbus/$(DEPDIR)/columbusserverbasestate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/columbus/$(DEPDIR)/columbusserverdiscoverystate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/columbus/$(DEPDIR)/columbusserverescapestate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/columbus/$(DEPDIR)/columbusserverinitstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/columbus/$(DEPDIR)/columbusservertrackstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/columbus/$(DEPDIR)/columbussharedserverspecificrepository.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/columbus/$(DEPDIR)/columbusstrategyfactory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/empty/$(DEPDIR)/empty_client_basicstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/empty/$(DEPDIR)/empty_client_derivatedstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/empty/$(DEPDIR)/empty_clientspecificrepository.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/empty/$(DEPDIR)/empty_factory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/empty/$(DEPDIR)/empty_internalserverspecificrepository.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/empty/$(DEPDIR)/empty_server_basicstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/empty/$(DEPDIR)/empty_server_derivatedstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/empty/$(DEPDIR)/empty_sharedserverspecificrepository.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/general/$(DEPDIR)/enemiesinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/general/$(DEPDIR)/teaminfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/general/maps/$(DEPDIR)/navigatemap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bots/general/maps/$(DEPDIR)/potentialmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@exceptions/$(DEPDIR)/confignotloadedexception.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@exceptions/$(DEPDIR)/configurationparserexception.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@exceptions/$(DEPDIR)/ioexception.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@exceptions/$(DEPDIR)/keynotfoundexception.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@exceptions/$(DEPDIR)/parserexception.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@exceptions/$(DEPDIR)/resourcenotfoundexception.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@exceptions/$(DEPDIR)/rtbexception.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@exceptions/$(DEPDIR)/serverispresentexception.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@exceptions/$(DEPDIR)/strategyexception.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gamecontrol/$(DEPDIR)/clientcoordinator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gamecontrol/$(DEPDIR)/clientgamecontroller.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gamecontrol/$(DEPDIR)/coordinatorcomposite.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gamecontrol/$(DEPDIR)/coordinatorleaf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gamecontrol/$(DEPDIR)/servercoordinator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gamecontrol/$(DEPDIR)/servergamecontroller.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/localclientconnection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/unixclientcommunicator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/unixinstream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/unixinstreambuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/unixiofactory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/unixoutstream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/unixoutstreambuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/unixremoteclientconnection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/unixrtbconnection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/unixservercommunicator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/unixserverconnection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@log/$(DEPDIR)/logger.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@log/$(DEPDIR)/rtblogdriver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@log/$(DEPDIR)/sysloglogdriver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@log/$(DEPDIR)/unixfilelogdriver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@parser/$(DEPDIR)/configurationparser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@parser/$(DEPDIR)/rtbparser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rtbglobal/$(DEPDIR)/masterresourcecontrol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rtbglobal/$(DEPDIR)/rtbinit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@strategies/$(DEPDIR)/clientstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@strategies/$(DEPDIR)/clientstatedata.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@strategies/$(DEPDIR)/serverstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@strategies/$(DEPDIR)/serverstatedata.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \ @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`; \ @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` uninstall-info-am: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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) config.h.in $(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) config.h.in $(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) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(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)/buildinternal @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 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(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;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(SCRIPTS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(frameworkdir)"; 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) -rm -f bots/brotfrucht/$(DEPDIR)/$(am__dirstamp) -rm -f bots/brotfrucht/$(am__dirstamp) -rm -f bots/cobra/$(DEPDIR)/$(am__dirstamp) -rm -f bots/cobra/$(am__dirstamp) -rm -f bots/columbus/$(DEPDIR)/$(am__dirstamp) -rm -f bots/columbus/$(am__dirstamp) -rm -f bots/empty/$(DEPDIR)/$(am__dirstamp) -rm -f bots/empty/$(am__dirstamp) -rm -f bots/general/$(DEPDIR)/$(am__dirstamp) -rm -f bots/general/$(am__dirstamp) -rm -f bots/general/maps/$(DEPDIR)/$(am__dirstamp) -rm -f bots/general/maps/$(am__dirstamp) -rm -f exceptions/$(DEPDIR)/$(am__dirstamp) -rm -f exceptions/$(am__dirstamp) -rm -f gamecontrol/$(DEPDIR)/$(am__dirstamp) -rm -f gamecontrol/$(am__dirstamp) -rm -f io/$(DEPDIR)/$(am__dirstamp) -rm -f io/$(am__dirstamp) -rm -f log/$(DEPDIR)/$(am__dirstamp) -rm -f log/$(am__dirstamp) -rm -f parser/$(DEPDIR)/$(am__dirstamp) -rm -f parser/$(am__dirstamp) -rm -f rtbglobal/$(DEPDIR)/$(am__dirstamp) -rm -f rtbglobal/$(am__dirstamp) -rm -f strategies/$(DEPDIR)/$(am__dirstamp) -rm -f strategies/$(am__dirstamp) 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-frameworkPROGRAMS clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) bots/brotfrucht/$(DEPDIR) bots/cobra/$(DEPDIR) bots/columbus/$(DEPDIR) bots/empty/$(DEPDIR) bots/general/$(DEPDIR) bots/general/maps/$(DEPDIR) exceptions/$(DEPDIR) gamecontrol/$(DEPDIR) io/$(DEPDIR) log/$(DEPDIR) parser/$(DEPDIR) rtbglobal/$(DEPDIR) strategies/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-frameworkPROGRAMS install-exec-am: 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 -rf ./$(DEPDIR) bots/brotfrucht/$(DEPDIR) bots/cobra/$(DEPDIR) bots/columbus/$(DEPDIR) bots/empty/$(DEPDIR) bots/general/$(DEPDIR) bots/general/maps/$(DEPDIR) exceptions/$(DEPDIR) gamecontrol/$(DEPDIR) io/$(DEPDIR) log/$(DEPDIR) parser/$(DEPDIR) rtbglobal/$(DEPDIR) strategies/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-frameworkPROGRAMS uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-frameworkPROGRAMS clean-generic \ clean-recursive ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ 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-exec \ install-exec-am install-frameworkPROGRAMS install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-frameworkPROGRAMS \ uninstall-info-am # 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: realtimebattle-1.0.8/team-framework/config.h.in0000644000175000017500000000667710324165442017635 0ustar moimoi/* config.h.in. Generated from configure.in by autoheader. */ /* arenahome */ #undef ARENADIR /* define to 1 if the compiler implements Koenig lookup */ #undef CXX_HAVE_KOENIG_LOOKUP /* define if bool is a built-in type */ #undef HAVE_BOOL /* define if the compiler supports exceptions */ #undef HAVE_EXCEPTIONS /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `rt' library (-lrt). */ #undef HAVE_LIBRT /* define if the compiler supports member constants */ #undef HAVE_MEMBER_CONSTANTS /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* define if the compiler implements namespaces */ #undef HAVE_NAMESPACES /* define if the compiler supports reinterpret_cast<> */ #undef HAVE_REINTERPRET_CAST /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* define if the compiler has stringstream */ #undef HAVE_SSTREAM /* define if the compiler supports static_cast<> */ #undef HAVE_STATIC_CAST /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* define if the compiler supports ISO C++ standard library */ #undef HAVE_STD /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* define if the compiler supports Standard Template Library */ #undef HAVE_STL /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* define if the compiler has the method std::string::push_back (char) */ #undef HAVE_STRING_PUSH_BACK /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* define if the compiler supports basic templates */ #undef HAVE_TEMPLATES /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* robothome */ #undef ROBOTDIR /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION realtimebattle-1.0.8/team-framework/configure0000755000175000017500000065004010324165326017507 0ustar moimoi#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="initcomponents.cpp" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_default_prefix=/usr/local ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LIBOBJS ETR_SOCKET_LIBS RTB_DIR RTB_LOCALEDIR DOCS_DIR ROBOTDIR ARENADIR LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-rtb-dir=path directory for rtb installation EPREFIX/games/RealTimeBattle Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd "$ac_popdir" done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in buildinternal $srcdir/buildinternal; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in buildinternal $srcdir/buildinternal" >&5 echo "$as_me: error: cannot find install-sh or install.sh in buildinternal $srcdir/buildinternal" >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. ac_config_headers="$ac_config_headers config.h" am__api_version="1.9" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=RealTimeBattleTeamFrameWork VERSION=1.1 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5 echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C++ compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C++ compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5 echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6 if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char clock_gettime (); int main () { clock_gettime (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_rt_clock_gettime=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_rt_clock_gettime=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5 echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6 if test $ac_cv_lib_rt_clock_gettime = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" fi echo "$as_me:$LINENO: checking whether the compiler implements namespaces" >&5 echo $ECHO_N "checking whether the compiler implements namespaces... $ECHO_C" >&6 if test "${ac_cv_cxx_namespaces+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ namespace Outer { namespace Inner { int i = 0; }} int main () { using namespace Outer::Inner; return i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_namespaces=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_namespaces=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_namespaces" >&5 echo "${ECHO_T}$ac_cv_cxx_namespaces" >&6 if test "$ac_cv_cxx_namespaces" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_NAMESPACES _ACEOF fi echo "$as_me:$LINENO: checking whether the compiler supports Standard Template Library" >&5 echo $ECHO_N "checking whether the compiler supports Standard Template Library... $ECHO_C" >&6 if test "${ac_cv_cxx_have_stl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef HAVE_NAMESPACES using namespace std; #endif int main () { list x; x.push_back(5); list::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_have_stl=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_have_stl=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_have_stl" >&5 echo "${ECHO_T}$ac_cv_cxx_have_stl" >&6 if test "$ac_cv_cxx_have_stl" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STL _ACEOF fi echo "$as_me:$LINENO: checking whether the compiler supports ISO C++ standard library" >&5 echo $ECHO_N "checking whether the compiler supports ISO C++ standard library... $ECHO_C" >&6 if test "${ac_cv_cxx_have_std+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #ifdef HAVE_NAMESPACES using namespace std; #endif int main () { return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_have_std=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_have_std=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_have_std" >&5 echo "${ECHO_T}$ac_cv_cxx_have_std" >&6 if test "$ac_cv_cxx_have_std" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STD _ACEOF fi echo "$as_me:$LINENO: checking whether the compiler supports exceptions" >&5 echo $ECHO_N "checking whether the compiler supports exceptions... $ECHO_C" >&6 if test "${ac_cv_cxx_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { try { throw 1; } catch (int i) { return i; } ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_exceptions=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_exceptions=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_exceptions" >&5 echo "${ECHO_T}$ac_cv_cxx_exceptions" >&6 if test "$ac_cv_cxx_exceptions" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_EXCEPTIONS _ACEOF fi echo "$as_me:$LINENO: checking whether the compiler has stringstream" >&5 echo $ECHO_N "checking whether the compiler has stringstream... $ECHO_C" >&6 if test "${ac_cv_cxx_have_sstream+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_NAMESPACES using namespace std; #endif int main () { stringstream message; message << "Hello"; return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_have_sstream=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_have_sstream=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_have_sstream" >&5 echo "${ECHO_T}$ac_cv_cxx_have_sstream" >&6 if test "$ac_cv_cxx_have_sstream" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SSTREAM _ACEOF fi echo "$as_me:$LINENO: checking whether the compiler has std::string::push_back (char)" >&5 echo $ECHO_N "checking whether the compiler has std::string::push_back (char)... $ECHO_C" >&6 if test "${ac_cv_cxx_have_string_push_back+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_NAMESPACES using namespace std; #endif int main () { string message; message.push_back ('a'); return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_have_string_push_back=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_have_string_push_back=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_have_string_push_back" >&5 echo "${ECHO_T}$ac_cv_cxx_have_string_push_back" >&6 if test "$ac_cv_cxx_have_string_push_back" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STRING_PUSH_BACK _ACEOF fi echo "$as_me:$LINENO: checking whether the compiler supports member constants" >&5 echo $ECHO_N "checking whether the compiler supports member constants... $ECHO_C" >&6 if test "${ac_cv_cxx_member_constants+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ class C {public: static const int i = 0;}; const int C::i; int main () { return C::i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_member_constants=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_member_constants=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_member_constants" >&5 echo "${ECHO_T}$ac_cv_cxx_member_constants" >&6 if test "$ac_cv_cxx_member_constants" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MEMBER_CONSTANTS _ACEOF fi echo "$as_me:$LINENO: checking whether the compiler implements namespaces" >&5 echo $ECHO_N "checking whether the compiler implements namespaces... $ECHO_C" >&6 if test "${ac_cv_cxx_namespaces+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ namespace Outer { namespace Inner { int i = 0; }} int main () { using namespace Outer::Inner; return i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_namespaces=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_namespaces=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_namespaces" >&5 echo "${ECHO_T}$ac_cv_cxx_namespaces" >&6 if test "$ac_cv_cxx_namespaces" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_NAMESPACES _ACEOF fi echo "$as_me:$LINENO: checking whether the compiler supports reinterpret_cast<>" >&5 echo $ECHO_N "checking whether the compiler supports reinterpret_cast<>... $ECHO_C" >&6 if test "${ac_cv_cxx_reinterpret_cast+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include class Base { public : Base () {} virtual void f () = 0;}; class Derived : public Base { public : Derived () {} virtual void f () {} }; class Unrelated { public : Unrelated () {} }; int g (Unrelated&) { return 0; } int main () { Derived d;Base& b=d;Unrelated& e=reinterpret_cast(b);return g(e); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_reinterpret_cast=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_reinterpret_cast=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_reinterpret_cast" >&5 echo "${ECHO_T}$ac_cv_cxx_reinterpret_cast" >&6 if test "$ac_cv_cxx_reinterpret_cast" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_REINTERPRET_CAST _ACEOF fi echo "$as_me:$LINENO: checking whether the compiler supports static_cast<>" >&5 echo $ECHO_N "checking whether the compiler supports static_cast<>... $ECHO_C" >&6 if test "${ac_cv_cxx_static_cast+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include class Base { public : Base () {} virtual void f () = 0; }; class Derived : public Base { public : Derived () {} virtual void f () {} }; int g (Derived&) { return 0; } int main () { Derived d; Base& b = d; Derived& s = static_cast (b); return g (s); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_static_cast=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_static_cast=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_static_cast" >&5 echo "${ECHO_T}$ac_cv_cxx_static_cast" >&6 if test "$ac_cv_cxx_static_cast" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STATIC_CAST _ACEOF fi echo "$as_me:$LINENO: checking whether the compiler supports basic templates" >&5 echo $ECHO_N "checking whether the compiler supports basic templates... $ECHO_C" >&6 if test "${ac_cv_cxx_templates+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ template class A {public:A(){}}; template void f(const A& ){} int main () { A d; A i; f(d); f(i); return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_templates=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_templates=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_templates" >&5 echo "${ECHO_T}$ac_cv_cxx_templates" >&6 if test "$ac_cv_cxx_templates" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_TEMPLATES _ACEOF fi echo "$as_me:$LINENO: checking whether the compiler implements Koenig lookup" >&5 echo $ECHO_N "checking whether the compiler implements Koenig lookup... $ECHO_C" >&6 if test "${ac_cv_cxx_have_koenig_lookup+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ namespace N1 { class C {}; void f1(const C& c) {} } namespace N2 { void f2() { N1::C x; f1(x); // resolves to N1::f1() if we have Koenig lookup, // otherwise this will fail to compile. } } int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_have_koenig_lookup=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_have_koenig_lookup=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_have_koenig_lookup" >&5 echo "${ECHO_T}$ac_cv_cxx_have_koenig_lookup" >&6 if test "$ac_cv_cxx_have_koenig_lookup" = yes; then cat >>confdefs.h <<\_ACEOF #define CXX_HAVE_KOENIG_LOOKUP 1 _ACEOF fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in fcntl.h stdlib.h string.h syslog.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking whether the compiler recognizes bool as a built-in type" >&5 echo $ECHO_N "checking whether the compiler recognizes bool as a built-in type... $ECHO_C" >&6 if test "${ac_cv_cxx_bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int f(int x){return 1;} int f(char x){return 1;} int f(bool x){return 1;} int main () { bool b = true; return f(b); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_bool=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_bool=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_bool" >&5 echo "${ECHO_T}$ac_cv_cxx_bool" >&6 if test "$ac_cv_cxx_bool" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_BOOL _ACEOF fi echo "$as_me:$LINENO: checking for error_at_line" >&5 echo $ECHO_N "checking for error_at_line... $ECHO_C" >&6 if test "${ac_cv_lib_error_at_line+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { error_at_line (0, 0, "", 0, ""); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_error_at_line=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_error_at_line=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5 echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6 if test $ac_cv_lib_error_at_line = no; then case $LIBOBJS in "error.$ac_objext" | \ *" error.$ac_objext" | \ "error.$ac_objext "* | \ *" error.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS error.$ac_objext" ;; esac fi for ac_header in sys/select.h sys/socket.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking types of arguments for select" >&5 echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6 if test "${ac_cv_func_select_args+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #if HAVE_SYS_SELECT_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done done done # Provide a safe default value. : ${ac_cv_func_select_args='int,int *,struct timeval *'} fi echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5 echo "${ECHO_T}$ac_cv_func_select_args" >&6 ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS shift cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG1 $1 _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6 if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then ac_cv_func_lstat_dereferences_slashed_symlink=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_lstat_dereferences_slashed_symlink=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6 test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then case $LIBOBJS in "lstat.$ac_objext" | \ *" lstat.$ac_objext" | \ "lstat.$ac_objext "* | \ *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5 echo $ECHO_N "checking whether stat accepts an empty string... $ECHO_C" >&6 if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_stat_empty_string_bug=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; exit (stat ("", &sbuf) ? 1 : 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_stat_empty_string_bug=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_stat_empty_string_bug=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5 echo "${ECHO_T}$ac_cv_func_stat_empty_string_bug" >&6 if test $ac_cv_func_stat_empty_string_bug = yes; then case $LIBOBJS in "stat.$ac_objext" | \ *" stat.$ac_objext" | \ "stat.$ac_objext "* | \ *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in select socket strerror do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for libraries containing socket functions" >&5 echo $ECHO_N "checking for libraries containing socket functions... $ECHO_C" >&6 if test "${ac_cv_socket_libs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else oCFLAGS=$CFLAGS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_socket_libs=-lc else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_socket_libs=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test x"$ac_cv_socket_libs" = "xno" then CFLAGS="$oCFLAGS -lsocket" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_socket_libs=-lsocket else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_socket_libs=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test x"$ac_cv_socket_libs" = "xno" then CFLAGS="$oCFLAGS -lsocket -lnsl" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_socket_libs="-lsocket -lnsl" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_socket_libs=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS=$oCFLAGS fi echo "$as_me:$LINENO: result: $ac_cv_socket_libs" >&5 echo "${ECHO_T}$ac_cv_socket_libs" >&6 if test x"$ac_cv_socket_libs" = "xno" then { { echo "$as_me:$LINENO: error: Cannot find socket libraries" >&5 echo "$as_me: error: Cannot find socket libraries" >&2;} { (exit 1); exit 1; }; } elif test x"$ac_cv_socket_libs" = "x-lc" then ETR_SOCKET_LIBS="" else ETR_SOCKET_LIBS="$ac_cv_socket_libs" fi # Check whether --with-rtb_dir or --without-rtb_dir was given. if test "${with_rtb_dir+set}" = set; then withval="$with_rtb_dir" else with_rtb_dir='${exec_prefix}/games/RealTimeBattle' fi; RTB_DIR=$with_rtb_dir DOCS_DIR=${RTB_DIR}/Documentation ROBOTDIR="${RTB_DIR}/Robots" ROBOTDIR=`( test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" eval echo \""$ROBOTDIR"\" )` ARENADIR="${RTB_DIR}/Arenas" ARENADIR=`( test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" eval echo \""$ARENADIR"\" )` cat >>confdefs.h <<_ACEOF #define ROBOTDIR "$ROBOTDIR" _ACEOF cat >>confdefs.h <<_ACEOF #define ARENADIR "$ARENADIR" _ACEOF ac_config_files="$ac_config_files Makefile conf/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "conf/Makefile" ) CONFIG_FILES="$CONFIG_FILES conf/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@ETR_SOCKET_LIBS@,$ETR_SOCKET_LIBS,;t t s,@RTB_DIR@,$RTB_DIR,;t t s,@RTB_LOCALEDIR@,$RTB_LOCALEDIR,;t t s,@DOCS_DIR@,$DOCS_DIR,;t t s,@ROBOTDIR@,$ROBOTDIR,;t t s,@ARENADIR@,$ARENADIR,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi realtimebattle-1.0.8/team-framework/AUTHORS0000644000175000017500000000000010141764130016624 0ustar moimoirealtimebattle-1.0.8/team-framework/COPYING0000644000175000017500000004311010141764130016620 0ustar moimoi 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. Copyright (C) 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. , 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. realtimebattle-1.0.8/team-framework/ChangeLog0000644000175000017500000000023710324172205017341 0ustar moimoi2005-10-15 Johannes Nicolai * Release RealTimeBattle Team Framework 1.1, see release notes on sourceforge for further details realtimebattle-1.0.8/team-framework/INSTALL0000644000175000017500000001722710154353164016635 0ustar moimoiBasic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. realtimebattle-1.0.8/team-framework/NEWS0000644000175000017500000000000010141764130016253 0ustar moimoirealtimebattle-1.0.8/team-framework/common.h0000644000175000017500000000254210170544033017232 0ustar moimoi/************************************************************************ $Id: common.h,v 1.1 2005/01/10 18:23:23 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: common.h,v $ Revision 1.1 2005/01/10 18:23:23 jonico Added common.h **************************************************************************/ #ifndef COMMON_H #define COMMON_H #if HAVE_CONFIG_H #include "config.h" #endif // here we will write our code that should react according the probed features #endif realtimebattle-1.0.8/team-framework/initcomponents.h0000644000175000017500000000337510167276166021037 0ustar moimoi/************************************************************************ $Id: initcomponents.h,v 1.2 2005/01/06 17:59:18 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: initcomponents.h,v $ Revision 1.2 2005/01/06 17:59:18 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef INITCOMPONENTS_H #define INITCOMPONENTS_H /** * This function is responsable for registrating all components of the framework * It is necessary to have such a method because global objects in anonymous namespaces do not initialize in a presumable * order and we got lots of trouble (segfaults, ...). To avoid this, EVERY new pluggable component has to be registered in * this function that is called by the main method * This method can throw any type of exception */ void initComponents(); #endif realtimebattle-1.0.8/team-framework/stdnamespace.h0000644000175000017500000000266010167276166020431 0ustar moimoi/************************************************************************ $Id: stdnamespace.h,v 1.2 2005/01/06 17:59:18 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: stdnamespace.h,v $ Revision 1.2 2005/01/06 17:59:18 jonico Now all files in the repository have their new header format. **************************************************************************/ #include // This file contains the forward declaration in particular of std::string namespace std { template class auto_ptr; // Origin: The header file } realtimebattle-1.0.8/team-framework/exceptions/0002755000175000017500000000000010404234033017745 5ustar moimoirealtimebattle-1.0.8/team-framework/exceptions/confignotloadedexception.h0000644000175000017500000000503410167276177025221 0ustar moimoi/************************************************************************ $Id: confignotloadedexception.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: confignotloadedexception.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef CONFIGNOTLOADEDEXCEPTION_H #define CONFIGNOTLOADEDEXCEPTION_H #include "rtbexception.h" /** * Namespace Exception */ namespace Exceptions { /** * Class ConfigNotLoadedException * This exception should be thrown by the MRC in case of requests to it before having obtained * the configuration data from the parser */ class ConfigNotLoadedException : public RTBException { /* * Public stuff */ public: /* * Constructors */ /** * Constructs an ConfigNotLoadedException with a concrete errormessage * @param message Concrete error message */ ConfigNotLoadedException(const string& errormessage): _message("ConfigNotLoadedException: "+ errormessage) {}; /** * Constructs an ConfigNotLoadedException with default errormessage */ ConfigNotLoadedException(): _message("ConfigNotLoadedException: Request to MRC while config data was not loaded") {}; /* * Operations */ /** * Returns the concrete error message */ virtual const string& getMessage () const throw(); /** * destructor, does nothing by default */ virtual ~ConfigNotLoadedException () throw(); /* * Private stuff */ private: /* * Fields */ /** * Contains the concrete error message */ string _message; }; } #endif //CONFIGNOTLOADEDEXCEPTION_H realtimebattle-1.0.8/team-framework/exceptions/configurationparserexception.h0000644000175000017500000000401310167276177026142 0ustar moimoi/************************************************************************ $Id: configurationparserexception.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: configurationparserexception.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef CONFIGURATIONPARSEREXCEPTION_H #define CONFIGURATIONPARSEREXCEPTION_H #include #include "../exceptions/parserexception.h" /** * Namespace Exception */ namespace Exceptions { using std::string; using std::bad_exception; /** * Class ConfigurationParserException */ class ConfigurationParserException: public ParserException { /* * Public stuff */ public: /* * Constructors */ ConfigurationParserException(const string& file, int line, const string& error) throw (bad_exception); /* * Destructor */ virtual ~ConfigurationParserException() throw (); private: static string message(const string& filename, int line, const string& error) throw (bad_exception); }; } #endif // CONFIGURATIONPARSEREXCEPTION_H realtimebattle-1.0.8/team-framework/exceptions/exceptionsnamespace.h0000644000175000017500000000303010167276177024173 0ustar moimoi/************************************************************************ $Id: exceptionsnamespace.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: exceptionsnamespace.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ /** * Namespace Exception */ namespace Exceptions { class IOException; class ServerIsPresentException; class KeyNotFoundException; class ConfigNotLoadedException; class ParserException; class RTBException; class ResourceNotFoundException; class StrategyException; } realtimebattle-1.0.8/team-framework/exceptions/ioexception.h0000644000175000017500000000441310167276177022471 0ustar moimoi/************************************************************************ $Id: ioexception.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: ioexception.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef IOEXCEPTION_H #define IOEXCEPTION_H #include "rtbexception.h" /** * Namespace Exception */ namespace Exceptions { /** * Class IOException * This exception should be thrown whenever an IO error occur */ class IOException : public RTBException { /* * Public stuff */ public: /* * Constructors */ /** * Constructs an IOException with a concrete errormessage * @param message Concrete error message */ IOException(const string& errormessage): _message("IOException: "+errormessage) {}; /** * Constructs an IOException with default errormessage */ IOException(): _message("IOException: An unexpected IO error occured") {}; /* * Operations */ /** * Returns the concrete error message */ virtual const string& getMessage () const throw(); /** * destructor, does nothing by default */ virtual ~IOException () throw(); /* * Private stuff */ private: /* * Fields */ /** * Contains the concrete error message */ string _message; }; } #endif //IOEXCEPTION_H realtimebattle-1.0.8/team-framework/exceptions/keynotfoundexception.h0000644000175000017500000000471710167276177024436 0ustar moimoi/************************************************************************ $Id: keynotfoundexception.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: keynotfoundexception.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef KEYNOTFOUNDEXCEPTION_H #define KEYNOTFOUNDEXCEPTION_H #include "rtbexception.h" /** * Namespace */ namespace Exceptions { /** * Class KeyNotFoundException * This exception is thrown, when a requested key in the configuration file or in a * runtime configurationfile was not found */ class KeyNotFoundException : public RTBException { /* * Public stuff */ public: /* * Constructors */ /** * Constructs an KeyNotFoundException with a concrete errormessage * @param message Concrete error message */ KeyNotFoundException(const string& errormessage): _message("KeyNotFoundException: "+errormessage) {}; /** * Constructs an KeyNotFoundException with default errormessage */ KeyNotFoundException(): _message("KeyNotFoundException: The specified key was not found in config data.") {}; /* * Operations */ /** * Returns the concrete error message */ virtual const string& getMessage () const throw(); /** * destructor, does nothing by default */ virtual ~KeyNotFoundException () throw(); /* * Private stuff */ private: /* * Fields */ /** * Contains the concrete error message */ string _message; }; } #endif //KEYNOTFOUNDEXCEPTION_H realtimebattle-1.0.8/team-framework/exceptions/parserexception.h0000644000175000017500000000466710167276177023371 0ustar moimoi/************************************************************************ $Id: parserexception.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: parserexception.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef PARSEREXCEPTION_H #define PARSEREXCEPTION_H #include "rtbexception.h" /** * Namespace Exception */ namespace Exceptions { /** * Class ParserException * This exception is thrown whenever a parser finds a syntax error or a message that * must not appear at the current state */ class ParserException : public RTBException { /* * Public stuff */ public: /* * Constructors */ /** * Constructs an ParserException with a concrete errormessage * @param message Concrete error message */ ParserException(const string& errormessage):_message("ParserException: "+errormessage) {}; /** * Constructs an ParserException with default errormessage */ ParserException():_message("ParserException: Parser found a syntax error or a statement that must not appear at the current state.") {}; /* * Operations */ /** * Returns the concrete error message */ virtual const string& getMessage () const throw(); /** * destructor, does nothing by default */ virtual ~ParserException () throw(); /* * Private stuff */ private: /* * Fields */ /** * Contains the concrete error message */ string _message; }; } #endif //PARSEREXCEPTION_H realtimebattle-1.0.8/team-framework/exceptions/resourcenotfoundexception.h0000644000175000017500000000501410167276177025464 0ustar moimoi/************************************************************************ $Id: resourcenotfoundexception.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: resourcenotfoundexception.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef ResourceNotFoundException_H #define ResourceNotFoundException_H #include "rtbexception.h" /** * Namespace Exception */ namespace Exceptions { /** * Class ResourceNotFoundException * This exception is thrown by the MRC whenever a requested resource (factory, etc.) * is not available */ class ResourceNotFoundException : public RTBException { /* * Public stuff */ public: /* * Constructors */ /** * Constructs an ResourceNotFoundException with a concrete errormessage * @param message Concrete error message */ ResourceNotFoundException(const string& errormessage):_message("ResourceNotFoundException: "+errormessage) {}; /** * Constructs an ResourceNotFoundException with default errormessage */ ResourceNotFoundException():_message("ResourceNotFoundException: Requested resource was not registered by the MRC.") {}; /* * Operations */ /** * Returns the concrete error message */ virtual const string& getMessage () const throw(); /** * destructor, does nothing by default */ virtual ~ResourceNotFoundException () throw(); /* * Private stuff */ private: /* * Fields */ /** * Contains the concrete error message */ string _message; }; } #endif //ResourceNotFoundException_H realtimebattle-1.0.8/team-framework/exceptions/rtbexception.h0000644000175000017500000000365410167276177022657 0ustar moimoi/************************************************************************ $Id: rtbexception.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: rtbexception.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef RTBEXCEPTION_H #define RTBEXCEPTION_H #include #include /** * Namespace Exception */ namespace Exceptions { using std::exception; using std::string; /** * Class RTBException */ class RTBException : public exception{ /* * Public stuff */ public: /* * Operations */ /** * Method to obtain an error message in RTBException flavour */ virtual const string& getMessage () const throw()= 0; /** * Method to obtain an error message in std::exception flavour */ virtual const char* what() const throw(); /** * destructor, does nothing by default */ virtual ~RTBException () throw() {}; }; } #endif //RTBEXCEPTION_H realtimebattle-1.0.8/team-framework/exceptions/serverispresentexception.h0000644000175000017500000000537710167276177025337 0ustar moimoi/************************************************************************ $Id: serverispresentexception.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: serverispresentexception.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef SERVERISPRESENTEXCEPTION_H #define SERVERISPRESENTEXCEPTION_H #include "rtbexception.h" /** * Namespace Exception */ namespace Exceptions { /** * Class ServerIsPresentException * This exception is thrown when * a) the ServerGameController tries to accept another client * and the RTB server has already written something over the RTBConnection * b) the MRC tries to get a ServerGameControl object but a server socket was already established * Exceptions is thrown from the IOFactory family */ class ServerIsPresentException : public RTBException { /* * Public stuff */ public: /* * Constructors */ /** * Constructs an ServerIsPresentException with a concrete errormessage * @param message Concrete error message */ ServerIsPresentException(const string& errormessage):_message("ServerIsPresentException: "+errormessage) {}; /** * Constructs an ServerIsPresentException with default errormessage */ ServerIsPresentException():_message("ServerIsPresentException: The resource could not be allocated, because another process has already done it!") {}; /* * Operations */ /** * Returns the concrete error message */ virtual const string& getMessage () const throw(); /** * destructor, does nothing by default */ virtual ~ServerIsPresentException () throw(); /* * Private stuff */ private: /* * Fields */ /** * Contains the concrete error message */ string _message; }; } #endif //SERVERISPRESENTEXCEPTION_H realtimebattle-1.0.8/team-framework/exceptions/strategyexception.h0000644000175000017500000000501710167276177023725 0ustar moimoi/************************************************************************ $Id: strategyexception.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: strategyexception.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef STRATEGYEXCEPTION_H #define STRATEGYEXCEPTION_H #include "rtbexception.h" /** * Namespace Exception */ namespace Exceptions { /** * Class StrategyException * This exception can be thrown by any client- or server state to indicate that an assertion has failed * in the concrete strategy * It's likely, that this class will be derrived by specific strategies */ class StrategyException : public RTBException { /* * Public stuff */ public: /* * Constructors */ /** * Constructs an StrategyException with a concrete errormessage * @param message Concrete error message */ StrategyException(const string& errormessage):_message("StrategyException: "+errormessage) {}; /** * Constructs an StrategyException with default errormessage */ StrategyException():_message("StrategyException: An assertion in a client- or server state has failed.") {}; /* * Operations */ /** * Returns the concrete error message */ virtual const string& getMessage () const throw(); /** * destructor, does nothing by default */ virtual ~StrategyException () throw(); /* * Private stuff */ private: /* * Fields */ /** * Contains the concrete error message */ string _message; }; } #endif //STRATEGYEXCEPTION_H realtimebattle-1.0.8/team-framework/exceptions/confignotloadedexception.cpp0000644000175000017500000000311010167276177025545 0ustar moimoi/************************************************************************ $Id: confignotloadedexception.cpp,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: confignotloadedexception.cpp,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "confignotloadedexception.h" namespace Exceptions { /** * Methods */ const string& ConfigNotLoadedException::getMessage () const throw(){ return _message; } /** * Destructor */ ConfigNotLoadedException::~ConfigNotLoadedException () throw() { // nothing to do } } realtimebattle-1.0.8/team-framework/exceptions/configurationparserexception.cpp0000644000175000017500000000373410167276177026506 0ustar moimoi/************************************************************************ $Id: configurationparserexception.cpp,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: configurationparserexception.cpp,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include #include "configurationparserexception.h" /** * Methods */ namespace Exceptions { using std::ostringstream; using std::bad_exception; ConfigurationParserException::ConfigurationParserException(const string& file, int line, const string& error) throw (bad_exception) : ParserException(message(file, line, error)) {} string ConfigurationParserException::message(const string& file, int line, const string& error) throw (bad_exception) { ostringstream os; os << "Configuration file '" << file << "': Syntax error in line " << line << ": " << error; return os.str(); } ConfigurationParserException::~ConfigurationParserException() throw () { } } realtimebattle-1.0.8/team-framework/exceptions/ioexception.cpp0000644000175000017500000000277110167276177023031 0ustar moimoi/************************************************************************ $Id: ioexception.cpp,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: ioexception.cpp,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "ioexception.h" namespace Exceptions { /** * Methods */ const string& IOException::getMessage () const throw(){ return _message; } /** * Destructor */ IOException::~IOException () throw(){ // nothing to do } } realtimebattle-1.0.8/team-framework/exceptions/keynotfoundexception.cpp0000644000175000017500000000306010167276177024757 0ustar moimoi/************************************************************************ $Id: keynotfoundexception.cpp,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: keynotfoundexception.cpp,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "keynotfoundexception.h" namespace Exceptions { /** * Methods */ const string& KeyNotFoundException::getMessage () const throw(){ return _message; } /** * Destructor */ KeyNotFoundException::~KeyNotFoundException () throw() { // nothing to do } } realtimebattle-1.0.8/team-framework/exceptions/parserexception.cpp0000644000175000017500000000302210167276177023704 0ustar moimoi/************************************************************************ $Id: parserexception.cpp,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: parserexception.cpp,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "parserexception.h" namespace Exceptions { /** * Methods */ const string& ParserException::getMessage () const throw(){ return _message; } /** * Destructor */ ParserException::~ParserException () throw(){ // nothing to do } } realtimebattle-1.0.8/team-framework/exceptions/resourcenotfoundexception.cpp0000644000175000017500000000311710167276177026021 0ustar moimoi/************************************************************************ $Id: resourcenotfoundexception.cpp,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: resourcenotfoundexception.cpp,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "resourcenotfoundexception.h" namespace Exceptions { /** * Methods */ const string& ResourceNotFoundException::getMessage () const throw() { return _message; } /** * Destructor */ ResourceNotFoundException::~ResourceNotFoundException () throw(){ // nothing to do } } realtimebattle-1.0.8/team-framework/exceptions/rtbexception.cpp0000644000175000017500000000265510167276177023212 0ustar moimoi/************************************************************************ $Id: rtbexception.cpp,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: rtbexception.cpp,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "rtbexception.h" /** * Methods */ namespace Exceptions { const char* RTBException::what() const throw() { return getMessage().c_str(); } } realtimebattle-1.0.8/team-framework/exceptions/serverispresentexception.cpp0000644000175000017500000000311210167276177025653 0ustar moimoi/************************************************************************ $Id: serverispresentexception.cpp,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: serverispresentexception.cpp,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "serverispresentexception.h" namespace Exceptions { /** * Methods */ const string& ServerIsPresentException::getMessage () const throw(){ return _message; } /** * Destructor */ ServerIsPresentException::~ServerIsPresentException () throw() { // nothing to do } } realtimebattle-1.0.8/team-framework/exceptions/strategyexception.cpp0000644000175000017500000000304110167276177024253 0ustar moimoi/************************************************************************ $Id: strategyexception.cpp,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: strategyexception.cpp,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "strategyexception.h" namespace Exceptions { /** * Methods */ const string& StrategyException::getMessage () const throw(){ return _message; } /** * Destructor */ StrategyException::~StrategyException () throw() { // nothing to do } } realtimebattle-1.0.8/team-framework/gamecontrol/0002755000175000017500000000000010404234033020076 5ustar moimoirealtimebattle-1.0.8/team-framework/gamecontrol/clientcoordinator.h0000644000175000017500000001057110167276177024020 0ustar moimoi/************************************************************************ $Id: clientcoordinator.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: clientcoordinator.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef CLIENTCOORDINATOR_H #define CLIENTCOORDINATOR_H #include #include #include "coordinatorleaf.h" #include "gamecontrolnamespace.h" #include "../io/ionamespace.h" #include "../strategies/clientstate.h" #include "../strategies/clientspecificrepository.h" #include "../rtbglobal/pvector.h" #include "../log/logger.h" #include "../exceptions/resourcenotfoundexception.h" #include "../exceptions/keynotfoundexception.h" #include "../exceptions/confignotloadedexception.h" /** * Namespace GameControl */ namespace GameControl { using Strategies::ClientState; using Strategies::State; using Strategies::ClientSpecificRepository; using IO::RTBConnection; using Log::Logger; using RTBGlobal::pvector; using std::auto_ptr; using std::string; using std::ostringstream; using Exceptions::ResourceNotFoundException; using Exceptions::ConfigNotLoadedException; using Exceptions::KeyNotFoundException; /** * Class ClientCoordinator * Note: ClientState is friend of this class, because it has to access the private methods!!! */ class ClientCoordinator : public CoordinatorLeaf { /* *Public stuff */ public: friend class ClientState; ClientCoordinator (const GameOptionsRepository* gameOptionsRepository, RTBConnection* rtbConnection) throw (ConfigNotLoadedException, KeyNotFoundException,bad_exception,StrategyException, ResourceNotFoundException); ~ClientCoordinator () throw(); /** * Delegates the server tip to the current state object. * @param serverTip The server tip in string shape * @return "false", if the tip was the end of the server tip sequence, otherwise "true" */ bool reactOnServerTip(const string& serverTip) throw (StrategyException,bad_exception); /** * Revokes reset on all state objects and sets the current state to the beginning state. */ void resetGame () throw (StrategyException,bad_exception); /** * Calls roundFinished on the current client state object. */ void processReceivedRTBMessages () throw (StrategyException,bad_exception); string getAssociatedRobotName () throw (bad_exception); /* * Protected stuff */ protected: State* getCurrentState () throw (); private: auto_ptr _clientSpecificRepository; ostringstream _messageBuffer; auto_ptr < pvector < ClientState > > _clientStates; // Important: Recognize special vector type!!! auto_ptr _logger; RTBConnection* _rtbConnection; void setCurrentClientState (unsigned char clientStateIndex) throw (StrategyException,bad_exception); /** * This method is used by the client state objects to send a concrete message to RTB already encoded in string representation. * @return An output string stream to buffer the messages inside */ inline ostringstream& messageBuffer () throw () {return _messageBuffer;} /** * This method flushes the buffer contents to RTB and empties the buffer afterwards */ void flushMessages() throw (bad_exception); /** * This string is used to reset _messageBuffer */ string _emptyString; string _finishingString; string currentClientStateName; ClientState* currentClientState; string _robotName; }; } #endif //CLIENTCOORDINATOR_H realtimebattle-1.0.8/team-framework/gamecontrol/clientgamecontroller.h0000644000175000017500000000652710167276177024520 0ustar moimoi/************************************************************************ $Id: clientgamecontroller.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: clientgamecontroller.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef CLIENTGAMECONTROLLER_H #define CLIENTGAMECONTROLLER_H #include "../io/ionamespace.h" #include "gamecontrolnamespace.h" #include "../rtbglobal/rtbglobalnamespace.h" #include #include #include "gamecontroller.h" #include "gameoptionsrepository.h" #include "../io/clientcommunicator.h" #include "../log/logger.h" #include /** * Namespace GameControl */ namespace GameControl { using std::auto_ptr; using std::string; using std::ostringstream; using Exceptions::RTBException; using IO::RTBConnection; using IO::ClientCommunicator; using IO::ServerConnection; using Log::Logger; using RTBGlobal::MasterResourceControl; /** * Class ClientGameController */ class ClientGameController : public GameController { /* * Public stuff */ public: /** * Destructor, does nothing */ ~ClientGameController () throw(); /** * This method is active the whole time when a game is running. Here the main data flow is processed, * it represents the discrete control loop method of the client. See the petrinets and sequence diagrams for * further details. */ bool start() throw (bad_exception) ; /** * Initializes the data fields and exit, the real work is done in the start method * Constructor will pass any exceptions to its creator (since logger may be initialized incorrect) * @param clientCommunicator */ ClientGameController (auto_ptr clientCommunicator) throw (RTBException, bad_exception); /* * Private stuff */ private: /* * Fields */ GameOptionsRepository _gameOptionsRepository; auto_ptr _clientCoordinator; auto_ptr _clientCommunicator; auto_ptr _logger; MasterResourceControl* _mrc; string _robotName; ServerConnection* _serverConnection; RTBConnection* _rtbConnection; /** * Used to store all messages received from the RTB Server to delegate them to the master server */ ostringstream _messagebuffer; /** * String is used to reset our messagebuffer */ string _emptystring; }; } #endif //CLIENTGAMECONTROLLER_H realtimebattle-1.0.8/team-framework/gamecontrol/coordinator.h0000644000175000017500000001460610167276177022624 0ustar moimoi/************************************************************************ $Id: coordinator.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: coordinator.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef COORDINATOR_H #define COORDINATOR_H #include #include "../exceptions/strategyexception.h" #include "../parser/object_type.h" #include "../parser/warning_type.h" /** * Namespace GameControl */ namespace GameControl { using std::string; using std::bad_exception; using Exceptions::StrategyException; using Parser::object_type; using Parser::warning_type; /** * Class Coordinator */ class Coordinator { public: /** * Destructor, does nothing */ virtual ~Coordinator() throw() {}; /** * Calls reset on all state objects and sets the current state to the beginning state. */ virtual void resetGame () throw (StrategyException,bad_exception) = 0; /** * This method has to be invoked after all messages sent by the rtb server in this round were processed by the receiveRTBMessage..... methods. */ virtual void processReceivedRTBMessages () throw (StrategyException,bad_exception) = 0; virtual string getAssociatedRobotName () throw (bad_exception) = 0; /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ virtual void receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ virtual void receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ virtual void receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ virtual void receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ virtual void receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception) = 0; // >> Maybe we should introduce // another enum for this TODO /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ virtual void receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ virtual void receiveRTBMessageRobotsLeft(int num) throw () = 0; /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ virtual void receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ virtual void receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ virtual void receiveRTBMessageDead() throw (StrategyException, bad_exception) = 0; protected: }; } #endif //COORDINATOR_H realtimebattle-1.0.8/team-framework/gamecontrol/coordinatorcomposite.h0000644000175000017500000001472010167276177024544 0ustar moimoi/************************************************************************ $Id: coordinatorcomposite.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: coordinatorcomposite.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef COORDINATORCOMPOSITE_H #define COORDINATORCOMPOSITE_H #include "coordinator.h" #include "gamecontrolnamespace.h" #include "../strategies/strategiesnamespace.h" /** * Namespace GameControl */ namespace GameControl { /** * Class CoordinatorComposite * This class was specially designed for combining the local ServerCoordinator and the * LocalClientCoordinator in order not to have a distinction between local and remote clients. * * TODO: Add all receiveRTBMessages to this class * IMPORTANT: Coordinator objects are deleted by the controller and NOT by this class */ class CoordinatorComposite : public Coordinator { /* * Public stuff */ public: /* * Constructors */ CoordinatorComposite (ClientCoordinator* clientCoordinator, ServerCoordinator* serverCoordinator); /** * destructor, does nothing by default */ ~CoordinatorComposite () throw(); /* * Methods */ void resetGame () throw (StrategyException,bad_exception); void processReceivedRTBMessages () throw (StrategyException,bad_exception); /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ virtual void receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ virtual void receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ virtual void receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ virtual void receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ virtual void receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception); // >> Maybe we should introduce // another enum for this TODO /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ virtual void receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ virtual void receiveRTBMessageRobotsLeft(int num) throw (); /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ virtual void receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ virtual void receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ virtual void receiveRTBMessageDead() throw (StrategyException, bad_exception); private: ClientCoordinator* _clientCoordinator; ServerCoordinator* _serverCoordinator; string getAssociatedRobotName () throw (bad_exception); }; } #endif //COORDINATORCOMPOSITE_H realtimebattle-1.0.8/team-framework/gamecontrol/coordinatorleaf.h0000644000175000017500000001407210167276177023451 0ustar moimoi/************************************************************************ $Id: coordinatorleaf.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: coordinatorleaf.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef COORDINATORLEAF_H #define COORDINATORLEAF_H #include "coordinator.h" #include "../strategies/strategiesnamespace.h" #include /** * Namespace GameControl */ namespace GameControl { using Strategies::State; /** * Class CoordinatorLeaf * This class is thought to be only used for derivation of leaf composites. * * TODO: all receiveRTBMessage Methods delegate to state object received via getCurrentState (template method) * Note: receiveRTBMessage Methods should be virtual but not pure virtual */ class CoordinatorLeaf : public Coordinator { /* * Public stuff */ public: /** * Destructor, does nothing */ ~CoordinatorLeaf() throw(); /* *Methods */ /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ virtual void receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ virtual void receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ virtual void receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ virtual void receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ virtual void receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception); // >> Maybe we should introduce // another enum for this TODO /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ virtual void receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ virtual void receiveRTBMessageRobotsLeft(int num) throw (); /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ virtual void receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ virtual void receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ virtual void receiveRTBMessageDead() throw (StrategyException, bad_exception); /* * Protected stuff */ protected: /* * Methods */ virtual State* getCurrentState () throw ()=0; }; } #endif //COORDINATORLEAF_H realtimebattle-1.0.8/team-framework/gamecontrol/gamecontroller.h0000644000175000017500000000365010167276177023313 0ustar moimoi/************************************************************************ $Id: gamecontroller.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: gamecontroller.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef GAMECONTROLLER_H #define GAMECONTROLLER_H #include /** * Namespace GameControl */ namespace GameControl { using std::bad_exception; /** * Class GameController */ class GameController { /* * Public stuff */ public: /* * Operations */ /** * When this method will return, the whole sequence is over or an unrevoverable error has occured * @return true for success, false for error */ virtual bool start () throw (bad_exception) =0; // I think, the GameContollers should handle all occuring exceptions by itself /** * destructor (does nothing) */ virtual ~GameController () throw () {}; }; } #endif //GAMECONTROLLER_H realtimebattle-1.0.8/team-framework/gamecontrol/gamecontrolnamespace.h0000644000175000017500000000305310167276177024462 0ustar moimoi/************************************************************************ $Id: gamecontrolnamespace.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: gamecontrolnamespace.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ /** * Namespace GameControl */ namespace GameControl { class ClientCoordinator; class ServerCoordinator; class Coordinator; class CoordinatorLeaf; class CoordinatorComposite; class GameController; class ClientGameController; class ServerGameController; class GameOptionsRepository; } realtimebattle-1.0.8/team-framework/gamecontrol/gameoptionsrepository.h0000644000175000017500000000373310167276177024765 0ustar moimoi/************************************************************************ $Id: gameoptionsrepository.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: gameoptionsrepository.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef GAMEOPTIONSREPOSITORY_H #define GAMEOPTIONSREPOSITORY_H /** * Namespace GameControl */ namespace GameControl { /** * Class GameOptionsRepository */ class GameOptionsRepository { /* * Public stuff */ public: /* * Fields */ double ROBOT_MAX_ROTATE; double ROBOT_CANNON_MAX_ROTATE; double ROBOT_RADAR_MAX_ROTATE; double ROBOT_MAX_ACCELERATION; double ROBOT_MIN_ACCELERATION; double ROBOT_START_ENERGY; double ROBOT_MAX_ENERGY; double ROBOT_ENERGY_LEVELS; double SHOT_SPEED; double SHOT_MIN_ENERGY; double SHOT_MAX_ENERGY; double SHOT_ENERGY_INCREASE_SPEED; double TIMEOUT; double DEBUG_LEVEL; double SEND_ROBOT_COORDINATES; }; } #endif //GAMEOPTIONSREPOSITORY_H realtimebattle-1.0.8/team-framework/gamecontrol/servercoordinator.h0000644000175000017500000001144210167276177024046 0ustar moimoi/************************************************************************ $Id: servercoordinator.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: servercoordinator.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef SERVERCOORDINATOR_H #define SERVERCOORDINATOR_H #include #include #include #include "coordinatorleaf.h" #include "gamecontrolnamespace.h" #include "../stdnamespace.h" #include "../strategies/strategiesnamespace.h" #include "../io/ionamespace.h" #include "../strategies/serverstate.h" #include "../strategies/internalserverspecificrepository.h" #include "../rtbglobal/pvector.h" #include "../log/logger.h" #include "../exceptions/strategyexception.h" #include "../exceptions/resourcenotfoundexception.h" #include "../exceptions/keynotfoundexception.h" #include "../exceptions/confignotloadedexception.h" /** * Namespace GameControl */ namespace GameControl { using Strategies::State; using Strategies::ServerState; using Strategies::InternalServerSpecificRepository; using Strategies::SharedServerSpecificRepository; using IO::ClientConnection; using Log::Logger; using RTBGlobal::pvector; using Exceptions::StrategyException; using Exceptions::ResourceNotFoundException; using Exceptions::ConfigNotLoadedException; using Exceptions::KeyNotFoundException; using std::string; using std::ostringstream; using std::auto_ptr; using std::bad_exception; /** * Class ServerCoordinator * Important: ServerState is a friend of this class!! */ class ServerCoordinator : public CoordinatorLeaf { /* * Public stuff */ public: friend class ServerState; /** * Destructor, does nothing */ ~ServerCoordinator () throw(); ServerCoordinator ( ClientConnection* clientConnection, const GameOptionsRepository* gameOptionsRepository ) throw (ConfigNotLoadedException, KeyNotFoundException,bad_exception,StrategyException,ResourceNotFoundException); /** * Calls reset on all state objects and sets the current state to the beginning state. */ void resetGame () throw (StrategyException,bad_exception); /** * This method calls sendServerTips on the current server state object. */ void processReceivedRTBMessages () throw (StrategyException,bad_exception); string getAssociatedRobotName () throw (bad_exception); /* * Protected stuff */ protected: State* getCurrentState () throw (); private: auto_ptr _internalServerSpecificRepository; SharedServerSpecificRepository* _sharedServerSpecificRepository; auto_ptr < pvector > _serverStates; auto_ptr _logger; char _currentServerStateIndex; ostringstream _tipBuffer; ClientConnection* _clientConnection; void setCurrentServerState (unsigned char serverStateIndex) throw (bad_exception,StrategyException); /** * This method is used by the server state objects to send a concrete server tipe to the clients already encoded in string representation. * @return An output string stream to buffer the tips inside */ inline ostringstream& tipBuffer() throw () {return _tipBuffer;} /** * This method writes a stop command (e. g. "FINISH", given by StrategyFactory::getFinishingString()) on the tip buffer connection and flushes it to the ClientConnection. The reactOnServerTip method of ClientCoordinator recognizes this message and will initiate the generation of messages to the rtb server */ void endServerTipSequence () throw (bad_exception); /** * This string is used to reset _tipBuffer */ string _emptyString; string _finishingString; ServerState* currentServerState; string currentServerStateName; // performance voodo string _robotName; string _logMessage1; string _logMessage2; string _logMessage3; string _logMessage4; string _logMessage5; }; } #endif //SERVERCOORDINATOR_H realtimebattle-1.0.8/team-framework/gamecontrol/servergamecontroller.h0000644000175000017500000000665310167276177024550 0ustar moimoi/************************************************************************ $Id: servergamecontroller.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: servergamecontroller.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef SERVERGAMECONTROLLER_H #define SERVERGAMECONTROLLER_H #include "../rtbglobal/rtbglobalnamespace.h" #include "../io/ionamespace.h" #include "gamecontrolnamespace.h" #include #include "../rtbglobal/pvector.h" #include "gamecontroller.h" #include "gameoptionsrepository.h" #include "../io/servercommunicator.h" #include "../log/logger.h" #include "../rtbglobal/pvector.h" #include /** * Namespace GameControl */ namespace GameControl { using RTBGlobal::pvector; using std::vector; using IO::RTBConnection; using IO::ClientConnection; using std::auto_ptr; using std::string; using IO::ServerCommunicator; using Log::Logger; using RTBGlobal::MasterResourceControl; using Exceptions::RTBException; /** * Class ServerGameController */ class ServerGameController : public GameController { /* * Public stuff */ public: /** * */ bool start () throw (bad_exception); /** * * @param serverCommunicator */ ServerGameController (auto_ptr serverCommunicator) throw (RTBException, bad_exception); /** * Destructor */ ~ServerGameController () throw(); /* * Private stuff */ private: /* * Fields */ RTBConnection* _rtbConnection; GameOptionsRepository _gameOptionsRepository; auto_ptr _serverCommunicator; pvector _clientConnections; vector _alive; vector _robotNames; auto_ptr _logger; MasterResourceControl* _mrc; int _numberRobots; int _numberAliveRobots; auto_ptr _localClientCoordinator; auto_ptr _localServerCoordinator; /** * Note: This structure contains both a CoordinatorComposite and lots of ServerCoordinators. The CoordinatorComposite should be the first object in this structure while the structure should be traversed from the last to the first object. */ pvector _coordinators; /* * Methods **/ /** * Let all robots be alive again */ void setAlive(); /** * Reset all coordinators */ void resetAll(); /** * Delegate to all coordinators */ void delegateToAll(); }; } #endif //SERVERGAMECONTROLLER_H realtimebattle-1.0.8/team-framework/gamecontrol/clientcoordinator.cpp0000644000175000017500000001117710167276177024356 0ustar moimoi/************************************************************************ $Id: clientcoordinator.cpp,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: clientcoordinator.cpp,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "clientcoordinator.h" #include "../io/rtbconnection.h" #include "../rtbglobal/masterresourcecontrol.h" #include "../strategies/strategyfactory.h" #include "../strategies/clientstatedata.h" using GameControl::ClientCoordinator; using Strategies::ClientStateData; using RTBGlobal::MasterResourceControl; using Strategies::StrategyFactory; using Strategies::State; using std::out_of_range; using std::string; using std::ostringstream; bool ClientCoordinator::reactOnServerTip (const string& serverTip) throw (StrategyException,bad_exception) { if(serverTip==_finishingString) { _logger->logMessage(1,"Receiving server tips has been finished, sending messages to rtb now ..."); currentClientState->sendRTBMessages(); flushMessages(); return false; } currentClientState->reactOnServerTip(serverTip); return true; } ClientCoordinator::~ClientCoordinator () throw() {} ClientCoordinator::ClientCoordinator ( const GameOptionsRepository* gameOptionsRepository, RTBConnection* rtbConnection) throw (bad_exception,ResourceNotFoundException,StrategyException,ConfigNotLoadedException, KeyNotFoundException):_clientStates(0),_logger(0),_rtbConnection(rtbConnection) { MasterResourceControl *mrc(MasterResourceControl::Instance()); const StrategyFactory *fac(mrc->getStrategyFactory(mrc->getConfigurationProperty("Strategy","StrategyName"))); auto_ptr csd(fac->createClientStateData(this,gameOptionsRepository)); _clientStates=csd->clientStates; _clientSpecificRepository=csd->clientSpecificRepository; _finishingString=fac->getFinishingString(); _logger=mrc->createLogger("ClientCoordinator"); _robotName=getAssociatedRobotName(); } State* ClientCoordinator::getCurrentState () throw () { return currentClientState; } void ClientCoordinator::resetGame () throw (StrategyException,bad_exception) { // this line is necessary _messageBuffer.clear(); _messageBuffer.str(_emptyString); // resets repository _clientSpecificRepository->reset(); // Revokes reset on all state objects and sets the current state to the beginning state. for(pvector::iterator i=_clientStates->begin();i!=_clientStates->end();++i) (*i)->reset(); setCurrentClientState(0); _logger->logMessage(4,"The game has been reset."); } void ClientCoordinator::processReceivedRTBMessages () throw (StrategyException,bad_exception) { // Calls roundFinished on the current client state object. _logger->logMessage(1,"Receiving RTB Messages has been finished."); currentClientState->roundFinished(); } void ClientCoordinator::setCurrentClientState (unsigned char clientStateIndex) throw (StrategyException,bad_exception) { ostringstream O; O << int (clientStateIndex); currentClientStateName=O.str(); try { currentClientState=_clientStates->at(clientStateIndex); } catch (out_of_range& ex) { throw StrategyException(string("ClientCoordinator : Requested state had invalid index : ")+currentClientStateName+" ("+ex.what()+')'); } _logger->logMessage(3,"State has changed to No. "+currentClientStateName); } void ClientCoordinator::flushMessages() throw (bad_exception) { _rtbConnection->sendLine(_messageBuffer.str()); // this line is necessary _messageBuffer.clear(); _messageBuffer.str(_emptyString); _logger->logMessage(2,"Sending messages to RTB complete."); } string ClientCoordinator::getAssociatedRobotName () throw (bad_exception) { return _rtbConnection->getTargetName(); } realtimebattle-1.0.8/team-framework/gamecontrol/clientgamecontroller.cpp0000644000175000017500000002470710276143366025045 0ustar moimoi/************************************************************************ $Id: clientgamecontroller.cpp,v 1.3 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: clientgamecontroller.cpp,v $ Revision 1.3 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "clientgamecontroller.h" #include "../rtbglobal/masterresourcecontrol.h" #include "../io/iofactory.h" #include "../parser/rtbparser.h" #include "../parser/rtbparser.h" #include "../parser/rtbparseresult.h" #include "../parser/message_to_robot_type.h" #include "../parser/game_option_type.h" #include "../io/rtbconnection.h" #include "../io/serverconnection.h" #include "../exceptions/parserexception.h" #include "../exceptions/ioexception.h" #include "../exceptions/strategyexception.h" #include "clientcoordinator.h" #include namespace GameControl { using Parser::RTBParser; using Parser::RTBParseResult; using Parser::game_option_type; using std::endl; using std::exception; using std::ios_base; using Exceptions::ParserException; using Exceptions::IOException; using Exceptions::StrategyException; /** * Methods */ /** * */ bool ClientGameController::ClientGameController::start () throw (bad_exception) { // main exception block try { _logger->logMessage(3,"Starting main method in ClientGameController for robot: "+_robotName); bool exitmainloop=false; const RTBParseResult* pr=0; string command; while(!exitmainloop) { // read initial messages from the RTB - Server, before we start entering a round command=_rtbConnection->getLine(); pr=RTBParser::processRTBMessage(command); switch(pr->messageType) { case Parser::EXIT_ROBOT: { _logger->logMessage(5,"Received ExitRobot command, exiting...."); exitmainloop=true; break; } case Parser::GAME_STARTS: { _logger->logMessage(5,"Received GameStart command, resetting coordinator..."); _clientCoordinator->resetGame(); break; } case Parser::ROBOTS_LEFT: { _logger->logMessage(5,"Received initial RobotsLeft command, delegating it to Coordinator..."); RTBParser::delegateLastMessage(_clientCoordinator.get()); break; } case Parser::GAME_FINISHES: { _logger->logMessage(5,"Received message, that game is over now (we have survived the last game 8-) )"); break; } case Parser::GAME_OPTION: { _logger->logMessage(5,"Received robot option, updating GameOptionsRepository ..."); RTBParser::updateGameOptions(&_gameOptionsRepository); // find out, if we can play with our team in this environment if (pr->intValue[0]==Parser::SEND_ROBOT_COORDINATES) { if (_gameOptionsRepository.SEND_ROBOT_COORDINATES!=double(2)) { _logger->logMessage(50,"Coordinates are not absolute, we cannot join the game 8-("); exitmainloop=true; } // now game is running, process round per round else { _logger->logMessage(10,"Game started..."); bool gameisover=false; while (!gameisover) { // clear messagebuffer _messagebuffer.clear(); _messagebuffer.str(_emptystring); _logger->logMessage(1,"Round started..."); bool roundisover=false; while (!roundisover) { command=_rtbConnection->getLine(); // append command to the messagebuffer _messagebuffer << command << endl; pr=RTBParser::processRTBMessage(command); switch (pr->messageType) { case Parser::ENERGY: { _logger->logMessage(5,"Received Energy command, round is finished now.."); roundisover=true; break; } case Parser::DEAD: { _logger->logMessage(5,"We are reported to be dead, exit current game..."); roundisover=true; gameisover=true; break; } case Parser::WARNING: { _logger->logMessage(20,"Received warning from RTB Server: "+pr->stringValue); break; } case Parser::RADAR: { _logger->logMessage(4,"Received Radar command..."); break; } case Parser::INFO: { _logger->logMessage(4,"Received Info command..."); break; } case Parser::COORDINATES: { _logger->logMessage(4,"Received Coordinates command..."); break; } case Parser::ROBOT_INFO: { _logger->logMessage(4,"Received Robot Info command..."); break; } case Parser::ROTATION_REACHED: { _logger->logMessage(4,"Received Rotation Reached command..."); break; } case Parser::ROBOTS_LEFT: { _logger->logMessage(4,"Received Robots Left command..."); break; } case Parser::COLLISION: { _logger->logMessage(4,"Received Collision command..."); break; } default: { throw ParserException("Received command from RTBServer, that was not expected at this moment: "+command); } } // now delegate message to the coordinator _logger->logMessage(2,"Delegating message ..."); RTBParser::delegateLastMessage(_clientCoordinator.get()); } // here, we send the messages to the master server _logger->logMessage(2,"Sending received messages to the master server ..."); _serverConnection->sendLine(_messagebuffer.str()); // here, we inform the coordinator, that no further messages will arrive from the rtb server this round _logger->logMessage(2,"Informing ClientCoordinator that round is over ..."); _clientCoordinator->processReceivedRTBMessages(); if (!gameisover) { // now we read the servertips and give them to the coordinator _logger->logMessage(2,"Get servertips from the master server ..."); while (_clientCoordinator->reactOnServerTip(_serverConnection->getLine())); // new round will begin now _logger->logMessage(1,"Round finished..."); } } _logger->logMessage(10,"Game finished..."); } } break; } case Parser::WARNING: { _logger->logMessage(20,"Received warning from RTB Server: "+pr->stringValue); RTBParser::delegateLastMessage(_clientCoordinator.get()); break; } default: { throw ParserException("Received command from RTBServer, that was not expected at this moment: "+command); } } } } catch (IOException& e) { _logger->logMessage(100,"Main loop in ClientGameController caught exception that was thrown because our Command Parser figured out a serious mistake: "+e.getMessage()); _logger->logMessage(3,"Exiting ClientGameControl::start because of occured exception"); return false; } catch (StrategyException& e) { _logger->logMessage(100,"Main loop in ClientGameController caught exception caused by a broken strategy component: "+e.getMessage()); _logger->logMessage(3,"Exiting ClientGameControl::start because of occured exception"); return false; } catch (ParserException& e) { _logger->logMessage(100,"Main loop in ClientGameController caught exception that was thrown by a rtb-framework component: "+e.getMessage()); _logger->logMessage(3,"Exiting ClientGameControl::start because of occured exception"); return false; } catch (RTBException& e) { _logger->logMessage(100,"Main loop in ClientGameController caught exception that was thrown by a rtb-framework component: "+e.getMessage()); _logger->logMessage(3,"Exiting ClientGameControl::start because of occured exception"); return false; } catch (ios_base::failure& e) { _logger->logMessage(100,"Main loop in ClientGameController caught exception caused by the stringbuffer used to store the received commands: "+string(e.what())); _logger->logMessage(3,"Exiting ClientGameControl::start because of occured exception"); return false; } catch (exception& e) { _logger->logMessage(100,"Main loop in ClientGameController caught exception that was thrown by a STL component: "+string(e.what())); _logger->logMessage(3,"Exiting ClientGameControl::start because of occured exception"); return false; } _logger->logMessage(3,"Exiting ClientGameControl::start because rtb server wants us to quit..."); return true; } /** * Constructors/Destructors */ /** * */ ClientGameController::ClientGameController (auto_ptr clientCommunicator) throw (RTBException, bad_exception) :_clientCoordinator(0),_clientCommunicator(clientCommunicator) { // get MRC _mrc=MasterResourceControl::Instance(); // get Logger _logger=_mrc->createLogger("ClientGameController"); _logger->logMessage(2,"Initializing ClientGameController (constructor)"); // get name of robot _robotName=_mrc->getRuntimeProperty("Main","ActualName"); // get the server connection _serverConnection=_clientCommunicator->getServerConnection(); // obtain the RTB Connection _rtbConnection=_mrc->getIOFactory()->getRTBConnection(); // create the client coordinator (finite state machine for the processing of the RTB messages) _clientCoordinator.reset(new ClientCoordinator(&_gameOptionsRepository, _rtbConnection)); _messagebuffer.exceptions(ios_base::badbit|ios_base::failbit); } /** * Does nothing */ ClientGameController::~ClientGameController () throw() { } } realtimebattle-1.0.8/team-framework/gamecontrol/coordinatorcomposite.cpp0000644000175000017500000001674110167276177025104 0ustar moimoi/************************************************************************ $Id: coordinatorcomposite.cpp,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: coordinatorcomposite.cpp,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "coordinatorcomposite.h" #include "clientcoordinator.h" #include "servercoordinator.h" using GameControl::CoordinatorComposite; using std::string; CoordinatorComposite::~CoordinatorComposite () throw() {} void CoordinatorComposite::resetGame () throw (StrategyException,bad_exception){ _clientCoordinator->resetGame(); _serverCoordinator->resetGame(); } void CoordinatorComposite::processReceivedRTBMessages () throw (StrategyException,bad_exception) { _clientCoordinator->processReceivedRTBMessages(); _serverCoordinator->processReceivedRTBMessages(); } CoordinatorComposite::CoordinatorComposite ( ClientCoordinator* clientCoordinator, ServerCoordinator* serverCoordinator): _clientCoordinator(clientCoordinator), _serverCoordinator(serverCoordinator) {} string CoordinatorComposite::getAssociatedRobotName () throw (bad_exception) { return _clientCoordinator->getAssociatedRobotName(); } /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ void CoordinatorComposite::receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception) { _clientCoordinator->receiveRTBMessageRadar(dist,type,angle); _serverCoordinator->receiveRTBMessageRadar(dist,type,angle); } /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ void CoordinatorComposite::receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception) { _clientCoordinator->receiveRTBMessageInfo(time,speed,cannonAngle); _serverCoordinator->receiveRTBMessageInfo(time,speed,cannonAngle); } /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ void CoordinatorComposite::receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception) { _clientCoordinator->receiveRTBMessageCoordinates(x,y,angle); _serverCoordinator->receiveRTBMessageCoordinates(x,y,angle); } /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ void CoordinatorComposite::receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception) { _clientCoordinator->receiveRTBMessageRobotInfo(energy,isTeamMate); _serverCoordinator->receiveRTBMessageRobotInfo(energy,isTeamMate); } /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ void CoordinatorComposite::receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception) // >> Maybe we should introduce { _clientCoordinator->receiveRTBMessageRotationReached(what); _serverCoordinator->receiveRTBMessageRotationReached(what); } // another enum for this TODO /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ void CoordinatorComposite::receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception) { _clientCoordinator->receiveRTBMessageEnergy(energy); _serverCoordinator->receiveRTBMessageEnergy(energy); } /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ void CoordinatorComposite::receiveRTBMessageRobotsLeft(int num) throw () { _clientCoordinator->receiveRTBMessageRobotsLeft(num); _serverCoordinator->receiveRTBMessageRobotsLeft(num); } /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ void CoordinatorComposite::receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception) { _clientCoordinator->receiveRTBMessageCollision(type,angle); _serverCoordinator->receiveRTBMessageCollision(type,angle); } /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ void CoordinatorComposite::receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception) { _clientCoordinator->receiveRTBMessageWarning(warning,message); _serverCoordinator->receiveRTBMessageWarning(warning,message); } /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ void CoordinatorComposite::receiveRTBMessageDead() throw (StrategyException, bad_exception) { _clientCoordinator->receiveRTBMessageDead(); _serverCoordinator->receiveRTBMessageDead(); } realtimebattle-1.0.8/team-framework/gamecontrol/coordinatorleaf.cpp0000644000175000017500000001413610167276177024005 0ustar moimoi/************************************************************************ $Id: coordinatorleaf.cpp,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: coordinatorleaf.cpp,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "coordinatorleaf.h" #include "../strategies/state.h" using GameControl::CoordinatorLeaf; /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ void CoordinatorLeaf::receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception) { getCurrentState()->receiveRTBMessageRadar(dist,type,angle); } /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ void CoordinatorLeaf::receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception) { getCurrentState()->receiveRTBMessageInfo(time,speed,cannonAngle); } /** * Destructor does nothing */ CoordinatorLeaf::~CoordinatorLeaf() throw() {} /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ void CoordinatorLeaf::receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception) { getCurrentState()->receiveRTBMessageCoordinates(x,y,angle); } /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ void CoordinatorLeaf::receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception) { getCurrentState()->receiveRTBMessageRobotInfo(energy,isTeamMate); } /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ void CoordinatorLeaf::receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception) // >> Maybe we should introduce { getCurrentState()->receiveRTBMessageRotationReached(what); } // another enum for this TODO /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ void CoordinatorLeaf::receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception) { getCurrentState()->receiveRTBMessageEnergy(energy); } /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ void CoordinatorLeaf::receiveRTBMessageRobotsLeft(int num) throw () { getCurrentState()->receiveRTBMessageRobotsLeft(num); } /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ void CoordinatorLeaf::receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception) { getCurrentState()->receiveRTBMessageCollision(type,angle); } /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ void CoordinatorLeaf::receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception) { getCurrentState()->receiveRTBMessageWarning(warning,message); } /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ void CoordinatorLeaf::receiveRTBMessageDead() throw (StrategyException, bad_exception) { getCurrentState()->receiveRTBMessageDead(); } realtimebattle-1.0.8/team-framework/gamecontrol/servercoordinator.cpp0000644000175000017500000001171010167276177024377 0ustar moimoi/************************************************************************ $Id: servercoordinator.cpp,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: servercoordinator.cpp,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "servercoordinator.h" #include "../io/clientconnection.h" #include "../rtbglobal/masterresourcecontrol.h" #include "../strategies/strategyfactory.h" #include "../strategies/serverstatedata.h" using GameControl::ServerCoordinator; using Strategies::ServerStateData; using GameControl::GameOptionsRepository; using Strategies::StrategyFactory; using Strategies::State; using RTBGlobal::MasterResourceControl; using IO::ClientConnection; using std::endl; using std::out_of_range; using std::string; ServerCoordinator::~ServerCoordinator ()throw() {} ServerCoordinator::ServerCoordinator ( ClientConnection* clientConnection, const GameOptionsRepository* gameOptionsRepository ) throw (ConfigNotLoadedException, KeyNotFoundException,bad_exception, StrategyException,ResourceNotFoundException) :_internalServerSpecificRepository(0),_serverStates(0),_logger(0),_clientConnection(clientConnection) { MasterResourceControl *mrc=MasterResourceControl::Instance(); const StrategyFactory *fac=mrc->getStrategyFactory(mrc->getConfigurationProperty("Strategy","StrategyName")); auto_ptr ssd(fac->createServerStateData(this,gameOptionsRepository)); _serverStates=ssd->serverStates; _internalServerSpecificRepository=ssd->internalServerSpecificRepository; _sharedServerSpecificRepository=ssd->sharedServerSpecificRepository; _finishingString=fac->getFinishingString(); _logger=mrc->createLogger("ServerCoordinator"); _robotName=getAssociatedRobotName(); // This voodoo is done to save time with doing string concatenation only once _logMessage1=_robotName+": The game has been reset."; _logMessage2=_robotName+": Receiving messages from client has been finished."; _logMessage3=_robotName+": State has changed to No. "; _logMessage4=_robotName+": Sending messages to client complete."; _logMessage5=_robotName+": ServerCoordinator : Requested state had invalid index : "; } State* ServerCoordinator::getCurrentState () throw () { return currentServerState; } void ServerCoordinator::resetGame () throw (StrategyException,bad_exception) { // this line is necessary _tipBuffer.clear(); _tipBuffer.str(_emptyString); // reset repositories _internalServerSpecificRepository->reset(); // reset the shared data only once (in the local coordinator) if (_clientConnection->isLocal()) _sharedServerSpecificRepository->reset(); // Calls reset on all state objects and sets the current state to the beginning state. for(pvector::iterator i=_serverStates->begin();i!=_serverStates->end();++i) (*i)->reset(); setCurrentServerState(0); _logger->logMessage(4,_logMessage1); } void ServerCoordinator::processReceivedRTBMessages () throw (StrategyException,bad_exception) { // This method calls sendServerTips on the current server state object. _logger->logMessage(1,_logMessage2); currentServerState->sendServerTips(); endServerTipSequence(); } void ServerCoordinator::setCurrentServerState (unsigned char serverStateIndex) throw (bad_exception,StrategyException) { try { currentServerState=_serverStates->at(serverStateIndex); } catch (out_of_range& ex) { throw StrategyException(_logMessage5+ex.what()); } _currentServerStateIndex=serverStateIndex; ostringstream O; O << int (_currentServerStateIndex); currentServerStateName=O.str(); _logger->logMessage(3,_logMessage3+currentServerStateName); } void ServerCoordinator::endServerTipSequence () throw (bad_exception) { _tipBuffer << _finishingString; _clientConnection->sendLine(_tipBuffer.str()); // this line is necessary _tipBuffer.clear(); _tipBuffer.str(_emptyString); _logger->logMessage(2,_logMessage4); } string ServerCoordinator::getAssociatedRobotName () throw (bad_exception) { return _clientConnection->getTargetName(); } realtimebattle-1.0.8/team-framework/gamecontrol/servergamecontroller.cpp0000644000175000017500000003036310321452616025060 0ustar moimoi/* $Id: servergamecontroller.cpp,v 1.4 2005/10/07 07:33:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: servergamecontroller.cpp,v $ Revision 1.4 2005/10/07 07:33:51 krolfy Fixed some problems Revision 1.3 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "servergamecontroller.h" #include "clientcoordinator.h" #include "servercoordinator.h" #include "../rtbglobal/masterresourcecontrol.h" #include "../io/iofactory.h" #include "../io/localclientconnection.h" #include "../parser/rtbparser.h" #include "../parser/rtbparser.h" #include "../parser/rtbparseresult.h" #include "../parser/message_to_robot_type.h" #include "../parser/game_option_type.h" #include "../io/rtbconnection.h" #include "../exceptions/parserexception.h" #include "../exceptions/ioexception.h" #include "../exceptions/strategyexception.h" #include "../exceptions/serverispresentexception.h" #include "coordinatorcomposite.h" namespace GameControl { using Parser::RTBParser; using Parser::RTBParseResult; using Parser::game_option_type; using std::exception; using IO::LocalClientConnection; using Exceptions::ParserException; using Exceptions::IOException; using Exceptions::StrategyException; using Exceptions::ServerIsPresentException; /** * Methods */ void ServerGameController::resetAll() { for (pvector::iterator i=_coordinators.begin();i!=_coordinators.end();++i) (*i)->resetGame(); } void ServerGameController::delegateToAll() { for (pvector::iterator i=_coordinators.begin();i!=_coordinators.end();++i) RTBParser::delegateLastMessage(*i); } /** * */ bool ServerGameController::start () throw (bad_exception) { // main exception block try { _logger->logMessage(3,"Starting main method in ServerGameController"); bool exitmainloop=false; const RTBParseResult* pr=0; string command; while(!exitmainloop) { // set all clients to live again setAlive(); // read initial messages from the RTB - Server, before we start entering a round command=_rtbConnection->getLine(); pr=RTBParser::processRTBMessage(command); switch(pr->messageType) { case Parser::EXIT_ROBOT: { _logger->logMessage(5,"Received ExitRobot command, exiting...."); exitmainloop=true; break; } case Parser::GAME_STARTS: { _logger->logMessage(5,"Received GameStart command, resetting coordinator..."); resetAll(); break; } case Parser::ROBOTS_LEFT: { _logger->logMessage(5,"Received initial RobotsLeft command, delegating it to Coordinator..."); delegateToAll(); break; } case Parser::GAME_FINISHES: { _logger->logMessage(5,"Received message, that game is over now (we have survived the last game 8-) )"); break; } case Parser::GAME_OPTION: { _logger->logMessage(5,"Received robot option, updating GameOptionsRepository ..."); RTBParser::updateGameOptions(&_gameOptionsRepository); // find out, if we can play with our team in this environment if (pr->intValue[0]==Parser::SEND_ROBOT_COORDINATES) { if (_gameOptionsRepository.SEND_ROBOT_COORDINATES!=double(2)) { _logger->logMessage(50,"Coordinates are not absolute, we cannot join the game 8-("); exitmainloop=true; } // now game is running, process round per round else { _logger->logMessage(10,"Starting new game ..."); while (true) { _logger->logMessage(1,"Started round ..."); pvector::iterator currentc=_coordinators.begin(); vector::iterator currentstat=_alive.begin(); vector::iterator currentname=_robotNames.begin(); pvector::iterator currentcon=_clientConnections.begin(); // process all robots in forward direction while (currentc!=_coordinators.end()) { if (*currentstat) { _logger->logMessage(7,"Process round for robot: "+(*currentname)); bool roundisover=false; while (!roundisover) { command=(*currentcon)->getLine(); pr=RTBParser::processRTBMessage(command); switch (pr->messageType) { case Parser::ENERGY: { _logger->logMessage(5,"Received Energy command, round is finished now.."); roundisover=true; break; } case Parser::DEAD: { _logger->logMessage(5,"We are reported to be dead, exit current game..."); roundisover=true; *currentstat=false; --_numberAliveRobots; break; } case Parser::WARNING: { _logger->logMessage(20,"Received warning from RTB Server: "+pr->stringValue); break; } case Parser::RADAR: { _logger->logMessage(4,"Received Radar command..."); break; } case Parser::INFO: { _logger->logMessage(4,"Received Info command..."); break; } case Parser::COORDINATES: { _logger->logMessage(4,"Received Coordinates command..."); break; } case Parser::ROBOT_INFO: { _logger->logMessage(4,"Received Robot Info command..."); break; } case Parser::ROTATION_REACHED: { _logger->logMessage(4,"Received Rotation Reached command..."); break; } case Parser::ROBOTS_LEFT: { _logger->logMessage(4,"Received Robots Left command..."); break; } case Parser::COLLISION: { _logger->logMessage(4,"Received Collision command..."); break; } default: { throw ParserException("Received command from RTBServer, that was not expected at this moment: "+command); } } // now delegate message to the coordinator _logger->logMessage(2,"Delegating message ..."); RTBParser::delegateLastMessage(*currentc); } } // next robot ++currentc; ++currentname; ++currentstat; ++currentcon; } // all robots are dead, game is over now if (!_numberAliveRobots) break; // now generate server tips for alive robots do { // next robot --currentc; --currentname; --currentstat; if (*currentstat) { _logger->logMessage(7,"Generate server tips for robot: "+(*currentname)); (*currentc)->processReceivedRTBMessages(); } } while (currentc!=_coordinators.begin()); _logger->logMessage(1,"Finished round ..."); } _logger->logMessage(10,"Finished game ..."); } } break; } case Parser::WARNING: { _logger->logMessage(20,"Received warning from RTB Server: "+pr->stringValue); RTBParser::delegateLastMessage(*(_coordinators.begin())); break; } default: { throw ParserException("Received command from RTBServer, that was not expected at this moment: "+command); } } } } catch (IOException& e) { _logger->logMessage(100,"Main loop in ServerGameController caught exception that was thrown because our Command Parser figured out a serious mistake: "+e.getMessage()); _logger->logMessage(3,"Exiting ServerGameControl::start because of occured exception"); return false; } catch (StrategyException& e) { _logger->logMessage(100,"Main loop in ServerGameController caught exception caused by a broken strategy component: "+e.getMessage()); _logger->logMessage(3,"Exiting ServerGameControl::start because of occured exception"); return false; } catch (ParserException& e) { _logger->logMessage(100,"Main loop in ServerGameController caught exception that was thrown by a rtb-framework component: "+e.getMessage()); _logger->logMessage(3,"Exiting ServerGameControl::start because of occured exception"); return false; } catch (RTBException& e) { _logger->logMessage(100,"Main loop in ServerGameController caught exception that was thrown by a rtb-framework component: "+e.getMessage()); _logger->logMessage(3,"Exiting ServerGameControl::start because of occured exception"); return false; } catch (exception& e) { _logger->logMessage(100,"Main loop in ServerGameController caught exception that was thrown by a STL component: "+string(e.what())); _logger->logMessage(3,"Exiting ServerGameControl::start because of occured exception"); return false; } _logger->logMessage(3,"Exiting ServerGameControl::start because rtb server wants us to quit..."); return true; } /** * Constructors/Destructors */ /** * */ ServerGameController::ServerGameController (auto_ptr serverCommunicator) throw (RTBException, bad_exception):_rtbConnection(0),_serverCommunicator(serverCommunicator),_logger(0),_numberRobots(0),_numberAliveRobots(0), _localClientCoordinator(0),_localServerCoordinator(0) { // get MRC _mrc=MasterResourceControl::Instance(); // get Logger _logger=_mrc->createLogger("ServerGameController"); _logger->logMessage(2,"Initializing ServerGameController (constructor)"); // obtain the RTB Connection _rtbConnection=_mrc->getIOFactory()->getRTBConnection(); _logger->logMessage(3,"Initializing the local client ..."); // create the local client coordinator (finite state machine for the processing of the RTB messages) _localClientCoordinator.reset(new ClientCoordinator(&_gameOptionsRepository, _rtbConnection)); // create the local client connection _clientConnections.push_back(new LocalClientConnection(_rtbConnection,_localClientCoordinator.get())); // create the local server coordinator _localServerCoordinator.reset(new ServerCoordinator(*(_clientConnections.begin()),&_gameOptionsRepository)); // finally, create the coordinator composite _coordinators.push_back(new CoordinatorComposite(_localClientCoordinator.get(),_localServerCoordinator.get())); // set the name of the local robot _robotNames.push_back((*_clientConnections.begin())->getTargetName()); // add a field in the alive stats _alive.push_back(true); // increment number of robots ++_numberRobots; _logger->logMessage(10,"Waiting for remote clients ..."); try { while(true) { auto_ptr rc(_serverCommunicator->createRemoteClientConnection()); string tn=rc->getTargetName(); _logger->logMessage(10,"Adding connection from robot: "+tn); _robotNames.push_back(tn); _coordinators.push_back(new ServerCoordinator(rc.get(),&_gameOptionsRepository)); _clientConnections.push_back(rc.release()); // add a field in the alive stats _alive.push_back(true); ++_numberRobots; } } catch (ServerIsPresentException& e) { _logger->logMessage(10,"Finished waiting for remote clients, starting game now ..."); } } void ServerGameController::setAlive() { for (vector::iterator i=_alive.begin();i!=_alive.end();++i) *i=true; _numberAliveRobots=_numberRobots; } /** * */ ServerGameController::~ServerGameController () throw() { } } realtimebattle-1.0.8/team-framework/io/0002755000175000017500000000000010404234033016173 5ustar moimoirealtimebattle-1.0.8/team-framework/io/clientcommunicator.h0000644000175000017500000000630510167276177022272 0ustar moimoi/************************************************************************ $Id: clientcommunicator.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: clientcommunicator.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef CLIENTCOMMUNICATOR_H #define CLIENTCOMMUNICATOR_H #include "serverconnection.h" /** * Namespace IO */ namespace IO { /** * Class ClientCommunicator */ class ClientCommunicator { /* * Public stuff */ public: /* * Fields */ /* * */ /* * Constructors */ /* * Accessor Methods */ /* * Operations */ /** * Destructor, has to delete serverconnection. */ virtual ~ClientCommunicator () throw() {} /** * Establish connection to server. * @return Connection to communicator directly with the server. */ virtual ServerConnection* getServerConnection () throw(IOException, bad_exception) = 0; /* * Protected stuff */ protected: /* * Fields */ /* * */ /* * Constructors */ /* * Accessor Methods */ /* * Operations */ /* * Private stuff */ private: /* * Fields */ /* * */ /* * Constructors */ /* * Accessor Methods */ /* * Operations */ }; } #endif //CLIENTCOMMUNICATOR_H realtimebattle-1.0.8/team-framework/io/clientconnection.h0000644000175000017500000000340410167276177021726 0ustar moimoi/************************************************************************ $Id: clientconnection.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: clientconnection.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef CLIENTCONNECTION_H #define CLIENTCONNECTION_H #include "connection.h" /** * Namespace IO */ namespace IO { /** * Class ClientConnection */ class ClientConnection : public Connection { /* * Public stuff */ public: /* * Operations */ /** * Returns, whether the client is the local client or one of the remote clients. */ virtual bool isLocal () throw() = 0; /** * Destructor, does nothing. */ virtual ~ClientConnection () throw() {}; }; } #endif //CLIENTCONNECTION_H realtimebattle-1.0.8/team-framework/io/connection.h0000644000175000017500000000463310167276177020534 0ustar moimoi/************************************************************************ $Id: connection.h,v 1.2 2005/01/06 17:59:27 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: connection.h,v $ Revision 1.2 2005/01/06 17:59:27 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef CONNECTION_H #define CONNECTION_H #include "../exceptions/ioexception.h" #include "../exceptions/strategyexception.h" #include #include /** * Namespace IO */ namespace IO { using std::string; using std::bad_exception; using Exceptions::IOException; using Exceptions::StrategyException; /** * Class Connection */ class Connection { /* * Public stuff */ public: /* * Destructors */ /** * Destructor, does nothing. */ virtual ~Connection () throw() {}; /* * Operations */ /** * NOTE: the StrategyException is neccessary (see LocalClientConnection::sendLine) * @param line Message that will be send over the connection (does not append a trailing newline) */ virtual void sendLine (const string& line) throw(StrategyException, IOException, bad_exception) = 0; /** * @return string that contains a line out of the connection (not terminated with newline) */ virtual string getLine () throw(IOException, bad_exception) = 0; /** * @return name of the associated target */ virtual string getTargetName () throw(IOException, bad_exception) = 0; }; } #endif //CONNECTION_H realtimebattle-1.0.8/team-framework/io/iofactory.h0000644000175000017500000000615210167276200020355 0ustar moimoi/************************************************************************ $Id: iofactory.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: iofactory.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef IOFACTORY_H #define IOFACTORY_H #include "ionamespace.h" #include "../gamecontrol/gamecontrolnamespace.h" #include "../exceptions/ioexception.h" #include "../exceptions/serverispresentexception.h" #include /** * Namespace */ namespace IO { using std::auto_ptr; using std::bad_exception; using Exceptions::ServerIsPresentException; using Exceptions::IOException; /** * Class IOFactory */ class IOFactory { /* * Public stuff */ public: /** * Destructor, does nothing. */ virtual ~IOFactory () {} /* * Operations */ /** * Tries to create a ServerCommunicator if no MasterServer is already present * Otherwise, throws a ServerIsPresentException */ virtual auto_ptr createServerCommunicator () const throw(IOException, ServerIsPresentException, bad_exception) = 0; /** * Since the RealTime Battle Server will restart our program (and therefore cause ugly problems) * if we tell it, that we want to use a blocking communication mode, we do not say so (but stating the opposite), but manage * the blocking with manipulating standard in and standard out by ourselves with this method. * This method should be called before any read or write access to the RTBConnection object was made. */ virtual void switch2BlockingMode() const throw (IOException, bad_exception) = 0; /** * This method create an ClientCommunicator and should be call after createServerCommunicator * throws an ServerIsPresentException. */ virtual auto_ptr createClientCommunicator () const throw(IOException, bad_exception) = 0; /** * Important: RTBConnection should be initialized only once!!! * NOTE: The concrete factory is in to delete the rtbconnection object!!! */ virtual RTBConnection* getRTBConnection () const throw(IOException, bad_exception) = 0; }; } #endif //IOFACTORY_H realtimebattle-1.0.8/team-framework/io/ionamespace.h0000644000175000017500000000277310167276200020647 0ustar moimoi/************************************************************************ $Id: ionamespace.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: ionamespace.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ /** * Namespace IO */ namespace IO { class IOFactory; class ClientCommunicator; class ServerCommunicator; class RTBConnection; class Connection; class ClientConnection; class RemoteClientConnection; class LocalClientConnection; class ServerConnection; } realtimebattle-1.0.8/team-framework/io/localclientconnection.h0000644000175000017500000000571610167276200022734 0ustar moimoi/************************************************************************ $Id: localclientconnection.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: localclientconnection.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef LOCALCLIENTCONNECTION_H #define LOCALCLIENTCONNECTION_H #include "clientconnection.h" #include "../gamecontrol/gamecontrolnamespace.h" #include "../io/ionamespace.h" /** * Namespace IO */ namespace IO { using std::bad_exception; using GameControl::ClientCoordinator; /** * Class LocalClientConnection * * Class should be used to read from the RTB connection instead from reading from a client socket and to delegate all write operations to the corresponding local ClientCoordinator instead of writing it on a client socket. */ class LocalClientConnection : public ClientConnection { /* * Public stuff */ public: /** * Constructors */ LocalClientConnection(RTBConnection* rtbConnection, ClientCoordinator* clientCoordinator) throw(bad_exception); /* * Accessor Methods */ /* * Operations */ /** * Destructor, does nothing. */ ~LocalClientConnection () throw(); /** * Calls getLine from RTBConnection (read-access) */ string getLine () throw(IOException, bad_exception); /** * Invokes reactOnServerTip instead of writing to IO-Connection (write-access) * @param line contains data to send */ void sendLine (const string& line) throw(StrategyException, IOException, bad_exception); /** * @return true */ bool isLocal () throw(); /** * @return TargetName from RTB-Connection */ string getTargetName () throw(IOException, bad_exception); /* * Private stuff */ private: /* * Fields */ /** * Pointer to the RTBConnection for reading */ RTBConnection* _rtbConnection; /** * Pointer to the ClientCoordinator for writing */ ClientCoordinator* _clientCoordinator; }; } #endif //LOCALCLIENTCONNECTION_H realtimebattle-1.0.8/team-framework/io/remoteclientconnection.h0000644000175000017500000000362010167276200023125 0ustar moimoi/************************************************************************ $Id: remoteclientconnection.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: remoteclientconnection.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef REMOTECLIENTCONNECTION_H #define REMOTECLIENTCONNECTION_H #include "clientconnection.h" /** * Namespace IO */ namespace IO { /** * Class RemoteClientConnection * This class is only a symbolic substitute for the concrete implementation of a platform specific solution */ class RemoteClientConnection : public ClientConnection { /* * Public stuff */ public: /** * Destructor, does nothing. */ virtual ~RemoteClientConnection () throw() {}; }; } #endif //REMOTECLIENTCONNECTION_H realtimebattle-1.0.8/team-framework/io/rtbconnection.h0000644000175000017500000000340710167276200021225 0ustar moimoi/************************************************************************ $Id: rtbconnection.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: rtbconnection.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef RTBCONNECTION_H #define RTBCONNECTION_H #include "connection.h" /** * Namespace IO */ namespace IO { /** * Class RTBConnection * The RTB connection capsules the communication to the rtb server. For example, you can implement this as a simple wrapper for cin and cout. * Note: Has to be implemented as a SINGLETON */ class RTBConnection : public Connection { /* * Public stuff */ public: /** * Destructor, does nothing. */ virtual ~RTBConnection () throw() {} }; } #endif //RTBCONNECTION_H realtimebattle-1.0.8/team-framework/io/servercommunicator.h0000644000175000017500000000420310167276200022300 0ustar moimoi/************************************************************************ $Id: servercommunicator.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: servercommunicator.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef SERVERCOMMUNICATOR_H #define SERVERCOMMUNICATOR_H #include "ionamespace.h" #include "../stdnamespace.h" #include "../exceptions/serverispresentexception.h" #include "../exceptions/ioexception.h" #include /** * Namespace IO */ namespace IO { using Exceptions::ServerIsPresentException; using Exceptions::IOException; using std::auto_ptr; using std::bad_exception; /** * Class ServerCommunicator */ class ServerCommunicator { /* * Public stuff */ public: /* * Operations */ /** * Establish connection to remoteclient. * @return Connection to communicator directly with the remoteclient. */ virtual auto_ptr createRemoteClientConnection () throw(ServerIsPresentException, IOException, bad_exception) = 0; /** * Destructor, does nothing. */ virtual ~ServerCommunicator () {} }; } #endif //SERVERCOMMUNICATOR_H realtimebattle-1.0.8/team-framework/io/serverconnection.h0000644000175000017500000000325710167276200021747 0ustar moimoi/************************************************************************ $Id: serverconnection.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: serverconnection.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef SERVERCONNECTION_H #define SERVERCONNECTION_H #include "connection.h" /** * Namespace IO */ namespace IO { /** * Class ServerConnection * Note: Has to be implemented as a SINGLETON */ class ServerConnection : public Connection { /* * Public stuff */ public: /* * Destructors */ /** * Destructor, does nothing */ virtual ~ServerConnection () throw() {}; }; } #endif //SERVERCONNECTION_H realtimebattle-1.0.8/team-framework/io/unixclientcommunicator.h0000644000175000017500000000555410167276200023166 0ustar moimoi/************************************************************************ $Id: unixclientcommunicator.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixclientcommunicator.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef UNIXCLIENTCOMMUNICATOR_H #define UNIXCLIENTCOMMUNICATOR_H #include "clientcommunicator.h" #include "../log/lognamespace.h" #include "../rtbglobal/rtbglobalnamespace.h" #include /** * Namespace IO */ namespace IO { using Log::Logger; using RTBGlobal::MasterResourceControl; using std::auto_ptr; using std::bad_exception; /** * Class UnixClientCommunicator */ class UnixClientCommunicator : public ClientCommunicator { /* * Public stuff */ public: /** * Constructors */ UnixClientCommunicator () throw(IOException, bad_exception); /* * Destructor */ /** * Has to delete serverconnection */ ~UnixClientCommunicator () throw(); /** * Establish connection to server. * @return Connection to communicator directly with the server. */ ServerConnection* getServerConnection () throw(IOException, bad_exception); /* * Private stuff */ private: /** * Fields */ /** * Pointer to ServerConnection */ ServerConnection* _serverConnection; /** * Invariant, which contains the information whether serverConnection is allocated. */ bool _serverConnectionInv; /** * for logging important io-messages */ auto_ptr _logger; /** * to allocate resources we need a pointer to the MasterResourceControl */ MasterResourceControl* _mrc; /* * Operations */ /** * Obtains a ServerConnection by connecting to the already available unix-domain-socket */ void obtainServerConnection() throw(IOException, bad_exception); }; } #endif //CLIENTCOMMUNICATOR_H realtimebattle-1.0.8/team-framework/io/unixinstream.h0000644000175000017500000000422510167276200021103 0ustar moimoi/************************************************************************ $Id: unixinstream.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixinstream.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef UNIXINSTREAM_H #define UNIXINSTREAM_H #include #include "unixinstreambuf.h" /** * Namespace IO */ namespace IO { using std::istream; using std::string; /** * Class UnixInStream */ class UnixInStream : public istream { /* * Public stuff */ public: /** * Constructors * @param fd unix-filedescriptor */ UnixInStream (int fd) throw(IOException, bad_exception); /* * Methods */ /** * reads from buffer and extract a line * @return string which contains the line */ string getline(void) throw(IOException, bad_exception); /* * Private stuff */ private: /* * Methods */ /** * Streambuf-object to read data from filedecriptor into buffer */ UnixInStreambuf _unixInStreambuf; /** * unix-filedescriptor */ int _fd; /** * read data, better to place it here */ char _readBuffer[65536]; }; } #endif //UNIXINSTREAM_H realtimebattle-1.0.8/team-framework/io/unixinstreambuf.h0000644000175000017500000000431710167276200021602 0ustar moimoi/************************************************************************ $Id: unixinstreambuf.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixinstreambuf.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef UNIXINSTREAMBUF_H #define UNIXINSTREAMBUF_H #include "../exceptions/ioexception.h" #include #include /** * Namespace IO */ namespace IO { using std::streambuf; using std::bad_exception; using Exceptions::IOException; /** * Class UnixInStreamBuf * NOTE: No putback-buffer implemented. */ class UnixInStreambuf : public streambuf { /* * Public stuff */ public: /** * Constructor * @param fd unix-filedescriptor */ UnixInStreambuf(int fd) throw(IOException, bad_exception); /** * Destructor, has to delete _buffer */ ~UnixInStreambuf() throw(); /* * Private stuff */ private: /** * filedescriptor */ const int _fd; /** * size of buffer */ int _bufferSize; /** * buffer */ char *_buffer; /* * Methods */ /** * fill buffer by reading from filedescriptor */ int underflow () throw(IOException, bad_exception); }; } #endif //UNIXINSTREAMBUF_H realtimebattle-1.0.8/team-framework/io/unixiofactory.h0000644000175000017500000000632010167276200021256 0ustar moimoi/************************************************************************ $Id: unixiofactory.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixiofactory.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef UNIXIOFACTORY_H #define UNIXIOFACTORY_H #include "iofactory.h" #include "../log/logger.h" #include "../rtbglobal/rtbglobalnamespace.h" /** * Namespace IO */ namespace IO { using RTBGlobal::MasterResourceControl; using Log::Logger; using Exceptions::RTBException; /** * Class IOFactory */ class UnixIOFactory : public IOFactory { /* * Public stuff */ public: /** * Constructor */ UnixIOFactory () throw(bad_exception); /** * Destructor, does nothing. */ ~UnixIOFactory () throw(); /* * Operations */ /** * Tries to create a ServerCommunicator if no MasterServer is already present * Otherwise, throws a ServerIsPresentException */ auto_ptr createServerCommunicator () const throw(IOException, ServerIsPresentException, bad_exception); /** * Since the RealTime Battle Server will restart our program (and therefore cause ugly problems) * if we tell it, that we want to use a blocking communication mode, we do not say so (but stating the opposite), but manage * the blocking with manipulating standard in and standard out by ourselves with this method. * This method should be called before any read or write access to the RTBConnection object was made. */ void switch2BlockingMode() const throw (IOException, bad_exception); /** * This method create an ClientCommunicator and should be call after createServerCommunicator * throws an ServerIsPresentException. */ auto_ptr createClientCommunicator () const throw(IOException, bad_exception); /** * Important: RTBConnection should be initialized only once!!! * NOTE: The concrete factory is in to delete the rtbconnection object!!! */ RTBConnection* getRTBConnection () const throw(IOException, bad_exception); /* * Private stuff */ private: /* * Fields */ /** * for resource-requisition */ MasterResourceControl* _mrc; }; } #endif //UNIXIOFACTORY_H realtimebattle-1.0.8/team-framework/io/unixoutstream.h0000644000175000017500000000425310167276200021305 0ustar moimoi/************************************************************************ $Id: unixoutstream.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixoutstream.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef UNIXOUTSTREAM_H #define UNIXOUTSTREAM_H #include #include "unixoutstreambuf.h" /** * Namespace IO */ namespace IO { using std::ostream; using std::string; /** * Class UnixOutStream */ class UnixOutStream : public ostream { /* * Public stuff */ public: /** * Constructors * @param fd unix-filedescriptor */ UnixOutStream (int fd) throw(bad_exception); /* * Methods */ /** * convert the string into a simple run-length-encoded lines and send the lines * @param line string which contains the line(s) to send */ void sendline(const string& line) throw(IOException, bad_exception); /* * Private stuff */ private: /** * Streambuf-object to write data to filedecriptor */ UnixOutStreambuf _unixOutStreambuf; /** * temporary string for converting lines */ string _sendString; /** * unix-filedescriptor */ int _fd; }; } #endif //UNIXOUTSTREAM_H realtimebattle-1.0.8/team-framework/io/unixoutstreambuf.h0000644000175000017500000000421010167276200021773 0ustar moimoi/************************************************************************ $Id: unixoutstreambuf.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixoutstreambuf.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef UNIXOUTSTREAMBUF_H #define UNIXOUTSTREAMBUF_H #include "../exceptions/ioexception.h" #include #include /** * Namespace IO */ namespace IO { using std::streambuf; using std::streamsize; using std::bad_exception; using Exceptions::IOException; /** * Class UnixOutStreamBuf * NOTE: No buffer implemented. */ class UnixOutStreambuf : public streambuf { /* * Public stuff */ public: /** * Constructor * @param fd unix-filedescriptor */ UnixOutStreambuf(int fd) throw(); /* * Private stuff */ private: /** * filedescriptor */ int _fd; /** * writing a character */ int overflow (int character) throw(IOException, bad_exception); /** * writing any number of characters */ streamsize xsputn (const char* databuffer, streamsize size) throw(IOException, bad_exception); }; } #endif //UNIXOUTSTREAMBUF_H realtimebattle-1.0.8/team-framework/io/unixremoteclientconnection.h0000644000175000017500000000566410167276200024043 0ustar moimoi/************************************************************************ $Id: unixremoteclientconnection.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixremoteclientconnection.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef UNIXREMOTECLIENTCONNECTION_H #define UNIXREMOTECLIENTCONNECTION_H #include "remoteclientconnection.h" #include "unixinstream.h" #include "unixoutstream.h" /** * Namespace IO */ namespace IO { /** * Class RemoteClientConnection * This class is only a symbolic substitute for the concrete implementation of a platform specific solution */ class UnixRemoteClientConnection : public RemoteClientConnection { /* * Public stuff */ public: /** * Constructors * @param clientSocket socket (unix-filedescriptor) */ UnixRemoteClientConnection (int clientSocket) throw(IOException, bad_exception); /** * Destructor, has to close connection */ ~UnixRemoteClientConnection () throw(); /** * * @param line Message that will be send over the connection (does not append a trailing newline) */ void sendLine (const string& line) throw(StrategyException, IOException, bad_exception); /** * @return string that contains a line out of the connection (not terminated with newline) */ string getLine () throw(IOException, bad_exception); /** * @return name of the associated target */ string getTargetName () throw(); /** * Returns, whether the client is the local client or one of the remote clients */ bool isLocal () throw(); /* * Private stuff */ private: /** * unix-socket-fd to remoteclient */ int _clientSocket; /** * corresponding robotname */ string _targetName; /** * stream for reading data from remoteclient */ UnixInStream _inStream; /** * stream for writing data to remoteclient */ UnixOutStream _outStream; }; } #endif //UNIXREMOTECLIENTCONNECTION_H realtimebattle-1.0.8/team-framework/io/unixrtbconnection.h0000644000175000017500000000563310167276200022134 0ustar moimoi/************************************************************************ $Id: unixrtbconnection.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixrtbconnection.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef UNIXRTBCONNECTION_H #define UNIXRTBCONNECTION_H #include "rtbconnection.h" #include "unixinstream.h" #include "unixoutstream.h" #include /** * Namespace IO */ namespace IO { using std::auto_ptr; /** * Class RTBConnection * The RTB connection capsules the communication to the rtb server. For example, you can implement this as a simple wrapper for cin and cout. * Note: Has to be implemented as a SINGLETON */ class UnixRTBConnection : public RTBConnection { /* * Public stuff */ public: /** * Destructor, does nothing */ ~UnixRTBConnection () throw(); /* * Operations */ /** * returns an instance (->singleton pattern) */ static UnixRTBConnection* instance() throw(bad_exception); /** * * @param line Message that will be send over the connection (does not append a trailing newline) */ void sendLine (const string& line) throw(StrategyException, IOException, bad_exception); /** * @return string that contains a line out of the connection (not terminated with newline) */ string getLine () throw(IOException, bad_exception); /** * @return name of the associated target */ string getTargetName () throw(IOException, bad_exception); /* * Private stuff */ private: /** * pointer for singleton */ static auto_ptr _instance; /** * stream for reading data from remoteclient */ UnixInStream _inStream; /** * stream for writing data to remoteclient */ UnixOutStream _outStream; /** * Private constructor (->singleton pattern) */ UnixRTBConnection() throw(bad_exception); }; } #endif //UNIXRTBCONNECTION_H realtimebattle-1.0.8/team-framework/io/unixservercommunicator.h0000644000175000017500000000560510264524652023220 0ustar moimoi/************************************************************************ $Id: unixservercommunicator.h,v 1.3 2005/07/11 17:17:30 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixservercommunicator.h,v $ Revision 1.3 2005/07/11 17:17:30 jonico removed some fcntl includes, improved socket filename deletion, introduced blocking parameter for security infrastructure Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef UNIXSERVERCOMMUNICATOR_H #define UNIXSERVERCOMMUNICATOR_H #include "servercommunicator.h" #include "../log/logger.h" #include "../exceptions/rtbexception.h" #include "../rtbglobal/masterresourcecontrol.h" #include /** * Namespace IO */ namespace IO { using Log::Logger; using RTBGlobal::MasterResourceControl; using Exceptions::RTBException; using std::string; /** * Class ServerCommunicator */ class UnixServerCommunicator : public ServerCommunicator { /* * Public stuff */ public: /** * Constructor */ UnixServerCommunicator() throw(IOException, ServerIsPresentException, bad_exception); /* * Operations */ /** * Establish connection to remoteclient. * @return Connection to communicator directly with the remoteclient. */ auto_ptr createRemoteClientConnection () throw(ServerIsPresentException, IOException, bad_exception); /** * */ ~UnixServerCommunicator () throw(); /* * Private stuff */ private: /** * socket to server (unix-filedescriptor) */ int _serverSocket; /** * flag if server socket is bound to a filename */ bool _serverSocketBound; /** * flag if server socket is */ /** * for logging messages... */ auto_ptr _logger; /** * for resource- requisition */ MasterResourceControl* _mrc; /** * name of the unix-domain-socket */ string _domainName; }; } #endif //UNIXSERVERCOMMUNICATOR_H realtimebattle-1.0.8/team-framework/io/unixserverconnection.h0000644000175000017500000000631010167276200022644 0ustar moimoi/************************************************************************ $Id: unixserverconnection.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixserverconnection.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef UNIX_SERVERCONNECTION_H #define UNIX_SERVERCONNECTION_H #include "serverconnection.h" #include "unixinstream.h" #include "unixoutstream.h" #include /** * Namespace IO */ namespace IO { using std::auto_ptr; /** * Class ServerConnection * Note: Has to be implemented as a SINGLETON */ class UnixServerConnection : public ServerConnection { /* * Public stuff */ public: /** * Constructor * @param serverSocket socket form an already etablished connection to the server */ UnixServerConnection (int serverSocket) throw(IOException, bad_exception); /** * Destructor, does nothing */ ~UnixServerConnection () throw(); /* * Methods */ /** * return an instance (->singleton pattern) */ static UnixServerConnection* instance(int serverSocket) throw(IOException, bad_exception); /** * * @param line Message that will be send over the connection (does not append a trailing newline) */ void sendLine (const string& line) throw(StrategyException, IOException, bad_exception); /** * @return string that contains a line out of the connection (not terminated with newline) */ string getLine () throw(IOException, bad_exception); /** * @return name of the associated target */ string getTargetName () throw(IOException, bad_exception); /* * Private stuff */ private: /** * pointer for singleton */ static auto_ptr _instance; /** * unix-socket-fd to remoteclient */ int _serverSocket; /** * corresponding robotname */ string _serverName; /** * stream for reading data from remoteclient */ UnixInStream _inStream; /** * stream for writing data to remoteclient */ UnixOutStream _outStream; /* * Methods */ /** * Private constructor (->singleton pattern) */ UnixServerConnection () throw(IOException, bad_exception); }; } #endif //UNIX_SERVERCONNECTION_H realtimebattle-1.0.8/team-framework/io/localclientconnection.cpp0000644000175000017500000000610210167276200023255 0ustar moimoi/************************************************************************ $Id: localclientconnection.cpp,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: localclientconnection.cpp,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "localclientconnection.h" #include "../gamecontrol/clientcoordinator.h" #include "rtbconnection.h" namespace IO { using GameControl::ClientCoordinator; using IO::RTBConnection; /** * Constructors/Destructors */ LocalClientConnection::LocalClientConnection(RTBConnection* rtbConnection, ClientCoordinator* clientCoordinator) throw (bad_exception):_rtbConnection(rtbConnection),_clientCoordinator(clientCoordinator) { } /** * Methods */ /** * */ LocalClientConnection::~LocalClientConnection () throw() { } /** * */ string LocalClientConnection::getLine () throw(IOException,bad_exception) { return _rtbConnection->getLine(); } /** * */ void LocalClientConnection::sendLine (const string& line) throw(StrategyException, IOException, bad_exception) { if( line.size() > 0 ) { unsigned int datalen; int lastNewline = 0; int aktualNewline; //convert string from pattern: // data + \n + data + \n + data to single lines and delegate them to the client coordinator // a trailing newline at the end of the whole line will be ignored while(true) { aktualNewline = line.find('\n', lastNewline); if( aktualNewline < 0 ) { aktualNewline=line.size(); datalen = aktualNewline - lastNewline; if (datalen==0) break; _clientCoordinator->reactOnServerTip(line.substr(lastNewline, datalen)); break; } datalen = aktualNewline - lastNewline; _clientCoordinator->reactOnServerTip(line.substr(lastNewline, datalen)); lastNewline = aktualNewline + 1; } } } /** * */ bool LocalClientConnection::isLocal () throw() { return true; } /** * */ string LocalClientConnection::getTargetName () throw(IOException,bad_exception) { return _rtbConnection->getTargetName()+" (local one)"; } } realtimebattle-1.0.8/team-framework/io/unixclientcommunicator.cpp0000644000175000017500000001143510321271470023510 0ustar moimoi/************************************************************************ $Id: unixclientcommunicator.cpp,v 1.5 2005/10/06 18:55:52 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixclientcommunicator.cpp,v $ Revision 1.5 2005/10/06 18:55:52 jonico Added verbose messages about the name of the unix domain sockets in order to facilitate error tracking for the user. Revision 1.4 2005/07/11 17:17:30 jonico removed some fcntl includes, improved socket filename deletion, introduced blocking parameter for security infrastructure Revision 1.3 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "unixclientcommunicator.h" #include "unixserverconnection.h" #include "../rtbglobal/masterresourcecontrol.h" #include "../log/logger.h" #include "../exceptions/rtbexception.h" #include "../exceptions/keynotfoundexception.h" #include "../exceptions/confignotloadedexception.h" // #include #include #include #include /** * Namespace */ namespace IO { using Log::Logger; using RTBGlobal::MasterResourceControl; using Exceptions::RTBException; using Exceptions::KeyNotFoundException; using Exceptions::ConfigNotLoadedException; /** * Constructors */ UnixClientCommunicator::UnixClientCommunicator () throw(IOException, bad_exception) : _serverConnection(0), _serverConnectionInv(false), _mrc(MasterResourceControl::Instance()) { //obtain logger try { _logger = _mrc->createLogger("IO"); } catch (RTBException& e) { throw IOException("Could not obtain logger in UnixIOFactory::getSocket, nested exception is: "+e.getMessage()); } // log Message _logger->logMessage(2, "Initializing UnixClientCommunicator."); } /** * Destructor */ /** * Has to delete serverconnection */ UnixClientCommunicator::~UnixClientCommunicator () throw() { } /** * Methods */ void UnixClientCommunicator::obtainServerConnection() throw(IOException, bad_exception) { //open Socket int serverSocket = socket(AF_UNIX, SOCK_STREAM, 0); if( serverSocket < 0 ) throw IOException("Could not open socket. socket() failed."); //socket is in blocking-mode per default //_logger->logMessage(2, "Switch socket to blocking-mode."); //if( fcntl(serverSocket, F_SETFL, fcntl(serverSocket, F_GETFL, 0) & (~O_NONBLOCK)) != 0 ) // throw IOException("Could not switch to blocking-mode. fcntl() failed."); //try to get the name of unix-domain-socket from configfile string domainName; try { domainName = _mrc->getConfigurationProperty("IO","DomainSocketName"); } catch(KeyNotFoundException& e) { close(serverSocket); throw IOException("Could not get DomainSocketName from section IO. KeyNotFoundException occured: " + e.getMessage()); } catch(ConfigNotLoadedException& e) { throw IOException("Could not get DomainSocketName from section IO. ConfigNotLoadedException occured: " + e.getMessage()); } //initializing data for socket sockaddr_un socketData; socketData.sun_family = AF_UNIX; domainName.copy(socketData.sun_path, domainName.size()); socketData.sun_path[domainName.size()] = 0; //establish connection to master-server _logger->logMessage(10, "Establish connection to master-server via socket "+domainName); if( connect(serverSocket, reinterpret_cast(&socketData), sizeof(socketData)) < 0 ) { close(serverSocket); throw IOException("Could not establish connection to Master-Server. connect() failed."); } //get UnixServerConnection _serverConnection = UnixServerConnection::instance(serverSocket); _serverConnectionInv = true; } /** * */ ServerConnection* UnixClientCommunicator::getServerConnection () throw(IOException, bad_exception) { if( !_serverConnectionInv ) obtainServerConnection(); return _serverConnection; } } realtimebattle-1.0.8/team-framework/io/unixinstream.cpp0000644000175000017500000000417210167276200021437 0ustar moimoi/************************************************************************ $Id: unixinstream.cpp,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixinstream.cpp,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "unixinstream.h" #include /** * Namespace */ namespace IO { using std::ostringstream; /** * Constructors */ UnixInStream::UnixInStream (int fd) throw(IOException, bad_exception) : istream(0), _unixInStreambuf(fd), _fd(fd) { rdbuf(&_unixInStreambuf); //set exception-behavior exceptions(ios_base::badbit | ios_base::failbit); } /** * Methods */ string UnixInStream::getline(void) throw(IOException, bad_exception) { try { //read datalength char lenBuffer[2]; read(lenBuffer, 2); int datalen = (lenBuffer[0] << 8) | lenBuffer[1]; read(_readBuffer, datalen); _readBuffer[datalen] = 0; return string(_readBuffer); } catch(istream::failure& e) { ostringstream int2string; int2string << _fd; throw IOException("Error while reading from fd" + int2string.str()+ ": " + e.what()); } } } realtimebattle-1.0.8/team-framework/io/unixinstreambuf.cpp0000644000175000017500000000743610167276200022142 0ustar moimoi/************************************************************************ $Id: unixinstreambuf.cpp,v 1.3 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixinstreambuf.cpp,v $ Revision 1.3 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "unixinstreambuf.h" #include "../rtbglobal/masterresourcecontrol.h" #include "../exceptions/keynotfoundexception.h" #include "../exceptions/confignotloadedexception.h" #include #include /** * Namespace */ namespace IO { using RTBGlobal::MasterResourceControl; using Exceptions::KeyNotFoundException; using Exceptions::ConfigNotLoadedException; using std::istringstream; using std::ostringstream; using std::streamsize; using std::string; /** * Constructor */ UnixInStreambuf::UnixInStreambuf(int fd) throw(IOException, bad_exception) : _fd(fd),_bufferSize(-1) { //try to get the size of readbuffer from configfile MasterResourceControl* mrc = MasterResourceControl::Instance(); string readBufferSize; try { readBufferSize = mrc->getConfigurationProperty("IO","ReadBufferSize"); } catch(KeyNotFoundException& e) { throw IOException("Could not get ReadBufferSize from section IO. KeyNotFoundException occured: " + e.getMessage()); } catch(ConfigNotLoadedException& e) { throw IOException("Could not get ReadBufferSize from section IO. ConfigNotLoadedException occured: " + e.getMessage()); } istringstream string2int(readBufferSize); //initialize buffer string2int >> _bufferSize; if (_bufferSize<10) throw IOException("ReadBufferSize from section IO was not a number above 10 bytes!"); _buffer = new char[_bufferSize]; //initialize bufferpointers (eback() = gptr() = egptr() = _buffer) //implies underflow() setg(_buffer, _buffer, _buffer); } /** * Destructor */ UnixInStreambuf::~UnixInStreambuf() throw() { delete[] _buffer; } /** * Methods */ /** * fill buffer by reading from filedescriptor */ int UnixInStreambuf::underflow () throw (IOException, bad_exception) { //proof, whether the actual position is at end of buffer if( gptr() < egptr() ) return *gptr(); //reading data int num = read (_fd, _buffer, _bufferSize); if( num < 0 ) { string error(strerror(errno)); //convert _fd to string ostringstream int2string; int2string << _fd; //throw exception throw IOException("Could not read from fd" + int2string.str() + ": " + error); } else if( num == 0 ) { //convert _fd to string ostringstream int2string; int2string << _fd; //throw exception throw IOException("Could not read from fd" + int2string.str() + " because we reached end of file"); } //set bufferpointers setg(_buffer, _buffer, _buffer + num); //return next character return *gptr(); } } realtimebattle-1.0.8/team-framework/io/unixiofactory.cpp0000644000175000017500000000640110263734363021617 0ustar moimoi/************************************************************************ $Id: unixiofactory.cpp,v 1.4 2005/07/09 11:45:55 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixiofactory.cpp,v $ Revision 1.4 2005/07/09 11:45:55 jonico Ignored signal SIGPIPE in order not to be killed in case of broken pipes. Revision 1.3 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "unixiofactory.h" #include "unixservercommunicator.h" #include "unixclientcommunicator.h" #include "unixrtbconnection.h" #include "../rtbglobal/masterresourcecontrol.h" #include #include #include /** * Namespace */ namespace IO { using RTBGlobal::MasterResourceControl; using std::string; /** * Constructor */ UnixIOFactory::UnixIOFactory () throw(bad_exception) : _mrc (MasterResourceControl::Instance()) { // register this initial object by the MRC // new registration method now // _mrc->registrateIOFactory(this); // we do not want to be killed in case of a broken pipe, so we ignore SIGPIPE signal(SIGPIPE,SIG_IGN); } /** * Destructor */ UnixIOFactory::~UnixIOFactory () throw() { } /** * Methods */ auto_ptr UnixIOFactory::createServerCommunicator () const throw(IOException, ServerIsPresentException, bad_exception) { return auto_ptr(new UnixServerCommunicator()); } /** * */ void UnixIOFactory::switch2BlockingMode() const throw (IOException, bad_exception) { if( fcntl(0, F_SETFL, fcntl(0, F_GETFL, 0) & (~O_NONBLOCK)) != 0 ) throw(IOException("Could not switch stdin to blocking-mode.")); if( fcntl(1, F_SETFL, fcntl(1, F_GETFL, 0) & (~O_NONBLOCK)) != 0 ) throw(IOException("Could not switch stdout to blocking-mode.")); } /** * */ auto_ptr UnixIOFactory::createClientCommunicator () const throw(IOException, bad_exception) { return auto_ptr(new UnixClientCommunicator); } /** * */ RTBConnection* UnixIOFactory::getRTBConnection () const throw(IOException, bad_exception) { return UnixRTBConnection::instance(); } namespace { // anonymous namespace // new registration method now // UnixIOFactory __ioFactory; // we need a global object to register the factory by the MRC } } realtimebattle-1.0.8/team-framework/io/unixoutstream.cpp0000644000175000017500000000627510263730720021645 0ustar moimoi/************************************************************************ $Id: unixoutstream.cpp,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixoutstream.cpp,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "unixoutstream.h" #include /** * Namespace */ namespace IO { using std::ostringstream; /** * Constructors */ UnixOutStream::UnixOutStream (int fd) throw(bad_exception) : ostream(0), _unixOutStreambuf(fd), _fd(fd) { rdbuf(&_unixOutStreambuf); //set exception-behavior exceptions(ios_base::badbit | ios_base::failbit); } /** * Methods */ void UnixOutStream::sendline(const string& line) throw(IOException, bad_exception) { if( line.size() > 0 ) { try { _sendString.clear(); unsigned int datalen; int lastNewline = 0; unsigned char wordlen; int aktualNewline; //convert string from pattern: // data + \n + data + \n + data // a trailing newline at the end of the whole line will be ignored //in the following pattern: // lineLen(2 Bytes)+data(lineLen Bytes)+lineLen(2 Bytes)+data(lineLen Bytes)+... //=> multiple lines can be send while(true) { aktualNewline = line.find('\n', lastNewline); if( aktualNewline < 0 ) { aktualNewline=line.size(); datalen = aktualNewline - lastNewline; if (datalen==0) break; wordlen = datalen >> 8; _sendString += wordlen; wordlen = datalen & 255; _sendString += wordlen; _sendString += line.substr(lastNewline, datalen); break; } datalen = aktualNewline - lastNewline; wordlen = datalen >> 8; _sendString += wordlen; wordlen = datalen & 255; _sendString += wordlen; _sendString += line.substr(lastNewline, datalen); lastNewline = aktualNewline + 1; } // it does not matter, whether this function is called with zero bytes write(_sendString.c_str(), _sendString.size()); } catch(ostream::failure& e) { ostringstream int2string; int2string << _fd; throw IOException("Error while writing to fd" + int2string.str()+ ": " + e.what()); } } } } realtimebattle-1.0.8/team-framework/io/unixoutstreambuf.cpp0000644000175000017500000000453210263734404022337 0ustar moimoi/************************************************************************ $Id: unixoutstreambuf.cpp,v 1.3 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixoutstreambuf.cpp,v $ Revision 1.3 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "unixoutstreambuf.h" #include #include /** * Namespace */ namespace IO { using std::ostringstream; /** * Constructor */ UnixOutStreambuf::UnixOutStreambuf(int fd) throw() : _fd(fd) { } /** * Methods */ /** * writing a character */ int UnixOutStreambuf::overflow (int character) throw (IOException, bad_exception) { if( character != EOF ) { char data = character; //writing successful? if( write(_fd, &data, 1) != 1 ) { //throw exception ostringstream int2string; int2string << _fd; throw IOException("Could not write to fd" + int2string.str() + ": " + strerror(errno)); } } return character; } /** * */ streamsize UnixOutStreambuf::xsputn (const char* databuffer, streamsize size) throw(IOException, bad_exception) { int num = write(_fd, databuffer, size); //writing successful? if( num >= 0 ) return num; else { //throw exception ostringstream int2string; int2string << _fd; throw IOException("Could not write to fd" + int2string.str() + "."); } } } realtimebattle-1.0.8/team-framework/io/unixremoteclientconnection.cpp0000644000175000017500000000716510264524652024401 0ustar moimoi/************************************************************************ $Id: unixremoteclientconnection.cpp,v 1.3 2005/07/11 17:17:30 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixremoteclientconnection.cpp,v $ Revision 1.3 2005/07/11 17:17:30 jonico removed some fcntl includes, improved socket filename deletion, introduced blocking parameter for security infrastructure Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "unixremoteclientconnection.h" #include "../rtbglobal/masterresourcecontrol.h" #include "../exceptions/keynotfoundexception.h" #include #include #include /** * Namespace */ namespace IO { using RTBGlobal::MasterResourceControl; using Exceptions::KeyNotFoundException; using std::ostringstream; using std::endl; /** * Constructors */ UnixRemoteClientConnection::UnixRemoteClientConnection (int clientSocket) throw(IOException, bad_exception) : RemoteClientConnection(), _inStream(clientSocket), _outStream(clientSocket) { _clientSocket = clientSocket; //send robotname to master-server MasterResourceControl* mrc = MasterResourceControl::Instance(); string robotName; try { robotName = mrc->getRuntimeProperty("Main","ActualName"); } catch(KeyNotFoundException& e) { close(_clientSocket); throw IOException("Could not get ActualName from section Main. KeyNotFoundException occured: " + e.getMessage()); } //append pid to robotname ostringstream int2string; int2string << getpid(); robotName += " (pid: "; robotName += int2string.str(); robotName += ")"; //send name to remoteclient sendLine(robotName); //get name from remoteclient _targetName = getLine(); } /** * Destructors */ UnixRemoteClientConnection::~UnixRemoteClientConnection () throw() { close(_clientSocket); } /** * Methods */ /** * * @param line Message that will be send over the connection (does not append a trailing newline) */ void UnixRemoteClientConnection::sendLine (const string& line) throw(StrategyException, IOException, bad_exception) { _outStream.sendline(line); } /** * @return string that contains a line out of the connection (not terminated with newline) */ string UnixRemoteClientConnection::getLine () throw(IOException, bad_exception) { return _inStream.getline(); } /** * @return name of the associated target */ string UnixRemoteClientConnection::getTargetName () throw() { return _targetName; } /** * Returns, whether the client is the local client or one of the remote clients */ bool UnixRemoteClientConnection::isLocal () throw() { return false; } } realtimebattle-1.0.8/team-framework/io/unixrtbconnection.cpp0000644000175000017500000000753210263730720022466 0ustar moimoi/************************************************************************ $Id: unixrtbconnection.cpp,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixrtbconnection.cpp,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "unixrtbconnection.h" #include "../exceptions/keynotfoundexception.h" #include "../rtbglobal/masterresourcecontrol.h" #include #include #include /** * Namespace */ namespace IO { using RTBGlobal::MasterResourceControl; using Exceptions::KeyNotFoundException; using std::cout; using std::cin; using std::endl; using std::ostringstream; /** * static members */ auto_ptr UnixRTBConnection::_instance(0); /** * Constructor (private) */ UnixRTBConnection::UnixRTBConnection () throw(bad_exception) : _inStream(0), _outStream(1) /*means getLine to stdin(fd=0) and sendLine to stdout(fd=1)*/ { } /** * Destructor */ UnixRTBConnection::~UnixRTBConnection () throw() { } /** * Operations */ /** * this static method is the only way to get an instance from UnixRTBConnetion (singleton) * @return Pointer to UnixRTBConnection */ UnixRTBConnection* UnixRTBConnection::instance() throw(bad_exception) { UnixRTBConnection* rtbConnection(UnixRTBConnection::_instance.get()); if( rtbConnection == 0 ) UnixRTBConnection::_instance.reset(rtbConnection = new UnixRTBConnection); return rtbConnection; } /** * * @param line Message that will be send over the connection (does not append a trailing newline) */ void UnixRTBConnection::sendLine (const string& line) throw(StrategyException, IOException, bad_exception) { try { _outStream << line; } catch(istream::failure& e) { string msg("Error while writing to fd1: "); throw IOException(msg + e.what()); } } /** * @return string that contains a line out of the connection (not terminated with newline) */ string UnixRTBConnection::getLine () throw(IOException, bad_exception) { string line; try { getline(_inStream, line); } catch(istream::failure& e) { string msg("Error while reading from fd0: "); throw IOException(msg + e.what()); } return line; } /** * @return name of the associated target */ string UnixRTBConnection::getTargetName () throw(IOException, bad_exception) { //get ActualName MasterResourceControl* mrc = MasterResourceControl::Instance(); string robotName; try { robotName = mrc->getRuntimeProperty("Main","ActualName"); } catch(KeyNotFoundException& e) { throw IOException("Could not get ActualName from section Main. KeyNotFoundException occured: " + e.getMessage()); } //append pid to robotname ostringstream int2string; int2string << getpid(); robotName += " (pid: "; robotName += int2string.str(); robotName += ")"; return robotName; } } realtimebattle-1.0.8/team-framework/io/unixservercommunicator.cpp0000644000175000017500000001530410321271471023540 0ustar moimoi/************************************************************************ $Id: unixservercommunicator.cpp,v 1.7 2005/10/06 18:55:53 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixservercommunicator.cpp,v $ Revision 1.7 2005/10/06 18:55:53 jonico Added verbose messages about the name of the unix domain sockets in order to facilitate error tracking for the user. Revision 1.6 2005/08/10 10:36:26 jonico Fixed accept bug that only occured without optimization Revision 1.5 2005/07/11 17:17:30 jonico removed some fcntl includes, improved socket filename deletion, introduced blocking parameter for security infrastructure Revision 1.4 2005/01/27 18:08:03 jonico Fixed busy waiting select bug in the server communicators, fixed NullLogger problem in createrobotconf Revision 1.3 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "unixservercommunicator.h" #include "unixremoteclientconnection.h" #include "../exceptions/keynotfoundexception.h" #include "../exceptions/confignotloadedexception.h" #include "../rtbglobal/masterresourcecontrol.h" #include // #include #include #include #include /** * Namespace */ namespace IO { using Exceptions::KeyNotFoundException; using Exceptions::ConfigNotLoadedException; using RTBGlobal::MasterResourceControl; using std::ios_base; /** * Constructors */ UnixServerCommunicator::UnixServerCommunicator() throw(IOException, ServerIsPresentException, bad_exception) : _serverSocketBound(false),_mrc(MasterResourceControl::Instance()) { //obtain Logger try { _logger=_mrc->createLogger("IO"); } catch (RTBException& e) { throw IOException("Could not obtain logger in UnixServerCommunicator::UnixServerCommunicator(), nested exception is: "+e.getMessage()); } _logger->logMessage(10, "Try to get UnixServerCommunicator."); //open Socket _serverSocket = socket(AF_UNIX, SOCK_STREAM, 0); if( _serverSocket < 0 ) throw IOException("Could not open socket. socket() failed."); //socket is in blocking-mode per default // _logger->logMessage(2, "Switch socket to blocking-mode."); //if( fcntl(_serverSocket, F_SETFL, fcntl(_serverSocket, F_GETFL, 0) & (~O_NONBLOCK)) != 0 ) { // close(_serverSocket); // throw IOException("Could not switch to blocking-mode. fcntl() failed."); //} //try to get the name of unix-domain-socket form configfile string domainName; try { domainName = _mrc->getConfigurationProperty("IO","DomainSocketName"); } catch(KeyNotFoundException& e) { close(_serverSocket); throw IOException("Could not get DomainSocketName from section IO. KeyNotFoundException occured: " + e.getMessage()); } catch(ConfigNotLoadedException& e) { close(_serverSocket); throw IOException("Could not get DomainSocketName from section IO. ConfigNotLoadedException occured: " + e.getMessage()); } _domainName = domainName; //initializing data for socket sockaddr_un socketData; socketData.sun_family = AF_UNIX; domainName.copy(socketData.sun_path, domainName.size()); socketData.sun_path[domainName.size()] = 0; //try to create a unix-domain-socket _logger->logMessage(2, "Try to create a unix-domain-socket."); if( bind(_serverSocket, reinterpret_cast< struct sockaddr* >(&socketData), sizeof(socketData)) < 0 ) { close(_serverSocket); throw ServerIsPresentException("Could not create ServerSocket. bind() failed."); } _serverSocketBound=true; _logger->logMessage(10, "Bound unix-domain-socket "+domainName); //switch to listen-mode if( listen(_serverSocket, 3) < 0 ) { close(_serverSocket); unlink(_domainName.c_str()); _serverSocketBound=false; throw IOException("Could not create ServerSocket. listen() failed."); } } /** * Destructor */ UnixServerCommunicator::~UnixServerCommunicator () throw(){ close(_serverSocket); //delete unix-domain-socket if (_serverSocketBound) unlink(_domainName.c_str()); } /** * Methods */ auto_ptr UnixServerCommunicator::createRemoteClientConnection () throw (ServerIsPresentException, IOException, bad_exception) { //wait until RTB-Server is sending data (=> Exception) or a client wants to connect _logger->logMessage(2, "Waiting for remoteclients."); fd_set listenSocketSet; FD_ZERO(&listenSocketSet); FD_SET(0, &listenSocketSet); FD_SET(_serverSocket, &listenSocketSet); if( select(_serverSocket+1, &listenSocketSet, NULL, NULL, NULL) < 0 ) throw IOException("Could not create remote connection. select() failed."); //nothing from RTB-Server received? if(FD_ISSET(0, &listenSocketSet) ) { //received data from RTB-Server => time to connect is over, remove visible file name unlink(_domainName.c_str()); _serverSocketBound=false; throw ServerIsPresentException("Master server answered, no pending connection requests will be accepted."); } if( FD_ISSET(_serverSocket, &listenSocketSet) ) { //establish client connection _logger->logMessage(5, "Establish connection to new remoteclient."); sockaddr clientAddress; socklen_t addressLen=sizeof(clientAddress); int clientSocket = accept(_serverSocket, &clientAddress, &addressLen); if( clientSocket >= 0 ) { //clientSocket already in blocking-mode //if( fcntl(clientSocket, F_SETFL, fcntl(clientSocket, F_GETFL, 0) & (~O_NONBLOCK)) != 0 ) // throw IOException("Could not create remote connection. fcntl() failed."); return auto_ptr (new UnixRemoteClientConnection(clientSocket)); } else throw IOException("accept() for client connection failed"); } throw IOException("Select returns but no file descriptor was ready to read from."); } } realtimebattle-1.0.8/team-framework/io/unixserverconnection.cpp0000644000175000017500000000761210264524652023212 0ustar moimoi/************************************************************************ $Id: unixserverconnection.cpp,v 1.4 2005/07/11 17:17:30 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixserverconnection.cpp,v $ Revision 1.4 2005/07/11 17:17:30 jonico removed some fcntl includes, improved socket filename deletion, introduced blocking parameter for security infrastructure Revision 1.3 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "unixserverconnection.h" #include "../exceptions/keynotfoundexception.h" #include "../rtbglobal/masterresourcecontrol.h" //STL #include #include //IPC #include /** * Namespace */ namespace IO { using Exceptions::KeyNotFoundException; using RTBGlobal::MasterResourceControl; using std::ostringstream; using std::endl; /** * initialize static members */ auto_ptr UnixServerConnection::_instance(0); /** * */ UnixServerConnection* UnixServerConnection::instance (int serverSocket) throw (IOException, bad_exception) { UnixServerConnection* serverConnection(UnixServerConnection::_instance.get()); if( serverConnection == 0 ) { UnixServerConnection::_instance.reset(serverConnection = new UnixServerConnection(serverSocket)); } return serverConnection; } /** * */ UnixServerConnection::~UnixServerConnection () throw() { close(_serverSocket); } /** * */ UnixServerConnection::UnixServerConnection (int serverSocket) throw(IOException, bad_exception) : ServerConnection(), _inStream(serverSocket), _outStream(serverSocket) { _serverSocket = serverSocket; //try to get the robotname from configfile MasterResourceControl* mrc = MasterResourceControl::Instance(); string robotName; try { robotName = mrc->getRuntimeProperty("Main","ActualName"); } catch(KeyNotFoundException& e) { close(_serverSocket); throw IOException("Could not get ActualName from section Main. KeyNotFoundException occured: " + e.getMessage()); } //append pid to robotname ostringstream int2string; int2string << getpid(); robotName += " (pid: "; robotName += int2string.str(); robotName += ")"; //send robotname to master-server sendLine(robotName); //recieve server-robotname from master-server _serverName = getLine(); } /** * * @param line Message that will be send over the connection (does not append a trailing newline) */ void UnixServerConnection::sendLine (const string& line) throw(StrategyException, IOException, bad_exception) { _outStream.sendline(line); } /** * @return string that contains a line out of the connection (not terminated with newline) */ string UnixServerConnection::getLine () throw(IOException, bad_exception) { return _inStream.getline(); } /** * @return name of the associated target */ string UnixServerConnection::getTargetName () throw(IOException, bad_exception) { return _serverName; } } realtimebattle-1.0.8/team-framework/log/0002755000175000017500000000000010404234033016345 5ustar moimoirealtimebattle-1.0.8/team-framework/log/logdriver.h0000644000175000017500000000451110167276200020522 0ustar moimoi/************************************************************************ $Id: logdriver.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: logdriver.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef LOGDRIVER_H #define LOGDRIVER_H #include #include "../exceptions/ioexception.h" #include "../stdnamespace.h" /** * Namespace Log */ namespace Log { using std::auto_ptr; using Exceptions::IOException; using std::bad_exception; using std::string; /** * Class LogDriver */ class LogDriver { /* * Public stuff */ public: /** * Destructor, does nothing */ virtual ~LogDriver () throw () {}; /* * Operations */ /** * Method that is called by the MRC to duplicate the whole object */ virtual auto_ptr clone () const throw (bad_exception) = 0; /** * * @param message Message that will be logged */ virtual void logMessage (const string& message) throw (bad_exception, IOException) = 0; /** * * @param logDriverParameters Every driver can specify its own configuration parameters that will be passed with this string after the cloning process has taken place. */ virtual void setLogDriverParameters (const string& logDriverParameters) throw (bad_exception, IOException)= 0; }; } #endif //LOGDRIVER_H realtimebattle-1.0.8/team-framework/log/logger.h0000644000175000017500000000453510167276200020012 0ustar moimoi/************************************************************************ $Id: logger.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: logger.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef LOGGER_H #define LOGGER_H #include "lognamespace.h" #include "logdriver.h" #include "../stdnamespace.h" #include #include "../exceptions/ioexception.h" /** * Namespace Log */ namespace Log { using std::string; using std::auto_ptr; using std::bad_exception; using Exceptions::IOException; /** * Class Logger */ class Logger { /* * Public stuff */ public: /** * Constructor */ Logger(const string& section, int priority, auto_ptr logDriver) throw(bad_exception); /* * Operations */ /** * * @param priority * @param message */ virtual void logMessage (int priority, const string& message) throw(bad_exception, IOException); /** * Destructor, does nothing */ virtual ~Logger () throw(); /* * Protected stuff */ protected: /** * * @param priority the requested priority * @return true if priority high enough, otherwise false */ bool isPriorityHighEnough (int priority) throw(); /* * Private stuff */ private: /* * Fields */ auto_ptr _logDriver; string _section; int _priority; }; } #endif //LOGGER_H realtimebattle-1.0.8/team-framework/log/lognamespace.h0000644000175000017500000000250010167276200021157 0ustar moimoi/************************************************************************ $Id: lognamespace.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: lognamespace.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ /** * Namespace Log */ namespace Log { class LogDriver; class Logger; } realtimebattle-1.0.8/team-framework/log/nulllogdriver.h0000644000175000017500000000512010167276200021412 0ustar moimoi/************************************************************************ $Id: nulllogdriver.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: nulllogdriver.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef NULLLOGDRIVER_H #define NULLLOGDRIVER_H #include "logdriver.h" /** * Namespace Log */ namespace Log { /** * Class NullLogDriver * * Sometimes you want to prevent a component from logging anything. One thing you can try is to specify a very high logging priority, but you cannot sure that there won't be a message with even higher priority. So NullLogger is supposed to solve this problem while logging anything. */ class NullLogDriver: public LogDriver { /* * Public stuff */ public: /** * Destructor, does nothing */ virtual ~NullLogDriver () throw() {} /** * Constructor for the first and all following NullLogDriver object */ NullLogDriver() throw () {} /** * Method that is called by the MRC to duplicate the whole object */ virtual auto_ptr clone () const throw (bad_exception) { return auto_ptr(new NullLogDriver()); } /** * * @param message Message that will be suppresed completely * If logger object was not initialized properly, this method will only throw an exception */ virtual void logMessage (const string&) throw () {} /** * * @param logDriverParameters this logger does not need any parameters */ virtual void setLogDriverParameters (const string& logDriverParameters) throw (IOException, bad_exception) {} }; } #endif realtimebattle-1.0.8/team-framework/log/rtblogdriver.h0000644000175000017500000000661710167276200021243 0ustar moimoi/************************************************************************ $Id: rtblogdriver.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: rtblogdriver.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef RTBLOGDRIVER_H #define RTBLOGDRIVER_H #include "logdriver.h" #include "../io/ionamespace.h" /** * Namespace Log */ namespace Log { enum LogState {UNINITIALIZED, BOTH, PRINT, DEBUG}; using IO::RTBConnection; /** * Class RTBLogDriver * * RTBLogdriver will log using the Debug or the Print Command (depends on the logParameters) * of the RealTime Battle Server to log messages * WARNING: We use blocking IO for our framework, so it is possible, that logging with this driver will block the * whole system. Use it with caution and when blocking is no risk for you */ class RTBLogDriver: public LogDriver { /* * Public stuff */ public: /** * Destructor * Does nothing */ virtual ~RTBLogDriver () throw(); /** * Constructor for the first rtbLogDriver object * Constructor will register the object by the MRC with the name rtbLogDriver */ RTBLogDriver() throw (bad_exception); /* * Operations */ /** * Method that is called by the MRC to duplicate the whole object */ virtual auto_ptr clone () const throw (bad_exception); /** * * @param message Message that will be logged in the file * If logger object was not initialized properly, this method will only throw an exception */ virtual void logMessage (const string& message) throw (IOException, bad_exception); /** * * @param logDriverParameters The parameter has to be in the form logCommand:Debug or logCommand:Print or logCommand:Both * logCommand:Debug : Use the Debug coomand to log messages * logCommand:Print : Use the Print command to log messages * logCommand:Both : Use the Print and the Debug command to log messages (questionable option) */ virtual void setLogDriverParameters (const string& logDriverParameters) throw (IOException, bad_exception); /* * Private stuff */ private: /** * private constructor used to construct cloned prototypes */ RTBLogDriver(RTBConnection* rtbConnection, LogState logState) throw(); /** * Pointer to the connection to the RealTime Battle Server */ RTBConnection* _rtbConnection; LogState _rtbLogState; }; } #endif //RTBLOGDRIVER_H realtimebattle-1.0.8/team-framework/log/sysloglogdriver.h0000644000175000017500000000710510167276200021765 0ustar moimoi/************************************************************************ $Id: sysloglogdriver.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: sysloglogdriver.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef SYSLOGLOGDRIVER_H #define SYSLOGLOGDRIVER_H #include #include #include #include #include "../exceptions/ioexception.h" #include "logdriver.h" namespace Log { using std::map; using std::string; using std::auto_ptr; using Exceptions::IOException; /** * Class SyslogLogDriver */ class SyslogLogDriver: public LogDriver { private: SyslogLogDriver(const string&) throw (IOException, bad_exception); /** * contains the number of instances */ SyslogLogDriver(const string& syslogIdent, int syslogOption, int syslogPriority) throw(bad_exception); /** * contains the number of instances */ static int _instanceCount; /** * true, if the syslog connection is opened */ static bool _logOpened; /** * true, if the maps _options and _priorities are initialized */ static bool _mapsInitialized; /** * true, if this instance is initialized (i.e. the log driver * parameters are set) */ bool _instanceInitialized; /** * the number of the instance that logged the last time */ static int _lastLoggingInstance; static int _lastLoggingSyslogOption; static string _lastLoggingSyslogIdent; /** * each instance gets a unique number */ int _instance; int _syslogOption; string _syslogIdent; int _syslogPriority; static map _options; static map _priorities; int parseOption(const string&) throw (IOException,bad_exception); int parsePriority(const string&) throw (IOException,bad_exception); map parseParameterString(const string&) throw (IOException,bad_exception); string trim(const string&) throw (bad_exception); void init() throw (bad_exception); void openlog() throw (); public: SyslogLogDriver() throw (bad_exception); /** * extract ident, option and priority from logDriverParameters * parameter format: * default: "option: LOG_CONS|LOG_PID, ident: Realtimebattle, priority: LOG_INFO" */ void setLogDriverParameters(const string&) throw (IOException, bad_exception); void setLogDriverParameters(const string& syslogIdent, int syslogOption, int syslogPriority) throw(); void logMessage(const string&) throw (IOException,bad_exception); auto_ptr clone() const throw (bad_exception); ~SyslogLogDriver() throw(); }; } #endif /* SYSLOGLOGDRIVER_H */ realtimebattle-1.0.8/team-framework/log/unixfilelogdriver.h0000644000175000017500000001011210167276200022260 0ustar moimoi/************************************************************************ $Id: unixfilelogdriver.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: unixfilelogdriver.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef UNIXFILELOGDRIVER_H #define UNIXFILELOGDRIVER_H #include "logdriver.h" #include struct stat; /** * Namespace Log */ namespace Log { using std::map; /** * Class UnixFileLogDriver * * UnixfileLogdriver will log into a file, that is not createtd at the moment * If several components chose to log in the same file, it will work with this driver * UnixFileLogDriver is not thread safe (the whole framework is not) */ class UnixFileLogDriver: public LogDriver { /* * Public stuff */ public: /** * Destructor * If _isCloned is false, it will close all descriptors in the FDMap */ virtual ~UnixFileLogDriver () throw(); /** * Constructor for the first UnixFileLogDriver object * Constructor will register the object by the MRC with the name UnixFileLogDriver */ UnixFileLogDriver() throw (bad_exception); /* * Operations */ /** * Method that is called by the MRC to duplicate the whole object */ virtual auto_ptr clone () const throw (bad_exception); /** * * @param message Message that will be logged in the file * If logger object was not initialized properly, this method will only throw an exception */ virtual void logMessage (const string& message) throw (IOException, bad_exception); /** * * @param logDriverParameters The parameter has to be in the form file:filename, for example file:/tmp/foo * If the specified file already exists or it cannot be created, this method will throw an exception and * the UnixFileLogDriver object will not work. If the file was already opened by another component of the same process, * logging will work properly. */ virtual void setLogDriverParameters (const string& logDriverParameters) throw (IOException, bad_exception); /* * Private stuff */ private: /** * if _isCloned is true, this object was created with the clone method */ bool _isCloned; /** * if _isInitialized is true, you can use this object to log messages */ bool _isInitialized; /** * file descriptor to the corresponding file */ int _fd; /** * map with all filedesriptors opened by UnixFileLogDriver objects cloned by this special root object * if _isCloned is set, this pointer will contain NULL */ auto_ptr< map > _rootFDMap; /** * A pointer to the root map * This pointer will exist in all objects */ map < long long int, int >* _clonedFDMap; /** * Constructor used in the clone Method to create a clone of the current object according to the prototype pattern */ UnixFileLogDriver(int isInitialized, int fd, map < long long int, int > *clonedFDMap) throw (); /** * Computes the position of a file for the index in the map */ long long int computePosition(const struct stat& statbuf) const throw(); }; } #endif //UNIXFILELOGDRIVER_H realtimebattle-1.0.8/team-framework/log/logger.cpp0000644000175000017500000000574410167276200020350 0ustar moimoi/************************************************************************ $Id: logger.cpp,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: logger.cpp,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "logger.h" #include /** * Constructors/Destructors */ /** * */ namespace Log { /** Initial the logger class. Copy states. * @param section Define your section like "Strategy-Group:StupidBot" * @param priority how uch should be logged. The Higher only important messages * will be logged * @param logDriver use for example unixlogdriver to log the messages in a file * @exception bad_exception */ Logger::Logger(const string& section, int priority, auto_ptr logDriver) throw(bad_exception): _logDriver(logDriver), _section(section), _priority(priority) { } /** * Do nothing */ Logger::~Logger () throw (){ } /** * Methods */ /** This method prove an incoming priority number with the internal priority state. * @param priority the priority value to check * @return true if the param priority is higher/equal than the internal * priority state */ bool Logger::isPriorityHighEnough (int priority) throw() { return priority>=_priority; } /** Log the message. Uses the logdriver to log it. This will be logged: *
: * @param priority the higher the priority the number. Only messages will be * logged which are higher or equal the internal priority state * @param message this string will be logged * @exception IOException will be thrown if the logdriver can not write... */ void Logger::logMessage (int priority, const string& message) throw (bad_exception, IOException) { if (isPriorityHighEnough(priority)) { try { _logDriver->logMessage(_section+": "+message); } catch (IOException& ex) { throw IOException ("A LogDriver IOException occured in logger for section: "+_section+": "+ex.getMessage()); } } } } realtimebattle-1.0.8/team-framework/log/rtblogdriver.cpp0000644000175000017500000001511510300413754021563 0ustar moimoi/************************************************************************ $Id: rtblogdriver.cpp,v 1.4 2005/08/16 11:09:14 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: rtblogdriver.cpp,v $ Revision 1.4 2005/08/16 11:09:14 krolfy Added multiline to DEBUG and BOTH Revision 1.3 2005/08/16 11:02:20 krolfy Chenged RTBLogDriver to multi line output Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "rtblogdriver.h" #include #include "../rtbglobal/masterresourcecontrol.h" #include "../io/rtbconnection.h" #include "../io/iofactory.h" /** * Namespace */ namespace Log { using RTBGlobal::MasterResourceControl; using IO::IOFactory; using Exceptions::RTBException; // Class RTBLogDriver // RTBLogdriver will log use the Debug or the Print Command (depends on the logParameters) // of the RealTime Battle Server to log messages // WARNING: We use blocking IO for our framework, so it is possible, that logging with this driver will block the // whole system. Use it with caution and when blocking is no risk for you /** * Public stuff */ /** * Destructor * Does nothing */ RTBLogDriver::~RTBLogDriver () throw() {} /** * Constructor for the first RTBLogDriver object * Constructor will register the object by the MRC with the name RTBLogDriver */ RTBLogDriver::RTBLogDriver() throw (bad_exception):_rtbConnection(NULL),_rtbLogState(UNINITIALIZED) { // we cannot obtain a handle to the RTBConnection here, because the IOFactory is possibly not registered yet // (we do not know anything about the order of global object construction) // register this initial object by the MRC // new registration method now // MasterResourceControl::Instance()->registrateLogDriverPrototype("RTBLogDriver",this); } /** * Operations */ /** * Method that is called by the MRC to duplicate the whole object */ auto_ptr RTBLogDriver::clone () const throw (bad_exception) { return auto_ptr(new RTBLogDriver(_rtbConnection,_rtbLogState)); } /** * * @param message Message that will be logged in the file * If logger object was not initialized properly, this method will only throw an exception */ void RTBLogDriver::logMessage (const string& message) throw (IOException, bad_exception) { int i=message.size(),j; switch (_rtbLogState) { case UNINITIALIZED: throw IOException("RTBLogDriver was not initialized properly"); case DEBUG: { for(;;) { if(string::npos==(i=message.rfind("Exception",j=i))) break; if(string::npos==(i=message.rfind(": ",i))) break; _rtbConnection->sendLine("Debug ..."+message.substr(++i,j-i)+"\n"); } _rtbConnection->sendLine("Debug "+message.substr(0,j)+"\n"); break; } case PRINT: { for(;;) { if(string::npos==(i=message.rfind("Exception",j=i))) break; if(string::npos==(i=message.rfind(": ",i))) break; _rtbConnection->sendLine("Print ..."+message.substr(++i,j-i)+"\n"); } _rtbConnection->sendLine("Print "+message.substr(0,j)+"\n"); break; } case BOTH: { for(;;) { if(string::npos==(i=message.rfind("Exception",j=i))) break; if(string::npos==(i=message.rfind(": ",i))) break; _rtbConnection->sendLine("Print ..."+message.substr(++i,j-i)+"\n"); } _rtbConnection->sendLine("Print "+message.substr(0,j)+"\n"); i=message.size(); for(;;) { if(string::npos==(i=message.rfind("Exception",j=i))) break; if(string::npos==(i=message.rfind(": ",i))) break; _rtbConnection->sendLine("Debug ..."+message.substr(++i,j-i)+"\n"); } _rtbConnection->sendLine("Debug "+message.substr(0,j)+"\n"); break; } } } /** * * @param logDriverParameters The parameter has to be in the form logCommand:Debug or logCommand:Print or logCommand:Both * logCommand:Debug : Use the Debug coomand to log messages * logCommand:Print : Use the Print command to log messages * logCommand:Both : Use the Print and the Debug command to log messages */ void RTBLogDriver::setLogDriverParameters (const string& logDriverParameters) throw (IOException, bad_exception) { // first set state to something that prevents logging with incorrect parameters _rtbLogState=UNINITIALIZED; // find out, if RTBConnection is already present if (!_rtbConnection) { try { _rtbConnection=MasterResourceControl::Instance()->getIOFactory()->getRTBConnection(); } catch (RTBException& ex) { throw IOException("RTBLogDriver was not able to obtain a connection to the RealTime Battle server: "+ex.getMessage()); } } // first find out, if parameter is correct if (logDriverParameters.find("logCommand:",0,11)) throw IOException("logDriverParameters have incorrect syntax for RTBLogger (does not begin with 'logCommand:')"); string logcommand(logDriverParameters,11); // extract logCommand from parameters if (logcommand=="Debug") _rtbLogState=DEBUG; else if (logcommand=="Print") _rtbLogState=PRINT; else if (logcommand=="Both") _rtbLogState=BOTH; else throw IOException("Unknown logCommand specified for RTBLogger: "+logcommand); } /** * Private stuff */ /** * Constructor used in the clone Method to create a clone of the current object according to the prototype pattern */ RTBLogDriver::RTBLogDriver(RTBConnection* rtbConnection, LogState logState) throw ():_rtbConnection(rtbConnection),_rtbLogState(logState) { } namespace { // anonymous namespace // new registration method now // RTBLogDriver __rtblogdriverprototype; // we need a global object to register the driver by the MRC } } realtimebattle-1.0.8/team-framework/log/sysloglogdriver.cpp0000644000175000017500000002536510206711065022325 0ustar moimoi/************************************************************************ $Id: sysloglogdriver.cpp,v 1.3 2005/02/22 20:12:37 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: sysloglogdriver.cpp,v $ Revision 1.3 2005/02/22 20:12:37 jonico Changed some minor behavior to let the framework work together with Solaris Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include #include "sysloglogdriver.h" namespace Log { using std::set; int SyslogLogDriver::_instanceCount=0; bool SyslogLogDriver::_logOpened=false; bool SyslogLogDriver::_mapsInitialized=false; int SyslogLogDriver::_lastLoggingInstance; int SyslogLogDriver::_lastLoggingSyslogOption; string SyslogLogDriver::_lastLoggingSyslogIdent; map SyslogLogDriver::_options; map SyslogLogDriver::_priorities; SyslogLogDriver::SyslogLogDriver() throw (bad_exception) { init(); // _instanceInitialized is NOT set true, because the LogDriver parameters // have not been set yet. } SyslogLogDriver::SyslogLogDriver(const string& logDriverParameters) throw (IOException,bad_exception) { init(); setLogDriverParameters(logDriverParameters); } SyslogLogDriver::SyslogLogDriver(const string& syslogIdent, int syslogOption, int syslogPriority) throw (bad_exception) { init(); setLogDriverParameters(syslogIdent, syslogOption, syslogPriority); } SyslogLogDriver::~SyslogLogDriver() throw() { if(_logOpened && _instanceCount==1) { closelog(); _logOpened=false; } --_instanceCount; } void SyslogLogDriver::setLogDriverParameters(const string& syslogIdent, int syslogOption, int syslogPriority) throw() { _syslogOption=syslogOption; _syslogIdent=syslogIdent; _syslogPriority=syslogPriority; _instanceInitialized=true; } void SyslogLogDriver::setLogDriverParameters(const string& logDriverParameters) throw (IOException,bad_exception) { string syslogIdent; int syslogOption, syslogPriority; map parameters=parseParameterString(logDriverParameters); if(parameters.find("option")==parameters.end()) { // set default value for option syslogOption=LOG_CONS|LOG_PID; } else { syslogOption=parseOption(parameters["option"]); } if(parameters.find("ident")==parameters.end()) { // set default value for ident syslogIdent="RTB-Team"; } else { syslogIdent=trim(parameters["ident"]); } if(parameters.find("priority")==parameters.end()) { // set default value for priority syslogPriority=LOG_INFO; } else { syslogPriority=parsePriority(parameters["priority"]); } set validParameters; validParameters.insert("option"); validParameters.insert("ident"); validParameters.insert("priority"); for(map::iterator i=parameters.begin();i!=parameters.end();++i) { if(validParameters.find(i->first)==validParameters.end()) { throw IOException(string("Invalid parameter in SyslogLogDriver parameters: '")+(i->first)+"'!"); } } setLogDriverParameters(syslogIdent, syslogOption, syslogPriority); } // the common code of all constructors void SyslogLogDriver::init() throw (bad_exception) { _instanceInitialized=false; if(!_mapsInitialized) { // valid options _options["LOG_CONS"]=LOG_CONS; _options["LOG_NDELAY"]=LOG_NDELAY; // this option exists on almost every unix #ifdef OS_LINUX // _options["LOG_PERROR"]=LOG_PERROR; // this option exist on almost every unix #endif _options["LOG_PID"]=LOG_PID; // valid priorities _priorities["LOG_EMERG"]=LOG_EMERG; _priorities["LOG_ALERT"]=LOG_ALERT; _priorities["LOG_CRIT"]=LOG_CRIT; _priorities["LOG_ERR"]=LOG_ERR; _priorities["LOG_WARNING"]=LOG_WARNING; _priorities["LOG_NOTICE"]=LOG_NOTICE; _priorities["LOG_INFO"]=LOG_INFO; _priorities["LOG_DEBUG"]=LOG_DEBUG; _mapsInitialized=true; } _instance=_instanceCount; ++_instanceCount; } auto_ptr SyslogLogDriver::clone() const throw (bad_exception) { // the returned SyslogLogDriver instance should be initialized if this // instance is initialized already if(_instanceInitialized) return auto_ptr(new SyslogLogDriver(_syslogIdent, _syslogOption, _syslogPriority)); else return auto_ptr(new SyslogLogDriver()); } void SyslogLogDriver::openlog() throw() { ::openlog(_syslogIdent.c_str(), _syslogOption, LOG_USER); _lastLoggingSyslogOption=_syslogOption; _lastLoggingSyslogIdent=_syslogIdent; _lastLoggingInstance=_instance; _logOpened=true; } void SyslogLogDriver::logMessage(const string& message) throw (IOException, bad_exception) { if(!_instanceInitialized) { throw IOException("SyslogLogDriver: Cannot log: LogDriver parameters are not set yet!"); } if(!_logOpened) openlog(); if(_lastLoggingInstance!=_instance) { if(_syslogOption!=_lastLoggingSyslogOption || _syslogIdent!=_lastLoggingSyslogIdent) { // The instance that logged the last time had a different option- or // ident value. So we have to reopen the syslog connection to set // our values. closelog(); openlog(); } } syslog(_syslogPriority, message.c_str()); } map SyslogLogDriver::parseParameterString(const string& parameters) throw (IOException, bad_exception) { // States: // BEFOREKEY // PARAMKEY // PARAMVALUE // BEFORECOLON int BEFOREKEY=0, PARAMKEY=1, PARAMVALUE=2, BEFORECOLON=3; int state; map parsed; string key=""; string value=""; state=BEFOREKEY; for(int i=0;i #include "unixfilelogdriver.h" #include #include #include #include #include #include #include // #include "../rtbglobal/masterresourcecontrol.h" /** * Namespace */ namespace Log { // using RTBGlobal::MasterResourceControl; // Class UnixFileLogDriver // UnixfileLogdriver will log into a file, that is not createtd at the moment // If several components chose to log in the same file, it will work with this driver // UnixFileLogDriver is not thread safe (the whole framework is not) // /** * Public stuff */ /** * Destructor * If _isCloned is false, it will close all descriptors in the FDMap */ UnixFileLogDriver::~UnixFileLogDriver () throw() { if (!_isCloned) { if (_clonedFDMap) { map ::const_iterator i=_clonedFDMap->begin(); while (i!=_clonedFDMap->end()) close ((i++)->second); } } } /** * Constructor for the first UnixFileLogDriver object * Constructor will register the object by the MRC with the name UnixFileLogDriver */ UnixFileLogDriver::UnixFileLogDriver() throw (bad_exception):_isCloned(false),_isInitialized(false),_fd(-1),_rootFDMap(new map ()),_clonedFDMap(NULL) { _clonedFDMap=_rootFDMap.get(); // register this initial object by the MRC // new registration method now // MasterResourceControl::Instance()->registrateLogDriverPrototype("UnixFileLogDriver",this); } /** * Operations */ /** * Method that is called by the MRC to duplicate the whole object */ auto_ptr UnixFileLogDriver::clone () const throw (bad_exception) { return auto_ptr(new UnixFileLogDriver(_isInitialized, _fd, _clonedFDMap)); } /** * * @param message Message that will be logged in the file * If logger object was not initialized properly, this method will only throw an exception */ void UnixFileLogDriver::logMessage (const string& message) throw (IOException, bad_exception) { if (!_isInitialized) throw IOException("UnixFileLogDriver was not configured properly so logging is impossible!"); int result=write(_fd,(message+"\n").c_str(),message.size()+1); if (result==-1) throw IOException((string("UnixFileLogDriver got an error while writing to a file descriptor: ")+strerror(errno))); // syncing was found out to be too slow for the framework and heavy load of logging, so I commented it out // fdatasync(_fd); } /** * * @param logDriverParameters The parameter has to be in the form file:filename, for example file:/tmp/foo * If the specified file already exists or it cannot be created, this method will throw an exception and * the UnixFileLogDriver object will not work. If the file was already opened by another component of the same process, * logging will work properly. */ void UnixFileLogDriver::setLogDriverParameters (const string& logDriverParameters) throw (IOException, bad_exception) { _isInitialized=false; // first find out, if parameter is correct if (logDriverParameters.find("file:",0,5)) throw IOException("logDriverParameters have incorrect syntax for UnixFileLogger (does not begin with 'file:')!"); string filename(logDriverParameters,5); // extract filename from parameters // second stat the file struct stat statbuf; int result=stat(filename.c_str(),&statbuf); if (result==-1) { switch (errno) { case ENOENT: { // file does not exist _fd=open(filename.c_str(),O_WRONLY|O_CREAT|O_EXCL,S_IRUSR|S_IWUSR); if (_fd==-1) throw IOException("UnixFileLogDriver got an error while trying to create file "+ filename+ ": "+strerror(errno)); // register new file descriptor int result2=fstat(_fd,&statbuf); if (result2==-1) { close(_fd); throw IOException("UnixFileLogDriver got an error while trying to stat created file "+ filename+ ": "+strerror(errno)); } try { (*_clonedFDMap)[computePosition(statbuf)]=_fd; } catch (...) { close(_fd); throw; } _isInitialized=true; return; } default: { throw IOException("UnixFileLogDriver got an error while trying to stat file "+ filename+ ": "+strerror(errno)); } } } map < long long int, int >::const_iterator i=_clonedFDMap->find(computePosition(statbuf)); if (i==_clonedFDMap->end()) throw IOException("UnixFileLogDriver refused to write in already existing file "+ filename); _fd=i->second; _isInitialized=true; } /** * Private stuff */ /** * Constructor used in the clone Method to create a clone of the current object according to the prototype pattern */ UnixFileLogDriver::UnixFileLogDriver(int isInitialized, int fd, map < long long int, int > *clonedFDMap) throw ():_isCloned(true),_isInitialized(isInitialized),_fd(fd),_rootFDMap(NULL),_clonedFDMap(clonedFDMap) { } long long int UnixFileLogDriver::computePosition(const struct stat& statbuf) const throw() { // buffer[0]=statbuf.st_dev; // printf("device: %il\n",statbuf.st_dev); // buffer[1]=statbuf.st_ino; // printf("indode: %il\n",statbuf.st_ino); // long long int position=*(reinterpret_cast(buffer)); // printf("Position: %ill\n",position); long long int position=statbuf.st_dev; position<<=32; return position+statbuf.st_ino; } namespace { // anonymous namespace // new registration method now // UnixFileLogDriver __unixfilelogdriverprototype; // we need a global object to register the driver by the MRC } } realtimebattle-1.0.8/team-framework/parser/0002755000175000017500000000000010404234033017060 5ustar moimoirealtimebattle-1.0.8/team-framework/parser/argument_type.h0000644000175000017500000000267310167276200022132 0ustar moimoi/************************************************************************ $Id: argument_type.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: argument_type.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef __ARGUMENTTYPE__ #define __ARGUMENTTYPE__ /** * Namespace Parser */ namespace Parser { enum argument_type { NONE, STRING, DOUBLE, INT, HEX // BINDATA }; } #endif realtimebattle-1.0.8/team-framework/parser/configurationparser.h0000644000175000017500000000431510167276200023326 0ustar moimoi/************************************************************************ $Id: configurationparser.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: configurationparser.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef CPARSER_H #define CPARSER_H #include #include #include "../exceptions/configurationparserexception.h" /** * Namespace Parser */ namespace Parser { using Exceptions::ParserException; using std::bad_exception; using Exceptions::ConfigurationParserException; using std::string; using std::map; /** * class ConfigurationParser */ class ConfigurationParser { /* * Public stuff */ public: ConfigurationParser::ConfigurationParser() throw (bad_exception); void addFile(const string& filename) throw(ParserException, bad_exception); const map >& getConfigurationData() const throw(); /* * Private stuff */ private: string erase_wspace(const string& s) const throw (bad_exception); /** * true, if the given character is allowed inside a section, a key or a value. */ bool iscchar(int c) const throw (); map > _configurationData; }; } #endif // CPARSER_H realtimebattle-1.0.8/team-framework/parser/game_option_type.h0000644000175000017500000000367210167276200022611 0ustar moimoi/************************************************************************ $Id: game_option_type.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: game_option_type.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef __GAMEOPTIONTYPE__ #define __GAMEOPTIONTYPE__ /** * Namespace Parser */ namespace Parser { enum game_option_type { ROBOT_MAX_ROTATE=0, ROBOT_CANNON_MAX_ROTATE=1, ROBOT_RADAR_MAX_ROTATE=2, ROBOT_MAX_ACCELERATION=3, ROBOT_MIN_ACCELERATION=4, ROBOT_START_ENERGY=5, ROBOT_MAX_ENERGY=6, ROBOT_ENERGY_LEVELS=7, SHOT_SPEED=8, SHOT_MIN_ENERGY=9, SHOT_MAX_ENERGY=10, SHOT_ENERGY_INCREASE_SPEED=11, TIMEOUT=12, DEBUG_LEVEL=13, // 0 - no debug, 5 - highest debug level SEND_ROBOT_COORDINATES= 14 // 0 - no coordinates, // 1 - coordniates are given relative the starting position // 2 - absolute coordinates }; } #endif realtimebattle-1.0.8/team-framework/parser/message_from_robot_type.h0000644000175000017500000000334610167276200024162 0ustar moimoi/************************************************************************ $Id: message_from_robot_type.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: message_from_robot_type.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef __MESSAGEFROMROBOTTYPE__ #define __MESSAGEFROMROBOTTYPE__ /** * Namespace Parser */ namespace Parser { enum message_from_robot_type { UNKNOWN_MESSAGE_FROM_ROBOT = -1, ROBOT_OPTION, NAME, COLOUR, // LOAD_DATA, ROTATE, ROTATE_TO, ROTATE_AMOUNT, SWEEP, ACCELERATE, BRAKE, BREAK, SHOOT, PRINT, DEBUG, DEBUG_LINE, DEBUG_CIRCLE // BIN_DATA_FROM, // ASCII_DATA_FROM, // SAVE_DATA_FINISHED }; } #endif realtimebattle-1.0.8/team-framework/parser/message_to_robot_type.h0000644000175000017500000000341610167276200023637 0ustar moimoi/************************************************************************ $Id: message_to_robot_type.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: message_to_robot_type.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef __MESSAGETOROBOTTYPE__ #define __MESSAGETOROBOTTYPE__ /** * Namespace Parser */ namespace Parser { enum message_to_robot_type { UNKNOWN_MESSAGE_TO_ROBOT = -1, INITIALIZE, YOUR_NAME, YOUR_COLOUR, // BIN_DATA_TO, // ASCII_DATA_TO, // LOAD_DATA_FINISHED, GAME_OPTION, GAME_STARTS, RADAR, INFO, COORDINATES, ROBOT_INFO, ROTATION_REACHED, ENERGY, ROBOTS_LEFT, COLLISION, WARNING, DEAD, GAME_FINISHES, // SAVE_DATA, EXIT_ROBOT }; } #endif realtimebattle-1.0.8/team-framework/parser/object_type.h0000644000175000017500000000334110167276200021547 0ustar moimoi/************************************************************************ $Id: object_type.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: object_type.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef __OBJECTTYPE__ #define __OBJECTTYPE__ /** * Namespace Parser */ namespace Parser { enum object_type { NOOBJECT = -1, ROBOT = 0, SHOT = 1, WALL = 2, COOKIE = 3, MINE = 4, LAST_OBJECT_TYPE = 5 }; // static const int number_of_object_types = 5; // global variables are very ugly, static is senseless in this case const int number_of_object_types = 5; // now it's capsulated in a namespace, but it is ugly though, please find another solution } #endif realtimebattle-1.0.8/team-framework/parser/parsernamespace.h0000644000175000017500000000256010167276200022413 0ustar moimoi/************************************************************************ $Id: parsernamespace.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: parsernamespace.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ /** * Namespace Parser */ namespace Parser { class RTBParseResult; class RTBParser; class ConfigurationParser; } realtimebattle-1.0.8/team-framework/parser/robot_option_type.h0000644000175000017500000000352610167276200023023 0ustar moimoi/************************************************************************ $Id: robot_option_type.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: robot_option_type.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef __ROBOTOPTIONTYPE__ #define __ROBOTOPTIONTYPE__ /** * Namespace Parser */ namespace Parser { enum robot_option_type { SIGNAL=2, // 0 - no signal, > 1 - signal to send (e.g. SIGUSR1 or SIGUSR2) SEND_SIGNAL=0, // 0 - false, 1 - true SEND_ROTATION_REACHED=1, // 0 - no messages // 1 - messages when RotateTo and RotateAmount finished // 2 - messages also when sweep direction is changed USE_NON_BLOCKING=3 // 0 - false, 1 - true // This option should always be sent as soon as possible }; } #endif realtimebattle-1.0.8/team-framework/parser/rtbparser.h0000644000175000017500000000624210167276200021247 0ustar moimoi/************************************************************************ $Id: rtbparser.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: rtbparser.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef RTBPARSER_H #define RTBPARSER_H #include #include #include "rtbparseresult.h" #include "../gamecontrol/gamecontrolnamespace.h" #include "../exceptions/parserexception.h" #include "../exceptions/strategyexception.h" /** * Namespace Parser */ namespace Parser { using std::string; using std::bad_exception; using std::istringstream; using GameControl::Coordinator; using GameControl::GameOptionsRepository; using Exceptions::ParserException; using Exceptions::StrategyException; /** * Class RTBParser * * Important: Do not try to instantiate this class or use it with responses from the master server to the client (server tips won't be processed by this parser) * * Note: The parser only determines the type of the given message, reads out the corresponding arguments and returns an datastructure with this result. * It is NOT responsable for doing a specific action according to the given message. */ class RTBParser { /* * Public stuff */ public: /** * This method parses an RTB message. * @param message The incoming RTB message in string shape * @return The parsed RTB message */ static const RTBParseResult* processRTBMessage (const string& message) throw (ParserException,bad_exception); /** * If the last message was from a type, that a coordinator object can handle, this method delegates it to the appropiate method. * @param coordinator The Cordinator to handle the last message */ static void delegateLastMessage (Coordinator* coordinator) throw (StrategyException, bad_exception); /** * If last message was from type GameOption, updates the GameOptionsRepository. * @param gameOptionsRepository */ static void updateGameOptions (GameOptionsRepository* gameOptionsRepository) throw(ParserException,bad_exception); /* * Private stuff */ private: static RTBParseResult _parseResult; static istringstream _parsingStream; static string _tmpString; }; } #endif //RTBPARSER_H realtimebattle-1.0.8/team-framework/parser/rtbparseresult.h0000644000175000017500000000323510167276200022323 0ustar moimoi/************************************************************************ $Id: rtbparseresult.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: rtbparseresult.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef RTBPARSERESULT_H #define RTBPARSERESULT_H #include "message_to_robot_type.h" #include /** * Namespace Parser */ namespace Parser { using std::string; // This struct represents the result of the parsing process done by the RTBParser. struct RTBParseResult { message_to_robot_type messageType; int intValue[2]; string stringValue; double doubleValue[4]; }; } #endif //RTBPARSERESULT_H realtimebattle-1.0.8/team-framework/parser/warning_type.h0000644000175000017500000000312010167276200021741 0ustar moimoi/************************************************************************ $Id: warning_type.h,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: warning_type.h,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef __WARNINGTYPE__ #define __WARNINGTYPE__ /** * Namespace Parser */ namespace Parser { enum warning_type { UNKNOWN_MESSAGE=0, PROCESS_TIME_LOW=1, // ENERGY_LOW, //VARIABLE_OUT_OF_RANGE, MESSAGE_SENT_IN_ILLEGAL_STATE=2, UNKNOWN_OPTION=3, OBSOLETE_KEYWORD=4, NAME_NOT_GIVEN=5, COLOUR_NOT_GIVEN=6 }; } #endif realtimebattle-1.0.8/team-framework/parser/configurationparser.cpp0000644000175000017500000001530410167276200023661 0ustar moimoi/************************************************************************ $Id: configurationparser.cpp,v 1.2 2005/01/06 17:59:28 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: configurationparser.cpp,v $ Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include #include #include #include #include "configurationparser.h" namespace Parser { using std::ifstream; using std::ostringstream; using std::streampos; using std::ios_base; using std::cerr; using std::endl; using std::cout; using std::getline; ConfigurationParser::ConfigurationParser() throw (bad_exception) { } enum parserstate { ISSECTION, // A section name is being read ISKEY, // A key is being read ISVALUE, // A value is being read BEFOREVALUE, // The parser is waiting for a value enclosed in "" BEFORESECTION, // The parser is waiting for a section (initial state) SORK, // The parser is waiting for a section or a key BEFOREEOL, // The parser is waiting for a comment or a newline COMMENT, // A comment is being read QUOTE // A quote (\) was read }; bool ConfigurationParser::iscchar(int c) const throw () { return isgraph(c) || c==' ' || c=='\t' || c=='' || c=='' || c=='' || c=='' || c=='' || c=='' || c==''; } string ConfigurationParser::erase_wspace(const string& s) const throw (bad_exception) { string dst; int i; int start=0; int last=s.find_last_not_of(' '); dst.reserve(s.length()); while(s[start]==' ') ++start; for(i=start;i >& ConfigurationParser::getConfigurationData() const throw () { return _configurationData; } } realtimebattle-1.0.8/team-framework/parser/rtbparser.cpp0000644000175000017500000002234110300414046021567 0ustar moimoi/************************************************************************ $Id: rtbparser.cpp,v 1.4 2005/08/10 16:00:50 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: rtbparser.cpp,v $ Revision 1.4 2005/08/10 16:00:50 krolfy Columbus behaves odd, can SIGSEGV Revision 1.3 2005/08/10 13:12:31 krolfy Added some debug lines, minor fixes Revision 1.2 2005/01/06 17:59:28 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include #include "rtbparser.h" #include "object_type.h" #include "game_option_type.h" #include "warning_type.h" #include "../gamecontrol/coordinator.h" #include "../gamecontrol/gameoptionsrepository.h" namespace Parser { using std::string; using std::ios_base; using GameControl::GameOptionsRepository; using std::out_of_range; // define static variables RTBParseResult RTBParser::_parseResult; istringstream RTBParser::_parsingStream; string RTBParser::_tmpString; const RTBParseResult* RTBParser::processRTBMessage (const string& message) throw(ParserException, bad_exception) { // this line is necessary, too _parsingStream.clear(); _parsingStream.str(message); _parsingStream >> _tmpString; try { switch(_tmpString.at(2)) { case 'd': _parseResult.messageType=RADAR; /* Radar */ _parsingStream >> _parseResult.doubleValue[0] >> _parseResult.intValue[0] >> _parseResult.doubleValue[1]; return &_parseResult; case 'f': _parseResult.messageType=INFO; /* Info */ _parsingStream >> _parseResult.doubleValue[0] >> _parseResult.doubleValue[1] >> _parseResult.doubleValue[2]; return &_parseResult; case 'o': _parseResult.messageType=COORDINATES; /*Coordinates*/ _parsingStream >> _parseResult.doubleValue[0] >> _parseResult.doubleValue[1] >> _parseResult.doubleValue[2]; return &_parseResult; case 'e': _parseResult.messageType=ENERGY; /* Energy */ _parsingStream >> _parseResult.doubleValue[0]; return &_parseResult; case 'l': _parseResult.messageType=COLLISION; /* Collision */ _parsingStream >> _parseResult.intValue[0] >> _parseResult.doubleValue[0]; return &_parseResult; case 't': _parseResult.messageType=ROTATION_REACHED; /* Rotation */ _parsingStream >> _parseResult.intValue[0]; /* Reached */ return &_parseResult; case 'r': _parseResult.messageType=WARNING; /* Warning */ _parsingStream >> _parseResult.intValue[0]; _parseResult.stringValue.clear(); getline(_parsingStream,_parseResult.stringValue); // better way to do this job return &_parseResult; case 'a': _parseResult.messageType=DEAD; /* Dead */ return &_parseResult; case 'b':switch(_tmpString.at(5)) { case 'I': _parseResult.messageType=ROBOT_INFO; /* Robot */ _parsingStream >> _parseResult.doubleValue[0] /* Info */ >> _parseResult.intValue[0]; return &_parseResult; case 's': _parseResult.messageType=ROBOTS_LEFT; /* Robots */ _parsingStream >> _parseResult.intValue[0]; /* Left */ return &_parseResult; } case 'i':switch(_tmpString.at(0)) { case 'I': _parseResult.messageType=INITIALIZE; /*Initialize*/ _parsingStream >> _parseResult.intValue[0]; return &_parseResult; case 'E': _parseResult.messageType=EXIT_ROBOT; /* Exit */ return &_parseResult; /* Robot */ } case 'm':switch(_tmpString.at(4)) { case 'O': _parseResult.messageType=GAME_OPTION; /* Game */ _parsingStream >> _parseResult.intValue[0] /* Option */ >> _parseResult.doubleValue[0]; return &_parseResult; case 'S': _parseResult.messageType=GAME_STARTS; /* Game */ return &_parseResult; /* Starts */ case 'F': _parseResult.messageType=GAME_FINISHES; /* Game */ return &_parseResult; /* Finishes */ } case 'u':switch(_tmpString.at(4)) { case 'C': _parseResult.messageType=YOUR_COLOUR; /* Your */ _parsingStream.setf(ios_base::hex,ios_base::basefield); /* Colour */ _parsingStream >> _parseResult.intValue[0]; _parsingStream.setf(ios_base::dec,ios_base::basefield); return &_parseResult; case 'N': _parseResult.messageType=YOUR_NAME; /* Your */ _parseResult.stringValue.clear(); /* Name */ getline(_parsingStream,_parseResult.stringValue); // better way to do this job return &_parseResult; }}} catch (out_of_range& ex) {} if(_tmpString.empty()) _parseResult.stringValue="Parser found an empty RTB message."; else ((_parseResult.stringValue ="Parser found an unknown RTB message entitled \"") +=_tmpString) +="\"."; throw ParserException(_parseResult.stringValue); } void RTBParser::delegateLastMessage (Coordinator* coordinator) throw (StrategyException,bad_exception) { switch(_parseResult.messageType) { case RADAR: coordinator->receiveRTBMessageRadar ( _parseResult.doubleValue[0], object_type(_parseResult.intValue[0]), _parseResult.doubleValue[1]); return; case INFO: coordinator->receiveRTBMessageInfo ( _parseResult.doubleValue[0], _parseResult.doubleValue[1], _parseResult.doubleValue[2]); return; case COORDINATES: coordinator->receiveRTBMessageCoordinates ( _parseResult.doubleValue[0], _parseResult.doubleValue[1], _parseResult.doubleValue[2]); return; case ENERGY: coordinator->receiveRTBMessageEnergy ( _parseResult.doubleValue[0]); return; case COLLISION: coordinator->receiveRTBMessageCollision ( object_type(_parseResult.intValue[0]), _parseResult.doubleValue[0]); return; case ROTATION_REACHED: coordinator->receiveRTBMessageRotationReached( _parseResult.intValue[0]); return; case WARNING: coordinator->receiveRTBMessageWarning ( // >> This may cause warning_type(_parseResult.intValue[0]), // an exception _parseResult.stringValue); // to be thrown return; case DEAD: coordinator->receiveRTBMessageDead (); return; case ROBOT_INFO: coordinator->receiveRTBMessageRobotInfo( _parseResult.doubleValue[0], _parseResult.intValue[0]); return; case ROBOTS_LEFT: coordinator->receiveRTBMessageRobotsLeft( _parseResult.intValue[0]); return; default: throw StrategyException("Parser was requested to delegate an illegal parsing result."); } } void RTBParser::updateGameOptions (GameOptionsRepository* gameOptionsRepository) throw(ParserException,bad_exception) { if(_parseResult.messageType!=GAME_OPTION) throw ParserException("Parser was requested to update a game option without a concrete game option specified."); switch(game_option_type(_parseResult.intValue[0])) { case ROBOT_MAX_ROTATE: gameOptionsRepository->ROBOT_MAX_ROTATE=_parseResult.doubleValue[0]; return; case ROBOT_CANNON_MAX_ROTATE: gameOptionsRepository->ROBOT_CANNON_MAX_ROTATE=_parseResult.doubleValue[0]; return; case ROBOT_RADAR_MAX_ROTATE: gameOptionsRepository->ROBOT_RADAR_MAX_ROTATE=_parseResult.doubleValue[0]; return; case ROBOT_MAX_ACCELERATION: gameOptionsRepository->ROBOT_MAX_ACCELERATION=_parseResult.doubleValue[0]; return; case ROBOT_MIN_ACCELERATION: gameOptionsRepository->ROBOT_MIN_ACCELERATION=_parseResult.doubleValue[0]; return; case ROBOT_START_ENERGY: gameOptionsRepository->ROBOT_START_ENERGY=_parseResult.doubleValue[0]; return; case ROBOT_MAX_ENERGY: gameOptionsRepository->ROBOT_MAX_ENERGY=_parseResult.doubleValue[0]; return; case ROBOT_ENERGY_LEVELS: gameOptionsRepository->ROBOT_ENERGY_LEVELS=_parseResult.doubleValue[0]; return; case SHOT_SPEED: gameOptionsRepository->SHOT_SPEED=_parseResult.doubleValue[0]; return; case SHOT_MIN_ENERGY: gameOptionsRepository->SHOT_MIN_ENERGY=_parseResult.doubleValue[0]; return; case SHOT_MAX_ENERGY: gameOptionsRepository->SHOT_MAX_ENERGY=_parseResult.doubleValue[0]; return; case SHOT_ENERGY_INCREASE_SPEED: gameOptionsRepository->SHOT_ENERGY_INCREASE_SPEED=_parseResult.doubleValue[0]; return; case TIMEOUT: gameOptionsRepository->TIMEOUT=_parseResult.doubleValue[0]; return; case DEBUG_LEVEL: gameOptionsRepository->DEBUG_LEVEL=_parseResult.doubleValue[0]; return; case SEND_ROBOT_COORDINATES: gameOptionsRepository->SEND_ROBOT_COORDINATES=_parseResult.doubleValue[0]; return; } _parseResult.stringValue="Parser found an unknown game option number."; throw ParserException(_parseResult.stringValue); } } realtimebattle-1.0.8/team-framework/rtbglobal/0002755000175000017500000000000010404234033017534 5ustar moimoirealtimebattle-1.0.8/team-framework/rtbglobal/masterresourcecontrol.h0000644000175000017500000001553510167276201024371 0ustar moimoi/************************************************************************ $Id: masterresourcecontrol.h,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: masterresourcecontrol.h,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef MASTERRESOURCECONTROL_H #define MASTERRESOURCECONTROL_H #include #include #include "../gamecontrol/gamecontrolnamespace.h" #include "../stdnamespace.h" #include "../strategies/strategiesnamespace.h" #include "../log/lognamespace.h" #include "../io/ionamespace.h" #include "../exceptions/exceptionsnamespace.h" #include "../log/logger.h" #include "../exceptions/ioexception.h" #include "../exceptions/resourcenotfoundexception.h" #include "../exceptions/confignotloadedexception.h" #include "../exceptions/keynotfoundexception.h" #include "pmap.h" #include "../strategies/strategyfactory.h" #include "../log/logdriver.h" /** * Namespace RTBGlobal */ namespace RTBGlobal { using std::map; using std::bad_exception; using std::auto_ptr; using std::string; using GameControl::GameController; using IO::IOFactory; using Log::LogDriver; using Strategies::StrategyFactory; using Log::Logger; using Exceptions::IOException; using Exceptions::ResourceNotFoundException; using Exceptions::ConfigNotLoadedException; using Exceptions::KeyNotFoundException; /** * Class MasterResourceControl * This class is responsable for managing all ressources of the whole system on a central point. */ class MasterResourceControl { /* * Public stuff */ public: /** * Destructor, does nothing */ ~MasterResourceControl () throw(); /** * Obtains the one and only MasterResourceControl object (singleton) */ static MasterResourceControl* Instance () throw (bad_exception); /** * Logs a message if situation is so bad, that you cannot use a logger object * @param logMessage for emergency reasons */ static void EmergencyLog (const string& logMessage) throw (); /** * Register the one and only IOFactory with this method * @param ioFactory pointer to the specific IOFactory */ void registrateIOFactory (auto_ptr ioFactory) throw (bad_exception); /** * Register a strategy under a certain name * @param strategyName Strings the Coordinators will use to obtain the factory * @param strategyFactory pointer to a concrete strategy factory */ void registrateStrategyFactory (const string& strategyName, auto_ptr strategyFactory) throw (bad_exception); /** * Register a logDriverPrototype, that will be cloned every time, when a logger should use this driver * @param logDriverName name of the log Driver * @param logDriverPrototype concrete prototype of logDriver (to be cloned every time) */ void registrateLogDriverPrototype (const string& logDriverName, auto_ptr logDriverPrototype) throw (bad_exception); /** * @return (ClientGameController object if MasterServerSocket is already created, if not ServerGameController object) */ auto_ptr getGameController () const throw (ResourceNotFoundException, bad_exception); /** * @return the registered IOFactory */ const IOFactory* getIOFactory () const throw (ResourceNotFoundException, bad_exception); /** * @return strategy factory that will be able to create the needed state objects. * @param strategyName Names the strategy that will be created from the returned factory. */ const StrategyFactory* getStrategyFactory (const string& strategyName) const throw (ResourceNotFoundException, bad_exception); /** * Creates a logger object, fills it with the the section's associated logDriver * @param section Section for that the logger should work */ auto_ptr createLogger (const string& section) const throw (ResourceNotFoundException, bad_exception); /** * * @param configurationData Contains a map, that maps a section to a map, that maps a key to a value. */ void setConfigurationData (const map >& configurationData) throw (bad_exception); /** * Returns a the associated key to the corresponding section * @param section Names the section. * @param key Names the configuration key. */ const string& getConfigurationProperty (const string& section, const string& key) const throw (ConfigNotLoadedException, KeyNotFoundException, bad_exception); /** * Sets a runtime property (Can be used for states to communicate over the MRC) * @param section Names the runtime section. * @param key Names the runtime key. * @param value Names the associated value. */ void setRuntimeProperty (const string& section, const string& key, const string& value) throw (bad_exception); /** * @return runtime property value associated with a key in a section. * @param section Names the requested section. * @param key Names the requested key. */ const string& getRuntimeProperty (const string& section, const string& key) const throw ( KeyNotFoundException, bad_exception); private: /* * Fields */ /** * Pointer to the only instance of the master ressource control */ static auto_ptr _instance; /** * Contains the configuration data map. */ auto_ptr > > _configMap; /** * Contains the runtime data map. */ map > _runtimeMap; /** * Pointer to the corresponding IOFactory */ auto_ptr _ioFactory; /** * map for the registered Strategy Factories */ pmap _strategyFactoryMap; /** * map for the registered logDriver prototypes */ pmap _logDriverPrototypeMap; /* * Constructor */ /** * Private constructor (singleton pattern) */ MasterResourceControl() throw (bad_exception); }; } #endif //MASTERRESOURCECONTROL_H realtimebattle-1.0.8/team-framework/rtbglobal/pmap.h0000644000175000017500000000450610167276201020656 0ustar moimoi/************************************************************************ $Id: pmap.h,v 1.3 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: pmap.h,v $ Revision 1.3 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef __pmap_h #define __pmap_h #include /** * Namespace RTBGlobal */ namespace RTBGlobal { using std::map; /** * class template pmap * Important note: IF YOU CALL METHODS OF THIS CLASS, THAT REMOVE ELEMENTS, YOU HAVE TO DELETE THE ELEMENTS BY YOURSELF * IF AN OBJECT OF THIS CLASS WILL BE DESTROYED, IT WILL DELETE ALL IT'S ELEMENT * Use this class if you want to store dynamic resources, that should be deleted in conjunction with its container. * You can use any functionality (operators / methods / iterators) provided by the map base class of the STL. * @author Johannes Nicolai */ template class pmap: public map { /* * Public stuff */ public: /** * Constructs a pmap, that stores pointers to __pValue objects */ inline pmap():map() {}; /** * All resources pointed by the stored values, will be deleted if the pmap will be destroyed */ inline ~pmap() { for (typename map::iterator i=map::begin();i!=map::end();++i) delete i->second; }; }; } #endif realtimebattle-1.0.8/team-framework/rtbglobal/pvector.h0000644000175000017500000000520010167276201021373 0ustar moimoi/************************************************************************ $Id: pvector.h,v 1.3 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: pvector.h,v $ Revision 1.3 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef __pvector_h #define __pvector_h #include /** * Namespace RTBGlobal */ namespace RTBGlobal { using std::vector; /** * Important note: IF YOU CALL METHODS OF THIS CLASS, THAT REMOVE ELEMENTS, YOU HAVE TO DELETE THE ELEMENTS BY YOURSELF * IF AN OBJECT OF THIS CLASS WILL BE DESTROYED, IT WILL DELETE ALL IT'S ELEMENT * Use this class if you want to store dynamic resources, that should be deleted in conjunction with its container. * You can use any functionality (operators / methods / iterators) provided by the vector base class of the STL. * @author Johannes Nicolai */ template class pvector : public vector <__pValue*> { /* * Public stuff */ public: /** * Constructs a pvector, that will store pointers to dynamic allocated resources of type __pValue. * The initial capacity of the pvector will be 0. */ inline pvector():vector<__pValue*>() {}; /** * Constructs a pvector, that will store pointers to dynamic allocated resources of type __pValue. * @param n Names the initial capacity of this pvector. */ inline explicit pvector(int n): vector<__pValue*>(n) {}; /** * All resources pointed by the items in this pvector will be deleted when the pvector will be destroyed. */ inline ~pvector() { for (typename vector<__pValue*>::iterator i=vector<__pValue*>::begin();i!=vector<__pValue*>::end();++i) delete *i; }; }; } #endif realtimebattle-1.0.8/team-framework/rtbglobal/rtbglobalnamespace.h0000644000175000017500000000270110167276201023541 0ustar moimoi/************************************************************************ $Id: rtbglobalnamespace.h,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: rtbglobalnamespace.h,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ /** * Namespace RTBGlobal */ namespace RTBGlobal { class MasterResourceControl; template class pvector; template class pmap; class RTBInit; } realtimebattle-1.0.8/team-framework/rtbglobal/rtbinit.h0000644000175000017500000000662410167276201021377 0ustar moimoi/************************************************************************ $Id: rtbinit.h,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: rtbinit.h,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef RTBINIT_H #define RTBINIT_H #include "../stdnamespace.h" #include "../exceptions/parserexception.h" #include "../exceptions/ioexception.h" /** * Namespace RTBGlobal */namespace RTBGlobal { using std::string; using Exceptions::ParserException; using std::bad_exception; using Exceptions::RTBException; using Exceptions::IOException; /** * Class RTBInit */ class RTBInit { /* * Public stuff */ public: /* * Operations */ /** * Calls the RTBConfig Parser to parse the config file, register the pasring result in the MRC * @param configFileName Path to the file containing the absolute necessary configuration data */ static void ParseConfigFile (const string& configFileName) throw (ParserException, bad_exception); /** * This method first has to switch to blocking mode * This method has to send: * 1. The Robot Option USE_NON_BLOCKING 1 (this is tricky, we do not want to be killed by the RTB Server, so we chose non blocking for it, but set our descriptors to block * 2. The Robot Option SEND_ROTATION_REACHED with a specified value in the configuration file * 3. the name and the color of the robot if requested (first sequence) * This method has to read: * 1. The Initialize Command * 2. If it is not the first sequence in the tournament, the YourColour and YourNameCommand * This methods registers the following runtime properties: * 1. Section Main, Key FirstSequence : "true" / "false" * 2. Section Main, Key ActualColor : actual color as hex string, if first sequence, this value will be set to RobotHomeColor in section Main of the configuration file * 3. Section Main, Key ActualName: actual name of the roboter given by the server, if first sequence, this value will be set to RobotName in section Main of the configuration file */ static void SendInitialMessages() throw (IOException, bad_exception); /** * Starts the game as a client or as the RTB MasterServer (automatically found out by the MRC) * @return true, if no error occured in the whole sequence, false if something went wrong and we could not continue playing */ static bool StartGame () throw (RTBException, bad_exception); }; } #endif //RTBINIT_H realtimebattle-1.0.8/team-framework/rtbglobal/masterresourcecontrol.cpp0000644000175000017500000002067210167276201024722 0ustar moimoi/************************************************************************ $Id: masterresourcecontrol.cpp,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: masterresourcecontrol.cpp,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "masterresourcecontrol.h" #include #include "../exceptions/serverispresentexception.h" #include "../gamecontrol/clientgamecontroller.h" #include "../gamecontrol/servergamecontroller.h" #include "../io/iofactory.h" #include #include namespace RTBGlobal { using std::clog; using std::istringstream; using Exceptions::ServerIsPresentException; using GameControl::ClientGameController; using GameControl::ServerGameController; using Exceptions::RTBException; /** * Constructor */ MasterResourceControl::MasterResourceControl () throw (bad_exception): _configMap(0), _runtimeMap(), _ioFactory(0), _strategyFactoryMap(), _logDriverPrototypeMap() { // does nothing at the moment } /** * Destructor (does nothing at the moment) */ MasterResourceControl::~MasterResourceControl () throw() { // does nothing at the moment } /** * static fields */ /** * instance will be set to null at the beginning */ auto_ptr MasterResourceControl::_instance(0); /** * Methods */ /** * Obtains the one and only MasterResourceControl object (singleton) */ MasterResourceControl* MasterResourceControl::Instance () throw (bad_exception){ MasterResourceControl* mrc(MasterResourceControl::_instance.get()); if (mrc==0) { MasterResourceControl::_instance.reset(mrc=new MasterResourceControl()); } return mrc; } /** * */ void MasterResourceControl::EmergencyLog (const string& logMessage) throw () { // best general method to express, that there is something wrong,I think: clog << logMessage << std::endl; } /** * */ void MasterResourceControl::registrateIOFactory (auto_ptr ioFactory) throw (bad_exception){ _ioFactory=ioFactory; } /** * */ void MasterResourceControl::registrateStrategyFactory (const string& strategyName, auto_ptr strategyFactory) throw (bad_exception){ // warning: if two strategy factories will register under the same name, we will have a memory leak _strategyFactoryMap[strategyName]=strategyFactory.release(); } /** * */ void MasterResourceControl::registrateLogDriverPrototype (const string& logDriverName, auto_ptr logDriverPrototype) throw (bad_exception){ // warning: if two logdriverPrototypes will register under the same name, we will have a memory leak _logDriverPrototypeMap[logDriverName]=logDriverPrototype.release(); } /** * */ auto_ptr MasterResourceControl::getGameController () const throw (ResourceNotFoundException, bad_exception) { try { auto_ptr gameController(0); const IOFactory* iof(getIOFactory()); try { gameController.reset(new ServerGameController(iof->createServerCommunicator())); } catch (ServerIsPresentException& dummy) { // becoming master server failed gameController.reset(new ClientGameController(iof->createClientCommunicator())); } return gameController; } catch (RTBException& ex) { throw ResourceNotFoundException("Could not create a GameController, because an exception occured: "+ex.getMessage()); } } /** * */ const IOFactory* MasterResourceControl::getIOFactory () const throw (ResourceNotFoundException, bad_exception) { if (_ioFactory.get()==0) throw ResourceNotFoundException("IOFactory was not present at this stage!"); return _ioFactory.get(); } /** * Returns a strategy factory that will be able to create the needed state objects. */ const StrategyFactory * MasterResourceControl::getStrategyFactory (const string& strategyName) const throw (ResourceNotFoundException, bad_exception) { pmap::const_iterator i(_strategyFactoryMap.find(strategyName)); if (i!=_strategyFactoryMap.end()) return i->second; throw ResourceNotFoundException("No strategy was registered under the name " + strategyName); } /** * */ auto_ptr MasterResourceControl::createLogger (const string& section) const throw (ResourceNotFoundException, bad_exception) { // this method cannot be implemented until we do not know how we have specified the configuration keys try { // first find out the name of the logDriverPrototype to use for the logger string logDriverPrototypeName(getConfigurationProperty(section,"logDriverName")); // now retrieve the corresponding logDriverPrototype pmap ::const_iterator i(_logDriverPrototypeMap.find(logDriverPrototypeName)); if (i==_logDriverPrototypeMap.end()) throw ResourceNotFoundException("Did not find any logDriver registered under string: "+logDriverPrototypeName); // now retrieve the logDriver's priority string prioritystring (getConfigurationProperty(section,"logPriority")); istringstream numberconverter(prioritystring); int priority(-1); numberconverter >> priority; if (priority<0 || !numberconverter) // number conversion failed throw ResourceNotFoundException("Value of logPriority was not a valid number!"); // now retrieve the logDriver's parameter string logDriverParameters(getConfigurationProperty(section,"logDriverParameters")); // now initialize the logDriver auto_ptr logDriver(i->second->clone()); logDriver->setLogDriverParameters(logDriverParameters); return auto_ptr(new Logger(section,priority,logDriver)); } catch (RTBException& ex) { throw ResourceNotFoundException("While creating the logger, an exception occured: "+ex.getMessage()); } } /** * */ void MasterResourceControl::setConfigurationData (const map >& configurationData) throw (bad_exception){ _configMap.reset (new map >(configurationData)); } /** * */ const string& MasterResourceControl::getConfigurationProperty (const string& section, const string& key) const throw (ConfigNotLoadedException, KeyNotFoundException, bad_exception) { map >* configMap(_configMap.get()); if (configMap==0) throw ConfigNotLoadedException(); map >::const_iterator i(configMap->find(section)); if (i!=configMap->end()) { map::const_iterator j((i->second).find(key)); if (j!=(i->second).end()) return j->second; throw KeyNotFoundException("No configuration key named "+key+ " in existing section "+section+ " found!"); } throw KeyNotFoundException("No configuration section named "+ section+ " found!"); } /** * */ void MasterResourceControl::setRuntimeProperty (const string& section, const string& key, const string& value) throw (bad_exception) { (_runtimeMap[section])[key]=value; } /** * Returns a runtime property value associated with a key in a section. */ const string& MasterResourceControl::getRuntimeProperty (const string& section, const string& key) const throw (KeyNotFoundException, bad_exception) { map >::const_iterator i(_runtimeMap.find(section)); if (i!=_runtimeMap.end()) { map::const_iterator j((i->second).find(key)); if (j!=(i->second).end()) return j->second; throw KeyNotFoundException("No runtime key named "+key+ " in existing section "+section+ " found!"); } throw KeyNotFoundException("No runtime section named "+ section+ "found!"); } } realtimebattle-1.0.8/team-framework/rtbglobal/rtbinit.cpp0000644000175000017500000002315610300706705021725 0ustar moimoi/************************************************************************ $Id: rtbinit.cpp,v 1.4 2005/08/17 19:19:33 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: rtbinit.cpp,v $ Revision 1.4 2005/08/17 19:19:33 jonico Introduced new option in IO section to facilitate blocking / non-blocking problem Revision 1.3 2005/06/29 15:53:04 jonico changed my email address Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "rtbinit.h" #include #include "../exceptions/confignotloadedexception.h" #include "../exceptions/keynotfoundexception.h" #include "../io/iofactory.h" #include "../io/rtbconnection.h" #include "../parser/rtbparser.h" #include "../parser/robot_option_type.h" #include "../parser/message_to_robot_type.h" #include "../parser/rtbparseresult.h" #include #include "masterresourcecontrol.h" #include "../gamecontrol/gamecontroller.h" #include #include "../parser/configurationparser.h" namespace RTBGlobal { using Exceptions::RTBException; using Exceptions::KeyNotFoundException; using Exceptions::ConfigNotLoadedException; using IO::IOFactory; using IO::RTBConnection; using std::endl; using Parser::RTBParser; using Parser::ConfigurationParser; using Parser::RTBParseResult; using std::ostringstream; using std::istringstream; using std::ios_base; /** * Methods */ /** * */ void RTBInit::ParseConfigFile (const string& configFileName) throw (ParserException, bad_exception) { ConfigurationParser parser; parser.addFile(configFileName); MasterResourceControl::Instance()->setConfigurationData(parser.getConfigurationData()); } /** * This method first has to switch to blocking mode * This method has to send: * 1. The Robot Option USE_NON_BLOCKING 1 (this is tricky, we do not want to be killed by the RTB Server, so we chose non blocking for it, but set our descriptors to block * 2. The Robot Option SEND_ROTATION_REACHED with a specified value in the configuration file * 3. the name and the color of the robot if requested (first sequence) * This method has to read: * 1. The Initialize Command * 2. If it is not the first sequence in the tournament, the YourColour and YourNameCommand * This methods registers the following runtime properties: * 1. Section Main, Key FirstSequence : "true" / "false" * 2. Section Main, Key ActualColor : actual color as hex string, if first sequence, this value will be set to RobotHomeColor in section Main of the configuration file * 3. Section Main, Key ActualName: actual name of the roboter given by the server, if first sequence, this value will be set to RobotName in section Main of the configuration file */ void RTBInit::SendInitialMessages () throw (IOException, bad_exception) { try { // first obtain a pointer to the IOFactory MasterResourceControl* mrc(MasterResourceControl::Instance()); const IOFactory* ioFactory(mrc->getIOFactory()); // should we use fcntl to make our connection block ? string shouldUseFcntl(mrc->getConfigurationProperty("IO","UseFcntl")); if (shouldUseFcntl=="true") // now switch to blocking mode ioFactory->switch2BlockingMode(); // now state the opposite to the RealTime Battle Server RTBConnection* rtbConnection(ioFactory->getRTBConnection()); // we need a ostringstream to generate our commands to the RealTime Battle Server ostringstream commands; // set exception mask commands.exceptions(ios_base::badbit|ios_base::failbit); if (shouldUseFcntl=="true") // first state that we won't block (we do so, but we do not want to get restarted) commands << "RobotOption " << Parser::USE_NON_BLOCKING << " " << 1 << endl; else commands << "RobotOption " << Parser::USE_NON_BLOCKING << " " << 0 << endl; // now retrieve the value for RotationReachedFacility string rotFacilityStr(mrc->getConfigurationProperty("Main","RotationReachedValue")); int rotFacility(-1); istringstream numberParser(rotFacilityStr); numberParser >> rotFacility; if (rotFacility<0 || rotFacility >2) throw ParserException("Key RotationReachedValue has no value between 0 and 2 but :"+rotFacilityStr); commands << "RobotOption " << Parser::SEND_ROTATION_REACHED << " " << rotFacility << endl; string firstCommand(rtbConnection->getLine()); const RTBParseResult* pr=RTBParser::processRTBMessage(firstCommand); if (pr->messageType!=Parser::INITIALIZE) throw ParserException("First command was not INITIALIZE but: "+firstCommand); // find out, if we are in the first sequence switch (pr->intValue[0]) { case 0: { // it is not the first sequence, set runtime properties mrc->setRuntimeProperty("Main","FirstSequence","false"); // read YourName and YourColour string secondCommand(rtbConnection->getLine()); pr=RTBParser::processRTBMessage(secondCommand); if (pr->messageType!=Parser::YOUR_NAME) throw ParserException("Second command was not YourName but: "+secondCommand); mrc->setRuntimeProperty("Main","ActualName",pr->stringValue); string thirdCommand(rtbConnection->getLine()); pr=RTBParser::processRTBMessage(thirdCommand); if (pr->messageType!=Parser::YOUR_COLOUR) throw ParserException("Third command was not YourColour but: "+thirdCommand); ostringstream numberGenerator; numberGenerator.setf(ios_base::hex,ios_base::basefield); numberGenerator << pr->intValue[0]; mrc->setRuntimeProperty("Main","ActualColor",numberGenerator.str()); break; } case 1: { // it is the first sequence, send our color and name to the RTBServer mrc->setRuntimeProperty("Main","FirstSequence","true"); // now we have to find out our name and color string robotName(mrc->getConfigurationProperty("Main","RobotName")); mrc->setRuntimeProperty("Main","ActualName",robotName); string robotHomeColorString(mrc->getConfigurationProperty("Main","RobotHomeColour")); string robotAwayColorString(mrc->getConfigurationProperty("Main","RobotAwayColour")); // parse Color numberParser.setf(ios_base::hex,ios_base::basefield); numberParser.clear(); numberParser.str(robotHomeColorString); int robotHomeColor(-1); numberParser >> robotHomeColor; if (robotHomeColor==-1) throw ParserException("RobotHomeColour in section Main was no proper value but: "+robotHomeColorString); // register HomeColor as ActualColor in Runtime Properties mrc->setRuntimeProperty("Main","ActualColor", robotHomeColorString); numberParser.clear(); numberParser.str(robotAwayColorString); int robotAwayColor(-1); numberParser >> robotAwayColor; if (robotAwayColor==-1) throw ParserException("RobotAwayColour in section Main was no proper value but: "+robotAwayColorString); // construct commands commands << "Name " << robotName << endl; commands.setf(ios_base::hex,ios_base::basefield); commands << "Colour " << robotHomeColor << " " << robotAwayColor << endl; break; } default: throw ParserException("First command was no proper INITIALIZE command (wrong parameter): "+firstCommand); } // finally write commands to RealTime Battle Server rtbConnection->sendLine(commands.str()); } catch (ResourceNotFoundException& ex) { throw IOException("RTBInit::SendInitialMessages was not able to obtain the IOFactory object: "+ex.getMessage()); } catch (ParserException& ex) { throw IOException("Unexpected data received from the RealTime Battle Server in RTBInit::sendInitialMessages: "+ex.getMessage()); } catch (ConfigNotLoadedException& ex) { throw IOException("RTBInit::SendInitialMessages was not able to obtain a key needed for initial communication setup because no configuration data was set: "+ex.getMessage()); } catch (KeyNotFoundException& ex) { throw IOException("RTBInit::SendInitialMessages was not able to obtain key needed for initial communication setup because key was not present in configuration data: "+ex.getMessage()); } // our ostringstream encountered an error catch (ios_base::failure& ex) { throw IOException(string("RTBInit::SendInitialMessages : Could not create command for RTB!")+ex.what()); } catch (IOException& ex) { throw IOException("RTBInit::SendInitialMessages was not able to properly communicate with the RealTime Battle server: "+ex.getMessage()); } } /** * Starts the game as a client or as the RTB MasterServer (automatically found out by the MRC) * @return true, if no error occured in the whole sequence, false if something went wrong and we could not continue playing */ bool RTBInit::StartGame () throw (bad_exception, RTBException) { return MasterResourceControl::Instance()->getGameController()->start(); } } realtimebattle-1.0.8/team-framework/strategies/0002755000175000017500000000000010404234033017736 5ustar moimoirealtimebattle-1.0.8/team-framework/strategies/clientspecificrepository.h0000644000175000017500000000342510167276201025246 0ustar moimoi/************************************************************************ $Id: clientspecificrepository.h,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: clientspecificrepository.h,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef CLIENTSPECIFICREPOSITORY_H #define CLIENTSPECIFICREPOSITORY_H #include "specificrepository.h" /** * Namespace Strategies */ namespace Strategies { /** * Class ClientSpecificRepository */ class ClientSpecificRepository : public SpecificRepository{ /* * Public stuff */ public: /** * Destructor does nothing, only assures, that subclass instances will be deleted by their corresponding coordinator */ virtual ~ClientSpecificRepository () {} }; } #endif //CLIENTSPECIFICREPOSITORY_H realtimebattle-1.0.8/team-framework/strategies/clientstate.h0000644000175000017500000001573310167276201022446 0ustar moimoi/************************************************************************ $Id: clientstate.h,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: clientstate.h,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef CLIENTSTATE_H #define CLIENTSTATE_H #include "state.h" #include "../stdnamespace.h" #include "../gamecontrol/gamecontrolnamespace.h" #include "../exceptions/strategyexception.h" /** * Namespace Strategies */ namespace Strategies { using std::string; using std::bad_exception; using GameControl::ClientCoordinator; using Exceptions::StrategyException; /** * Class ClientState * * Note: Derived classes must have a reference to their corresponding coordinator object, the GameOptionsRepository object and to their client specific repositories in order to work properly. * TODO: Implement protected sendRTBMessage... methods with a reference to the coordinator object and the corresponding parameters that depends on the concrete message type that should be generated. */ class ClientState : public State { public: /** * Constructor */ ClientState(ClientCoordinator*) throw(); /** * Destructor, does nothing */ virtual ~ClientState () throw(); /** * Processes the server tips * @param tip The server tip in string shape */ virtual void reactOnServerTip (const string& tip) throw (StrategyException,bad_exception) = 0; /** * This method is called when all rtb messages in this round were received. After this method, the first server tips will arrive. */ virtual void roundFinished () throw (StrategyException,bad_exception) = 0; /** * This method is called when all server tips in this round were received. After this method, the state is to send its last messages. */ virtual void sendRTBMessages () throw (StrategyException,bad_exception) = 0; protected: void setCurrentClientState (unsigned char clientStateIndex) throw(StrategyException,bad_exception); /** * Requests sending "Rotate [what] [omega]" to RTB, which initiates continuous rotation. * @param what What to rotate; 1 = Robot, 2 = Cannon, 4 = Radar. A sum of these values means that multiple object shall be rotated at the same time * @param omega The angular velocity in rad/s */ void sendRTBMessageRotate(int what,double omega) throw(bad_exception); // >> see state.h, line 50 /** * Requests sending "RotateTo [what] [omega] [endAngle]" to RTB, which initiates limited rotation. * @param what What to rotate; 1 = Robot, 2 = Cannon, 4 = Radar. A sum of these values means that multiple object shall be rotated at the same time * @param omega The angular velocity in rad/s * @param endAngle The angle that shall be rotated to in rad */ void sendRTBMessageRotateTo(int what,double omega,double endAngle) throw(bad_exception); /** * Requests sending "RotateAmount [what] [omega] [angleDiff]" to RTB, which initiates limited rotation, too. * @param what What to rotate; 2 = Cannon, 4 = Radar. A sum of these values means that multiple object shall be rotated at the same time * @param omega The angular velocity in rad/s * @param angleDiff The angle that shall be rotated in rad, relative to the robot */ void sendRTBMessageRotateAmount(int what,double omega,double angleDiff) throw(bad_exception); /** * Requests sending "Sweep [what] [omega] [leftAngle] [rightAngle]" to RTB, which initiates continous sweeping. * @param what What to sweep; 2 = Cannon, 4 = Radar. A sum of these values means that multiple object shall be rotated at the same time * @param omega The angular velocity in rad/s * @param leftAngle The left sweeping limit angle in rad, relative to the robot * @param leftAngle The right sweeping limit angle in rad, relative to the robot */ void sendRTBMessageSweep(int what,double omega,double leftAngle,double rightAngle) throw(bad_exception); /** * Requests sending "Accelerate [accel]" to RTB, which sets a continuous acceleration. * @param accel The new acceleration to be set in units/s^2 */ void sendRTBMessageAccelerate(double accel) throw(bad_exception); /** * Requests sending "Brake [portion]" to RTB, which sets continuous braking. * @param brake The new brake deceleration to be set, the maximum value is 1.0, which means to brake with full slide friction */ void sendRTBMessageBrake(double portion) throw(bad_exception); /** * Requests sending "Shoot [energy]" to RTB, which sends out a shot. * @param energy The energy of the new shot */ void sendRTBMessageShoot(double energy) throw(bad_exception); /** * Requests sending "Print [message]" to RTB, which prints a message on the RTB message window. * @param message The text that shall be print */ void sendRTBMessagePrint(const string& message) throw(bad_exception); /** * Requests sending "Debug [message]" to RTB, which prints a message on the RTB message window if in debug mode. * @param message The text that shall be print */ void sendRTBMessageDebug(const string& message) throw(bad_exception); /** * Requests sending "DebugLine [angle1] [dist1] [angle2] [dist]" to RTB, which draws a line onto the RTB arena window. This method has effects only if in debug level 5. * @param angle1 and ... * @param dist1 ... The beginning point of the line in polar coordinates, relative to the robot * @param angle2 and ... * @param dist2 ... The ending point of the line in polar coordinates, relative to the robot */ void sendRTBMessageDebugLine(double angle1,double dist1,double angle2,double dist2) throw(bad_exception); /** * Requests sending "DebugCircle [centerAngle] [centerDist] [radius]" to RTB, which draws a circle onto the RTB arena window. This method has effects only if in debug level 5. * @param centerAngle and ... * @param centerDist ... The center of the circle in polar coordinates, relative to the robot * @param radius The radius of the dircle */ void sendRTBMessageDebugCircle(double centerAngle,double centerDist,double radius) throw(bad_exception); private: ClientCoordinator *_clientCoordinator; }; } #endif //CLIENTSTATE_H realtimebattle-1.0.8/team-framework/strategies/clientstatedata.h0000644000175000017500000000435010167276201023271 0ustar moimoi/************************************************************************ $Id: clientstatedata.h,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: clientstatedata.h,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef CLIENTSTATEDATA_H #define CLIENTSTATEDATA_H #include #include "clientstate.h" #include "clientspecificrepository.h" #include "../rtbglobal/pvector.h" /** * Namespace Strategies */ namespace Strategies { using std::auto_ptr; using RTBGlobal::pvector; using std::bad_exception; /** * Class ClientStateData */ class ClientStateData { public: /** * Contains the client states. "clientStates[0]" is the beginning state. */ auto_ptr < pvector > clientStates; /** * Important: This field only assures, that the repository will be deleted afterwards, passing it to the states is task of the strategy factory */ auto_ptr clientSpecificRepository; /** * Constructor */ ClientStateData ( auto_ptr < pvector > clientStates, auto_ptr clientSpecificRepository ) throw(bad_exception); /** * Destructor, does nothing */ ~ClientStateData () throw(); }; } #endif //CLIENTSTATEDATA_H realtimebattle-1.0.8/team-framework/strategies/internalserverspecificrepository.h0000644000175000017500000000365610167276201027041 0ustar moimoi/************************************************************************ $Id: internalserverspecificrepository.h,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: internalserverspecificrepository.h,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef INTERNALSERVERSPECIFICREPOSITORY_H #define INTERNALSERVERSPECIFICREPOSITORY_H #include "specificrepository.h" /** * Namespace Strategies */ namespace Strategies { /** * Class InternalServerSpecificRepository * * contains the data for the state objects of every ServerCoordinator instance */ class InternalServerSpecificRepository: public SpecificRepository { /* * Public stuff */ public: /** * Destructor (does nothing, only assures that instances of concrete subclasses will be deleted properly by their coordinator */ virtual ~InternalServerSpecificRepository () {} }; } #endif //INTERNALSERVERSPECIFICREPOSITORY_H realtimebattle-1.0.8/team-framework/strategies/serverstate.h0000644000175000017500000000457710167276201022502 0ustar moimoi/************************************************************************ $Id: serverstate.h,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: serverstate.h,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef SERVERSTATE_H #define SERVERSTATE_H #include "state.h" #include "../stdnamespace.h" #include "strategiesnamespace.h" #include "../gamecontrol/gamecontrolnamespace.h" #include "../exceptions/strategyexception.h" /** * Namespace Strategies */ namespace Strategies { using std::string; using std::bad_exception; using GameControl::ServerCoordinator; using Exceptions::StrategyException; /** * Class ServerState */ class ServerState : public State { public: ServerState(ServerCoordinator* c) throw(); /** * Destructor, does nothing */ virtual ~ServerState () throw(); /** * This method is called from the coordinator's processReceivedRTBMessages method and should send tips to the clients. */ virtual void sendServerTips () throw (StrategyException,bad_exception) = 0; protected: void setCurrentServerState (unsigned char serverStateIndex) throw (); /** * Adds a new tip to the tip buffer of the ServerCoordinator * @param tip The server tip in string shape */ void sendServerTipString (const string& tip) throw (StrategyException,bad_exception); private: ServerCoordinator *_serverCoordinator; }; } #endif //SERVERSTATE_H realtimebattle-1.0.8/team-framework/strategies/serverstatedata.h0000644000175000017500000000543710167276201023330 0ustar moimoi/************************************************************************ $Id: serverstatedata.h,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: serverstatedata.h,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef SERVERSTATEDATA_H #define SERVERSTATEDATA_H #include #include "strategiesnamespace.h" #include "serverstate.h" #include "internalserverspecificrepository.h" #include "sharedserverspecificrepository.h" #include "../rtbglobal/pvector.h" /** * Namespace Strategies */ namespace Strategies { using std::auto_ptr; using std::bad_exception; using RTBGlobal::pvector; /** * class ServerStateData */ class ServerStateData { public: /** * Contains the server states. "serverStates[0]" is the beginning state. */ auto_ptr < pvector > serverStates; /** * The only purpose of this field is to assure, that the repository will be deleted and reseted by the Coordinator, to pass this repository * and the SharedServerSpecificRepository to the states is task of the concrete stzrategy factory */ auto_ptr internalServerSpecificRepository; /** * The only purpose of this field is to assure, that the repository will be reseted by the Coordinator, to pass this repository * and the SharedServerSpecificRepository to the states is task of the concrete stzrategy factory */ SharedServerSpecificRepository* sharedServerSpecificRepository; ServerStateData (auto_ptr < pvector > serverStates, auto_ptr internalServerSpecificRepository,SharedServerSpecificRepository* sharedServerSpecificRepository) throw(bad_exception); /** * Destructor, does nothing */ ~ServerStateData () throw(); }; } #endif //SERVERSTATEDATA_H realtimebattle-1.0.8/team-framework/strategies/sharedserverspecificrepository.h0000644000175000017500000000351510167276201026465 0ustar moimoi/************************************************************************ $Id: sharedserverspecificrepository.h,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: sharedserverspecificrepository.h,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef SHAREDSERVERSPECIFICREPOSITORY_H #define SHAREDSERVERSPECIFICREPOSITORY_H #include "specificrepository.h" /** * Namespace Strategies */ namespace Strategies { /** * Class SharedServerSpecificRepository * * Contains the data shared by all ServerCoordinators. * Concrete subclasses should be singletons */ class SharedServerSpecificRepository : public SpecificRepository { /* * Public stuff */ public: /** * Destructor (does nothing) */ virtual ~SharedServerSpecificRepository () {} }; } #endif //SHAREDSERVERSPECIFICREPOSITORY_H realtimebattle-1.0.8/team-framework/strategies/specificrepository.h0000644000175000017500000000414410167276201024046 0ustar moimoi/************************************************************************ $Id: specificrepository.h,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: specificrepository.h,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef SPECIFICREPOSITORY_H #define SPECIFICREPOSITORY_H #include "../exceptions/strategyexception.h" #include /** * Namespace Strategies */ namespace Strategies { using std::bad_exception; using Exceptions::StrategyException; /** * Class SpecificRepository * * SpecificRepository is the base class of all robot specific repositories. * In a repository, every strategy can store individual data. * The only common method is the ability to reset the repository */ class SpecificRepository { /* * Public stuff */ public: /** * Method to reset the repositories */ virtual void reset() throw(StrategyException, bad_exception)=0; /** * Destructor (does nothing, only assures that instances of concrete subclasses will be deleted properly by their coordinator */ virtual ~SpecificRepository () {}; }; } #endif realtimebattle-1.0.8/team-framework/strategies/state.h0000644000175000017500000001402210167276201021235 0ustar moimoi/************************************************************************ $Id: state.h,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: state.h,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef STATE_H #define STATE_H #include "../stdnamespace.h" #include "../parser/object_type.h" #include "../parser/warning_type.h" #include "../exceptions/strategyexception.h" /** * Namespace Strategies */ namespace Strategies { using std::string; using std::bad_exception; using Exceptions::StrategyException; using Parser::object_type; using Parser::warning_type; /** * Class State * TODO: receiveRTBMessage... Methods */ class State { public: /** * Destructor, does nothing */ virtual ~State () {}; /** * This method is called by ClientCoordinatorRevokes::resetGame() */ virtual void reset () throw (bad_exception, StrategyException) = 0; /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ virtual void receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ virtual void receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ virtual void receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ virtual void receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ virtual void receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception) = 0; // >> Maybe we should introduce another // enum for this (TODO) /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ virtual void receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ virtual void receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ virtual void receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ virtual void receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception) = 0; /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ virtual void receiveRTBMessageDead() throw (StrategyException, bad_exception) = 0; }; } #endif //STATE_H realtimebattle-1.0.8/team-framework/strategies/strategiesnamespace.h0000644000175000017500000000310710167276201024146 0ustar moimoi/************************************************************************ $Id: strategiesnamespace.h,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: strategiesnamespace.h,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ /** * Namespace Strategies */ namespace Strategies { class SpecificRepository; class ClientSpecificRepository; class SharedServerSpecificRepository; class InternalServerSpecificRepository; class State; class ServerState; class StrategyFactory; class ClientState; class ServerStateData; class ClientStateData; } realtimebattle-1.0.8/team-framework/strategies/strategyfactory.h0000644000175000017500000000651710167276201023361 0ustar moimoi/************************************************************************ $Id: strategyfactory.h,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: strategyfactory.h,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef STRATEGYFACTORY_H #define STRATEGYFACTORY_H #include "strategiesnamespace.h" #include #include "serverstatedata.h" #include "clientstatedata.h" #include "../gamecontrol/gameoptionsrepository.h" /** * Namespace Strategies */ namespace Strategies { using std::auto_ptr; using GameControl::ClientCoordinator; using GameControl::ServerCoordinator; using GameControl::GameOptionsRepository; /** * Class StrategyFactory */ class StrategyFactory { /* * Public stuff */ public: /* * Operations */ /** * Note: The created state objects should get their repositories passed in the constructor, though the coordinator is only responsable to delete these resources but not to provide access to them. * @param serverCoordinator This object should be passed in all constructors of the created state objects. * @param gameOptionsRepository This object should also be passed in all constructors of the created state objects. */ virtual auto_ptr createServerStateData (ServerCoordinator* serverCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception) = 0; /** * Note: The created state objects should get their repositories passed in the constructor, though the coordinator is only responsable to delete these resources but not to provide access to them. * @param clientCoordinator This object should be passed in all constructors of the created state objects. * @param gameOptionsRepository This object should also be passed in all constructors of the created state objects. */ virtual auto_ptr createClientStateData (ClientCoordinator* clientCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception) = 0; /** * Returns the string indicating that the server tips have finished. * Note: The value of this string must not be used as a normel server tip. */ virtual string getFinishingString() const throw(bad_exception) = 0; /** * */ virtual ~StrategyFactory () throw () {} }; } #endif //STRATEGYFACTORY_H realtimebattle-1.0.8/team-framework/strategies/clientstate.cpp0000644000175000017500000000725010167276201022774 0ustar moimoi/************************************************************************ $Id: clientstate.cpp,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: clientstate.cpp,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include #include "clientstate.h" #include "../gamecontrol/clientcoordinator.h" using Strategies::ClientState; using std::ios; using std::endl; using Exceptions::StrategyException; ClientState::ClientState(ClientCoordinator* c) throw():_clientCoordinator(c) {} void ClientState::setCurrentClientState (unsigned char clientStateIndex) throw (StrategyException,bad_exception) { _clientCoordinator->setCurrentClientState(clientStateIndex); } ClientState::~ClientState() throw() {}; void ClientState::sendRTBMessageRotate(int what,double omega) throw (bad_exception) {_clientCoordinator->messageBuffer()<<"Rotate "<messageBuffer()<<"RotateTo "<messageBuffer()<<"RotateAmount "<messageBuffer()<<"Sweep "<messageBuffer()<<"Accelerate "<messageBuffer()<<"Brake "<messageBuffer()<<"Shoot "<messageBuffer()<<"Print "<messageBuffer()<<"Debug "<messageBuffer()<<"DebugLine "<messageBuffer()<<"DebugCircle "< #include "clientstatedata.h" using Strategies::ClientStateData; ClientStateData::ClientStateData ( auto_ptr < pvector > states, auto_ptr rep ) throw(bad_exception) : clientStates(states),clientSpecificRepository(rep) { } ClientStateData::~ClientStateData () throw() {} realtimebattle-1.0.8/team-framework/strategies/serverstate.cpp0000644000175000017500000000345010167276201023022 0ustar moimoi/************************************************************************ $Id: serverstate.cpp,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: serverstate.cpp,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "serverstate.h" #include "../gamecontrol/servercoordinator.h" using Strategies::ServerState; using std::endl; ServerState::ServerState(ServerCoordinator* c) throw():_serverCoordinator(c){} ServerState::~ServerState() throw() {} void ServerState::setCurrentServerState (unsigned char serverStateIndex) throw() { _serverCoordinator->setCurrentServerState(serverStateIndex); } void ServerState::sendServerTipString (const string& tip) throw(StrategyException,bad_exception) { _serverCoordinator->tipBuffer() << tip << endl; } realtimebattle-1.0.8/team-framework/strategies/serverstatedata.cpp0000644000175000017500000000324610167276201023657 0ustar moimoi/************************************************************************ $Id: serverstatedata.cpp,v 1.2 2005/01/06 17:59:29 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: serverstatedata.cpp,v $ Revision 1.2 2005/01/06 17:59:29 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "serverstatedata.h" using Strategies::ServerStateData; ServerStateData::ServerStateData (auto_ptr < pvector > states, auto_ptr irep,SharedServerSpecificRepository* srep) throw(bad_exception): serverStates(states),internalServerSpecificRepository(irep),sharedServerSpecificRepository(srep) { } ServerStateData::~ServerStateData () throw() {} realtimebattle-1.0.8/team-framework/bots/0002755000175000017500000000000010324172254016542 5ustar moimoirealtimebattle-1.0.8/team-framework/bots/brotfrucht/0002755000175000017500000000000010404234033020715 5ustar moimoirealtimebattle-1.0.8/team-framework/bots/brotfrucht/bfclientbasicstate.h0000644000175000017500000001663310167276176024752 0ustar moimoi/************************************************************************ $Id: bfclientbasicstate.h,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfclientbasicstate.h,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef BFCLIENTBASICSTATE_H #define BFCLIENTBASICSTATE_H #include "../../gamecontrol/gamecontrolnamespace.h" #include "../../strategies/clientstate.h" #include #include "brotfruchtnamespace.h" /** * Namespace Brotfrucht */ namespace Brotfrucht { using GameControl::GameOptionsRepository; using std::ostringstream; using Strategies::ClientState; using GameControl::ClientCoordinator; using Exceptions::StrategyException; using std::string; using std::bad_exception; using Parser::object_type; using Parser::warning_type; /** * Class BFClientBasicState * * This class is the base of all brotfrucht client states. Here, the default actions, that will be done by every state * (unless it defines something else) are determined. States, that want to extend and not to entirely replace the action * of this base class, should simpkly call the corresponding method in this class before executinh their own stuff */ class BFClientBasicState: public Strategies::ClientState { public: BFClientBasicState(ClientCoordinator* i,BFClientSpecificRepository* bfcsp,const GameOptionsRepository* go) throw (StrategyException,bad_exception); virtual ~BFClientBasicState () throw(); /** * Processes the server tips * @param tip The server tip in string shape */ virtual void reactOnServerTip (const string& tip) throw (StrategyException,bad_exception); /** * This method is called when all rtb messages in this round were received. After this method, the first server tips will arrive. */ virtual void roundFinished () throw (StrategyException,bad_exception); /** * This method is called when all server tips in this round were received. After this method, the state is to send its last messages. */ virtual void sendRTBMessages () throw (StrategyException,bad_exception); /** * This method is called by ClientCoordinatorRevokes::resetGame() */ virtual void reset () throw (bad_exception, StrategyException); /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ virtual void receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ virtual void receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ virtual void receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ virtual void receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ virtual void receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception); // >> Maybe we should introduce another // enum for this (TODO) /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ virtual void receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ virtual void receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ virtual void receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ virtual void receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ virtual void receiveRTBMessageDead() throw (StrategyException, bad_exception); private: BFClientSpecificRepository* _bfcsp; const GameOptionsRepository* _go; ostringstream _numberconf; }; } #endif realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfclientshoothalfstate.h0000644000175000017500000000446210167276176025655 0ustar moimoi/************************************************************************ $Id: bfclientshoothalfstate.h,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfclientshoothalfstate.h,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef BFCLIENTSHOOTHALFSTATE_H #define BFCLIENTSHOOTHALFSTATE_H #include "bfclientbasicstate.h" /** * Namespace Brotfrucht */ namespace Brotfrucht { class BFClientShootHalfState: public BFClientBasicState { public: BFClientShootHalfState(ClientCoordinator* i,BFClientSpecificRepository* bfcsp,const GameOptionsRepository* go) throw (StrategyException,bad_exception); /** * This method is called by ClientCoordinatorRevokes::resetGame() */ void reset () throw (bad_exception, StrategyException); /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ void receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception); private: double _shootInterval; BFClientSpecificRepository* _bfcsp; /** * Because robotsLeft is also sent when a new game starts, this variable determines, whether a robot is gone or not. */ bool _no_robot_died; }; } #endif realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfclientshoottwicestate.h0000644000175000017500000000404210167276176026050 0ustar moimoi/************************************************************************ $Id: bfclientshoottwicestate.h,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfclientshoottwicestate.h,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef BFCLIENTSHOOTTWICESTATE_H #define BFCLIENTSHOOTTWICESTATE_H #include "bfclientbasicstate.h" /** * Namespace Brotfrucht */ namespace Brotfrucht { /** * Class BFClientShootTwiceState */ class BFClientShootTwiceState: public BFClientBasicState { public: BFClientShootTwiceState(ClientCoordinator* i,BFClientSpecificRepository* bfcsp,const GameOptionsRepository* go) throw (StrategyException,bad_exception); /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ void receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception); private: BFClientSpecificRepository* _bfcsp; }; } #endif realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfclientspecificrepository.h0000644000175000017500000000724110167276176026550 0ustar moimoi/************************************************************************ $Id: bfclientspecificrepository.h,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfclientspecificrepository.h,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef BFCLIENTSPECIFICREPOSITORY #define BFCLIENTSPECIFICREPOSITORY #include "../../strategies/clientspecificrepository.h" #include #include "../../exceptions/strategyexception.h" #include "../../log/logger.h" #include /** * Namespace Brotfrucht */ namespace Brotfrucht { using Exceptions::StrategyException; using std::auto_ptr; using Log::Logger; using std::bad_exception; using Strategies::ClientSpecificRepository; /** * Class BFClientSpecificRepository * * This repository will conbtain (at first) the position of the robot and the number of collisions it had. * Furthermore, it contains a timer when it had to shoot again */ class BFClientSpecificRepository: public Strategies::ClientSpecificRepository { public: /** * Method to reset the repositories (clears number of collisions, (re)starts timer) */ void reset() throw(StrategyException, bad_exception); /** * Method to set the shoting interval in nanoseconds */ void setShootingInterval(double i) throw(); /** * Method to get the shooting intervall in nanoseconds */ double getShootingInterval()const throw(); /** * Increment collision count */ void oneMoreCollision() throw(); /** * Get number of collisons the roboter has had since the last reset */ int getCollisionCount() const throw(); /** * (Re)Start the timer with the current systemtime * Throws exception if starting the timer does not work */ void startTimer() throw(StrategyException); /** * Get nanoseconds passed since the timer was started * Throws exception if getting the current time failed */ double getTimePassed() const throw(StrategyException); /** * Get the logger for the client brotfrucht strategy states */ Logger* getLogger() const throw(); /** * Destructor (does nothing) */ ~BFClientSpecificRepository() throw(); /** * Constructor */ BFClientSpecificRepository() throw(StrategyException, bad_exception); private: /** * number of hits of the robot */ int _hits; /** * start of the timer */ timespec _timerstart; /** * The logger for the client states of brotfrucht */ auto_ptr _logger; /** * The shooting intervall in nanoseconds */ double _shootingInterval; }; } #endif realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfclientstateenum.h0000644000175000017500000000265010167276176024627 0ustar moimoi/************************************************************************ $Id: bfclientstateenum.h,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfclientstateenum.h,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef BFCLIENTSTATEENUM #define BFCLIENTSTATEENUM /** * Namespace Brotfrucht */ namespace Brotfrucht { enum BFClientStateEnum {SHOOTHALF=0,SHOOTTWICE=1}; } #endif realtimebattle-1.0.8/team-framework/bots/brotfrucht/bffactory.h0000644000175000017500000000753310167276176023077 0ustar moimoi/************************************************************************ $Id: bffactory.h,v 1.3 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bffactory.h,v $ Revision 1.3 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef BFFACTORY_H #define BFFACTORY_H #include "../../gamecontrol/gamecontrolnamespace.h" #include "../../strategies/strategiesnamespace.h" #include "../../strategies/strategyfactory.h" #include "../../strategies/serverstatedata.h" #include "../../strategies/clientstatedata.h" #include "../../exceptions/strategyexception.h" #include #include "brotfruchtnamespace.h" /** * Namespace Brotfrucht */ namespace Brotfrucht { using GameControl::ServerCoordinator; using GameControl::ClientCoordinator; using GameControl::GameOptionsRepository; using Strategies::StrategyFactory; using Strategies::ServerStateData; using Strategies::ClientStateData; using Exceptions::StrategyException; using std::auto_ptr; using std::bad_exception; using std::string; using Strategies::StrategyFactory; /** * Class BFFactory */ class BFFactory : public Strategies::StrategyFactory { public: BFFactory(); /** * This method creates instances of the server states, in particular BFServerRotateState and BFServerNoRotateState. * Note: The created state objects should get their repositories passed in the constructor, though the coordinator is only responsable to delete these resources but not to provide access to them. * @param serverCoordinator This object should be passed in all constructors of the created state objects. * @param gameOptionsRepository This object should also be passed in all constructors of the created state objects. */ auto_ptr createServerStateData (ServerCoordinator* serverCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception); /** * This method creates instances of the client states, in particular BFClientShootHalfState and BFClientShootTwiceState. * Note: The created state objects should get their repositories passed in the constructor, though the coordinator is only responsable to delete these resources but not to provide access to them. * @param clientCoordinator This object should be passed in all constructors of the created state objects. * @param gameOptionsRepository This object should also be passed in all constructors of the created state objects. */ auto_ptr createClientStateData (ClientCoordinator* clientCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception); /** * Returns the string indicating that the server tips have finished, in particular "BFE". * Note: The value of this string must not be used as a normel server tip. */ string getFinishingString() const throw(bad_exception); }; } #endif //BFFACTORY_H realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfinternalserverspecificrepository.h0000644000175000017500000000466310167276176030342 0ustar moimoi/************************************************************************ $Id: bfinternalserverspecificrepository.h,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfinternalserverspecificrepository.h,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef BFINTERNALSERVERSPECIFICREPOSITORY #define BFINTERNALSERVERSPECIFICREPOSITORY #include "../../strategies/internalserverspecificrepository.h" /** * Namespace Brotfrucht */ namespace Brotfrucht { using Strategies::InternalServerSpecificRepository; /** * Class BFInternalServerSpecificRepository * * This class will contain at first only the position of the robot */ class BFInternalServerSpecificRepository: public Strategies::InternalServerSpecificRepository { public: /** * Method to reset the repositories (clears position) */ void reset() throw(); /** * Set the new position of the robot */ void setRobotPosition(double x, double y) throw(); /** * Get the position of the robot */ void getRobotPosition(double& x, double& y) const throw(); /** * Destructor (does nothing) */ ~BFInternalServerSpecificRepository() throw(); /** * Constructor */ BFInternalServerSpecificRepository() throw(); private: /** * x coordinate of the robot */ double _robotX; /** * y coordinate of the robot */ double _robotY; }; } #endif realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfserverbasicstate.h0000644000175000017500000001625010167276176024775 0ustar moimoi/************************************************************************ $Id: bfserverbasicstate.h,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfserverbasicstate.h,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef BFSERVERBASICSTATE_H #define BFSERVERBASICSTATE_H #include "../../strategies/serverstate.h" #include "brotfruchtnamespace.h" #include /** * Namespace Brotfrucht */ namespace Brotfrucht { using Strategies::ServerState; using Exceptions::StrategyException; using std::string; using std::bad_exception; using Parser::object_type; using Parser::warning_type; using GameControl::ServerCoordinator; using std::ostringstream; /** * Class BFServerBasicState * * This class is the base of all brotfrucht server states. Here, the default actions, that will be done by every state * (unless it defines something else) are determined. States, that want to extend and not to entirely replace the action * of this base class, should simpkly call the corresponding method in this class before executinh their own stuff */ class BFServerBasicState: public Strategies::ServerState { public: BFServerBasicState(ServerCoordinator* c,BFInternalServerSpecificRepository* bfssp, BFSharedServerSpecificRepository* bfsharedssp) throw (StrategyException,bad_exception); /** * Destructor, does nothing */ virtual ~BFServerBasicState () throw(); /** * This method is called from the coordinator's processReceivedRTBMessages method and should send tips to the clients. */ virtual void sendServerTips () throw (StrategyException,bad_exception); /** * This method is called by ClientCoordinatorRevokes::resetGame() */ virtual void reset () throw (bad_exception, StrategyException); /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ virtual void receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ virtual void receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ virtual void receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ virtual void receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ virtual void receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception); // >> Maybe we should introduce another // enum for this (TODO) /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ virtual void receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ virtual void receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ virtual void receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ virtual void receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ virtual void receiveRTBMessageDead() throw (StrategyException, bad_exception); protected: /** * Obtain the robot name for sub classes */ inline string getRobotName() throw () { return _robotName;} private: BFInternalServerSpecificRepository* _bfssp; string _robotName; ostringstream _numberconv; BFSharedServerSpecificRepository* _bfsharedssp; static bool _newGame; }; } #endif realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfservernorotatestate.h0000644000175000017500000000445310167276176025551 0ustar moimoi/************************************************************************ $Id: bfservernorotatestate.h,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfservernorotatestate.h,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef BFSERVERNOROTATESTATE_H #define BFSERVERNOROTATESTATE_H #include "bfserverbasicstate.h" /** * Namespace Brotfrucht */ namespace Brotfrucht { /** * class BFServerNoRotateState */ class BFServerNoRotateState: public BFServerBasicState { public: BFServerNoRotateState(ServerCoordinator* c,BFInternalServerSpecificRepository* bfssp, BFSharedServerSpecificRepository* bfsharedssp) throw (StrategyException,bad_exception); /** * This method is called by ClientCoordinatorRevokes::resetGame() */ void reset () throw (bad_exception, StrategyException); /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ void receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception); private: BFSharedServerSpecificRepository* _bfsharedssp; }; } #endif realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfserverrotatestate.h0000644000175000017500000000422610167276176025212 0ustar moimoi/************************************************************************ $Id: bfserverrotatestate.h,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfserverrotatestate.h,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef BFSERVERROTATESTATE_H #define BFSERVERROTATESTATE_H #include "bfserverbasicstate.h" /** * Namespace Brotfrucht */ namespace Brotfrucht { /** * Class BFServerRotateState */ class BFServerRotateState: public BFServerBasicState { public: BFServerRotateState(ServerCoordinator* c,BFInternalServerSpecificRepository* bfssp, BFSharedServerSpecificRepository* bfsharedssp) throw (StrategyException,bad_exception); /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ void receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception); private: BFSharedServerSpecificRepository* _bfsharedssp; }; } #endif realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfserverstateenum.h0000644000175000017500000000265010167276176024657 0ustar moimoi/************************************************************************ $Id: bfserverstateenum.h,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfserverstateenum.h,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef BFSERVERSTATEENUM #define BFSERVERSTATEENUM /** * Namespace Brotfrucht */ namespace Brotfrucht { enum BFServerStateEnum {DONOTROTATE=0,DOROTATE=1}; } #endif realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfsharedserverspecificrepository.h0000644000175000017500000000675510167276176030000 0ustar moimoi/************************************************************************ $Id: bfsharedserverspecificrepository.h,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfsharedserverspecificrepository.h,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef BFSHAREDSERVERSPECIFICREPOSITORY #define BFSHAREDSERVERSPECIFICREPOSITORY #include "../../strategies/sharedserverspecificrepository.h" #include "../../exceptions/strategyexception.h" #include "../../log/logger.h" #include #include #include #include /** * Namespace Brotfrucht */ namespace Brotfrucht { using std::auto_ptr; using std::vector; using std::string; using std::out_of_range; using std::bad_exception; using Log::Logger; using Exceptions::StrategyException; using Strategies::SharedServerSpecificRepository; /** * Class BFSharedServerSpecificRepository * At first, BrotFruchtSharedServerSpecificRepository will be a Singleton object, that will only contain one single element: a vector with the names of all participating friendly robots */ class BFSharedServerSpecificRepository: public Strategies::SharedServerSpecificRepository { public: /** * Method to obtain the one and only object of this class */ static BFSharedServerSpecificRepository* Instance() throw (bad_exception); /** * Method to reset the repositories (clears all names out of the vector */ void reset() throw (bad_exception); /** * Appends the own robot name to the vector */ void appendRobotName(const string& robotName) throw (bad_exception); /** * Gets the name of the roboter with the given index */ const string& getRobotName (int i) const throw (bad_exception, out_of_range); /** * Get the number of (friendly) robots */ int getRobotNumber() const throw (); /** * Destructor (does nothing) */ ~BFSharedServerSpecificRepository() throw (); /** * Get the shared logger for all server brotfrucht strategy states */ Logger* getLogger() const throw(); private: /** * Only instance of this class */ static auto_ptr _instance; /** * vector with the names of the robots */ vector _robotNames; /** * for logging messages */ auto_ptr _logger; /** * Constructor */ BFSharedServerSpecificRepository()throw (StrategyException, bad_exception); }; } #endif realtimebattle-1.0.8/team-framework/bots/brotfrucht/brotfruchtnamespace.h0000644000175000017500000000310010167276176025141 0ustar moimoi/************************************************************************ $Id: brotfruchtnamespace.h,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: brotfruchtnamespace.h,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef BROTFRUCHTNAMESPACE_H #define BROTFRUCHTNAMESPACE_H /** * Namespace Brotfrucht */ namespace Brotfrucht { class BFClientBasicState; class BFServerBasicState; class BFClientSpecificRepository; class BFInternalServerSpecificRepository; class BFSharedServerSpecificRepository; class BFFactory; } #endif realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfclientbasicstate.cpp0000644000175000017500000001637010300414045025255 0ustar moimoi/************************************************************************ $Id: bfclientbasicstate.cpp,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfclientbasicstate.cpp,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "bfclientbasicstate.h" #include "../../gamecontrol/gameoptionsrepository.h" #include "bfclientspecificrepository.h" namespace Brotfrucht { BFClientBasicState::BFClientBasicState(ClientCoordinator* i,BFClientSpecificRepository* bfcsp,const GameOptionsRepository* go) throw (StrategyException,bad_exception):ClientState(i),_bfcsp(bfcsp),_go(go) {} BFClientBasicState::~BFClientBasicState () throw() {} /** * Processes the server tips * @param tip The server tip in string shape */ void BFClientBasicState::reactOnServerTip (const string& tip) throw (StrategyException,bad_exception) { if (tip=="STARTROTATION") sendRTBMessageRotate(2,_go->ROBOT_CANNON_MAX_ROTATE); else if (tip=="STOPROTATION") sendRTBMessageRotate(2,0.0); else _bfcsp->getLogger()->logMessage(100,"Unknown server tip in brotfrucht: "+tip); } /** * This method is called when all rtb messages in this round were received. After this method, the first server tips will arrive. */ void BFClientBasicState::roundFinished () throw (StrategyException,bad_exception) {} /** * This method is called when all server tips in this round were received. After this method, the state is to send its last messages. */ void BFClientBasicState::sendRTBMessages () throw (StrategyException,bad_exception) { if (_bfcsp->getTimePassed()>_bfcsp->getShootingInterval()) { sendRTBMessageShoot(_go->SHOT_MAX_ENERGY/3); _bfcsp->startTimer(); } } /** * This method is called by ClientCoordinatorRevokes::resetGame() */ void BFClientBasicState::reset () throw (bad_exception, StrategyException) {} /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ void BFClientBasicState::receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ void BFClientBasicState::receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ void BFClientBasicState::receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ void BFClientBasicState::receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ void BFClientBasicState::receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception) {} // >> Maybe we should introduce another // enum for this (TODO) /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ void BFClientBasicState::receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ void BFClientBasicState::receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ void BFClientBasicState::receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception) { _bfcsp->oneMoreCollision(); _numberconf << (_bfcsp->getCollisionCount()); _bfcsp->getLogger()->logMessage(3,string("This was collision number :")+_numberconf.str()); _numberconf.clear(); _numberconf.str(""); } /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ void BFClientBasicState::receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ void BFClientBasicState::receiveRTBMessageDead() throw (StrategyException, bad_exception) {} } realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfclientshoothalfstate.cpp0000644000175000017500000000657010167276176026212 0ustar moimoi/************************************************************************ $Id: bfclientshoothalfstate.cpp,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfclientshoothalfstate.cpp,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "bfclientshoothalfstate.h" #include "bfclientstateenum.h" #include "bfclientspecificrepository.h" #include #include "../../rtbglobal/masterresourcecontrol.h" #include "../../exceptions/rtbexception.h" namespace Brotfrucht { using std::istringstream; using RTBGlobal::MasterResourceControl; using Exceptions::RTBException; BFClientShootHalfState::BFClientShootHalfState(ClientCoordinator* i,BFClientSpecificRepository* bfcsp,const GameOptionsRepository* go) throw (StrategyException,bad_exception):BFClientBasicState(i,bfcsp,go),_shootInterval(0),_bfcsp(bfcsp) { // obtain shooting frequency string shootingInterval; try { shootingInterval=MasterResourceControl::Instance()->getConfigurationProperty("BrotFrucht","ShootInterval"); } catch (RTBException& ex) { throw StrategyException("Could not obtain shooting frequency for brotfrucht client states: "+ex.getMessage()); } istringstream numberconv(shootingInterval); double shootInterval_dbl; numberconv >> shootInterval_dbl; if(shootInterval_dbl<=0) throw StrategyException("Could not obtain shooting frequency for brotfrucht client: no value greater than 0.0 seconds!"); _shootInterval=shootInterval_dbl*1e9; } /** * This method is called by ClientCoordinatorRevokes::resetGame() */ void BFClientShootHalfState::reset () throw (bad_exception, StrategyException) { BFClientBasicState::reset(); _bfcsp->setShootingInterval(_shootInterval); _no_robot_died=true; } /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ void BFClientShootHalfState::receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception) { BFClientBasicState::receiveRTBMessageRobotsLeft(num); if (!_no_robot_died) { _bfcsp->getLogger()->logMessage(1,"Another robot died, doubling shoot frequency..."); _bfcsp->setShootingInterval(_bfcsp->getShootingInterval()/2); setCurrentClientState(SHOOTTWICE); } else _no_robot_died=false; } } realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfclientshoottwicestate.cpp0000644000175000017500000000437710167276176026416 0ustar moimoi/************************************************************************ $Id: bfclientshoottwicestate.cpp,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfclientshoottwicestate.cpp,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "bfclientshoottwicestate.h" #include "bfclientstateenum.h" #include "bfclientspecificrepository.h" namespace Brotfrucht { BFClientShootTwiceState::BFClientShootTwiceState(ClientCoordinator* i,BFClientSpecificRepository* bfcsp,const GameOptionsRepository* go) throw (StrategyException,bad_exception):BFClientBasicState(i,bfcsp,go),_bfcsp(bfcsp) {} /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ void BFClientShootTwiceState::receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception) { BFClientBasicState::receiveRTBMessageRobotsLeft(num); _bfcsp->getLogger()->logMessage(1,"Another robot died, reducing shoot frequency to the normal level..."); _bfcsp->setShootingInterval(_bfcsp->getShootingInterval()*2); // we change the state now!!! setCurrentClientState(SHOOTHALF); } } realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfclientspecificrepository.cpp0000644000175000017500000000766210167276176027112 0ustar moimoi/************************************************************************ $Id: bfclientspecificrepository.cpp,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfclientspecificrepository.cpp,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "bfclientspecificrepository.h" #include #include #include #include "../../rtbglobal/masterresourcecontrol.h" namespace Brotfrucht { using std::string; using RTBGlobal::MasterResourceControl; using Exceptions::RTBException; /** * Method to reset the repositories (clears number of collisions) */ void BFClientSpecificRepository::reset() throw(StrategyException, bad_exception) { _hits=0; startTimer(); } /** * Method to set the shoting interval in nanoseconds */ void BFClientSpecificRepository::setShootingInterval(double i) throw() { _shootingInterval=i; } /** * Method to get the shooting intervall in nanoseconds */ double BFClientSpecificRepository::getShootingInterval()const throw() { return _shootingInterval; } /** * Increment collision count */ void BFClientSpecificRepository::oneMoreCollision() throw() { ++_hits; } /** * Get number of collisons the roboter has had since the last reset */ int BFClientSpecificRepository::getCollisionCount() const throw() { return _hits; } /** * (Re)Start the timer with the current systemtime */ void BFClientSpecificRepository::startTimer() throw(StrategyException) { if (clock_gettime(CLOCK_REALTIME,&_timerstart)) throw StrategyException(string("Setting the timer for a new shoot failed in Brotfrucht strategy: ")+strerror(errno)); } /** * Get nanoseconds passed since the timer was started */ double BFClientSpecificRepository::getTimePassed() const throw(StrategyException) { timespec dummy; if (clock_gettime(CLOCK_REALTIME,&dummy)) throw StrategyException(string("Getting the passed time for a new shoot failed in Brotfrucht strategy: ")+strerror(errno)); return double(1000000000.0)*(dummy.tv_sec-_timerstart.tv_sec)+dummy.tv_nsec-_timerstart.tv_nsec; } /** * Get the logger for the client brotfrucht strategy states */ Logger* BFClientSpecificRepository::getLogger() const throw() { return _logger.get(); } /** * Destructor (does nothing) */ BFClientSpecificRepository::~BFClientSpecificRepository() throw() {}; /** * Constructor */ BFClientSpecificRepository::BFClientSpecificRepository() throw(StrategyException, bad_exception): _hits(0), _logger(0),_shootingInterval(1000000000) { try { _logger=MasterResourceControl::Instance()->createLogger("BrotfruchtClient"); } catch (RTBException& ex) { throw StrategyException("Could not obtain logger for the Brotfrucht client states: "+ex.getMessage()); } } } realtimebattle-1.0.8/team-framework/bots/brotfrucht/bffactory.cpp0000644000175000017500000000724110167276176023426 0ustar moimoi/************************************************************************ $Id: bffactory.cpp,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bffactory.cpp,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "bffactory.h" #include "bfservernorotatestate.h" #include "bfserverrotatestate.h" #include "bfinternalserverspecificrepository.h" #include "bfsharedserverspecificrepository.h" #include "bfclientspecificrepository.h" #include "bfclientshoothalfstate.h" #include "bfclientshoottwicestate.h" namespace Brotfrucht { using RTBGlobal::pvector; BFFactory::BFFactory() { // we have a new registration method now // see my mail: RTBGlobal::MasterResourceControl::Instance()->registrateStrategyFactory("Brotfrucht",this); } auto_ptr BFFactory::createServerStateData (ServerCoordinator* serverCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception) { auto_ptr > states(new pvector()); // trick because of buggy auto_pointer template conversion method BFInternalServerSpecificRepository* bfssppointer; auto_ptr bfssp(bfssppointer=new BFInternalServerSpecificRepository()); BFSharedServerSpecificRepository* bfsharedssp(BFSharedServerSpecificRepository::Instance()); states->push_back(new BFServerNoRotateState(serverCoordinator,bfssppointer,bfsharedssp)); states->push_back(new BFServerRotateState(serverCoordinator,bfssppointer,bfsharedssp)); return auto_ptr (new ServerStateData(states,bfssp,bfsharedssp)); } auto_ptr BFFactory::createClientStateData (ClientCoordinator* clientCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception) { auto_ptr > states(new pvector()); // trick because of buggy auto_pointer template conversion method BFClientSpecificRepository* bfcsppointer; auto_ptr bfcsp(bfcsppointer=new BFClientSpecificRepository()); states->push_back(new BFClientShootHalfState(clientCoordinator,bfcsppointer,gameOptionsRepository)); states->push_back(new BFClientShootTwiceState(clientCoordinator,bfcsppointer,gameOptionsRepository)); return auto_ptr (new ClientStateData(states,bfcsp)); } string BFFactory::getFinishingString() const throw(bad_exception) { // not too long word (saves time by parsing) return "BFE"; } } // namespace // we have a new registration method now // see my mail: namespace{ Brotfrucht::BFFactory __global_factory__I_will_never_ever_need_this_name_again_so_I_do_this_for_fun; } realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfinternalserverspecificrepository.cpp0000644000175000017500000000417310167276176030671 0ustar moimoi/************************************************************************ $Id: bfinternalserverspecificrepository.cpp,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfinternalserverspecificrepository.cpp,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "bfinternalserverspecificrepository.h" namespace Brotfrucht { /** * Method to reset the repositories (clears position) */ void BFInternalServerSpecificRepository::reset() throw() { _robotX=_robotY=0; } /** * Set the new position of the robot */ void BFInternalServerSpecificRepository::setRobotPosition(double x, double y) throw() { _robotX=x; _robotY=y; } /** * Get the position of the robot */ void BFInternalServerSpecificRepository::getRobotPosition(double& x, double& y) const throw() { x=_robotX; y=_robotY; } /** * Destructor (does nothing) */ BFInternalServerSpecificRepository::~BFInternalServerSpecificRepository() throw() {} /** * Constructor */ BFInternalServerSpecificRepository::BFInternalServerSpecificRepository() throw():_robotX(0), _robotY(0) {}; } realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfserverbasicstate.cpp0000644000175000017500000001631010300414046025300 0ustar moimoi/************************************************************************ $Id: bfserverbasicstate.cpp,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfserverbasicstate.cpp,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "bfserverbasicstate.h" #include "bfinternalserverspecificrepository.h" #include "bfsharedserverspecificrepository.h" #include "../../gamecontrol/servercoordinator.h" namespace Brotfrucht { BFServerBasicState::BFServerBasicState(ServerCoordinator* i,BFInternalServerSpecificRepository* bfssp,BFSharedServerSpecificRepository* bfsharedssp) throw (StrategyException,bad_exception):ServerState(i),_bfssp(bfssp),_robotName(i->getAssociatedRobotName()),_bfsharedssp(bfsharedssp) {} BFServerBasicState::~BFServerBasicState () throw() {} /** * This method is called from the coordinator's processReceivedRTBMessages method and should send tips to the clients. */ void BFServerBasicState::sendServerTips () throw (StrategyException,bad_exception) { // When this method is called first in a game (for all server states (static variable), print out the registered robots of the repository if (_newGame) { _newGame=false; Logger* logger=_bfsharedssp->getLogger(); int number=_bfsharedssp->getRobotNumber(); _numberconv << number; logger->logMessage(3,"We are "+_numberconv.str()+ " friendly robots. Our names: "); _numberconv.clear(); _numberconv.str(""); for (int i=0;ilogMessage(2,_bfsharedssp->getRobotName(i)); } } /** * This method is called by ServerCoordinatorRevokes::resetGame() */ void BFServerBasicState::reset () throw (bad_exception, StrategyException) { _newGame=true; } /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ void BFServerBasicState::receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ void BFServerBasicState::receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ void BFServerBasicState::receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception) { _bfssp->setRobotPosition(x,y); } /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ void BFServerBasicState::receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ void BFServerBasicState::receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception) {} // >> Maybe we should introduce another // enum for this (TODO) /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ void BFServerBasicState::receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ void BFServerBasicState::receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ void BFServerBasicState::receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception) { double x,y; _bfssp->getRobotPosition(x,y); _numberconv << "x: " << x << " y: " << y; _bfsharedssp->getLogger()->logMessage(3,_robotName+" was hit on position: "+_numberconv.str()); _numberconv.clear(); _numberconv.str(""); } /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ void BFServerBasicState::receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ void BFServerBasicState::receiveRTBMessageDead() throw (StrategyException, bad_exception) {} bool BFServerBasicState::_newGame(false); } realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfservernorotatestate.cpp0000644000175000017500000000530210167276176026076 0ustar moimoi/************************************************************************ $Id: bfservernorotatestate.cpp,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfservernorotatestate.cpp,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "bfservernorotatestate.h" #include "bfserverstateenum.h" #include "bfsharedserverspecificrepository.h" namespace Brotfrucht { BFServerNoRotateState::BFServerNoRotateState(ServerCoordinator* c,BFInternalServerSpecificRepository* bfssp, BFSharedServerSpecificRepository* bfsharedssp) throw (StrategyException,bad_exception):BFServerBasicState(c,bfssp,bfsharedssp),_bfsharedssp(bfsharedssp) { } /** * This method is called by ServerCoordinatorRevokes::resetGame() */ void BFServerNoRotateState::reset () throw (bad_exception, StrategyException) { BFServerBasicState::reset(); // this is possible because the repositories will be reset before the corresponding states _bfsharedssp->appendRobotName(getRobotName()); } /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ void BFServerNoRotateState::receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception) { BFServerBasicState::receiveRTBMessageCollision(type,angle); _bfsharedssp->getLogger()->logMessage(1,getRobotName()+" was hit (recognized by BFServerNoRotateState), start rotating ..."); sendServerTipString("STARTROTATION"); setCurrentServerState(DOROTATE); } } realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfserverrotatestate.cpp0000644000175000017500000000455110167276176025546 0ustar moimoi/************************************************************************ $Id: bfserverrotatestate.cpp,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfserverrotatestate.cpp,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "bfserverrotatestate.h" #include "bfserverstateenum.h" #include "bfsharedserverspecificrepository.h" namespace Brotfrucht { BFServerRotateState::BFServerRotateState(ServerCoordinator* c,BFInternalServerSpecificRepository* bfssp, BFSharedServerSpecificRepository* bfsharedssp) throw (StrategyException,bad_exception):BFServerBasicState(c,bfssp,bfsharedssp),_bfsharedssp(bfsharedssp) { } /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ void BFServerRotateState::receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception) { BFServerBasicState::receiveRTBMessageCollision(type,angle); _bfsharedssp->getLogger()->logMessage(1,getRobotName()+" was hit (recognized by BFServerRotateState), stop rotating ..."); sendServerTipString("STOPROTATION"); setCurrentServerState(DONOTROTATE); } } realtimebattle-1.0.8/team-framework/bots/brotfrucht/bfsharedserverspecificrepository.cpp0000644000175000017500000000672610167276176030331 0ustar moimoi/************************************************************************ $Id: bfsharedserverspecificrepository.cpp,v 1.2 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: bfsharedserverspecificrepository.cpp,v $ Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "bfsharedserverspecificrepository.h" #include "../../rtbglobal/masterresourcecontrol.h" namespace Brotfrucht { using RTBGlobal::MasterResourceControl; using Exceptions::RTBException; /** * Method to obtain the one and only object of this class */ BFSharedServerSpecificRepository* BFSharedServerSpecificRepository::Instance() throw (bad_exception) { BFSharedServerSpecificRepository* bfsssp (BFSharedServerSpecificRepository::_instance.get()); if (bfsssp==0) { BFSharedServerSpecificRepository::_instance.reset(bfsssp=new BFSharedServerSpecificRepository()); } return bfsssp; } /** * Destructor (does nothing) */ BFSharedServerSpecificRepository::~BFSharedServerSpecificRepository() throw() {} /** * Constructor */ BFSharedServerSpecificRepository::BFSharedServerSpecificRepository() throw (StrategyException, bad_exception):_robotNames(),_logger(0) { try { _logger=MasterResourceControl::Instance()->createLogger("BrotfruchtServer"); } catch (RTBException& ex) { throw StrategyException("Could not obtain shared logger for the Brotfrucht server states: "+ex.getMessage()); } } /** * Method to reset the repositories (clears all names out of the vector */ void BFSharedServerSpecificRepository::reset() throw (bad_exception) { _robotNames.clear(); } /** * Appends the own robot name to the vector */ void BFSharedServerSpecificRepository::appendRobotName(const string& robotName) throw (bad_exception) { _robotNames.push_back(robotName); } /** * Gets the name of the roboter with the given index */ const string& BFSharedServerSpecificRepository::getRobotName (int i) const throw (bad_exception, out_of_range) { return _robotNames.at(i); } /** * Get the number of (friendly) robots */ int BFSharedServerSpecificRepository::getRobotNumber() const throw () { return _robotNames.size(); } /** * Get the shared logger for all server brotfrucht strategy states */ Logger* BFSharedServerSpecificRepository::getLogger() const throw() { return _logger.get(); } /** * Only instance of this class */ auto_ptr BFSharedServerSpecificRepository::_instance(0); } realtimebattle-1.0.8/team-framework/bots/empty/0002755000175000017500000000000010404234033017671 5ustar moimoirealtimebattle-1.0.8/team-framework/bots/empty/empty_client_basicstate.h0000644000175000017500000001674010167276176024772 0ustar moimoi/************************************************************************ $Id: empty_client_basicstate.h,v 1.6 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_client_basicstate.h,v $ Revision 1.6 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef empty_CLIENTBASICSTATE_H #define empty_CLIENTBASICSTATE_H #include "../../gamecontrol/gamecontrolnamespace.h" #include "../../strategies/clientstate.h" #include "empty_namespace.h" namespace empty { using GameControl::GameOptionsRepository; using Strategies::ClientState; using GameControl::ClientCoordinator; using Exceptions::StrategyException; using std::string; using std::bad_exception; using Parser::object_type; using Parser::warning_type; /** * This class is the base of all empty client states. Here, the default actions, that will be done by every state * (unless it defines something else) are determined. States, that want to extend and not to entirely replace the action * of this base class, should simply call the corresponding method in this class before executinh their own stuff. * * The methods below is the interace how the RTB-Server communicate with you! * The interface if you want send messages to the RTB-Server see in the * ../stragegies/clientstate.h. * */ class empty_ClientBasicState: public Strategies::ClientState { public: empty_ClientBasicState(ClientCoordinator* i, empty_ClientSpecificRepository* empty_csp, const GameOptionsRepository* empty_gor) throw (StrategyException,bad_exception); virtual ~empty_ClientBasicState () throw(); /** * Processes the server tips * @param tip The server tip in string shape */ virtual void reactOnServerTip (const string& tip) throw (StrategyException,bad_exception); /** * This method is called when all rtb messages in this round were received. After this method, the first server tips will arrive. */ virtual void roundFinished () throw (StrategyException,bad_exception); /** * This method is called when all server tips in this round were received. After this method, the state is to send its last messages. */ virtual void sendRTBMessages () throw (StrategyException,bad_exception); /** * This method is called by ClientCoordinatorRevokes::resetGame() */ virtual void reset () throw (bad_exception, StrategyException); /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ virtual void receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ virtual void receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ virtual void receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ virtual void receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * @param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ virtual void receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ virtual void receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ virtual void receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ virtual void receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ virtual void receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ virtual void receiveRTBMessageDead() throw (StrategyException, bad_exception); private: }; } #endif realtimebattle-1.0.8/team-framework/bots/empty/empty_client_derivatedstate.h0000644000175000017500000000342710167276176025656 0ustar moimoi/************************************************************************ $Id: empty_client_derivatedstate.h,v 1.4 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_client_derivatedstate.h,v $ Revision 1.4 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef empty_CLIENTDERIVATEDSTATE_H #define empty_CLIENTDERIVATEDSTATE_H #include "empty_client_basicstate.h" namespace empty { class empty_ClientDerivatedState: public empty_ClientBasicState { public: empty_ClientDerivatedState(ClientCoordinator* i, empty_ClientSpecificRepository* empty_csp, const GameOptionsRepository* empty_gor) throw (StrategyException,bad_exception); /** * Here you can declare methods to override the ClientBasicStates */ private: }; } #endif realtimebattle-1.0.8/team-framework/bots/empty/empty_clientspecificrepository.h0000644000175000017500000000426010167276176026430 0ustar moimoi/************************************************************************ $Id: empty_clientspecificrepository.h,v 1.5 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_clientspecificrepository.h,v $ Revision 1.5 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef empty_CLIENTSPECIFICREPOSITORY #define empty_CLIENTSPECIFICREPOSITORY #include "../../strategies/clientspecificrepository.h" #include "../../exceptions/strategyexception.h" namespace empty { /** * Use this Repository for all client-stuff. You can implement what you want. */ using Exceptions::StrategyException; using std::bad_exception; using Strategies::ClientSpecificRepository; class empty_ClientSpecificRepository: public Strategies::ClientSpecificRepository { public: /** * Method to reset the repositories (clears number of collisions, (re)starts timer) */ void reset() throw(StrategyException, bad_exception); /** * Destructor */ ~empty_ClientSpecificRepository() throw(); /** * Constructor */ empty_ClientSpecificRepository() throw(StrategyException, bad_exception); private: }; } #endif realtimebattle-1.0.8/team-framework/bots/empty/empty_factory.h0000644000175000017500000000524710167276176022761 0ustar moimoi/************************************************************************ $Id: empty_factory.h,v 1.4 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_factory.h,v $ Revision 1.4 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef empty_FACTORY_H #define empty_FACTORY_H #include "../../gamecontrol/gamecontrolnamespace.h" #include "../../strategies/strategiesnamespace.h" #include "../../strategies/strategyfactory.h" #include "../../strategies/serverstatedata.h" #include "../../strategies/clientstatedata.h" #include "../../exceptions/strategyexception.h" #include #include "empty_namespace.h" namespace empty { using GameControl::ServerCoordinator; using GameControl::ClientCoordinator; using GameControl::GameOptionsRepository; using Strategies::StrategyFactory; using Strategies::ServerStateData; using Strategies::ClientStateData; using Exceptions::StrategyException; using std::auto_ptr; using std::bad_exception; using std::string; using Strategies::StrategyFactory; class empty_Factory : public Strategies::StrategyFactory { public: empty_Factory(); auto_ptr createServerStateData (ServerCoordinator* serverCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception); auto_ptr createClientStateData (ClientCoordinator* clientCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception); string getFinishingString() const throw(bad_exception); /** * It is not necessary to add any method in this class. */ }; } #endif //empty_FACTORY_H realtimebattle-1.0.8/team-framework/bots/empty/empty_internalserverspecificrepository.h0000644000175000017500000000407310167276176030217 0ustar moimoi/************************************************************************ $Id: empty_internalserverspecificrepository.h,v 1.4 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_internalserverspecificrepository.h,v $ Revision 1.4 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef empty_INTERNALSERVERSPECIFICREPOSITORY #define empty_INTERNALSERVERSPECIFICREPOSITORY #include "../../strategies/internalserverspecificrepository.h" namespace empty { /** * Use this Repository for all internal server-stuff. You can implement what you want. */ using Strategies::InternalServerSpecificRepository; class empty_InternalServerSpecificRepository: public Strategies::InternalServerSpecificRepository { public: /** * Method to reset the repositories (clears position) */ void reset() throw(); /** * Destructor (does nothing) */ ~empty_InternalServerSpecificRepository() throw(); /** * Constructor */ empty_InternalServerSpecificRepository() throw(); private: }; } #endif realtimebattle-1.0.8/team-framework/bots/empty/empty_namespace.h0000644000175000017500000000306210167276176023237 0ustar moimoi/************************************************************************ $Id: empty_namespace.h,v 1.4 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_namespace.h,v $ Revision 1.4 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef empty_NAMESPACE_H #define empty_NAMESPACE_H namespace empty { class empty_ClientBasicState; class empty_ServerBasicState; class empty_ClientSpecificRepository; class empty_InternalServerSpecificRepository; class empty_SharedServerSpecificRepository; class empty_Factory; } #endif realtimebattle-1.0.8/team-framework/bots/empty/empty_server_basicstate.h0000644000175000017500000001543410167276176025021 0ustar moimoi/************************************************************************ $Id: empty_server_basicstate.h,v 1.7 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_server_basicstate.h,v $ Revision 1.7 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef empty_SERVERBASICSTATE_H #define empty_SERVERBASICSTATE_H #include "../../strategies/serverstate.h" #include "empty_namespace.h" namespace empty { using Strategies::ServerState; using Exceptions::StrategyException; using std::string; using std::bad_exception; using Parser::object_type; using Parser::warning_type; using GameControl::ServerCoordinator; /** * This class is the base of all empty server states. Here, the default actions, that will be done by every state * (unless it defines something else) are determined. States, that want to extend and not to entirely replace the action * of this base class, should simply call the corresponding method in this class before executinh their own stuff. * */ class empty_ServerBasicState: public Strategies::ServerState { public: empty_ServerBasicState(ServerCoordinator* i, empty_InternalServerSpecificRepository* empty_issp, empty_SharedServerSpecificRepository* empty_sharedssp) throw (StrategyException,bad_exception); virtual ~empty_ServerBasicState () throw(); /** * This method is called from the coordinator's processReceivedRTBMessages method and should send tips to the clients. */ virtual void sendServerTips () throw (StrategyException,bad_exception); /** * This method is called by ClientCoordinatorRevokes::resetGame() */ virtual void reset () throw (bad_exception, StrategyException); /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ virtual void receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ virtual void receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ virtual void receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ virtual void receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * @param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ virtual void receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ virtual void receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ virtual void receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ virtual void receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ virtual void receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ virtual void receiveRTBMessageDead() throw (StrategyException, bad_exception); }; } #endif realtimebattle-1.0.8/team-framework/bots/empty/empty_server_derivatedstate.h0000644000175000017500000000346610167276176025711 0ustar moimoi/************************************************************************ $Id: empty_server_derivatedstate.h,v 1.6 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_server_derivatedstate.h,v $ Revision 1.6 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef empty_SERVERDERIVATEDSTATE_H #define empty_SERVERDERIVATEDSTATE_H #include "empty_server_basicstate.h" namespace empty { class empty_ServerDerivatedState: public empty::empty_ServerBasicState { public: empty_ServerDerivatedState(ServerCoordinator* i, empty_InternalServerSpecificRepository* empty_issp, empty_SharedServerSpecificRepository* empty_sharedssp) throw (StrategyException,bad_exception); /** * Here you can declare methods to override the ClientBasicStates */ private: }; } #endif realtimebattle-1.0.8/team-framework/bots/empty/empty_sharedserverspecificrepository.h0000644000175000017500000000517610167276176027656 0ustar moimoi/************************************************************************ $Id: empty_sharedserverspecificrepository.h,v 1.7 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_sharedserverspecificrepository.h,v $ Revision 1.7 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef empty_SHAREDSERVERSPECIFICREPOSITORY #define empty_SHAREDSERVERSPECIFICREPOSITORY #include "../../strategies/sharedserverspecificrepository.h" #include "../../exceptions/strategyexception.h" #include "../../log/logger.h" #include namespace empty { /** * Use this Repository for all shared-stuff (for all clients and for the server). * You can implement what you want (e.g. a map or something like that). */ using std::auto_ptr; using std::bad_exception; using Log::Logger; using Exceptions::StrategyException; using Strategies::SharedServerSpecificRepository; class empty_SharedServerSpecificRepository: public Strategies::SharedServerSpecificRepository { public: /** * Method to obtain the one and only object of this class */ static empty_SharedServerSpecificRepository* Instance() throw (bad_exception); /** * Method to reset the repositories */ void reset() throw (bad_exception); /** * Destructor */ ~empty_SharedServerSpecificRepository() throw (); private: /** * Only instance of this class */ static auto_ptr _instance; /** * Constructor */ empty_SharedServerSpecificRepository()throw (StrategyException, bad_exception); }; } #endif realtimebattle-1.0.8/team-framework/bots/empty/empty_client_basicstate.cpp0000644000175000017500000001540310167276176025320 0ustar moimoi/************************************************************************ $Id: empty_client_basicstate.cpp,v 1.4 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_client_basicstate.cpp,v $ Revision 1.4 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "empty_client_basicstate.h" #include "../../gamecontrol/gameoptionsrepository.h" #include "empty_clientspecificrepository.h" namespace empty { empty_ClientBasicState::empty_ClientBasicState(ClientCoordinator* i, empty_ClientSpecificRepository* empty_csp, const GameOptionsRepository* empty_gor) throw (StrategyException,bad_exception):ClientState(i) {} empty_ClientBasicState::~empty_ClientBasicState () throw() {} /** * Processes the server tips * @param tip The server tip in string shape */ void empty_ClientBasicState::reactOnServerTip (const string& tip) throw (StrategyException,bad_exception) {} /** * This method is called when all rtb messages in this round were received. After this method, the first server tips will arrive. */ void empty_ClientBasicState::roundFinished () throw (StrategyException,bad_exception) {} /** * This method is called when all server tips in this round were received. After this method, the state is to send its last messages. */ void empty_ClientBasicState::sendRTBMessages () throw (StrategyException,bad_exception) {} /** * This method is called by ClientCoordinatorRevokes::resetGame() */ void empty_ClientBasicState::reset () throw (bad_exception, StrategyException) {} /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ void empty_ClientBasicState::receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ void empty_ClientBasicState::receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ void empty_ClientBasicState::receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ void empty_ClientBasicState::receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * @param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ void empty_ClientBasicState::receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ void empty_ClientBasicState::receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ void empty_ClientBasicState::receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ void empty_ClientBasicState::receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ void empty_ClientBasicState::receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ void empty_ClientBasicState::receiveRTBMessageDead() throw (StrategyException, bad_exception) {} } realtimebattle-1.0.8/team-framework/bots/empty/empty_client_derivatedstate.cpp0000644000175000017500000000334510167276176026210 0ustar moimoi/************************************************************************ $Id: empty_client_derivatedstate.cpp,v 1.6 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_client_derivatedstate.cpp,v $ Revision 1.6 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "empty_client_derivatedstate.h" #include "empty_clientspecificrepository.h" namespace empty { empty_ClientDerivatedState::empty_ClientDerivatedState(ClientCoordinator* i, empty_ClientSpecificRepository* empty_csp, const GameOptionsRepository* empty_gor) throw (bad_exception, StrategyException):empty_ClientBasicState(i, empty_csp, empty_gor) {} /** * Implement here the methods, you want to overwrite */ } realtimebattle-1.0.8/team-framework/bots/empty/empty_clientspecificrepository.cpp0000644000175000017500000000346610167276176026772 0ustar moimoi/************************************************************************ $Id: empty_clientspecificrepository.cpp,v 1.5 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_clientspecificrepository.cpp,v $ Revision 1.5 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "empty_clientspecificrepository.h" namespace empty { /** * Method to reset the repositories (clears number of collisions) */ void empty_ClientSpecificRepository::reset() throw(StrategyException, bad_exception) {} /** * Destructor */ empty_ClientSpecificRepository::~empty_ClientSpecificRepository() throw() {}; /** * Constructor */ empty_ClientSpecificRepository::empty_ClientSpecificRepository() throw(StrategyException, bad_exception) {} } realtimebattle-1.0.8/team-framework/bots/empty/empty_factory.cpp0000644000175000017500000000744110167276176023312 0ustar moimoi/************************************************************************ $Id: empty_factory.cpp,v 1.8 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_factory.cpp,v $ Revision 1.8 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "empty_factory.h" #include "empty_internalserverspecificrepository.h" #include "empty_sharedserverspecificrepository.h" #include "empty_clientspecificrepository.h" #include "empty_client_derivatedstate.h" #include "empty_server_derivatedstate.h" namespace empty { using RTBGlobal::pvector; empty_Factory::empty_Factory() { /* * There is no need for a special registration, just put your code * you want to have to be executed at the beginning here */ } auto_ptr empty_Factory::createServerStateData (ServerCoordinator* serverCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception) { auto_ptr > states(new pvector()); // trick because of buggy auto_pointer template conversion method empty_InternalServerSpecificRepository* empty_ssppointer; auto_ptr empty_ssp(empty_ssppointer=new empty_InternalServerSpecificRepository()); empty_SharedServerSpecificRepository* empty_sharedssp(empty_SharedServerSpecificRepository::Instance()); /** * Insert here the registrations of all your used serverstate: * states->push_back(new empty_YOUR_SERVER_STATE(serverCoordinator, empty_ssppointer, empty_sharedssp)); */ states->push_back(new empty_ServerDerivatedState(serverCoordinator, empty_ssppointer, empty_sharedssp)); return auto_ptr (new ServerStateData(states, empty_ssp, empty_sharedssp)); } auto_ptr empty_Factory::createClientStateData (ClientCoordinator* clientCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception) { auto_ptr > states(new pvector()); // trick because of buggy auto_pointer template conversion method empty_ClientSpecificRepository* empty_csppointer; auto_ptr empty_csp(empty_csppointer=new empty_ClientSpecificRepository()); /** * Insert here the registrations of all your used clientstate: * states->push_back(new empty_YOUR_CLIENT_STATE(clientCoordinator,empty_csppointer,gameOptionsRepository)); */ states->push_back(new empty_ClientDerivatedState(clientCoordinator,empty_csppointer,gameOptionsRepository)); return auto_ptr (new ClientStateData(states,empty_csp)); } string empty_Factory::getFinishingString() const throw(bad_exception) { // not too long word (saves time by parsing) return "empty_END"; } } // namespace empty realtimebattle-1.0.8/team-framework/bots/empty/empty_internalserverspecificrepository.cpp0000644000175000017500000000342510167276176030552 0ustar moimoi/************************************************************************ $Id: empty_internalserverspecificrepository.cpp,v 1.5 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_internalserverspecificrepository.cpp,v $ Revision 1.5 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "empty_internalserverspecificrepository.h" namespace empty { /** * Method to reset the repositories (clears position) */ void empty_InternalServerSpecificRepository::reset() throw() {} /** * Destructor */ empty_InternalServerSpecificRepository::~empty_InternalServerSpecificRepository() throw() {} /** * Constructor */ empty_InternalServerSpecificRepository::empty_InternalServerSpecificRepository() throw() {}; } realtimebattle-1.0.8/team-framework/bots/empty/empty_server_basicstate.cpp0000644000175000017500000001465210167276176025355 0ustar moimoi/************************************************************************ $Id: empty_server_basicstate.cpp,v 1.7 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_server_basicstate.cpp,v $ Revision 1.7 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "empty_server_basicstate.h" #include "empty_internalserverspecificrepository.h" #include "empty_sharedserverspecificrepository.h" namespace empty { empty_ServerBasicState::empty_ServerBasicState(ServerCoordinator* i, empty_InternalServerSpecificRepository* empty_issp, empty_SharedServerSpecificRepository* empty_sharedssp) throw (StrategyException,bad_exception): ServerState(i) {} empty_ServerBasicState::~empty_ServerBasicState () throw() {} /** * This method is called from the coordinator's processReceivedRTBMessages method and should send tips to the clients. */ void empty_ServerBasicState::sendServerTips () throw (StrategyException,bad_exception) {} /** * This method is called by ServerCoordinatorRevokes::resetGame() */ void empty_ServerBasicState::reset () throw (bad_exception, StrategyException) {} /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ void empty_ServerBasicState::receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ void empty_ServerBasicState::receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ void empty_ServerBasicState::receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ void empty_ServerBasicState::receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * @param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ void empty_ServerBasicState::receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception) {} // >> Maybe we should introduce another // enum for this (TODO) /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ void empty_ServerBasicState::receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ void empty_ServerBasicState::receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ void empty_ServerBasicState::receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ void empty_ServerBasicState::receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ void empty_ServerBasicState::receiveRTBMessageDead() throw (StrategyException, bad_exception) {} } realtimebattle-1.0.8/team-framework/bots/empty/empty_server_derivatedstate.cpp0000644000175000017500000000337210167276176026240 0ustar moimoi/************************************************************************ $Id: empty_server_derivatedstate.cpp,v 1.8 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_server_derivatedstate.cpp,v $ Revision 1.8 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "empty_server_derivatedstate.h" #include "empty_sharedserverspecificrepository.h" namespace empty { empty_ServerDerivatedState::empty_ServerDerivatedState(ServerCoordinator* i , empty_InternalServerSpecificRepository* empty_issp, empty_SharedServerSpecificRepository* empty_sharedssp) throw (StrategyException,bad_exception): empty_ServerBasicState(i, empty_issp, empty_sharedssp) {} /** * Implement here the overrided methods */ } realtimebattle-1.0.8/team-framework/bots/empty/empty_sharedserverspecificrepository.cpp0000644000175000017500000000460310167276176030203 0ustar moimoi/************************************************************************ $Id: empty_sharedserverspecificrepository.cpp,v 1.6 2005/01/06 17:59:26 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: empty_sharedserverspecificrepository.cpp,v $ Revision 1.6 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "empty_sharedserverspecificrepository.h" namespace empty { /** * Method to obtain the one and only object of this class */ empty_SharedServerSpecificRepository* empty_SharedServerSpecificRepository::Instance() throw (bad_exception) { empty_SharedServerSpecificRepository* empty_sssp (empty_SharedServerSpecificRepository::_instance.get()); if (empty_sssp==0) { empty_SharedServerSpecificRepository::_instance.reset(empty_sssp=new empty_SharedServerSpecificRepository()); } return empty_sssp; } /** * Destructor */ empty_SharedServerSpecificRepository::~empty_SharedServerSpecificRepository() throw() {} /** * Constructor */ empty_SharedServerSpecificRepository::empty_SharedServerSpecificRepository() throw (StrategyException, bad_exception) {} /** * Method to reset the repositories */ void empty_SharedServerSpecificRepository::reset() throw (bad_exception) {} /** * Only instance of this class */ auto_ptr empty_SharedServerSpecificRepository::_instance(0); } realtimebattle-1.0.8/team-framework/bots/columbus/0002755000175000017500000000000010404234033020364 5ustar moimoirealtimebattle-1.0.8/team-framework/bots/columbus/columbusinternalserverspecificrepository.cpp0000644000175000017500000000376010321000453031552 0ustar moimoi/************************************************************************ $Id: columbusinternalserverspecificrepository.cpp,v 1.4 2005/10/05 16:33:14 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusinternalserverspecificrepository.cpp,v $ Revision 1.4 2005/10/05 16:33:14 krolfy Fixes in cobra according to new TeamInfo and RobotInfo Revision 1.3 2005/07/28 08:19:09 krolfy Most of the server side ready Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "columbusinternalserverspecificrepository.h" #include "columbussharedserverspecificrepository.h" namespace Columbus { void ColumbusInternalServerSpecificRepository::reset() throw() { ColumbusSharedServerSpecificRepository::Instance()->getTeam().registerRobotForRound(_robot); } ColumbusInternalServerSpecificRepository::ColumbusInternalServerSpecificRepository() throw() {} RobotInfo& ColumbusInternalServerSpecificRepository::getRobotInfo() throw() { return _robot; } } realtimebattle-1.0.8/team-framework/bots/columbus/columbusinternalserverspecificrepository.h0000644000175000017500000000457010321000453031217 0ustar moimoi/************************************************************************ $Id: columbusinternalserverspecificrepository.h,v 1.5 2005/10/05 16:33:14 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusinternalserverspecificrepository.h,v $ Revision 1.5 2005/10/05 16:33:14 krolfy Fixes in cobra according to new TeamInfo and RobotInfo Revision 1.4 2005/08/08 11:32:45 krolfy Added three Columbus bots (crash with exception) Revision 1.3 2005/07/28 08:19:10 krolfy Most of the server side ready Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef COLUMBUSINTERNALSERVERSPECIFICREPOSITORY #define COLUMBUSINTERNALSERVERSPECIFICREPOSITORY #include "../../strategies/internalserverspecificrepository.h" #include "../general/teaminfo.h" /** * Namespace Columbus */ namespace Columbus { using Strategies::InternalServerSpecificRepository; using General::RobotInfo; class ColumbusInternalServerSpecificRepository: public Strategies::InternalServerSpecificRepository { public: /** * Method to reset the repositories */ void reset() throw(); /** * Destructor (does nothing) */ ~ColumbusInternalServerSpecificRepository() throw() {} /** * Constructor */ ColumbusInternalServerSpecificRepository() throw(); /* * @return data concerning the robot */ RobotInfo& getRobotInfo() throw(); private: RobotInfo _robot; }; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbusclientstateenum.h0000644000175000017500000000273110274673677025546 0ustar moimoi/************************************************************************ $Id: columbusclientstateenum.h,v 1.1 2005/08/05 14:29:19 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusclientstateenum.h,v $ Revision 1.1 2005/08/05 14:29:19 krolfy Derived ColumbusClientStates Revision 1.1 2005/07/29 10:59:51 krolfy Columbus server side ready but untested **************************************************************************/ #ifndef COLUMBUSSERVERSTATEENUM #define COLUMBUSSERVERSTATEENUM namespace Columbus { enum ColumbusServerStateEnum {DRIVE=0,ATTACK=1}; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbusserverstateenum.h0000644000175000017500000000264510272406047025561 0ustar moimoi/************************************************************************ $Id: columbusserverstateenum.h,v 1.1 2005/07/29 10:59:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusserverstateenum.h,v $ Revision 1.1 2005/07/29 10:59:51 krolfy Columbus server side ready but untested **************************************************************************/ #ifndef COLUMBUSSERVERSTATEENUM #define COLUMBUSSERVERSTATEENUM namespace Columbus { enum ColumbusServerStateEnum {INIT=0,DISCOVERY=1,ESCAPE=2,TRACK=3,ATTACK=4}; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbusnamespace.h0000644000175000017500000000357110276136050024256 0ustar moimoi/************************************************************************ $Id: columbusnamespace.h,v 1.6 2005/07/29 10:59:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusnamespace.h,v $ Revision 1.6 2005/07/29 10:59:51 krolfy Columbus server side ready but untested Revision 1.5 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef COLUMBUSNAMESPACE_H #define COLUMBUSNAMESPACE_H /** * Namespace Columbus */ namespace Columbus { class ColumbusWaypoint; class ColumbusTopographicMap; class ColumbusSharedServerSpecificRepository; class ColumbusClientSpecificRepository; class ColumbusInternalServerSpecificRepository; class ColumbusClientBaseState; class ColumbusStrategyFactory; class ColumbusServerBaseState; class ColumbusServerInitState; class ColumbusServerDiscoveryState; class ColumbusServerTrackState; class ColumbusServerAttackState; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbusserverattackstate.cpp0000644000175000017500000000735710321451140026411 0ustar moimoi/************************************************************************ $Id: columbusserverattackstate.cpp,v 1.7 2005/10/07 07:33:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusserverattackstate.cpp,v $ Revision 1.7 2005/10/07 07:33:51 krolfy sources/alpha/bots/columbus/columbusclientattackstate.cpp sources/alpha/bots/columbus/columbusclientbasestate.cpp sources/alpha/bots/columbus/columbusserverattackstate.cpp sources/alpha/bots/columbus/columbusserverbasestate.cpp sources/alpha/bots/columbus/columbusserverdiscoverystate.cpp sources/alpha/bots/columbus/columbusserverescapestate.cpp sources/alpha/bots/columbus/columbusserverinitstate.cpp sources/alpha/bots/columbus/columbusservertrackstate.cpp sources/alpha/bots/general/maps/potentialmap.cpp sources/alpha/bots/general/maps/topographicmap_float.h sources/alpha/gamecontrol/servercoordinator.cpp sources/alpha/gamecontrol/servergamecontroller.cpp Revision 1.6 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.5 2005/08/17 14:08:43 krolfy *** empty log message *** Revision 1.4 2005/08/10 13:12:31 krolfy Added some debug lines, minor fixes Revision 1.3 2005/08/02 12:18:42 krolfy Work on columbus clientside started **************************************************************************/ #include "columbusserverattackstate.h" #include "columbusserverstateenum.h" #include "columbussharedserverspecificrepository.h" #include "columbusinternalserverspecificrepository.h" /** * Namespace Columbus */ namespace Columbus { void ColumbusServerAttackState::sendNavigationServerTips() throw(bad_exception) { _sssp->getLogger()->logMessage(1,"## ATT ##"); if(_sssp->isAttack()) { const Position *self=&(_issp->getRobotInfo().pos); const Position *enemy=&(_sssp->currentEnemyPosition()); Position pos=_sssp->getMap().navigationHint(*self,*enemy,1,.8,1,.7); _numberconv << pos.x << ' ' << pos.y; sendServerTipString("D "+_numberconv.str()); _numberconv.clear(); _numberconv.str(""); if(_sssp->getMap().isFreeVisionLine(*self,*enemy)) sendServerTipString("T"); } else setCurrentServerState(DISCOVERY); _sssp->getLogger()->logMessage(1,"done"); } void ColumbusServerAttackState::handleEnemy(const General::Position& pos) throw(bad_exception) { _sssp->getEnemies().addEnemyPosition(pos); } void ColumbusServerAttackState::makeFootPrint(const General::Position& pos,const General::Position& speed) throw(bad_exception) {} ColumbusServerAttackState::ColumbusServerAttackState(ServerCoordinator* c,ColumbusInternalServerSpecificRepository* columbusssp, ColumbusSharedServerSpecificRepository* columbussharedssp) throw (StrategyException,bad_exception): ColumbusServerBaseState(c,columbusssp,columbussharedssp),_sssp(columbussharedssp),_issp(columbusssp) {} ColumbusServerAttackState::~ColumbusServerAttackState () throw() {} } realtimebattle-1.0.8/team-framework/bots/columbus/columbusserverattackstate.h0000644000175000017500000000562710273662242026071 0ustar moimoi/************************************************************************ $Id: columbusserverattackstate.h,v 1.2 2005/08/02 12:18:42 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusserverattackstate.h,v $ Revision 1.2 2005/08/02 12:18:42 krolfy Work on columbus clientside started Revision 1.1 2005/07/29 10:59:51 krolfy Columbus server side ready but untested **************************************************************************/ #ifndef COLUMBUSSERVERATTACKSTATE_H #define COLUMBUSSERVERATTACKSTATE_H #include "columbusserverbasestate.h" #include "columbusnamespace.h" #include /** * Namespace Columbus */ namespace Columbus { using Strategies::ServerState; using Exceptions::StrategyException; using std::string; using std::bad_exception; using Parser::object_type; using Parser::warning_type; using GameControl::ServerCoordinator; using std::ostringstream; class ColumbusServerAttackState: public ColumbusServerBaseState { public: /** * Intended as a frontend for PotentialMap::navigationHint */ virtual void sendNavigationServerTips() throw(bad_exception); /** * Defines what to do with an enemy found. * @param pos the position of the enemy */ virtual void handleEnemy(const General::Position& pos) throw(bad_exception); /** * Make footprints, also see PotentialMap::makeFootPrint. * @param pos where to make the footprint * @param speed the depth of ther footprint shall be be dependent on the robot's movement */ virtual void makeFootPrint(const General::Position& pos,const General::Position& speed) throw(bad_exception); ColumbusServerAttackState(ServerCoordinator* c,ColumbusInternalServerSpecificRepository* columbusssp, ColumbusSharedServerSpecificRepository* columbussharedssp) throw (StrategyException,bad_exception); virtual ~ColumbusServerAttackState () throw(); private: ColumbusInternalServerSpecificRepository* _issp; ostringstream _numberconv; ColumbusSharedServerSpecificRepository* _sssp; double _radarDist,_radarAngle; }; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbusserverbasestate.cpp0000644000175000017500000002211110321451140026035 0ustar moimoi/************************************************************************ $Id: columbusserverbasestate.cpp,v 1.11 2005/10/07 07:33:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusserverbasestate.cpp,v $ Revision 1.11 2005/10/07 07:33:51 krolfy sources/alpha/bots/columbus/columbusclientattackstate.cpp sources/alpha/bots/columbus/columbusclientbasestate.cpp sources/alpha/bots/columbus/columbusserverattackstate.cpp sources/alpha/bots/columbus/columbusserverbasestate.cpp sources/alpha/bots/columbus/columbusserverdiscoverystate.cpp sources/alpha/bots/columbus/columbusserverescapestate.cpp sources/alpha/bots/columbus/columbusserverinitstate.cpp sources/alpha/bots/columbus/columbusservertrackstate.cpp sources/alpha/bots/general/maps/potentialmap.cpp sources/alpha/bots/general/maps/topographicmap_float.h sources/alpha/gamecontrol/servercoordinator.cpp sources/alpha/gamecontrol/servergamecontroller.cpp Revision 1.10 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.9 2005/08/10 13:12:31 krolfy Added some debug lines, minor fixes Revision 1.8 2005/08/02 12:18:42 krolfy Work on columbus clientside started Revision 1.7 2005/07/29 10:59:51 krolfy Columbus server side ready but untested Revision 1.6 2005/07/28 08:19:10 krolfy Most of the server side ready Revision 1.5 2005/01/25 15:21:21 krolfy Started some work on the ServerStates Revision 1.4 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "columbusserverbasestate.h" #include "columbusinternalserverspecificrepository.h" #include "columbussharedserverspecificrepository.h" #include "../../gamecontrol/servercoordinator.h" #include "../../parser/object_type.h" #include "../general/enemiesinfo.h" #include "../general/maps/potentialmap.h" #include "columbusserverstateenum.h" #include using namespace std; namespace Columbus { using General::Position; ColumbusServerBaseState::ColumbusServerBaseState( ServerCoordinator* i, ColumbusInternalServerSpecificRepository* issp, ColumbusSharedServerSpecificRepository* sssp) throw (StrategyException,bad_exception): ServerState(i),_issp(issp),_sssp(sssp),_counter(0) { issp->getRobotInfo().name=i->getAssociatedRobotName(); sssp->getMap().addFinalValue(Parser::ROBOT); } ColumbusServerBaseState::~ColumbusServerBaseState () throw() {} /** * This method is called from the coordinator's processReceivedRTBMessages method and should send tips to the clients. */ void ColumbusServerBaseState::sendServerTips () throw (StrategyException,bad_exception) { _sssp->getLogger()->logMessage(1,"## SEND ##"); sendNavigationServerTips(); _sssp->getLogger()->logMessage(1,"## SENT ##"); if(_sssp->isAttack()) { _sssp->getLogger()->logMessage(1,"## ATTACK ##"); const Position *pos=&(_sssp->currentEnemyPosition()); _numberconv << pos->x << ' ' << pos->y; sendServerTipString("E "+_numberconv.str()); _numberconv.clear(); _numberconv.str(""); } _sssp->getLogger()->logMessage(1,"## DONE ##"); } /** * This method is called by ServerCoordinatorRevokes::resetGame() */ void ColumbusServerBaseState::reset () throw (bad_exception, StrategyException) { _issp->getRobotInfo().isDead=false; } /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ void ColumbusServerBaseState::receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception) { _radarDist=dist; _radarWhat=type; _radarAngle=angle; } /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ void ColumbusServerBaseState::receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ void ColumbusServerBaseState::receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception) { Position *self=&(_issp->getRobotInfo().pos); x-=self->x; y-=self->y; self->x+=x; self->y+=y; Position obj=General::relativeToAbsolute(*self,_radarDist,angle+_radarAngle); _sssp->getMap().addChange(*self,obj,_radarWhat); makeFootPrint(*self,x*x+y*y); if(_radarWhat==Parser::ROBOT && _sssp->getTeam().isFriend(obj)) sendServerTipString("S"); } /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ void ColumbusServerBaseState::receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ void ColumbusServerBaseState::receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception) {} // >> Maybe we should introduce another // enum for this (TODO) /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ void ColumbusServerBaseState::receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception) { if(energy<30) setCurrentServerState(ESCAPE); } /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ void ColumbusServerBaseState::receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception) { _sssp->getEnemies().setNumberOfEnemies(num-_sssp->getTeam().getTeamSize()); } /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ void ColumbusServerBaseState::receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception) { } /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ void ColumbusServerBaseState::receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ void ColumbusServerBaseState::receiveRTBMessageDead() throw (StrategyException, bad_exception) { _issp->getRobotInfo().isDead=true; } } realtimebattle-1.0.8/team-framework/bots/columbus/columbusserverbasestate.h0000644000175000017500000002021310320775331025515 0ustar moimoi/************************************************************************ $Id: columbusserverbasestate.h,v 1.8 2005/08/23 15:37:05 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusserverbasestate.h,v $ Revision 1.8 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.7 2005/08/17 14:08:43 krolfy *** empty log message *** Revision 1.6 2005/07/29 10:59:51 krolfy Columbus server side ready but untested Revision 1.5 2005/07/28 08:19:10 krolfy Most of the server side ready Revision 1.4 2005/01/25 15:21:27 krolfy Started some work on the ServerStates Revision 1.3 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef COLUMBUSSERVERBASICSTATE_H #define COLUMBUSSERVERBASICSTATE_H #include "../../strategies/serverstate.h" #include "columbusnamespace.h" #include "../general/teaminfo.h" #include /** * Namespace Columbus */ namespace Columbus { using Strategies::ServerState; using Exceptions::StrategyException; using std::string; using std::bad_exception; using Parser::object_type; using Parser::warning_type; using GameControl::ServerCoordinator; using std::ostringstream; /** * Class ColumbusServerBaseState * * This class is the base of all columbus server states. Here, the default actions, that will be done by every state * (unless it defines something else) are determined. States, that want to extend and not to entirely replace the action * of this base class, should simpkly call the corresponding method in this class before executinh their own stuff */ class ColumbusServerBaseState: public Strategies::ServerState { public: /** * Tell the bot where to drive */ virtual void sendNavigationServerTips() throw(bad_exception) = 0; /** * Defines what to do with an enemy found. * @param pos the position of the enemy */ virtual void handleEnemy(const General::Position& pos) throw(bad_exception) = 0; /** * Make footprints, also see PotentialMap::makeFootPrint * @param pos where to make the footprint * @param speed the depth of ther footprint shall be be dependent on the robot's movement */ virtual void makeFootPrint(const General::Position& pos,const General::Position& speed) throw(bad_exception) = 0; ColumbusServerBaseState(ServerCoordinator* c,ColumbusInternalServerSpecificRepository* columbusssp, ColumbusSharedServerSpecificRepository* columbussharedssp) throw (StrategyException,bad_exception); virtual ~ColumbusServerBaseState () throw(); /** * This method is called from the coordinator's processReceivedRTBMessages method and should send tips to the clients. */ virtual void sendServerTips () throw (StrategyException,bad_exception); /** * This method is called by ClientCoordinatorRevokes::resetGame() */ virtual void reset () throw (bad_exception, StrategyException); /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ virtual void receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ virtual void receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ virtual void receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ virtual void receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ virtual void receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception); // >> Maybe we should introduce another // enum for this (TODO) /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ virtual void receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ virtual void receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ virtual void receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ virtual void receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ virtual void receiveRTBMessageDead() throw (StrategyException, bad_exception); private: ColumbusInternalServerSpecificRepository* _issp; ostringstream _numberconv; ColumbusSharedServerSpecificRepository* _sssp; Parser::object_type _radarWhat; double _radarDist,_radarAngle; int _counter; }; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbusserverdiscoverystate.cpp0000644000175000017500000000757510321451140027153 0ustar moimoi/************************************************************************ $Id: columbusserverdiscoverystate.cpp,v 1.6 2005/10/07 07:33:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusserverdiscoverystate.cpp,v $ Revision 1.6 2005/10/07 07:33:51 krolfy sources/alpha/bots/columbus/columbusclientattackstate.cpp sources/alpha/bots/columbus/columbusclientbasestate.cpp sources/alpha/bots/columbus/columbusserverattackstate.cpp sources/alpha/bots/columbus/columbusserverbasestate.cpp sources/alpha/bots/columbus/columbusserverdiscoverystate.cpp sources/alpha/bots/columbus/columbusserverescapestate.cpp sources/alpha/bots/columbus/columbusserverinitstate.cpp sources/alpha/bots/columbus/columbusservertrackstate.cpp sources/alpha/bots/general/maps/potentialmap.cpp sources/alpha/bots/general/maps/topographicmap_float.h sources/alpha/gamecontrol/servercoordinator.cpp sources/alpha/gamecontrol/servergamecontroller.cpp Revision 1.5 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.4 2005/08/17 14:08:43 krolfy *** empty log message *** Revision 1.3 2005/08/10 13:12:31 krolfy Added some debug lines, minor fixes Revision 1.2 2005/08/02 12:18:42 krolfy Work on columbus clientside started **************************************************************************/ #include "columbusserverdiscoverystate.h" #include "columbusserverstateenum.h" #include "columbussharedserverspecificrepository.h" #include "columbusinternalserverspecificrepository.h" /** * Namespace Columbus */ namespace Columbus { void ColumbusServerDiscoveryState::sendNavigationServerTips() throw(bad_exception) { _sssp->getLogger()->logMessage(1,"## DISC ##"); if(_sssp->isAttack()) setCurrentServerState(ATTACK); else { Position pos; _sssp->getLogger()->logMessage(1,"map"); if(_sssp->getEnemies().getNumberOfStoredEnemies()) pos=_sssp->getMap().navigationHint(_issp->getRobotInfo().pos,_sssp->currentEnemyPosition()); else pos=_sssp->getMap().navigationHint(_issp->getRobotInfo().pos,_tmp,0); _sssp->getLogger()->logMessage(1,"interpret"); _numberconv << pos.x << ' ' << pos.y; sendServerTipString("D "+_numberconv.str()); _numberconv.clear(); _numberconv.str(""); } _sssp->getLogger()->logMessage(1,"done"); } void ColumbusServerDiscoveryState::handleEnemy(const General::Position& pos) throw(bad_exception) { _sssp->setCurrentEnemyPosition(pos); _sssp->attack(true); setCurrentServerState(TRACK); } void ColumbusServerDiscoveryState::makeFootPrint(const General::Position& pos,const General::Position& speed) throw(bad_exception) {} ColumbusServerDiscoveryState::ColumbusServerDiscoveryState(ServerCoordinator* c,ColumbusInternalServerSpecificRepository* columbusssp, ColumbusSharedServerSpecificRepository* columbussharedssp) throw (StrategyException,bad_exception): ColumbusServerBaseState(c,columbusssp,columbussharedssp),_sssp(columbussharedssp),_issp(columbusssp) {} ColumbusServerDiscoveryState::~ColumbusServerDiscoveryState () throw() {} } realtimebattle-1.0.8/team-framework/bots/columbus/columbusserverdiscoverystate.h0000644000175000017500000000564310272406047026625 0ustar moimoi/************************************************************************ $Id: columbusserverdiscoverystate.h,v 1.1 2005/07/29 10:59:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusserverdiscoverystate.h,v $ Revision 1.1 2005/07/29 10:59:51 krolfy Columbus server side ready but untested **************************************************************************/ #ifndef COLUMBUSSERVERDISCOVERYSTATE_H #define COLUMBUSSERVERDISCOVERYSTATE_H #include "columbusserverbasestate.h" #include "columbusnamespace.h" #include "../general/teaminfo.h" #include /** * Namespace Columbus */ namespace Columbus { using Strategies::ServerState; using Exceptions::StrategyException; using std::string; using std::bad_exception; using Parser::object_type; using Parser::warning_type; using GameControl::ServerCoordinator; using std::ostringstream; class ColumbusServerDiscoveryState: public ColumbusServerBaseState { public: /** * Intended as a frontend for PotentialMap::navigationHint */ virtual void sendNavigationServerTips() throw(bad_exception); /** * Defines what to do with an enemy found. * @param pos the position of the enemy */ virtual void handleEnemy(const General::Position& pos) throw(bad_exception); /** * Make footprints, also see PotentialMap::makeFootPrint. * A fleeing Robot will not make footprints. * @param pos where to make the footprint * @param speed the depth of ther footprint shall be be dependent on the robot's movement */ virtual void makeFootPrint(const General::Position& pos,const General::Position& speed) throw(bad_exception); ColumbusServerDiscoveryState(ServerCoordinator* c,ColumbusInternalServerSpecificRepository* columbusssp, ColumbusSharedServerSpecificRepository* columbussharedssp) throw (StrategyException,bad_exception); virtual ~ColumbusServerDiscoveryState () throw(); private: ColumbusInternalServerSpecificRepository* _issp; ostringstream _numberconv; ColumbusSharedServerSpecificRepository* _sssp; General::Position _tmp; }; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbusserverescapestate.cpp0000644000175000017500000000703610321451140026374 0ustar moimoi/************************************************************************ $Id: columbusserverescapestate.cpp,v 1.6 2005/10/07 07:33:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusserverescapestate.cpp,v $ Revision 1.6 2005/10/07 07:33:51 krolfy sources/alpha/bots/columbus/columbusclientattackstate.cpp sources/alpha/bots/columbus/columbusclientbasestate.cpp sources/alpha/bots/columbus/columbusserverattackstate.cpp sources/alpha/bots/columbus/columbusserverbasestate.cpp sources/alpha/bots/columbus/columbusserverdiscoverystate.cpp sources/alpha/bots/columbus/columbusserverescapestate.cpp sources/alpha/bots/columbus/columbusserverinitstate.cpp sources/alpha/bots/columbus/columbusservertrackstate.cpp sources/alpha/bots/general/maps/potentialmap.cpp sources/alpha/bots/general/maps/topographicmap_float.h sources/alpha/gamecontrol/servercoordinator.cpp sources/alpha/gamecontrol/servergamecontroller.cpp Revision 1.5 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.4 2005/08/17 14:08:43 krolfy *** empty log message *** Revision 1.3 2005/08/10 13:12:31 krolfy Added some debug lines, minor fixes Revision 1.2 2005/08/02 12:18:42 krolfy Work on columbus clientside started **************************************************************************/ #include "columbusserverescapestate.h" #include "columbusserverstateenum.h" #include "columbussharedserverspecificrepository.h" #include "columbusinternalserverspecificrepository.h" /** * Namespace Columbus */ namespace Columbus { void ColumbusServerEscapeState::sendNavigationServerTips() throw(bad_exception) { _sssp->getLogger()->logMessage(1,"## ESC ##"); Position pos=_sssp->getMap().navigationHint(_issp->getRobotInfo().pos,_sssp->currentEnemyPosition(),-1,.3,1.5,0); _numberconv << pos.x << ' ' << pos.y; sendServerTipString("D "+_numberconv.str()); _numberconv.clear(); _numberconv.str(""); _sssp->getLogger()->logMessage(1,"done"); } void ColumbusServerEscapeState::handleEnemy(const General::Position& pos) throw(bad_exception) { _sssp->getEnemies().addEnemyPosition(_myEnemy=pos); } void ColumbusServerEscapeState::makeFootPrint(const General::Position& pos,const General::Position& speed) throw(bad_exception) {} ColumbusServerEscapeState::ColumbusServerEscapeState(ServerCoordinator* c,ColumbusInternalServerSpecificRepository* columbusssp, ColumbusSharedServerSpecificRepository* columbussharedssp) throw (StrategyException,bad_exception): ColumbusServerBaseState(c,columbusssp,columbussharedssp),_sssp(columbussharedssp),_issp(columbusssp) {} ColumbusServerEscapeState::~ColumbusServerEscapeState () throw() {} } realtimebattle-1.0.8/team-framework/bots/columbus/columbusserverescapestate.h0000644000175000017500000000564210272406047026055 0ustar moimoi/************************************************************************ $Id: columbusserverescapestate.h,v 1.1 2005/07/29 10:59:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusserverescapestate.h,v $ Revision 1.1 2005/07/29 10:59:51 krolfy Columbus server side ready but untested **************************************************************************/ #ifndef COLUMBUSSERVERESCAPESTATE_H #define COLUMBUSSERVERESCAPESTATE_H #include "columbusserverbasestate.h" #include "columbusnamespace.h" #include "../general/teaminfo.h" #include /** * Namespace Columbus */ namespace Columbus { using Strategies::ServerState; using Exceptions::StrategyException; using std::string; using std::bad_exception; using Parser::object_type; using Parser::warning_type; using GameControl::ServerCoordinator; using std::ostringstream; using General::Position; class ColumbusServerEscapeState: public ColumbusServerBaseState{ public: /** * Intended as a frontend for PotentialMap::navigationHint */ virtual void sendNavigationServerTips() throw(bad_exception); /** * Defines what to do with an enemy found. * @param pos the position of the enemy */ virtual void handleEnemy(const General::Position& pos) throw(bad_exception); /** * Make footprints, also see PotentialMap::makeFootPrint. * A fleeing Robot will not make footprints. * @param pos where to make the footprint * @param speed the depth of ther footprint shall be be dependent on the robot's movement */ virtual void makeFootPrint(const General::Position& pos,const General::Position& speed) throw(bad_exception); ColumbusServerEscapeState(ServerCoordinator* c,ColumbusInternalServerSpecificRepository* columbusssp, ColumbusSharedServerSpecificRepository* columbussharedssp) throw (StrategyException,bad_exception); virtual ~ColumbusServerEscapeState () throw(); private: ColumbusInternalServerSpecificRepository* _issp; ostringstream _numberconv; ColumbusSharedServerSpecificRepository* _sssp; Position _myEnemy; }; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbusserverinitstate.cpp0000644000175000017500000000717010321451140026076 0ustar moimoi/************************************************************************ $Id: columbusserverinitstate.cpp,v 1.5 2005/10/07 07:33:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusserverinitstate.cpp,v $ Revision 1.5 2005/10/07 07:33:51 krolfy sources/alpha/bots/columbus/columbusclientattackstate.cpp sources/alpha/bots/columbus/columbusclientbasestate.cpp sources/alpha/bots/columbus/columbusserverattackstate.cpp sources/alpha/bots/columbus/columbusserverbasestate.cpp sources/alpha/bots/columbus/columbusserverdiscoverystate.cpp sources/alpha/bots/columbus/columbusserverescapestate.cpp sources/alpha/bots/columbus/columbusserverinitstate.cpp sources/alpha/bots/columbus/columbusservertrackstate.cpp sources/alpha/bots/general/maps/potentialmap.cpp sources/alpha/bots/general/maps/topographicmap_float.h sources/alpha/gamecontrol/servercoordinator.cpp sources/alpha/gamecontrol/servergamecontroller.cpp Revision 1.4 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.3 2005/08/17 14:08:43 krolfy *** empty log message *** Revision 1.2 2005/08/02 12:18:42 krolfy Work on columbus clientside started **************************************************************************/ #include "columbusserverinitstate.h" #include "columbusserverstateenum.h" #include "columbussharedserverspecificrepository.h" #include "columbusinternalserverspecificrepository.h" /** * Namespace Columbus */ namespace Columbus { void ColumbusServerInitState::receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception) { _numBots=num; } void ColumbusServerInitState::sendNavigationServerTips() throw(bad_exception) { _sssp->getLogger()->logMessage(1,"## INIT ##"); // Abused, I know. switch(++_counter) { case 1: case 2: break; case 3: _sssp->attack(false); _sssp->getEnemies().setNumberOfEnemies(_numBots-_sssp->getTeam().getTeamSize()); setCurrentServerState(DISCOVERY); break; default:if(_sssp->isAttack()) setCurrentServerState(ATTACK); else { _sssp->attack(true); _counter=0; } } _sssp->getLogger()->logMessage(1,"done"); } void ColumbusServerInitState::handleEnemy(const General::Position& pos) throw(bad_exception) {} void ColumbusServerInitState::makeFootPrint(const General::Position& pos,const General::Position& speed) throw(bad_exception) {} ColumbusServerInitState::ColumbusServerInitState(ServerCoordinator* c,ColumbusInternalServerSpecificRepository* columbusssp, ColumbusSharedServerSpecificRepository* columbussharedssp) throw (StrategyException,bad_exception): ColumbusServerBaseState(c,columbusssp,columbussharedssp),_sssp(columbussharedssp),_counter(3),_issp(columbusssp) {} ColumbusServerInitState::~ColumbusServerInitState () throw() {} } realtimebattle-1.0.8/team-framework/bots/columbus/columbusserverinitstate.h0000644000175000017500000000633410275641335025563 0ustar moimoi/************************************************************************ $Id: columbusserverinitstate.h,v 1.2 2005/08/08 11:32:45 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusserverinitstate.h,v $ Revision 1.2 2005/08/08 11:32:45 krolfy Added three Columbus bots (crash with exception) Revision 1.1 2005/07/29 10:59:51 krolfy Columbus server side ready but untested **************************************************************************/ #ifndef COLUMBUSSERVERINITSTATE_H #define COLUMBUSSERVERINITSTATE_H #include "columbusserverbasestate.h" #include "columbusnamespace.h" #include /** * Namespace Columbus */ namespace Columbus { using Strategies::ServerState; using Exceptions::StrategyException; using std::string; using std::bad_exception; using Parser::object_type; using Parser::warning_type; using GameControl::ServerCoordinator; using std::ostringstream; class ColumbusServerInitState: public ColumbusServerBaseState { public: /** * Intended as a frontend for PotentialMap::navigationHint */ virtual void sendNavigationServerTips() throw(bad_exception); /** * Defines what to do with an enemy found. * @param pos the position of the enemy */ virtual void handleEnemy(const General::Position& pos) throw(bad_exception); /** * Make footprints, also see PotentialMap::makeFootPrint. * A fleeing Robot will not make footprints. * @param pos where to make the footprint * @param speed the depth of ther footprint shall be be dependent on the robot's movement */ virtual void makeFootPrint(const General::Position& pos,const General::Position& speed) throw(bad_exception); ColumbusServerInitState(ServerCoordinator* c,ColumbusInternalServerSpecificRepository* columbusssp, ColumbusSharedServerSpecificRepository* columbussharedssp) throw (StrategyException,bad_exception); virtual ~ColumbusServerInitState () throw(); /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ virtual void receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception); private: ColumbusSharedServerSpecificRepository* _sssp; ColumbusInternalServerSpecificRepository* _issp; int _counter,_numBots; }; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbusservertrackstate.cpp0000644000175000017500000000730110321451140026233 0ustar moimoi/************************************************************************ $Id: columbusservertrackstate.cpp,v 1.6 2005/10/07 07:33:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusservertrackstate.cpp,v $ Revision 1.6 2005/10/07 07:33:51 krolfy sources/alpha/bots/columbus/columbusclientattackstate.cpp sources/alpha/bots/columbus/columbusclientbasestate.cpp sources/alpha/bots/columbus/columbusserverattackstate.cpp sources/alpha/bots/columbus/columbusserverbasestate.cpp sources/alpha/bots/columbus/columbusserverdiscoverystate.cpp sources/alpha/bots/columbus/columbusserverescapestate.cpp sources/alpha/bots/columbus/columbusserverinitstate.cpp sources/alpha/bots/columbus/columbusservertrackstate.cpp sources/alpha/bots/general/maps/potentialmap.cpp sources/alpha/bots/general/maps/topographicmap_float.h sources/alpha/gamecontrol/servercoordinator.cpp sources/alpha/gamecontrol/servergamecontroller.cpp Revision 1.5 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.4 2005/08/17 14:08:43 krolfy *** empty log message *** Revision 1.3 2005/08/10 13:12:31 krolfy Added some debug lines, minor fixes Revision 1.2 2005/08/02 12:18:42 krolfy Work on columbus clientside started **************************************************************************/ #include "columbusservertrackstate.h" #include "columbusserverstateenum.h" #include "columbussharedserverspecificrepository.h" #include "columbusinternalserverspecificrepository.h" /** * Namespace Columbus */ namespace Columbus { void ColumbusServerTrackState::sendNavigationServerTips() throw(bad_exception) { _sssp->getLogger()->logMessage(1,"## TRACK ##"); if(++_counter==30) { _counter=0; _sssp->attack(false); setCurrentServerState(DISCOVERY); } else { Position pos=_sssp->getMap().navigationHint(_issp->getRobotInfo().pos,_myEnemy,1.5,.8,1,.7); _numberconv << pos.x << ' ' << pos.y; sendServerTipString("D "+_numberconv.str()); _numberconv.clear(); _numberconv.str(""); } _sssp->getLogger()->logMessage(1,"done"); } void ColumbusServerTrackState::handleEnemy(const General::Position& pos) throw(bad_exception) { _sssp->setCurrentEnemyPosition(_myEnemy=pos); _counter=0; } void ColumbusServerTrackState::makeFootPrint(const General::Position& pos,const General::Position& speed) throw(bad_exception) { _sssp->getMap().makeFootPrint(pos,.6*(speed.x*speed.x+speed.y*speed.y)); } ColumbusServerTrackState::ColumbusServerTrackState(ServerCoordinator* c,ColumbusInternalServerSpecificRepository* columbusssp, ColumbusSharedServerSpecificRepository* columbussharedssp) throw (StrategyException,bad_exception): ColumbusServerBaseState(c,columbusssp,columbussharedssp),_sssp(columbussharedssp),_issp(columbusssp) {} ColumbusServerTrackState::~ColumbusServerTrackState () throw() {} } realtimebattle-1.0.8/team-framework/bots/columbus/columbusservertrackstate.h0000644000175000017500000000565410272406047025724 0ustar moimoi/************************************************************************ $Id: columbusservertrackstate.h,v 1.1 2005/07/29 10:59:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusservertrackstate.h,v $ Revision 1.1 2005/07/29 10:59:51 krolfy Columbus server side ready but untested **************************************************************************/ #ifndef COLUMBUSSERVERTRACKSTATE_H #define COLUMBUSSERVERTRACKSTATE_H #include "columbusserverbasestate.h" #include "columbusnamespace.h" #include "../general/teaminfo.h" #include /** * Namespace Columbus */ namespace Columbus { using Strategies::ServerState; using Exceptions::StrategyException; using std::string; using std::bad_exception; using Parser::object_type; using Parser::warning_type; using GameControl::ServerCoordinator; using std::ostringstream; using General::Position; class ColumbusServerTrackState: public ColumbusServerBaseState { public: /** * Intended as a frontend for PotentialMap::navigationHint */ virtual void sendNavigationServerTips() throw(bad_exception); /** * Defines what to do with an enemy found. * @param pos the position of the enemy */ virtual void handleEnemy(const General::Position& pos) throw(bad_exception); /** * Make footprints, also see PotentialMap::makeFootPrint. * A fleeing Robot will not make footprints. * @param pos where to make the footprint * @param speed the depth of ther footprint shall be be dependent on the robot's movement */ virtual void makeFootPrint(const General::Position& pos,const General::Position& speed) throw(bad_exception); ColumbusServerTrackState(ServerCoordinator* c,ColumbusInternalServerSpecificRepository* columbusssp, ColumbusSharedServerSpecificRepository* columbussharedssp) throw (StrategyException,bad_exception); virtual ~ColumbusServerTrackState () throw(); private: ColumbusInternalServerSpecificRepository* _issp; ostringstream _numberconv; ColumbusSharedServerSpecificRepository* _sssp; Position _myEnemy; int _counter; }; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbusclientspecificrepository.cpp0000644000175000017500000000535210276136050030000 0ustar moimoi/************************************************************************ $Id: columbusclientspecificrepository.cpp,v 1.4 2005/08/02 12:18:42 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusclientspecificrepository.cpp,v $ Revision 1.4 2005/08/02 12:18:42 krolfy Work on columbus clientside started Revision 1.3 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "columbusclientspecificrepository.h" #include "../../rtbglobal/masterresourcecontrol.h" namespace Columbus { using std::string; using RTBGlobal::MasterResourceControl; using Exceptions::RTBException; void ColumbusClientSpecificRepository::reset() throw(StrategyException, bad_exception) { } Logger* ColumbusClientSpecificRepository::getLogger() const throw() { return _logger.get(); } ColumbusClientSpecificRepository::~ColumbusClientSpecificRepository() throw() {}; ColumbusClientSpecificRepository::ColumbusClientSpecificRepository() throw(StrategyException, bad_exception): _logger(0) { try { _logger=MasterResourceControl::Instance()->createLogger("ColumbusClient"); } catch (RTBException& ex) { throw StrategyException("Could not obtain logger for the Columbus client states: "+ex.getMessage()); } } void ColumbusClientSpecificRepository::setCurrentEnemyPosition(const Position& pos) throw() { _currentEnemy=pos; } void ColumbusClientSpecificRepository::setMyEnemyPosition(const Position& pos) throw() { _myEnemy=pos; } const Position& ColumbusClientSpecificRepository::currentEnemyPosition() const throw() { return _currentEnemy; } const Position& ColumbusClientSpecificRepository::myEnemyPosition() const throw() { return _myEnemy; } RobotInfo& ColumbusClientSpecificRepository::getRobotInfo() throw() { return _robot; } } realtimebattle-1.0.8/team-framework/bots/columbus/columbusclientspecificrepository.h0000644000175000017500000000621210276136050027441 0ustar moimoi/************************************************************************ $Id: columbusclientspecificrepository.h,v 1.4 2005/08/02 12:18:42 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusclientspecificrepository.h,v $ Revision 1.4 2005/08/02 12:18:42 krolfy Work on columbus clientside started Revision 1.3 2005/07/29 12:33:05 krolfy Added isFreeVisionLine method to map classes Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef COLUMBUSCLIENTSPECIFICREPOSITORY #define COLUMBUSCLIENTSPECIFICREPOSITORY #include "../../strategies/clientspecificrepository.h" #include "../../exceptions/strategyexception.h" #include "../../log/logger.h" #include "../general/teaminfo.h" #include #include /** * Namespace Columbus */ namespace Columbus { using Exceptions::StrategyException; using std::auto_ptr; using Log::Logger; using std::bad_exception; using Strategies::ClientSpecificRepository; using General::Position; using General::RobotInfo; /** * Class ColumbusClientSpecificRepository */ class ColumbusClientSpecificRepository: public Strategies::ClientSpecificRepository { public: ColumbusClientSpecificRepository() throw(StrategyException, bad_exception); ~ColumbusClientSpecificRepository() throw (); /** * Method to reset the repositories */ void reset() throw(StrategyException, bad_exception); Logger* getLogger() const throw(); /** * Marks the enemy the whole team is going to attack * @param the position of the enemy */ void setCurrentEnemyPosition(const Position& pos) throw(); /** * Marks the enemy the robot will actually attack * @param the position of the enemy */ void setMyEnemyPosition(const Position& pos) throw(); /** * @return the enemy the whole team is going to attack */ const Position& currentEnemyPosition() const throw(); /** * @return the enemy the robot will actually attack */ const Position& myEnemyPosition() const throw(); /** * @return information concerning the robot itself */ RobotInfo& getRobotInfo() throw(); private: auto_ptr _logger; Position _myEnemy,_currentEnemy; RobotInfo _robot; }; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbusclientattackstate.cpp0000644000175000017500000000776410321451140026363 0ustar moimoi/************************************************************************ $Id: columbusclientattackstate.cpp,v 1.10 2005/10/07 07:33:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusclientattackstate.cpp,v $ Revision 1.10 2005/10/07 07:33:51 krolfy sources/alpha/bots/columbus/columbusclientattackstate.cpp sources/alpha/bots/columbus/columbusclientbasestate.cpp sources/alpha/bots/columbus/columbusserverattackstate.cpp sources/alpha/bots/columbus/columbusserverbasestate.cpp sources/alpha/bots/columbus/columbusserverdiscoverystate.cpp sources/alpha/bots/columbus/columbusserverescapestate.cpp sources/alpha/bots/columbus/columbusserverinitstate.cpp sources/alpha/bots/columbus/columbusservertrackstate.cpp sources/alpha/bots/general/maps/potentialmap.cpp sources/alpha/bots/general/maps/topographicmap_float.h sources/alpha/gamecontrol/servercoordinator.cpp sources/alpha/gamecontrol/servergamecontroller.cpp Revision 1.9 2005/10/05 21:11:15 krolfy . Revision 1.8 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.7 2005/08/17 14:08:43 krolfy *** empty log message *** Revision 1.6 2005/08/16 11:02:20 krolfy Chenged RTBLogDriver to multi line output Revision 1.5 2005/08/10 16:00:50 krolfy Columbus behaves odd, can SIGSEGV Revision 1.4 2005/08/10 13:12:31 krolfy Added some debug lines, minor fixes Revision 1.3 2005/08/08 11:32:45 krolfy Added three Columbus bots (crash with exception) Revision 1.2 2005/08/05 16:37:40 krolfy First testing version of Columbus ready Revision 1.1 2005/08/05 14:29:19 krolfy Derived ColumbusClientStates **************************************************************************/ #include "columbusclientattackstate.h" #include "columbusclientspecificrepository.h" #include "../../gamecontrol/gameoptionsrepository.h" #include namespace Columbus { ColumbusClientAttackState::ColumbusClientAttackState(ClientCoordinator* i,ColumbusClientSpecificRepository* columbuscsp,const GameOptionsRepository* go) throw (StrategyException,bad_exception):ColumbusClientBaseState(i,columbuscsp,go),_csp(columbuscsp),_go(go) {} ColumbusClientAttackState::~ColumbusClientAttackState () throw() {} void ColumbusClientAttackState::sendRTBMessages () throw (StrategyException,bad_exception) { static double omega = _go->ROBOT_CANNON_MAX_ROTATE<_go->ROBOT_RADAR_MAX_ROTATE? _go->ROBOT_CANNON_MAX_ROTATE:_go->ROBOT_RADAR_MAX_ROTATE; static RobotInfo *i=&(_csp->getRobotInfo()); static const Position *e=&(_csp->myEnemyPosition()); double dx=e->x-i->pos.x; double dy=e->y-i->pos.y; double amp=5./(dx*dx+dy*dy+.1); double dd=atan2(dy,dx)-i->dirRobot; while(dd<-M_PI) (dd+=M_PI)+=M_PI; while(dd>=M_PI) (dd-=M_PI)-=M_PI; sendRTBMessageDebugLine(0,0,dd,1.5); sendRTBMessageDebugLine(0,0,dd+amp,1); sendRTBMessageDebugLine(0,0,dd-amp,1); sendRTBMessageDebugCircle(dd,sqrt(5./amp-.1)*.9,.1); sendRTBMessageSweep(2,omega,dd-amp,dd+amp); sendRTBMessageSweep(4,omega,dd-amp,dd+amp); if(!((++_shoot)%=1+int(.4/amp))) sendRTBMessageShoot(_go->SHOT_MIN_ENERGY); } } realtimebattle-1.0.8/team-framework/bots/columbus/columbusclientattackstate.h0000644000175000017500000000513710300413754026026 0ustar moimoi/************************************************************************ $Id: columbusclientattackstate.h,v 1.3 2005/08/17 14:08:43 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusclientattackstate.h,v $ Revision 1.3 2005/08/17 14:08:43 krolfy *** empty log message *** Revision 1.2 2005/08/10 16:00:50 krolfy Columbus behaves odd, can SIGSEGV Revision 1.1 2005/08/05 14:29:19 krolfy Derived ColumbusClientStates **************************************************************************/ #ifndef COLUMBUSCLIENTATTACKSTATE_H #define COLUMBUSCLIENTATTACKSTATE_H #include "columbusclientbasestate.h" #include "columbusnamespace.h" /** * Namespace Columbus */ namespace Columbus { /** * Class ColumbusClientAttackState * * This class is the base of all columbus client states. Here, the default actions, that will be done by every state * (unless it defines something else) are determined. States, that want to extend and not to entirely replace the action * of this base class, should simpkly call the corresponding method in this class before executinh their own stuff */ class ColumbusClientAttackState: public ColumbusClientBaseState { public: ColumbusClientAttackState(ClientCoordinator* i,ColumbusClientSpecificRepository* columbuscsp,const GameOptionsRepository* go) throw (StrategyException,bad_exception); virtual ~ColumbusClientAttackState () throw(); /** * This method is called when all server tips in this round were received. After this method, the state is to send its last messages. */ virtual void sendRTBMessages () throw (StrategyException,bad_exception); private: ColumbusClientSpecificRepository* _csp; const GameOptionsRepository* _go; int _shoot; }; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbusclientbasestate.cpp0000644000175000017500000001567610321451140026027 0ustar moimoi/************************************************************************ $Id: columbusclientbasestate.cpp,v 1.11 2005/10/07 07:33:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusclientbasestate.cpp,v $ Revision 1.11 2005/10/07 07:33:51 krolfy sources/alpha/bots/columbus/columbusclientattackstate.cpp sources/alpha/bots/columbus/columbusclientbasestate.cpp sources/alpha/bots/columbus/columbusserverattackstate.cpp sources/alpha/bots/columbus/columbusserverbasestate.cpp sources/alpha/bots/columbus/columbusserverdiscoverystate.cpp sources/alpha/bots/columbus/columbusserverescapestate.cpp sources/alpha/bots/columbus/columbusserverinitstate.cpp sources/alpha/bots/columbus/columbusservertrackstate.cpp sources/alpha/bots/general/maps/potentialmap.cpp sources/alpha/bots/general/maps/topographicmap_float.h sources/alpha/gamecontrol/servercoordinator.cpp sources/alpha/gamecontrol/servergamecontroller.cpp Revision 1.10 2005/10/05 21:11:15 krolfy . Revision 1.9 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.8 2005/08/17 14:08:43 krolfy *** empty log message *** Revision 1.7 2005/08/16 11:02:20 krolfy Chenged RTBLogDriver to multi line output Revision 1.6 2005/08/10 16:00:50 krolfy Columbus behaves odd, can SIGSEGV Revision 1.5 2005/08/10 13:12:31 krolfy Added some debug lines, minor fixes Revision 1.4 2005/08/05 16:37:40 krolfy First testing version of Columbus ready Revision 1.3 2005/08/02 12:18:41 krolfy Work on columbus clientside started Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "columbusclientbasestate.h" #include "../../gamecontrol/gameoptionsrepository.h" #include "columbusclientspecificrepository.h" #include "columbusclientstateenum.h" #include namespace Columbus { ColumbusClientBaseState::ColumbusClientBaseState(ClientCoordinator* i,ColumbusClientSpecificRepository* columbuscsp,const GameOptionsRepository* go) throw (StrategyException,bad_exception):ClientState(i),_csp(columbuscsp),_go(go) {} ColumbusClientBaseState::~ColumbusClientBaseState () throw() {} void ColumbusClientBaseState::reactOnServerTip (const string& tip) throw (StrategyException,bad_exception) { _sreader.str(tip); char c; double x,y; _sreader >> c; switch(c) { case 'E': _sreader >> x >> y; _csp->setCurrentEnemyPosition(Position(x,y)); /* x=(y=0); x-=_csp->getRobotInfo().pos.x; y-=_csp->getRobotInfo().pos.y; sendRTBMessageDebugLine(0,0,atan2(y,x)-_csp->getRobotInfo().dirRobot,sqrt(x*x+y*y));*/ break; case 'D': _sreader >> x >> y; driveTowards(Position(x,y)); break; case 'T': _csp->setMyEnemyPosition(_csp->currentEnemyPosition()); setCurrentClientState(ATTACK); break; case 'S': _counter=31; setCurrentClientState(DRIVE); break; default: _csp->getLogger()->logMessage(100,"Unknown server tip in columbus: "+tip); } _sreader.clear(); } void ColumbusClientBaseState::driveTowards (const Position& pos) throw (bad_exception) { static double para=M_PI*_go->ROBOT_MAX_ACCELERATION; static double M2PI=M_PI+M_PI; static RobotInfo *i=&(_csp->getRobotInfo()); double dx=pos.x-i->pos.x; double dy=pos.y-i->pos.y; double force=dx*dx+dy*dy; force=(M_1_PI-M_1_PI/(1+force))*.8+.2; double dir=dx==0.&&dy==0.?0.:atan2(dy,dx)-i->dirRobot; dir-=M2PI*int(dir/M2PI); while(dir<-M_PI) dir+=M2PI; while(dir>=M_PI) dir-=M2PI; sendRTBMessageDebugLine(0,0,dir,.6+force); double ad=fabs(dir); if(ad>M_PI_2) sendRTBMessageBrake(force*(ad-M_PI)); else sendRTBMessageAccelerate(force*(para-_go->ROBOT_MAX_ACCELERATION*ad)); sendRTBMessageRotate(1,force*dir*_go->ROBOT_MAX_ROTATE); } void ColumbusClientBaseState::roundFinished () throw (StrategyException,bad_exception) {} void ColumbusClientBaseState::sendRTBMessages () throw (StrategyException,bad_exception) {} void ColumbusClientBaseState::reset () throw (bad_exception, StrategyException) {} void ColumbusClientBaseState::receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception) { _radarDist=dist; _radarWhat=type; static RobotInfo* i=&(_csp->getRobotInfo()); i->dirRadar=i->dirRobot+angle; } void ColumbusClientBaseState::receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception) { static RobotInfo* i=&(_csp->getRobotInfo()); i->dirCannon=i->dirRobot+cannonAngle; } void ColumbusClientBaseState::receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception) { _csp->getRobotInfo().dirRadar=angle; if(_counter) switch(++_counter) { case 30: case 60: _counter=0; setCurrentClientState(DRIVE); } else setCurrentClientState(DRIVE); static General::RobotInfo *self=&(_csp->getRobotInfo()); x-=self->pos.x; y-=self->pos.y; self->pos.x+=x; self->pos.y+=y; Position obj=General::relativeToAbsolute(self->pos,_radarDist,angle+_radarAngle+self->dirRobot); if(_radarWhat==Parser::ROBOT) if(_counter<30) { _counter=1; _csp->setMyEnemyPosition(obj); setCurrentClientState(ATTACK); } } void ColumbusClientBaseState::receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception) {} void ColumbusClientBaseState::receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception) {} void ColumbusClientBaseState::receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception) {} void ColumbusClientBaseState::receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception) {} void ColumbusClientBaseState::receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception) {} void ColumbusClientBaseState::receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception) {} void ColumbusClientBaseState::receiveRTBMessageDead() throw (StrategyException, bad_exception) {} } realtimebattle-1.0.8/team-framework/bots/columbus/columbusclientbasestate.h0000644000175000017500000001760610276136050025500 0ustar moimoi/************************************************************************ $Id: columbusclientbasestate.h,v 1.3 2005/08/02 12:18:42 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusclientbasestate.h,v $ Revision 1.3 2005/08/02 12:18:42 krolfy Work on columbus clientside started Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef ColumbusCLIENTBASICSTATE_H #define ColumbusCLIENTBASICSTATE_H #include "../../gamecontrol/gamecontrolnamespace.h" #include "../../strategies/clientstate.h" #include "../general/generalnamespace.h" #include "columbusnamespace.h" #include /** * Namespace Columbus */ namespace Columbus { using GameControl::GameOptionsRepository; using std::ostringstream; using Strategies::ClientState; using GameControl::ClientCoordinator; using Exceptions::StrategyException; using std::string; using std::bad_exception; using Parser::object_type; using Parser::warning_type; /** * Class ColumbusClientBaseState * * This class is the base of all columbus client states. Here, the default actions, that will be done by every state * (unless it defines something else) are determined. States, that want to extend and not to entirely replace the action * of this base class, should simpkly call the corresponding method in this class before executinh their own stuff */ class ColumbusClientBaseState: public Strategies::ClientState { public: /** * Change direction according to a server driving hint * @param pos a point the direction shall be changed towards */ virtual void driveTowards(const General::Position& pos) throw(bad_exception); ColumbusClientBaseState(ClientCoordinator* i,ColumbusClientSpecificRepository* columbuscsp,const GameOptionsRepository* go) throw (StrategyException,bad_exception); virtual ~ColumbusClientBaseState () throw(); /** * Processes the server tips * @param tip The server tip in string shape */ virtual void reactOnServerTip (const string& tip) throw (StrategyException,bad_exception); /** * This method is called when all rtb messages in this round were received. After this method, the first server tips will arrive. */ virtual void roundFinished () throw (StrategyException,bad_exception); /** * This method is called when all server tips in this round were received. After this method, the state is to send its last messages. */ virtual void sendRTBMessages () throw (StrategyException,bad_exception); /** * This method is called by ClientCoordinatorRevokes::resetGame() */ virtual void reset () throw (bad_exception, StrategyException); /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ virtual void receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ virtual void receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ virtual void receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ virtual void receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ virtual void receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception); // >> Maybe we should introduce another // enum for this (TODO) /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ virtual void receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ virtual void receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ virtual void receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ virtual void receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ virtual void receiveRTBMessageDead() throw (StrategyException, bad_exception); private: ColumbusClientSpecificRepository* _csp; const GameOptionsRepository* _go; std::istringstream _sreader; string _tmpstr; Parser::object_type _radarWhat; double _radarDist,_radarAngle; int _counter; }; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbusclientdrivestate.cpp0000644000175000017500000000464710320775331026234 0ustar moimoi/************************************************************************ $Id: columbusclientdrivestate.cpp,v 1.6 2005/08/23 15:37:05 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusclientdrivestate.cpp,v $ Revision 1.6 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.5 2005/08/10 16:00:50 krolfy Columbus behaves odd, can SIGSEGV Revision 1.4 2005/08/10 13:12:31 krolfy Added some debug lines, minor fixes Revision 1.3 2005/08/08 11:32:45 krolfy Added three Columbus bots (crash with exception) Revision 1.2 2005/08/05 16:37:40 krolfy First testing version of Columbus ready Revision 1.1 2005/08/05 14:29:19 krolfy Derived ColumbusClientStates **************************************************************************/ #include "columbusclientdrivestate.h" #include "columbusclientspecificrepository.h" #include "../../gamecontrol/gameoptionsrepository.h" namespace Columbus { ColumbusClientDriveState::ColumbusClientDriveState(ClientCoordinator* i,ColumbusClientSpecificRepository* columbuscsp,const GameOptionsRepository* go) throw (StrategyException,bad_exception):ColumbusClientBaseState(i,columbuscsp,go),_csp(columbuscsp),_go(go) {} ColumbusClientDriveState::~ColumbusClientDriveState () throw() {} void ColumbusClientDriveState::sendRTBMessages () throw (StrategyException,bad_exception) { static double omega = _go->ROBOT_CANNON_MAX_ROTATE>_go->ROBOT_RADAR_MAX_ROTATE? _go->ROBOT_CANNON_MAX_ROTATE:_go->ROBOT_RADAR_MAX_ROTATE; sendRTBMessageRotate(6,omega); } } realtimebattle-1.0.8/team-framework/bots/columbus/columbusclientdrivestate.h0000644000175000017500000000464710274673677025723 0ustar moimoi/************************************************************************ $Id: columbusclientdrivestate.h,v 1.1 2005/08/05 14:29:19 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusclientdrivestate.h,v $ Revision 1.1 2005/08/05 14:29:19 krolfy Derived ColumbusClientStates **************************************************************************/ #ifndef COLUMBUSCLIENTDRIVESTATE_H #define COLUMBUSCLIENTDRIVESTATE_H #include "columbusclientbasestate.h" #include "columbusnamespace.h" /** * Namespace Columbus */ namespace Columbus { /** * Class ColumbusClientDriveState * * This class is the base of all columbus client states. Here, the default actions, that will be done by every state * (unless it defines something else) are determined. States, that want to extend and not to entirely replace the action * of this base class, should simpkly call the corresponding method in this class before executinh their own stuff */ class ColumbusClientDriveState: public ColumbusClientBaseState { public: ColumbusClientDriveState(ClientCoordinator* i,ColumbusClientSpecificRepository* columbuscsp,const GameOptionsRepository* go) throw (StrategyException,bad_exception); virtual ~ColumbusClientDriveState () throw(); /** * This method is called when all server tips in this round were received. After this method, the state is to send its last messages. */ virtual void sendRTBMessages () throw (StrategyException,bad_exception); private: ColumbusClientSpecificRepository* _csp; const GameOptionsRepository* _go; }; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbussharedserverspecificrepository.cpp0000644000175000017500000000723410276136050031220 0ustar moimoi/************************************************************************ $Id: columbussharedserverspecificrepository.cpp,v 1.4 2005/07/29 10:59:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbussharedserverspecificrepository.cpp,v $ Revision 1.4 2005/07/29 10:59:51 krolfy Columbus server side ready but untested Revision 1.3 2005/07/28 08:19:10 krolfy Most of the server side ready Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "columbussharedserverspecificrepository.h" #include "../../rtbglobal/masterresourcecontrol.h" namespace Columbus { using RTBGlobal::MasterResourceControl; using Exceptions::RTBException; /** * Method to obtain the one and only object of this class */ ColumbusSharedServerSpecificRepository* ColumbusSharedServerSpecificRepository::Instance() throw (bad_exception) { ColumbusSharedServerSpecificRepository* colsssr (ColumbusSharedServerSpecificRepository::_instance.get()); if (colsssr==0) { ColumbusSharedServerSpecificRepository::_instance.reset(colsssr=new ColumbusSharedServerSpecificRepository()); } return colsssr; } ColumbusSharedServerSpecificRepository::~ColumbusSharedServerSpecificRepository() throw() {} ColumbusSharedServerSpecificRepository::ColumbusSharedServerSpecificRepository() throw (StrategyException, bad_exception):_logger(0) { try { _logger=MasterResourceControl::Instance()->createLogger("ColumbusServer"); } catch (RTBException& ex) { throw StrategyException("Could not obtain shared logger for the Columbus server states: "+ex.getMessage()); } } void ColumbusSharedServerSpecificRepository::reset() throw (bad_exception) { _map.reset(); _team.resetForNextRound(); _enemies.resetForNextRound(); _attack=false; } PotentialMap& ColumbusSharedServerSpecificRepository::getMap() throw() { return _map; } TeamInfo& ColumbusSharedServerSpecificRepository::getTeam() throw() { return _team; } EnemiesInfo& ColumbusSharedServerSpecificRepository::getEnemies() throw() { return _enemies; } Logger* ColumbusSharedServerSpecificRepository::getLogger() const throw() { return _logger.get(); } const Position& ColumbusSharedServerSpecificRepository::currentEnemyPosition() const throw() { return _currentEnemy; } void ColumbusSharedServerSpecificRepository::setCurrentEnemyPosition(const Position& pos) throw() { _currentEnemy=pos; } void ColumbusSharedServerSpecificRepository::attack(bool b) throw() { _attack=b; } bool ColumbusSharedServerSpecificRepository::isAttack() throw() { return _attack; } /** * Only instance of this class */ auto_ptr ColumbusSharedServerSpecificRepository::_instance(0); } realtimebattle-1.0.8/team-framework/bots/columbus/columbussharedserverspecificrepository.h0000644000175000017500000001030410276136051030656 0ustar moimoi/************************************************************************ $Id: columbussharedserverspecificrepository.h,v 1.4 2005/07/29 10:59:51 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbussharedserverspecificrepository.h,v $ Revision 1.4 2005/07/29 10:59:51 krolfy Columbus server side ready but untested Revision 1.3 2005/07/28 08:19:10 krolfy Most of the server side ready Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef COLUMBUSSHAREDSERVERSPECIFICREPOSITORY #define COLUMBUSSHAREDSERVERSPECIFICREPOSITORY #include "../../strategies/sharedserverspecificrepository.h" #include "../../exceptions/strategyexception.h" #include "../../log/logger.h" #include "../general/maps/potentialmap.h" #include "../general/teaminfo.h" #include "../general/enemiesinfo.h" #include #include #include #include /** * Namespace Columbus */ namespace Columbus { using std::auto_ptr; using std::vector; using std::string; using std::out_of_range; using std::bad_exception; using Log::Logger; using Exceptions::StrategyException; using Strategies::SharedServerSpecificRepository; using Maps::PotentialMap; using General::Position; using General::TeamInfo; using General::EnemiesInfo; /** * Class ColumbusSharedServerSpecificRepository * At first, BrotFruchtSharedServerSpecificRepository will be a Singleton object, that will only contain one single element: a vector with the names of all participating friendly robots */ class ColumbusSharedServerSpecificRepository: public Strategies::SharedServerSpecificRepository { public: /** * Method to obtain the one and only object of this class */ static ColumbusSharedServerSpecificRepository* Instance() throw (bad_exception); /** * Method to reset the repositories (clears all names out of the vector */ void reset() throw (bad_exception); /** * Destructor (does nothing) */ ~ColumbusSharedServerSpecificRepository() throw (); /** * @return the shared logger for all server columbus strategy states */ Logger* getLogger() const throw(); /** * @return the map object */ PotentialMap& getMap() throw(); /** * @return the team information object */ TeamInfo& getTeam() throw(); /** * @return the enemy information object */ EnemiesInfo& getEnemies() throw(); /** * @return the position of the current enemy that shall be attacked by the whole team */ const Position& currentEnemyPosition() const throw(); /** * Start/Stop an attack; * @param b true/false = start/stop */ void attack(bool b) throw(); /** * @return whether the team attacks or not */ bool isAttack() throw(); /** * Define who is the current enemy that shall be attacked by the whole team * @param pos pointer to the position of the robot */ void setCurrentEnemyPosition(const Position& pos) throw(); private: /** * Only instance of this class */ static auto_ptr _instance; auto_ptr _logger; PotentialMap _map; TeamInfo _team; EnemiesInfo _enemies; Position _currentEnemy; bool _attack; /** * Constructor */ ColumbusSharedServerSpecificRepository() throw (StrategyException, bad_exception); }; } #endif realtimebattle-1.0.8/team-framework/bots/columbus/columbusstrategyfactory.cpp0000644000175000017500000001073410276136051026107 0ustar moimoi/************************************************************************ $Id: columbusstrategyfactory.cpp,v 1.5 2005/08/08 11:32:45 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusstrategyfactory.cpp,v $ Revision 1.5 2005/08/08 11:32:45 krolfy Added three Columbus bots (crash with exception) Revision 1.4 2005/07/29 10:59:51 krolfy Columbus server side ready but untested Revision 1.3 2005/07/28 08:19:10 krolfy Most of the server side ready Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "columbusstrategyfactory.h" #include "columbusinternalserverspecificrepository.h" #include "columbussharedserverspecificrepository.h" #include "columbusclientspecificrepository.h" #include "columbusclientattackstate.h" #include "columbusclientdrivestate.h" #include "columbusserverattackstate.h" #include "columbusserverdiscoverystate.h" #include "columbusserverescapestate.h" #include "columbusserverinitstate.h" #include "columbusservertrackstate.h" namespace Columbus { using RTBGlobal::pvector; ColumbusStrategyFactory::ColumbusStrategyFactory() { // we have a new registration method now // see my mail: RTBGlobal::MasterResourceControl::Instance()->registrateStrategyFactory("Columbus",this); } auto_ptr ColumbusStrategyFactory::createServerStateData (ServerCoordinator* serverCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception) { auto_ptr > states(new pvector()); // trick because of buggy auto_pointer template conversion method ColumbusInternalServerSpecificRepository* columbusssppointer; auto_ptr columbusssp(columbusssppointer=new ColumbusInternalServerSpecificRepository()); ColumbusSharedServerSpecificRepository* columbussharedssp(ColumbusSharedServerSpecificRepository::Instance()); // states->push_back(new ColumbusServerInitState(serverCoordinator,columbusssppointer,columbussharedssp)); states->push_back(new ColumbusServerDiscoveryState(serverCoordinator,columbusssppointer,columbussharedssp)); states->push_back(new ColumbusServerEscapeState(serverCoordinator,columbusssppointer,columbussharedssp)); states->push_back(new ColumbusServerTrackState(serverCoordinator,columbusssppointer,columbussharedssp)); states->push_back(new ColumbusServerAttackState(serverCoordinator,columbusssppointer,columbussharedssp)); return auto_ptr (new ServerStateData(states,columbusssp,columbussharedssp)); } auto_ptr ColumbusStrategyFactory::createClientStateData (ClientCoordinator* clientCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception) { auto_ptr > states(new pvector()); // trick because of buggy auto_pointer template conversion method ColumbusClientSpecificRepository* columbuscsppointer; auto_ptr columbuscsp(columbuscsppointer=new ColumbusClientSpecificRepository()); states->push_back(new ColumbusClientDriveState(clientCoordinator,columbuscsppointer,gameOptionsRepository)); states->push_back(new ColumbusClientAttackState(clientCoordinator,columbuscsppointer,gameOptionsRepository)); return auto_ptr (new ClientStateData(states,columbuscsp)); } string ColumbusStrategyFactory::getFinishingString() const throw(bad_exception) { // not too long word (saves time by parsing) return "X"; } } // namespace realtimebattle-1.0.8/team-framework/bots/columbus/columbusstrategyfactory.h0000644000175000017500000001001710276136051025546 0ustar moimoi/************************************************************************ $Id: columbusstrategyfactory.h,v 1.3 2005/08/08 11:32:45 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: columbusstrategyfactory.h,v $ Revision 1.3 2005/08/08 11:32:45 krolfy Added three Columbus bots (crash with exception) Revision 1.2 2005/01/06 17:59:26 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef COLUMBUSSTRATEGYFACTORY_H #define COLUMBUSSTRATEGYFACTORY_H #include "../../gamecontrol/gamecontrolnamespace.h" #include "../../strategies/strategiesnamespace.h" #include "../../strategies/strategyfactory.h" #include "../../strategies/serverstatedata.h" #include "../../strategies/clientstatedata.h" #include "../../exceptions/strategyexception.h" #include #include "columbusnamespace.h" /** * Namespace Columbus */ namespace Columbus { using GameControl::ServerCoordinator; using GameControl::ClientCoordinator; using GameControl::GameOptionsRepository; using Strategies::StrategyFactory; using Strategies::ServerStateData; using Strategies::ClientStateData; using Exceptions::StrategyException; using std::auto_ptr; using std::bad_exception; using std::string; using Strategies::StrategyFactory; /** * Class ColumbusFactory */ class ColumbusStrategyFactory : public Strategies::StrategyFactory { public: ColumbusStrategyFactory(); /** * This method creates instances of the server states, in particular ColumbusServerRotateState and ColumbusServerNoRotateState. * Note: The created state objects should get their repositories passed in the constructor, though the coordinator is only responsable to delete these resources but not to provide access to them. * @param serverCoordinator This object should be passed in all constructors of the created state objects. * @param gameOptionsRepository This object should also be passed in all constructors of the created state objects. */ auto_ptr createServerStateData (ServerCoordinator* serverCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception); /** * This method creates instances of the client states, in particular ColumbusClientShootHalfState and ColumbusClientShootTwiceState. * Note: The created state objects should get their repositories passed in the constructor, though the coordinator is only responsable to delete these resources but not to provide access to them. * @param clientCoordinator This object should be passed in all constructors of the created state objects. * @param gameOptionsRepository This object should also be passed in all constructors of the created state objects. */ auto_ptr createClientStateData (ClientCoordinator* clientCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception); /** * Returns the string indicating that the server tips have finished, in particular "ColumbusE". * Note: The value of this string must not be used as a normel server tip. */ string getFinishingString() const throw(bad_exception); }; } #endif realtimebattle-1.0.8/team-framework/bots/general/0002755000175000017500000000000010404234033020150 5ustar moimoirealtimebattle-1.0.8/team-framework/bots/general/teaminfo.cpp0000644000175000017500000000673410321155303022466 0ustar moimoi/************************************************************************ $Id: teaminfo.cpp,v 1.15 2005/10/05 21:11:15 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: teaminfo.cpp,v $ Revision 1.15 2005/10/05 21:11:15 krolfy . Revision 1.14 2005/10/05 16:33:14 krolfy Fixes in cobra according to new TeamInfo and RobotInfo Revision 1.13 2005/07/28 08:19:10 krolfy Most of the server side ready Revision 1.12 2005/03/22 10:36:29 krolfy Changed all int to unsigned int; some handling in case of empty lists Revision 1.11 2005/03/07 18:08:36 jonico Replaced --id with id-1 and other cosmetic things: Do not use the -- operator if there is no reason for it. Revision 1.10 2005/03/07 17:55:21 jonico Little change in signature of registerRobotForRound Revision 1.9 2005/03/07 17:48:01 krolfy Introduced ring lists Revision 1.6 2005/03/01 14:41:46 krolfy First compilable version of EnemiesInfo Revision 1.5 2005/02/28 09:43:55 krolfy Cosmetics Revision 1.4 2005/02/22 21:03:14 jonico Now teaminfo classes work **************************************************************************/ #include #include "teaminfo.h" #include namespace General { Position::Position(double X,double Y) throw() :x(X),y(Y) {} RobotInfo::RobotInfo(const string& Name) throw(bad_exception): name(Name),isDead(false),pos(0.0,0.0),ID(0),dirRobot(0),dirCannon(0),dirRadar(0),speed(0) {} RobotInfo::RobotInfo() throw() :pos(0.0,0.0),isDead(true),ID(0),dirRobot(0),dirCannon(0),dirRadar(0),speed(0) {} Position relativeToAbsolute(const Position& self,double dist,double angle) { return Position(self.x+dist*cos(angle),self.y+dist*sin(angle)); } TeamInfo::TeamInfo() throw(bad_exception):_numTeam(0),_capacity(0),_robots(0) {} unsigned int TeamInfo::registerRobotForRound(const RobotInfo& robot) throw(bad_exception) { if(_numTeam<_capacity) _robots[_numTeam]=&robot; else _robots.push_back(&robot); return ++_numTeam; } void TeamInfo::resetForNextRound() throw() { _numTeam=0; } unsigned int TeamInfo::isFriend(const Position& pos,double tolerance) const throw() { tolerance*=tolerance; for(unsigned int i=0;i<_numTeam;++i) { if(_robots[i]->isDead) continue; double x=_robots[i]->pos.x-pos.x; double y=_robots[i]->pos.y-pos.y; if(x*x+y*y #include #include namespace General { using std::vector; using std::string; using std::bad_exception; using std::out_of_range; /** * A pair of cartesian coordinates */ struct Position { Position(double X=0.0,double Y=0.0) throw(); double x,y; }; /** * Some information about a single team mate robot * Keep all directions angles relative to the globat abscissa */ struct RobotInfo { RobotInfo(const string& Name) throw(bad_exception); RobotInfo() throw(); string name; Position pos; double speed,dirRobot,dirRadar,dirCannon; bool isDead; int ID; }; /** * This is a simple global function for conversion of relative polar coordinates * to absolute cartesian coordinates * @param self origin if the polar coordinates * @param dist radius * @param angle polar angle relative to the global abscissa * @return absolute cartesian coordinates */ Position relativeToAbsolute(const Position& self,double dist,double angle); /** * Stores information about the whole team */ class TeamInfo { public: TeamInfo() throw(bad_exception); ~TeamInfo() throw(){} /** * In each round each robot has to register at this object for new. * @param robot contains information about the robot * @return the robot's id in this round */ unsigned int registerRobotForRound(const RobotInfo& robot) throw(bad_exception); /** * Prepares the object for the next round */ void resetForNextRound() throw(); /** *` If a robot detects another robot, it can use this method to identify it as a teammate or enemy * @param pos the position of the observed robot; see also function General::relativeToAbsolute() * @param tolerance Since this method identifies the robots using their coordinates, you need * some tolerance range, however, you should hardly need to touch this. * @return Zero if it is an enemy, otherwise the id of the observed team mate. */ unsigned int isFriend(const Position& pos,double tolerance=1.0) const throw(); /** * @param id the id of the requested team mate * @return information about the requested team mate */ const RobotInfo* getFriendInfo(unsigned int id) const throw(out_of_range,bad_exception); /** * @return the number of team mates that have registered yet */ unsigned int getTeamSize() const throw(); private: unsigned int _numTeam,_capacity; vector _robots; }; } #endif realtimebattle-1.0.8/team-framework/bots/general/enemiesinfo.cpp0000644000175000017500000000610610245131757023172 0ustar moimoi/************************************************************************ $Id: enemiesinfo.cpp,v 1.7 2005/05/25 11:00:47 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: enemiesinfo.cpp,v $ Revision 1.7 2005/05/25 11:00:47 krolfy Since vector is specialized, BoolMap is not necessary Revision 1.6 2005/03/31 14:27:19 krolfy little error corrected in line 78 (const_ forgotten) Revision 1.5 2005/03/22 15:13:04 krolfy Changed return type of getEnemyPosition() Revision 1.4 2005/03/22 10:36:29 krolfy Changed all int to unsigned int; some handling in case of empty lists Revision 1.3 2005/03/21 15:37:09 krolfy Memory leak fixed Revision 1.2 2005/03/07 17:48:00 krolfy Introduced ring lists Revision 1.1 2005/03/01 14:41:46 krolfy First compilable version of EnemiesInfo **************************************************************************/ #include #include "enemiesinfo.h" #include namespace General { EnemiesInfo::EnemiesInfo() throw(bad_exception): _numEnemies(0),_numStoredEnemies(0),_begin(_enemies.begin()) {} void EnemiesInfo::resetForNextRound() throw() { _numEnemies=0; _begin=_enemies.begin(); } void EnemiesInfo::addEnemyPosition(const Position& pos) throw(bad_exception) { if(!_numEnemies) return; if(_numStoredEnemies<_numEnemies) { ++_numStoredEnemies; _begin=_enemies.insert(_begin,pos); } else { if(_begin==_enemies.begin()) _begin=_enemies.end(); *(--_begin)=pos; } } const Position* EnemiesInfo::getEnemyPosition(unsigned int topicality) const throw(bad_exception) { if(!(_numEnemies||_numStoredEnemies)) return 0; topicality%=_numStoredEnemies; std::list::const_iterator I=_begin; for(unsigned int i=0;i!=topicality;++i) if(++I==_enemies.end()) I=_enemies.begin(); return &*I; } const Position& EnemiesInfo::getRecentEnemyPosition() const throw(bad_exception) { return *_begin; } void EnemiesInfo::setNumberOfEnemies(unsigned int num) { _numEnemies=num; } unsigned int EnemiesInfo::getNumberOfEnemies() const { return _numEnemies; } unsigned int EnemiesInfo::getNumberOfStoredEnemies() const { return _numStoredEnemies; } } realtimebattle-1.0.8/team-framework/bots/general/enemiesinfo.h0000644000175000017500000000645710222311035022630 0ustar moimoi/************************************************************************ $Id: enemiesinfo.h,v 1.4 2005/03/22 15:13:04 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: enemiesinfo.h,v $ Revision 1.4 2005/03/22 15:13:04 krolfy Changed return type of getEnemyPosition() Revision 1.3 2005/03/22 10:36:29 krolfy Changed all int to unsigned int; some handling in case of empty lists Revision 1.2 2005/03/07 17:48:01 krolfy Introduced ring lists Revision 1.1 2005/03/01 14:41:46 krolfy First compilable version of EnemiesInfo **************************************************************************/ #ifndef ENEMIESINFO_H #define ENEMIESINFO_H #include "teaminfo.h" #include namespace General { /** * Stores information about the whole hostile force */ class EnemiesInfo { public: EnemiesInfo() throw(bad_exception); ~EnemiesInfo() throw(){} /** * Prepares the object for the next round. It is no real need that this is called, * but otherwise it may contain invalid data from the previous round. */ void resetForNextRound() throw(); /** * If a robot was found and identified as an enemy, use this method to report its position * @param pos the enemies's position on the map */ void addEnemyPosition(const Position& pos) throw(bad_exception); /** * Request the position of an enemy. Since they will have moved after being observed, * this information may be more precise if it was observed very recently. * There will ad most as much enemy positions be stored as there are enemies alive. * @param topicality the topicality of the requested enemy position, * zero meaning the most recent one. This is an indexed list access. * @return the position of the requested enemy, zero if the enemy list is empty */ const Position* getEnemyPosition(unsigned int topicality) const throw(bad_exception); /** * Fast variant of getEnemyPosition(0) */ const Position& getRecentEnemyPosition() const throw(bad_exception); /** * Use this method to keep the number of enemies actually alive up to date. */ void setNumberOfEnemies(unsigned int num); /** * @return the number of enemies actually alive */ unsigned int getNumberOfEnemies() const; /** * @return the number of stored enemy positions */ unsigned int getNumberOfStoredEnemies() const; private: unsigned int _numEnemies,_numStoredEnemies; std::list _enemies; std::list::iterator _begin; }; } #endif realtimebattle-1.0.8/team-framework/bots/general/generalnamespace.h0000644000175000017500000000307010273662242023624 0ustar moimoi/************************************************************************ $Id: generalnamespace.h,v 1.2 2005/08/02 12:18:42 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: generalnamespace.h,v $ Revision 1.2 2005/08/02 12:18:42 krolfy Work on columbus clientside started Revision 1.1 2005/07/29 10:59:51 krolfy Columbus server side ready but untested **************************************************************************/ #ifndef GENERALNAMESPACE_H #define GENERALNAMESPACE_H /** * Namespace Columbus */ namespace General { class TeamInfo; class EnemiesInfo; struct Position; struct RobotInfo; unsigned int registerRobotForRound(const RobotInfo& robot); } #endif realtimebattle-1.0.8/team-framework/bots/general/maps/0002755000175000017500000000000010404234033021110 5ustar moimoirealtimebattle-1.0.8/team-framework/bots/general/maps/basemap.h0000644000175000017500000000473010260526010022672 0ustar moimoi/************************************************************************ $Id: basemap.h,v 1.5 2005/05/26 16:20:55 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: basemap.h,v $ Revision 1.5 2005/05/26 16:20:55 krolfy First testing version of PotentialMap Revision 1.4 2005/04/14 14:20:23 jonico now we have explicit template instatiation Revision 1.3 2005/04/06 11:13:50 krolfy Changed all (double x,double y) to General::Position Revision 1.2 2005/04/05 09:01:50 krolfy Rectified the declaration of addChange() Revision 1.1 2005/04/05 08:49:27 krolfy First publication of the map classes **************************************************************************/ #ifndef BASEMAP_H #define BASEMAP_H #include #include "../teaminfo.h" /** * Namespace Maps */ namespace Maps { using std::bad_exception; using General::Position; /** * The base class of all map classes */ template class BaseMap { public: BaseMap() throw (bad_exception) {} virtual ~BaseMap() throw() {} /** * Every time after having received both the commands "Coordiantes" and "Radar", the ServerState is to call this method if it saw something worth to draw onto the map. * @param self the position of the ServerState's robot * @param obj the position of the observed object * @param type the type of the observed object */ virtual void addChange(const Position& self,const Position& obj,const _Tp& type) throw (bad_exception)=0; /** * To be called when a new round on a new map starts */ virtual void reset() throw()=0; }; } // Namespace #endif realtimebattle-1.0.8/team-framework/bots/general/maps/topographicmap.h0000644000175000017500000002144110320775332024307 0ustar moimoi/************************************************************************ $Id: topographicmap.h,v 1.12 2005/08/23 15:37:05 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: topographicmap.h,v $ Revision 1.12 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.11 2005/08/10 09:48:13 krolfy Bugfixed ugly for loop Revision 1.10 2005/07/29 12:33:14 krolfy Added isFreeVisionLine method to map classes Revision 1.9 2005/05/26 16:20:55 krolfy First testing version of PotentialMap Revision 1.8 2005/05/25 12:43:56 krolfy gradient method for TopographicMap Revision 1.7 2005/05/25 11:20:33 krolfy _density made const Revision 1.6 2005/05/25 11:00:47 krolfy Since vector is specialized, BoolMap is not necessary Revision 1.5 2005/05/18 14:35:20 krolfy TopographicMap is working. All contents moved from .cpp to .h Revision 1.4 2005/05/11 13:35:08 krolfy First (hopefully) usable version Revision 1.3 2005/04/14 14:20:23 jonico now we have explicit template instatiation Revision 1.2 2005/04/06 11:13:50 krolfy Changed all (double x,double y) to General::Position Revision 1.1 2005/04/05 08:49:28 krolfy First publication of the map classes **************************************************************************/ #ifndef TOPOGRAPHICMAP_H #define TOPOGRAPHICMAP_H #include "basemap.h" #include #include /** * Namespace Maps */ namespace Maps { using std::vector; using std::list; /** * A map using a two-dimensional vector to store pixelized data of the arena, auto-resizing * Most often this will be used as TopographicMap * For _Tp, besides a copy constructor, the following operators are needed: * operator==(const Tp&,const Tp&) * operator<(const Tp&,const Tp&) * operator=(Tp&,const Tp&) */ template class TopographicMap:public BaseMap<_Tp> { vector > _map; list<_Tp> _final; int _width,_height,_lastX,_lastY; _Tp _default,_empty; const float _density; /* * After the call of this method, you can directly access _map like * _map.at(x).at(y) * Note that for non-negative pos.x, even x are used, * for negative pos.x odd x, and the same for y. * @param pos The requested position in RTB standard coordinates */ void _getIndices(const Position& pos,int& x,int& y) const throw() { (x=int(pos.x/_density+.5))<0?++(x*=-2):x<<=1; (y=int(pos.y/_density+.5))<0?++(y*=-2):y<<=1; } public: /** * Creates an empty map. * @param defaultValue The map will initially be filled with this * @param width initial map width in grid squares * @param height initial map height in grid squares * @param density edge length of the grid squares */ TopographicMap(const _Tp& defaultValue,unsigned int width=50,unsigned int height=50,float density=.7071) throw (bad_exception): _default(defaultValue), _empty(defaultValue), _width(width), _height(height), _density(density), _map(width,vector<_Tp>(height,defaultValue)) {} virtual ~TopographicMap() throw() {} /* * If the map is too small, this method enlarges it. It also reserves little extra space so that actual enlargement is not needed that often. * New entries will be filled with the default value * @param w new minimum width of the map * @param h new minimum height of the map */ void resize(int w,int h) throw (bad_exception) { if(h>=_height) { ++(h+=h>>3); for(int i=0;i!=_width;++i) _map.at(i).resize(h,_default); _height=h; } if(w>=_width) _map.resize(_width=++(w+=w>>3),vector<_Tp>(_height,_default)); } /** * Every time after having received both the commands "Coordiantes" and "Radar", the ServerState is to call this method if it saw something worth to draw onto the map. * @param self the position of the ServerState's robot * @param obj the position of the observed object * @param type the type of the observed object */ virtual void addChange(const Position& self,const Position& obj,const _Tp& type) throw (bad_exception) { int x,y,d; _getIndices(self,x,y); _getIndices(obj,_lastX,_lastY); resize(x>_lastX?x:_lastX,y>_lastY?y:_lastY); double Dx=self.x-obj.x,Dy=self.y-obj.y,dx,dy; if(Dx!=0 || Dy!=0) { Dx/=(dx=Dx<0?-_density:_density); Dy/=(dy=Dy<0?-_density:_density); if(Dx::iterator i=_final.begin();i!=_final.end();++i) if(*i==*value) { value=0; break; } if(value) *value=_empty; } } _map.at(_lastX).at(_lastY)=type; } /** * Check a chord for being a free vision line * If one of the endpoints is out of bounds, false is returned. * @param self first endpoint of the chord * @param obj second endpoint of the chord * @return whether there are only "empty" values (see setEmptyValue) on the chord */ virtual bool isFreeVisionLine(const Position& self,const Position& obj) const throw (bad_exception) { int x,y,X,Y,d; _getIndices(self,x,y); _getIndices(obj,X,Y); x<<=1; y<<=1; X<<=1; Y<<=1; if( x>=_width||y>=_height|| x<=-_width||y<=-_height|| X>=_width||Y>=_height|| X<=-_width||Y<=-_height ) return false; x>>=1; y>>=1; X>>=1; Y>>=1; double Dx=self.x-obj.x,Dy=self.y-obj.y,dx,dy; if(Dx!=0 || Dy!=0) { Dx/=(dx=Dx<0?-_density:_density); Dy/=(dy=Dy<0?-_density:_density); if(Dx >::iterator i=_map.begin();i!=_map.end();++i) for(typename vector<_Tp>::iterator j=i->begin();j!=i->end();++j) *j=_default; } /** * Access using the RTB standard coordinates * @param x x coordinate of the requested position * @param y y coordinate of the requested position * @return the value at the requested position */ _Tp& at(const Position& pos) throw(bad_exception) { _getIndices(pos,_lastX,_lastY); resize(_lastX,_lastY); return _map.at(_lastX).at(_lastY); } /* * Set the value that will be used whenever reset is invoked * @param value the new default value */ void setDefaultValue(const _Tp& value) throw() { _default=value; } /* * Set the value that will be considered as empty space * If this method is never invoked, the value is the first parameter of the constructor. * @param value the new value meaning "empty space" */ void setEmptyValue(const _Tp& value) throw() { _empty=value; } /* * A final value, once assigned to a grid square, cannot be overwritten with the "empty" value (see setEmptyValue) * For example, this can prevent walls from vanishing from the map due to rounding errors. * @param value the new final value */ void addFinalValue(const _Tp& value) { for(typename list<_Tp>::iterator i=_final.begin();i!=_final.end();++i) if(value<*i) { _final.insert(i,value); return; } else if(*i==value) return; _final.push_back(value); } /* * Make a former final value no longer final (See addFinalValue) * @param value the old final value */ void deleteFinalValue(const _Tp& value) { for(typename list<_Tp>::iterator i=_final.begin();i!=_final.end();++i) if(*i==value) { _final.erase(i); return; } } /* * @return the edge length od the map grid squares */ float getDensity() const throw() { return _density; } /* * For TopographicMap, there is a specialization. * @return the gradient at pos if _Tp==float, otherwise 0 */ Position gradient(const Position& pos) { return Position(); } }; } // Namespace #include "topographicmap_float.h" #endif realtimebattle-1.0.8/team-framework/bots/general/maps/topographicmap_float.h0000644000175000017500000001302210321451140025455 0ustar moimoi/************************************************************************ $Id: topographicmap_float.h,v 1.5 2005/10/07 07:40:34 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: topographicmap_float.h,v $ Revision 1.5 2005/10/07 07:40:34 krolfy Removed cerr debug lines Revision 1.4 2005/10/07 07:33:51 krolfy sources/alpha/bots/columbus/columbusclientattackstate.cpp sources/alpha/bots/columbus/columbusclientbasestate.cpp sources/alpha/bots/columbus/columbusserverattackstate.cpp sources/alpha/bots/columbus/columbusserverbasestate.cpp sources/alpha/bots/columbus/columbusserverdiscoverystate.cpp sources/alpha/bots/columbus/columbusserverescapestate.cpp sources/alpha/bots/columbus/columbusserverinitstate.cpp sources/alpha/bots/columbus/columbusservertrackstate.cpp sources/alpha/bots/general/maps/potentialmap.cpp sources/alpha/bots/general/maps/topographicmap_float.h sources/alpha/gamecontrol/servercoordinator.cpp sources/alpha/gamecontrol/servergamecontroller.cpp Revision 1.3 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.2 2005/05/26 16:20:56 krolfy First testing version of PotentialMap Revision 1.1 2005/05/25 12:43:56 krolfy eradient method for TopographicMap **************************************************************************/ #ifndef TOPOGRAPHICMAP_FLOAT_H #define TOPOGRAPHICMAP_FLOAT_H #include using namespace std; namespace Maps { using std::vector; using std::list; template<> class TopographicMap:public BaseMap { vector > _map; list _final; int _width,_height,_lastX,_lastY; float _default,_empty; const float _density; void _getIndices(const Position& pos,int& x,int& y) throw() { (x=int(pos.x/_density+.5))<0?++(x*=-2):x<<=1; (y=int(pos.y/_density+.5))<0?++(y*=-2):y<<=1; } public: TopographicMap(const float& defaultValue,unsigned int width=50,unsigned int height=50,float density=.7071) throw (bad_exception): _default(defaultValue), _empty(defaultValue), _width(width), _height(height), _density(density), _map(width,vector(height,defaultValue)) {} virtual ~TopographicMap() throw() {} void resize(int w,int h) throw (bad_exception) { ++(w+=w>>3); ++(h+=h>>3); if(h>=_height) { for(int i=0;i!=_width;++i) _map.at(i).resize(h,_default); _height=h; } if(w>=_width) _map.resize(_width=w,vector(_height,_default)); } virtual void addChange(const Position& self,const Position& obj,const float& type) throw (bad_exception) { int x,y,d; _getIndices(self,x,y); _getIndices(obj,_lastX,_lastY); resize(x>_lastX?x:_lastX,y>_lastY?y:_lastY); double Dx=self.x-obj.x,Dy=self.y-obj.y,dx,dy; if(Dx!=0 || Dy!=0) { Dx/=(dx=Dx<0?-_density:_density); Dy/=(dy=Dy<0?-_density:_density); if(Dx::iterator i=_final.begin();i!=_final.end();++i) if(*i==*value) { value=0; break; } if(value) *value=_empty; } } _map.at(_lastX).at(_lastY)=type; } virtual void reset() throw() { for(vector >::iterator i=_map.begin();i!=_map.end();++i) for(vector::iterator j=i->begin();j!=i->end();++j) *j=_default; } float& at(const Position& pos) throw(bad_exception) { _getIndices(pos,_lastX,_lastY); resize(_lastX,_lastY); return _map.at(_lastX).at(_lastY); } void setDefaultValue(const float& value) throw() { _default=value; } void setEmptyValue(const float& value) throw() { _empty=value; } void addFinalValue(const float& value) { for(list::iterator i=_final.begin();i!=_final.end();++i) if(value<*i) { _final.insert(i,value); return; } else if(*i==value) return; _final.push_back(value); } void deleteFinalValue(const float& value) { for(list::iterator i=_final.begin();i!=_final.end();++i) if(*i==value) { _final.erase(i); return; } } float getDensity() const throw() { return _density; } Position gradient(const Position& pos) { int x1,y1; int x=int(pos.x/_density); if(x<-1) (x1=++(x*=-2))-=2; else if(x!=-1) (x1=x<<=2)+=2; else { x=1;x1=0; } int y=int(pos.y/_density); if(y<-1) (y1=++(y*=-2))-=2; else if(y!=-1) (y1=y<<=2)+=2; else { y=1;y1=0; } resize(x>0?x:-x,y>0?y:-y); float olur=_map.at(x1).at(y)-_map.at(x).at(y1); float ulor=_map.at(x1).at(y1)-_map.at(x).at(y); return Position((olur+ulor)/_density,(olur-ulor)/_density); } }; } // Namespace #endif realtimebattle-1.0.8/team-framework/bots/general/maps/mapsnamespace.h0000644000175000017500000000310210272421002024065 0ustar moimoi/************************************************************************ $Id: mapsnamespace.h,v 1.2 2005/07/29 12:33:06 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: mapsnamespace.h,v $ Revision 1.2 2005/07/29 12:33:06 krolfy Added isFreeVisionLine method to map classes Revision 1.1 2005/07/29 10:59:51 krolfy Columbus server side ready but untested **************************************************************************/ #ifndef GENERALNAMESPACE_H #define GENERALNAMESPACE_H /** * Namespace Columbus */ namespace General { template class BaseMap<_Tp>; template class TopographicMap<_Tp>; class NavigateMap; class PotentialMap; } #endif realtimebattle-1.0.8/team-framework/bots/general/maps/navigatemap.h0000644000175000017500000000474410320775331023574 0ustar moimoi/************************************************************************ $Id: navigatemap.h,v 1.3 2005/08/23 15:37:05 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: navigatemap.h,v $ Revision 1.3 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.2 2005/07/28 08:19:19 krolfy Most of the server side ready Revision 1.1 2005/05/26 16:20:55 krolfy First testing version of PotentialMap **************************************************************************/ #ifndef NAVIGATEMAP_H #define NAVIGATEMAP_H #include "topographicmap.h" #include "../../../parser/object_type.h" /** * Namespace Maps */ namespace Maps { using Parser::object_type; /** * The base class of all navigation map classes */ class NavigateMap:public TopographicMap { public: /** * Creates an empty map. The parameters are passed on to internal TopographicMaps * @param width initial map width in grid squares * @param height initial map height in grid squares * @param density edge length of the grid squares */ NavigateMap(unsigned int width,unsigned int height,float density) throw (bad_exception); virtual ~NavigateMap() throw() {} /** * This method gives concrete information where to drive. * @param self the position of the calling bot * @param target the position the bot wants to reach * @return the position the bot shall drive towards */ virtual Position navigationHint(const Position& self,const Position& target) throw (bad_exception)=0; /** * To be called when a new round on a new map starts */ virtual void reset() throw()=0; }; } // Namespace #endif realtimebattle-1.0.8/team-framework/bots/general/maps/navigatemap.cpp0000644000175000017500000000302510302641241024106 0ustar moimoi/************************************************************************ $Id: navigatemap.cpp,v 1.1 2005/08/23 15:37:05 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: navigatemap.cpp,v $ Revision 1.1 2005/08/23 15:37:05 krolfy *** empty log message *** **************************************************************************/ #include "navigatemap.h" #include "../../../parser/object_type.h" namespace Maps { NavigateMap::NavigateMap(unsigned int width,unsigned int height,float density) throw(bad_exception): TopographicMap(Parser::NOOBJECT,width,height,density) { addFinalValue(Parser::WALL); addFinalValue(Parser::MINE); } } realtimebattle-1.0.8/team-framework/bots/general/maps/potentialmap.h0000644000175000017500000001120410320775332023763 0ustar moimoi/************************************************************************ $Id: potentialmap.h,v 1.5 2005/08/23 15:37:05 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: potentialmap.h,v $ Revision 1.5 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.4 2005/07/29 12:33:14 krolfy Added isFreeVisionLine method to map classes Revision 1.3 2005/07/28 08:19:19 krolfy Most of the server side ready Revision 1.2 2005/06/02 17:35:35 krolfy Changed mines potential, introduced footprint potential Revision 1.1 2005/05/26 16:20:55 krolfy First testing version of PotentialMap **************************************************************************/ #ifndef POTENTIALMAP_H #define POTENTIALMAP_H #include "navigatemap.h" #include "topographicmap.h" #include "../../../parser/object_type.h" /** * Namespace Maps */ namespace Maps { /** * This is our first map class usable for navigation. The algorithm is, that we define a sort of ostensive potential all over the map whose gradient equals an also ostensive force which makes the robot driving curves */ class PotentialMap:public NavigateMap { public: /** * Creates an empty map. The parameters are passed on to internal TopographicMaps * @param width initial map width in grid squares * @param height initial map height in grid squares * @param density edge length of the grid squares */ PotentialMap(unsigned int width=50,unsigned int height=50,float density=.7071) throw (bad_exception); virtual ~PotentialMap() throw() {} /** * Every time after having received both the commands "Coordiantes" and "Radar", the ServerState is to call this method if it saw something worth to draw onto the map. * @param self the position of the ServerState's robot * @param obj the position of the observed object * @param type the type of the observed object */ virtual void addChange(const Position& self,const Position& obj,const object_type& type) throw (bad_exception); /** * This method gives concrete information where to drive. * NOTE: Personally, I took it that way that if the course correction is urgent, the returned value is far from the calling bot's position. * @param self the position of the calling bot * @param target the position the bot wants to reach * @return the position the bot shall drive towards */ virtual Position navigationHint(const Position& self,const Position& target) throw (bad_exception); /** * Variation of the above method, to vary the importance and sign of the different sub-potentials * */ virtual Position navigationHint(const Position& self,const Position& target,float fEnemy,float fWalls=1,float fMines=1,float fTrack=1) throw (bad_exception); /** * To be called when a new round on a new map starts */ virtual void reset() throw(); /** * Make a footprint which is a hint that the path you are taking is good/bad to use * @param pos Where to make the footprint; * @param depth The depth of the footprint. Positive values mark good paths, negative ones bad paths. The absolute value should be between zero (none at all) and one (very deep). However, it is possible to use values higher than one, and it will result in a really super-deep footprint, but stay below one unless you there is a really good reason. */ virtual void makeFootPrint(const Position& pos,float depth) throw(bad_exception); /** * Check a chord for being a free vision line * @param self first endpoint of the chord * @param obj second endpoint of the chord * @return whether there are only "empty" values (see setEmptyValue) on the chord */ // virtual bool isFreeVisionLine(const Position& self,const Position& obj) const throw (bad_exception); private: TopographicMap _walls,_mines,_track; float _density; }; } // Namespace #endif realtimebattle-1.0.8/team-framework/bots/general/maps/potentialmap.cpp0000644000175000017500000001354510321451140024315 0ustar moimoi/************************************************************************ $Id: potentialmap.cpp,v 1.11 2005/10/07 07:40:34 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: potentialmap.cpp,v $ Revision 1.11 2005/10/07 07:40:34 krolfy Removed cerr debug lines Revision 1.10 2005/10/07 07:33:51 krolfy sources/alpha/bots/columbus/columbusclientattackstate.cpp sources/alpha/bots/columbus/columbusclientbasestate.cpp sources/alpha/bots/columbus/columbusserverattackstate.cpp sources/alpha/bots/columbus/columbusserverbasestate.cpp sources/alpha/bots/columbus/columbusserverdiscoverystate.cpp sources/alpha/bots/columbus/columbusserverescapestate.cpp sources/alpha/bots/columbus/columbusserverinitstate.cpp sources/alpha/bots/columbus/columbusservertrackstate.cpp sources/alpha/bots/general/maps/potentialmap.cpp sources/alpha/bots/general/maps/topographicmap_float.h sources/alpha/gamecontrol/servercoordinator.cpp sources/alpha/gamecontrol/servergamecontroller.cpp Revision 1.9 2005/08/23 15:37:05 krolfy *** empty log message *** Revision 1.8 2005/08/08 11:32:45 krolfy Added three Columbus bots (crash with exception) Revision 1.7 2005/07/29 12:33:13 krolfy Added isFreeVisionLine method to map classes Revision 1.6 2005/07/28 08:19:19 krolfy Most of the server side ready Revision 1.5 2005/06/02 17:35:35 krolfy Changed mines potential, introduced footprint potential Revision 1.4 2005/05/31 14:35:40 krolfy Undid the last change Revision 1.3 2005/05/31 14:26:29 krolfy Just a literal change Revision 1.2 2005/05/31 14:14:32 krolfy Changed the enemy potential to a better function Revision 1.1 2005/05/26 16:20:55 krolfy First testing version of PotentialMap **************************************************************************/ #include using namespace std; #include "potentialmap.h" #include #include namespace Maps { PotentialMap::PotentialMap(unsigned int width,unsigned int height,float density) throw(bad_exception): NavigateMap(width,height,density), _walls(0,width,height,density), _mines(0,width,height,density), _track(0,width,height,density), _density(density) { addFinalValue(Parser::WALL); addFinalValue(Parser::MINE); } // // Mine potential: // 20/(r^2+4) // gradient at most about 4.5 // // Wall potential: // 1/(r^2+0.6)^2 // gradient at most about 3.0 // // Enemy potential: // 16*ln(r^2+128)+3072/(r^2+128) // gradient at most about 0.8 // // Footprint potential: // gradient at most about 1.3 // void PotentialMap::addChange(const Position& self,const Position& obj,const object_type& type) throw(bad_exception) { TopographicMap::addChange(self,obj,type); const float dq=_density*_density; switch(type) { case Parser::MINE: { Position p=obj; p.y+=5*_density; int x,y; for(p.x-=5*_density,x=0;x!=11;p.x+=_density,++x) for(p.y-=11*_density,y=0;y!=11;p.y+=_density,++y) _mines.at(p)+=(20/((x*x+y*y)*dq+4)); } case Parser::WALL: if(_walls.at(obj)<2.7) { Position p=obj; p.y+=3*_density; int x,y; float d; for(p.x-=2*_density,x=0;x!=5;p.x+=_density,++x) for(p.y-=5*_density,y=0;y!=5;p.y+=_density,++y,d=1) _walls.at(p)+=((d/=(x*x+y*y)*dq+0.6)*=d); } break; } } Position PotentialMap::navigationHint(const Position& self,const Position& target) throw (bad_exception) { Position r=self; float dx=self.x-target.x; float dy=self.x-target.x; float rq=dx*dx+dy*dy+128.; float f=rq; ((f-=192.)*=32.)/=(rq*=rq); r.x-=(dx*=f); r.y-=(dy*=f); Position a=_walls.gradient(self); r.x-=a.x; r.y-=a.y; a=_mines.gradient(self); r.x-=a.x; r.y-=a.y; a=_track.gradient(self); r.x-=a.x; r.y-=a.y; return r; } Position PotentialMap::navigationHint(const Position& self,const Position& target,float fEnemy,float fWalls,float fMines,float fTrack) throw (bad_exception) { Position r=self; float dx=self.x-target.x; float dy=self.x-target.x; float rq=dx*dx+dy*dy+128.; float f=rq; ((f-=192.)*=32.)/=(rq*=rq); r.x-=fEnemy*(dx*=f); r.y-=fEnemy*(dy*=f); Position a=_walls.gradient(self); r.x-=fWalls*a.x; r.y-=fWalls*a.y; a=_mines.gradient(self); r.x-=fMines*a.x; r.y-=fMines*a.y; a=_track.gradient(self); r.x-=fTrack*a.x; r.y-=fTrack*a.y; return r; } void PotentialMap::reset() throw() { _walls.reset(); _mines.reset(); } void PotentialMap::makeFootPrint(const Position& pos,float depth) throw(bad_exception) { Position p=pos; float d; int x,y; p.y+=3*_density; if(depth<0) for(p.x-=2*_density,x=0;x!=5;p.x+=_density,++x) for(p.y-=5*_density,y=0;y!=5;p.y+=_density,++y,d=depth/(1+x*x+y*y)) (_track.at(p)*=(1.0-d))-=2.0*d; else for(p.x-=2*_density,x=0;x!=5;p.x+=_density,++x) for(p.y-=5*_density,y=0;y!=5;p.y+=_density,++y,d=depth/(1+x*x+y*y)) (_track.at(p)*=(1.0+d))-=2.0*d; } /*bool PotentialMap::isFreeVisionLine(const Position& self,const Position& obj) const throw (bad_exception) { return _items.isFreeVisionLine(self,obj); } */ } realtimebattle-1.0.8/team-framework/bots/cobra/0002755000175000017500000000000010404234033017621 5ustar moimoirealtimebattle-1.0.8/team-framework/bots/cobra/cobra_client_basicstate.cpp0000644000175000017500000002007710227426016025166 0ustar moimoi/************************************************************************ cobra_client_basicstate.cpp Copyright: Tino Truppel This file was created on Mon, Dec 12 2004 RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 The original location of this file is cobra **************************************************************************/ #include "cobra_client_basicstate.h" #include "../../gamecontrol/gameoptionsrepository.h" #include "../general/teaminfo.h" #include "cobra_clientspecificrepository.h" namespace cobra { cobra_ClientBasicState::cobra_ClientBasicState(ClientCoordinator* i, cobra_ClientSpecificRepository* cobra_csp, const GameOptionsRepository* cobra_gor) throw (StrategyException,bad_exception):ClientState(i) { _shoot = false; } cobra_ClientBasicState::~cobra_ClientBasicState () throw() {} /** * Processes the server tips * @param tip The server tip in string shape */ void cobra_ClientBasicState::reactOnServerTip (const string& tip) throw (StrategyException,bad_exception) { if (tip == "SHOOT") { _shoot = true; } else { _shoot = false; } } /** * This method is called when all rtb messages in this round were received. After this method, the first server tips will arrive. */ void cobra_ClientBasicState::roundFinished () throw (StrategyException,bad_exception) {} /** * This method is called when all server tips in this round were received. After this method, the state is to send its last messages. */ void cobra_ClientBasicState::sendRTBMessages () throw (StrategyException,bad_exception) { sendRTBMessageSweep(6,7,-0.3,0.3); sendRTBMessageAccelerate(0.6); } /** * This method is called by ClientCoordinatorRevokes::resetGame() */ void cobra_ClientBasicState::reset () throw (bad_exception, StrategyException) {} /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ void cobra_ClientBasicState::receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception) { if(type == 0) { if(angle < -0.3 || angle > 0.3) { if(angle > 0) { if(dist > 6) sendRTBMessageRotateAmount(1, 7, 0.4); else sendRTBMessageRotateAmount(1, 7, 0.7); } else { if(dist > 6) sendRTBMessageRotateAmount(1, 7, -0.4); else sendRTBMessageRotateAmount(1, 7, -0.7); } } else if(angle > -0.4 && angle < 0.4) if (_shoot) {sendRTBMessageShoot(30);} } else if(type == 2) { if(angle > -0.4 && angle < 0.4 && dist < 7) sendRTBMessageRotateAmount(1, 7, 0.1); if(angle > -0.4 && angle < 0.4 && dist < 2) sendRTBMessageRotateAmount(1, 7, 0.7); if(angle > -0.1 && angle < 0.2 && dist < 0.01) sendRTBMessageRotateAmount(1, 7, 1); sendRTBMessageAccelerate(1); } else if(type == 4 && angle > -0.3 && angle < 0.3 ) sendRTBMessageShoot(0.5); else if(type == 3) { if(angle > 0.3) sendRTBMessageRotateAmount(1, 7, 0.9); else if(angle < -0.3) sendRTBMessageRotateAmount(1, 7, -0.9); sendRTBMessageAccelerate(0.5); } } /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ void cobra_ClientBasicState::receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ void cobra_ClientBasicState::receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ void cobra_ClientBasicState::receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * @param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ void cobra_ClientBasicState::receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ void cobra_ClientBasicState::receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ void cobra_ClientBasicState::receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ void cobra_ClientBasicState::receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ void cobra_ClientBasicState::receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ void cobra_ClientBasicState::receiveRTBMessageDead() throw (StrategyException, bad_exception) {} } realtimebattle-1.0.8/team-framework/bots/cobra/cobra_client_basicstate.h0000644000175000017500000001703110227001675024627 0ustar moimoi/************************************************************************ cobra_client_basicstate.h Copyright: Tino Truppel This file was created on Mon, Dec 13 2004 RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 The original location of this file is cobra **************************************************************************/ #ifndef cobra_CLIENTBASICSTATE_H #define cobra_CLIENTBASICSTATE_H #include "../../gamecontrol/gamecontrolnamespace.h" #include "../../strategies/clientstate.h" #include "cobra_namespace.h" #include "../general/teaminfo.h" namespace cobra { using GameControl::GameOptionsRepository; using Strategies::ClientState; using GameControl::ClientCoordinator; using Exceptions::StrategyException; using std::string; using std::bad_exception; using Parser::object_type; using Parser::warning_type; using General::TeamInfo; /** * This class is the base of all cobra client states. Here, the default actions, that will be done by every state * (unless it defines something else) are determined. States, that want to extend and not to entirely replace the action * of this base class, should simply call the corresponding method in this class before executinh their own stuff. * * The methods below is the interace how the RTB-Server communicate with you! * The interface if you want send messages to the RTB-Server see in the * ../stragegies/clientstate.h. * */ class cobra_ClientBasicState: public Strategies::ClientState { public: cobra_ClientBasicState(ClientCoordinator* i, cobra_ClientSpecificRepository* cobra_csp, const GameOptionsRepository* cobra_gor) throw (StrategyException,bad_exception); virtual ~cobra_ClientBasicState () throw(); /** * Processes the server tips * @param tip The server tip in string shape */ virtual void reactOnServerTip (const string& tip) throw (StrategyException,bad_exception); /** * This method is called when all rtb messages in this round were received. After this method, the first server tips will arrive. */ virtual void roundFinished () throw (StrategyException,bad_exception); /** * This method is called when all server tips in this round were received. After this method, the state is to send its last messages. */ virtual void sendRTBMessages () throw (StrategyException,bad_exception); /** * This method is called by ClientCoordinatorRevokes::resetGame() */ virtual void reset () throw (bad_exception, StrategyException); /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ virtual void receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ virtual void receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ virtual void receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ virtual void receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * @param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ virtual void receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ virtual void receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ virtual void receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ virtual void receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ virtual void receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ virtual void receiveRTBMessageDead() throw (StrategyException, bad_exception); private: bool _shoot; }; } #endif realtimebattle-1.0.8/team-framework/bots/cobra/cobra_clientspecificrepository.cpp0000644000175000017500000000352110227001675026625 0ustar moimoi/************************************************************************ cobra_clientspecificrepository.cpp Copyright: Tino Truppel This file was created on Mon, Nov 13 2004 RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 The original location of this file is cobra **************************************************************************/ #include #include "cobra_clientspecificrepository.h" namespace cobra { using std::string; using Exceptions::RTBException; /** * Method to reset the repositories (clears number of collisions) */ void cobra_ClientSpecificRepository::reset() throw(StrategyException, bad_exception) {} /** * Destructor */ cobra_ClientSpecificRepository::~cobra_ClientSpecificRepository() throw() {}; /** * Constructor */ cobra_ClientSpecificRepository::cobra_ClientSpecificRepository() throw(StrategyException, bad_exception) {} } realtimebattle-1.0.8/team-framework/bots/cobra/cobra_clientspecificrepository.h0000644000175000017500000000425210227001675026274 0ustar moimoi/************************************************************************ cobra_clientspecificrepository.h Copyright: Tino Truppel This file was created on Mon, Dec 13 2004 RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 The original location of this file is cobra **************************************************************************/ #ifndef cobra_CLIENTSPECIFICREPOSITORY #define cobra_CLIENTSPECIFICREPOSITORY #include "../../strategies/clientspecificrepository.h" #include "../../exceptions/strategyexception.h" namespace cobra { /** * Use this Repository for all client-stuff. You can implement what you want. */ using Exceptions::StrategyException; using std::auto_ptr; using std::bad_exception; using Strategies::ClientSpecificRepository; class cobra_ClientSpecificRepository: public Strategies::ClientSpecificRepository { public: /** * Method to reset the repositories (clears number of collisions, (re)starts timer) */ void reset() throw(StrategyException, bad_exception); /** * Destructor */ ~cobra_ClientSpecificRepository() throw(); /** * Constructor */ cobra_ClientSpecificRepository() throw(StrategyException, bad_exception); private: }; } #endif realtimebattle-1.0.8/team-framework/bots/cobra/cobra_factory.cpp0000644000175000017500000000736010227001675023155 0ustar moimoi/************************************************************************ cobra_factory.cpp Copyright: Tino Truppel This file was created on Mon, Dec 13 2004 RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 The original location of this file is cobra **************************************************************************/ #include "cobra_factory.h" #include "cobra_internalserverspecificrepository.h" #include "cobra_sharedserverspecificrepository.h" #include "cobra_clientspecificrepository.h" #include "cobra_server_basicstate.h" #include "cobra_client_basicstate.h" namespace cobra { using RTBGlobal::pvector; cobra_Factory::cobra_Factory() { /* * There is no need for a special registration, just put your code * you want to have to be executed at the beginning here */ } auto_ptr cobra_Factory::createServerStateData (ServerCoordinator* serverCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception) { auto_ptr > states(new pvector()); // trick because of buggy auto_pointer template conversion method cobra_InternalServerSpecificRepository* cobra_ssppointer; auto_ptr cobra_ssp(cobra_ssppointer=new cobra_InternalServerSpecificRepository()); cobra_SharedServerSpecificRepository* cobra_sharedssp(cobra_SharedServerSpecificRepository::Instance()); /** * Insert here the registrations of all your used serverstate: * states->push_back(new cobra_YOUR_SERVER_STATE(serverCoordinator, cobra_ssppointer, cobra_sharedssp)); */ states->push_back(new cobra_ServerBasicState(serverCoordinator, cobra_ssppointer, cobra_sharedssp)); return auto_ptr (new ServerStateData(states, cobra_ssp, cobra_sharedssp)); } auto_ptr cobra_Factory::createClientStateData (ClientCoordinator* clientCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception) { auto_ptr > states(new pvector()); // trick because of buggy auto_pointer template conversion method cobra_ClientSpecificRepository* cobra_csppointer; auto_ptr cobra_csp(cobra_csppointer=new cobra_ClientSpecificRepository()); /** * Insert here the registrations of all your used clientstate: * states->push_back(new cobra_YOUR_CLIENT_STATE(clientCoordinator,cobra_csppointer,gameOptionsRepository)); */ states->push_back(new cobra_ClientBasicState(clientCoordinator,cobra_csppointer,gameOptionsRepository)); return auto_ptr (new ClientStateData(states,cobra_csp)); } string cobra_Factory::getFinishingString() const throw(bad_exception) { // not too long word (saves time by parsing) return "cobra_END"; } } // namespace cobra realtimebattle-1.0.8/team-framework/bots/cobra/cobra_factory.h0000644000175000017500000000524710227001675022624 0ustar moimoi/************************************************************************ cobra_factory.h Copyright: Tino Truppel This file was created on Mon, Dec 13 2004 RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 The original location of this file is cobra **************************************************************************/ #ifndef cobra_FACTORY_H #define cobra_FACTORY_H #include "../../gamecontrol/gamecontrolnamespace.h" #include "../../strategies/strategiesnamespace.h" #include "../../strategies/strategyfactory.h" #include "../../strategies/serverstatedata.h" #include "../../strategies/clientstatedata.h" #include "../../exceptions/strategyexception.h" #include #include "cobra_namespace.h" namespace cobra { using GameControl::ServerCoordinator; using GameControl::ClientCoordinator; using GameControl::GameOptionsRepository; using Strategies::StrategyFactory; using Strategies::ServerStateData; using Strategies::ClientStateData; using Exceptions::StrategyException; using std::auto_ptr; using std::bad_exception; using std::string; using Strategies::StrategyFactory; class cobra_Factory : public Strategies::StrategyFactory { public: cobra_Factory(); auto_ptr createServerStateData (ServerCoordinator* serverCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception); auto_ptr createClientStateData (ClientCoordinator* clientCoordinator, const GameOptionsRepository* gameOptionsRepository) const throw(StrategyException,bad_exception); string getFinishingString() const throw(bad_exception); /** * It is not necessary to add any method in this class. */ }; } #endif //cobra_FACTORY_H realtimebattle-1.0.8/team-framework/bots/cobra/cobra_internalserverspecificrepository.cpp0000644000175000017500000000332710227001675030416 0ustar moimoi/************************************************************************ cobra_internalserverspecificrepository.cpp Copyright: Tino Truppel This file was created on Mon, Dec 13 2004 RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 The original location of this file is cobra **************************************************************************/ #include "cobra_internalserverspecificrepository.h" namespace cobra { /** * Method to reset the repositories (clears position) */ void cobra_InternalServerSpecificRepository::reset() throw() {} /** * Destructor */ cobra_InternalServerSpecificRepository::~cobra_InternalServerSpecificRepository() throw() {} /** * Constructor */ cobra_InternalServerSpecificRepository::cobra_InternalServerSpecificRepository() throw() {}; } realtimebattle-1.0.8/team-framework/bots/cobra/cobra_internalserverspecificrepository.h0000644000175000017500000000402510227001675030057 0ustar moimoi/************************************************************************ cobra_internalserverspecificrepository.h Copyright: Tino Truppel This file was created on Mon, Dec 13 2004 RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 The original location of this file is cobra **************************************************************************/ #ifndef cobra_INTERNALSERVERSPECIFICREPOSITORY #define cobra_INTERNALSERVERSPECIFICREPOSITORY #include "../../strategies/internalserverspecificrepository.h" namespace cobra { /** * Use this Repository for all internal server-stuff. You can implement what you want. */ using Strategies::InternalServerSpecificRepository; class cobra_InternalServerSpecificRepository: public Strategies::InternalServerSpecificRepository { public: /** * Method to reset the repositories (clears position) */ void reset() throw(); /** * Destructor (does nothing) */ ~cobra_InternalServerSpecificRepository() throw(); /** * Constructor */ cobra_InternalServerSpecificRepository() throw(); private: }; } #endif realtimebattle-1.0.8/team-framework/bots/cobra/cobra_namespace.h0000644000175000017500000000304510227001675023103 0ustar moimoi/************************************************************************ cobra_namespace.h Copyright: Tino Truppel This file was created on Mon, Dec 13 2004 RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 The original location of this file is cobra **************************************************************************/ #ifndef cobra_NAMESPACE_H #define cobra_NAMESPACE_H namespace cobra { class cobra_ClientBasicState; class cobra_ServerBasicState; class cobra_ClientSpecificRepository; class cobra_InternalServerSpecificRepository; class cobra_SharedServerSpecificRepository; class cobra_Factory; } #endif realtimebattle-1.0.8/team-framework/bots/cobra/cobra_server_basicstate.cpp0000644000175000017500000001605210321000453025200 0ustar moimoi/************************************************************************ cobra_server_basicstate.cpp Copyright: Tino Truppel This file was created on Mon, Dec 13 2004 RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 The original location of this file is cobra **************************************************************************/ #include #include "cobra_server_basicstate.h" #include "cobra_internalserverspecificrepository.h" #include "cobra_sharedserverspecificrepository.h" #include "../general/teaminfo.h" #include "../../parser/object_type.h" namespace cobra { using General::Position; using Parser::object_type; cobra_ServerBasicState::cobra_ServerBasicState(ServerCoordinator* i, cobra_InternalServerSpecificRepository* cobra_issp, cobra_SharedServerSpecificRepository* cobra_sharedssp) throw (StrategyException,bad_exception): ServerState(i),_robot("cobra") { _cobra_sharedssp = cobra_sharedssp; } cobra_ServerBasicState::~cobra_ServerBasicState () throw() {} /** * This method is called from the coordinator's processReceivedRTBMessages method and should send tips to the clients. */ void cobra_ServerBasicState::sendServerTips () throw (StrategyException,bad_exception) {} /** * This method is called by ServerCoordinatorRevokes::resetGame() */ void cobra_ServerBasicState::reset () throw (bad_exception, StrategyException) { _robot.ID=_cobra_sharedssp->getTeamInfo()->registerRobotForRound(_robot); } /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ void cobra_ServerBasicState::receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception) { if (type == Parser::ROBOT) { Position pos = relativeToAbsolute(_robot.pos, dist, angle+_robot.dirRobot); if (!_cobra_sharedssp->getTeamInfo()->isFriend(pos, 1)) { sendServerTipString("SHOOT"); } else { sendServerTipString("STOPSHOOT"); } } } /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ void cobra_ServerBasicState::receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ void cobra_ServerBasicState::receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception) { _robot.pos.x=x;_robot.pos.y=y; _robot.dirRobot=angle; } /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ void cobra_ServerBasicState::receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * @param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ void cobra_ServerBasicState::receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception) {} // >> Maybe we should introduce another // enum for this (TODO) /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ void cobra_ServerBasicState::receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ void cobra_ServerBasicState::receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ void cobra_ServerBasicState::receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ void cobra_ServerBasicState::receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception) {} /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ void cobra_ServerBasicState::receiveRTBMessageDead() throw (StrategyException, bad_exception) { _robot.isDead=true; } } realtimebattle-1.0.8/team-framework/bots/cobra/cobra_server_basicstate.h0000644000175000017500000001614610321000453024651 0ustar moimoi/************************************************************************ cobra_server_basicstate.h Copyright: Tino Truppel This file was created on Mon, Dec 13 2004 RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 The original location of this file is cobra **************************************************************************/ #ifndef cobra_SERVERBASICSTATE_H #define cobra_SERVERBASICSTATE_H #include "../../strategies/serverstate.h" #include "cobra_namespace.h" #include #include "../general/teaminfo.h" namespace cobra { using Strategies::ServerState; using Exceptions::StrategyException; using std::string; using std::bad_exception; using Parser::object_type; using Parser::warning_type; using GameControl::ServerCoordinator; using std::ostringstream; using General::Position; /** * This class is the base of all cobra server states. Here, the default actions, that will be done by every state * (unless it defines something else) are determined. States, that want to extend and not to entirely replace the action * of this base class, should simply call the corresponding method in this class before executinh their own stuff. * */ class cobra_ServerBasicState: public Strategies::ServerState { public: cobra_ServerBasicState(ServerCoordinator* i, cobra_InternalServerSpecificRepository* cobra_issp, cobra_SharedServerSpecificRepository* cobra_sharedssp) throw (StrategyException,bad_exception); virtual ~cobra_ServerBasicState () throw(); /** * This method is called from the coordinator's processReceivedRTBMessages method and should send tips to the clients. */ virtual void sendServerTips () throw (StrategyException,bad_exception); /** * This method is called by ClientCoordinatorRevokes::resetGame() */ virtual void reset () throw (bad_exception, StrategyException); /** * This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to. * @param dist The distance of the observed object * @param type The type of the observed object * @param angle The angle the observed object is seen at in rad, relative to the robot front */ virtual void receiveRTBMessageRadar(double dist,object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself. * @param time The time that has elapsed since the game had started * @param speed The velocity of the robot * @param cannonAngle The angle the cannon points to */ virtual void receiveRTBMessageInfo(double time,double speed,double cannonAngle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent. * @param x And ... * @param y ... are the sent coordinates * @param angle is the angle the robot front points to */ virtual void receiveRTBMessageCoordinates(double x,double y,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe. * @param energy The unexact energy level of the detected robot * @param isTeamMate Defines whether the robot is a team mate (team mode is not yet implemented in RTB) */ virtual void receiveRTBMessageRobotInfo(double energy,bool isTeamMate) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. * @param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar */ virtual void receiveRTBMessageRotationReached(int what) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot. * @param energy The unexact energy level */ virtual void receiveRTBMessageEnergy(double energy) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed. * @param num The number of remaining robots */ virtual void receiveRTBMessageRobotsLeft(int num) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object, * @param type The type of the hit object * @param angle The angle the collision happened at in rad, relative to the robot front */ virtual void receiveRTBMessageCollision(object_type type,double angle) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem * @param warning The type of the warning * @param message The text of the warning */ virtual void receiveRTBMessageWarning(warning_type warning,const string& message) throw (StrategyException, bad_exception); /** * This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out. */ virtual void receiveRTBMessageDead() throw (StrategyException, bad_exception); private: cobra_SharedServerSpecificRepository* _cobra_sharedssp; General::RobotInfo _robot; // unsigned int _myID; changed to _robot.ID // Position _curPos; changed to _robot.pos // double _ownAngle; changed to _robot.dirRobot }; } #endif realtimebattle-1.0.8/team-framework/bots/cobra/cobra_sharedserverspecificrepository.cpp0000644000175000017500000000532110227001674030043 0ustar moimoi/************************************************************************ cobra_sharedserverspecificrepository.cpp Copyright: Tino Truppel This file was created on Mon, Dec 13 2004 RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 The original location of this file is cobra **************************************************************************/ #include #include "cobra_sharedserverspecificrepository.h" #include "../general/teaminfo.h" #include "../../rtbglobal/masterresourcecontrol.h" namespace cobra { using RTBGlobal::MasterResourceControl; using Exceptions::RTBException; using General::TeamInfo; /** * Method to obtain the one and only object of this class */ cobra_SharedServerSpecificRepository* cobra_SharedServerSpecificRepository::Instance() throw (bad_exception) { cobra_SharedServerSpecificRepository* cobra_sssp (cobra_SharedServerSpecificRepository::_instance.get()); if (cobra_sssp==0) { cobra_SharedServerSpecificRepository::_instance.reset(cobra_sssp=new cobra_SharedServerSpecificRepository()); } return cobra_sssp; } /** * Destructor */ cobra_SharedServerSpecificRepository::~cobra_SharedServerSpecificRepository() throw() {} /** * Constructor */ cobra_SharedServerSpecificRepository::cobra_SharedServerSpecificRepository() throw (StrategyException, bad_exception) {} /* * Access to TeamInfo */ TeamInfo* cobra_SharedServerSpecificRepository::getTeamInfo() throw() { return &_teamInfo; } /** * Method to reset the repositories */ void cobra_SharedServerSpecificRepository::reset() throw (bad_exception) { _teamInfo.resetForNextRound(); } /** * Only instance of this class */ auto_ptr cobra_SharedServerSpecificRepository::_instance(0); } realtimebattle-1.0.8/team-framework/bots/cobra/cobra_sharedserverspecificrepository.h0000644000175000017500000000551310227001675027514 0ustar moimoi/************************************************************************ cobra_sharedserverspecificrepository.h Copyright: Tino Truppel This file was created on Mon, Dec 13 2004 RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 The original location of this file is cobra **************************************************************************/ #ifndef cobra_SHAREDSERVERSPECIFICREPOSITORY #define cobra_SHAREDSERVERSPECIFICREPOSITORY #include "../../strategies/sharedserverspecificrepository.h" #include "../../exceptions/strategyexception.h" #include "../../log/logger.h" #include #include "../general/teaminfo.h" namespace cobra { /** * Use this Repository for all shared-stuff (for all clients and for the server). * You can implement what you want (e.g. a map or something like that). */ using std::auto_ptr; using std::vector; using std::string; using std::out_of_range; using std::bad_exception; using Log::Logger; using General::TeamInfo; using Exceptions::StrategyException; using Strategies::SharedServerSpecificRepository; class cobra_SharedServerSpecificRepository: public Strategies::SharedServerSpecificRepository { public: /** * Method to obtain the one and only object of this class */ static cobra_SharedServerSpecificRepository* Instance() throw (bad_exception); /** * Method to reset the repositories */ void reset() throw (bad_exception); /** * Destructor */ ~cobra_SharedServerSpecificRepository() throw (); /* * Access to TeamInfo */ TeamInfo* getTeamInfo() throw(); private: /** * Only instance of this class */ static auto_ptr _instance; TeamInfo _teamInfo; /** * Constructor */ cobra_SharedServerSpecificRepository()throw (StrategyException, bad_exception); }; } #endif realtimebattle-1.0.8/team-framework/initcomponents.cpp0000644000175000017500000000777610321017104021354 0ustar moimoi/************************************************************************ $Id: initcomponents.cpp,v 1.8 2005/10/05 17:42:17 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: initcomponents.cpp,v $ Revision 1.8 2005/10/05 17:42:17 jonico Integrated Cobra strategy, invented better names for the robots. Revision 1.7 2005/08/08 11:32:27 krolfy Added three Columbus bots (crash with exception) Revision 1.6 2005/04/13 20:31:23 tino_truppel Insert cobra-bot. Revision 1.5 2005/01/06 17:59:18 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "initcomponents.h" #include "io/unixiofactory.h" #include "rtbglobal/masterresourcecontrol.h" #include "log/rtblogdriver.h" #include "log/nulllogdriver.h" #include "log/unixfilelogdriver.h" #include "log/sysloglogdriver.h" #include "bots/brotfrucht/bffactory.h" #include "bots/empty/empty_factory.h" #include "bots/columbus/columbusstrategyfactory.h" #include "bots/cobra/cobra_factory.h" #include /** * This function is responsable for registrating all components of the framework * It is necessary to have such a method because global objects in anonymous namespaces do not initialize in a presumable * order and we got lots of trouble (segfaults, ...). To avoid this, EVERY new pluggable component has to be registered in * this function that is called by the main method * This method can throw any type of exception */ void initComponents() { using RTBGlobal::MasterResourceControl; using std::auto_ptr; using IO::UnixIOFactory; using Log::RTBLogDriver; using Log::UnixFileLogDriver; using Log::NullLogDriver; using Log::SyslogLogDriver; using Brotfrucht::BFFactory; using empty::empty_Factory; using cobra::cobra_Factory; using Columbus::ColumbusStrategyFactory; // first get one instance of the MRC MasterResourceControl* mrc=RTBGlobal::MasterResourceControl::Instance(); // register IO factory mrc->registrateIOFactory(auto_ptr(new UnixIOFactory())); // register rtb logdriver mrc->registrateLogDriverPrototype("RTBLogDriver",auto_ptr(new RTBLogDriver())); // register unix file log driver mrc->registrateLogDriverPrototype("UnixFileLogDriver",auto_ptr(new UnixFileLogDriver())); // register null log driver mrc->registrateLogDriverPrototype("NullLogDriver",auto_ptr(new NullLogDriver())); // register syslog log driver mrc->registrateLogDriverPrototype("SyslogLogDriver",auto_ptr(new SyslogLogDriver())); // register brotfrucht strategy mrc->registrateStrategyFactory("Brotfrucht",auto_ptr(new BFFactory())); // register empty strategy mrc->registrateStrategyFactory("empty",auto_ptr(new empty_Factory())); // register cobra strategy mrc->registrateStrategyFactory("Cobra",auto_ptr(new cobra_Factory())); // register Columbus strategy mrc->registrateStrategyFactory("Columbus",auto_ptr(new ColumbusStrategyFactory())); } realtimebattle-1.0.8/team-framework/initexceptions.cpp0000644000175000017500000000717510263730720021354 0ustar moimoi/************************************************************************ $Id: initexceptions.cpp,v 1.2 2005/01/06 17:59:18 jonico Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: initexceptions.cpp,v $ Revision 1.2 2005/01/06 17:59:18 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include #include #include "rtbglobal/masterresourcecontrol.h" #include /** * NOTE: These file contains the uncaught exception handler and the unexpected exception handler * DO NOT FORGET TO LINK THE CORRESPONDING OBJECT CODE TO THE RTB - BINARY IF YOU WANT PROPER EXCEPTION HANDLING */ namespace { // anonymous namespace, all things in here are solely for exception handling purposes using std::bad_exception; using std::exception; using std::string; using RTBGlobal::MasterResourceControl; class __Extended_bad_exception: public bad_exception { // the origninal bad_exception is not capable of saving information about the unexpected exception, this one solves this issue public: __Extended_bad_exception(const string& ex):reason("bad_exception: "+ex) {}; virtual const char* what() const throw () { return reason.c_str();}; virtual ~__Extended_bad_exception() throw() {}; private: string reason; }; // global unexpected exception handler void rtb_unexpected_exception_handler() throw (bad_exception) { // try to figure out what type of unexpected exception occured try { throw; } catch (std::exception& ex) { // we were able to identify the unexpected exception throw __Extended_bad_exception("An unexpected (identified) exception has appeared: "+string(ex.what())); } catch (...) { throw __Extended_bad_exception(string("An unexpected (unidentified) exception has appeared!")); } } // global uncaught exception handler void rtb_uncaught_exception_handler() throw() { // try to figure out what type of exception occured try { throw; } catch (std::exception& ex) { // we were able to identify the unexpected exception MasterResourceControl::EmergencyLog("An uncaught (identified) exception has appeared: "+string(ex.what())); abort(); } catch (...) { MasterResourceControl::EmergencyLog(string("An uncaught (unidentified) exception has appeared!")); abort(); } } class __RTBHandleSetter { // class to set the exception handler callback methods public: __RTBHandleSetter() { std::set_unexpected(&rtb_unexpected_exception_handler); std::set_terminate(&rtb_uncaught_exception_handler); } ~__RTBHandleSetter() throw() {}; }; __RTBHandleSetter __initialHandleSetter; // tries to set exception handler even before main method will start } realtimebattle-1.0.8/team-framework/main.cpp0000644000175000017500000001112410245131747017224 0ustar moimoi/************************************************************************ $Id: main.cpp,v 1.3 2005/05/12 14:49:46 krolfy Exp $ RTB - Team Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.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 $Log: main.cpp,v $ Revision 1.3 2005/05/12 14:49:46 krolfy Spelling mistake Revision 1.2 2005/01/06 17:59:18 jonico Now all files in the repository have their new header format. **************************************************************************/ #include #include "rtbglobal/rtbinit.h" #include "rtbglobal/masterresourcecontrol.h" #include "log/logger.h" #include "stdnamespace.h" #include #include #include "initcomponents.h" using std::string; using std::exception; using std::auto_ptr; using RTBGlobal::MasterResourceControl; using std::auto_ptr; using Log::Logger; using RTBGlobal::RTBInit; /** * prints out how to invoke this program * @param name: Name of the program */ void usage(const string& name) { MasterResourceControl::EmergencyLog(name+": Robots built with the RTB- Team Framework have to be started with a configuration file as parameter!"); } /** * global start method (very short) * @param argv Takes one argument: path to the configuration file */ int main (int argc, char** argv) throw() { // first find out, if we was invoked with the right parameter if (argc!=2) { usage(*argv); return 1; } // at the very beginning, initialize the pluggable components try { initComponents(); } catch (exception& ex) { MasterResourceControl::EmergencyLog(string("Identified Exception occured in initComponents: ")+ex.what()); return 1; } // first parse config file try { RTBInit::ParseConfigFile(argv[1]); } catch (exception& ex) { MasterResourceControl::EmergencyLog(string("Exception occured in RTBInit::ParseConfigFile: ")+ex.what()); return 1; } // second try to get a real logger to avoid sending messages via EmergencyLog auto_ptr logger(0); try { // we are section main logger=MasterResourceControl::Instance()->createLogger("Main"); } catch (exception& ex) { MasterResourceControl::EmergencyLog("We could not get our logger for section main: "+string(ex.what())); return 1; } try { // try block for exceptions thrown by the logger itself // third send the initial messages to initialize the connection to the RealTime Battle Server try { logger->logMessage(3,"Send initial messages to RTB Server ..."); RTBInit::SendInitialMessages(); logger->logMessage(2,"Finished sending initial messages to RTB Server ..."); MasterResourceControl* mrc= MasterResourceControl::Instance(); logger->logMessage(2,"First sequence in tournament: "+mrc->getRuntimeProperty("Main","FirstSequence")); logger->logMessage(2,"Actual name in this sequence: "+mrc->getRuntimeProperty("Main","ActualName")); logger->logMessage(2,"Actual color in this sequence: "+mrc->getRuntimeProperty("Main","ActualColor")); } catch (exception& ex) { // priority 100 should be high enough logger->logMessage(100,"An exception occured in RTBInit::SendInitialMessages: "+string(ex.what())); return 1; } // last, start the game as client or master server try { logger->logMessage(3,"Start main loop now ..."); bool success=RTBInit::StartGame(); if (success) logger->logMessage(3,"Sequence finished successfully. Shutting down now."); else logger->logMessage(3,"While playing, an unrecoverable error occured. Shutting down now."); return !success; } catch (exception& ex) { // priority 100 should be high enough logger->logMessage(100,"An exception occured in RTBInit::StartGame: "+string(ex.what())); return 1; } } catch (exception& ex) { MasterResourceControl::EmergencyLog("Logger for section main throwed an exception: "+string(ex.what())); return 1; } } realtimebattle-1.0.8/team-framework/createrobot.sh0000755000175000017500000000451710404234035020443 0ustar moimoi#! /bin/sh # Argument one: name of the robot wrapper script in the form --.robot # , and must not contain hyphens, any kind of slashes, the at symbol or the ampersand # Argument two: # must not contain the at symbol, the ampersand or the character "|" # This script will create a file named .robot that assumes that /tmp/.log is the only log file used # Argument three: Template file can contain the following sequences, that will be replaced: # @STRATEGY@, @ROBOTNAME@, @TEAM@, @RTBHOME@ # If the third argument is not present, take the included HERE document configuration template # Will create file called like argument one strategy=`echo "$1" | sed -ne 's/^\([^-\\\/@&]\{1,\}\)-\([^-\\\/@&]\{1,\}\)-\([^-\\\/@&]\{1,\}\)\.robot$/\1/p'` name=`echo "$1" | sed -ne 's/^\([^-\\\/@&]\{1,\}\)-\([^-\\\/@&]\{1,\}\)-\([^-\\\/@&]\{1,\}\)\.robot$/\2/p'` team=`echo "$1" | sed -ne 's/^\([^-\\\/@&]\{1,\}\)-\([^-\\\/@&]\{1,\}\)-\([^-\\\/@&]\{1,\}\)\.robot$/\3/p'` rtbhome=`echo "$2" | sed -ne 's/[&|@]/FAULT/p'` if test ! x$rtbhome = "x"; then echo " contained illegal characters (e. g. &, |, @): $2." exit 1 fi if test -z "$strategy" -o -z "$name" -o -z "$team"; then echo "Robot wrapper script name was not valid (contained hyphens or some kind of slashes, the at symbol or the ampersand or does not follow the scheme --.robot): $1." exit 1 else echo "Should generate wrapper script for robot $name playing in $team with strategy $strategy." fi if test -z "$3"; then #echo "No template file specified, take included HERE document configuration template ..." cat <<__EOF| sed -ne "s/@STRATEGY@/$strategy/g; s/@ROBOTNAME@/$name/g; s/@TEAM@/$team/g; s|@RTBHOME@|$2|g; w $1" #! /bin/sh #mkdir -p /tmp/@TEAM@/ #rm -f "/tmp/@TEAM@/@STRATEGY@-@ROBOTNAME@-@TEAM@.log" exec "@RTBHOME@/rtb-team" "@RTBHOME@/@STRATEGY@-@ROBOTNAME@-@TEAM@.conf" #"@RTBHOME@/rtb-team" "@RTBHOME@/@STRATEGY@-@ROBOTNAME@-@TEAM@.conf" __EOF else if test -f "$3" -a -r "$3" -a -s "$3"; then cat <"$3"| sed -ne "s/@STRATEGY@/$strategy/g; s/@ROBOTNAME@/$name/g; s/@TEAM@/$team/g; s|@RTBHOME@|$2|g; w $1" else echo "Template file $3 was not readable, not existent or is empty." exit 1 fi fi #echo "Wrapper script file generation completed successfully." exit 0 realtimebattle-1.0.8/team-framework/createrobotconf.sh0000755000175000017500000001476110321007067021314 0ustar moimoi#! /bin/sh # Argument one: name of the robot configuration file in the form --.conf # , and must not contain hyphens, any kind of slashes, the at symbol or the ampersand # Argument two: loggging priority, if not set, assume logging priority three # Argument three: Template file can contain the following sequences, that will be replaced: # @STRATEGY@, @ROBOTNAME@, @TEAM@, @LOGPRIO@ # If the third argument is not present, take the included HERE document configuration template # Will create file called like argument one strategy=`echo "$1" | sed -ne 's/^\([^-\\\/@&]\{1,\}\)-\([^-\\\/@&]\{1,\}\)-\([^-\\\/@&]\{1,\}\)\.conf$/\1/p'` name=`echo "$1" | sed -ne 's/^\([^-\\\/@&]\{1,\}\)-\([^-\\\/@&]\{1,\}\)-\([^-\\\/@&]\{1,\}\)\.conf$/\2/p'` team=`echo "$1" | sed -ne 's/^\([^-\\\/@&]\{1,\}\)-\([^-\\\/@&]\{1,\}\)-\([^-\\\/@&]\{1,\}\)\.conf$/\3/p'` if test -z "$strategy" -o -z "$name" -o -z "$team"; then echo "Robot config file name was not valid (contained hyphens or some kind of slashes, the at symbol or the ampersand or does not follow the scheme --.conf): $1." exit 1 else echo "Should generate configfile for robot $name playing in $team with strategy $strategy." fi logprio=`echo "$2" | sed -ne 's/^[0-9]\{1,\}$/&/p'` if test -z "$logprio"; then if test -z "$2"; then echo "Logpriority not specified, assuming value 3." logprio="3" else echo "Logpriority was not a valid number but $2." exit 1 fi fi if test -z "$3"; then #echo "No template file specified, take included HERE document configuration template ..." cat <<__EOF| sed -ne "s/@STRATEGY@/$strategy/g; s/@ROBOTNAME@/$name/g; s/@TEAM@/$team/g; s/@LOGPRIO@/$logprio/g; w $1" [Main] #logDriverName="UnixFileLogDriver" #logDriverParameters="file:/tmp/@TEAM@/@STRATEGY@-@ROBOTNAME@-@TEAM@.log" #logDriverName="SyslogLogDriver" #logDriverParameters="option: LOG_CONS|LOG_PID, ident: Realtimebattle, priority: LOG_INFO" logDriverName="RTBLogDriver" logDriverParameters="logCommand:Print" logPriority="@LOGPRIO@" RotationReachedValue="0" RobotName="@ROBOTNAME@ Strategy: @STRATEGY@ Team: @TEAM@" RobotHomeColour="FFFFFF" RobotAwayColour="FFFFFF" [IO] ReadBufferSize="80000" #DomainSocketName="/tmp/@TEAM@/@STRATEGY@-@TEAM@.socket" DomainSocketName="/tmp/.@STRATEGY@-@TEAM@.socket" #logDriverName="UnixFileLogDriver" #logDriverParameters="file:/tmp/@TEAM@/@STRATEGY@-@ROBOTNAME@-@TEAM@.log" #logDriverName="SyslogLogDriver" #logDriverParameters="option: LOG_CONS|LOG_PID, ident: Realtimebattle, priority: LOG_INFO" logDriverName="RTBLogDriver" logDriverParameters="logCommand:Print" logPriority="@LOGPRIO@" #UseFcntl="false" # enable this for secure mode UseFcntl="true" [UnixServerCommunicator] logPriority="@LOGPRIO@" #logDriverName="UnixFileLogDriver" #logDriverParameters="file:/tmp/@TEAM@/@STRATEGY@-@ROBOTNAME@-@TEAM@.log" logDriverName="RTBLogDriver" logDriverParameters="logCommand:Print" #logDriverName="SyslogLogDriver" #logDriverParameters="option: LOG_CONS|LOG_PID, ident: Realtimebattle, priority: LOG_INFO" [UnixClientCommunicator] #logPriority="@LOGPRIO@" #logDriverName="UnixFileLogDriver" #logDriverParameters="file:/tmp/@TEAM@/@STRATEGY@-@ROBOTNAME@-@TEAM@.log" logDriverName="RTBLogDriver" logDriverParameters="logCommand:Print" #logDriverName="SyslogLogDriver" #logDriverParameters="option: LOG_CONS|LOG_PID, ident: Realtimebattle, priority: LOG_INFO" [ClientCoordinator] #logDriverName="UnixFileLogDriver" #logDriverParameters="file:/tmp/@TEAM@/@STRATEGY@-@ROBOTNAME@-@TEAM@.log" logPriority="@LOGPRIO@" logDriverName="RTBLogDriver" logDriverParameters="logCommand:Print" #logDriverName="SyslogLogDriver" #logDriverParameters="option: LOG_CONS|LOG_PID, ident: Realtimebattle, priority: LOG_INFO" [ServerCoordinator] #logDriverName="UnixFileLogDriver" #logDriverParameters="file:/tmp/@TEAM@/@STRATEGY@-@ROBOTNAME@-@TEAM@.log" logPriority="@LOGPRIO@" logDriverName="RTBLogDriver" logDriverParameters="logCommand:Print" #logDriverName="SyslogLogDriver" #logDriverParameters="option: LOG_CONS|LOG_PID, ident: Realtimebattle, priority: LOG_INFO" [ServerGameController] #logDriverName="UnixFileLogDriver" #logDriverParameters="file:/tmp/@TEAM@/@STRATEGY@-@ROBOTNAME@-@TEAM@.log" logPriority="@LOGPRIO@" logDriverName="RTBLogDriver" logDriverParameters="logCommand:Print" #logDriverName="SyslogLogDriver" #logDriverParameters="option: LOG_CONS|LOG_PID, ident: Realtimebattle, priority: LOG_INFO" [ClientGameController] #logDriverName="UnixFileLogDriver" #logDriverParameters="file:/tmp/@TEAM@/@STRATEGY@-@ROBOTNAME@-@TEAM@.log" logPriority="@LOGPRIO@" logDriverName="RTBLogDriver" logDriverParameters="logCommand:Print" #logDriverName="SyslogLogDriver" #logDriverParameters="option: LOG_CONS|LOG_PID, ident: Realtimebattle, priority: LOG_INFO" [Strategy] StrategyName="@STRATEGY@" [BrotFrucht] # let the robot shot every second ShootInterval="1" [BrotfruchtServer] #logDriverName="UnixFileLogDriver" #logDriverParameters="file:/tmp/@TEAM@/@STRATEGY@-@ROBOTNAME@-@TEAM@.log" logPriority="@LOGPRIO@" logDriverName="RTBLogDriver" logDriverParameters="logCommand:Print" #logDriverName="SyslogLogDriver" #logDriverParameters="option: LOG_CONS|LOG_PID, ident: Realtimebattle, priority: LOG_INFO" [BrotfruchtClient] #logDriverName="UnixFileLogDriver" #logDriverParameters="file:/tmp/@TEAM@/@STRATEGY@-@ROBOTNAME@-@TEAM@.log" logPriority="@LOGPRIO@" logDriverName="RTBLogDriver" logDriverParameters="logCommand:Print" #logDriverName="SyslogLogDriver" #logDriverParameters="option: LOG_CONS|LOG_PID, ident: Realtimebattle, priority: LOG_INFO" [ColumbusServer] #logDriverName="UnixFileLogDriver" #logDriverParameters="file:/tmp/@TEAM@/@STRATEGY@-@ROBOTNAME@-@TEAM@.log" logPriority="@LOGPRIO@" logDriverName="RTBLogDriver" logDriverParameters="logCommand:Print" #logDriverName="SyslogLogDriver" #logDriverParameters="option: LOG_CONS|LOG_PID, ident: Realtimebattle, priority: LOG_INFO" [ColumbusClient] logDriverName="UnixFileLogDriver" logDriverParameters="file:/tmp/@TEAM@/@STRATEGY@-@ROBOTNAME@-@TEAM@.log" logPriority="@LOGPRIO@" logDriverName="RTBLogDriver" logDriverParameters="logCommand:Print" #logDriverName="SyslogLogDriver" #logDriverParameters="option: LOG_CONS|LOG_PID, ident: Realtimebattle, priority: LOG_INFO" __EOF else if test -f "$3" -a -r "$3" -a -s "$3"; then cat <"$3" | sed -ne "s/@STRATEGY@/$strategy/g; s/@ROBOTNAME@/$name/g; s/@TEAM@/$team/g; s/@LOGPRIO@/$logprio/g; w $1" else echo "Template file $3 was not readable, not existent or is empty." exit 1 fi fi #echo "Configuration file generation completed successfully." exit 0 realtimebattle-1.0.8/team-framework/conf/0002755000175000017500000000000010404234032016510 5ustar moimoirealtimebattle-1.0.8/team-framework/conf/Makefile.am0000644000175000017500000000464410321007042020547 0ustar moimoiloggingpriority=10 # because twenty robots will cause a lot of logging messages frameworkdir=$(ROBOTDIR)/rtb-team-framework noinst_SCRIPTS= $(top_srcdir)/createrobot.sh $(top_srcdir)/createrobotconf.sh brotfrucht_confs=\ Brotfrucht-Roggenbrot-Brotteam.conf\ Brotfrucht-Weizenbrot-Brotteam.conf\ Brotfrucht-Mischbrot-Brotteam.conf\ Brotfrucht-Gerstenbrot-Brotteam.conf\ Brotfrucht-Toastbrot-Brotteam.conf\ Brotfrucht-Erdbeere-Fruchtteam.conf\ Brotfrucht-Himbeere-Fruchtteam.conf\ Brotfrucht-Blaubeere-Fruchtteam.conf\ Brotfrucht-Heidelbeere-Fruchtteam.conf\ Brotfrucht-Stachelbeere-Fruchtteam.conf\ Columbus-Cortez-Spain.conf\ Columbus-Vespucci-Spain.conf\ Columbus-Pizarro-Spain.conf\ Columbus-Cabral-Portugal.conf\ Columbus-Zarco-Portugal.conf\ Columbus-Vasco_da_Gama-Portugal.conf\ empty-lamer-TeamLazy.conf\ empty-fool-TeamLazy.conf\ empty-idiot-TeamLazy.conf\ Cobra-Mamba-CobraLike.conf\ Cobra-Cobra-CobraLike.conf\ Cobra-Krait-CobraLike.conf\ Cobra-CoralSnake-CobraLike.conf\ Cobra-TigerSnake-CobraLike.conf\ Cobra-Anaconda-AnacondaLike.conf\ Cobra-Boa-AnacondaLike.conf\ Cobra-Python-AnacondaLike.conf\ Cobra-Viper-AnacondaLike.conf\ Cobra-Adder-AnacondaLike.conf CLEANFILES=$(brotfrucht_confs) $(robot_SCRIPTS) framework_DATA=$(brotfrucht_confs) robotdir=$(ROBOTDIR) robot_SCRIPTS=\ Brotfrucht-Roggenbrot-Brotteam.robot\ Brotfrucht-Weizenbrot-Brotteam.robot\ Brotfrucht-Mischbrot-Brotteam.robot\ Brotfrucht-Gerstenbrot-Brotteam.robot\ Brotfrucht-Toastbrot-Brotteam.robot\ Brotfrucht-Erdbeere-Fruchtteam.robot\ Brotfrucht-Himbeere-Fruchtteam.robot\ Brotfrucht-Blaubeere-Fruchtteam.robot\ Brotfrucht-Heidelbeere-Fruchtteam.robot\ Brotfrucht-Stachelbeere-Fruchtteam.robot\ Columbus-Cortez-Spain.robot\ Columbus-Vespucci-Spain.robot\ Columbus-Pizarro-Spain.robot\ Columbus-Cabral-Portugal.robot\ Columbus-Zarco-Portugal.robot\ Columbus-Vasco_da_Gama-Portugal.robot\ empty-lamer-TeamLazy.robot\ empty-fool-TeamLazy.robot\ empty-idiot-TeamLazy.robot\ Cobra-Mamba-CobraLike.robot\ Cobra-Cobra-CobraLike.robot\ Cobra-Krait-CobraLike.robot\ Cobra-CoralSnake-CobraLike.robot\ Cobra-TigerSnake-CobraLike.robot\ Cobra-Anaconda-AnacondaLike.robot\ Cobra-Boa-AnacondaLike.robot\ Cobra-Python-AnacondaLike.robot\ Cobra-Viper-AnacondaLike.robot\ Cobra-Adder-AnacondaLike.robot %.robot: $(top_srcdir)/createrobot.sh "$(top_srcdir)/createrobot.sh" "$@" "$(frameworkdir)" %.conf: $(top_srcdir)/createrobotconf.sh "$(top_srcdir)/createrobotconf.sh" "$@" $(loggingpriority) realtimebattle-1.0.8/team-framework/conf/Makefile.in0000644000175000017500000003051610324165325020571 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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 = : subdir = conf DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/buildinternal/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/buildinternal/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(robotdir)" "$(DESTDIR)$(frameworkdir)" robotSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(noinst_SCRIPTS) $(robot_SCRIPTS) SOURCES = DIST_SOURCES = 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|^.*/||'`; frameworkDATA_INSTALL = $(INSTALL_DATA) DATA = $(framework_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ 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@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ 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@ loggingpriority = 10 # because twenty robots will cause a lot of logging messages frameworkdir = $(ROBOTDIR)/rtb-team-framework noinst_SCRIPTS = $(top_srcdir)/createrobot.sh $(top_srcdir)/createrobotconf.sh brotfrucht_confs = \ Brotfrucht-Roggenbrot-Brotteam.conf\ Brotfrucht-Weizenbrot-Brotteam.conf\ Brotfrucht-Mischbrot-Brotteam.conf\ Brotfrucht-Gerstenbrot-Brotteam.conf\ Brotfrucht-Toastbrot-Brotteam.conf\ Brotfrucht-Erdbeere-Fruchtteam.conf\ Brotfrucht-Himbeere-Fruchtteam.conf\ Brotfrucht-Blaubeere-Fruchtteam.conf\ Brotfrucht-Heidelbeere-Fruchtteam.conf\ Brotfrucht-Stachelbeere-Fruchtteam.conf\ Columbus-Cortez-Spain.conf\ Columbus-Vespucci-Spain.conf\ Columbus-Pizarro-Spain.conf\ Columbus-Cabral-Portugal.conf\ Columbus-Zarco-Portugal.conf\ Columbus-Vasco_da_Gama-Portugal.conf\ empty-lamer-TeamLazy.conf\ empty-fool-TeamLazy.conf\ empty-idiot-TeamLazy.conf\ Cobra-Mamba-CobraLike.conf\ Cobra-Cobra-CobraLike.conf\ Cobra-Krait-CobraLike.conf\ Cobra-CoralSnake-CobraLike.conf\ Cobra-TigerSnake-CobraLike.conf\ Cobra-Anaconda-AnacondaLike.conf\ Cobra-Boa-AnacondaLike.conf\ Cobra-Python-AnacondaLike.conf\ Cobra-Viper-AnacondaLike.conf\ Cobra-Adder-AnacondaLike.conf CLEANFILES = $(brotfrucht_confs) $(robot_SCRIPTS) framework_DATA = $(brotfrucht_confs) robotdir = $(ROBOTDIR) robot_SCRIPTS = \ Brotfrucht-Roggenbrot-Brotteam.robot\ Brotfrucht-Weizenbrot-Brotteam.robot\ Brotfrucht-Mischbrot-Brotteam.robot\ Brotfrucht-Gerstenbrot-Brotteam.robot\ Brotfrucht-Toastbrot-Brotteam.robot\ Brotfrucht-Erdbeere-Fruchtteam.robot\ Brotfrucht-Himbeere-Fruchtteam.robot\ Brotfrucht-Blaubeere-Fruchtteam.robot\ Brotfrucht-Heidelbeere-Fruchtteam.robot\ Brotfrucht-Stachelbeere-Fruchtteam.robot\ Columbus-Cortez-Spain.robot\ Columbus-Vespucci-Spain.robot\ Columbus-Pizarro-Spain.robot\ Columbus-Cabral-Portugal.robot\ Columbus-Zarco-Portugal.robot\ Columbus-Vasco_da_Gama-Portugal.robot\ empty-lamer-TeamLazy.robot\ empty-fool-TeamLazy.robot\ empty-idiot-TeamLazy.robot\ Cobra-Mamba-CobraLike.robot\ Cobra-Cobra-CobraLike.robot\ Cobra-Krait-CobraLike.robot\ Cobra-CoralSnake-CobraLike.robot\ Cobra-TigerSnake-CobraLike.robot\ Cobra-Anaconda-AnacondaLike.robot\ Cobra-Boa-AnacondaLike.robot\ Cobra-Python-AnacondaLike.robot\ Cobra-Viper-AnacondaLike.robot\ Cobra-Adder-AnacondaLike.robot all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 conf/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu conf/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-robotSCRIPTS: $(robot_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(robotdir)" || $(mkdir_p) "$(DESTDIR)$(robotdir)" @list='$(robot_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)'`; \ echo " $(robotSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(robotdir)/$$f'"; \ $(robotSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(robotdir)/$$f"; \ else :; fi; \ done uninstall-robotSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(robot_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(robotdir)/$$f'"; \ rm -f "$(DESTDIR)$(robotdir)/$$f"; \ done uninstall-info-am: install-frameworkDATA: $(framework_DATA) @$(NORMAL_INSTALL) test -z "$(frameworkdir)" || $(mkdir_p) "$(DESTDIR)$(frameworkdir)" @list='$(framework_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(frameworkDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(frameworkdir)/$$f'"; \ $(frameworkDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(frameworkdir)/$$f"; \ done uninstall-frameworkDATA: @$(NORMAL_UNINSTALL) @list='$(framework_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(frameworkdir)/$$f'"; \ rm -f "$(DESTDIR)$(frameworkdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(robotdir)" "$(DESTDIR)$(frameworkdir)"; 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: -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." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-frameworkDATA install-robotSCRIPTS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-frameworkDATA uninstall-info-am \ uninstall-robotSCRIPTS .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-frameworkDATA install-info \ install-info-am install-man install-robotSCRIPTS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-frameworkDATA \ uninstall-info-am uninstall-robotSCRIPTS %.robot: $(top_srcdir)/createrobot.sh "$(top_srcdir)/createrobot.sh" "$@" "$(frameworkdir)" %.conf: $(top_srcdir)/createrobotconf.sh "$(top_srcdir)/createrobotconf.sh" "$@" $(loggingpriority) # 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: realtimebattle-1.0.8/Documentation/0002755000175000017500000000000010404234032015453 5ustar moimoirealtimebattle-1.0.8/Documentation/Makefile.am0000644000175000017500000001225210323200255017507 0ustar moimoiSUBDIRS = French German Spanish docsdir = $(DOCS_DIR) docs_DATA = \ RealTimeBattle-1.html RealTimeBattle-2.html RealTimeBattle-3.html \ RealTimeBattle-4.html RealTimeBattle-5.html RealTimeBattle-6.html \ RealTimeBattle.html next.gif prev.gif toc.gif next.png prev.png toc.png RealTimeBattle.dvi RealTimeBattle.sgml RealTimeBattle.txt \ ../README\ ../COPYING\ ../AUTHORS\ ../ChangeLog\ ../INSTALL\ ../NEWS\ ../TODO\ ../ABOUT-NLS\ RTB-Team-Framework-Tutorial.tar.gz\ ../EXTRAROBOTS.README rtbinfodir = $(infodir) rtbinfo_DATA = RealTimeBattle.info EXTRA_DIST = $(docs_DATA) $(rtbinfo_DATA) install-data-hook: gzip -f $(rtbinfodir)/RealTimeBattle.info; \ if test "x$(INSTALL_INFO)" != "xno"; then \ $(INSTALL_INFO) \ --description="RealTimeBattle: A robot programming game" \ --menuentry="* RealTimeBattle: (RealTimeBattle). A robot programming game" \ --section "Games" \ --info-dir=$(rtbinfodir) \ $(rtbinfodir)/RealTimeBattle.info.gz; \ fi || echo -e "\n\n** Info installation failed, please add the entry to dir by hand **\n\n" uninstall-hook: if test "x$(INSTALL_INFO)" != "xno"; then \ $(INSTALL_INFO) --remove \ --info-dir=$(rtbinfodir) $(rtbinfodir)/RealTimeBattle.info.gz; \ fi || echo -e "\n\n** Info uninstallation failed, please remove the entry from dir by hand **\n\n"; \ rm -f $(rtbinfodir)/RealTimeBattle.info.gz; \ rmdir $(rtbinfodir); \ rmdir $(DOCS_DIR) || true PAPER_SIZE = a4 all: docs docs: RealTimeBattle-1.html RealTimeBattle-2.html RealTimeBattle-3.html \ RealTimeBattle-4.html RealTimeBattle-5.html RealTimeBattle-6.html \ RealTimeBattle.html RealTimeBattle.dvi RealTimeBattle.info RealTimeBattle.txt html_docs: RealTimeBattle-1.html RealTimeBattle-2.html RealTimeBattle-3.html \ RealTimeBattle-4.html RealTimeBattle-5.html RealTimeBattle-6.html \ RealTimeBattle.html # Targets to generate the files if the sgml source exists, otherwise nothing happens if SGML2HTML %.html: %.sgml @if [ -f $< ]; then \ echo "sgml2html --split=0 -c latin $<"; \ sgml2html --split=0 -c latin $<; \ fi else %.html: %.sgml @echo "Warning: $< cannot be generated, sgml2html is missing."; \ touch $@ endif # elif [ ! -f $@ ]; then \ # echo "Error: $@ is missing and cannot be generated"; \ # fi if SGML2HTML RealTimeBattle%.html: RealTimeBattle.sgml @if [ -f $< ]; then \ echo "sgml2html --imagebuttons -D table=real -c latin $<"; \ sgml2html --imagebuttons -D table=real -c latin $<; \ elif [ ! -f $@ ]; then \ echo "Error: $@ is missing and cannot be generated"; \ fi else RealTimeBattle%.html: RealTimeBattle.sgml @echo "Warning: $@ cannot be generated, sgml2html is missing."; \ touch $@ endif if SGML2LATEX %.dvi: %.sgml @if [ -f $< ]; then \ echo "sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o dvi $<"; \ sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o dvi $<; \ elif [ ! -f $@ ]; then \ echo "Error: $@ is missing and cannot be generated"; \ fi else %dvi: %.sgml @echo "Warning: $@ cannot be generated, sgml2latex is missing."; \ touch $@ endif if SGML2LATEX %.ps: %.sgml @if [ -f $< ]; then \ echo "sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o ps $<"; \ sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o ps $<; \ elif [ ! -f $@ ]; then \ echo "Error: $@ is missing and cannot be generated"; \ fi else %.ps: %.sgml @echo "Warning: $@ cannot be generated, sgml2latex is missing."; \ touch $@ endif if SGML2INFO %.info: %.sgml @if [ -f $< ]; then \ echo "sgml2info -D table=char -c latin $<"; \ sgml2info -D table=char -c latin $<; \ elif [ ! -f $@ ]; then \ echo "Error: $@ is missing and cannot be generated"; \ fi else %.info: %.sgml @echo "Warning: $@ cannot be generated, sgml2info is missing."; \ touch $@ endif if SGML2RTF %.rtf: %.sgml @if [ -f $< ]; then \ echo "sgml2rtf -D table=real -c latin $<"; \ sgml2rtf -D table=real -c latin $<; \ elif [ ! -f $@ ]; then \ echo "Error: $@ is missing and cannot be generated"; \ fi else %.rtf: %.sgml @echo "Warning: $@ cannot be generated, sgml2rtf is missing."; \ touch $@ endif if SGML2LYX %.lyx: %.sgml @if [ -f $< ]; then \ echo "sgml2lyx -D table=real -c latin $<"; \ sgml2lyx -D table=real -c latin $<; \ elif [ ! -f $@ ]; then \ echo "Error: $@ is missing and cannot be generated"; \ fi else %.lyx: %.sgml @echo "Warning: $@ cannot be generated, sgml2lyx is missing."; \ touch $@ endif if SGML2TXT %.txt: %.sgml @if [ -f $< ]; then \ echo "sgml2txt --filter -D table=char -c latin $<"; \ sgml2txt --filter -D table=char -c latin $<; \ fi else %.txt: %.sgml @echo "Warning: $@ cannot be generated, sgml2txt is missing."; \ touch $@ endif if SGML2TXT ../%: %.sgml @if [ -f $< ]; then \ echo "sgml2txt --filter -D table=char -c latin $<"; \ sgml2txt --filter -D table=char -c latin $<; \ echo "mv $(subst ../$(subst ../,,$@),$(subst ../,,$@).txt,$@) $@"; \ mv $(subst ../$(subst ../,,$@),$(subst ../,,$@).txt,$@) $@; \ elif [ ! -f $@ ]; then \ echo "Error: $@ is missing and cannot be generated"; \ fi else ../%: %.sgml @echo "Warning: $@ cannot be generated, sgml2txt is missing."; \ touch $@ endif #Just to allow for non-existing .sgml-file %.sgml: @true realtimebattle-1.0.8/Documentation/Makefile.in0000644000175000017500000006170010324167707017541 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = Documentation DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = 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|^.*/||'`; am__installdirs = "$(DESTDIR)$(docsdir)" "$(DESTDIR)$(rtbinfodir)" docsDATA_INSTALL = $(INSTALL_DATA) rtbinfoDATA_INSTALL = $(INSTALL_DATA) DATA = $(docs_DATA) $(rtbinfo_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ SUBDIRS = French German Spanish docsdir = $(DOCS_DIR) docs_DATA = \ RealTimeBattle-1.html RealTimeBattle-2.html RealTimeBattle-3.html \ RealTimeBattle-4.html RealTimeBattle-5.html RealTimeBattle-6.html \ RealTimeBattle.html next.gif prev.gif toc.gif next.png prev.png toc.png RealTimeBattle.dvi RealTimeBattle.sgml RealTimeBattle.txt \ ../README\ ../COPYING\ ../AUTHORS\ ../ChangeLog\ ../INSTALL\ ../NEWS\ ../TODO\ ../ABOUT-NLS\ RTB-Team-Framework-Tutorial.tar.gz\ ../EXTRAROBOTS.README rtbinfodir = $(infodir) rtbinfo_DATA = RealTimeBattle.info EXTRA_DIST = $(docs_DATA) $(rtbinfo_DATA) PAPER_SIZE = a4 all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Documentation/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Documentation/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-docsDATA: $(docs_DATA) @$(NORMAL_INSTALL) test -z "$(docsdir)" || $(mkdir_p) "$(DESTDIR)$(docsdir)" @list='$(docs_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(docsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docsdir)/$$f'"; \ $(docsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docsdir)/$$f"; \ done uninstall-docsDATA: @$(NORMAL_UNINSTALL) @list='$(docs_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(docsdir)/$$f'"; \ rm -f "$(DESTDIR)$(docsdir)/$$f"; \ done install-rtbinfoDATA: $(rtbinfo_DATA) @$(NORMAL_INSTALL) test -z "$(rtbinfodir)" || $(mkdir_p) "$(DESTDIR)$(rtbinfodir)" @list='$(rtbinfo_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(rtbinfoDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(rtbinfodir)/$$f'"; \ $(rtbinfoDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(rtbinfodir)/$$f"; \ done uninstall-rtbinfoDATA: @$(NORMAL_UNINSTALL) @list='$(rtbinfo_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(rtbinfodir)/$$f'"; \ rm -f "$(DESTDIR)$(rtbinfodir)/$$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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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) $(mkdir_p) $(distdir)/.. @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 check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(docsdir)" "$(DESTDIR)$(rtbinfodir)"; 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) 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 mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-docsDATA install-rtbinfoDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-docsDATA uninstall-info-am \ uninstall-rtbinfoDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-recursive ctags ctags-recursive \ distclean distclean-generic distclean-recursive distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-data-hook \ install-docsDATA install-exec install-exec-am install-info \ install-info-am install-man install-rtbinfoDATA install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-docsDATA uninstall-hook \ uninstall-info-am uninstall-rtbinfoDATA install-data-hook: gzip -f $(rtbinfodir)/RealTimeBattle.info; \ if test "x$(INSTALL_INFO)" != "xno"; then \ $(INSTALL_INFO) \ --description="RealTimeBattle: A robot programming game" \ --menuentry="* RealTimeBattle: (RealTimeBattle). A robot programming game" \ --section "Games" \ --info-dir=$(rtbinfodir) \ $(rtbinfodir)/RealTimeBattle.info.gz; \ fi || echo -e "\n\n** Info installation failed, please add the entry to dir by hand **\n\n" uninstall-hook: if test "x$(INSTALL_INFO)" != "xno"; then \ $(INSTALL_INFO) --remove \ --info-dir=$(rtbinfodir) $(rtbinfodir)/RealTimeBattle.info.gz; \ fi || echo -e "\n\n** Info uninstallation failed, please remove the entry from dir by hand **\n\n"; \ rm -f $(rtbinfodir)/RealTimeBattle.info.gz; \ rmdir $(rtbinfodir); \ rmdir $(DOCS_DIR) || true all: docs docs: RealTimeBattle-1.html RealTimeBattle-2.html RealTimeBattle-3.html \ RealTimeBattle-4.html RealTimeBattle-5.html RealTimeBattle-6.html \ RealTimeBattle.html RealTimeBattle.dvi RealTimeBattle.info RealTimeBattle.txt html_docs: RealTimeBattle-1.html RealTimeBattle-2.html RealTimeBattle-3.html \ RealTimeBattle-4.html RealTimeBattle-5.html RealTimeBattle-6.html \ RealTimeBattle.html # Targets to generate the files if the sgml source exists, otherwise nothing happens @SGML2HTML_TRUE@%.html: %.sgml @SGML2HTML_TRUE@ @if [ -f $< ]; then \ @SGML2HTML_TRUE@ echo "sgml2html --split=0 -c latin $<"; \ @SGML2HTML_TRUE@ sgml2html --split=0 -c latin $<; \ @SGML2HTML_TRUE@ fi @SGML2HTML_FALSE@%.html: %.sgml @SGML2HTML_FALSE@ @echo "Warning: $< cannot be generated, sgml2html is missing."; \ @SGML2HTML_FALSE@ touch $@ # elif [ ! -f $@ ]; then \ # echo "Error: $@ is missing and cannot be generated"; \ # fi @SGML2HTML_TRUE@RealTimeBattle%.html: RealTimeBattle.sgml @SGML2HTML_TRUE@ @if [ -f $< ]; then \ @SGML2HTML_TRUE@ echo "sgml2html --imagebuttons -D table=real -c latin $<"; \ @SGML2HTML_TRUE@ sgml2html --imagebuttons -D table=real -c latin $<; \ @SGML2HTML_TRUE@ elif [ ! -f $@ ]; then \ @SGML2HTML_TRUE@ echo "Error: $@ is missing and cannot be generated"; \ @SGML2HTML_TRUE@ fi @SGML2HTML_FALSE@RealTimeBattle%.html: RealTimeBattle.sgml @SGML2HTML_FALSE@ @echo "Warning: $@ cannot be generated, sgml2html is missing."; \ @SGML2HTML_FALSE@ touch $@ @SGML2LATEX_TRUE@%.dvi: %.sgml @SGML2LATEX_TRUE@ @if [ -f $< ]; then \ @SGML2LATEX_TRUE@ echo "sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o dvi $<"; \ @SGML2LATEX_TRUE@ sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o dvi $<; \ @SGML2LATEX_TRUE@ elif [ ! -f $@ ]; then \ @SGML2LATEX_TRUE@ echo "Error: $@ is missing and cannot be generated"; \ @SGML2LATEX_TRUE@ fi @SGML2LATEX_FALSE@%dvi: %.sgml @SGML2LATEX_FALSE@ @echo "Warning: $@ cannot be generated, sgml2latex is missing."; \ @SGML2LATEX_FALSE@ touch $@ @SGML2LATEX_TRUE@%.ps: %.sgml @SGML2LATEX_TRUE@ @if [ -f $< ]; then \ @SGML2LATEX_TRUE@ echo "sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o ps $<"; \ @SGML2LATEX_TRUE@ sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o ps $<; \ @SGML2LATEX_TRUE@ elif [ ! -f $@ ]; then \ @SGML2LATEX_TRUE@ echo "Error: $@ is missing and cannot be generated"; \ @SGML2LATEX_TRUE@ fi @SGML2LATEX_FALSE@%.ps: %.sgml @SGML2LATEX_FALSE@ @echo "Warning: $@ cannot be generated, sgml2latex is missing."; \ @SGML2LATEX_FALSE@ touch $@ @SGML2INFO_TRUE@%.info: %.sgml @SGML2INFO_TRUE@ @if [ -f $< ]; then \ @SGML2INFO_TRUE@ echo "sgml2info -D table=char -c latin $<"; \ @SGML2INFO_TRUE@ sgml2info -D table=char -c latin $<; \ @SGML2INFO_TRUE@ elif [ ! -f $@ ]; then \ @SGML2INFO_TRUE@ echo "Error: $@ is missing and cannot be generated"; \ @SGML2INFO_TRUE@ fi @SGML2INFO_FALSE@%.info: %.sgml @SGML2INFO_FALSE@ @echo "Warning: $@ cannot be generated, sgml2info is missing."; \ @SGML2INFO_FALSE@ touch $@ @SGML2RTF_TRUE@%.rtf: %.sgml @SGML2RTF_TRUE@ @if [ -f $< ]; then \ @SGML2RTF_TRUE@ echo "sgml2rtf -D table=real -c latin $<"; \ @SGML2RTF_TRUE@ sgml2rtf -D table=real -c latin $<; \ @SGML2RTF_TRUE@ elif [ ! -f $@ ]; then \ @SGML2RTF_TRUE@ echo "Error: $@ is missing and cannot be generated"; \ @SGML2RTF_TRUE@ fi @SGML2RTF_FALSE@%.rtf: %.sgml @SGML2RTF_FALSE@ @echo "Warning: $@ cannot be generated, sgml2rtf is missing."; \ @SGML2RTF_FALSE@ touch $@ @SGML2LYX_TRUE@%.lyx: %.sgml @SGML2LYX_TRUE@ @if [ -f $< ]; then \ @SGML2LYX_TRUE@ echo "sgml2lyx -D table=real -c latin $<"; \ @SGML2LYX_TRUE@ sgml2lyx -D table=real -c latin $<; \ @SGML2LYX_TRUE@ elif [ ! -f $@ ]; then \ @SGML2LYX_TRUE@ echo "Error: $@ is missing and cannot be generated"; \ @SGML2LYX_TRUE@ fi @SGML2LYX_FALSE@%.lyx: %.sgml @SGML2LYX_FALSE@ @echo "Warning: $@ cannot be generated, sgml2lyx is missing."; \ @SGML2LYX_FALSE@ touch $@ @SGML2TXT_TRUE@%.txt: %.sgml @SGML2TXT_TRUE@ @if [ -f $< ]; then \ @SGML2TXT_TRUE@ echo "sgml2txt --filter -D table=char -c latin $<"; \ @SGML2TXT_TRUE@ sgml2txt --filter -D table=char -c latin $<; \ @SGML2TXT_TRUE@ fi @SGML2TXT_FALSE@%.txt: %.sgml @SGML2TXT_FALSE@ @echo "Warning: $@ cannot be generated, sgml2txt is missing."; \ @SGML2TXT_FALSE@ touch $@ @SGML2TXT_TRUE@../%: %.sgml @SGML2TXT_TRUE@ @if [ -f $< ]; then \ @SGML2TXT_TRUE@ echo "sgml2txt --filter -D table=char -c latin $<"; \ @SGML2TXT_TRUE@ sgml2txt --filter -D table=char -c latin $<; \ @SGML2TXT_TRUE@ echo "mv $(subst ../$(subst ../,,$@),$(subst ../,,$@).txt,$@) $@"; \ @SGML2TXT_TRUE@ mv $(subst ../$(subst ../,,$@),$(subst ../,,$@).txt,$@) $@; \ @SGML2TXT_TRUE@ elif [ ! -f $@ ]; then \ @SGML2TXT_TRUE@ echo "Error: $@ is missing and cannot be generated"; \ @SGML2TXT_TRUE@ fi @SGML2TXT_FALSE@../%: %.sgml @SGML2TXT_FALSE@ @echo "Warning: $@ cannot be generated, sgml2txt is missing."; \ @SGML2TXT_FALSE@ touch $@ #Just to allow for non-existing .sgml-file %.sgml: @true # 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: realtimebattle-1.0.8/Documentation/RealTimeBattle-1.html0000644000175000017500000001400510320527640021342 0ustar moimoi RealTimeBattle User Manual, version 1.0.8: Introduction Next Previous Contents

1. Introduction

This is the user manual for RealTimeBattle. Here you should find how to run the program, how the program works, how to create your own robots and how to construct arenas.

RealTimeBattle is a programming game for Unix, in which robots controlled by programs are fighting each other. The goal is to destroy the enemies, using the radar to examine the environment and the cannon to shoot.

Even though the environment the robots are moving in is fairly simple, it is far from easy to construct an intelligent robot-program. RealTimeBattle is constructed to be easy to use, flexible and fast. The intention is that the program could be used as a test for intelligent algorithms, as well as just a game to play and enjoy.

Features include:

  • Game progresses in real time, with the robot programs running as child processes to RealTimeBattle.
  • The robots communicate with the main program using the standard input and output.
  • Robots can be constructed in almost any programming language.
  • Up to 120 robots can compete simultaneously.
  • A simple messaging language is used for communication, which makes easy to start constructing robots.
  • Robots behave like real physical object.
  • You can create your own arenas.
  • Highly configurable.
  • Possibility to plug in external clients.
  • Basic team support directly integrated in the game, sophisticated team play available due to team frameworks.

1.1 More information

More information can be found in the INSTALL, AUTHORS, BUGS, TODO, README, FAQ and ChangeLog files in the distribution. More updated information is available on the RealTimeBattle homepage, where you can also find robots, news on tournaments as well as this manual in different formats.

1.2 Requirements

The hardware requirements are very much dependent on what you do. Running a few robots should be possible to do on any computer on which GNU/Linux or any other Unixes can be run. The demand on hardware will, however, grow with the number of robots you want on the battlefield simultaneously; running 120 advanced robots is certainly demanding for any personal computer.

RealTimeBattle is only available on Unix. It is developed on a Linux-machine, but it should compile on other Unix dialects too. Running in competition-mode is currently only possible on Linux with the '/proc'-directory enabled, because of the need to get the cpu usage of child processes.

The only software requirement is gtk+, which is used for the graphical user interface.

1.3 Background

The project started in August 1998. Inspiration came from RobotBattle, a very interesting game we used to enjoy some years earlier. That version of RobotBattle, however, had some drawbacks: It was only available on Windows and the robots were written in an own language, which restricts the possibilities to write intelligent robots. RobotBattle has since then been under development, but it still lack support for other operative systems.

We therefore decided to construct a Unix robot programming game, which makes use of features of a modern OS.

1.4 License

RealTimeBattle is distributed under the GNU General Public License, in the spirit of the Linux community. Official versions of RealTimeBattle will be released by the authors.

Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony, see the AUTHORS file for further developers.

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.

1.5 Bug reports

If you find anything in this package which doesn't work, appears strange, is missing, is spellt wrong or is just confusing, don't hesitate to send in a bug report to the Sourceforge Bug Tracker.


Next Previous Contents realtimebattle-1.0.8/Documentation/RealTimeBattle-2.html0000644000175000017500000004347710320527640021362 0ustar moimoi RealTimeBattle User Manual, version 1.0.8: Usage Next Previous Contents

2. Usage

This chapter describes how to use the program itself. If you find it boring to read it through, feel free to use trial and error as usual, and return here if you stumble upon something confusing in the user interface. It is, however, a good idea to read the short section on command line options below. Note also that there is no built-in help in the program - here is where you should search for help.

2.1 Command line options

On the command line, there are two options to set which control the overall behaviour of RealTimeBattle. Here you can choose the option file, which determines the default values of the options. You can also select in which game-mode the program will run: debug, normal or competition mode.


 Usage: RealTimeBattle [options] 

 Options:
    --debug_mode,                -d   debug mode
    --debug_level [0-5],         -D   sets the initial debug level. implies -d
    --normal_mode,               -n   normal mode (default)
    --competition_mode,          -c   competition mode

    --no_graphics,               -g   no graphics will be displayed
    --option_file [file],        -o   selects option-file (default: $HOME/.rtbrc)

    --log_file [file],           -l   make log file, if 'file' is '-'
                                      the log is sent to STDOUT

    --tournament_file [file],    -t   specify a tournament file to
                                      autostart a tournament

    --statistics_file [file],    -s   file to print the statistics to
                                       when autostarting

    --message_file [file],       -m   redirect messages to 'file'.
                                      '-' as 'file' is equivalent to STDOUT.
                                      If both log and messages are send
                                      to STDOUT, '-m' will be ignored

    --replay [file]              -r   a log file to replay.
                                      if '-' is specified as file,
                                      input is taken from STDIN

    --help,                      -h   prints this message
    --version,                   -v   prints the version number
    --port_number                -p   specifies the port for remote clients (default is 32134)  

The port_number option is only available, if you chose to compile RealTimeBattle with the --enable-network option. See the INSTALL file for more information. The differences between the three competition modes are shown in the following table


Mode Debug Normal Competition
Debug command available Yes No No
Pause in game Yes Yes No
Step through game Yes No No
Robot CPU time unlimited Yes Yes No

2.2 Control window

New tournament:

This will start a new tournament. Section Start new tournament window will give more information.

Replay tournament:

Replay a game. It will ask you to select a log file of the game you want to study.

Pause:

Pauses the game, in competition-mode the pausing will be postponed until the end of the current game.

End:

Stops the current tournament.

Options:

Brings up the options window.

Statistics:

Displays the statistics window.

Show arena window:

This box can be used to show and hide the three windows used when a game is running, i.e., the arena window, the score window and the message window.

Quit:

Terminates the program.

In debug-mode there is another set of buttons available. They are intended to help with debugging of robots. Note that you can debug a running process; if you use gdb the command is gdb robot-name process-number.

Step:

In a paused game this will move one time step forward. This is very useful when running the robot in a debugger, since otherwise the robot will be flooded with messages.

End game:

This will finish the current game. It has the same effect as a timeout would have.

Kill marked robot:

In debug-mode, you can mark a robot in the score window. That robot will die if you press this button.

Debug level:

Changing debug level is a way of telling robots which messages they should send. The range is between 0 and 5, where 0 means no debugging and 5 is the highest level of debugging, i.e. all debug-messages should be send.

When you are replaying a logfile (not from stdout) there are a number of widgets to control the replaying. See further in the chapter about replaying.

2.3 Start new tournament window

To select robots and arenas for the tournament, mark the files to the right and press the add button. Selected files are shown to the left and can be removed correspondingly.

A tournament consists of a number of sequences of games. In each sequence the same robots are playing in all games. Here you select the number of games and sequences as well as the number of robots in each sequence. If you intend to play with all robots every game you are advised to choose only one sequence and instead increase the number of games. The reason is to avoid restarting of the robot processes which can take a while, especially if the number of robots is large.

It is also possible to load a tournament file or save the current tournament. The last tournament played is stored in /tmp/rtb/tmp.tour and is always displayed when this window opens. If it is not available an empty tournament is displayed.

You have to select at least two robots and one arena to be able to start.

2.4 Robots and arena directories

In order for the program to find the robots and arenas you have set two options Robot search path and Arena search path. The subdirectories Robots and Arenas in the rtb installl directory (default: /usr/local/games/RealTimeBattle), specified at compile-time in the main Makefile, are always searched, regardless of the options, but if you create a new directory, or if you installed RealTimeBattle in some other directory, you need to set these options.

2.5 Arena window

This is where the battle takes place. If you want a more detailed view, use the zoom buttons or press +, - or 0. The robots are visualized as coloured circles with an angle shape showing the radar direction, the thick line is the cannon and the thin line points in the front direction.

2.6 Score window

In this window the robots playing in the current sequence are listed.

2.7 Message window

Here are messages sent by the robots using Print and Debug displayed. The most recent messages are displayed at the top. You can clean the window and choose to only see new messages from a particular robot.

2.8 Options window

Here you can change a number of options. In the Options chapter you can get detailed information on each option. The changes are not applied until either the apply button or the OK button is pressed.

You can save your options to a file: Save options will save the options to a file of your choice and Save as default will save them to .rtbrc in your home directory.

The Default button will reset all options to their default values.

2.9 Statistics window

You can study the statistics of the current tournament in some different ways. You can either display

  • statistics on individual Robots,
  • the result of a game,
  • the sequence total or
  • the total of the tournament.
Pressing the arrowed buttons will move you to the first, back one, forward one or to the last element respectively. The middle bar will show what is displayed and pressing it will update the statistics if the game is in progress. If you are using gtk+1.1.x, it is also possible to sort with respect to different columns by clicking on the corresponding title box.

2.10 Running without graphics

If you want, you can run RealTimeBattle without any graphics at all. This can be especially useful when currying out a long series of tests or running a competition. To use this option you have two choices: Either you add the flag -g when launching the program, or you disable the graphics at compile time (see the INSTALL file for more information). The latter alternative is useful as the executable gets smaller and therefore faster on low memory machines. It also enables you to run RealTimeBattle on machines which haven't got gtk+ installed.

When running without graphics you have to give a tournament file, otherwise nothing at all will happen. It is also a good idea to create a log file and/or a statistics file if you want to know the result.

2.11 Tournament files

The tournament file is specified as a command line option. When specified a tournament will automatically begin and end. To save the statistics see section statistics file for more information.

A tournament file consists of five keywords. All of these keywords can be written several times, but keep in mind that only the last one of the keywords that takes a number as argument is counted. All keywords should be followed by a semicolon.

Games/Sequence or g/s:

Takes a number or a * as an argument. The number is how many games should be played per tournament. The asterisk means that the program takes the exact amount of arenas and uses this as the argument. The default value is 1.

Robots/Sequence or r/s:

Takes a number or a * as an argument. The number is how many robots is playing in each sequence. The asterisk means that the program takes the exact amount of robots and uses this as the argument. The default value is 2.

Sequences or seq:

Takes a number or a * as an argument. This number tells how many sequences shall be played in the tournament. The asterisk means that the program takes the exact amount of robots and the robots per sequence, does a binomial calculation to determine the number of sequence for all robots to meet each other exactly once, and uses this number as the argument. The default value is 1.

Robots or r:

Takes one or more robot files as its argument.

Arenas or a:

Takes one or more arena files as its argument.

File arguments can be one of the following:

Just the file:

This searches the path for the file

Example: Robot: empty.robot

Full path to the file:

This takes the given file

Example: Arena: /usr/local/games/RealTimeBattle/Arenas/Circle.arena

All files in path:

This searches the whole path and takes all files found.

Example: Arena: *

One specific directory:

This searches the specified directory and takes all files found.

Example: Robot: /usr/local/games/RealTimeBattle/Robots/*

It is possible to write files more than one time. So if you want three rotate_and_fire.robot. Just write rotate_and_fire.robot three times. This is also true for *.

Example tournament file:

R: * Arenas: Circle.arena Square.arena G/S: 2 r/s: 3 Sequences: *

2.12 Log files

Sometimes it can be useful to replay a game and analyze it in detail or just to store for future reference, in this case log files can be useful. Add the flag -l, when starting RealTimeBattle, with the filename as argument to enable this feature and with argument '-', the log is printed to stdout.

The format of the log file is as follows: Each line consist of a letter, determining the type of information, followed by a whitespace-separated list of arguments. The following information is given:

Header:

H [games/sequence] [robots/sequence] [sequences] [robots]

Arena info:

A [line from the arena file]

Game start:

G [sequence number] [game number]

Option:

O [option:value]

List of robot properties:

L [robot id] [robot colour] [robot name]

Robot position info:

R [robot id] [x] [y] [cannon angle] [radar angle] [energy]

Time:

T [time elapsed]

Print message:

P [robot id] [message to print]

Cookie:

C [cookie id] [x] [y]

Mine:

M [mine id] [x] [y]

Shot:

S [shot id] [x] [y] [dx/dt] [dy/dt]

Die:

D [type of object killed] [object id] (if robot: [points received] [position])

2.13 Replaying

You can replay a game from its log file either by giving the command line option "-r" or from the control window. Note that if the log is coming from standard input (command line option "-r -"), you cannot do much but watch the game, but otherwise you can influence the flow of the game:

  • The slidebar at the top shows how far the current game has progressed. You can jump wherever you want in the game by dragging the handle.
  • Fast forward and rewind work as expected. You can alter the speed by changing the option fast forward factor.
  • Step forward and step backward can be used to study what happens in detail. First, however, the game should be paused.
  • With the four bottom buttons you can jump between games and sequences.

2.14 Statistics files

The statistics file is a file used only when a tournament file is specified. The statistics will be saved to this file when the tournament ends. Otherwise you can save it by hand using the save button in the statistics window.


Next Previous Contents realtimebattle-1.0.8/Documentation/RealTimeBattle-3.html0000644000175000017500000002345110320527640021351 0ustar moimoi RealTimeBattle User Manual, version 1.0.8: Structure Next Previous Contents

3. Structure

In this section we will describe the structure of the program, how the robots are moving, shooting and controlling the radar, when points are given and how a tournament is built up.

3.1 Robot motion

The robot behaves like a vehicle with wheels, it rolls in the forward direction with a small roll friction and slides sideways with a much higher sliding friction. The third slowing down effect is air resistance, which is applied in the direction opposite to the robot velocity and is increasing with speed.

There are three ways to affect the robot motion, acceleration, rotation and braking.

The acceleration is used to increase the robots speed in the direction the robot faces; you cannot control the speed directly, acceleration is the only way to get the robot moving.

By rotating the robot you can make it turn. Note that rotation does not directly affect the direction of motion, only the direction the robot is facing. The sliding friction, together with acceleration, will eventually carry out the actual turning of the robot.

Braking will increase the roll friction up to a maximal value. This is when the wheel are locked and the robot is sliding instead of rolling. Don't forget to release the brake when you want to speed up again.

3.2 Energy

The robot health is measured by its energy. There are several ways for the robot to lose energy, it can

  • be hit by a shot,
  • collide with another robot or a wall,
  • spring a mine or
  • fire a shot.

However, there is only one possibility to gain energy: to eat a cookie.

3.3 The radar

The principal method to get information on the surroundings is via the radar. Every time the robot is updated it will get a radar message, giving information on the closest object in the current radar direction, i.e. distance and type of object. If it is a robot, that robots energy level will be revealed as well.

Since the radar information is almost all the robot will know about the environment, it is crucial to make use of it as well as possible. It is also important to maneuver the radar well, to make it collect useful data.

3.4 The robots position

From v1.0.5 of RTB it is possible to get the robots position more directly. Instead of having to analyze the surroundings with the radar and find your position from that, you can configure RTB to send the robot coordinates. The behavior is controlled by the option Send robot coordinates.

3.5 Shooting

Shooting is the number one method to eliminate other robots. In RealTimeBattle a shot is moving with constant velocity, calculated as the sum of the robot velocity and the shot speed in the direction the cannon is pointing. It will move until it collides with an object.

When the shot is fired it is given an energy, which determines the injuries robots will suffer when hit. The energy is, however, limited; the minimal energy forbids very low energy shots, e.g. you want to remove mines. The maximal energy is restricted by the amount of the robot's current potential shot-energy, which increases with time.

Shooting is, however, not without any risk, since a firing robot itself will lose energy, proportional to the shot energy.

If a cookie or mine is hit, it is destroyed, regardless of the energy of the shot. Therefore you should use a minimal amount of energy to shoot mines.

Shots colliding will not immediately be destroyed, instead their velocities and energies will be superposed, so that if two colliding shots are traveling in the same direction, their energies will be added and, in case of a head on collision, their energies will cancel.

3.6 Collisions

Robots are fragile objects, which get damaged by colliding with walls and other robots. When colliding, the robots act like bouncing balls, with three factors that influences the behavior, the bounce coefficient, the hardness coefficient and the protection coefficient. On the front, the robots are made of different materials, usually harder and more protective. This can be used to ram other robots, giving much more damage than it receives.

3.7 Cookies and Mines

Cookies and mines are essentially equal objects, with the only difference that robots will gain energy by taking cookies and lose energy on mines. These objects are randomly placed in the arena during the game. Their energy and frequency can be controlled with the options.

3.8 Time

As the name of the program indicates, the time used is the real time. It is entirely up to the robots to respond quickly enough to the events in the game. The game progresses by calling the update function in regular intervals. Between these, the robots have to share the remaining CPU time. To prevent robots from using too much of the processor, their CPU time is limited in competition-mode. The corresponding options give more details.

The real-timeness can, however, be violated under some circumstances. You can speed up or slow down the game speed by changing the timescale option and there is a method to prevent disruption of the game , when the system load is too high. If the time between two updates is longer than the max timestep, the game time will be slown down accordingly.

3.9 A game

At the beginning of a game, the robots are given a random position on the arena, with random orientation. The radar and the cannon are both pointing forward and the potential shot-energy is set to zero. The goal for the robots is now to survive as long as possible and at the same time to destroy the other robots. A robot will get one point for each of the enemy robot it outlives. One extra point is, however, given to all the participating robots. Robots dying at the same time will share the points fairly (or in other words, they get half a point for each of the other dying at the same time).

A game is finished if either the number of living robots is less than two or the time is up.

3.10 A sequence

A sequence is a series of games, where the same robots are fighting. At the beginning of a sequence the robot processes are started. The number of robots in a sequence is limited to 120, due to the limit of 256 open file descriptors in Linux. For every robot two pipes are opened as communication channels to the robot.

Thereafter a number of games are played and finally the robot processes are killed.

3.11 A tournament

A tournament is a collection of sequences.

The number of robots in a tournament is (theoretically) unlimited.

Any number of sequences is allowed, but to make the tournament fair, you should choose a number of sequences, such that all robots will play the same number of games (i.e. #sequence = #robots per game / GCD( #robots per game, #robots in the tournament)).


Next Previous Contents realtimebattle-1.0.8/Documentation/RealTimeBattle-4.html0000644000175000017500000004371210320527640021354 0ustar moimoi RealTimeBattle User Manual, version 1.0.8: Robot construction Next Previous Contents

4. Robot construction

This chapter will describe what you need to know in order to build your own robots. Most important to know is the messaging language, which is a set of about 35 commands used to communicate with the server program. It is also instructive to study the example robots in the Robots/ directory.

4.1 Reading messages

At the beginning of each sequence the robot processes are launched by the server program and assigned two pipes, one for input and the other for output. These are connected to the stdin and stdout, so that from the robot's point of view, it is communicating with the server via the standard input and standard output.

This approach means that the robots can be written in any programming languages. However, the robot must be able to know when it has received a new message. To achieve this there are (at least) three different methods to choose from:

Standard in blocks:

This is the simplest method, when reading from stdin, the program is blocked until the next message arrives. You can therefore make the program as if there is always a message waiting. The drawback is that you cannot do any calculations while waiting for new messages.

To choose the blocking method, send the following robot option as soon as the program is started:

cout << "RobotOption " << USE_NON_BLOCKING << " " << 0 << endl;
Note that this is strictly c++ code. If you don't use c++ just print the given information to stdout. endl is equal to 'end of line'.

Select:

Using the Unix libc function select makes it possible for the robot to have better control over when to look for new messages. It enables you, for example, to read all messages available, do some calculations, send commands and thereafter wait for more messages. To learn more of select, please read its Unix documentation ( e.g. man pages or emacs info ).

To choose the select method, send the following robot option as soon as the program is started:

cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl;
Note that this is strictly c++ code.

Signals:

If you want, you can tell RealTimeBattle to send the robot a signal whenever a new set of messages is sent. This method makes it possible for the robot to be continuously updated with information from the server program also when the robot is busy doing calculations. If you feel you don't know how to use signals, look in the Unix documentation to or study other robots to learn more.

To choose the signal method, send the following robot option as soon as the program is started:

cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl;
cout << "RobotOption " << SIGNAL << " " << SIGUSR1 << endl;
Note that this is strictly c++ code.

You can of course choose any signal you want instead of SIGUSR1.

As a help to implement these methods, the robot rotate_and_fire has been written in three different, but functionally equivalent, versions. Feel free to study and copy to use in your own robots.

Note that it is not a good idea to do "busy wait", i.e., to repeatedly look for a message until you get one. This will slow things down considerably and, worse, in competition-mode the robot will rapidly run out of CPU-time and die.

4.2 Messagetypes.h

The file Messagetypes.h is a good source of information on the messaging language. It is a c/c++ include file, but you can easily rewrite it to use with other languages. There you can find listing of messages, warning types, objects, game options and robot options.

4.3 Cheating

Since the battle is progressing in real-time with real processes, it may be possible to write programs which are 'cheating' in one way or another. For example by examining other robots or even RealTimeBattle itself to get more information, by using up a lot of resources to drain the other robots and so on. This is, of course, not the intended method to beat opponents, so we try to inhibit it as much as possible.

In competition-mode robots have limited CPU usage, so that one robot can't use up all the CPU. It could be possible to fiddle with this by launching child processes. But since the time used by the child process will be counted for as soon as the process dies, it should be very easy to detect if a robot does anything suspicious.

It is not possible to prevent all ways of cheating within RTB. It is e.g. permitted to read and write to files, but remember that organizers of competitions can forbid this if they wish. By setting permissions and ownerships of the robot executables and directories this can be done satisfactory.

It may still be possible to find ways round these restrictions; if you detect such a way, please send a bug report. By the way, it is up to the organizer of a tournament to make sure that the rules are followed.

4.4 Messages to robots

Initialize [first? (int)]

This is the very first message the robot will get. If the argument is one, it is the first sequence in the tournament and it should send Name and Colour to the server, otherwise it should wait for YourName and YourColour messages (see below).

YourName [name (string)]

Current name of the robot, don't change it if you don't have very good reasons.

YourColour [colour (hex)]

Current colour of the robot, change it if you find it ugly. All robots in a team will have the same colour.

GameOption [optionnr (int)] [value (double)]

At the beginning of each game the robots will be sent a number of settings, which can be useful for the robot. For a complete list of these, look in the file Messagetypes.h for the game_option_type enum. In the options chapter you can get more detailed information on each option. The debug level is also sent as a game option even though it is not in the options list.

GameStarts

This message is sent when the game starts (surprise!)

Radar [distance (double)] [observed object type (int)] [radar angle (double)]

This message gives information from the radar each turn. Remember that the radar-angle is relative to the robot front; it is given in radians.

Info [time (double)] [speed (double)] [cannon angle (double)]

The Info message does always follow the Radar message. It gives more general information on the state of the robot. The time is the game-time elapsed since the start of the game. This is not necessarily the same as the real time elapsed, due to time scale and max timestep.

Coordinates [x (double)] [y (double)] [angle (double)]

Tells you the current robot position. It is only sent if the option Send robot coordinates is 1 or 2. If it is 1 the coordinates are sent relative the starting position, which has the effect that the robot doesn't know where it is starting, but only where it has moved since.

RobotInfo [energy level (double)] [teammate? (int)]

If you detect a robot with your radar, this message will follow, giving some information on the robot. The opponents energy level will be given in the same manner as your own energy (see below). The second argument is only interesting in team-mode, 1 means a teammate and 0 an enemy.

RotationReached [what has reached(int)]

When the robot option SEND_ROTATION_REACHED is set appropriately, this message is sent when a rotation (with RotateTo or RotateAmount) has finished or the direction has changed (when sweeping). The argument corresponds to 'what to rotate' in e.g. Rotate.

Energy [energy level(double)]

The end of each round the robot will get to know its energy level. It will not, however, get the exact energy, instead it is discretized into a number of energy levels.

RobotsLeft [number of robots (int)]

At the beginning of the game and when a robot is killed the number of remaining robots is broadcasted to all living robots.

Collision [colliding object type (int)] [angle relative robot (double)]

When a robot hits (or is hit by) something it gets this message. In the file Messagetypes.h you can find a list of the object types. You get the angle from where the collision occurred (the angle relative the robot) and the type of object hitting you, but not how severe the collision was. This can, however, be determined indirectly (approximately) by the loss of energy.

Warning [warning type (int)] [message (string)]

A warning message can be sent when robot has to be notified on different problems which have occured. Currently seven different warning messages can be sent, namely

UNKNOWN_MESSAGE: The server received a message it couldn't recognize.

PROCESS_TIME_LOW: The CPU usage has reached the CPU warning percentage. Only in competition-mode.

MESSAGE_SENT_IN_ILLEGAL_STATE: The message received couldn't be handled in this state of the program. For example Rotate is sent before the game has started.

UNKNOWN_OPTION: The robot sent a robot option with either illegal option name or illegal argument to that option.

OBSOLETE_KEYWORD: The keyword sent is obsolete and should not be used any more, see the ChangeLog file for information on what to use instead.

NAME_NOT_GIVEN: The robot has not sent its name before the game begins. This happens if the robot startup time is too short or the robot does not send its name early enough.

COLOUR_NOT_GIVEN: The robot has not sent its colour before the game begins.

Dead

Robot died. Do not try to send more messages to the server until the end of the game, the server doesn't read them.

GameFinishes

Current game is finished, get prepared for the next!

ExitRobot

Exit from the program immediately! Otherwise it will be killed forcefully.

4.5 Messages from robots

When you send messages to RealTimeBattle make shure that they are not longer than 128 chars, otherwise RealTimeBattle will cut them in two parts and may report an unknown message.

RobotOption [option nr (int)] [value (int)]

Currently only two options are available:

SIGNAL: Tells the server to send a signal when there is a message waiting. The argument will determine which signal. Send this message (with argument e.g. SIGUSR1) as soon as you are prepared to receive the signal. Default is 0, which means don't send any signals.

SEND_SIGNAL: Tells the server to send SIGUSR1 when there is a message waiting. Send this message (with argument 1 (= true)) as soon as you are prepared to receive the signal. Default is false.

SEND_ROTATION_REACHED: If you want the server to send a RotationReached message when a rotation is finished, you should set this option. With a value of 1, the message is sent when a RotateTo or a RotateAmount is finished, with a value of 2, changes in sweep direction are also notified. Default is 0, i.e. no messages are sent.

USE_NON_BLOCKING: Selects how to reading messages works. This option should be sent exactly once as soon as the program starts. Since it should always be given, there is no default value.

Name [name (string)]

When receiving the Initialize message with argument 1, indicating that this is the first sequence, you should send both your name and your colour. If your name ends with the string Team: teamname, you will be in the team teamname. For example "Name foo Team: bar" will assign you to the team bar and your name will be foo. All robots in a team will have the same colour and will recognize them over the RobotInfo message. For a more sophisticated possibilities, please take a look onto the RealTimeBattle Team Framework.

Colour [home colour (hex)] [away colour (hex)]

See above. The colours are like normal football shirts, the home colour is used unless it is already used. Otherwise the away colour or, as a last resort, a non-occupied colour is selected randomly.

Rotate [what to rotate (int)] [angular velocity (double)]

Set the angular velocity for the robot, its cannon and/or its radar. Set 'what to rotate' to 1 for robot, 2 for cannon, 4 for radar or to a sum of these to rotate more objects at the same time. The angular velocity is given in radians per second and is limited by Robot (cannon/radar) max rotate speed.

RotateTo [what to rotate (int)] [angular velocity (double)] [end angle (double)]

As Rotate, but will rotate to a given angle. Note that radar and cannon angles are relative to the robot angle. You cannot use this command to rotate the robot itself, use RotateAmount instead!

RotateAmount [what to rotate (int)] [angular velocity (double)] [angle (double)]

As Rotate, but will rotate relative to the current angle.

Sweep [what to rotate (int)] [angular velocity (double)] [right angle (double)] [left angle (double)]

As rotate, but sets the radar and/or the cannon (not available for the robot itself) in a sweep mode.

Accelerate [value (double)]

Set the robot acceleration. Value is bounded by Robot max/min acceleration.

Brake [portion (double)]

Set the brake. Full brake (portion = 1.0) means that the friction in the robot direction is equal to Slide friction.

Shoot [shot energy (double)]

Shoot with the given energy. The shot options give more information.

Print [message (string)]

Print message on the message window.

Debug [message (string)]

Print message on the message window if in debug-mode.

DebugLine [angle1 (double)] [radius1 (double)] [angle2 (double)] [radius2 (double)]

Draw a line direct to the arena. This is only allowed in the highest debug level(5), otherwise a warning message is sent. The arguments are the start and end point of the line given in polar coordinates relative to the robot.

DebugCircle [center angle (double)] [center radius (double)] [circle radius (double)]

Similar to DebugLine above, but draws a circle. The first two arguments are the angle and radius of the central point of the circle relative to the robot. The third argument gives the radius of the circle.


Next Previous Contents realtimebattle-1.0.8/Documentation/RealTimeBattle-5.html0000644000175000017500000002774310320527640021363 0ustar moimoi RealTimeBattle User Manual, version 1.0.8: Options Next Previous Contents

5. Options

RealTimeBattle is configurable with a bunch of options, collected in different groups. The philosophy is to give you full freedom to set up the game in the way you like. This does mean, however, that some settings of the options may give bad combination, which can cause troubles for the program.

5.1 Environmental options

Gravitational Constant:

The acceleration due to gravitation. It is about 9.8 on the earth. An increase will increase the friction, thereby slow down the robots.

Air resistance:

As it sounds. Increases with speed.

Roll friction:

The friction in the direction of the robot if not braking.

Slide friction:

The friction orthogonal to the robot direction. Also the maximum friction if braking.

Send robot coordinates:

Determines how coordinates are send to the robots. The following options are available:

  • 0 - don't send any coordinates (default)
  • 1 - send the coordinates relative the starting position
  • 2 - send absolute coordinates

5.2 Robot options

Robot max acceleration:

Robots are not allowed to accelerate faster than this and ...

Robot min acceleration:

... slower than this.

Robot radius:

Determines the size of the robot.

Robot mass:

Large robot mass will increase the impact of collisions.

Robot bounce coefficient:

Affects how well the robots will bounce. If zero the robots will cling together when colliding, if the value is one they will act like perfect billiard balls.

Robot hardness coefficient:

Determines how seriously damaged the robots will be when colliding. The lower the value, the softer the material.

Robot protection coefficient:

Influences how well protected the robot is. This factor is to be multiplied with the damaging energy to get how much to reduce the robot's energy.

Robot frontszie:

The front of the robot is a section with different materials, usually harder and more protective, so robots can injure each other by ramming.

Robot front bounce coefficient:

See previous four items.

Robot front hardness coefficient:

See previous five items.

Robot front protection coefficient:

See previous six items.

Robot start energy:

The amount of energy the robots will have at the beginning of each game.

Robot max energy:

By eating a cookie, the robot can increase its energy; not more than this, though.

Robot max rotate speed:

How fast the robot itself may rotate. Unit: radians/s .

Robot cannon max rotate speed:

Maximum cannon rotate speed. Note that the cannon and the radar move relative to the robot, so the actual rotation speed may be higher.

Robot radar max rotate speed:

Maximum radar rotate speed. See note above.

Robot energy levels:

The robot will only know its energy approximately. This will decide how many discretation levels will be used.

5.3 Shot options

Shot radius:

Size of shots. Should be less than robot radius.

Shot speed:

Shots are moving with this speed in the direction of the cannon plus the velocity of the robot.

Shooting penalty:

When shooting the robot itself gets damaged. This is the factor, by which the shot energy is multiplied, to get the damaging energy. If the number of robots is large, this number is reduced, so that you never lose in average by shooting (if you hit).

Shot min energy:

The lowest shot energy allowed. A robot trying to shoot with less energy will fail to shoot.

Shot max potential energy:

The robots have a shot energy, which increases with time, but will never exceed this value.

Shot potential energy increase speed:

Determines how fast the robots shot energy noted above, will increase. Unit: energy/s .

5.4 Extras options

Cookie max energy:

The cookie energy is a random number between cookie max energy and cookie min energy.

Cookie min energy:

See above.

Cookie frequency:

The number of cookie per second that will appear in average.

Cookie radius:

Size of cookie.

Mine max energy:

The mine energy is a random number between mine max energy and mine min energy.

Mine min energy:

See above.

Mine frequency:

The number of mine per second that will appear in average.

Mine radius:

Size of mine.

Cookie colour:

Cookie colour in hexadecimal red-green-blue form.

Mine colour:

As above.

5.5 Time options

Timeout:

This is the longest time a game will take. When the time is up all remaining robots are killed, without getting any more points.

Max timestep:

If the computer is temporarily slowed down, the time between updates can be to long. Setting this option will make the program artificially slow down the clock in those cases and therefore violate the realtimeness.

Time scale:

Increasing time scale to more than one means that the game clock will go faster than an ordinary clock. Changing this value can be usefull if you either want to give the robots more time or if you have a fast computer you may want to speed the game up.

Update interval:

This option determines the time between robot updates, i.e., how often the robot states are changed. It is not influenced by the 'Time Scale' and cannot be altered when the program is running. The accuracy is 1/100 s (depending of the precision of the system that RealTimeBattle is running on).

Robot startup time:

Determines the time between the robot processes are executed and the sequence begins. If robots are black and have no name, you may need to increase the startup time from the default of one second. This can happen if, for example, the robots are many, large or you are running on a slow or remote computer.

Start CPU time:

In competition-mode a robot's CPU usage is limited. At the beginning of a sequence a robot will get this amount of CPU time to spend.

Extra CPU time:

When the start CPU time is spent, the robot will get this amount of extra CPU time.

Extra CPU period:

The extra CPU time must last an entire CPU period, otherwise the robot will die in the current game.

CPU warning percentage:

When the robot has used up this amount of its CPU time it will receive a warning message.

Process check interval:

In competition-mode this will decide how often the program will check for CPU usage.

Logging frequency:

To reduce the size of log files you can increase this option. With this option, robot position info are only logged every n:th update interval.

5.6 Window sizes

Here you can set the initial sizes for some windows, namely the arena window, the message window, the score window and the statistics window. You can also set the position for the first three and the control window.

5.7 Miscellaneous options

Arena scale:

Overall scale of the arena. A value of 2 gives double sidelength, i.e., a four times larger area.

Fast forward factor:

Determines, when replaying, the speed when the fast forward button or the rewind button is pressed.

Max robots allowed simultaneously:

Allows the user to change the maximum amount of robots allowed in a sequence. If there are too many, the system might complain (how many depends on the system).

Background colour:

Background colour and ...

Foreground colour:

... foreground colour for the arena.

Colour for RTB messages:

Colour for the text when RTB sends messages.

Robot search path:

This is a colon-separated list of directories which will be searched for robots when a new tournament is started. The subdirectory Robots in the rtb install directory (default: /usr/local/games/RealTimeBattle) is always searched.

Arena search path:

Same as above, but for arena files instead of robots. Here the subdirectory is Arenas.


Next Previous Contents realtimebattle-1.0.8/Documentation/RealTimeBattle-6.html0000644000175000017500000001302710320527640021352 0ustar moimoi RealTimeBattle User Manual, version 1.0.8: Arena construction Next Previous Contents

6. Arena construction

In RealTimeBattle, it is very simple to construct your own arenas. The language consists of only eleven commands, and there are essentially four building blocks: line, circle, inner_circle and arc. This is mainly because of speed reason, for circles and lines it is very easy to check if a collision has occured. Circle and inner_circle prevents robots from entering into a circle or getting out of a circle respectively. The line and the arc stop the robots from entering through the long side ( the curved for the arc ), but no check is made on the short side, so you have to put circles at each end of the line to make it a solid object. The commands polygon, closed_polygon and poly_curve are intended to simplify this procedure, always giving a proper object.

All angles are by default in radians but can be changed to degrees by the command angle_unit degrees.

Note that RealTimeBattle does not check whether the arena file gives a correct arena, it is entirely up to you. However, it will complain if there are violations to the language rules.

Arena files should be given the postfix .arena and be stored in the arena directory for RealTimeBattle to find them.

The bounce coefficient and hardness argument given to all wall creating commands, determines the material of the wall. They are both values between 0 and 1. Harder walls will injure colliding robots more and higher bounce coefficient make them bounce better.

You are also encouraged to study the arenas included and learn from the examples.

6.1 Arena commands

A command consists of the command name and the arguments separated by whitespace. Be sure to give the right number of arguments!

In the command list, the arguments are given in square brackets.

scale [value]

This value times the arena scale will give the scale factor, by which all coordinates are multiplied. This command must be, if it exists, the very first in the file, default is 1.0.

angle_unit [unit]

Switches to the selected angle unit, which can be either of degrees or radians. Default is radians.

boundary [left] [up] [right] [down]

The boundary encloses the area, in which robot, cookies and mines are placed. It also determines the visible area in the arena window. This command is required and may only be preceded by scale.

inner_circle [bounce] [hardness] [center_x] [center_y] [radius]

Robots are limited to the inside of this circle.

circle [bounce] [hardness] [center_x] [center_y] [radius]

Circle shaped wall.

line [bounce] [hardness] [thickness] [start_x] [start_y] [end_x] [end_y]

Creates a line. It only prevents the robot from passing through to long side, so remember to put circles at the short ends.

arc [bnc] [hardn] [thickn] [center_x] [ctr_y] [inner_radius] [outer_rds] [angle1] [angle2]

An arc is a sector of a ring within two angles. Like the line, it needs circles at both the ends.

polygon [bounce] [hardn] [thickn] [number of vertices] ([center_x] [center_y])...

This will create a number of circles, connected by lines.

closed_polygon [bounce] [hardn] [thickn] [number of vertices] ([center_x] [center_y])...

As a polygon, but the first and the last vertices are also connected by a line.

poly_curve [bnc] [hardn] [thickn] [start_x] [start_y] [dir_x] [dir_y] ([command args ...]) ...

The poly_curve is the most powerful of the arena commands. It is used to build walls with lines and arcs. At each step you have a current position and direction, which are affected by the subcommands. The last subcommand must be C or Q.

L [length]

Draw a line with given length in the current direction.

T [angle]

Turn the current dircetion.

A [angle] [radius]

Draw an arc.

C

Finish by connecting with the starting point.

Q

Quit.

exclusion_point [position_x] [position_y]

When the arena inside the boundary consists of several separated areas, you should exclude all but one by inserting exclusion points. All points from which you can draw a straight line to an exclusion point without crossing a wall, are considered to be outside the arena.


Next Previous Contents realtimebattle-1.0.8/Documentation/RealTimeBattle.html0000644000175000017500000001167610320527640021217 0ustar moimoi RealTimeBattle User Manual, version 1.0.8 Next Previous Contents

RealTimeBattle User Manual, version 1.0.8

Erik Ouchterlony and Ragnar Ouchterlony, Johannes Nicolai ( jonico@users.sourceforge.net)

4 October 2005

1. Introduction

2. Usage

3. Structure

4. Robot construction

5. Options

6. Arena construction


Next Previous Contents realtimebattle-1.0.8/Documentation/next.gif0000644000175000017500000000047510170545354017140 0ustar moimoiGIF89app!# Imported from XPM image: next.xpm!,@63333B! 0 A0 0 0  0 `0 `0 A @ `0 `00000000000000000000000000000000000000000000  000000 0000000000000000000000000000` ;realtimebattle-1.0.8/Documentation/prev.gif0000644000175000017500000000047510170545354017136 0ustar moimoiGIF89app!# Imported from XPM image: prev.xpm!,@63333# B 0 A0 0 0 0 `0 `0 A   `0 `00000000000000000000000000000000000000000000  000 0000000000000000000000000000000` ;realtimebattle-1.0.8/Documentation/toc.gif0000644000175000017500000000047410170545354016746 0ustar moimoiGIF89ap!" Imported from XPM image: toc.xpm!,@6313c B0 0 A0 0 0 0 `0@`0 `  `0@`0 `0@`0000000000 0000000000 00000000 000000 0000 000000000 00000000000 00000000000000` ;realtimebattle-1.0.8/Documentation/next.png0000644000175000017500000000037210170545354017153 0ustar moimoiPNG  IHDRb PLTEppdtRNS@*bKGDH pHYsHHFk>@IDATxc Hz 1H|gBiU#֪U+@fVf:{ jv.QRE+tEXtcomment Imported from XPM image: next.xpm4vRIENDB`realtimebattle-1.0.8/Documentation/prev.png0000644000175000017500000000037410170545354017153 0ustar moimoiPNG  IHDRb PLTEppdtRNS@*bKGDH pHYsHHFk>BIDATxc Hz q? WZBZCV500hZG{bxw.I+tEXtcomment Imported from XPM image: prev.xpm.IENDB`realtimebattle-1.0.8/Documentation/toc.png0000644000175000017500000000034510170545354016762 0ustar moimoiPNG  IHDRb PLTEpWktRNS@*bKGDH pHYsHHFk>,IDATxc?0BKJY %>ZX!p0(F#?s.>Y*tEXtcomment Imported from XPM image: toc.xpm|IENDB`realtimebattle-1.0.8/Documentation/RealTimeBattle.dvi0000644000175000017500000025427410320527642021042 0ustar moimoi; TeX output 2005.10.04:1836_2 ~?ՁZݺIqqecss2074RealTimeBattlefUserManual,version1.0.8 cG 1 ecrm1000EriktOuchterlonyandRagnarOuchterlony*,JohannesNicolai(HЃ ecti1000jonic}/o@users.sourceforge.net)a4OctobGer2005&(&Lt$ffffecbx1440Conctents]f ecbx10001In>troQductionm2ؼ1.1%MoreU informationߍ.荍..........................................w31.2%Requirementsu7.荍............................................w31.3%Background<.荍.............................................w31.4%License&.荍................................................w31.5%BugU repGortsmӍ.荍.............................................w42Usage42.1%CommandU lineoptions.荍.......................................w42.2%ControlU windown.荍...........................................w52.3%StartU newtournamentwindow.荍..................................w62.4%RobGotsU andarenadirectories.荍...................................w62.5%ArenaU windowQۍ.荍............................................w72.6%ScoreU window_㍍.荍............................................w72.7%MessageU windowY'.荍..........................................w72.8%OptionsU window.荍...........................................w72.9%StatisticsU window..荍..........................................w72.10%RunningU withoutgraphicsw/.荍.....................................w72.11%T*ournamentU lesC㍍.荍..........................................w82.12%LogU les{{.荍...............................................w92.13%Replaying+.荍..............................................x?102.14%StatisticsU les?.荍............................................x?103StructureN103.1%RobGotU motion'.荍............................................x?103.2%Energyw.荍................................................x?103.3%TheU radarO.荍..............................................x?113.4%TheU robGotsposition6C.荍.........................................x?113.5%ShoGoting-g.荍...............................................x?113.6%Collisions׍.荍..............................................x?11*_2 ~?G1.8In>troQduction|2ՁV3.7%CoGokiesU andMinesٗ.荍.........................................x?12ؼ3.8%Times.荍.................................................x?123.9%AU game-.荍...............................................x?123.10%AU sequencef.荍.............................................x?123.11%AU tournamentn;.荍............................................x?124RobQotconstructionYث134.1%ReadingU messages.荍..........................................x?134.2%MessagetypGes.h.荍...........................................x?144.3%CheatingX.荍...............................................x?144.4%MessagesU torobGotsn󍍑.荍.........................................x?144.5%MessagesU fromrobGotsύ.荍.......................................x?165Options175.1%EnvironmentalU optionsW.荍.......................................x?185.2%RobGotU options{.荍............................................x?185.3%ShotU optionsJw.荍.............................................x?195.4%ExtrasU options.荍...........................................x?205.5%TimeU optionsJo.荍............................................x?205.6%WindowU sizes׍.荍............................................x?215.7%MiscellaneousU options!.荍.......................................x?216ArenaconstructionZx226.1%ArenaU commands .荍..........................................x?22(1Inctropduction:ThisistheusermanualforRealTimeBattle.CHereyoushouldndhowtoruntheprogram,Zhowtheprogram works,U howtocreateyourownrobGotsandhowtoconstructarenas.RealTimeBattle_isaprogramminggameforUnix,ainwhichrobGotscontrolledbyprogramsareghtingeachother.The7goalistodestroytheenemies,=usingtheradartoexaminetheenvironmentandthecannontoshoGot.Even?thoughtheenvironmenttherobGotsaremovinginisfairlysimple,ĆitisfarfromeasytoconstructanintelligentDrobGot-program.l RealTimeBattleisconstructedtobeeasytouse,H exibleandfast.l TheintentionisthattheprogramcouldbGeusedasatestforintelligentalgorithms,,aswellasjustagametoplayandenjoy*.F*eaturesU include:ؼ !", cmsy10GameJprogressesinrealtime,LMwiththerobGotprogramsrunningaschildprocessestoRealTimeBattle.TheU robGotscommunicatewiththemainprogramusingthestandardinputandoutput.1_2 ~?G1.8In>troQduction|3ՁVRobGotsU canbeconstructedinalmostanyprogramminglanguage.e΍UpU to120robGotscancompetesimultaneously*.AFsimple{messaginglanguageisusedforcommunication,which{makeseasytostartconstructingrobGots.RobGotsU behavelikerealphysicalob0ject.Y*ouU cancreateyourownarenas.HighlyU congurable.PossibilityU topluginexternalclients.BasicNteamsuppGortdirectlyintegratedinthegame,_sophisticatedteamplayavqailableduetoteam frameworks."!N ecbx12001.1MoreinformationMMoreinformationcanbGefoundintheqL ectt1000INSTALL,AUTHORS,BUGS,TODO,README,FAQandChangeLoglesintheU distribution.qMoreupGdatedinformationisavqailableontheؼR}/ealTimeBattleYFhomepagehttp://realtimebattle.sf.net,"UwhereyoucanalsondrobGots,newsontour-namentsU aswellasthismanualindierentformats.1.2RequirementsMTheDhardwarerequirementsareverymuchdepGendentonwhatyoudo.ARunningafewrobGotsshouldbepGossible-/todoonanycomputeronwhichGNU/LinuxoranyotherUnixescanbGerun.Thedemandonhardwarewill,Thowever,growwiththenumbGerofrobotsyouwantonthebattleeldsimultaneously;!running120U advqancedrobGotsiscertainlydemandingforanypersonalcomputer.ؼRealTimeBattle!_isonlyavqailableonUnix.>ItisdevelopGedonaLinux-machine,TobutitshouldcompileonotherUnixdialectstoGo.Runningin2.1(competition-mode)iscurrentlyonlypossibleonLinuxwiththe'/proGc'-directoryU enabled,becauseoftheneedtogetthecpuusageofchildprocesses.Theqonlysoftwareqrequirementisgtk+http://www.gtk.org,"whichisusedforthegraphicaluserinterface."1.3BackgroundMTheU pro0jectstartedinAugust1998.qInspirationcamefromR}/obotBattleThttp://www.robotbattle.com/,averyinterestinggameweusedtoenjoysomeyearsearlier.ThatnversionofRobGotBattle,Nhowever,hadnsomedrawbacks:ItwasonlyavqailableonWindowsandtherobGotswerewritteninanownlanguage, whichrestrictsthepGossibilitiestowriteintelligentrobGots.,8RobotBattlehasU sincethenbGeenunderdevelopment,U butitstilllacksupportforotheroperativesystems.W*ethereforedecidedtoconstructaUnixrobGotprogramminggame,gwhichmakesuseoffeaturesofamoGdernOS."1.4LicenseMRealTimeBattleU isdistributedundertheGNU&Gener}/al&9PublicLicense%http://www.gnu.org/copyleft/gpl.html,inthespiritoftheLinuxcommu-nity*.qOcialU versionsofRealTimeBattlewillbGereleasedbytheauthors.Y_2 ~?G2.8Usages4ՁVCopyrightt7(C)t/1998-2000ErikOuchterlonyt7andRagnarOuchterlony*,{seet7theAUTHORSleforfurtherdevel- opGers.ؼThisprogramisfreesoftware;'youcanredistributeitand/ormoGdifyitunderthetermsoftheGNUGeneralPublicLicenseaspublishedbytheF*reeSoftwareF*oundation;N eitherversion2oftheLicense,$or(atyouroption)U anylaterversion.This*programisdistributedinthehopGethatitwillbeuseful,2butWITHOUT*ANYWARRANTY;*withouteventheimpliedwarrantyofMERCHANT*ABILITYorFITNESSFORAP*ARTICULARPURPOSE.SeetheU GNUGeneralPublicLicenseformoredetails.Y*ous3shouldhaves3receivedacopyoftheGNUs+GeneralPublicLicensealongwiththisprogram;B) ffBY*esSY*esNo ffͤ ffΟ^StepU throughgame*& ffBY*es[NoNo ffͤ ffΟ^RobGotU CPUtimeunlimited͡ ffBY*esSY*esNo ffff&02.2ControlwindowNewtournamen>t: This^willstartanewtournament.TSection2.3(Startnewtournamentwindow)willgivemoreinforma-tion.iRepla>ytournament:2.13U (Replayagame).qItwillaskyoutoselecta2.12(logle)ofthegameyouwanttostudy*.P>ause:Pausesthegame,]in2.1(compGetition-mode)thepausingwillbGepostponeduntiltheendofthecurrent game.End:StopsU thecurrenttournament.Options:BringsU upthe2.8(optionswindow).Statistics:DisplaysU the2.9(statisticswindow).Sho>warenawindow:ThisbGoxcanbeusedtoshowandhidethethreewindowsusedwhenagameisrunning,i.e.,the2.5 (arenaU window),the2.6(scorewindow)andthe2.7(messagewindow).r_2 ~?G2.8Usages6ՁVQuit:T*erminatesU theprogram.ؼIn2.1(debug-moGde)thereisanothersetofbuttonsavqailable.^Theyareintendedtohelpwithdebugging of6robGots.Notethatyoucandebugarunningprocess;ifyouusegdbthecommandisgdb?robot-nameprocess-number.Step:InQa2.2(paused)gamethiswillmoveQonetimestepforward.[ThisisveryusefulwhenrunningtherobGotU inadebugger,sinceotherwisetherobotwillbeoodedwithmessages.Endgame:ThisU willnishthecurrentgame.qIthasthesameeectasa5.5(timeout)wouldhave.Killmark>edrobQot:InY+debug-moGde,Z.youcanmarkarobotinthe2.6(scorewindow).}Thatrobotwilldieifyoupressthis button.Debuglev>el:ChangingȒdebuglevelisawayoftellingrobGotswhichmessagestheyshouldsend.BTherangeisbGetween 0uand5,} where0meansnodebuggingand5isthehighestlevelofdebugging,i.e.Oalldebug-messagesshouldU bGesend.ؼWhenyouarereplayingalogle(notfromstdout)thereareanumbGerofwidgetstocontrolthereplaying.SeeU furtherinthechapterabGout2.13(replaying).#Í2.3StartnewtournamentwindowMT*oselectrobGotsandarenasforthetournament,~markthelestotherightandpresstheaddbutton.3SelectedlesU areshowntotheleftandcanbGeremovedcorrespGondingly*.ؼA3.11@(tournament)consistsofanumbGerof3.10(sequences)of3.9(games).rIneachsequencethesamerobGotsareplayinginallgames.LHereyouselectthenumbGerofgamesandsequencesaswellasthenumbGerofrobGotsZineachsequence.T>IfyouintendtoplaywithallrobGotseverygameyouareadvisedtochoGoseonlyonesequencetandinsteadincreasethenumbGertofgames.\ThereasonistoavoidtrestartingoftherobotprocesseswhichU cantakeawhile,espGeciallyifthenumbGerofrobotsislarge.ItisalsopGossibletoloadatournamentleorsavethecurrenttournament.LThelasttournamentplayedisjstoredin/tmp/rtb/tmp.tourandisalwaysjdisplayedwhenthiswindowopGens.._IfitisnotavqailableanemptyU tournamentisdisplayed.Y*ouU havetoselectatleasttworobGotsandonearenatobeabletostart.#Í2.4Rob_otsandarenadirectoriesMIngorderfortheprogramtondtherobGotsandarenasyouhavesettwooptions5.7(RobGotsearchpath)and05.7(Arenasearchpath).ӯThesubGdirectoriesRobotsandArenasinthertbinstallldirectory(default:/usr/local/games/RealTimeBattle),\(spGeciedZatcompile-timeinthemainMakele,arealwaysZsearched,regardlessoftheoptions,butifyoucreateanewdirectory*,orifyouinstalledRealTimeBattleinsomeotherdirectory*,U youneedtosettheseoptions.}a_2 ~?G2.8Usages7ՁV2.5ArenawindowMThisiswherethebattletakesplace.QcIfyouwantamoredetailedview, usethezoGombuttonsorpress+,-or 0.4The=robGotsarevisualizedascolouredcircleswithanangleshapeshowingtheradardirection,thethicklineU isthecannonandthethinlinepGointsinthefrontdirection.#Í2.6ScorewindowInU thiswindowtherobGotsplayinginthecurrentsequencearelisted.2.7MessagewindowHere5aremessagessentbytherobGotsusing4.5(PrintandDebug)displayed.Themostrecentmessages arebodisplayedatthetop.lY*oucancleanthewindowandchoGosetoonlyseenewmessagesfromaparticularrobGot.#Í2.8OptionswindowHere'youcanchangeanumbGerofoptions..Inthe5(Optionschapter)youcangetdetailedinformationoneachU option.qThechangesarenotapplieduntileithertheapplybuttonortheOKbuttonispressed.ؼY*oucansaveyouroptionstoale:SLSave?optionswillsavetheoptionstoaleofyourchoiceandSave?asdefaultU willsaveU themto.rtbrcinyourhomedirectory*.TheU Defaultbuttonwillresetalloptionstotheirdefaultvqalues.#Í2.9StatisticswindowMY*ouU canstudythestatisticsofthecurrenttournamentinsomedierentways.qY*oucaneitherdisplayؼstatisticsU onindividualRobQots,theU resultofagame,theU sequencetotalortheU totalofthetournament.Pressingڈthearrowedڈbuttonswillmoveڈyoutotherst,;backone,;forwardoneortothelastelement respGectively*.hThe/middlebarwillshowwhatisdisplayedandpressingitwillupGdatethestatisticsifthegameiisinprogress.ZIfyouareusinggtk+1.1.x,itisalsopGossibletosortwithrespecttodierentcolumnsbyU clickingonthecorrespGondingtitlebox.#Í2.10%}RunningwithoutgraphicsMIfyouwant,youcanrunRealTimeBattlewithoutanygraphicsatall.ThiscanbGeespeciallyusefulwhencurryingzoutalongseriesoftestsorrunningacompGetition.ZT*ousethisoptionyouhavetwochoices:OEitheryoupaddtheag-gwhenlaunchingtheprogram,oryoudisablethegraphicsatcompiletime(seetheINSTALLleMformoreinformation).WThelatteralternativeisusefulastheexecutablegetssmallerandthereforefasteronlowmemorymachines.EItalsoenablesyoutorunRealTimeBattleonmachineswhichhaven'tgotgtk+installed._2 ~?G2.8Usages8ՁVWhen0runningwithoutgraphicsyouhavetogiveatournamentle,7otherwisenothingatallwillhappGen.e[It isU alsoagoGodU ideatocreatealogleand/orastatisticsleifyouwanttoknowtheresult."2.11%}TournamentlesMThetournamentleisspGeciedasa2.1(commandlineoption).NWhenspeciedatournamentwillautomat-icallyU bGeginandend.qT*osaveU thestatisticsseesection2.14(statisticsle)formoreinformation.ؼAtournamentleconsistsofvekeywords.&fAllofthesekeywordscanbGewrittenseveraltimes, +butkeepinmindthatonlythelastoneofthekeywordsthattakesanumbGerasargumentiscounted.;AllkeywordsshouldU bGefollowedU byasemicolon.,􍍍Games/Sequenceorg/s:XT*akesManumbGerora*asanargument. =ThenumbGerishowmanygamesshouldbGeplayedpGertournament.wThe}rasteriskmeansthattheprogramtakestheexactamountofarenasandusesthisastheU argument.qThedefaultvqalueis1.RobQots/Sequenceorr/s:T*akeslanumbGerora*asanargument.ThenumbGerishowmanyrobGotsisplayingineachsequence.TheasteriskmeansthattheprogramtakestheexactamountofrobGotsandusesthisastheargument.TheU defaultvqalueis2.Sequencesorseq:T*akesWanumbGerora*asanargument.yThisnumbGertellshowmanysequencesshallbGeplayedinthetournament.ٮThe/asteriskmeansthattheprogramtakestheexactamountofrobGotsandtherobotspGerpJsequence,wdoesabinomialcalculationtodeterminethenumbGerofsequenceforallrobotstomeeteachU otherexactlyonce,andusesthisnumbGerastheargument.qThedefaultvqalueis1.RobQotsorr:T*akesU oneormorerobGotlesasitsargument.Arenasora:T*akesU oneormorearenalesasitsargument.,FileU argumentscanbGeoneofthefollowing:Justthele:ThisU searchesthepathfortheleExample:qRobot: Xempty.robotF ullpathtothele:ThisU takesthegivenleExample:qArena: X/usr/local/games/RealTimeBattle/Arenas/Circle.arenaAlllesinpath:ThisU searchesthewholepathandtakesalllesfound.Example:qArena: X*OnespQecicdirectory:ThisU searchesthespGecieddirectoryandtakesalllesfound.Example:qRobot: X/usr/local/games/RealTimeBattle/Robots/* :_2 ~?G2.8Usages9ՁVIt9ispGossibletowritelesmorethanonetime.TSoifyouwantthreerotate_and_re.robGot.TJustwrite rotate_and_re.robGotU threetimes.qThisisalsotruefor*.ؼExampleU tournamentle:R:?*Arenas: XCircle.arenaSquare.arenaG/S:2r/s:3Sequences:*#Í2.12%}LoglesMSometimes}itcanbGeusefulto2.13(replay)agameandanalyzeitindetailorjusttostoreforfuturereference,inthiscaseloglescanbGeuseful.Addtheag-l,AwhenstartingRealTimeBattle,withthelenameasargumentU toenablethisfeatureandwithargument'-',thelogisprintedtostdout.Theformatofthelogleisasfollows:Eachlineconsistofaletter,determiningthetypGeofinformation,followedU byawhitespace-separatedlistofarguments.qThefollowinginformationisgiven:ؼHeader:HU [games/sequence][robGots/sequence][sequences][robots]Arenainfo:AU [linefromthearenale]Gamestart:GU [sequencenumbGer]U [gamenumber]Option:OU [option:vqalue]ListofrobQotproperties:LU [robGotid][robotcolour][robotname]RobQotpositioninfo:RU [robGotid][x][y][cannonangle][radarangle][energy]Time:TU [timeelapsed]Prin>tmessage:PU [robGotid][messagetoprint]CoQokie:CU [coGokieid][x][y]Mine:MU [mineid][x][y]Shot:SU [shotid][x][y][dx/dt][dy/dt]Die:DU [typGeofob0jectkilled][objectid](ifrobGot:q[pointsU received][pGosition]) _2 ~?G3.8StructureZ10ՁV2.13%}ReplayingMY*ourbcanreplayagamefromits2.12(logle)eitherbygivingthe2.1(commandlineoption)"-r"orfrom the 2.2(controlwindow).INotethatifthelogiscomingfromstandardinput(commandlineoption"-r?-"),youU cannotdomuchbutwatchthegame,butotherwiseyoucaninuencetheowofthegame:Theslidebaratthetopshowshowfarthecurrentgamehasprogressed.Y*oucanjumpwhereveryouwantU inthegamebydraggingthehandle.VɍF*astforwardandrewindworkasexpGected.-Y*oucanalterthespeedbychangingtheoption5.7(fastforwardU factor).Step.HforwardandstepbackwardcanbGeusedtostudywhathappensindetail.First,dhowever,thegameU shouldbGe2.2(paused).WithU thefourbGottombuttonsyoucanjumpbetweenU gamesandsequences."02.14%}StatisticslesMThestatisticsleisaleusedonlywhena2.11(tournamentle)isspGecied.>Thestatisticswillbesavedto]thislewhenthetournamentends.Otherwiseyoucansaveitbyhandusingthesavebuttoninthe2.9(statisticsU window).( 3Structure:InPthissectionwewilldescribGethestructureoftheprogram,howtherobGotsaremoving,shoGotingandcontrollingU theradar,whenpGointsaregivenandhowatournamentisbuiltup.3.1Rob_otmotionMTheFrobGotbehavesFlikeavehiclewithwheels,Iitrollsintheforwarddirectionwithasmall5.1(rollfriction)and#slidessideways#withamuch#higher5.1(slidingfriction).UThethirdslowingdowneectis5.1(airresistance),U whichisappliedinthedirectionoppGositetotherobotvelocityU andisincreasingwithspeed.ؼThereU arethreewaysU toaecttherobGotmotion,4.5(acceleration),4.5(rotation)and4.5(braking).TheaccelerationisusedtoincreasetherobGotsspeedinthedirectiontherobotfaces;!nyoucannotcontrolthe spGeedU directly*,accelerationistheonlywayU togettherobotmoving.ByFrotatingtherobGotyoucanmakeitturn.QNotethatrotationdoGesnotdirectlyaectthedirectionofmotion,only{pthedirectiontherobGotisfacing.qTheslidingfriction,togetherwithacceleration,willeventually{pcarryoutU theactualturningoftherobGot.Brakingwillincreasetherollfrictionuptoamaximalvqalue.dThisiswhenthewheelareloGckedandtherobGotU isslidinginsteadofrolling.qDon'tforgettoreleasethebrakewhenyouwanttospGeedupagain."03.2EnergyMTheU robGothealthismeasuredbyitsenergy*.qThereareseveralwaysfortherobGottoloseenergy*,itcan*'bGeU hitbyashot,VɍcollideU withanotherrobGotorawall, __2 ~?G3.8StructureZ11ՁVspringU amineorreU ashot.ؼHowever,U thereisonlyonepGossibilitytogainenergy:qtoeatacookie.#Í3.3TheradarMThekprincipalmethoGdtogetinformationonthesurroundingsisviatheradar.Everytimetherobotis upGdated[itwillgeta4.4(radarmessage),תgivinginformationontheclosestob0jectinthecurrentradardirection,U i.e.qdistanceandtypGeofob0ject.IfitisarobGot,thatrobotsenergylevelwillberevealedaswell.ؼSincetheradarinformationisalmostalltherobGotwillknowabouttheenvironment,˚itiscrucialtomakeusexbofitaswellaspGossible.GItisalsoimportantto4.5(maneuvertheradar)well,3tomakeitcollectusefuldata.3.4Therob_otspositionMF*rom][v1.0.5ofRTB]YitispGossibletogettherobotspositionmoredirectly*.1Insteadofhavingtoanalyzethesurroundings withtheradarandndyourpGositionfromthat,eyoucancongureR*TB tosendthe4.4(robGotcoGordinates).qTheU behavioriscontrolledbytheoption5.1(SendrobGotcoordinates).3.5Sho_otingMShoGotingvisthenumbervonemethodtoeliminateotherrobots.InRealTimeBattleashotismovingwithconstant8veloGcity*,calculatedasthesumoftherobGotveloGcityandthe5.3(shotspGeed)inthedirectionthecannonU ispGointing.qItwillmoveuntilitcollideswithanob0ject.ؼWhen theshotisreditisgivenanenergy*,whichdeterminestheinjuriesrobGotswillsuerwhenhit.ETheenergyis,however,limited;'the5.3(minimalenergy)forbidsverylowenergyshots,e.g.Zwyouwanttoremovemines.{The5.3(maximalenergy)isrestrictedbytheamountoftherobGot'scurrentpGotentialshot-energy*,whichU increaseswithtime.ShoGotingis,7however,notwithoutanyrisk,sincearingrobGotitselfwillloseenergy*,5.3(propGortionaltotheU shotenergy).IfacoGokieormineishit,itisdestroyed,regardlessoftheenergyoftheshot.ThereforeyoushoulduseaminimalU amountofenergytoshoGotmines.ShotscollidingwillnotimmediatelybGedestroyed,insteadtheirvelocitiesandenergieswillbesuperposed,soFthatiftwoFcollidingshotsaretravelingFinthesamedirection,ItheirenergieswillbGeaddedand,incaseofaU headoncollision,theirenergieswillcancel.#Í3.6CollisionsMRobGotsnarefragileob0jects,"whichgetdamagedbycollidingwithwallsandotherrobGots.\Whencolliding,"therobGotsۨactlikebouncingballs,Jwiththreefactorsthatinuencesthebehavior,J5.2(thebouncecoecient,themhardnesscoGecientandtheprotectioncoecient).}Onthe5.2(front),stherobGotsaremadeofdierentmaterials,M$usuallyharderandmoreprotective.ĽThiscanbGeusedtoramotherrobots,M$givingmuchmoredamageU thanitreceives. \_2 ~?G3.8StructureZ12ՁV3.7Co_okiesandMinesMCoGokies8Sandminesareessentiallyequalob0jects,qwiththeonlydierencethatrobotswillgainenergyby takingd5coGokiesandloseenergyonmines.Theseob0jectsarerandomlyplacedinthearenaduringthegame.TheirU energyandfrequencycanbGecontrolledwiththe5.4(options).#Í3.8TimeAsthenameoftheprogramindicates,thetimeusedistherealtime..ItisentirelyuptotherobGotstorespondquicklyenoughtotheeventsinthegame.ThegameprogressesbycallingtheupGdatefunctioninregularintervqals. Betweenthese,therobGotshavetosharetheremainingCPUutime.T*opreventrobGotsfromusingtoGo?muchoftheproGcessor,1GtheirCPUtimeislimitedin2.1(competition-mode).The5.5(correspondingoptions)U givemoredetails.ؼThe;real-timenesscan,@however,bGe;violatedundersomecircumstances.hY*oucanspeeduporslowdownthegame3HspGeedbychangingthe5.5(timescale)optionandthereisamethoGdtopreventdisruptionofthegame,Z whenYthesystemloadistoGohigh.}MIfthetimebetweenYtwoupGdatesislongerthanthe5.5(maxtimestep),theU gametimewillbGeslowndownaccordingly*.#Í3.9AgameAtCthebGeginningofagame,Ftherobotsaregivenarandompositiononthearena,Fwithrandomorientation.The=vradarandthecannonarebGothpointingforwardandthe3.5(pGotentialshot-energy)issettozero.iThegoalfortherobGotsisnowtosurviveaslongaspGossibleandatthesametimetodestroytheotherrobGots.A`robGot`willgetonepointforeachoftheenemyrobGotitoutlives.tOneextrapGointis,bhowever,given`toalltheparticipatingrobGots.^QRobotsdyingatthesametimewillsharethepGointsfairly(orinotherwords,'theygetU halfapGointforeachoftheotherdyingatthesametime).ؼAU gameisnishedifeitherthenumbGerU oflivingrobotsislessthantwoU orthe5.5(timeisup).#Í3.10%}AsequenceAfsequenceɉisaseriesofgames,twherethesamerobGotsareghting.BAtɉthebeginningofasequencetherobotproGcessesarestarted.]Thenumberofrobotsinasequenceislimitedto120,$duetothelimitof256openledescriptorsU inLinux.qF*oreveryrobGottwopipGesareopenedascommunicationchannelstotherobGot.ؼThereafterU a2.3(numbGerU ofgames)areplayedU andnallytherobotprocessesarekilled.#Í3.11%}AtournamentAU tournamentisacollectionofsequences.TheU numbGerofrobotsinatournamentis(theoretically)unlimited.AnynumbGerofsequencesisallowed,2buttomakethetournamentfair,2youshouldchoGoseanumbGerof sequences,v-suchothatallrobGotswillplaythesamenumbGerofgames(i.e.#sequence=#robotspergame/GCD(U #robGotspergame,#robotsinthetournament)). _2 ~?G4.8RobQotconstructionXu313ՁV4RobpotG\construction:This2chapterwilldescribGewhatyouneedtoknowinordertobuildyourownrobGots.QMostimportantto know4isthemessaginglanguage,:whichisasetofabGout35commandsusedtocommunicatewiththeserverprogram.qItU isalsoinstructivetostudytheexamplerobGotsintheRobots/directory*.#Í4.1ReadingmessagesMAtathebGeginningofeachsequencetherobGotprocessesarelaunchedbytheserverprogramandassignedtwopipGes,one~forinputandtheotherforoutput.Theseareconnectedtothestdinandstdout,sothatfromtheU robGot'spointofview,itiscommunicatingwiththeserverviathestandardinputandstandardoutput.ؼThisapproachmeansthattherobGotscanbewritteninanyprogramminglanguages.THowever,4therobGotmustbGeabletoknowwhenithasreceivedanewmessage.NT*oachievethisthereare(atleast)threedierentmethoGdsU tochoosefrom:ؼStandardinbloQc>ks:ThislisthesimplestmethoGd,rwhenreadingfromstdin,theprogramisbloGckedluntilthenextmessagearrives.bY*ou)&canthereforemaketheprogramasifthereisalwaysamessagewaiting.bThedrawbackisthatU youcannotdoanycalculationswhilewaitingfornewmessages.T*oU choGosetheblockingmethod,sendthefollowingrobotoptionasso}/onastheprogramisstartedw:cout?<<"RobotOption"<Thisis,ofcourse,notU theintendedmethoGdtobeatopponents,sowetrytoinhibititasmuchaspGossible.ؼInR2.1(compGetition-mode)RrobotshavelimitedCPURzusage,"sothatonerobGotcan'tuseupalltheCPU.It̼couldbGepossibletoddlewiththisbylaunchingchildproGcesses.TButsincethetimeusedbythechildproGcess\willbecountedforassoonastheprocessdies,itshouldbeveryeasytodetectifarobotdoesanythingU suspicious.ItaisnotpGossibletopreventaallwaysaofcheatingwithinR*TB.Itise.g.lpermittedtoreadandwritetoles,@but;remembGerthatorganizersofcompetitionscanforbidthisiftheywish.iBysettingpermissionsandownershipsU oftherobGotexecutablesanddirectoriesthiscanbedonesatisfactory*.ItmaystillbGepossibletondwaysroundtheserestrictions;ifyoudetectsuchaway*,Kpleasesenda1.5(bugrepGort).qByU theway*,U itisuptotheorganizerofatournamenttomakesurethattherulesarefollowed.#Í4.4Messagestorob_otsMInitialize[rst? (in>t)]This2CistheveryrstmessagetherobGotwillget.Iftheargumentisone,iitistherstsequenceinthe5tournamentanditshouldsend4.5(NameandColour)totheserver,zotherwiseitshouldwaitforY*ourNameU andYourColourmessages(seebGelow).Y ourName[name(string)]CurrentU nameoftherobGot,don'tchangeitifyoudon'thaveverygoGodU reasons.Y ourColour[colour(hex)]Current6colouroftherobGot,o$changeitifyounditugly*.UAllrobGotsinateamwillhavethesame colour.GameOption[optionnr(in>t)][v\|alue(double)]AtthebGeginningofeachgametherobGotswillbesentanumbGerofsettings,whichcanbGeusefulfor the9robGot.OF*oracompletelistofthese,lookinthele4.2(Messagetypes.h)forthegame_option_typeenum.dInjlthe5(optionschapter)youcangetmoredetailedinformationoneachoption.dThe2.2(debugU level)isalsosentasagameoptioneventhoughitisnotintheoptionslist._2 ~?G4.8RobQotconstructionXu315ՁVGameStartsv5ThisU messageissentwhenthegamestarts(surprise!)>VRadar[distance(double)][observ>edobjecttypQe(int)][radarangle(double)]Thismessagegivesinformationfromtheradareachturn.H;RemembGerthattheradar-angleisrelative toU therobGotfront;itisgiveninradians.Info[time(double)][spQeed(double)][cannonangle(double)]TheKInfomessagedoGesalwaysKfollowtheRadarmessage.Itgivesmoregeneralinformationonthe stateyqoftherobGot.(FThetimeisthegame-timeelapsedsincethestartofthegame.ThisisnotnecessarilytheU sameastherealtimeelapsed,dueto5.5(timescale)and5.5(maxtimestep).CoQordinates[x(double)][y(double)][angle(double)]v5T*ellsNyouthecurrentrobGotposition. Itisonlysentiftheoption5.1(Sendrobotcoordinates)is1or2.Ifuitis1thecoGordinatesaresentrelativethestartingpGosition,~%whichhastheeectthattherobGotdoGesn'tU knowwhereitisstarting,butonlywhereithasmovedsince.RobQotInfo[energylev>el(double)][teammate? (int)]v5If]youdetectarobGotwithyourradar,_thismessagewillfollow,_givingsomeinformationontherobGot.TheooppGonentsenergylevelwillbGegiveninthesamemannerasyourownenergy(seebGelow).LnThesecondU argumentisonlyinterestinginteam-moGde,1meansateammateand0anenemy*.RotationReac>hed[whathasreached(int)]v5When"therobGotoption4.5(SEND_ROT*ATION_REACHED)is"setappropriately*,thismessageissentwhenarotation(withRotateT*oorRotateAmount)hasnishedorthedirectionhaschanged(whensweeping).qTheU argumentcorrespGondsto'whattorotate'ine.g.q4.5(Rotate).Energy[energylev>el(double)]v5The}endofeachroundtherobGotwillgettoknowitsenergylevel.Itwillnot,however,get}theexactenergy*,U insteaditisdiscretizedintoanumbGerof5.2(energylevels).RobQotsLeft[n>umberofrobots(in>t)]v5AtthebGeginningofthegameandwhenarobotiskilledthenumberofremainingrobotsisbroadcastedtoU alllivingrobGots.Collision[collidingobjectt>ypQe(int)][anglerelativerobQot(double)]v5When5arobGothits(orishitby)somethingitgetsthismessage.4Inthele4.2(MessagetypGes.h)youcanEndalistoftheob0jecttypGes.AkY*ougettheanglefromwherethecollisionoccurred(theanglerelativeVtherobGot)andthetypGeofob0jecthittingyou,Vbutnothowseverethecollisionwas.uThiscan,however,U bGedeterminedindirectly(approximately)bythelossofenergy*.W arning[w>arningtypQe(int)][message(string)]v5AwarningmessagecanbGesentwhenrobGothastobenotiedondierentproblemswhichhaveoGccured.CurrentlyU sevendierentwarningmessagescanbGesent,namelyUNKNOWN_MESSAGE:U Theserverreceivedamessageitcouldn'trecognize.PROCESS_TIME_LOW:TheCPUWusagehasreachedthe5.5(CPUwarningpGercentage).Onlyin2.1(compGetition-mode).MESSAGE_SENT_IN_ILLEGAL_STATE:Themessagereceivedcouldn'tbGehandledinthisstateoftheprogram.qF*orU example4.5(Rotate)issentbGeforethegamehasstarted.UNKNOWN_OPTION:>TherobGotsenta4.5(robotoption)witheitherillegaloptionnameorillegalargumenttoU thatoption._2 ~?G4.8RobQotconstructionXu316ՁVOBSOLETE_KEYWORD:ThekeywordsentisobsoleteandshouldnotbGeusedanymore,́seetheChangeLog leU forinformationonwhattouseinstead.NAME_NOT_GIVEN:TherobGothasnotsentitsnamebeforethegamebegins.Thishappensifthe5.5(robGotU startuptime)istooshortortherobotdoesnotsenditsnameearlyenough.COLOUR_NOT_GIVEN:U TherobGothasnotsentitscolourbeforethegamebegins.DeadRobGot*Edied.Donottrytosendmoremessagestotheserveruntiltheendofthegame,_theserverdoGesn'tU readthem.GameFinishesCurrentU gameisnished,getpreparedforthenext!ExitRobQotExitU fromtheprogramimmediately!qOtherwiseitwillbGekilledforcefully*.#Í4.5Messagesfromrob_otsMWhenAwyousendmessagestoRealTimeBattlemakeshurethattheyarenotlongerthan128chars,Efotherwise RealTimeBattleU willcutthemintwoU partsandmayrepGortanunknownmessage.ؼRobQotOption[optionnr(in>t)][v\|alue(int)]CurrentlyU onlytwooptionsareavqailable:SIGNAL:T*ellstheservertosendasignalwhenthereisamessagewaiting.2Theargumentwilldeterminewhichsignal.PSendthismessage(withargumente.g.PSIGUSR1)assoGonasyouarepreparedtoreceivetheU signal.qDefaultis0,whichmeansdon'tsendanysignals.SEND_SIGNAL:eCT*ellstheservertosendSIGUSR1whenthereisamessagewaiting.Sendthismessage(withU argument1(=true))assoGonasyouarepreparedtoreceivethesignal.qDefaultisfalse.SEND_ROTATION_REACHED:3Ifyouwanttheservertosenda4.4(RotationReached)messagewhenarotationޠisnished,Syoushouldsetthisoption.JWithavqalueof1,themessageissentwhenaRotateT*oor?aRotateAmountisnished,Dwithavqalueof2,changesinsweepdirectionarealsonotied.j`DefaultisU 0,i.e.qnomessagesaresent.USE_NON_BLOCKING:eHSelectshowto4.1(readingmessages)works.ThisoptionshouldbGesentexactlyonceU assoGonastheprogramstarts.qSinceitshouldalwaysU begiven,thereisnodefaultvqalue.Name[name(string)]When)receivingthe4.4(Initialize)messagewithargument1,2indicatingthatthisistherstsequence,youshouldsendbGothyournameandyourcolour.9jIfyournameendswiththestringTeam: Xteamname,youwillbGeintheteamteamname.gF*orexample"NamefooT*eam:mobar"willassignyoutotheteambarandyournamewillbGefoo.AllrobotsinateamwillhavethesamecolourandwillrecognizethemovertheRobGotInfomessage.WF*oramoresophisticatedpossibilities,pleasetakealookontotheR}/ealTimeBattleT;eamF;rameworkU http://rtb-team.sf.net.Colour[homecolour(hex)][a>waycolour(hex)]SeeabGove.BThecoloursarelikenormalfoGotballshirts,thehomecolourisusedunlessitisalreadyused.OtherwiseU theawayU colouror,asalastresort,anon-oGccupiedcolourisselectedrandomly*.I_2 ~?G5.8OptionsY17ՁVRotate[whattorotate(in>t)][angularveloQcity(double)]Set*theangularveloGcity*fortherobot,3Gitscannonand/oritsradar.cfSet'whattorotate'to1forrobot, 2Yforcannon,(4forradarortoasumofthesetorotatemoreob0jectsatthesametime._,TheangularveloGcityisgiveninradianspersecondandislimitedby5.2(Robot(cannon/radar)maxrotatespeed).RotateT o[whattorotate(in>t)][angularveloQcity(double)][endangle(double)]AsRotate, butwillrotatetoagivenangle.'7NotethatradarandcannonanglesarerelativetotherobGotU angle.qY*oucannotusethiscommandtorotatetherobotitself,useRotateAmoun>tinstead!RotateAmoun>t[whattorotate(int)][angularveloQcity(double)][angle(double)]AsU Rotate,butwillrotaterelativetothecurrentangle.Sw>eep[whattorotate(int)][angularveloQcity(double)][rightangle(double)][leftangle(double)] AsU rotate,butsetstheradarand/orthecannon(notavqailablefortherobGotitself)inasweepmoGde.A>ccelerate[v\|alue(double)]SetU therobGotacceleration.qV*alueisboundedby5.2(Robotmax/minacceleration).Brak>e[pQortion(double)]Set=thebrake.iF*ullbrake(pGortion=1.0)meansthatthefrictionintherobotdirectionisequalto5.1 (SlideU friction).ShoQot[shotenergy(double)]ShoGotU withthegivenenergy*.q5.3(Theshotoptions)givemoreinformation.Prin>t[message(string)]PrintU messageonthe2.7(messagewindow).Debug[message(string)]PrintU messageonthe2.7(messagewindow)ifin2.1(debug-moGde).DebugLine[angle1(double)][radius1(double)][angle2(double)][radius2(double)]Drawalinedirecttothearena.Thisisonlyallowedinthehighestdebuglevel(5),terangle(double)][centerradius(double)][circleradius(double)]SimilartoDebugLineabGove,butdrawsacircle.-ThersttwoargumentsaretheangleandradiusoftheU centralpGointofthecirclerelativetotherobGot.qThethirdargumentgivestheradiusofthecircle.(5Options:RealTimeBattleJiscongurablewithabunchofoptions,collectedindierentgroups.Thephilosophyistogiveu#youfullfreedomtosetupthegameinthewayyoulike.шThisdoGesmean,}$however,thatu#somesettingsofU theoptionsmaygivebadcombination,whichcancausetroublesfortheprogram. _2 ~?G5.8OptionsY18ՁV5.1Environmentaloptions#Gra>vitationalConstant:Theaccelerationduetogravitation.PItisabGout9.8ontheearth.Anincreasewillincreasethefriction, therebyU slowdowntherobGots.Airresistance:AsU itsounds.qIncreaseswithspGeed.Rollfriction:TheU frictioninthedirectionoftherobGotifnotbraking.Slidefriction:TheU frictionorthogonaltotherobGotdirection.qAlsothemaximumfrictionifbraking.SendrobQotcoordinates:DeterminesU howcoGordinatesaresendtotherobots.qThefollowingoptionsareavqailable:%/0U -don'tsendanycoGordinates(default)%/1U -sendthecoGordinatesrelativethestartingposition%/2U -sendabsolutecoGordinates#Í5.2Rob_otoptionsMRobQotmaxacceleration:RobGotsU arenotallowedU toacceleratefasterthanthisand...RobQotminacceleration:...qslowerU thanthis.RobQotradius:DeterminesU thesizeoftherobGot.RobQotmass:LargeU robGotmasswillincreasetheimpactofcollisions.RobQotbouncecoecien>t:AectshowwelltherobGotswillbounce.H{Ifzerotherobotswillclingtogetherwhencolliding,^ifthe vqalueU isonetheywillactlikepGerfectbilliardballs.RobQothardnesscoecien>t:DetermineshowseriouslydamagedtherobGotswillbewhencolliding. )Thelowerthevqalue,thesofter theU material.RobQotprotectioncoecien>t:InuencesWhowwellprotectedtherobGotis.b#Thisfactoristobemultipliedwiththedamagingenergy toU gethowmuchtoreducetherobGot'senergy*.RobQotfron>tszie:The@frontoftherobGotisasectionwithdierentmaterials,{usuallyharderandmoreprotective,{so robGotsU caninjureeachotherbyramming.._2 ~?G5.8OptionsY19ՁVRobQotfron>tbouncecoecien>t:SeeU previousfouritems.RobQotfron>thardnesscoecien>t:SeeU previousveitems.RobQotfron>tprotectioncoecien>t:SeeU previoussixitems.RobQotstartenergy:TheU amountofenergytherobGotswillhaveatthebGeginningofeachgame.RobQotmaxenergy:ByU eatingacoGokie,therobotcanincreaseitsenergy;notmorethanthis,though.RobQotmaxrotatespeed:HowU fasttherobGotitselfmayrotate.qUnit:radians/sU .RobQotcannonmaxrotatespeed:MaximumEcannonrotatespGeed.SNotethatthecannonandtheradarmoverelativetotherobGot, =sothe actualU rotationspGeedmaybehigher.RobQotradarmaxrotatespeed:MaximumU radarrotatespGeed.qSeenoteabove.RobQotenergylev>els:The8robGotwillonlyknowitsenergyapproximately*.hThiswilldecidehowmanydiscretationlevelswill bGeU used.#Í5.3Shotoptions#Shotradius:SizeU ofshots.qShouldbGelessthan5.2(robotradius).ShotspQeed:ShotsU aremovingwiththisspGeedinthedirectionofthecannonplustheveloGcityoftherobGot.ShoQotingpenalt>y:When4shoGotingtherobotitselfgetsdamaged.3Thisisthefactor,cbywhichtheshotenergyismultiplied, toKgetthedamagingenergy*.NIfthenumbGerKofrobotsislarge,thisnumberKisreduced,sothatyouneverloseU inaverageU byshoGoting(ifyouhit).Shotminenergy:TheU lowestshotenergyallowed.qArobGottryingtoshootwithlessenergywillfailtoshoot.ShotmaxpQoten>tialenergy:TheU robGotshaveU ashotenergy*,whichincreaseswithtime,butwillneverexceedthisvqalue.ShotpQoten>tialenergyincreasespeed:DeterminesU howfasttherobGotsshotenergynotedabove,U willincrease.qUnit:energy/sU .#]_2 ~?G5.8OptionsY20ՁV5.4ExtrasoptionsԍCoQokiemaxenergy:捑TheU coGokieenergyisarandomnumberU betweenU cookiemaxenergyandcookieminenergy*._CoQokieminenergy:SeeU abGove.CoQokiefrequency:TheU numbGerofcookiepersecondthatwillappearinaverage.CoQokieradius:SizeU ofcoGokie.Minemaxenergy:TheU mineenergyisarandomnumbGerU betweenminemaxenergyandmineminenergy*.Mineminenergy:SeeU abGove.Minefrequency:TheU numbGerofminepersecondthatwillappearinaverage.Mineradius:SizeU ofmine.CoQokiecolour:CoGokieU colourinhexadecimalred-green-blueform.Minecolour:AsU abGove." 5.5TimeoptionsMTimeout:Thisisthelongesttimeagamewilltake.SWhenthetimeisupallremainingrobGotsarekilled, without gettingU anymorepGoints.Maxtimestep:IfthecomputeristempGorarilysloweddown,thetimebGetweenupGdatescanbetolong.ISettingthis optionywillmaketheprogramarticiallyslowdownthecloGckinthosecasesandthereforeviolatetherealtimeness.Timescale:捑IncreasingtimescaletomorethanonemeansthatthegamecloGckwillgofasterthananordinaryclock.Changing thisvqaluecanbGeusefullifyoueitherwanttogivetherobGotsmoretimeorifyouhaveafastcomputerU youmaywanttospGeedthegameup.UpQdatein>terv\|al:捑ThisuoptiondeterminesthetimebGetweenurobotupdates,}i.e.,howuoftentherobotstatesarechanged.It]isnotinuencedbythe'TimeScale'andcannotbGealteredwhentheprogramisrunning.;TheaccuracyU is1/100s(depGendingoftheprecisionofthesystemthatRealTimeBattleisrunningon).,Ԡ_2 ~?G5.8OptionsY21ՁVRobQotstartuptime:DeterminesathetimebGetweenatherobotprocessesareexecutedandthesequencebegins.@Ifrobotsare blackĒandhavenoname,oyoumayneedtoincreasethestartuptimefromthedefaultofonesecond.ThiscanhappGenif,forexample,therobGotsaremany*,largeoryouarerunningonasloworremotecomputer.StartCPUtime:Inx2.1(compGetition-mode)xarobGot'sCPUcusageislimited.UAtthebeginningofasequencearobotwillgetU thisamountofCPUtimetospGend.ExtraCPUtime:WhenU thestartCPUtimeisspGent,therobotwillgetthisamountofextraCPUtime.ExtraCPUpQeriod:TheextraCPUtimemustlastanentireCPUpGeriod, otherwisetherobGotwilldieinthecurrentgame.CPUw>arningpQercentage:WhenU therobGothasusedupthisamountofitsCPUtimeitwillreceiveawarningmessage.ProQcessc>heckinterv\|al:InU 2.1(compGetition-mode)U thiswilldecidehowoftentheprogramwillcheckforCPUusage.Loggingfrequency:T*oreducethesizeof2.12(logles)youcanincreasethisoption.AWiththisoption,2.12(robGotposition info)U areonlyloggedeveryn:th5.5(upGdateintervqal).#Í5.6WindowsizesMHerebyoucansettheinitialsizesforsomewindows,namelythe2.5(arenawindow),the2.7(messagewindow),theSN2.6(scorewindow)andthe2.9(statisticswindow).pY*oucanalsosetthepGositionfortherstthreeandtheU 2.2(controlwindow).5.7MiscellaneousoptionsMArenascale:OverallU scaleofthearena.qAvqalueof2givesdoublesidelength,i.e.,afourtimeslargerarea.F astforw>ardfactor:Determines,when2.13(replaying),thespGeedwhenthefastforwardbuttonortherewindbuttonis pressed.MaxrobQotsallo>wedsimultaneously:AllowstheusertochangethemaximumamountofrobGotsallowedinasequence.?VIftherearetoGomany*, theU systemmightcomplain(howmanydepGendsonthesystem).Bac>kgroundcolour:BackgroundU colourand...F oregroundcolour:...qforegroundU colourforthearena.5_2 ~?G6.8ArenaconstructionY)22ՁVColourforR TBmessages:ColourU forthetextwhenR*TBsendsmessages.ҍRobQotsearc>hpath:Thiseisacolon-separatedlistofdirectorieswhichwillbGesearchedforrobGotswhena2.3 (newtournament)isstarted.LsThesubGdirectoryRobotsinthertbinstalldirectory(default:/usr/local/games/RealTimeBattle)U isalwaysU searched.Arenasearc>hpath:SameU asabGove,U butforarenalesinsteadofrobots.qHerethesubdirectoryisArenas.(H6ArenaG\construction:In"RealTimeBattle,Uitisverysimpletoconstructyourownarenas.ٿThelanguageconsistsofonlyelevencommands,and/thereareessentiallyfourbuildingbloGcks:line,circle,inner_circle/andarc..ThisismainlybGecause.ofspeedreason,rforcirclesandlinesitisveryeasytocheckifacollisionhasoGccured.Circleandinner_circle~preventsrobGotsfromenteringintoacircleorgettingoutofacirclerespGectively*.4ThelineandtheDarcstoptherobGotsfromenteringthroughthelongside(thecurvedforthearc),Gbutnocheckismadeonutheshortside,soyouhavetoputcirclesateachendofthelinetomakeitasolidob0ject.WThecommandspolygon,Sclosed_polygonRzandpoly_curveareintendedtosimplifythisproGcedure,alwaysRzgivingapropGerob0ject.ؼAllU anglesarebydefaultinradiansbutcanbGechangedtodegreesbythecommandangle_unit?degrees.NotethatRealTimeBattledoGesnotcheckwhetherthearenalegivesacorrectarena,nitisentirelyupto you.qHowever,U itwillcomplainifthereareviolationstothelanguagerules.ArenaGlesshouldbGegiventhepostx.arenaandbestoredinthearenadirectoryforRealTimeBattletondU them.Thetbounce?coefficientandhardnessargumentgiventoallwallcreatingcommands,determinesthematerialofthewall.wTheyarebGothvqaluesbetween0and1.wHarderwallswillinjurecollidingrobotsmoreandU higherbGouncecoecientmakethembGouncebetter.Y*ouU arealsoencouragedtostudythearenasincludedandlearnfromtheexamples.# o6.1ArenacommandsMAcommand*consistsofthecommandnameandtheargumentsseparatedbywhitespace.SBesuretogivetherightU numbGerofarguments!InU thecommandlist,theargumentsaregiveninsquarebrackets.tscale[v\|alue]Thisvqaluetimesthe5.7(arenascale)willgivethescalefactor,QbywhichallcoGordinatesaremultiplied.ThisU commandmustbGe,ifitexists,theveryrstinthele,defaultis1.0.ҍangle_unit[unit]SwitchesU totheselectedangleunit,whichcanbGeeitherofdegreesorradians.qDefaultisradians.bQoundary[left][up][righ>t][down]TheXter_x][center_y][radius]RobGotsU arelimitedtotheinsideofthiscircle.circle[bQounce][hardness][cen>ter_x][center_y][radius]CircleU shapGedwall.line[bQounce][hardness][thic>kness][start_x][start_y][end_x][end_y]CreatesѠaline.EItonlypreventsѠtherobGotfrompassingthroughtolongside,soremembertoputcircles atU theshortends.arc[bnc][hardn][thic>kn][center_x][ctr_y][inner_radius][outer_rds][angle1][angle2]AnU arcisasectorofaringwithintwoU angles.qLiketheline,itneedscirclesatbGoththeends.pQolygon[bounce][hardn][thic>kn][numbQerofvertices]([center_x][center_y])...ThisU willcreateanumbGerU ofcircles,connectedbylines.closed_pQolygon[bounce][hardn][thic>kn][numbQerofvertices]([center_x][center_y])...AsU apolygon,buttherstandthelastverticesarealsoconnectedbyaline.pQoly_curv>e[bnc][hardn][thickn][start_x][start_y][dir_x][dir_y]([commandargs...]) ...TheDXpoly_curveisthemostpGowerfulDXofthearenacommands.kItisusedtobuildwallswithlinesand arcs.clAt*eachstepyouhaveacurrentpGositionanddirection,3UwhichareaectedbythesubGcommands.TheU lastsubGcommandmustbeCorQ.L[length]/DrawU alinewithgivenlengthinthecurrentdirection.T[angle]/T*urnU thecurrentdircetion.A[angle][radius]/DrawU anarc.C/FinishU byconnectingwiththestartingpGoint.Q/Quit.exclusion_pQoin>t[position_x][position_y]When/thearenainsidethebGoundaryconsistsofseveralseparatedareas,4youshouldexcludeallbut onembyinsertingexclusionpGoints.hAllpGointsfromwhichyoucandrawastraightlinetoanexclusionpGointU withoutcrossingawall,areconsideredtobGeoutsidethearena.NR;_2G!N ecbx1200]f ecbx1000&Lt$ffffecbx1440HЃ ecti1000Iqqecss2074qL ectt1000 1 ecrm1000 !", cmsy10Wrealtimebattle-1.0.8/Documentation/RealTimeBattle.sgml0000644000175000017500000016744710320527635021231 0ustar moimoi
RealTimeBattle User Manual, version 1.0.8 <author>Erik Ouchterlony and Ragnar Ouchterlony, Johannes Nicolai (<htmlurl name="jonico@users.sourceforge.net" url="mailto:jonico@users.sourceforge.net">) <date> 4 October 2005 <!-- <abstract> --> </titlepag> <toc> <!-- ################ Introduction ################## --> <sect>Introduction<label id="Introduction"> <p> This is the user manual for RealTimeBattle. Here you should find how to run the program, how the program works, how to create your own robots and how to construct arenas. RealTimeBattle is a programming game for Unix, in which robots controlled by programs are fighting each other. The goal is to destroy the enemies, using the radar to examine the environment and the cannon to shoot. Even though the environment the robots are moving in is fairly simple, it is far from easy to construct an intelligent robot-program. RealTimeBattle is constructed to be easy to use, flexible and fast. The intention is that the program could be used as a test for intelligent algorithms, as well as just a game to play and enjoy. Features include: <itemize> <item> Game progresses in real time, with the robot programs running as child processes to RealTimeBattle. <item> The robots communicate with the main program using the standard input and output. <item> Robots can be constructed in almost any programming language. <item> Up to 120 robots can compete simultaneously. <item> A simple messaging language is used for communication, which makes easy to start constructing robots. <item> Robots behave like real physical object. <item> You can create your own arenas. <item> Highly configurable. <item> Possibility to plug in external clients. <item> Basic team support directly integrated in the game, sophisticated team play available due to team frameworks. </itemize> <sect1>More information<label id="More information"> <p> More information can be found in the <tt>INSTALL</tt>, <tt>AUTHORS</tt>, <tt>BUGS</tt>, <tt>TODO</tt>, <tt>README</tt>, <tt>FAQ</tt> and <tt>ChangeLog</tt> files in the distribution. More updated information is available on the <url name="RealTimeBattle homepage" url="http://realtimebattle.sf.net">, where you can also find robots, news on tournaments as well as this manual in different formats. <sect1>Requirements<label id="Requirements"> <p> The hardware requirements are very much dependent on what you do. Running a few robots should be possible to do on any computer on which GNU/Linux or any other Unixes can be run. The demand on hardware will, however, grow with the number of robots you want on the battlefield simultaneously; running 120 advanced robots is certainly demanding for any personal computer. RealTimeBattle is only available on Unix. It is developed on a Linux-machine, but it should compile on other Unix dialects too. Running in <ref id="Command line options" name="competition-mode"> is currently only possible on Linux with the '/proc'-directory enabled, because of the need to get the cpu usage of child processes. The only software requirement is <url url="http://www.gtk.org" name="gtk+">, which is used for the graphical user interface. <sect1>Background<label id="Background"> <p> The project started in August 1998. Inspiration came from <url url="http://www.robotbattle.com/" name="RobotBattle">, a very interesting game we used to enjoy some years earlier. That version of RobotBattle, however, had some drawbacks: It was only available on Windows and the robots were written in an own language, which restricts the possibilities to write intelligent robots. RobotBattle has since then been under development, but it still lack support for other operative systems. We therefore decided to construct a Unix robot programming game, which makes use of features of a modern OS. <sect1>License<label id="License"> <p> RealTimeBattle is distributed under the <url url="http://www.gnu.org/copyleft/gpl.html" name="GNU General Public License">, in the spirit of the Linux community. Official versions of RealTimeBattle will be released by the authors. Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony, see the <tt>AUTHORS</tt> file for further developers. 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. <sect1>Bug reports<label id="BugReports"> <p> If you find anything in this package which doesn't work, appears strange, is missing, is spellt wrong or is just confusing, don't hesitate to send in a bug report to the <url name="Sourceforge Bug Tracker" url="http://sourceforge.net/tracker/?group_id=561&atid=100561">. <!-- ################ Usage ################## --> <sect>Usage<label id="Usage"> <p> This chapter describes how to use the program itself. If you find it boring to read it through, feel free to use trial and error as usual, and return here if you stumble upon something confusing in the user interface. It is, however, a good idea to read the short section on <ref name="command line options" id="Command line options"> below. Note also that there is no built-in help in the program - here is where you should search for help. <sect1>Command line options<label id="Command line options"> <p> On the command line, there are two options to set which control the overall behaviour of RealTimeBattle. Here you can choose the option file, which determines the default values of the <ref name="options" id="Options">. You can also select in which game-mode the program will run: <tt>debug</tt>, <tt>normal</tt> or <tt>competition</tt> mode. <code> Usage: RealTimeBattle [options] Options: --debug_mode, -d debug mode --debug_level [0-5], -D sets the initial debug level. implies -d --normal_mode, -n normal mode (default) --competition_mode, -c competition mode --no_graphics, -g no graphics will be displayed --option_file [file], -o selects option-file (default: $HOME/.rtbrc) --log_file [file], -l make log file, if 'file' is '-' the log is sent to STDOUT --tournament_file [file], -t specify a tournament file to autostart a tournament --statistics_file [file], -s file to print the statistics to when autostarting --message_file [file], -m redirect messages to 'file'. '-' as 'file' is equivalent to STDOUT. If both log and messages are send to STDOUT, '-m' will be ignored --replay [file] -r a log file to replay. if '-' is specified as file, input is taken from STDIN --help, -h prints this message --version, -v prints the version number --port_number -p specifies the port for remote clients (default is 32134) </code> The port_number option is only available, if you chose to compile RealTimeBattle with the --enable-network option. See the <tt>INSTALL</tt> file for more information. The differences between the three competition modes are shown in the following table <#if table="char" > <code> +----------------------------------+-------+--------+-------------+ | Mode | Debug | Normal | Competition | +----------------------------------+-------+--------+-------------+ | Debug command available | Yes | No | No | | Pause in game | Yes | Yes | No | | Step through game | Yes | No | No | | Robot CPU time unlimited | Yes | Yes | No | +----------------------------------+-------+--------+-------------+ </code> </#if> <#if table="real" > <table loc="htb"> <tabular ca="|l|ccc|"><hline> Mode | Debug | Normal | Competition @<hline> Debug command available | Yes | No | No @ Pause in game | Yes | Yes | No @ Step through game | Yes | No | No @ Robot CPU time unlimited | Yes | Yes | No @<hline> </tabular> </table> </#if> <sect1>Control window<label id="Control window"> <p> <descrip> <tag>New tournament:</tag> This will start a new tournament. Section <ref id="Start new tournament window" name="Start new tournament window"> will give more information. <tag>Replay tournament:</tag> <ref id="replaying" name="Replay a game">. It will ask you to select a <ref id="log_files" name="log file"> of the game you want to study. <label id="pause"> <tag>Pause:</tag> Pauses the game, in <ref id="Command line options" name="competition-mode"> the pausing will be postponed until the end of the current game. <tag>End:</tag> Stops the current tournament. <tag>Options:</tag> Brings up the <ref id="Options_window" name="options window">. <tag>Statistics:</tag> Displays the <ref id="Statistics window" name="statistics window">. <tag>Show arena window:</tag> This box can be used to show and hide the three windows used when a game is running, i.e., the <ref id="Arena_window" name="arena window">, the <ref id="Score window" name="score window"> and the <ref id="Message window" name="message window">. <tag>Quit:</tag> Terminates the program. </descrip> In <ref id="Command line options" name="debug-mode"> there is another set of buttons available. They are intended to help with debugging of robots. Note that you can debug a running process; if you use <tt>gdb</tt> the command is <tt>gdb robot-name process-number</tt>. <descrip> <tag>Step:</tag> In a <ref name="paused" id="pause"> game this will move one time step forward. This is very useful when running the robot in a debugger, since otherwise the robot will be flooded with messages. <tag>End game:</tag> This will finish the current game. It has the same effect as a <ref id="Timeout" name="timeout"> would have. <tag>Kill marked robot:</tag> In debug-mode, you can mark a robot in the <ref id="Score window" name="score window">. That robot will die if you press this button. <label id="Debug level"> <tag>Debug level:</tag> Changing debug level is a way of telling robots which messages they should send. The range is between 0 and 5, where 0 means no debugging and 5 is the highest level of debugging, i.e. all debug-messages should be send. </descrip> When you are replaying a logfile (not from stdout) there are a number of widgets to control the replaying. See further in the chapter about <ref id="replaying" name="replaying">. <sect1>Start new tournament window<label id="Start new tournament window"> <p> To select robots and arenas for the tournament, mark the files to the right and press the <tt>add</tt> button. Selected files are shown to the left and can be removed correspondingly. <label id="NumberOfGames"> A <ref id="A_tournament" name="tournament"> consists of a number of <ref id="A_sequence" name="sequences"> of <ref id="A_game" name="games">. In each sequence the same robots are playing in all games. Here you select the number of games and sequences as well as the number of robots in each sequence. If you intend to play with all robots every game you are advised to choose only one sequence and instead increase the number of games. The reason is to avoid restarting of the robot processes which can take a while, especially if the number of robots is large. It is also possible to load a tournament file or save the current tournament. The last tournament played is stored in /tmp/rtb/tmp.tour and is always displayed when this window opens. If it is not available an empty tournament is displayed. You have to select at least two robots and one arena to be able to start. <sect1>Robots and arena directories<label id="robot_and_arena_directories"> <p> In order for the program to find the robots and arenas you have set two options <ref name="Robot search path" id="Robot search path"> and <ref name="Arena search path" id="Arena search path">. The subdirectories <tt>Robots</tt> and <tt>Arenas</tt> in the rtb installl directory (default: <tt>/usr/local/games/RealTimeBattle</tt>), specified at compile-time in the main Makefile, are always searched, regardless of the options, but if you create a new directory, or if you installed RealTimeBattle in some other directory, you need to set these options. <sect1>Arena window<label id="Arena_window"> <p> This is where the battle takes place. If you want a more detailed view, use the zoom buttons or press +, - or 0. The robots are visualized as coloured circles with an angle shape showing the radar direction, the thick line is the cannon and the thin line points in the front direction. <sect1>Score window<label id="Score window"> <p> In this window the robots playing in the current sequence are listed. <sect1>Message window<label id="Message window"> <p> Here are messages sent by the robots using <ref id="Print" name="Print and Debug"> displayed. The most recent messages are displayed at the top. You can clean the window and choose to only see new messages from a particular robot. <sect1>Options window<label id="Options_window"> <p> Here you can change a number of options. In the <ref id="Options" name="Options chapter"> you can get detailed information on each option. The changes are not applied until either the <tt>apply</tt> button or the <tt>OK</tt> button is pressed. You can save your options to a file: <tt>Save options</tt> will save the options to a file of your choice and <tt>Save as default</tt> will save them to <tt>.rtbrc</tt> in your home directory. The <tt>Default</tt> button will reset all options to their default values. <sect1>Statistics window<label id="Statistics window"> <p> You can study the statistics of the current tournament in some different ways. You can either display <itemize> <item> statistics on individual <bf>Robot</bf>s, <item> the result of a <bf>game</bf>, <item> the <bf>sequence total</bf> or <item> the <bf>total</bf> of the tournament. </itemize> Pressing the arrowed buttons will move you to the first, back one, forward one or to the last element respectively. The middle bar will show what is displayed and pressing it will update the statistics if the game is in progress. If you are using gtk+1.1.x, it is also possible to sort with respect to different columns by clicking on the corresponding title box. <sect1>Running without graphics<label id="no_graphics"> <p> If you want, you can run RealTimeBattle without any graphics at all. This can be especially useful when currying out a long series of tests or running a competition. To use this option you have two choices: Either you add the flag <tt>-g</tt> when launching the program, or you disable the graphics at compile time (see the <tt>INSTALL</tt> file for more information). The latter alternative is useful as the executable gets smaller and therefore faster on low memory machines. It also enables you to run RealTimeBattle on machines which haven't got <tt>gtk+</tt> installed. When running without graphics you have to give a tournament file, otherwise nothing at all will happen. It is also a good idea to create a log file and/or a statistics file if you want to know the result. <sect1>Tournament files<label id ="tournament_files"> <p> The tournament file is specified as a <ref id="Command line options" name="command line option">. When specified a tournament will automatically begin and end. To save the statistics see section <ref id="statistics_files" name="statistics file"> for more information. A tournament file consists of five keywords. All of these keywords can be written several times, but keep in mind that only the last one of the keywords that takes a number as argument is counted. All keywords should be followed by a semicolon. <descrip> <tag>Games/Sequence or g/s:</tag> Takes a number or a <tt>*</tt> as an argument. The number is how many games should be played per tournament. The asterisk means that the program takes the exact amount of arenas and uses this as the argument. The default value is 1. <tag>Robots/Sequence or r/s:</tag> Takes a number or a <tt>*</tt> as an argument. The number is how many robots is playing in each sequence. The asterisk means that the program takes the exact amount of robots and uses this as the argument. The default value is 2. <tag>Sequences or seq:</tag> Takes a number or a <tt>*</tt> as an argument. This number tells how many sequences shall be played in the tournament. The asterisk means that the program takes the exact amount of robots and the robots per sequence, does a binomial calculation to determine the number of sequence for all robots to meet each other exactly once, and uses this number as the argument. The default value is 1. <tag>Robots or r:</tag> Takes one or more robot files as its argument. <tag>Arenas or a:</tag> Takes one or more arena files as its argument. </descrip> File arguments can be one of the following: <descrip> <tag>Just the file:</tag> This searches the path for the file Example: <tt>Robot: empty.robot</tt> <tag>Full path to the file:</tag> This takes the given file Example: <tt>Arena: /usr/local/games/RealTimeBattle/Arenas/Circle.arena</tt> <tag>All files in path:</tag> This searches the whole path and takes all files found. Example: <tt>Arena: *</tt> <tag>One specific directory:</tag> This searches the specified directory and takes all files found. Example: <tt>Robot: /usr/local/games/RealTimeBattle/Robots/*</tt> </descrip> It is possible to write files more than one time. So if you want three rotate_and_fire.robot. Just write rotate_and_fire.robot three times. This is also true for <tt>*</tt>. Example tournament file: <tt> R: * Arenas: Circle.arena Square.arena G/S: 2 r/s: 3 Sequences: * </tt> <sect1>Log files<label id ="log_files"> <p> Sometimes it can be useful to <ref name="replay" id="replaying"> a game and analyze it in detail or just to store for future reference, in this case log files can be useful. Add the flag <tt>-l</tt>, when starting RealTimeBattle, with the filename as argument to enable this feature and with argument <tt>'-'</tt>, the log is printed to stdout. The format of the log file is as follows: Each line consist of a letter, determining the type of information, followed by a whitespace-separated list of arguments. The following information is given: <descrip> <tag>Header:</tag> H [games/sequence] [robots/sequence] [sequences] [robots] <tag>Arena info:</tag> A [line from the arena file] <tag>Game start:</tag> G [sequence number] [game number] <tag>Option:</tag> O [option:value] <tag>List of robot properties:</tag> L [robot id] [robot colour] [robot name] <label id="RobotPositionInfo"> <tag>Robot position info:</tag> R [robot id] [x] [y] [cannon angle] [radar angle] [energy] <tag>Time:</tag> T [time elapsed] <tag>Print message:</tag> P [robot id] [message to print] <tag>Cookie:</tag> C [cookie id] [x] [y] <tag>Mine:</tag> M [mine id] [x] [y] <tag>Shot:</tag> S [shot id] [x] [y] [dx/dt] [dy/dt] <tag>Die:</tag> D [type of object killed] [object id] (if robot: [points received] [position]) </descrip> <sect1>Replaying<label id ="replaying"> <p> You can replay a game from its <ref name="log file" id="log_files"> either by giving the <ref name="command line option" id="Command line options"> <tt>&dquot;-r&dquot;</tt> or from the <ref name="control window" id="Control window">. Note that if the log is coming from standard input (command line option <tt>&dquot;-r -&dquot;</tt>), you cannot do much but watch the game, but otherwise you can influence the flow of the game: <itemize> <item> The slidebar at the top shows how far the current game has progressed. You can jump wherever you want in the game by dragging the handle. <item> Fast forward and rewind work as expected. You can alter the speed by changing the option <ref name="fast forward factor" id="Fast forward factor">. <item> Step forward and step backward can be used to study what happens in detail. First, however, the game should be <ref name="paused" id="pause">. <item> With the four bottom buttons you can jump between games and sequences. </itemize> <sect1>Statistics files<label id ="statistics_files"> <p> The statistics file is a file used only when a <ref id="tournament_files" name="tournament file"> is specified. The statistics will be saved to this file when the tournament ends. Otherwise you can save it by hand using the <tt>save</tt> button in the <ref name="statistics window" id="Statistics window">. <!-- ################ Structure ################## --> <sect>Structure<label id="Structure"> <p> In this section we will describe the structure of the program, how the robots are moving, shooting and controlling the radar, when points are given and how a tournament is built up. <sect1>Robot motion<label id="Robot_motion"> <p> The robot behaves like a vehicle with wheels, it rolls in the forward direction with a small <ref name="roll friction" id="RollFriction"> and slides sideways with a much higher <ref name="sliding friction" id="SlideFriction">. The third slowing down effect is <ref name="air resistance" id="AirResistance">, which is applied in the direction opposite to the robot velocity and is increasing with speed. There are three ways to affect the robot motion, <ref name="acceleration" id="Accelerate">, <ref name="rotation" id="Rotate"> and <ref name="braking" id="Brake">. The acceleration is used to increase the robots speed in the direction the robot faces; you cannot control the speed directly, acceleration is the only way to get the robot moving. By rotating the robot you can make it turn. Note that rotation does not directly affect the direction of motion, only the direction the robot is facing. The sliding friction, together with acceleration, will eventually carry out the actual turning of the robot. Braking will increase the roll friction up to a maximal value. This is when the wheel are locked and the robot is sliding instead of rolling. Don't forget to release the brake when you want to speed up again. <sect1>Energy<label id="Energy"> <p> The robot health is measured by its energy. There are several ways for the robot to lose energy, it can <itemize> <item> be hit by a shot, <item> collide with another robot or a wall, <item> spring a mine or <item> fire a shot. </itemize> However, there is only one possibility to gain energy: to eat a cookie. <sect1>The radar<label id="The_radar"> <p> The principal method to get information on the surroundings is via the radar. Every time the robot is updated it will get a <ref name="radar message" id="Radar">, giving information on the closest object in the current radar direction, i.e. distance and type of object. If it is a robot, that robots energy level will be revealed as well. Since the radar information is almost all the robot will know about the environment, it is crucial to make use of it as well as possible. It is also important to <ref name="maneuver the radar" id="Rotate"> well, to make it collect useful data. <sect1>The robots position<label id="Position"> <p> From v1.0.5 of RTB it is possible to get the robots position more directly. Instead of having to analyze the surroundings with the radar and find your position from that, you can configure RTB to send the <ref name="robot coordinates" id="Coordinates">. The behavior is controlled by the option <ref name="Send robot coordinates" id="SendCoordinates">. <sect1>Shooting<label id="Shooting"> <p> Shooting is the number one method to eliminate other robots. In RealTimeBattle a shot is moving with constant velocity, calculated as the sum of the robot velocity and the <ref name="shot speed" id="ShotSpeed"> in the direction the cannon is pointing. It will move until it collides with an object. When the shot is fired it is given an energy, which determines the injuries robots will suffer when hit. The energy is, however, limited; the <ref name="minimal energy" id="ShotMinEnergy"> forbids very low energy shots, e.g. you want to remove mines. The <ref name="maximal energy" id="ShotMaxEnergy"> is restricted by the amount of the robot's current potential shot-energy, which increases with time. Shooting is, however, not without any risk, since a firing robot itself will lose energy, <ref name="proportional to the shot energy" id="ShootingPenalty">. If a cookie or mine is hit, it is destroyed, regardless of the energy of the shot. Therefore you should use a minimal amount of energy to shoot mines. Shots colliding will not immediately be destroyed, instead their velocities and energies will be superposed, so that if two colliding shots are traveling in the same direction, their energies will be added and, in case of a head on collision, their energies will cancel. <sect1>Collisions<label id="Collisions"> <p> Robots are fragile objects, which get damaged by colliding with walls and other robots. When colliding, the robots act like bouncing balls, with three factors that influences the behavior, <ref name="the bounce coefficient, the hardness coefficient and the protection coefficient" id="BounceCoefficient">. On the <ref name="front" id="RobotFront">, the robots are made of different materials, usually harder and more protective. This can be used to ram other robots, giving much more damage than it receives. <sect1>Cookies and Mines<label id="Cookies_and_mines"> <p> Cookies and mines are essentially equal objects, with the only difference that robots will gain energy by taking cookies and lose energy on mines. These objects are randomly placed in the arena during the game. Their energy and frequency can be controlled with the <ref name="options" id="Cookie_and_mine_options">. <sect1>Time<label id="Time"> <p> As the name of the program indicates, the time used is the real time. It is entirely up to the robots to respond quickly enough to the events in the game. The game progresses by calling the update function in regular intervals. Between these, the robots have to share the remaining CPU time. To prevent robots from using too much of the processor, their CPU time is limited in <ref id="Command line options" name="competition-mode">. The <ref name="corresponding options" id="CPUOptions"> give more details. The real-timeness can, however, be violated under some circumstances. You can speed up or slow down the game speed by changing the <ref name="timescale" id="TimeScale"> option and there is a method to prevent disruption of the game , when the system load is too high. If the time between two updates is longer than the <ref name="max timestep" id="MaxTimestep">, the game time will be slown down accordingly. <sect1>A game<label id="A_game"> <p> At the beginning of a game, the robots are given a random position on the arena, with random orientation. The radar and the cannon are both pointing forward and the <ref id="Shooting" name="potential shot-energy"> is set to zero. The goal for the robots is now to survive as long as possible and at the same time to destroy the other robots. A robot will get one point for each of the enemy robot it outlives. One extra point is, however, given to all the participating robots. Robots dying at the same time will share the points fairly (or in other words, they get half a point for each of the other dying at the same time). A game is finished if either the number of living robots is less than two or the <ref id="Timeout" name="time is up">. <sect1>A sequence<label id="A_sequence"> <p> A sequence is a series of games, where the same robots are fighting. At the beginning of a sequence the robot processes are started. The number of robots in a sequence is limited to 120, due to the limit of 256 open file descriptors in Linux. For every robot two pipes are opened as communication channels to the robot. Thereafter a <ref id="NumberOfGames" name="number of games"> are played and finally the robot processes are killed. <sect1>A tournament<label id="A_tournament"> <p> A tournament is a collection of sequences. The number of robots in a tournament is (theoretically) unlimited. Any number of sequences is allowed, but to make the tournament fair, you should choose a number of sequences, such that all robots will play the same number of games (i.e. #sequence = #robots per game / GCD( #robots per game, #robots in the tournament)). <!-- ################ Robot Construction ################## --> <sect>Robot construction<label id="Robot construction"> <p> This chapter will describe what you need to know in order to build your own robots. Most important to know is the messaging language, which is a set of about 35 commands used to communicate with the server program. It is also instructive to study the example robots in the <tt>Robots/</tt> directory. <sect1>Reading messages<label id="Reading messages"> <p> At the beginning of each sequence the robot processes are launched by the server program and assigned two pipes, one for input and the other for output. These are connected to the <tt>stdin</tt> and <tt>stdout</tt>, so that from the robot's point of view, it is communicating with the server via the standard input and standard output. This approach means that the robots can be written in any programming languages. However, the robot must be able to know when it has received a new message. To achieve this there are (at least) three different methods to choose from: <descrip> <tag>Standard in blocks:</tag> This is the simplest method, when reading from stdin, the program is blocked until the next message arrives. You can therefore make the program as if there is always a message waiting. The drawback is that you cannot do any calculations while waiting for new messages. To choose the blocking method, send the following robot option <em>as soon as the program is started</em>: <verb> cout << "RobotOption " << USE_NON_BLOCKING << " " << 0 << endl; </verb> Note that this is strictly c++ code. If you don't use c++ just print the given information to stdout. endl is equal to 'end of line'. <tag>Select:</tag> Using the Unix libc function <tt>select</tt> makes it possible for the robot to have better control over when to look for new messages. It enables you, for example, to read all messages available, do some calculations, send commands and thereafter wait for more messages. To learn more of <tt>select</tt>, please read its Unix documentation ( e.g. man pages or emacs info ). To choose the select method, send the following robot option <em>as soon as the program is started</em>: <verb> cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl; </verb> Note that this is strictly c++ code. <tag>Signals:</tag> If you want, you can tell RealTimeBattle to send the robot a signal whenever a new set of messages is sent. This method makes it possible for the robot to be continuously updated with information from the server program also when the robot is busy doing calculations. If you feel you don't know how to use signals, look in the Unix documentation to or study other robots to learn more. To choose the signal method, send the following robot option <em>as soon as the program is started</em>: <verb> cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl; cout << "RobotOption " << SIGNAL << " " << SIGUSR1 << endl; </verb> Note that this is strictly c++ code. You can of course choose any signal you want instead of <tt>SIGUSR1</tt>. </descrip> As a help to implement these methods, the robot <tt>rotate_and_fire</tt> has been written in three different, but functionally equivalent, versions. Feel free to study and copy to use in your own robots. Note that it is not a good idea to do &dquot;busy wait&dquot;, i.e., to repeatedly look for a message until you get one. This will slow things down considerably and, worse, in <ref id="Command line options" name="competition-mode"> the robot will rapidly run out of CPU-time and die. <sect1>Messagetypes.h<label id="Messagetypes.h"> <p> The file <tt>Messagetypes.h</tt> is a good source of information on the messaging language. It is a c/c++ include file, but you can easily rewrite it to use with other languages. There you can find listing of messages, warning types, objects, game options and robot options. <sect1>Cheating<label id="Cheating"> <p> Since the battle is progressing in real-time with real processes, it may be possible to write programs which are 'cheating' in one way or another. For example by examining other robots or even RealTimeBattle itself to get more information, by using up a lot of resources to drain the other robots and so on. This is, of course, not the intended method to beat opponents, so we try to inhibit it as much as possible. In <ref id="Command line options" name="competition-mode"> robots have limited CPU usage, so that one robot can't use up all the CPU. It could be possible to fiddle with this by launching child processes. But since the time used by the child process will be counted for as soon as the process dies, it should be very easy to detect if a robot does anything suspicious. It is not possible to prevent all ways of cheating within RTB. It is e.g. permitted to read and write to files, but remember that organizers of competitions can forbid this if they wish. By setting permissions and ownerships of the robot executables and directories this can be done satisfactory. It may still be possible to find ways round these restrictions; if you detect such a way, please send a <ref name="bug report" id="BugReports">. By the way, it is up to the organizer of a tournament to make sure that the rules are followed. <!-- ################ Messages to robots ################## --> <sect1>Messages to robots<label id="Messages to robots"> <p> <descrip> <label id="Initialize"> <tag>Initialize [first? (int)]</tag> This is the very first message the robot will get. If the argument is one, it is the first sequence in the tournament and it should send <ref id="NameAndColour" name="Name and Colour"> to the server, otherwise it should wait for YourName and YourColour messages (see below). <label id="YourName"> <tag>YourName [name (string)]</tag> Current name of the robot, don't change it if you don't have very good reasons. <label id="YourColour"> <tag>YourColour [colour (hex)]</tag> Current colour of the robot, change it if you find it ugly. All robots in a team will have the same colour. <tag>GameOption [optionnr (int)] [value (double)]</tag> At the beginning of each game the robots will be sent a number of settings, which can be useful for the robot. For a complete list of these, look in the file <ref id="Messagetypes.h" name="Messagetypes.h"> for the <tt>game_option_type</tt> enum. In the <ref id="Options" name="options chapter"> you can get more detailed information on each option. The <ref id="Debug level" name="debug level"> is also sent as a game option even though it is not in the options list. <tag>GameStarts</tag> This message is sent when the game starts (surprise!) <label id="Radar"> <tag>Radar [distance (double)] [observed object type (int)] [radar angle (double)]</tag> This message gives information from the radar each turn. Remember that the radar-angle is relative to the robot front; it is given in radians. <tag>Info [time (double)] [speed (double)] [cannon angle (double)]</tag> The <bf>Info</bf> message does always follow the <bf>Radar</bf> message. It gives more general information on the state of the robot. The time is the game-time elapsed since the start of the game. This is not necessarily the same as the real time elapsed, due to <ref id="TimeScale" name="time scale"> and <ref id="MaxTimestep" name="max timestep">. <label id="Coordinates"> <tag>Coordinates [x (double)] [y (double)] [angle (double)]</tag> Tells you the current robot position. It is only sent if the option <ref name="Send robot coordinates" id="SendCoordinates"> is 1 or 2. If it is 1 the coordinates are sent relative the starting position, which has the effect that the robot doesn't know where it is starting, but only where it has moved since. <tag>RobotInfo [energy level (double)] [teammate? (int)]</tag> If you detect a robot with your radar, this message will follow, giving some information on the robot. The opponents energy level will be given in the same manner as your own energy (see below). The second argument is only interesting in team-mode, 1 means a teammate and 0 an enemy. <label id="RotationReached"> <tag>RotationReached [what has reached(int)]</tag> When the robot option <ref id="RobotOption" name="SEND_ROTATION_REACHED"> is set appropriately, this message is sent when a rotation (with RotateTo or RotateAmount) has finished or the direction has changed (when sweeping). The argument corresponds to 'what to rotate' in e.g. <ref id="Rotate" name="Rotate">. <tag>Energy [energy level(double)]</tag> The end of each round the robot will get to know its energy level. It will not, however, get the exact energy, instead it is discretized into a number of <ref id="EnergyLevels" name="energy levels">. <tag>RobotsLeft [number of robots (int)]</tag> At the beginning of the game and when a robot is killed the number of remaining robots is broadcasted to all living robots. <tag>Collision [colliding object type (int)] [angle relative robot (double)]</tag> When a robot hits (or is hit by) something it gets this message. In the file <ref id="Messagetypes.h" name="Messagetypes.h"> you can find a list of the object types. You get the angle from where the collision occurred (the angle relative the robot) and the type of object hitting you, but not how severe the collision was. This can, however, be determined indirectly (approximately) by the loss of energy. <label id="Warning"> <tag>Warning [warning type (int)] [message (string)]</tag> A warning message can be sent when robot has to be notified on different problems which have occured. Currently seven different warning messages can be sent, namely <tt>UNKNOWN_MESSAGE:</tt> The server received a message it couldn't recognize. <tt>PROCESS_TIME_LOW:</tt> The CPU usage has reached the <ref id="CPUWarningPercentage" name="CPU warning percentage">. Only in <ref id="Command line options" name="competition-mode">. <tt>MESSAGE_SENT_IN_ILLEGAL_STATE:</tt> The message received couldn't be handled in this state of the program. For example <ref id="Rotate" name="Rotate"> is sent before the game has started. <tt>UNKNOWN_OPTION:</tt> The robot sent a <ref id="RobotOption" name="robot option"> with either illegal option name or illegal argument to that option. <tt>OBSOLETE_KEYWORD:</tt> The keyword sent is obsolete and should not be used any more, see the <tt>ChangeLog</tt> file for information on what to use instead. <tt>NAME_NOT_GIVEN:</tt> The robot has not sent its name before the game begins. This happens if the <ref id="RobotStartupTime" name="robot startup time"> is too short or the robot does not send its name early enough. <tt>COLOUR_NOT_GIVEN:</tt> The robot has not sent its colour before the game begins. <tag>Dead</tag> Robot died. Do not try to send more messages to the server until the end of the game, the server doesn't read them. <tag>GameFinishes</tag> Current game is finished, get prepared for the next! <label id="ExitRobot"> <tag>ExitRobot</tag> Exit from the program immediately! Otherwise it will be killed forcefully. </descrip> <!-- ################ Messages from robots ################## --> <sect1>Messages from robots<label id="Messages from robots"> <p> When you send messages to RealTimeBattle make shure that they are not longer than 128 chars, otherwise RealTimeBattle will cut them in two parts and may report an unknown message. <descrip> <label id="RobotOption"> <tag>RobotOption [option nr (int)] [value (int)]</tag> Currently only two options are available: <tt>SIGNAL:</tt> Tells the server to send a signal when there is a message waiting. The argument will determine which signal. Send this message (with argument e.g. SIGUSR1) as soon as you are prepared to receive the signal. Default is 0, which means don't send any signals. <tt>SEND_SIGNAL:</tt> Tells the server to send SIGUSR1 when there is a message waiting. Send this message (with argument 1 (= true)) as soon as you are prepared to receive the signal. Default is false. <tt>SEND_ROTATION_REACHED:</tt> If you want the server to send a <ref id="RotationReached" name="RotationReached"> message when a rotation is finished, you should set this option. With a value of 1, the message is sent when a RotateTo or a RotateAmount is finished, with a value of 2, changes in sweep direction are also notified. Default is 0, i.e. no messages are sent. <tt>USE_NON_BLOCKING:</tt> Selects how to <ref name="reading messages" id="Reading messages"> works. This option should be sent exactly once as soon as the program starts. Since it should always be given, there is no default value. <label id="NameAndColour"> <tag>Name [name (string)]</tag> When receiving the <ref id="Initialize" name="Initialize"> message with argument 1, indicating that this is the first sequence, you should send both your name and your colour. If your name ends with the string <tt>Team: teamname</tt>, you will be in the team <tt>teamname</tt>. For example "Name foo Team: bar" will assign you to the team <tt>bar</tt> and your name will be <tt>foo</tt>. All robots in a team will have the same colour and will recognize them over the RobotInfo message. For a more sophisticated possibilities, please take a look onto the <url name="RealTimeBattle Team Framework" url="http://rtb-team.sf.net">. <tag>Colour [home colour (hex)] [away colour (hex)]</tag> See above. The colours are like normal football shirts, the home colour is used unless it is already used. Otherwise the away colour or, as a last resort, a non-occupied colour is selected randomly. <label id="Rotate"> <tag>Rotate [what to rotate (int)] [angular velocity (double)]</tag> Set the angular velocity for the robot, its cannon and/or its radar. Set 'what to rotate' to 1 for robot, 2 for cannon, 4 for radar or to a sum of these to rotate more objects at the same time. The angular velocity is given in radians per second and is limited by <ref id="RobotMaxRotateSpeed" name="Robot (cannon/radar) max rotate speed">. <tag>RotateTo [what to rotate (int)] [angular velocity (double)] [end angle (double)]</tag> As <bf>Rotate</bf>, but will rotate to a given angle. Note that radar and cannon angles are relative to the robot angle. You cannot use this command to rotate the robot itself, use <bf>RotateAmount</bf> instead! <label id="RotateAmount"> <tag>RotateAmount [what to rotate (int)] [angular velocity (double)] [angle (double)]</tag> As <bf>Rotate</bf>, but will rotate relative to the current angle. <tag>Sweep [what to rotate (int)] [angular velocity (double)] [right angle (double)] [left angle (double)]</tag> As <bf>rotate</bf>, but sets the radar and/or the cannon (not available for the robot itself) in a sweep mode. <label id="Accelerate"> <tag>Accelerate [value (double)]</tag> Set the robot acceleration. Value is bounded by <ref id="RobotMaxAcceleration" name="Robot max/min acceleration">. <label id="Brake"> <tag>Brake [portion (double)]</tag> Set the brake. Full brake (portion = 1.0) means that the friction in the robot direction is equal to <ref id="SlideFriction" name="Slide friction">. <tag>Shoot [shot energy (double)]</tag> Shoot with the given energy. <ref id="Shot options" name="The shot options"> give more information. <label id="Print"> <tag>Print [message (string)]</tag> Print message on the <ref id="Message window" name="message window">. <tag>Debug [message (string)]</tag> Print message on the <ref id="Message window" name="message window"> if in <ref id="Command line options" name="debug-mode">. <tag>DebugLine [angle1 (double)] [radius1 (double)] [angle2 (double)] [radius2 (double)]</tag> Draw a line direct to the arena. This is only allowed in the highest debug level(5), otherwise a <ref id ="Warning" name="warning message"> is sent. The arguments are the start and end point of the line given in polar coordinates relative to the robot. <tag>DebugCircle [center angle (double)] [center radius (double)] [circle radius (double)]</tag> Similar to DebugLine above, but draws a circle. The first two arguments are the angle and radius of the central point of the circle relative to the robot. The third argument gives the radius of the circle. </descrip> <!-- ################ Options ################## --> <sect>Options<label id="Options"> <p> RealTimeBattle is configurable with a bunch of options, collected in different groups. The philosophy is to give you full freedom to set up the game in the way you like. This does mean, however, that some settings of the options may give bad combination, which can cause troubles for the program. <sect1>Environmental options<label id="Environmental options"> <p> <descrip> <tag>Gravitational Constant:</tag> The acceleration due to gravitation. It is about 9.8 on the earth. An increase will increase the friction, thereby slow down the robots. <label id="AirResistance"> <tag>Air resistance:</tag> As it sounds. Increases with speed. <label id="RollFriction"> <tag>Roll friction:</tag> The friction in the direction of the robot if not braking. <label id="SlideFriction"> <tag>Slide friction:</tag> The friction orthogonal to the robot direction. Also the maximum friction if braking. <label id="SendCoordinates"> <tag>Send robot coordinates:</tag> Determines how coordinates are send to the robots. The following options are available: <itemize> <item> 0 - don't send any coordinates (default) <item> 1 - send the coordinates relative the starting position <item> 2 - send absolute coordinates </itemize> </descrip> <sect1>Robot options<label id="Robot options"> <p> <descrip> <label id="RobotMaxAcceleration"> <tag>Robot max acceleration:</tag> Robots are not allowed to accelerate faster than this and ... <tag>Robot min acceleration:</tag> ... slower than this. <label id="RobotRadius"> <tag>Robot radius:</tag> Determines the size of the robot. <tag>Robot mass:</tag> Large robot mass will increase the impact of collisions. <label id="BounceCoefficient"> <tag>Robot bounce coefficient:</tag> Affects how well the robots will bounce. If zero the robots will cling together when colliding, if the value is one they will act like perfect billiard balls. <tag>Robot hardness coefficient:</tag> Determines how seriously damaged the robots will be when colliding. The lower the value, the softer the material. <tag>Robot protection coefficient:</tag> Influences how well protected the robot is. This factor is to be multiplied with the damaging energy to get how much to reduce the robot's energy. <label id="RobotFront"> <tag>Robot frontszie:</tag> The front of the robot is a section with different materials, usually harder and more protective, so robots can injure each other by ramming. <tag>Robot front bounce coefficient:</tag> See previous four items. <tag>Robot front hardness coefficient:</tag> See previous five items. <tag>Robot front protection coefficient:</tag> See previous six items. <tag>Robot start energy:</tag> The amount of energy the robots will have at the beginning of each game. <tag>Robot max energy:</tag> By eating a cookie, the robot can increase its energy; not more than this, though. <label id="RobotMaxRotateSpeed"> <tag>Robot max rotate speed:</tag> How fast the robot itself may rotate. Unit: radians/s . <tag>Robot cannon max rotate speed:</tag> Maximum cannon rotate speed. Note that the cannon and the radar move relative to the robot, so the actual rotation speed may be higher. <tag>Robot radar max rotate speed:</tag> Maximum radar rotate speed. See note above. <label id="EnergyLevels"> <tag>Robot energy levels:</tag> The robot will only know its energy approximately. This will decide how many discretation levels will be used. </descrip> <sect1>Shot options<label id="Shot options"> <p> <descrip> <tag>Shot radius:</tag> Size of shots. Should be less than <ref id="RobotRadius" name="robot radius">. <label id="ShotSpeed"> <tag>Shot speed:</tag> Shots are moving with this speed in the direction of the cannon plus the velocity of the robot. <label id="ShootingPenalty"> <tag>Shooting penalty:</tag> When shooting the robot itself gets damaged. This is the factor, by which the shot energy is multiplied, to get the damaging energy. If the number of robots is large, this number is reduced, so that you never lose in average by shooting (if you hit). <label id="ShotMinEnergy"> <tag>Shot min energy:</tag> The lowest shot energy allowed. A robot trying to shoot with less energy will fail to shoot. <label id="ShotMaxEnergy"> <tag>Shot max potential energy:</tag> The robots have a shot energy, which increases with time, but will never exceed this value. <label id="ShotEnergyIncreaseSpeed"> <tag>Shot potential energy increase speed:</tag> Determines how fast the robots shot energy noted above, will increase. Unit: energy/s . </descrip> <sect1>Extras options<label id="Cookie_and_mine_options"> <p> <descrip> <tag>Cookie max energy:</tag> The cookie energy is a random number between cookie max energy and cookie min energy. <tag>Cookie min energy:</tag> See above. <tag>Cookie frequency:</tag> The number of cookie per second that will appear in average. <tag>Cookie radius:</tag> Size of cookie. <tag>Mine max energy:</tag> The mine energy is a random number between mine max energy and mine min energy. <tag>Mine min energy:</tag> See above. <tag>Mine frequency:</tag> The number of mine per second that will appear in average. <tag>Mine radius:</tag> Size of mine. <tag>Cookie colour:</tag> Cookie colour in hexadecimal red-green-blue form. <tag>Mine colour:</tag> As above. </descrip> <sect1>Time options<label id="Time options"> <p> <descrip> <label id="Timeout"> <tag>Timeout:</tag> This is the longest time a game will take. When the time is up all remaining robots are killed, without getting any more points. <label id="MaxTimestep"> <tag>Max timestep:</tag> If the computer is temporarily slowed down, the time between updates can be to long. Setting this option will make the program artificially slow down the clock in those cases and therefore violate the realtimeness. <label id="TimeScale"> <tag>Time scale:</tag> Increasing time scale to more than one means that the game clock will go faster than an ordinary clock. Changing this value can be usefull if you either want to give the robots more time or if you have a fast computer you may want to speed the game up. <label id="UpdateInterval"> <tag>Update interval:</tag> This option determines the time between robot updates, i.e., how often the robot states are changed. It is not influenced by the 'Time Scale' and cannot be altered when the program is running. The accuracy is 1/100 s (depending of the precision of the system that RealTimeBattle is running on). <label id="RobotStartupTime"> <tag>Robot startup time:</tag> Determines the time between the robot processes are executed and the sequence begins. If robots are black and have no name, you may need to increase the startup time from the default of one second. This can happen if, for example, the robots are many, large or you are running on a slow or remote computer. <label id="CPUOptions"> <tag>Start CPU time:</tag> In <ref id="Command line options" name="competition-mode"> a robot's CPU usage is limited. At the beginning of a sequence a robot will get this amount of CPU time to spend. <tag>Extra CPU time:</tag> When the start CPU time is spent, the robot will get this amount of extra CPU time. <tag>Extra CPU period:</tag> The extra CPU time must last an entire CPU period, otherwise the robot will die in the current game. <label id="CPUWarningPercentage"> <tag>CPU warning percentage:</tag> When the robot has used up this amount of its CPU time it will receive a warning message. <tag>Process check interval:</tag> In <ref id="Command line options" name="competition-mode"> this will decide how often the program will check for CPU usage. <label id="LoggingFrequency"> <tag>Logging frequency:</tag> To reduce the size of <ref name="log files" id="log_files"> you can increase this option. With this option, <ref name="robot position info" id="RobotPositionInfo"> are only logged every n:th <ref name="update interval" id="UpdateInterval">. </descrip> <sect1>Window sizes<label id="Window sizes"> <p> Here you can set the initial sizes for some windows, namely the <ref name="arena window" id="Arena_window">, the <ref name="message window" id="Message window">, the <ref name="score window" id="Score window"> and the <ref name="statistics window" id="Statistics window">. You can also set the position for the first three and the <ref name="control window" id="Control window">. <sect1>Miscellaneous options<label id="Miscellaneous options"> <p> <descrip> <label id="ArenaScale"> <tag>Arena scale:</tag> Overall scale of the arena. A value of 2 gives double sidelength, i.e., a four times larger area. <label id="Fast forward factor"> <tag>Fast forward factor:</tag> Determines, when <ref name="replaying" id="replaying">, the speed when the fast forward button or the rewind button is pressed. <label id="Max robots allowed simultaneously"> <tag>Max robots allowed simultaneously:</tag> Allows the user to change the maximum amount of robots allowed in a sequence. If there are too many, the system might complain (how many depends on the system). <tag>Background colour:</tag> Background colour and ... <tag>Foreground colour:</tag> ... foreground colour for the arena. <label id="Colour for RTB messages"> <tag>Colour for RTB messages:</tag> Colour for the text when RTB sends messages. <label id="Robot search path"> <tag>Robot search path:</tag> This is a colon-separated list of directories which will be searched for robots when a <ref name="new tournament" id="Start new tournament window"> is started. The subdirectory <tt>Robots</tt> in the rtb install directory (default: <tt>/usr/local/games/RealTimeBattle</tt>) is always searched. <label id="Arena search path"> <tag>Arena search path:</tag> Same as above, but for arena files instead of robots. Here the subdirectory is <tt>Arenas</tt>. </descrip> <!-- ################ Arena Construction ################## --> <sect>Arena construction<label id="Arena construction"> <p> In RealTimeBattle, it is very simple to construct your own arenas. The language consists of only eleven commands, and there are essentially four building blocks: line, circle, inner_circle and arc. This is mainly because of speed reason, for circles and lines it is very easy to check if a collision has occured. Circle and inner_circle prevents robots from entering into a circle or getting out of a circle respectively. The line and the arc stop the robots from entering through the long side ( the curved for the arc ), but no check is made on the short side, so you have to put circles at each end of the line to make it a solid object. The commands <tt>polygon</tt>, <tt>closed_polygon</tt> and <tt>poly_curve</tt> are intended to simplify this procedure, always giving a proper object. All angles are by default in radians but can be changed to degrees by the command <tt>angle_unit degrees</tt>. Note that RealTimeBattle does not check whether the arena file gives a correct arena, it is entirely up to you. However, it will complain if there are violations to the language rules. Arena files should be given the postfix <tt>.arena</tt> and be stored in the arena directory for RealTimeBattle to find them. The <tt>bounce coefficient</tt> and <tt>hardness</tt> argument given to all wall creating commands, determines the material of the wall. They are both values between 0 and 1. Harder walls will injure colliding robots more and higher bounce coefficient make them bounce better. You are also encouraged to study the arenas included and learn from the examples. <sect1>Arena commands<label id="Arena_commands"> <p> A command consists of the command name and the arguments separated by whitespace. Be sure to give the right number of arguments! In the command list, the arguments are given in square brackets. <descrip> <tag>scale [value]</tag> This value times the <ref id="ArenaScale" name="arena scale"> will give the scale factor, by which all coordinates are multiplied. This command must be, if it exists, the very first in the file, default is 1.0. <tag>angle_unit [unit]</tag> Switches to the selected angle unit, which can be either of <tt>degrees</tt> or <tt>radians</tt>. Default is radians. <tag>boundary [left] [up] [right] [down]</tag> The boundary encloses the area, in which robot, cookies and mines are placed. It also determines the visible area in the <ref id="Arena_window" name="arena window">. This command is required and may only be preceded by <tt>scale</tt>. <tag>inner_circle [bounce] [hardness] [center_x] [center_y] [radius]</tag> Robots are limited to the inside of this circle. <tag>circle [bounce] [hardness] [center_x] [center_y] [radius]</tag> Circle shaped wall. <tag>line [bounce] [hardness] [thickness] [start_x] [start_y] [end_x] [end_y]</tag> Creates a line. It only prevents the robot from passing through to long side, so remember to put circles at the short ends. <tag>arc [bnc] [hardn] [thickn] [center_x] [ctr_y] [inner_radius] [outer_rds] [angle1] [angle2]</tag> An arc is a sector of a ring within two angles. Like the line, it needs circles at both the ends. <tag>polygon [bounce] [hardn] [thickn] [number of vertices] ([center_x] [center_y])...</tag> This will create a number of circles, connected by lines. <tag>closed_polygon [bounce] [hardn] [thickn] [number of vertices] ([center_x] [center_y])...</tag> As a <tt>polygon</tt>, but the first and the last vertices are also connected by a line. <tag>poly_curve [bnc] [hardn] [thickn] [start_x] [start_y] [dir_x] [dir_y] ([command args ...]) ...</tag> The <tt>poly_curve</tt> is the most powerful of the arena commands. It is used to build walls with lines and arcs. At each step you have a current position and direction, which are affected by the subcommands. The last subcommand must be <tt>C</tt> or <tt>Q</tt>. <descrip> <tag>L [length]</tag> Draw a line with given length in the current direction. <tag>T [angle]</tag> Turn the current dircetion. <tag>A [angle] [radius]</tag> Draw an arc. <tag>C</tag> Finish by connecting with the starting point. <tag>Q</tag> Quit. </descrip> <tag>exclusion_point [position_x] [position_y]</tag> When the arena inside the boundary consists of several separated areas, you should exclude all but one by inserting exclusion points. All points from which you can draw a straight line to an exclusion point without crossing a wall, are considered to be outside the arena. </descrip> </article> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������realtimebattle-1.0.8/Documentation/RealTimeBattle.txt�����������������������������������������������0000644�0001750�0001750�00000162104�10320527642�021065� 0����������������������������������������������������������������������������������������������������ustar �moi�����������������������������moi�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� RealTimeBattle User Manual, version 1.0.8 Erik Ouchterlony and Ragnar Ouchterlony, Johannes Nicolai (jonico@users.sourceforge.net) 4 October 2005 ____________________________________________________________ Table of Contents 1. Introduction 1.1 More information 1.2 Requirements 1.3 Background 1.4 License 1.5 Bug reports 2. Usage 2.1 Command line options 2.2 Control window 2.3 Start new tournament window 2.4 Robots and arena directories 2.5 Arena window 2.6 Score window 2.7 Message window 2.8 Options window 2.9 Statistics window 2.10 Running without graphics 2.11 Tournament files 2.12 Log files 2.13 Replaying 2.14 Statistics files 3. Structure 3.1 Robot motion 3.2 Energy 3.3 The radar 3.4 The robots position 3.5 Shooting 3.6 Collisions 3.7 Cookies and Mines 3.8 Time 3.9 A game 3.10 A sequence 3.11 A tournament 4. Robot construction 4.1 Reading messages 4.2 Messagetypes.h 4.3 Cheating 4.4 Messages to robots 4.5 Messages from robots 5. Options 5.1 Environmental options 5.2 Robot options 5.3 Shot options 5.4 Extras options 5.5 Time options 5.6 Window sizes 5.7 Miscellaneous options 6. Arena construction 6.1 Arena commands ______________________________________________________________________ 1. Introduction This is the user manual for RealTimeBattle. Here you should find how to run the program, how the program works, how to create your own robots and how to construct arenas. RealTimeBattle is a programming game for Unix, in which robots controlled by programs are fighting each other. The goal is to destroy the enemies, using the radar to examine the environment and the cannon to shoot. Even though the environment the robots are moving in is fairly simple, it is far from easy to construct an intelligent robot-program. RealTimeBattle is constructed to be easy to use, flexible and fast. The intention is that the program could be used as a test for intelligent algorithms, as well as just a game to play and enjoy. Features include: Game progresses in real time, with the robot programs running as child processes to RealTimeBattle. The robots communicate with the main program using the standard input and output. Robots can be constructed in almost any programming language. Up to 120 robots can compete simultaneously. A simple messaging language is used for communication, which makes easy to start constructing robots. Robots behave like real physical object. You can create your own arenas. Highly configurable. Possibility to plug in external clients. Basic team support directly integrated in the game, sophisticated team play available due to team frameworks. 1.1. More information More information can be found in the INSTALL, AUTHORS, BUGS, TODO, README, FAQ and ChangeLog files in the distribution. More updated information is available on the RealTimeBattle homepage <http://realtimebattle.sf.net>, where you can also find robots, news on tournaments as well as this manual in different formats. 1.2. Requirements The hardware requirements are very much dependent on what you do. Running a few robots should be possible to do on any computer on which GNU/Linux or any other Unixes can be run. The demand on hardware will, however, grow with the number of robots you want on the battlefield simultaneously; running 120 advanced robots is certainly demanding for any personal computer. RealTimeBattle is only available on Unix. It is developed on a Linux- machine, but it should compile on other Unix dialects too. Running in ``competition-mode'' is currently only possible on Linux with the '/proc'-directory enabled, because of the need to get the cpu usage of child processes. The only software requirement is gtk+ <http://www.gtk.org>, which is used for the graphical user interface. 1.3. Background The project started in August 1998. Inspiration came from RobotBattle <http://www.robotbattle.com/>, a very interesting game we used to enjoy some years earlier. That version of RobotBattle, however, had some drawbacks: It was only available on Windows and the robots were written in an own language, which restricts the possibilities to write intelligent robots. RobotBattle has since then been under development, but it still lack support for other operative systems. We therefore decided to construct a Unix robot programming game, which makes use of features of a modern OS. 1.4. License RealTimeBattle is distributed under the GNU General Public License <http://www.gnu.org/copyleft/gpl.html>, in the spirit of the Linux community. Official versions of RealTimeBattle will be released by the authors. Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony, see the AUTHORS file for further developers. 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. 1.5. Bug reports If you find anything in this package which doesn't work, appears strange, is missing, is spellt wrong or is just confusing, don't hesitate to send in a bug report to the Sourceforge Bug Tracker <http://sourceforge.net/tracker/?group_id=561=100561>. 2. Usage This chapter describes how to use the program itself. If you find it boring to read it through, feel free to use trial and error as usual, and return here if you stumble upon something confusing in the user interface. It is, however, a good idea to read the short section on ``command line options'' below. Note also that there is no built-in help in the program - here is where you should search for help. 2.1. Command line options On the command line, there are two options to set which control the overall behaviour of RealTimeBattle. Here you can choose the option file, which determines the default values of the ``options''. You can also select in which game-mode the program will run: debug, normal or competition mode. ______________________________________________________________________ Usage: RealTimeBattle [options] Options: --debug_mode, -d debug mode --debug_level [0-5], -D sets the initial debug level. implies -d --normal_mode, -n normal mode (default) --competition_mode, -c competition mode --no_graphics, -g no graphics will be displayed --option_file [file], -o selects option-file (default: $HOME/.rtbrc) --log_file [file], -l make log file, if 'file' is '-' the log is sent to STDOUT --tournament_file [file], -t specify a tournament file to autostart a tournament --statistics_file [file], -s file to print the statistics to when autostarting --message_file [file], -m redirect messages to 'file'. '-' as 'file' is equivalent to STDOUT. If both log and messages are send to STDOUT, '-m' will be ignored --replay [file] -r a log file to replay. if '-' is specified as file, input is taken from STDIN --help, -h prints this message --version, -v prints the version number --port_number -p specifies the port for remote clients (default is 32134) ______________________________________________________________________ The port_number option is only available, if you chose to compile RealTimeBattle with the --enable-network option. See the INSTALL file for more information. The differences between the three competition modes are shown in the following table ______________________________________________________________________ +----------------------------------+-------+--------+-------------+ | Mode | Debug | Normal | Competition | +----------------------------------+-------+--------+-------------+ | Debug command available | Yes | No | No | | Pause in game | Yes | Yes | No | | Step through game | Yes | No | No | | Robot CPU time unlimited | Yes | Yes | No | +----------------------------------+-------+--------+-------------+ ______________________________________________________________________ 2.2. Control window New tournament: This will start a new tournament. Section ``Start new tournament window'' will give more information. Replay tournament: ``Replay a game''. It will ask you to select a ``log file'' of the game you want to study. Pause: Pauses the game, in ``competition-mode'' the pausing will be postponed until the end of the current game. End: Stops the current tournament. Options: Brings up the ``options window''. Statistics: Displays the ``statistics window''. Show arena window: This box can be used to show and hide the three windows used when a game is running, i.e., the ``arena window'', the ``score window'' and the ``message window''. Quit: Terminates the program. In ``debug-mode'' there is another set of buttons available. They are intended to help with debugging of robots. Note that you can debug a running process; if you use gdb the command is gdb robot-name process- number. Step: In a ``paused'' game this will move one time step forward. This is very useful when running the robot in a debugger, since otherwise the robot will be flooded with messages. End game: This will finish the current game. It has the same effect as a ``timeout'' would have. Kill marked robot: In debug-mode, you can mark a robot in the ``score window''. That robot will die if you press this button. Debug level: Changing debug level is a way of telling robots which messages they should send. The range is between 0 and 5, where 0 means no debugging and 5 is the highest level of debugging, i.e. all debug-messages should be send. When you are replaying a logfile (not from stdout) there are a number of widgets to control the replaying. See further in the chapter about ``replaying''. 2.3. Start new tournament window To select robots and arenas for the tournament, mark the files to the right and press the add button. Selected files are shown to the left and can be removed correspondingly. A ``tournament'' consists of a number of ``sequences'' of ``games''. In each sequence the same robots are playing in all games. Here you select the number of games and sequences as well as the number of robots in each sequence. If you intend to play with all robots every game you are advised to choose only one sequence and instead increase the number of games. The reason is to avoid restarting of the robot processes which can take a while, especially if the number of robots is large. It is also possible to load a tournament file or save the current tournament. The last tournament played is stored in /tmp/rtb/tmp.tour and is always displayed when this window opens. If it is not available an empty tournament is displayed. You have to select at least two robots and one arena to be able to start. 2.4. Robots and arena directories In order for the program to find the robots and arenas you have set two options ``Robot search path'' and ``Arena search path''. The subdirectories Robots and Arenas in the rtb installl directory (default: /usr/local/games/RealTimeBattle), specified at compile-time in the main Makefile, are always searched, regardless of the options, but if you create a new directory, or if you installed RealTimeBattle in some other directory, you need to set these options. 2.5. Arena window This is where the battle takes place. If you want a more detailed view, use the zoom buttons or press +, - or 0. The robots are visualized as coloured circles with an angle shape showing the radar direction, the thick line is the cannon and the thin line points in the front direction. 2.6. Score window In this window the robots playing in the current sequence are listed. 2.7. Message window Here are messages sent by the robots using ``Print and Debug'' displayed. The most recent messages are displayed at the top. You can clean the window and choose to only see new messages from a particular robot. 2.8. Options window Here you can change a number of options. In the ``Options chapter'' you can get detailed information on each option. The changes are not applied until either the apply button or the OK button is pressed. You can save your options to a file: Save options will save the options to a file of your choice and Save as default will save them to .rtbrc in your home directory. The Default button will reset all options to their default values. 2.9. Statistics window You can study the statistics of the current tournament in some different ways. You can either display statistics on individual Robots, the result of a game, the sequence total or the total of the tournament. Pressing the arrowed buttons will move you to the first, back one, forward one or to the last element respectively. The middle bar will show what is displayed and pressing it will update the statistics if the game is in progress. If you are using gtk+1.1.x, it is also possible to sort with respect to different columns by clicking on the corresponding title box. 2.10. Running without graphics If you want, you can run RealTimeBattle without any graphics at all. This can be especially useful when currying out a long series of tests or running a competition. To use this option you have two choices: Either you add the flag -g when launching the program, or you disable the graphics at compile time (see the INSTALL file for more information). The latter alternative is useful as the executable gets smaller and therefore faster on low memory machines. It also enables you to run RealTimeBattle on machines which haven't got gtk+ installed. When running without graphics you have to give a tournament file, otherwise nothing at all will happen. It is also a good idea to create a log file and/or a statistics file if you want to know the result. 2.11. Tournament files The tournament file is specified as a ``command line option''. When specified a tournament will automatically begin and end. To save the statistics see section ``statistics file'' for more information. A tournament file consists of five keywords. All of these keywords can be written several times, but keep in mind that only the last one of the keywords that takes a number as argument is counted. All keywords should be followed by a semicolon. Games/Sequence or g/s: Takes a number or a * as an argument. The number is how many games should be played per tournament. The asterisk means that the program takes the exact amount of arenas and uses this as the argument. The default value is 1. Robots/Sequence or r/s: Takes a number or a * as an argument. The number is how many robots is playing in each sequence. The asterisk means that the program takes the exact amount of robots and uses this as the argument. The default value is 2. Sequences or seq: Takes a number or a * as an argument. This number tells how many sequences shall be played in the tournament. The asterisk means that the program takes the exact amount of robots and the robots per sequence, does a binomial calculation to determine the number of sequence for all robots to meet each other exactly once, and uses this number as the argument. The default value is 1. Robots or r: Takes one or more robot files as its argument. Arenas or a: Takes one or more arena files as its argument. File arguments can be one of the following: Just the file: This searches the path for the file Example: Robot: empty.robot Full path to the file: This takes the given file Example: Arena: /usr/local/games/RealTimeBattle/Arenas/Circle.arena All files in path: This searches the whole path and takes all files found. Example: Arena: * One specific directory: This searches the specified directory and takes all files found. Example: Robot: /usr/local/games/RealTimeBattle/Robots/* It is possible to write files more than one time. So if you want three rotate_and_fire.robot. Just write rotate_and_fire.robot three times. This is also true for *. Example tournament file: R: * Arenas: Circle.arena Square.arena G/S: 2 r/s: 3 Sequences: * 2.12. Log files Sometimes it can be useful to ``replay'' a game and analyze it in detail or just to store for future reference, in this case log files can be useful. Add the flag -l, when starting RealTimeBattle, with the filename as argument to enable this feature and with argument '-', the log is printed to stdout. The format of the log file is as follows: Each line consist of a letter, determining the type of information, followed by a whitespace- separated list of arguments. The following information is given: Header: H [games/sequence] [robots/sequence] [sequences] [robots] Arena info: A [line from the arena file] Game start: G [sequence number] [game number] Option: O [option:value] List of robot properties: L [robot id] [robot colour] [robot name] Robot position info: R [robot id] [x] [y] [cannon angle] [radar angle] [energy] Time: T [time elapsed] Print message: P [robot id] [message to print] Cookie: C [cookie id] [x] [y] Mine: M [mine id] [x] [y] Shot: S [shot id] [x] [y] [dx/dt] [dy/dt] Die: D [type of object killed] [object id] (if robot: [points received] [position]) 2.13. Replaying You can replay a game from its ``log file'' either by giving the ``command line option'' "-r" or from the ``control window''. Note that if the log is coming from standard input (command line option "-r-"), you cannot do much but watch the game, but otherwise you can influence the flow of the game: The slidebar at the top shows how far the current game has progressed. You can jump wherever you want in the game by dragging the handle. Fast forward and rewind work as expected. You can alter the speed by changing the option ``fast forward factor''. Step forward and step backward can be used to study what happens in detail. First, however, the game should be ``paused''. With the four bottom buttons you can jump between games and sequences. 2.14. Statistics files The statistics file is a file used only when a ``tournament file'' is specified. The statistics will be saved to this file when the tournament ends. Otherwise you can save it by hand using the save button in the ``statistics window''. 3. Structure In this section we will describe the structure of the program, how the robots are moving, shooting and controlling the radar, when points are given and how a tournament is built up. 3.1. Robot motion The robot behaves like a vehicle with wheels, it rolls in the forward direction with a small ``roll friction'' and slides sideways with a much higher ``sliding friction''. The third slowing down effect is ``air resistance'', which is applied in the direction opposite to the robot velocity and is increasing with speed. There are three ways to affect the robot motion, ``acceleration'', ``rotation'' and ``braking''. The acceleration is used to increase the robots speed in the direction the robot faces; you cannot control the speed directly, acceleration is the only way to get the robot moving. By rotating the robot you can make it turn. Note that rotation does not directly affect the direction of motion, only the direction the robot is facing. The sliding friction, together with acceleration, will eventually carry out the actual turning of the robot. Braking will increase the roll friction up to a maximal value. This is when the wheel are locked and the robot is sliding instead of rolling. Don't forget to release the brake when you want to speed up again. 3.2. Energy The robot health is measured by its energy. There are several ways for the robot to lose energy, it can be hit by a shot, collide with another robot or a wall, spring a mine or fire a shot. However, there is only one possibility to gain energy: to eat a cookie. 3.3. The radar The principal method to get information on the surroundings is via the radar. Every time the robot is updated it will get a ``radar message'', giving information on the closest object in the current radar direction, i.e. distance and type of object. If it is a robot, that robots energy level will be revealed as well. Since the radar information is almost all the robot will know about the environment, it is crucial to make use of it as well as possible. It is also important to ``maneuver the radar'' well, to make it collect useful data. 3.4. The robots position From v1.0.5 of RTB it is possible to get the robots position more directly. Instead of having to analyze the surroundings with the radar and find your position from that, you can configure RTB to send the ``robot coordinates''. The behavior is controlled by the option ``Send robot coordinates''. 3.5. Shooting Shooting is the number one method to eliminate other robots. In RealTimeBattle a shot is moving with constant velocity, calculated as the sum of the robot velocity and the ``shot speed'' in the direction the cannon is pointing. It will move until it collides with an object. When the shot is fired it is given an energy, which determines the injuries robots will suffer when hit. The energy is, however, limited; the ``minimal energy'' forbids very low energy shots, e.g. you want to remove mines. The ``maximal energy'' is restricted by the amount of the robot's current potential shot-energy, which increases with time. Shooting is, however, not without any risk, since a firing robot itself will lose energy, ``proportional to the shot energy''. If a cookie or mine is hit, it is destroyed, regardless of the energy of the shot. Therefore you should use a minimal amount of energy to shoot mines. Shots colliding will not immediately be destroyed, instead their velocities and energies will be superposed, so that if two colliding shots are traveling in the same direction, their energies will be added and, in case of a head on collision, their energies will cancel. 3.6. Collisions Robots are fragile objects, which get damaged by colliding with walls and other robots. When colliding, the robots act like bouncing balls, with three factors that influences the behavior, ``the bounce coefficient, the hardness coefficient and the protection coefficient''. On the ``front'', the robots are made of different materials, usually harder and more protective. This can be used to ram other robots, giving much more damage than it receives. 3.7. Cookies and Mines Cookies and mines are essentially equal objects, with the only difference that robots will gain energy by taking cookies and lose energy on mines. These objects are randomly placed in the arena during the game. Their energy and frequency can be controlled with the ``options''. 3.8. Time As the name of the program indicates, the time used is the real time. It is entirely up to the robots to respond quickly enough to the events in the game. The game progresses by calling the update function in regular intervals. Between these, the robots have to share the remaining CPU time. To prevent robots from using too much of the processor, their CPU time is limited in ``competition-mode''. The ``corresponding options'' give more details. The real-timeness can, however, be violated under some circumstances. You can speed up or slow down the game speed by changing the ``timescale'' option and there is a method to prevent disruption of the game , when the system load is too high. If the time between two updates is longer than the ``max timestep'', the game time will be slown down accordingly. 3.9. A game At the beginning of a game, the robots are given a random position on the arena, with random orientation. The radar and the cannon are both pointing forward and the ``potential shot-energy'' is set to zero. The goal for the robots is now to survive as long as possible and at the same time to destroy the other robots. A robot will get one point for each of the enemy robot it outlives. One extra point is, however, given to all the participating robots. Robots dying at the same time will share the points fairly (or in other words, they get half a point for each of the other dying at the same time). A game is finished if either the number of living robots is less than two or the ``time is up''. 3.10. A sequence A sequence is a series of games, where the same robots are fighting. At the beginning of a sequence the robot processes are started. The number of robots in a sequence is limited to 120, due to the limit of 256 open file descriptors in Linux. For every robot two pipes are opened as communication channels to the robot. Thereafter a ``number of games'' are played and finally the robot processes are killed. 3.11. A tournament A tournament is a collection of sequences. The number of robots in a tournament is (theoretically) unlimited. Any number of sequences is allowed, but to make the tournament fair, you should choose a number of sequences, such that all robots will play the same number of games (i.e. #sequence = #robots per game / GCD( #robots per game, #robots in the tournament)). 4. Robot construction This chapter will describe what you need to know in order to build your own robots. Most important to know is the messaging language, which is a set of about 35 commands used to communicate with the server program. It is also instructive to study the example robots in the Robots/ directory. 4.1. Reading messages At the beginning of each sequence the robot processes are launched by the server program and assigned two pipes, one for input and the other for output. These are connected to the stdin and stdout, so that from the robot's point of view, it is communicating with the server via the standard input and standard output. This approach means that the robots can be written in any programming languages. However, the robot must be able to know when it has received a new message. To achieve this there are (at least) three different methods to choose from: Standard in blocks: This is the simplest method, when reading from stdin, the program is blocked until the next message arrives. You can therefore make the program as if there is always a message waiting. The drawback is that you cannot do any calculations while waiting for new messages. To choose the blocking method, send the following robot option as soon as the program is started: cout << "RobotOption " << USE_NON_BLOCKING << " " << 0 << endl; Note that this is strictly c++ code. If you don't use c++ just print the given information to stdout. endl is equal to 'end of line'. Select: Using the Unix libc function select makes it possible for the robot to have better control over when to look for new messages. It enables you, for example, to read all messages available, do some calculations, send commands and thereafter wait for more messages. To learn more of select, please read its Unix documentation ( e.g. man pages or emacs info ). To choose the select method, send the following robot option as soon as the program is started: cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl; Note that this is strictly c++ code. Signals: If you want, you can tell RealTimeBattle to send the robot a signal whenever a new set of messages is sent. This method makes it possible for the robot to be continuously updated with information from the server program also when the robot is busy doing calculations. If you feel you don't know how to use signals, look in the Unix documentation to or study other robots to learn more. To choose the signal method, send the following robot option as soon as the program is started: cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl; cout << "RobotOption " << SIGNAL << " " << SIGUSR1 << endl; Note that this is strictly c++ code. You can of course choose any signal you want instead of SIGUSR1. As a help to implement these methods, the robot rotate_and_fire has been written in three different, but functionally equivalent, versions. Feel free to study and copy to use in your own robots. Note that it is not a good idea to do "busy wait", i.e., to repeatedly look for a message until you get one. This will slow things down considerably and, worse, in ``competition-mode'' the robot will rapidly run out of CPU-time and die. 4.2. Messagetypes.h The file Messagetypes.h is a good source of information on the messaging language. It is a c/c++ include file, but you can easily rewrite it to use with other languages. There you can find listing of messages, warning types, objects, game options and robot options. 4.3. Cheating Since the battle is progressing in real-time with real processes, it may be possible to write programs which are 'cheating' in one way or another. For example by examining other robots or even RealTimeBattle itself to get more information, by using up a lot of resources to drain the other robots and so on. This is, of course, not the intended method to beat opponents, so we try to inhibit it as much as possible. In ``competition-mode'' robots have limited CPU usage, so that one robot can't use up all the CPU. It could be possible to fiddle with this by launching child processes. But since the time used by the child process will be counted for as soon as the process dies, it should be very easy to detect if a robot does anything suspicious. It is not possible to prevent all ways of cheating within RTB. It is e.g. permitted to read and write to files, but remember that organizers of competitions can forbid this if they wish. By setting permissions and ownerships of the robot executables and directories this can be done satisfactory. It may still be possible to find ways round these restrictions; if you detect such a way, please send a ``bug report''. By the way, it is up to the organizer of a tournament to make sure that the rules are followed. 4.4. Messages to robots Initialize [first? (int)] This is the very first message the robot will get. If the argument is one, it is the first sequence in the tournament and it should send ``Name and Colour'' to the server, otherwise it should wait for YourName and YourColour messages (see below). YourName [name (string)] Current name of the robot, don't change it if you don't have very good reasons. YourColour [colour (hex)] Current colour of the robot, change it if you find it ugly. All robots in a team will have the same colour. GameOption [optionnr (int)] [value (double)] At the beginning of each game the robots will be sent a number of settings, which can be useful for the robot. For a complete list of these, look in the file ``Messagetypes.h'' for the game_option_type enum. In the ``options chapter'' you can get more detailed information on each option. The ``debug level'' is also sent as a game option even though it is not in the options list. GameStarts This message is sent when the game starts (surprise!) Radar [distance (double)] [observed object type (int)] [radar angle (double)] This message gives information from the radar each turn. Remember that the radar-angle is relative to the robot front; it is given in radians. Info [time (double)] [speed (double)] [cannon angle (double)] The Info message does always follow the Radar message. It gives more general information on the state of the robot. The time is the game-time elapsed since the start of the game. This is not necessarily the same as the real time elapsed, due to ``time scale'' and ``max timestep''. Coordinates [x (double)] [y (double)] [angle (double)] Tells you the current robot position. It is only sent if the option ``Send robot coordinates'' is 1 or 2. If it is 1 the coordinates are sent relative the starting position, which has the effect that the robot doesn't know where it is starting, but only where it has moved since. RobotInfo [energy level (double)] [teammate? (int)] If you detect a robot with your radar, this message will follow, giving some information on the robot. The opponents energy level will be given in the same manner as your own energy (see below). The second argument is only interesting in team-mode, 1 means a teammate and 0 an enemy. RotationReached [what has reached(int)] When the robot option ``SEND_ROTATION_REACHED'' is set appropriately, this message is sent when a rotation (with RotateTo or RotateAmount) has finished or the direction has changed (when sweeping). The argument corresponds to 'what to rotate' in e.g. ``Rotate''. Energy [energy level(double)] The end of each round the robot will get to know its energy level. It will not, however, get the exact energy, instead it is discretized into a number of ``energy levels''. RobotsLeft [number of robots (int)] At the beginning of the game and when a robot is killed the number of remaining robots is broadcasted to all living robots. Collision [colliding object type (int)] [angle relative robot (dou- ble)] When a robot hits (or is hit by) something it gets this message. In the file ``Messagetypes.h'' you can find a list of the object types. You get the angle from where the collision occurred (the angle relative the robot) and the type of object hitting you, but not how severe the collision was. This can, however, be determined indirectly (approximately) by the loss of energy. Warning [warning type (int)] [message (string)] A warning message can be sent when robot has to be notified on different problems which have occured. Currently seven different warning messages can be sent, namely UNKNOWN_MESSAGE: The server received a message it couldn't recognize. PROCESS_TIME_LOW: The CPU usage has reached the ``CPU warning percentage''. Only in ``competition-mode''. MESSAGE_SENT_IN_ILLEGAL_STATE: The message received couldn't be handled in this state of the program. For example ``Rotate'' is sent before the game has started. UNKNOWN_OPTION: The robot sent a ``robot option'' with either illegal option name or illegal argument to that option. OBSOLETE_KEYWORD: The keyword sent is obsolete and should not be used any more, see the ChangeLog file for information on what to use instead. NAME_NOT_GIVEN: The robot has not sent its name before the game begins. This happens if the ``robot startup time'' is too short or the robot does not send its name early enough. COLOUR_NOT_GIVEN: The robot has not sent its colour before the game begins. Dead Robot died. Do not try to send more messages to the server until the end of the game, the server doesn't read them. GameFinishes Current game is finished, get prepared for the next! ExitRobot Exit from the program immediately! Otherwise it will be killed forcefully. 4.5. Messages from robots When you send messages to RealTimeBattle make shure that they are not longer than 128 chars, otherwise RealTimeBattle will cut them in two parts and may report an unknown message. RobotOption [option nr (int)] [value (int)] Currently only two options are available: SIGNAL: Tells the server to send a signal when there is a message waiting. The argument will determine which signal. Send this message (with argument e.g. SIGUSR1) as soon as you are prepared to receive the signal. Default is 0, which means don't send any signals. SEND_SIGNAL: Tells the server to send SIGUSR1 when there is a message waiting. Send this message (with argument 1 (= true)) as soon as you are prepared to receive the signal. Default is false. SEND_ROTATION_REACHED: If you want the server to send a ``RotationReached'' message when a rotation is finished, you should set this option. With a value of 1, the message is sent when a RotateTo or a RotateAmount is finished, with a value of 2, changes in sweep direction are also notified. Default is 0, i.e. no messages are sent. USE_NON_BLOCKING: Selects how to ``reading messages'' works. This option should be sent exactly once as soon as the program starts. Since it should always be given, there is no default value. Name [name (string)] When receiving the ``Initialize'' message with argument 1, indicating that this is the first sequence, you should send both your name and your colour. If your name ends with the string Team: teamname, you will be in the team teamname. For example "Name foo Team: bar" will assign you to the team bar and your name will be foo. All robots in a team will have the same colour and will recognize them over the RobotInfo message. For a more sophisticated possibilities, please take a look onto the RealTimeBattle Team Framework <http://rtb-team.sf.net>. Colour [home colour (hex)] [away colour (hex)] See above. The colours are like normal football shirts, the home colour is used unless it is already used. Otherwise the away colour or, as a last resort, a non-occupied colour is selected randomly. Rotate [what to rotate (int)] [angular velocity (double)] Set the angular velocity for the robot, its cannon and/or its radar. Set 'what to rotate' to 1 for robot, 2 for cannon, 4 for radar or to a sum of these to rotate more objects at the same time. The angular velocity is given in radians per second and is limited by ``Robot (cannon/radar) max rotate speed''. RotateTo [what to rotate (int)] [angular velocity (double)] [end angle (double)] As Rotate, but will rotate to a given angle. Note that radar and cannon angles are relative to the robot angle. You cannot use this command to rotate the robot itself, use RotateAmount instead! RotateAmount [what to rotate (int)] [angular velocity (double)] [angle (double)] As Rotate, but will rotate relative to the current angle. Sweep [what to rotate (int)] [angular velocity (double)] [right angle (double)] [left angle (double)] As rotate, but sets the radar and/or the cannon (not available for the robot itself) in a sweep mode. Accelerate [value (double)] Set the robot acceleration. Value is bounded by ``Robot max/min acceleration''. Brake [portion (double)] Set the brake. Full brake (portion = 1.0) means that the friction in the robot direction is equal to ``Slide friction''. Shoot [shot energy (double)] Shoot with the given energy. ``The shot options'' give more information. Print [message (string)] Print message on the ``message window''. Debug [message (string)] Print message on the ``message window'' if in ``debug-mode''. DebugLine [angle1 (double)] [radius1 (double)] [angle2 (double)] [radius2 (double)] Draw a line direct to the arena. This is only allowed in the highest debug level(5), otherwise a ``warning message'' is sent. The arguments are the start and end point of the line given in polar coordinates relative to the robot. DebugCircle [center angle (double)] [center radius (double)] [cir- cle radius (double)] Similar to DebugLine above, but draws a circle. The first two arguments are the angle and radius of the central point of the circle relative to the robot. The third argument gives the radius of the circle. 5. Options RealTimeBattle is configurable with a bunch of options, collected in different groups. The philosophy is to give you full freedom to set up the game in the way you like. This does mean, however, that some settings of the options may give bad combination, which can cause troubles for the program. 5.1. Environmental options Gravitational Constant: The acceleration due to gravitation. It is about 9.8 on the earth. An increase will increase the friction, thereby slow down the robots. Air resistance: As it sounds. Increases with speed. Roll friction: The friction in the direction of the robot if not braking. Slide friction: The friction orthogonal to the robot direction. Also the maximum friction if braking. Send robot coordinates: Determines how coordinates are send to the robots. The following options are available: 0 - don't send any coordinates (default) 1 - send the coordinates relative the starting position 2 - send absolute coordinates 5.2. Robot options Robot max acceleration: Robots are not allowed to accelerate faster than this and ... Robot min acceleration: ... slower than this. Robot radius: Determines the size of the robot. Robot mass: Large robot mass will increase the impact of collisions. Robot bounce coefficient: Affects how well the robots will bounce. If zero the robots will cling together when colliding, if the value is one they will act like perfect billiard balls. Robot hardness coefficient: Determines how seriously damaged the robots will be when colliding. The lower the value, the softer the material. Robot protection coefficient: Influences how well protected the robot is. This factor is to be multiplied with the damaging energy to get how much to reduce the robot's energy. Robot frontszie: The front of the robot is a section with different materials, usually harder and more protective, so robots can injure each other by ramming. Robot front bounce coefficient: See previous four items. Robot front hardness coefficient: See previous five items. Robot front protection coefficient: See previous six items. Robot start energy: The amount of energy the robots will have at the beginning of each game. Robot max energy: By eating a cookie, the robot can increase its energy; not more than this, though. Robot max rotate speed: How fast the robot itself may rotate. Unit: radians/s . Robot cannon max rotate speed: Maximum cannon rotate speed. Note that the cannon and the radar move relative to the robot, so the actual rotation speed may be higher. Robot radar max rotate speed: Maximum radar rotate speed. See note above. Robot energy levels: The robot will only know its energy approximately. This will decide how many discretation levels will be used. 5.3. Shot options Shot radius: Size of shots. Should be less than ``robot radius''. Shot speed: Shots are moving with this speed in the direction of the cannon plus the velocity of the robot. Shooting penalty: When shooting the robot itself gets damaged. This is the factor, by which the shot energy is multiplied, to get the damaging energy. If the number of robots is large, this number is reduced, so that you never lose in average by shooting (if you hit). Shot min energy: The lowest shot energy allowed. A robot trying to shoot with less energy will fail to shoot. Shot max potential energy: The robots have a shot energy, which increases with time, but will never exceed this value. Shot potential energy increase speed: Determines how fast the robots shot energy noted above, will increase. Unit: energy/s . 5.4. Extras options Cookie max energy: The cookie energy is a random number between cookie max energy and cookie min energy. Cookie min energy: See above. Cookie frequency: The number of cookie per second that will appear in average. Cookie radius: Size of cookie. Mine max energy: The mine energy is a random number between mine max energy and mine min energy. Mine min energy: See above. Mine frequency: The number of mine per second that will appear in average. Mine radius: Size of mine. Cookie colour: Cookie colour in hexadecimal red-green-blue form. Mine colour: As above. 5.5. Time options Timeout: This is the longest time a game will take. When the time is up all remaining robots are killed, without getting any more points. Max timestep: If the computer is temporarily slowed down, the time between updates can be to long. Setting this option will make the program artificially slow down the clock in those cases and therefore violate the realtimeness. Time scale: Increasing time scale to more than one means that the game clock will go faster than an ordinary clock. Changing this value can be usefull if you either want to give the robots more time or if you have a fast computer you may want to speed the game up. Update interval: This option determines the time between robot updates, i.e., how often the robot states are changed. It is not influenced by the 'Time Scale' and cannot be altered when the program is running. The accuracy is 1/100 s (depending of the precision of the system that RealTimeBattle is running on). Robot startup time: Determines the time between the robot processes are executed and the sequence begins. If robots are black and have no name, you may need to increase the startup time from the default of one second. This can happen if, for example, the robots are many, large or you are running on a slow or remote computer. Start CPU time: In ``competition-mode'' a robot's CPU usage is limited. At the beginning of a sequence a robot will get this amount of CPU time to spend. Extra CPU time: When the start CPU time is spent, the robot will get this amount of extra CPU time. Extra CPU period: The extra CPU time must last an entire CPU period, otherwise the robot will die in the current game. CPU warning percentage: When the robot has used up this amount of its CPU time it will receive a warning message. Process check interval: In ``competition-mode'' this will decide how often the program will check for CPU usage. Logging frequency: To reduce the size of ``log files'' you can increase this option. With this option, ``robot position info'' are only logged every n:th ``update interval''. 5.6. Window sizes Here you can set the initial sizes for some windows, namely the ``arena window'', the ``message window'', the ``score window'' and the ``statistics window''. You can also set the position for the first three and the ``control window''. 5.7. Miscellaneous options Arena scale: Overall scale of the arena. A value of 2 gives double sidelength, i.e., a four times larger area. Fast forward factor: Determines, when ``replaying'', the speed when the fast forward button or the rewind button is pressed. Max robots allowed simultaneously: Allows the user to change the maximum amount of robots allowed in a sequence. If there are too many, the system might complain (how many depends on the system). Background colour: Background colour and ... Foreground colour: ... foreground colour for the arena. Colour for RTB messages: Colour for the text when RTB sends messages. Robot search path: This is a colon-separated list of directories which will be searched for robots when a ``new tournament'' is started. The subdirectory Robots in the rtb install directory (default: /usr/local/games/RealTimeBattle) is always searched. Arena search path: Same as above, but for arena files instead of robots. Here the subdirectory is Arenas. 6. Arena construction In RealTimeBattle, it is very simple to construct your own arenas. The language consists of only eleven commands, and there are essentially four building blocks: line, circle, inner_circle and arc. This is mainly because of speed reason, for circles and lines it is very easy to check if a collision has occured. Circle and inner_circle prevents robots from entering into a circle or getting out of a circle respectively. The line and the arc stop the robots from entering through the long side ( the curved for the arc ), but no check is made on the short side, so you have to put circles at each end of the line to make it a solid object. The commands polygon, closed_polygon and poly_curve are intended to simplify this procedure, always giving a proper object. All angles are by default in radians but can be changed to degrees by the command angle_unit degrees. Note that RealTimeBattle does not check whether the arena file gives a correct arena, it is entirely up to you. However, it will complain if there are violations to the language rules. Arena files should be given the postfix .arena and be stored in the arena directory for RealTimeBattle to find them. The bounce coefficient and hardness argument given to all wall creating commands, determines the material of the wall. They are both values between 0 and 1. Harder walls will injure colliding robots more and higher bounce coefficient make them bounce better. You are also encouraged to study the arenas included and learn from the examples. 6.1. Arena commands A command consists of the command name and the arguments separated by whitespace. Be sure to give the right number of arguments! In the command list, the arguments are given in square brackets. scale [value] This value times the ``arena scale'' will give the scale factor, by which all coordinates are multiplied. This command must be, if it exists, the very first in the file, default is 1.0. angle_unit [unit] Switches to the selected angle unit, which can be either of degrees or radians. Default is radians. boundary [left] [up] [right] [down] The boundary encloses the area, in which robot, cookies and mines are placed. It also determines the visible area in the ``arena window''. This command is required and may only be preceded by scale. inner_circle [bounce] [hardness] [center_x] [center_y] [radius] Robots are limited to the inside of this circle. circle [bounce] [hardness] [center_x] [center_y] [radius] Circle shaped wall. line [bounce] [hardness] [thickness] [start_x] [start_y] [end_x] [end_y]" Creates a line. It only prevents the robot from passing through to long side, so remember to put circles at the short ends. arc [bnc] [hardn] [thickn] [center_x] [ctr_y] [inner_radius] [outer_rds] [angle1] [angle2]" An arc is a sector of a ring within two angles. Like the line, it needs circles at both the ends. polygon [bounce] [hardn] [thickn] [number of vertices] ([center_x] [center_y])... This will create a number of circles, connected by lines. closed_polygon [bounce] [hardn] [thickn] [number of vertices] ([center_x] [center_y])..." As a polygon, but the first and the last vertices are also connected by a line. poly_curve [bnc] [hardn] [thickn] [start_x] [start_y] [dir_x] [dir_y] ([command args ...]) ..." The poly_curve is the most powerful of the arena commands. It is used to build walls with lines and arcs. At each step you have a current position and direction, which are affected by the subcommands. The last subcommand must be C or Q. L [length] Draw a line with given length in the current direction. T [angle] Turn the current dircetion. A [angle] [radius] Draw an arc. C Finish by connecting with the starting point. Q Quit. exclusion_point [position_x] [position_y] When the arena inside the boundary consists of several separated areas, you should exclude all but one by inserting exclusion points. All points from which you can draw a straight line to an exclusion point without crossing a wall, are considered to be outside the arena. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������realtimebattle-1.0.8/Documentation/RTB-Team-Framework-Tutorial.tar.gz�������������������������������0000644�0001750�0001750�00000127150�10170545355�023672� 0����������������������������������������������������������������������������������������������������ustar �moi�����������������������������moi���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PA�}XSI0V 6T]T  H Q)ѐ@@@*DQ. TlZP`Eg)}gW[fΜ9s9)1?c} F&௡ }  M M̰ c |Qಙ<"a HC><V< p>/["¬;a<P7["v|6\� ظؑ(["zh$yKݙca%AÄ6eIJB6 aQu(ǜc8 +gs-F~ љB]]#m8CK|wl.Ee{0I /apܱ߰q !/ Fz5'" #k(W " Z"xgJ 0d`'`Pbb\ ?$ eFQ=&Q{ϐx$2,Ifn s#-` Q"lC%=z%އWZ<4Jcp0vCd qarPL0 @�B9pE716wgؑpTCpBX1S">bhg<~@/sT"fgK/%5{Ri u®<9NAaY. oU//L v,^(: V|9t<POowӼy󪪪_߿OM< 4&yb?lK+(:gz@gJfwZŅ{t~P ="bkG+9}n~= (kP\b˦p2mgfC?H=hǷj&ޚtP9!w׆. i: Fy@l@Pa_y>C{|M=";gَ7rFUV}]spȭk_[yVj2z z;vt;WiӱnbeaJkͦ*@OU֟"^e+_ߺrkQw`Ǫ?G<Nռ {<~o89+%#Hy}:'g( *PQw|fKy W]m+{m1ʷŞGV-(l8hܹLquY{KWC]'؟+̎ Sgג*2ͣb*FĽV?!�Qj)Dg|U5. uxuѺOuᨧÇ [Ѝh9-!jS-]Xumol;7ynșnY8<jfǏcYRN<k+ɥb1s14X}1ޛoL>jYn[F,4ΫGm~aisLT^6d|JPK?&ՠrQo٣ŻįP_)⏻w*|tT4gGp/Qf7[D-]wT>Ӷ_rS~o*nG>Z{_N˂ƺ4|[DQd@ʭGq:{KC?{zGՌޔǾuzE oPx07W;V$W>aۊ厛x&^Z2O<{\zwuMsf%~-gR>?ݼru^7),V7y5㢲Yuͩ6(#߯{es7fpu+مԘ)4؎QzQ8Ȅ–,:ڇ68.T\؇ytAKUju?k'\�OF%S}N?G<yPqX#V~w0q,* b<_5랇fu7bǚ*Zee[2W餌o/^R߳bNg0Nfi[[ zϽQ;hMN*_@A"5*ݗ9'x*EjH7nv c)Y視~3"mg>[%)l4+bܡ7t>Сis<wN4q[s6?x=pg}w;LJH 80a2&mhc5.u =in~j-#~.G9Sc7UޥdWu)--ա(յpMhѣ4Kk{Nnw=KՇ-޳f7M*ػ_IO{ב'ڴϕ!w-_'-U˕D ?}bI)f'=:ICm:T_ef'48#*3$3[~Ż>2j#mi#{ҥ Up ?sky»/'<ʚJVJGߍD6[Um[ûi㮝Lw}[v;mM77~0{ʫ3UtMF 5\L>/yO~Ūع_nl3ϨwOfiŏ}^\OJ2s\ۑ njLwAEŀ3DE;)g?Wr,A^Qn^VGF7w2 brÇ񛟦&<=pe䃊={\dL(6־ڡ)-,Q\)Gî)ěGM\Xͬ9Qv?y4mE<y:Ucߡ:t綏qvM<-3૾jKzgBiЋkD̒ڰ ^+lTNq]:p!P+xwC6"/&_, o1901rރbzb͝~ٓ!/ٿ ٚ`ЩK+oGv( .'66a q̙T?Wo@a]Y<# Em]ŇO:CcNעf6vo6+WcO&7<ŕy"=eާM.j_#-\̃!oZta1])Ʒtܽ0k i׶m ۖ>BӕCv'27:4خϫLl"IgVޙR3];#MQ*m:?lP=?NGid؍bέh&o䬽+j"-&җfIU[hϋ?U'͐ &$ G[JR59g(IY/ŒwG M^[0:H;r7=w8"j_1{bRO3l1xxnPb_9U`׭]u-m.eT:cq݃*!{V'kn;BTKV^gS 6!۳[͓2qn“+~ZXz^8X{Q%Xdt D LtmA;kװ'P+gxekw팍J2,7e-/(X4V]qVQ$]7ISuWBJ7⋢Aj~ѹ{X|*0V;Rchf-:i6CLG4bgmOC<SwCӞ_Zv*as@o+Ogޮ~1yaGzJzzЁ:kg}i'> p iX w&W}('C&ɏQW:̣?[8YWKd}ٔl§sMMC[r S&Σ90Z</6xD.uσUf9/tvu;KZ,vf8 k7j GeEoWi6W= Ⱥo1 4?y6Pĥyz}DJTXYi4/O{T{T[ 9蜾5_js^ح LT޼ͿW.zV7(SaOiůo\Z{XۖnOo&(<g ꬈ fNP:j9:hK-$g9 P+a5g#h:WO {GZ:�^;׫oݪ7qT4&fb@r0)nh|K KƂ_1xl:ڮ 퉾r}=Z9u_!Q;z.qqm|ʽfAɹ=*)'Y6j*o8òb˓6ת/Hےo1}ZeX60ɢ;(;8.%5?hdhTA9DVYYEmȷFPXiKRu5߁R^Տڠ"nTQ |*-'WRh%QO7ýRLƎ:XR wT{ kD#7%!̞N'-2PCSިT˛&7etJU|*޷P-7N}iំ/I* 7u ibTY\.qAn_7^Ց6:_CsbǢMvɵZٝO$צZ$0#`OoW<>VTtmenNP*Y^e]jP2YʼnWw_u#"gۍAءP;)̧o^0ꠌ^Oyyכԥ!Y~iKxRgY->u-gwj4-ͤ6 1Oԯ]QYMfhY+:~[qi`<anj5_^8Ni:m?4VWIgLqs.6 OM&^砕t{y/[mlr\h*ǛÃS<yIz-<F,j/EKW:~8O "5"~o.2Suo؀EGQ-[g?}؝Ӣ%JFgfugOjbyaenA<H=@u4'Z`"w[8iedT5-S|z<7OO]%UHvnRk{КL|鶷*/eWyN3ϗ})^+3۸BKU~B]blZU {oP혝տ\OE{7 E J>Tu`(6>׌^ªKevm`ړT&;=jL ՗sE E:|ihspёnmxӭA_tQQ9fJ{mW]pY&?J!)%gh%~EjFj? YmܪKu澟KzEBGSҼ=#o@OtOJWh(G:߅?L$aI- e/ӂEdO׉a]=D<4m|Bk[e" F7?UKgVY iڦ>Ve~LIG&+J[~kQf2ukK'sA?65<l�R,6-t#h:69-NuҤ~ϫ*k}JO'%+|%#wM(4ykEuaFj~Wj =iս.v>JM]}x|E9ebYF>g7O[y)J7U6(M [G{X.p*SK9)rRYUsܴ-GLV.TiXd}u=IGu+SP 4ۉf;ثUNJݵ~ f8Ҹnn{.Zc6˻ƊF>{:k=[۲v9x4I,B\ү1i63l[=~N,'kŽpE#su{[tsIB|ec[3,@T),Ǖ總(7}+ w1ZI𰧦B5⍃ysNu ![؟vDviȷJuM6e=13rwnNbLUUgfR^ֲ sz|]cuLU~`ڊ-t^haBHHynKnw(|2gx g즛xX=mz8n(l2:5ٺCD6ՔuV Ŕ!+7 nz϶j#wrU@+РTT04IAcCO/Krԫ&#r;5GmZόV\~}ܨ{Y+7սzC喰e|KLktdE6y-k]3gJ*n?VqL.:wYwcNM^ʭtWjT|jgD#Z+mݣ:6lѾ:C橋'L6\gb8#c]']w֦)-݂ĉT\zЅAw*\e4ixݥ6U=r{iv?Lrs_}L{udX 6}SO_n>+Y,y6MhyzݒQ_ cn8x-̊H;q_o?3t=R|.ߩݟX[?mm͍ #/(!>*x"[ǮW+aZ{ ʩ^14g]6f1lN?*Ce+69fPd:8퐝Z,a'/'MOrt!6!,T̒7UK'R,~ExWѶkz4]:du6M&w./YZ V!w۬ /UyNYIn}rٟkaAԜڤImxY^vР*Z$vhњ[`Oܓ?ˆê>lM<қ9>ˬ\ /f|n:Jy</NYWCϏ\#"m[8)eU*U1gوώ^%/W0 ~[m*ۖaw޿~JsyWԹ?T=xqHGS>UԋlҘxaPԔv;:VG`tKG; jBV("6i*2<,޳f^+I/X?6`jUX=Y0N T4Hsұo%F UX5ydpWC󝡛Tzp?KEXU�ώYG+:tG٬q JC׎m=Z^4V=mѽ=t`}b̠Yri-F+sf-JfX:qҲ#oXIPsDtƩsLŻ ^Mq?`kiY=Ω> ; Vటí&/_e 7Z~=XwFk8Wwۍڑ6nAdw(WV*nY i5-㫪>/1^?{*>ڲl, }_}{OTzᯋ-YχB4_8Z Ju YoBwHi#6}PQ-z8fNty+M/f::ݩps_NxgsYjśfSيܻ=*b4{jYk<ՖS]>7G<蚣oŘ^f yeOh9Oޜ}KqJLZJMPv~bڧoVMQN<[y ]]e> iaWgej1]é5BsCtht>}2ѡnZwݟvӐ%Ĺ2'YUnMߋZc[1ʥn Ċ:굶n%<%JZGa):4lE<,ڷ̲v[ʀTjE]\{G tWy\[v7)xVk{\xs/M}BtکC}C䣊+f 6C.- Vt|T?HE4Ab oi$)4t,>ZyT[~gSK_ue<-EB_]ЕA,ܾU -izә|{WSFN+)ᔟvK'Տ\s}.t"xkI.IvtղwϜ oF U ڤ[>wG3.R~}R{֝rFg?ؑܰ�h[V@Eףߋ6۪_5)Ǣ3ֵ=˘pj^j?R"ʴya,~[Q]KQGJ/O\^튓_N?)?9K+{h)_ﶫVKڒZD")UҨy6LGdo+ܴG0Ayy U} ߿?rsYShFOSia ^tݯ-G%g}7m;H}cmC:G)w<+}|#ުaYk46~s\Ax$\ܬn6]e }vW<q¸͙S LiXޡ-c7{~{\z)k:q'ʯMLj;+;<>@Gw}"ipJec?yxjE#]6ݙ5&&&ܝԏ}vGztefAFDwk~5"nyYzͧfѝx.a˞)CVh=&cUOCF);=[s-[hpsǨMӮ80wuj6Cwt+h[BdZ=SQؓQ}WjqXŨ9{iN7[9mdޖYE4_q9 2,ibO}F. ٣Igc<-E^n0E6D<9G/O>6*L8E74Q4$yj_npL'ړwPA{F͞Tk2l{OpXs;A5ڥZEWk$e*Ntײmq*.,N=5ZDR]Cfe~OWXs 7ᄑ6~tFTv=tDŵ΢A&u}ib#6lMXβnR@oBzMkH/H_nUO\}Һ^PUG7@hac苪B8+e2=LJNfK h1?aQ1RC\D-%CuԚ_wܟ^O8ɔggKǧ+Sn{ku)o]mSVT5kiϞXO6H#;w<'U?e64>@ds 쯖DJlE dv֒gkTMUܣ62հV)#Ƭ[a]lJ,SF=Bҿm,5hky#Y!S왝9"kϚ#{v3?om<>ٻ&kS-x ZyGj٢:k&Ivy6f=IT߰ϮG7Ts=!v0XMu7AMSi݌(Srnf=0"~e& GU=u-=Ѩ{|ck;藜' ˜nV[m7L}w'gvt7\4J- [º5l_PLnPڟbK#)S;4=[|inܘ]zC>;7?- BY#I}Ŝ+')uP&r\6#jg+/ײ'8&uHCmng,:wsA^.kݪ\|D}ONL^!4.J`=e_yq+׻s-vRӻJxPع$?s5Ɣ{DT sp/D{^i aYβkfiځE䶬~q`CGufG:Ԍf,CJ>\=diUϣ'r#K]\̗.K6e Y'r>?e|@QHЙQe]rNӫ]ޅxLOu8V%! =υT>)/t·y~8n..bS˄/_ v9eQ\Uض_pgNV3 1o.ë϶.^wdәc}i 檷_ t>_?q9~Fé&{.\gq2;80tYyoC:7/g*jԶ܊bv?P0.XD~$JMF8k!J{E.z?gg{[n[-IiO^;L{nK~ 33?3XʗGUiǝ% v[a0LxښlcAĊB C.5(u|dRJmX5E.nF' ڰסrQO6vhC$<2a+覆#2BF'6',8b|}/^⏚;l2wy[mW{fƥ*=q;2W޳e/vX.7Wo^C|ތiVdx-mUg GT^+ϸ AEM#quKі̕wW.onzov=ާOgG<}4}a[N+ = |GwuGku'Xz|1RA;jdB`l7]/3M&eқRRG׋l<i cc aݾFfPԳatw7</'VQBnlxrA͓UUQ?mNZW@wg'q9#AYuW SSF7ȎlI׊+{gMXh?zPOL6{*۱zoP#V/:iOP]$rbg75?wRQDi|PVnzT˲ֈN @Š?N)8](aơI~;J zZSצ\4gU]ŬU,} S7w DC:3Da#m-{WZ}65b{Ж,*~x[ZJ̝}H Tl纲=Чd[g%S05`;iTAt:jٵדn\ҁ}I>z^=&-pLJIV;t+_kkY/>6NUqG^k3qHLqw+ 55 \MJ@^ٸypU򀋊]~ڈӻ^Aw)SS!=G`w;4t*jŠ\=d8Sv]=ݣUO)5u׼y/->ν7Ơ͚c"3YsU:y<i _1eҰ$ej+n>y3BLAVw#S5U.~wE]_\_TDݮ;`NGȪ: l٪^+<f6yͮYe4}~3=m=91VµzɮY9O y!OnrSTKGVNwH=@aOC[w٨=}22jmiyĥ庫Uڪ9~yfq;=-LIK6Y6%bF@&^Qbݘq͢0ŋûSteMy 2N;,Zӡ4(!}Q5mSc5ijvt힨nͱ ު {VG|&zUfhW 43fp}]DYaaGģd,ut岧}%cvf;NԸ2Å"t)^D4DR-d^]㼗\Wl9phxxqiִ"łGq]qhK]v2N{ +,6>Wr tvutf?m#`~o`ld*6CB0jӧO+.#dZI[ʧ~!qe6adn  ^<ӏ9(rwOUoJf44b G4Yє'~}Mow;`A%zKƁ*w~oU%TUeDž˗\6ciFcmEhAf}}Ʌ'{Usϐc%ZTem?F{ĉny;J1)]Ź0~cqݳ,KG(쑝PV%n,M1Vs(RC_ /ԏSyZP}zq6)Z#wA-gWuۑt5^_s}nkoe=ʽudߜXӥcW pc7rIz;~ry'}>yƙF5:tr[w` =kuay2A:I`ryj-ltmGֽ/⻠`X њ~4M{*]gg74EƎ}N׎SvE΃9/Ӿ=;k~{~\\zaK<+Zo FD);VZ M<6!]9:͈[\w9HoG #j.Sa/X:LwNCSOɨkYQtfU-t 샗.pĵ.&*7eF>X};{YzC)}}zQ#f9x+fgUvV:̘kuwO0[8߮;J:YK?m):QĄ~ly=nDlQV{٫Y=Dљ[/-zth|OXhwQjY>ϣ؜~Xl6h2)}W9F򦪰lo[c}][ /Yoֈ|E_սv˨R5aU}VR>ݍY;5?|!'v,-`fo.,b{^Qem(s٥*^68 \Pv?ӱDébgT+-a8MZOr1޷.zkE&V<]pu) OjY<#f)i'}7c^\N૪utTٕokOt}MnUM;L=xJ]FS |yv.s%E7;O{,Pwa4D ww[6—j|sn*LHQRbl<^zrݎUqk翵P,XUu<dccP=<}ÆvxM|) ~H)+[3cajCuLl6e=䈃d螗FXW>6ОۮC`Ǝn5UCUT\WŽ>6dfXZפz~uɭ]7 sO3mwKCOod^26_rߺ3S޻YMS?M{q˔̒SOo~Fޚjs;W,zK1VU`-Z#naMK3U-M>WѫׇFkO+V%t0R(&Sn}?Pe6={52L9瘓ݮU2~ON>4egG8<╄o xگgm{~= KƢ9= ͣ])SxhG~;Nn 1T4̡ɩLu{٩g?gb馞#:8m?BcIA4΄IC5->>PX JG3QХpNM<lYl=C{Zn~ye gWF \VJCZ7~PvCw;mMv4SOקXOE`o:T:xo}CÌeǻM{-1h^=4V8ؤuOSlegSׂ2a!]Dԡ\QC*]{xzշԃ[ʯ.,e˨Kppڭ c̼mb~k+읻^^[QŠIrr8S>G^.HZ"2sg 5N^ewmZ0:.�zp݉c=.oxLZevn)=qq 4?L[[*ݜL?l>6.'Z/z;*7 ܽޕ7ۀ1n ʻLA7O QlJ}h縧)~3Qpfp- Ӎo)\7%wN!/;zdux 7[t<q %r]b{46/NR̓*svDxzLT˵oGk;6:9^.vͳ>n.(yS~UuN;wt]eM:jlRCSڹd=7yoFK30qX}2t CTnοN3<me֢:N^} r\7G>I觾ʫa֛7V~ofSޛaGۡ̓X MZt̚w!#u)IzN$AFߗgƿEfTK7ڡaIm4m)ͱP?;m! oh}(]^JfP˘EP=~lݷ+)􀭝/]d9H^Н\<҇GrsU{l=#_|bɝ_=YԉpVc݋.:.~JW04SJN+}oݼZ4y*_ Y;Zu=E4cbLCLE;h]߯i>/U- 욛 7AN .V3]0RU:nti@gٝ*d =k |,{yg[U c˭<2+[_eG7duaiMs3{Vx̼o}ɻ7,??6tjɋwN!9rhg,O/5Z't3�*2=Fs`¸& BKf 헝K.|Y<sbzqD-ǽU>t0reCvO=G;S/q'Jt̟ءuQ=hg}fr?w>'׼?9NiYOh;+2*eyΛ~]= {-{ᣮަEw.vqzu=>gX?zڹ65[辞kägyΨIvP犒*]`28vA%-L6L6>Gs;ן^t'GcnLJ VXNqxꒈ7:lq_{1ڋ=24i7D)MruvB.AF!.-dVk ΉՇwl4:}Z~at Oڥ%-Y^!Nξåa^;M #*zhQ#^>dA 4l5~SalGs<mG._M2�{/2RCSSګp<^t]bikCJ~?xXI֦\yX6ջ8XGbeonĔ Чg3 Jz h t}UAO';?4mKg`eYЦaNuO͋.}c☥nWV-y'^oR?[f=|zǥ5r|g*4::X育T+'m{ɧIRqW YSV]vz.'t䏩k?XOTIʁھ=ei 5lJ^[itF[GMW2f[}`=tzԇr&k2{ocm&=JԬkhwJJTybNI8ŇMZ5 ^7wpWKtQ65 LWs8C'rQd$ڏ %<6/!u23Jy}ɫ%t\3);t/vNؚY GIe6_0f=a<zCŇZI˝ vSq' V ]v.UXN6a- ngS wX*juxDNwU| ڹ]}t~m<z72*t>]zdw\hwA[OLtxP`b@V~//;j\qISNò4R㊎ ,ΰ)=u_a*@vqsS�uϬl>k}SU~mPYn0vmoáԌ /6Vb0bFEu+W^PIKտqb}K9 u!c5=Bg*U;斥n=w=vs.[ߠ4CqE eV70?s9ԍ]z7E׹˙ߗ/gf7^MxGTs=VPW.%’ՅaE;~)7^`vhXʣ|/(2Y9 vQQJ旱fjhW"iaF++Ys\Ycu(ʟ^TwQAeuu-N4lal2 N ?`wcC֟^嗙)(dos}yY$ Œc]36Xy刚i<yR/>=F}:5Rjߨ3 .)37jX>yYjI7if6v0f8?PLْ@wwN+_/t=XY7@VC?98 }z0}ɪ`;HT1ܝqm%z~5ՆpCWH>mOYs⺽^PuU gO\V9=&ŭz:M{L4;tXu ]/Ej/AoOd_wežs&/1wacjf?|)fxިiN04J->GvX4Y<3AmxQ|>p+[_Yxϸ^wMnO%`TkU=ř*k<`լ!Mn|;1Lu_6UMLi~:CK5^wh/7왝o2Ʒr禍-ߔ;p땴Tǖ`F6YoD{Hl\2,ƳlzW�ÿhPiO5}eg QznA-: N]Q;GlDZ-E:f3s%wdN8Tcjҍn|_='ț4l}P+LȟG9mo:ebAGem->>V{ҎK2>o^D>DizϙٕVKP6UL3͵UKӆ8FRWNjGb*rC=RZ|l<V(.>{GTOwu8\37pۄipӜMQ9Vi[-XM]`Tŭ �tYySx`ueur{-~,,oT6vQ:n+\izOSteU̯45cjVʚCw|YSPᶅ}Za'w*7k4Kmh8f>[Meb(=sҺW)/Qh^u8w'mJu}⮩B_?8n\j2M3@ҡg] ɢY4swuZ?=?G'q+|IQ&Ωb{hj.{Vdv$K1{3lufW*}2iVm{Sr޴U;Χ1vޫ*w_\Uy}_3G TCO<a3;:>ډPpUZy~YzR;w]DY\raySa&% ?rڣI9sTvr74qC�m8gX[mNY3ۿ+{~܃'Myth쌙C+Ttf[K>PtMb{tmM񘍙C(g<Ty u^j:c{Ծe-~jKr+|a.<]s fѓ>8~jq5i>mӽmW6V8^~N Wwٿ+l\W%۫"SV\=l-"w?{hcEh~/^??LjR΋]f&0%>rʭ>3_!K͹MgOUhŘU6[.zze4::ZPrnQ_o^;nr77u|y˴]gvhpw/LSβ{s'l 免4vb}ǖSPy53(7({Dj~pZU]ގډ_ܥo=gMޟm-S2.zoI|v.;o<h;-Z+\lz> c|T$_<K[e0y5tM)>J%8G}d˹ _'mQ{e63.]ߘv+{=jG̥/mBLզT}bzj' :2|o?]:S;OYSFGՅGU{fi^.+*HqѤT 篯5dɴ.èԪQ7nXI):뽽KLV٥p]9OG{ÝnŏR޲zm[DŽ^|R8Z0+W{Y8lSD^P>~7;P3k%!i-KdĞZjVf8jDFυGJgm<>3ݔ)QDt8aã3G[F~tU M+1F 4ojFƤa_T9o:V[5Z:S_ZQξ0:G:X="-B:~Z^:zd`_/9ei9zow7˦jZ$c-x߱mQs.ٹS6) :38r۫Km[zS'coWx~ϨXg欓5[x䔡SxdsK+7讳_q nXt+V/fFz86nW6ؾ\|`煪/TӗV3>gP>4k8+ J8g1iLtA~Y礀{Κ䚽zui7df?ju*LH4ٶ'Ԙ TV xwUV̫xܭ0J4y+(_42 =54ϧ_݁o+GxN8evܫ.2ؚYi1GhySTL`-{*a ޹7$>l)W+]V\jvZ'NJ F,hٕibфo%|J7^㦖-e{\kplլ-U9})X=vON8masK_ )u^xFZEEOG/̚+o]# bL[pšihM׻\l 퍩 []#&lW I<O!Gaτү;?۬\FdGקJ|O+Pu|UQ/m0U<7z(@Ŝs?1Sn|ډkmzsMB l'X3FhTvtyϕ=A6_V)mܞrاa?968]1;%7V]eӖ]YN@$ta/.?U1-koϜ2/>l. i`4ЋFr>~ch`l471525_ML|ƫ;z90${wWd#B{#zf <GRBgdPegi3A[e⫮�FR.bo꺺QE"Xlr!EEDM3F"N33?4FxQlo7:6K$HquCce"bhaijfibx]]�V$*d `Dht ;z$[WD_#Aw}0+ �Z<qL-t @x![Amh(#dG !S2"uH4ǟx01 x}Y=`=#ezwdIJY" .!tU#} 팅l $DG(z@A(*H$a%w Sb"LC )͑>ܓ@6أcسC~=.l$C6Öl3!A1 C!éJchi>f>ރ`1B1`xa$.Lw$a]}}~ cXĐF %Kg6x[!xŢX6aޏp B [H ޸63a\jO!>{? ގdsÑpDKC UW=_ \OC(Ey1 5$1]Q>Gxq\ H[/Vc8 "Hҏu` bX _y�@,J@:P]!�b z\T?様E"(F8 C GsC,RdXh,Ea P>Na8D($F�/ 4(F,|6 ؖ4e8;(c:aW 2`qM />�+@ > A#1ݲ([|p Ch1\.Fp68æ 94HdT XmE8\<'黳13$eD$cz�FrZ "�zGap>/E7 Jfk<|Š#c8B8V#F +ebMo&2\N<x,q0<.!2T gՑ2 Ɓ(Ǝ8c1h{]@ƎuasK ɱc6$ry�= AQM8>fq 9L! #gvS`XHGHr4fb,mE?6y 06(qA(üwL(D0Dlrx)ᲅzWXƚ�< ,@ԐQ�S]r<}>�@# HJ0IQ2,C>F,<;,�{#H9Q?:W0)3BB΀CjlƉ#Fd'dbPi,n^x!$N!19Ǿ`-c'QVj= sS&;OώF[An‹"bGFqXǃ1x8vtt>JtEhmG:LraJIQWX#Xd$VYY8+2Qv, ;{#:9 [MeL-% E9;"1 ccĞ'=#CCC]Ccsd2 &_n'#dct]8�pLvxM9ܚ pQNH6kquwp�/p4Sx b@(3pC%P".bR\ؘbJX/derbX`!aRFľ3/p~gf$eH!-(=rjpLnZV]PS qPҗja;oxmT}p_!_a?33l33CX66@CCV)Pm0 m_?.DklEdL4=~*ccuo[r0 (>ذQTܡ6;B{`9d@jm<.I?@T P`c֕C3n�+D(+aMϬF 'd-�;R"b x>FPr1c!P&dL`vVf@KN'P-S$5+D=B�?КnDC\ [ʘ˘M �Eb7m2\hwbB14ZPU?LB'0ʀ P�ƑHL")K�Su S^P+ �6!k @B�a14U$Ea*H _0s �:G<`4a ;j:F= [yP7{ha>nOG"H`M [@9VRI5.)LO@8e@g #� $iU yz}D4!PP^ ©dGq ˬ� .L7&]l4H|fjk43V%zT2ad?)iC@b2 x[` ` nNcSír}݅n,`s�T�!*& К H@1HK@PCl郖450 bpq݌%}Y�xA�b^K`EM%o_L ASPr *0 ,,;  P:8BbD/g/l>0im0n?`h`ߋS#chW|Nj7`w<ք.q*2=$PtA9g5G88lw Apx`QQ@H̆?%Q06Gև:z{^ f�C҃T @s23NN7[d6I" yp,UK0hj1bltGq"1Ly0~ 3B+@f|aLt Oh0P8xZ?4@/?^' OLh B 1~  'KL"O,"b/BɜjQ^eEQ�ǵ%NKyT['5aK gO/BZ. c,$i(=&b |[ 0IIB0,f~ʑh[v(~$;&\hGxD'ZJnj֌(! #,-[:/AB!#JD z#" g(jnБ0p�Bh~z[3 l])HW=| >C&6b[S&rp="2$q×7v`bBa cpЃ_:bx5Iv$۴DQ-ĀMb x`D=#syqr!�ٱllt=`P 6XpZ` ,ϔ6.80\ ώ <�=K;Ij4?Lj@,à $p*܄+7\B#*FiD0B08ac[?- Zpߐa;cM?X73cBL��a}OL1C)w&mB{14%GIC&et pG�U/AP̒WAȽ�VQ OGH m(($$}(B Ih`!gLX%pq.Tוٶ%B 8@DJ1lg.JB dGa_cP*hA!\p6o! L3S]='ZJO;+(_J.[t$z.B( (lr HX E$A2ä: A>�P\|sɨvQGI>mD ±(0H %2Z dtdIHB͉�8}!H-2zXxЃ,9#Px& *3Ƒ%\g�`ߎd01�Q 8=k>! ĵ#N*`4-Tpڡ拿ɂ='(e  "c\B C4Y+B 4&Mz q86XZ$F_lDY?z'sIyf%;9 w "qK3D>Vo  l�|.1|Ǥ ?CyÙ61Z6<[I[1 uV^yPs^0H b#G;a ͜# A/AOv/ݬ$/I#١ 74KAV i$ ;_0 0񲑁^DNtoI Pxذv&c#;4?F(Zy>&ƌar@nPv@F&QaCƷ27K уB2'*lA#@[cC@ǰ\@"bZ,okv-57SM2rLÅII*4?M(r#GyK(>J%Lvח*ZKF l?_G6|L�%̓ E¯~I7Ȋ80D"[ ¨N).7᠄V I,XxCʼnOjxl>0h8-@ ;JHҌ'J(bTHe`Hf~Tl~!aa(H /K Ȃ Bҩ�C$e~?"z{_ BHh@EllVJwUk6b >zӖF0LPnx "3qhEJT, .x)i@Tbm#hǛ$cք�`!ֵ텀i0¢STtӑI]YL` P,up/.bp!qcu zAv OGT(9&ۚYV :%crљ({[ ԭ$+@2|ȋ`mMOFʒz#v$g'B(�Hvxdc $lʀC!t+~b x/�b PLcn)rF}#xqpYWaO qFb?6cz8v{5#} ؛<MYX*h�AP<9q(hNSD. x/l}?HGZ.鴃Gޅ ep,-q i#o0_ dJ .#A,!ckղT/$LP^P#.PsdI;J<!t' 1ٓij8*ER6fOVp煇||6Opay0u #0^2x]G,”&ɫ RA!kt4C>G[Cgn=.q PJ}91I{i Jl0`+*Af!Z2'ydl<8 pIa``Ebn롤~m::`,>;pQCm'},a ;vޮa-|?z<5_lyy`Ȉ_2 bŀۮn34 C�Z*W�M4Irř$"M]W&Dv@Si؎- 0 X?F{ZeyqZUډ<2X!K$$-h`c|� *6SS  ب!׬(0r^6sR@$%{QȌ@D21(+I!@E hLv C.&ScI=br=E-y�$9ca xL7%gw a;l Ll6Ig~:#w"~+\nb&Yh֏fʻb# DZʖ햳7pC(l)׸RBAM"WF5 0!( 4%HQkA"Q~:p E!Xfr'( �i1\+]_2=!CTJ B8AL(>.J/Iꉶ:z?Z)XV.2'($k cQp6WD I9(m`sqI -x YPa8 S<�)ֿZ>Ȉ_<onf&ɿ1NG,Pv?uYȸvBjZ�a4$$S!�Z8QOD0? `A[~j}J  'Q8b"C�K!�ye؜xȀ!$;hvK@3)qpu�@'F $!K>b8;/Ɗ!Rw Ј8`S6rSaB>';Px{2HF'R'� vG6!4_'iyDr0k' 0O0pG\/p@@[ϼ#ϓ'Q]uyI]I 9$3+X -;W^q. 0!3B. <`IU>,80#LAFF~P;cL'xJ@x@/5>^8lp*\.~1@ľJȓr1 Rڢ\ᘉ(q(q њ2dYʑ%?<|<5P96.{!hPG`~� ,(93`T DIka#9H%%f"&@�]\^\OkdGd‡ | 8 ITG 1:Һ&)'GkPXu4]=N@ 9<�Ȩ "`x&Gh`ۊWh&+A$},65`#d?|7Jښ/?GEQ?Z72u1Bۉ_�lǞ7"�4'lY M Oaɏe%%! C&E[@@}({X8/W<NzΟԁ@-�IuLj%EqڻLJ,+lceosl]B,^~LA\96`aD.0`P˩[˒|ǑRy iw;tJ1aV3/$�Bf~fpBý4Oj$HϰO1q͟,G@*}Nwe~~P[B\"z3L&9S4d֑q\mPnOBU۩ʒ); KѸ:$IBm$H02:ZcdSR9 &2gb1,\] /əYYC'hG$CNd {u'4: $,qdB+N:0,#Cw}KN"yyh-#DD$܈8 'Bv ټyzZr]Z¢сL�N~Z1 6i=�%xD/dx"R4*Dd& PsHw *l [%Z< c Z@pH60lQ,8;ώ G|&#A̛x^7|$DLb 0y( I]"r Ve3J 30IҺ+YL�8_2ͻTõ$=I.oƛvOJZ_0lhx 0%Cڠ=*ѓC@S&"iDQ#v&c3<<u~jŷX d0vJ ְQ/Gp++%h&B6vmωBN)0%$ȷuĞx".إ]O8ǃxe?#U_Al~e0J;�s#($} D?´ђ;00hЛE@rSxN P:j8€<H@ X) =o4PV]<~ _``[|`@4QHL$Z9;$ 8luoQS~H@ dPE)<Q6Cv8" 0e.tgK U erx d[L"IPNHݑ3*% &9BK߉8)ME \ "B"!' td\ 1 ('V"2 th!P(Jґ'6:C+*'*HLNCvr:9|łD^' Gp9X!pbB$ӑ`Bd#9,�`#ЋtP xbejcB#@*ͪ-v@w!<^p|~dR >n_8KJl߆#H"NL-Ն$!P<>N>vAH b-x+ $7 Bij,#UGV\+D"YÍ4;Ȑg6Zd}zF! pt tvs)@oh}<6Ab9q:K#dǃI!4"v{2V[?%qԘ�1Ẍbcl4rA I<\,[c�أ$X g@%7dvufl i8q jaD`RӐt~ w!"*I6G':In 2 ˕2BWd]xz*O�Iu$ 33S^AoS%0k`l'Fϭqڪ`wؓ+ު;*[:\R&d?i $b02ak`6g<\*bPeL@'3X6Ǎ$MJo5D2�BalXאZ=*<VZbG JW(CXcVԮ%W}!Nt*d*sA< ,=}6}"Wp⽼2 ,G4ԍa+R& V *T|9FܦZ5^ Pyh#,/a!p?W2{i5~>~ͼmg?%og-%y/[' mXOL"P>BOk} 4 eL,4l~0I6?KlD1M]r:x7QJ&Bp=y�`SF>- N#^=O$;#R!9Ϥ$XSxi<:`Io"3@qPAj5Q3x 2o ތ|Y>p̀'C. "" `wc6\@VZS{B1� >u,} &dI< RS:@*_${݋KtvLBHYR0�MŌJGP?^E,<AC&6qG'(BvK%N}1%\<P`ScI377 Kf W^VGr �K?&:aL$V-  }r0 PD-ٲJr!Is#0nyQ0,PnkHpl:39adcI!Z҂ɼBdq;3eM< t&ʌn`9!˱jB@Fې{2.㠗 n\ܥbp}dL)&}dv;i9)Ƕl >ND $p!J.H 1l�?!IaA1( 38d ,M&.f!Ҽ A=erbX8И%WMTB,΃;l�gMK"Bӊlh1G1r JKRsӼvt'1!.W5b]KjMRyVJ/Zd^7L-'kM4ίw ;IbYt42JOfcs(:1zO"BA,n|%gp'fd.\;$q~ IzMXeHC0 7"Ixp9\TAuulA/`UaHŷzB8 Ŏ#&V~`l' d&<� $ <m=I@|d ) ceV[h_O$n?ZBX0D籁�?J" ]ċHe: ׬$[n QMgLr> |WPC^{5y"o{A.$=09J bDDGm#vm,>@"1×N#`~#XB7++$5 {_IB֩}F$FOeR8}8J0~z.]6U9gY߳~bש(~_'?Ęė~{ίI'3_h)H#6.%,7 cn<n?X? #IBx�]g4/Ÿ6m$p fD 1e1ÍŖRnC"} o쏴p5?#>~ejfжѿOH߿_3? O<~"Q`?F%>U<'AO}x%2C]W! "B`oBI/%C( %XCr܀p܃C L6 M(LCx29/lDi~Rq׳Ə/JcQ0'Z_D<ICfDe#R fn q88 Kdlo=@%iwP2Nj'7}_7}_~ ߏ/݇P� a(x<dxd ) cǒA:1ik" X Hc ڰHl- |J /@$�eF!�0u'Sȁi(چ02NK& S7)Kx(Fkͯl|OC/0lAeqAĒ`@Y: <@PXL+`G D@fL 6r� A$̚=TM]0AJ$C%) jTH30 x" \"E k 3K遠PW2`O#&`@=u"܂Ar<y0g,Ad�$A<1S/yb(CHgd�+N| (;2J5 B&(2q-|TEevF40Ćd/ɼhGx0(^Yu2yJ|Ӕnx2Xٗ8,GFKeـavK[q_ڥVaT9JPKQQD@L:\l u܋29i1 ?@H}63KrtM_! %zIdVCfYhQi� Dsp~d$Qpѱ$@ʊW YlZ%^ ~m 𺜑$x#|UKCJQQ)S_IwD4L h:Kf>!y&R?4 %{"Rġ"O&sB̆܌Xf"p{ ln8*Y!J' beq # !v !ckӮ*=sܸM??s_ Q OL0F; .ML&H`/! 89Ð D> R~llȧ%qRu>\f Ob`sT}& |:22 NJ Xd#T >H+#[Z#.FtU H)CL36e=&*haLu`С(3& v`Г #[CTa% BcE IsD@hFcxAx<0ȅ/>h۵.xkBR"cboZ Ѻ *p8R#Kh-"c8p9iq97h&/* L\@ vox;r(Nk+Iʠ¡U#[;X9llE˔h7B _f#W,Fғwf2y#A.Q?0WqGOEBA"+^,V8Fr@ p`XQgCd#w=b#R{Fb\uBKfg2Ya{[X3<nP&ϟ� XH) Y$4C 3h*K.0xȔ- D᰻J#S D Z0�~L` ?8&'�pHbmh3cfKvb6Id.jNGlflI� vHdxX0'587`ˈ/i �I*ih P@3M%MTxX pnx;h#f$-]�|eJ!^%xO 1H�* ,SдP7}#i:ed* A⇚J�C&I[d6R"�obnta1yG$aGCc]sdz.xDð8F@ 2 ޛP 3>% yP]&W4FQ1(>FӠ7EPH,VI$K s#"^]z/j58k ?H<+`>w SSb,k+" 山Wٌv O ]\ d_7Z$⡒{ xG{8!0b'[[[vKH&_^�-y cD0 ɒxjr6'^H!)KK bi�A6u0jzI*2u,e(աB%b'rՓ>.zv$"1e 2 8S!ᤓ>S_ MT&a!hX\]$1{#8<5.w:H(8%y4ɋ% ֡|S=QPgb2NP7(S9B .k}@:\ .@�%?]z<nkEEa[=(L$1%k4'!Hlł2Ov0 40M:�|'$%M_'On3d@urPO5cķ˜KH&rXy6AKoHP${ Vw -ԆP4 z1%O ?M2 jBNA>grsJxQvjG �nEpç@@4`(o-$T@AP9 TI%u:suPR{"dk$�s-z>p lR<1XLPE:;9(3Q ʀ<d=!�gGDEpndG]lXS(нg.8:+ʁ�J82 = wƥg EN%$b ق �E0! LBĕ= *C3ّPHYc_&G BH>KRCC@Dd!0O$6N� ʕln`@e߮G$ω^~!Nv.N0-:ڋe=!宀azd S/V oC)OI�ڕ7<; I%g+ iXMZ𠀠.C݅b CR2pr(~b,H*!r/ٗRD~!SHA F9qj#3]ny(Z @ \'K.K/!aBk$/{_/w'SD'?/P38L#FPPX} @֫&]<"!%םW$Irr+|sjlO;=!.$ .Qo!y#T /cP"`5)&f5&Ji+�h|,;K;B\ ;*/wIl\I+ޣ#6̑I99x]8JpLcsd w<IJ| vg\kk m0plćK:Q|M&xۈg3xf6;R4##Q.#^v1R'W&pdJmۈQ6!Q}qJ@XqI\V{Jw) xڹK)2FRX aمÀgqmF˜ $2Y!k/7 6d0' ` ,pAX)]�];Yj $Na&#tyɢhA퍂5vUѲ&cPJY"rbkT2Vܒq #bC J,[2yMYS0Bɔ=UFO Ko .F`8%ִ$$.OgI3K{ 6C{w/.X6? x h܎oN55BDeG;W1_hp C i9)I Qw9 0鴖qHM2rKDj%L%u{WZF-4pI/vl@rLP V0.XR3P29b' !lȭ-%P'-S4c):)+."`<zD(K| KHR(a[du mn_9.In>O+ИX,>6!lh &-hAN12R�ՄAI쟭G!1C, Lܭ`Z`;M?> 9x>+�N@X�E :|xЇHKzcX&p`٦qxIGq$brt 3`sGOUp'/kA͗ZۼP'y$&UN BGidbՐoBb2|XVvmaI?!|k0 jcj,i0)kȗA0-U%0!+@TA /l}9 E1V[�oTl# ?>,/aSڔn7~ UnخצqGcٹ\]_݆pa`!L#04LīrD` Z� SlH=K `hJ|ZQ<md]q31.1X6zur7[hKqM de �?carQk @)njQZĻ'.q9d+ , 6+߻?&)@w> sI>s ڞ17_G1CɿI?rq'~{֍/D OQd_j04A$2{g]1 .b”Cuc` bM +( M =T| Li i*9nee"EK/>~(7�HjܱQ 2tJ`K6`Zx >LOo"!"HR6)-BNfm3uǥai 6ŝ,-Q!XW 0K{qnua$Š®`6RsFH8P]ksFݯѯ@ivZˏw&k'cg\X.[L*rdKĚX�(j}m�dS !d7\TxIï_Bf n=8Ea\ć �Z4VOӌSI;܁o^�!r {7 `g�//? _#e :V9͜]ŜlѮؓe`Zj$iwdR7C}a|:2R7%d!$6)\O~Ҥ= `:3CE` Tptw[ 7Q2znh KX+_Ts? j p`>ʣ ?qǩ12 5x#+mʊHDeI4Oa8 D@&U22:whWSpds5l,VKˍ_VܪBI9v<0ToCۊ~/%Gp1JDa4"ϲD߳j*hq,8i~37\aTʘh8EXi {^Ґ%c.d5k<z))"8GE']I Ҟ|!dGs-ՠ"w@UK~nȨl<WG>n<a _{&N&BcoǨml?{D6BF xb`9s''oX N{X[̼rfU4; e%մ47ثJzl4\LÆɅ:. _Nt2rēM4b(jzwP _(/7GGoG9ma;%ŋn~U DMRHbl㼃l~ ԧMel:(1yp`ӿQ)jt *wb&њP1^s):/4`ӡ=Uu5gK[uB߆3* KN6AsT-Β�x+ٮW/E:]:/{4OT]1q8�å#uJKJaUwf';U=AJS t̝'r�?$ť.5#/&6m .J(I.Gڬ&S(fXp*?'�공dޖ1vbv9P(#!"zz#FV;s%`L'R L*5-Jq 1-s#Nǽ2SI<{ soVuTܿ.�Õ0Kxbξȗ%@'#?-OٞIR0jҌ"u&`CϨG1n{N\amc~y?l=>!~ۀSp m;ӊ`ņdڐgMp8(seeAԪ3ː Tb9[2\LvQm񖏫U+%ېBf$R)f<3-]냫;s/}KKl3shW$M̈K`Df: i[cBSd*l3v$y=* u;MT7$촰>Znedy�3@&j1F}f0*( Ϳ[3 "tlK\xΙ.d!�lq R⒄9pJ궴|,e9&3'2 GU,d$ Me<<\0ZSgg1H rhʯ9^j~|!/J(+޷/!s!3}[Jsšs^sn'Y2jdvvObӨS:Cmu$4CCHESs4edu"ErPtkw'Q,TKՎ"[#K ,KkffD #6MSXB<3{[Ҝ_K3iB*膉ґ|{ wu5τN|qᖫ$HP)%K#e0B竅6ޢ4'4}+aQ`?`Зor>uO# 4\q||۸|6ٮo.uZ*0na!Hmu$f+Xmi9<h.#=vk7?QmG΁C(H1ƑDH\@vO֜Q~X{yG̾qfv$>{xfحp;o{V 8W6R)8EBG!+ J-2cLA"'1gހ3gKC|!w!StOy=J>=z3oz'm0xoLmqq*?9;nsF @)Z& (�wEKIG>S=Mf& &C'GDfݞ̣{+ju:O<0:bV)4x +0^0P%bE<8yj :,./ iar@&BiX'/VRJqcKXAWyӢlHU M<biEt$V .4 $ b.ɷb]ތX<l [�0:bF=w g|t+wf~mo9w=bʷ2nx(, u>z'"4=+( DiP5,8k~(u{^q;1MԐEC~0IZ-" 4 'B呰MBsE"fIN"×mA@.B+1R)t#y[�9 DžLĚ�#2 c1%h?v#4g=].;*)y#`S8uïVZz3kBHh ggpD"ec-dV81a<^‡bQTPa RiJd᫅ceLΤ1'̔B'?93Ug\oTSċM @Ž1'w`S/%O7ޞiobklYcqolMSj21f9.sD{L\ ([t8 o� ߪ?`ϟ$MLP//73!*_0<3&3qǴp5JRѭ\<)I<(.f x2|\ 9JWzyLÎ$JT-?8mN*&"bMT[U8ʝXkJdİbŹҥh7{̋~^/Y%+嫗VŎ*N3%:#ʀ~21,J ^ ̲UMD48!rR 4K7JH cEضG$+ݢB*G9[Eb@ytM,aTI a/||6N WK/1ݎDO p' ؘd2_뾻e!as:""61JeXhhmxl .'�DNjI fY`"%T5!QoF傥/X7/Ս>C/k�,mlp_Y*Y!'× fJV,; L/)_?j T+THH8Ѕq<1\t8؞&Oc$ B$A %R@vP6_J,7XA\o=0m2uF腃bgH+o}. ^ ر5>O8SʮH hӹAΝffFb aKI>/p΍pGKF E_ʩnHa~bO! puC ,k@YAZHҰvOJZDZJ%Dt%Kɏ-ER}M6[nHjUNV5jƼ< ; rSl _!GH5}!d:*n[nx') ;>PE@Զ^w!ۋh= s7Rд ] Ku,}|ON`Y$˯KY"i,t6ᬏ(/E.8%!ZK^]b^m9 bP7( 5ȏ m]BA%ߝ1"W]y!:N0kX^j9 2̋36^EHචc3:o(嵐4v|M]2 o07ĊHt(æZGbeYnbf/9{ F -w!]3y să 2aR2D!8 3ċeIjY j(KhⸯȎr<푨B +l9PR-\X"8 ` )`hx1B<- .ᴧbJ2y5YL7' &,9΍x U<?JPD.dnZh̢ e e�x�:`V}Gs]5UOv |YkX֢@y*7.?g`e.`׷}C⎱JSj~cjQU8Vb,`}K Rb "MW` 5g`C, ~vCνZ0׋UU�UVzZiyOCdѓ18"ˏֿ^[(pʗ LMߩCḧT8 ,]V'嵋qC6j!mi{t(7uV[Fc3[>89FF0(}<0noCR2\$HXrh9Qk$ yK`Za6R6tC݈[8falzd sݣEU0FOڷjd`um1ae9&ޠy͂ߥq�tڼObeUǩ@}g� 1,.ԦxH1S;v7-W)v Ǒ)v O-M7| ]`;@hCb=K>D=J NIkdyV_"Pl5xxԧgB@4[͇n$$JShiAKz䪒. nK !qk `vo[.Q Gk鬒6cdޠY͸~u(CpZxɕ\5f -<nx ^]cH0A@8!F(T7;8zc3{zg {3O�)ӬJy|t] buҀ$rWPA -2G=0H?A=0e*'[yVA " ɗ09(eL.!t~%И S90V:\31lWK3o1/Bٴ26 d3B󬂌EK\M8^qBr<pVdዎU8d‡7S�6 h`4r`g{}soU֕ZIe/w$!Vx8Y??<x|U~_9;\swՂ}Q܋x_ݮq𧯻loa̽VD `d!P$H {zԅ䰔x� 6 2LG=A_khGsVKV+& .(3'wNd#IBX~L Z 0xy.M(1Ch-)ojCB[Ê`qM(ua _ [5of/%%b /fu`(qFn[2>!q+p/~GtM@ οjj#@({=ڢb_4#83~M Q/`׋御�G#^sySfު/]$ud!my۝ 0gUrG\y17#^;~[BS޳d]" /x+l/Aڍ(צ[$?UsSA}{{.ᐓ7%cN"pIwu0#Sn{^cή(G?'oIiX'1i`*iOB$Tѧo=>yO}d(Oߝ}v'ϟTS0ܒ*ôO왺߰�æ[ha& +-#/s6~_R]]QX[rۀUfS.}'{Ui=gyF;csVojvD>̽t7I%nj=s]@bm `/[6^%Q z0>Ngz['ƐO�*R\?)N璩i A7 #t!^w-aUߪqSʫ3 wo Sa-Xh4zGדБ {w7]ڃ=^FJBBzy y֢?:?Xcq׼ WC![m?FLu><8hGvX,3̀^[ >VnvK|{�0�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������realtimebattle-1.0.8/Documentation/RealTimeBattle.info����������������������������������������������0000644�0001750�0001750�00000170727�10320527643�021214� 0����������������������������������������������������������������������������������������������������ustar �moi�����������������������������moi��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Dies ist RealTimeBattle.info, hergestellt von Makeinfo Version 4.7 aus /tmp/linuxdoc-dir-20850/sgmltmp.RealTimeBattle.info.2. \input texinfo  File: RealTimeBattle.info, Node: Top, Next: Introduction, Up: (dir) RealTimeBattle User Manual, version 1.0.8 ***************************************** Erik Ouchterlony and Ragnar Ouchterlony, Johannes Nicolai (jonico@users.sourceforge.net) 4 October 2005 * Menu: * Introduction:: * Usage:: * Structure:: * Robot construction:: * Options:: * Arena construction::  File: RealTimeBattle.info, Node: Introduction, Next: Usage, Prev: Top, Up: Top 1 Introduction ************** This is the user manual for RealTimeBattle. Here you should find how to run the program, how the program works, how to create your own robots and how to construct arenas. RealTimeBattle is a programming game for Unix, in which robots controlled by programs are fighting each other. The goal is to destroy the enemies, using the radar to examine the environment and the cannon to shoot. Even though the environment the robots are moving in is fairly simple, it is far from easy to construct an intelligent robot-program. RealTimeBattle is constructed to be easy to use, flexible and fast. The intention is that the program could be used as a test for intelligent algorithms, as well as just a game to play and enjoy. Features include: * Game progresses in real time, with the robot programs running as child processes to RealTimeBattle. * The robots communicate with the main program using the standard input and output. * Robots can be constructed in almost any programming language. * Up to 120 robots can compete simultaneously. * A simple messaging language is used for communication, which makes easy to start constructing robots. * Robots behave like real physical object. * You can create your own arenas. * Highly configurable. * Possibility to plug in external clients. * Basic team support directly integrated in the game, sophisticated team play available due to team frameworks. * Menu: * More information:: * Requirements:: * Background:: * License:: * Bug reports::  File: RealTimeBattle.info, Node: More information, Next: Requirements, Up: Introduction 1.1 More information ==================== More information can be found in the `INSTALL', `AUTHORS', `BUGS', `TODO', `README', `FAQ' and `ChangeLog' files in the distribution. More updated information is available on the RealTimeBattle homepage (http://realtimebattle.sf.net), where you can also find robots, news on tournaments as well as this manual in different formats.  File: RealTimeBattle.info, Node: Requirements, Next: Background, Prev: More information, Up: Introduction 1.2 Requirements ================ The hardware requirements are very much dependent on what you do. Running a few robots should be possible to do on any computer on which GNU/Linux or any other Unixes can be run. The demand on hardware will, however, grow with the number of robots you want on the battlefield simultaneously; running 120 advanced robots is certainly demanding for any personal computer. RealTimeBattle is only available on Unix. It is developed on a Linux-machine, but it should compile on other Unix dialects too. Running in *Note Command line options:: is currently only possible on Linux with the '/proc'-directory enabled, because of the need to get the cpu usage of child processes. The only software requirement is gtk+ (http://www.gtk.org), which is used for the graphical user interface.  File: RealTimeBattle.info, Node: Background, Next: License, Prev: Requirements, Up: Introduction 1.3 Background ============== The project started in August 1998. Inspiration came from RobotBattle (http://www.robotbattle.com/), a very interesting game we used to enjoy some years earlier. That version of RobotBattle, however, had some drawbacks: It was only available on Windows and the robots were written in an own language, which restricts the possibilities to write intelligent robots. RobotBattle has since then been under development, but it still lack support for other operative systems. We therefore decided to construct a Unix robot programming game, which makes use of features of a modern OS.  File: RealTimeBattle.info, Node: License, Next: Bug reports, Prev: Background, Up: Introduction 1.4 License =========== RealTimeBattle is distributed under the GNU General Public License (http://www.gnu.org/copyleft/gpl.html), in the spirit of the Linux community. Official versions of RealTimeBattle will be released by the authors. Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony, see the `AUTHORS' file for further developers. 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.  File: RealTimeBattle.info, Node: Bug reports, Prev: License, Up: Introduction 1.5 Bug reports =============== If you find anything in this package which doesn't work, appears strange, is missing, is spellt wrong or is just confusing, don't hesitate to send in a bug report to the Sourceforge Bug Tracker (http://sourceforge.net/tracker/?group_id=561=100561).  File: RealTimeBattle.info, Node: Usage, Next: Structure, Prev: Introduction, Up: Top 2 Usage ******* This chapter describes how to use the program itself. If you find it boring to read it through, feel free to use trial and error as usual, and return here if you stumble upon something confusing in the user interface. It is, however, a good idea to read the short section on *Note Command line options:: below. Note also that there is no built-in help in the program - here is where you should search for help. * Menu: * Command line options:: * Control window:: * Start new tournament window:: * Robots and arena directories:: * Arena window:: * Score window:: * Message window:: * Options window:: * Statistics window:: * Running without graphics:: * Tournament files:: * Log files:: * Replaying:: * Statistics files::  File: RealTimeBattle.info, Node: Command line options, Next: Control window, Up: Usage 2.1 Command line options ======================== On the command line, there are two options to set which control the overall behaviour of RealTimeBattle. Here you can choose the option file, which determines the default values of the *Note Options:: . You can also select in which game-mode the program will run: `debug', `normal' or `competition' mode. Usage: RealTimeBattle [options] Options: --debug_mode, -d debug mode --debug_level [0-5], -D sets the initial debug level. implies -d --normal_mode, -n normal mode (default) --competition_mode, -c competition mode --no_graphics, -g no graphics will be displayed --option_file [file], -o selects option-file (default: $HOME/.rtbrc) --log_file [file], -l make log file, if 'file' is '-' the log is sent to STDOUT --tournament_file [file], -t specify a tournament file to autostart a tournament --statistics_file [file], -s file to print the statistics to when autostarting --message_file [file], -m redirect messages to 'file'. '-' as 'file' is equivalent to STDOUT. If both log and messages are send to STDOUT, '-m' will be ignored --replay [file] -r a log file to replay. if '-' is specified as file, input is taken from STDIN --help, -h prints this message --version, -v prints the version number --port_number -p specifies the port for remote clients (default is 32134) The port_number option is only available, if you chose to compile RealTimeBattle with the -enable-network option. See the `INSTALL' file for more information. The differences between the three competition modes are shown in the following table +----------------------------------+-------+--------+-------------+ | Mode | Debug | Normal | Competition | +----------------------------------+-------+--------+-------------+ | Debug command available | Yes | No | No | | Pause in game | Yes | Yes | No | | Step through game | Yes | No | No | | Robot CPU time unlimited | Yes | Yes | No | +----------------------------------+-------+--------+-------------+  File: RealTimeBattle.info, Node: Control window, Next: Start new tournament window, Prev: Command line options, Up: Usage 2.2 Control window ================== `New tournament:' This will start a new tournament. Section *Note Start new tournament window:: will give more information. `Replay tournament:' *Note Replaying:: . It will ask you to select a *Note Log files:: of the game you want to study. `Pause:' Pauses the game, in *Note Command line options:: the pausing will be postponed until the end of the current game. `End:' Stops the current tournament. `Options:' Brings up the *Note Options window:: . `Statistics:' Displays the *Note Statistics window:: . `Show arena window:' This box can be used to show and hide the three windows used when a game is running, i.e., the *Note Arena window:: , the *Note Score window:: and the *Note Message window:: . `Quit:' Terminates the program. In *Note Command line options:: there is another set of buttons available. They are intended to help with debugging of robots. Note that you can debug a running process; if you use `gdb' the command is `gdb robot-name process-number'. `Step:' In a *Note Control window:: game this will move one time step forward. This is very useful when running the robot in a debugger, since otherwise the robot will be flooded with messages. `End game:' This will finish the current game. It has the same effect as a *Note Time options:: would have. `Kill marked robot:' In debug-mode, you can mark a robot in the *Note Score window:: . That robot will die if you press this button. `Debug level:' Changing debug level is a way of telling robots which messages they should send. The range is between 0 and 5, where 0 means no debugging and 5 is the highest level of debugging, i.e. all debug-messages should be send. When you are replaying a logfile (not from stdout) there are a number of widgets to control the replaying. See further in the chapter about *Note Replaying:: .  File: RealTimeBattle.info, Node: Start new tournament window, Next: Robots and arena directories, Prev: Control window, Up: Usage 2.3 Start new tournament window =============================== To select robots and arenas for the tournament, mark the files to the right and press the `add' button. Selected files are shown to the left and can be removed correspondingly. A *Note A tournament:: consists of a number of *Note A sequence:: of *Note A game:: . In each sequence the same robots are playing in all games. Here you select the number of games and sequences as well as the number of robots in each sequence. If you intend to play with all robots every game you are advised to choose only one sequence and instead increase the number of games. The reason is to avoid restarting of the robot processes which can take a while, especially if the number of robots is large. It is also possible to load a tournament file or save the current tournament. The last tournament played is stored in /tmp/rtb/tmp.tour and is always displayed when this window opens. If it is not available an empty tournament is displayed. You have to select at least two robots and one arena to be able to start.  File: RealTimeBattle.info, Node: Robots and arena directories, Next: Arena window, Prev: Start new tournament window, Up: Usage 2.4 Robots and arena directories ================================ In order for the program to find the robots and arenas you have set two options *Note Miscellaneous options:: and *Note Arena construction:: . The subdirectories `Robots' and `Arenas' in the rtb installl directory (default: `/usr/local/games/RealTimeBattle'), specified at compile-time in the main Makefile, are always searched, regardless of the options, but if you create a new directory, or if you installed RealTimeBattle in some other directory, you need to set these options.  File: RealTimeBattle.info, Node: Arena window, Next: Score window, Prev: Robots and arena directories, Up: Usage 2.5 Arena window ================ This is where the battle takes place. If you want a more detailed view, use the zoom buttons or press +, - or 0. The robots are visualized as coloured circles with an angle shape showing the radar direction, the thick line is the cannon and the thin line points in the front direction.  File: RealTimeBattle.info, Node: Score window, Next: Message window, Prev: Arena window, Up: Usage 2.6 Score window ================ In this window the robots playing in the current sequence are listed.  File: RealTimeBattle.info, Node: Message window, Next: Options window, Prev: Score window, Up: Usage 2.7 Message window ================== Here are messages sent by the robots using *Note Messages from robots:: displayed. The most recent messages are displayed at the top. You can clean the window and choose to only see new messages from a particular robot.  File: RealTimeBattle.info, Node: Options window, Next: Statistics window, Prev: Message window, Up: Usage 2.8 Options window ================== Here you can change a number of options. In the *Note Options:: you can get detailed information on each option. The changes are not applied until either the `apply' button or the `OK' button is pressed. You can save your options to a file: `Save options' will save the options to a file of your choice and `Save as default' will save them to `.rtbrc' in your home directory. The `Default' button will reset all options to their default values.  File: RealTimeBattle.info, Node: Statistics window, Next: Running without graphics, Prev: Options window, Up: Usage 2.9 Statistics window ===================== You can study the statistics of the current tournament in some different ways. You can either display * statistics on individual `Robot's, * the result of a `game', * the `sequence total' or * the `total' of the tournament. Pressing the arrowed buttons will move you to the first, back one, forward one or to the last element respectively. The middle bar will show what is displayed and pressing it will update the statistics if the game is in progress. If you are using gtk+1.1.x, it is also possible to sort with respect to different columns by clicking on the corresponding title box.  File: RealTimeBattle.info, Node: Running without graphics, Next: Tournament files, Prev: Statistics window, Up: Usage 2.10 Running without graphics ============================= If you want, you can run RealTimeBattle without any graphics at all. This can be especially useful when currying out a long series of tests or running a competition. To use this option you have two choices: Either you add the flag `-g' when launching the program, or you disable the graphics at compile time (see the `INSTALL' file for more information). The latter alternative is useful as the executable gets smaller and therefore faster on low memory machines. It also enables you to run RealTimeBattle on machines which haven't got `gtk+' installed. When running without graphics you have to give a tournament file, otherwise nothing at all will happen. It is also a good idea to create a log file and/or a statistics file if you want to know the result.  File: RealTimeBattle.info, Node: Tournament files, Next: Log files, Prev: Running without graphics, Up: Usage 2.11 Tournament files ===================== The tournament file is specified as a *Note Command line options:: . When specified a tournament will automatically begin and end. To save the statistics see section *Note Statistics files:: for more information. A tournament file consists of five keywords. All of these keywords can be written several times, but keep in mind that only the last one of the keywords that takes a number as argument is counted. All keywords should be followed by a semicolon. `Games/Sequence or g/s:' Takes a number or a `*' as an argument. The number is how many games should be played per tournament. The asterisk means that the program takes the exact amount of arenas and uses this as the argument. The default value is 1. `Robots/Sequence or r/s:' Takes a number or a `*' as an argument. The number is how many robots is playing in each sequence. The asterisk means that the program takes the exact amount of robots and uses this as the argument. The default value is 2. `Sequences or seq:' Takes a number or a `*' as an argument. This number tells how many sequences shall be played in the tournament. The asterisk means that the program takes the exact amount of robots and the robots per sequence, does a binomial calculation to determine the number of sequence for all robots to meet each other exactly once, and uses this number as the argument. The default value is 1. `Robots or r:' Takes one or more robot files as its argument. `Arenas or a:' Takes one or more arena files as its argument. File arguments can be one of the following: `Just the file:' This searches the path for the file Example: `Robot: empty.robot' `Full path to the file:' This takes the given file Example: `Arena: /usr/local/games/RealTimeBattle/Arenas/Circle.arena' `All files in path:' This searches the whole path and takes all files found. Example: `Arena: *' `One specific directory:' This searches the specified directory and takes all files found. Example: `Robot: /usr/local/games/RealTimeBattle/Robots/*' It is possible to write files more than one time. So if you want three rotate_and_fire.robot. Just write rotate_and_fire.robot three times. This is also true for `*'. Example tournament file: `R: * Arenas: Circle.arena Square.arena G/S: 2 r/s: 3 Sequences: *'  File: RealTimeBattle.info, Node: Log files, Next: Replaying, Prev: Tournament files, Up: Usage 2.12 Log files ============== Sometimes it can be useful to *Note Replaying:: a game and analyze it in detail or just to store for future reference, in this case log files can be useful. Add the flag `-l', when starting RealTimeBattle, with the filename as argument to enable this feature and with argument `'-", the log is printed to stdout. The format of the log file is as follows: Each line consist of a letter, determining the type of information, followed by a whitespace-separated list of arguments. The following information is given: `Header:' H [games/sequence] [robots/sequence] [sequences] [robots] `Arena info:' A [line from the arena file] `Game start:' G [sequence number] [game number] `Option:' O [option:value] `List of robot properties:' L [robot id] [robot colour] [robot name] `Robot position info:' R [robot id] [x] [y] [cannon angle] [radar angle] [energy] `Time:' T [time elapsed] `Print message:' P [robot id] [message to print] `Cookie:' C [cookie id] [x] [y] `Mine:' M [mine id] [x] [y] `Shot:' S [shot id] [x] [y] [dx/dt] [dy/dt] `Die:' D [type of object killed] [object id] (if robot: [points received] [position])  File: RealTimeBattle.info, Node: Replaying, Next: Statistics files, Prev: Log files, Up: Usage 2.13 Replaying ============== You can replay a game from its *Note Log files:: either by giving the *Note Command line options:: `"-r"' or from the *Note Control window:: . Note that if the log is coming from standard input (command line option `"-r -"'), you cannot do much but watch the game, but otherwise you can influence the flow of the game: * The slidebar at the top shows how far the current game has progressed. You can jump wherever you want in the game by dragging the handle. * Fast forward and rewind work as expected. You can alter the speed by changing the option *Note Miscellaneous options:: . * Step forward and step backward can be used to study what happens in detail. First, however, the game should be *Note Control window:: . * With the four bottom buttons you can jump between games and sequences.  File: RealTimeBattle.info, Node: Statistics files, Prev: Replaying, Up: Usage 2.14 Statistics files ===================== The statistics file is a file used only when a *Note Tournament files:: is specified. The statistics will be saved to this file when the tournament ends. Otherwise you can save it by hand using the `save' button in the *Note Statistics window:: .  File: RealTimeBattle.info, Node: Structure, Next: Robot construction, Prev: Usage, Up: Top 3 Structure *********** In this section we will describe the structure of the program, how the robots are moving, shooting and controlling the radar, when points are given and how a tournament is built up. * Menu: * Robot motion:: * Energy:: * The radar:: * The robots position:: * Shooting:: * Collisions:: * Cookies and Mines:: * Time:: * A game:: * A sequence:: * A tournament::  File: RealTimeBattle.info, Node: Robot motion, Next: Energy, Up: Structure 3.1 Robot motion ================ The robot behaves like a vehicle with wheels, it rolls in the forward direction with a small *Note Environmental options:: and slides sideways with a much higher *Note Environmental options:: . The third slowing down effect is *Note Environmental options:: , which is applied in the direction opposite to the robot velocity and is increasing with speed. There are three ways to affect the robot motion, *Note Messages from robots:: , *Note Messages from robots:: and *Note Messages from robots:: . The acceleration is used to increase the robots speed in the direction the robot faces; you cannot control the speed directly, acceleration is the only way to get the robot moving. By rotating the robot you can make it turn. Note that rotation does not directly affect the direction of motion, only the direction the robot is facing. The sliding friction, together with acceleration, will eventually carry out the actual turning of the robot. Braking will increase the roll friction up to a maximal value. This is when the wheel are locked and the robot is sliding instead of rolling. Don't forget to release the brake when you want to speed up again.  File: RealTimeBattle.info, Node: Energy, Next: The radar, Prev: Robot motion, Up: Structure 3.2 Energy ========== The robot health is measured by its energy. There are several ways for the robot to lose energy, it can * be hit by a shot, * collide with another robot or a wall, * spring a mine or * fire a shot. However, there is only one possibility to gain energy: to eat a cookie.  File: RealTimeBattle.info, Node: The radar, Next: The robots position, Prev: Energy, Up: Structure 3.3 The radar ============= The principal method to get information on the surroundings is via the radar. Every time the robot is updated it will get a *Note Messages to robots:: , giving information on the closest object in the current radar direction, i.e. distance and type of object. If it is a robot, that robots energy level will be revealed as well. Since the radar information is almost all the robot will know about the environment, it is crucial to make use of it as well as possible. It is also important to *Note Messages from robots:: well, to make it collect useful data.  File: RealTimeBattle.info, Node: The robots position, Next: Shooting, Prev: The radar, Up: Structure 3.4 The robots position ======================= From v1.0.5 of RTB it is possible to get the robots position more directly. Instead of having to analyze the surroundings with the radar and find your position from that, you can configure RTB to send the *Note Messages to robots:: . The behavior is controlled by the option *Note Environmental options:: .  File: RealTimeBattle.info, Node: Shooting, Next: Collisions, Prev: The robots position, Up: Structure 3.5 Shooting ============ Shooting is the number one method to eliminate other robots. In RealTimeBattle a shot is moving with constant velocity, calculated as the sum of the robot velocity and the *Note Shot options:: in the direction the cannon is pointing. It will move until it collides with an object. When the shot is fired it is given an energy, which determines the injuries robots will suffer when hit. The energy is, however, limited; the *Note Shot options:: forbids very low energy shots, e.g. you want to remove mines. The *Note Shot options:: is restricted by the amount of the robot's current potential shot-energy, which increases with time. Shooting is, however, not without any risk, since a firing robot itself will lose energy, *Note Shot options:: . If a cookie or mine is hit, it is destroyed, regardless of the energy of the shot. Therefore you should use a minimal amount of energy to shoot mines. Shots colliding will not immediately be destroyed, instead their velocities and energies will be superposed, so that if two colliding shots are traveling in the same direction, their energies will be added and, in case of a head on collision, their energies will cancel.  File: RealTimeBattle.info, Node: Collisions, Next: Cookies and Mines, Prev: Shooting, Up: Structure 3.6 Collisions ============== Robots are fragile objects, which get damaged by colliding with walls and other robots. When colliding, the robots act like bouncing balls, with three factors that influences the behavior, *Note Robot options:: . On the *Note Robot options:: , the robots are made of different materials, usually harder and more protective. This can be used to ram other robots, giving much more damage than it receives.  File: RealTimeBattle.info, Node: Cookies and Mines, Next: Time, Prev: Collisions, Up: Structure 3.7 Cookies and Mines ===================== Cookies and mines are essentially equal objects, with the only difference that robots will gain energy by taking cookies and lose energy on mines. These objects are randomly placed in the arena during the game. Their energy and frequency can be controlled with the *Note Extras options:: .  File: RealTimeBattle.info, Node: Time, Next: A game, Prev: Cookies and Mines, Up: Structure 3.8 Time ======== As the name of the program indicates, the time used is the real time. It is entirely up to the robots to respond quickly enough to the events in the game. The game progresses by calling the update function in regular intervals. Between these, the robots have to share the remaining CPU time. To prevent robots from using too much of the processor, their CPU time is limited in *Note Command line options:: . The *Note Time options:: give more details. The real-timeness can, however, be violated under some circumstances. You can speed up or slow down the game speed by changing the *Note Time options:: option and there is a method to prevent disruption of the game , when the system load is too high. If the time between two updates is longer than the *Note Time options:: , the game time will be slown down accordingly.  File: RealTimeBattle.info, Node: A game, Next: A sequence, Prev: Time, Up: Structure 3.9 A game ========== At the beginning of a game, the robots are given a random position on the arena, with random orientation. The radar and the cannon are both pointing forward and the *Note Shooting:: is set to zero. The goal for the robots is now to survive as long as possible and at the same time to destroy the other robots. A robot will get one point for each of the enemy robot it outlives. One extra point is, however, given to all the participating robots. Robots dying at the same time will share the points fairly (or in other words, they get half a point for each of the other dying at the same time). A game is finished if either the number of living robots is less than two or the *Note Time options:: .  File: RealTimeBattle.info, Node: A sequence, Next: A tournament, Prev: A game, Up: Structure 3.10 A sequence =============== A sequence is a series of games, where the same robots are fighting. At the beginning of a sequence the robot processes are started. The number of robots in a sequence is limited to 120, due to the limit of 256 open file descriptors in Linux. For every robot two pipes are opened as communication channels to the robot. Thereafter a *Note Start new tournament window:: are played and finally the robot processes are killed.  File: RealTimeBattle.info, Node: A tournament, Prev: A sequence, Up: Structure 3.11 A tournament ================= A tournament is a collection of sequences. The number of robots in a tournament is (theoretically) unlimited. Any number of sequences is allowed, but to make the tournament fair, you should choose a number of sequences, such that all robots will play the same number of games (i.e. #sequence = #robots per game / GCD( #robots per game, #robots in the tournament)).  File: RealTimeBattle.info, Node: Robot construction, Next: Options, Prev: Structure, Up: Top 4 Robot construction ******************** This chapter will describe what you need to know in order to build your own robots. Most important to know is the messaging language, which is a set of about 35 commands used to communicate with the server program. It is also instructive to study the example robots in the `Robots/' directory. * Menu: * Reading messages:: * Messagetypes-h:: * Cheating:: * Messages to robots:: * Messages from robots::  File: RealTimeBattle.info, Node: Reading messages, Next: Messagetypes-h, Up: Robot construction 4.1 Reading messages ==================== At the beginning of each sequence the robot processes are launched by the server program and assigned two pipes, one for input and the other for output. These are connected to the `stdin' and `stdout', so that from the robot's point of view, it is communicating with the server via the standard input and standard output. This approach means that the robots can be written in any programming languages. However, the robot must be able to know when it has received a new message. To achieve this there are (at least) three different methods to choose from: `Standard in blocks:' This is the simplest method, when reading from stdin, the program is blocked until the next message arrives. You can therefore make the program as if there is always a message waiting. The drawback is that you cannot do any calculations while waiting for new messages. To choose the blocking method, send the following robot option `as soon as the program is started': cout << "RobotOption " << USE_NON_BLOCKING << " " << 0 << endl; Note that this is strictly c++ code. If you don't use c++ just print the given information to stdout. endl is equal to 'end of line'. `Select:' Using the Unix libc function `select' makes it possible for the robot to have better control over when to look for new messages. It enables you, for example, to read all messages available, do some calculations, send commands and thereafter wait for more messages. To learn more of `select', please read its Unix documentation ( e.g. man pages or emacs info ). To choose the select method, send the following robot option `as soon as the program is started': cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl; Note that this is strictly c++ code. `Signals:' If you want, you can tell RealTimeBattle to send the robot a signal whenever a new set of messages is sent. This method makes it possible for the robot to be continuously updated with information from the server program also when the robot is busy doing calculations. If you feel you don't know how to use signals, look in the Unix documentation to or study other robots to learn more. To choose the signal method, send the following robot option `as soon as the program is started': cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl; cout << "RobotOption " << SIGNAL << " " << SIGUSR1 << endl; Note that this is strictly c++ code. You can of course choose any signal you want instead of `SIGUSR1'. As a help to implement these methods, the robot `rotate_and_fire' has been written in three different, but functionally equivalent, versions. Feel free to study and copy to use in your own robots. Note that it is not a good idea to do "busy wait", i.e., to repeatedly look for a message until you get one. This will slow things down considerably and, worse, in *Note Command line options:: the robot will rapidly run out of CPU-time and die.  File: RealTimeBattle.info, Node: Messagetypes-h, Next: Cheating, Prev: Reading messages, Up: Robot construction 4.2 Messagetypes-h ================== The file `Messagetypes.h' is a good source of information on the messaging language. It is a c/c++ include file, but you can easily rewrite it to use with other languages. There you can find listing of messages, warning types, objects, game options and robot options.  File: RealTimeBattle.info, Node: Cheating, Next: Messages to robots, Prev: Messagetypes-h, Up: Robot construction 4.3 Cheating ============ Since the battle is progressing in real-time with real processes, it may be possible to write programs which are 'cheating' in one way or another. For example by examining other robots or even RealTimeBattle itself to get more information, by using up a lot of resources to drain the other robots and so on. This is, of course, not the intended method to beat opponents, so we try to inhibit it as much as possible. In *Note Command line options:: robots have limited CPU usage, so that one robot can't use up all the CPU. It could be possible to fiddle with this by launching child processes. But since the time used by the child process will be counted for as soon as the process dies, it should be very easy to detect if a robot does anything suspicious. It is not possible to prevent all ways of cheating within RTB. It is e.g. permitted to read and write to files, but remember that organizers of competitions can forbid this if they wish. By setting permissions and ownerships of the robot executables and directories this can be done satisfactory. It may still be possible to find ways round these restrictions; if you detect such a way, please send a *Note Bug reports:: . By the way, it is up to the organizer of a tournament to make sure that the rules are followed.  File: RealTimeBattle.info, Node: Messages to robots, Next: Messages from robots, Prev: Cheating, Up: Robot construction 4.4 Messages to robots ====================== `Initialize [first? (int)]' This is the very first message the robot will get. If the argument is one, it is the first sequence in the tournament and it should send *Note Messages from robots:: to the server, otherwise it should wait for YourName and YourColour messages (see below). `YourName [name (string)]' Current name of the robot, don't change it if you don't have very good reasons. `YourColour [colour (hex)]' Current colour of the robot, change it if you find it ugly. All robots in a team will have the same colour. `GameOption [optionnr (int)] [value (double)]' At the beginning of each game the robots will be sent a number of settings, which can be useful for the robot. For a complete list of these, look in the file *Note Messagetypes-h:: for the `game_option_type' enum. In the *Note Options:: you can get more detailed information on each option. The *Note Control window:: is also sent as a game option even though it is not in the options list. `GameStarts' This message is sent when the game starts (surprise!) `Radar [distance (double)] [observed object type (int)] [radar angle (double)]' This message gives information from the radar each turn. Remember that the radar-angle is relative to the robot front; it is given in radians. `Info [time (double)] [speed (double)] [cannon angle (double)]' The `Info' message does always follow the `Radar' message. It gives more general information on the state of the robot. The time is the game-time elapsed since the start of the game. This is not necessarily the same as the real time elapsed, due to *Note Time options:: and *Note Time options:: . `Coordinates [x (double)] [y (double)] [angle (double)]' Tells you the current robot position. It is only sent if the option *Note Environmental options:: is 1 or 2. If it is 1 the coordinates are sent relative the starting position, which has the effect that the robot doesn't know where it is starting, but only where it has moved since. `RobotInfo [energy level (double)] [teammate? (int)]' If you detect a robot with your radar, this message will follow, giving some information on the robot. The opponents energy level will be given in the same manner as your own energy (see below). The second argument is only interesting in team-mode, 1 means a teammate and 0 an enemy. `RotationReached [what has reached(int)]' When the robot option *Note Messages from robots:: is set appropriately, this message is sent when a rotation (with RotateTo or RotateAmount) has finished or the direction has changed (when sweeping). The argument corresponds to 'what to rotate' in e.g. *Note Messages from robots:: . `Energy [energy level(double)]' The end of each round the robot will get to know its energy level. It will not, however, get the exact energy, instead it is discretized into a number of *Note Robot options:: . `RobotsLeft [number of robots (int)]' At the beginning of the game and when a robot is killed the number of remaining robots is broadcasted to all living robots. `Collision [colliding object type (int)] [angle relative robot (double)]' When a robot hits (or is hit by) something it gets this message. In the file *Note Messagetypes-h:: you can find a list of the object types. You get the angle from where the collision occurred (the angle relative the robot) and the type of object hitting you, but not how severe the collision was. This can, however, be determined indirectly (approximately) by the loss of energy. `Warning [warning type (int)] [message (string)]' A warning message can be sent when robot has to be notified on different problems which have occured. Currently seven different warning messages can be sent, namely `UNKNOWN_MESSAGE:' The server received a message it couldn't recognize. `PROCESS_TIME_LOW:' The CPU usage has reached the *Note Time options:: . Only in *Note Command line options:: . `MESSAGE_SENT_IN_ILLEGAL_STATE:' The message received couldn't be handled in this state of the program. For example *Note Messages from robots:: is sent before the game has started. `UNKNOWN_OPTION:' The robot sent a *Note Messages from robots:: with either illegal option name or illegal argument to that option. `OBSOLETE_KEYWORD:' The keyword sent is obsolete and should not be used any more, see the `ChangeLog' file for information on what to use instead. `NAME_NOT_GIVEN:' The robot has not sent its name before the game begins. This happens if the *Note Time options:: is too short or the robot does not send its name early enough. `COLOUR_NOT_GIVEN:' The robot has not sent its colour before the game begins. `Dead' Robot died. Do not try to send more messages to the server until the end of the game, the server doesn't read them. `GameFinishes' Current game is finished, get prepared for the next! `ExitRobot' Exit from the program immediately! Otherwise it will be killed forcefully.  File: RealTimeBattle.info, Node: Messages from robots, Prev: Messages to robots, Up: Robot construction 4.5 Messages from robots ======================== When you send messages to RealTimeBattle make shure that they are not longer than 128 chars, otherwise RealTimeBattle will cut them in two parts and may report an unknown message. `RobotOption [option nr (int)] [value (int)]' Currently only two options are available: `SIGNAL:' Tells the server to send a signal when there is a message waiting. The argument will determine which signal. Send this message (with argument e.g. SIGUSR1) as soon as you are prepared to receive the signal. Default is 0, which means don't send any signals. `SEND_SIGNAL:' Tells the server to send SIGUSR1 when there is a message waiting. Send this message (with argument 1 (= true)) as soon as you are prepared to receive the signal. Default is false. `SEND_ROTATION_REACHED:' If you want the server to send a *Note Messages to robots:: message when a rotation is finished, you should set this option. With a value of 1, the message is sent when a RotateTo or a RotateAmount is finished, with a value of 2, changes in sweep direction are also notified. Default is 0, i.e. no messages are sent. `USE_NON_BLOCKING:' Selects how to *Note Reading messages:: works. This option should be sent exactly once as soon as the program starts. Since it should always be given, there is no default value. `Name [name (string)]' When receiving the *Note Messages to robots:: message with argument 1, indicating that this is the first sequence, you should send both your name and your colour. If your name ends with the string `Team: teamname', you will be in the team `teamname'. For example "Name foo Team: bar" will assign you to the team `bar' and your name will be `foo'. All robots in a team will have the same colour and will recognize them over the RobotInfo message. For a more sophisticated possibilities, please take a look onto the RealTimeBattle Team Framework (http://rtb-team.sf.net). `Colour [home colour (hex)] [away colour (hex)]' See above. The colours are like normal football shirts, the home colour is used unless it is already used. Otherwise the away colour or, as a last resort, a non-occupied colour is selected randomly. `Rotate [what to rotate (int)] [angular velocity (double)]' Set the angular velocity for the robot, its cannon and/or its radar. Set 'what to rotate' to 1 for robot, 2 for cannon, 4 for radar or to a sum of these to rotate more objects at the same time. The angular velocity is given in radians per second and is limited by *Note Robot options:: . `RotateTo [what to rotate (int)] [angular velocity (double)] [end angle (double)]' As `Rotate', but will rotate to a given angle. Note that radar and cannon angles are relative to the robot angle. You cannot use this command to rotate the robot itself, use `RotateAmount' instead! `RotateAmount [what to rotate (int)] [angular velocity (double)] [angle (double)]' As `Rotate', but will rotate relative to the current angle. `Sweep [what to rotate (int)] [angular velocity (double)] [right angle (double)] [left angle (double)]' As `rotate', but sets the radar and/or the cannon (not available for the robot itself) in a sweep mode. `Accelerate [value (double)]' Set the robot acceleration. Value is bounded by *Note Robot options:: . `Brake [portion (double)]' Set the brake. Full brake (portion = 1.0) means that the friction in the robot direction is equal to *Note Environmental options:: . `Shoot [shot energy (double)]' Shoot with the given energy. *Note Shot options:: give more information. `Print [message (string)]' Print message on the *Note Message window:: . `Debug [message (string)]' Print message on the *Note Message window:: if in *Note Command line options:: . `DebugLine [angle1 (double)] [radius1 (double)] [angle2 (double)] [radius2 (double)]' Draw a line direct to the arena. This is only allowed in the highest debug level(5), otherwise a *Note Messages to robots:: is sent. The arguments are the start and end point of the line given in polar coordinates relative to the robot. `DebugCircle [center angle (double)] [center radius (double)] [circle radius (double)]' Similar to DebugLine above, but draws a circle. The first two arguments are the angle and radius of the central point of the circle relative to the robot. The third argument gives the radius of the circle.  File: RealTimeBattle.info, Node: Options, Next: Arena construction, Prev: Robot construction, Up: Top 5 Options ********* RealTimeBattle is configurable with a bunch of options, collected in different groups. The philosophy is to give you full freedom to set up the game in the way you like. This does mean, however, that some settings of the options may give bad combination, which can cause troubles for the program. * Menu: * Environmental options:: * Robot options:: * Shot options:: * Extras options:: * Time options:: * Window sizes:: * Miscellaneous options::  File: RealTimeBattle.info, Node: Environmental options, Next: Robot options, Up: Options 5.1 Environmental options ========================= `Gravitational Constant:' The acceleration due to gravitation. It is about 9.8 on the earth. An increase will increase the friction, thereby slow down the robots. `Air resistance:' As it sounds. Increases with speed. `Roll friction:' The friction in the direction of the robot if not braking. `Slide friction:' The friction orthogonal to the robot direction. Also the maximum friction if braking. `Send robot coordinates:' Determines how coordinates are send to the robots. The following options are available: * 0 - don't send any coordinates (default) * 1 - send the coordinates relative the starting position * 2 - send absolute coordinates  File: RealTimeBattle.info, Node: Robot options, Next: Shot options, Prev: Environmental options, Up: Options 5.2 Robot options ================= `Robot max acceleration:' Robots are not allowed to accelerate faster than this and ... `Robot min acceleration:' ... slower than this. `Robot radius:' Determines the size of the robot. `Robot mass:' Large robot mass will increase the impact of collisions. `Robot bounce coefficient:' Affects how well the robots will bounce. If zero the robots will cling together when colliding, if the value is one they will act like perfect billiard balls. `Robot hardness coefficient:' Determines how seriously damaged the robots will be when colliding. The lower the value, the softer the material. `Robot protection coefficient:' Influences how well protected the robot is. This factor is to be multiplied with the damaging energy to get how much to reduce the robot's energy. `Robot frontszie:' The front of the robot is a section with different materials, usually harder and more protective, so robots can injure each other by ramming. `Robot front bounce coefficient:' See previous four items. `Robot front hardness coefficient:' See previous five items. `Robot front protection coefficient:' See previous six items. `Robot start energy:' The amount of energy the robots will have at the beginning of each game. `Robot max energy:' By eating a cookie, the robot can increase its energy; not more than this, though. `Robot max rotate speed:' How fast the robot itself may rotate. Unit: radians/s . `Robot cannon max rotate speed:' Maximum cannon rotate speed. Note that the cannon and the radar move relative to the robot, so the actual rotation speed may be higher. `Robot radar max rotate speed:' Maximum radar rotate speed. See note above. `Robot energy levels:' The robot will only know its energy approximately. This will decide how many discretation levels will be used.  File: RealTimeBattle.info, Node: Shot options, Next: Extras options, Prev: Robot options, Up: Options 5.3 Shot options ================ `Shot radius:' Size of shots. Should be less than *Note Robot options:: . `Shot speed:' Shots are moving with this speed in the direction of the cannon plus the velocity of the robot. `Shooting penalty:' When shooting the robot itself gets damaged. This is the factor, by which the shot energy is multiplied, to get the damaging energy. If the number of robots is large, this number is reduced, so that you never lose in average by shooting (if you hit). `Shot min energy:' The lowest shot energy allowed. A robot trying to shoot with less energy will fail to shoot. `Shot max potential energy:' The robots have a shot energy, which increases with time, but will never exceed this value. `Shot potential energy increase speed:' Determines how fast the robots shot energy noted above, will increase. Unit: energy/s .  File: RealTimeBattle.info, Node: Extras options, Next: Time options, Prev: Shot options, Up: Options 5.4 Extras options ================== `Cookie max energy:' The cookie energy is a random number between cookie max energy and cookie min energy. `Cookie min energy:' See above. `Cookie frequency:' The number of cookie per second that will appear in average. `Cookie radius:' Size of cookie. `Mine max energy:' The mine energy is a random number between mine max energy and mine min energy. `Mine min energy:' See above. `Mine frequency:' The number of mine per second that will appear in average. `Mine radius:' Size of mine. `Cookie colour:' Cookie colour in hexadecimal red-green-blue form. `Mine colour:' As above.  File: RealTimeBattle.info, Node: Time options, Next: Window sizes, Prev: Extras options, Up: Options 5.5 Time options ================ `Timeout:' This is the longest time a game will take. When the time is up all remaining robots are killed, without getting any more points. `Max timestep:' If the computer is temporarily slowed down, the time between updates can be to long. Setting this option will make the program artificially slow down the clock in those cases and therefore violate the realtimeness. `Time scale:' Increasing time scale to more than one means that the game clock will go faster than an ordinary clock. Changing this value can be usefull if you either want to give the robots more time or if you have a fast computer you may want to speed the game up. `Update interval:' This option determines the time between robot updates, i.e., how often the robot states are changed. It is not influenced by the 'Time Scale' and cannot be altered when the program is running. The accuracy is 1/100 s (depending of the precision of the system that RealTimeBattle is running on). `Robot startup time:' Determines the time between the robot processes are executed and the sequence begins. If robots are black and have no name, you may need to increase the startup time from the default of one second. This can happen if, for example, the robots are many, large or you are running on a slow or remote computer. `Start CPU time:' In *Note Command line options:: a robot's CPU usage is limited. At the beginning of a sequence a robot will get this amount of CPU time to spend. `Extra CPU time:' When the start CPU time is spent, the robot will get this amount of extra CPU time. `Extra CPU period:' The extra CPU time must last an entire CPU period, otherwise the robot will die in the current game. `CPU warning percentage:' When the robot has used up this amount of its CPU time it will receive a warning message. `Process check interval:' In *Note Command line options:: this will decide how often the program will check for CPU usage. `Logging frequency:' To reduce the size of *Note Log files:: you can increase this option. With this option, *Note Log files:: are only logged every n:th *Note Time options:: .  File: RealTimeBattle.info, Node: Window sizes, Next: Miscellaneous options, Prev: Time options, Up: Options 5.6 Window sizes ================ Here you can set the initial sizes for some windows, namely the *Note Arena window:: , the *Note Message window:: , the *Note Score window:: and the *Note Statistics window:: . You can also set the position for the first three and the *Note Control window:: .  File: RealTimeBattle.info, Node: Miscellaneous options, Prev: Window sizes, Up: Options 5.7 Miscellaneous options ========================= `Arena scale:' Overall scale of the arena. A value of 2 gives double sidelength, i.e., a four times larger area. `Fast forward factor:' Determines, when *Note Replaying:: , the speed when the fast forward button or the rewind button is pressed. `Max robots allowed simultaneously:' Allows the user to change the maximum amount of robots allowed in a sequence. If there are too many, the system might complain (how many depends on the system). `Background colour:' Background colour and ... `Foreground colour:' ... foreground colour for the arena. `Colour for RTB messages:' Colour for the text when RTB sends messages. `Robot search path:' This is a colon-separated list of directories which will be searched for robots when a *Note Start new tournament window:: is started. The subdirectory `Robots' in the rtb install directory (default: `/usr/local/games/RealTimeBattle') is always searched. `Arena search path:' Same as above, but for arena files instead of robots. Here the subdirectory is `Arenas'.  File: RealTimeBattle.info, Node: Arena construction, Prev: Options, Up: Top 6 Arena construction ******************** In RealTimeBattle, it is very simple to construct your own arenas. The language consists of only eleven commands, and there are essentially four building blocks: line, circle, inner_circle and arc. This is mainly because of speed reason, for circles and lines it is very easy to check if a collision has occured. Circle and inner_circle prevents robots from entering into a circle or getting out of a circle respectively. The line and the arc stop the robots from entering through the long side ( the curved for the arc ), but no check is made on the short side, so you have to put circles at each end of the line to make it a solid object. The commands `polygon', `closed_polygon' and `poly_curve' are intended to simplify this procedure, always giving a proper object. All angles are by default in radians but can be changed to degrees by the command `angle_unit degrees'. Note that RealTimeBattle does not check whether the arena file gives a correct arena, it is entirely up to you. However, it will complain if there are violations to the language rules. Arena files should be given the postfix `.arena' and be stored in the arena directory for RealTimeBattle to find them. The `bounce coefficient' and `hardness' argument given to all wall creating commands, determines the material of the wall. They are both values between 0 and 1. Harder walls will injure colliding robots more and higher bounce coefficient make them bounce better. You are also encouraged to study the arenas included and learn from the examples. * Menu: * Arena commands::  File: RealTimeBattle.info, Node: Arena commands, Up: Arena construction 6.1 Arena commands ================== A command consists of the command name and the arguments separated by whitespace. Be sure to give the right number of arguments! In the command list, the arguments are given in square brackets. `scale [value]' This value times the *Note Miscellaneous options:: will give the scale factor, by which all coordinates are multiplied. This command must be, if it exists, the very first in the file, default is 1.0. `angle_unit [unit]' Switches to the selected angle unit, which can be either of `degrees' or `radians'. Default is radians. `boundary [left] [up] [right] [down]' The boundary encloses the area, in which robot, cookies and mines are placed. It also determines the visible area in the *Note Arena window:: . This command is required and may only be preceded by `scale'. `inner_circle [bounce] [hardness] [center_x] [center_y] [radius]' Robots are limited to the inside of this circle. `circle [bounce] [hardness] [center_x] [center_y] [radius]' Circle shaped wall. `line [bounce] [hardness] [thickness] [start_x]' [start_y] [end_x] [end_y] Creates a line. It only prevents the robot from passing through to long side, so remember to put circles at the short ends. `arc [bnc] [hardn] [thickn] [center_x] [ctr_y]' [inner_radius] [outer_rds] [angle1] [angle2] An arc is a sector of a ring within two angles. Like the line, it needs circles at both the ends. `polygon [bounce] [hardn] [thickn] [number of vertices] ([center_x] [center_y])...' This will create a number of circles, connected by lines. `closed_polygon [bounce] [hardn] [thickn] [number of vertices]' ([center_x] [center_y])... As a `polygon', but the first and the last vertices are also connected by a line. `poly_curve [bnc] [hardn] [thickn] [start_x]' [start_y] [dir_x] [dir_y] ([command args ...]) ... The `poly_curve' is the most powerful of the arena commands. It is used to build walls with lines and arcs. At each step you have a current position and direction, which are affected by the subcommands. The last subcommand must be `C' or `Q'. `L [length]' Draw a line with given length in the current direction. `T [angle]' Turn the current dircetion. `A [angle] [radius]' Draw an arc. `C' Finish by connecting with the starting point. `Q' Quit. `exclusion_point [position_x] [position_y]' When the arena inside the boundary consists of several separated areas, you should exclude all but one by inserting exclusion points. All points from which you can draw a straight line to an exclusion point without crossing a wall, are considered to be outside the arena.  Tag Table: Node: Top146 Node: Introduction529 Node: More information2211 Node: Requirements2681 Node: Background3619 Node: License4338 Node: Bug reports5485 Node: Usage5852 Node: Command line options6686 Node: Control window9619 Node: Start new tournament window11735 Node: Robots and arena directories12950 Node: Arena window13636 Node: Score window14078 Node: Message window14290 Node: Options window14658 Node: Statistics window15265 Node: Running without graphics16046 Node: Tournament files16996 Node: Log files19561 Node: Replaying20891 Node: Statistics files21874 Node: Structure22251 Node: Robot motion22735 Node: Energy24020 Node: The radar24436 Node: The robots position25135 Node: Shooting25600 Node: Collisions26923 Node: Cookies and Mines27466 Node: Time27905 Node: A game28853 Node: A sequence29672 Node: A tournament30235 Node: Robot construction30731 Node: Reading messages31280 Node: Messagetypes-h34487 Node: Cheating34914 Node: Messages to robots36353 Node: Messages from robots41782 Node: Options46538 Node: Environmental options47116 Node: Robot options47988 Node: Shot options50075 Node: Extras options51107 Node: Time options51905 Node: Window sizes54318 Node: Miscellaneous options54729 Node: Arena construction55972 Node: Arena commands57671  End Tag Table �����������������������������������������realtimebattle-1.0.8/Documentation/French/����������������������������������������������������������0002755�0001750�0001750�00000000000�10404234032�016660� 5����������������������������������������������������������������������������������������������������ustar �moi�����������������������������moi��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������realtimebattle-1.0.8/Documentation/French/Makefile.am�����������������������������������������������0000644�0001750�0001750�00000000405�10170545355�020726� 0����������������������������������������������������������������������������������������������������ustar �moi�����������������������������moi��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������docsdir = $(DOCS_DIR)/French docs_DATA = \ RealTimeBattle-1.html RealTimeBattle-2.html RealTimeBattle-3.html \ RealTimeBattle-4.html RealTimeBattle-5.html RealTimeBattle-6.html \ RealTimeBattle.html next.gif prev.gif toc.gif EXTRA_DIST = $(docs_DATA) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������realtimebattle-1.0.8/Documentation/French/Makefile.in�����������������������������������������������0000644�0001750�0001750�00000031404�10324167706�020743� 0����������������������������������������������������������������������������������������������������ustar �moi�����������������������������moi��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = Documentation/French DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = 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)$(docsdir)" docsDATA_INSTALL = $(INSTALL_DATA) DATA = $(docs_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ docsdir = $(DOCS_DIR)/French docs_DATA = \ RealTimeBattle-1.html RealTimeBattle-2.html RealTimeBattle-3.html \ RealTimeBattle-4.html RealTimeBattle-5.html RealTimeBattle-6.html \ RealTimeBattle.html next.gif prev.gif toc.gif EXTRA_DIST = $(docs_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Documentation/French/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Documentation/French/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-docsDATA: $(docs_DATA) @$(NORMAL_INSTALL) test -z "$(docsdir)" || $(mkdir_p) "$(DESTDIR)$(docsdir)" @list='$(docs_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(docsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docsdir)/$$f'"; \ $(docsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docsdir)/$$f"; \ done uninstall-docsDATA: @$(NORMAL_UNINSTALL) @list='$(docs_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(docsdir)/$$f'"; \ rm -f "$(DESTDIR)$(docsdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 $(DATA) installdirs: for dir in "$(DESTDIR)$(docsdir)"; 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-docsDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-docsDATA uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-docsDATA 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-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-docsDATA \ uninstall-info-am # 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: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������realtimebattle-1.0.8/Documentation/French/RealTimeBattle-1.html�������������������������������������0000644�0001750�0001750�00000014440�10170545355�022560� 0����������������������������������������������������������������������������������������������������ustar �moi�����������������������������moi��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9"> <TITLE>Manuel d'utilisation de RealTimeBattle, version 1.0.5 rev 1: Introduction Suivant Prcdent Table des matires

1. Introduction

Ceci est le manuel d'utilisation pour RealTimeBattle. On vous y expliquera comment lancer le programme, comment il marche, comment crer vos propres robots et comment construire des arnes.

RealTimeBattle est un jeu pour Unix, dans lequel des robots contrls par des programmes se battent entre eux. Le but est de dtruire ses ennemis, en utilisant un radar pour observer son environnement et un cannon pour tirer.

Mme s'il est simple de construire un robot qui se dplace btement, il est bien plus compliquer d'en construire un qui soit 'intelligent'. RealTimeBattle a t fait pour tre facile d'utilisation, flexible et rapide. Le but d'un programmeur de robots peut tre de faire des tests sur des algorithmes 'intelligents', aussi bien que de se distraire.

Caractristiques:

  • Le jeu se droule en temps rel, et les robots sont des programmes lancs par RealTimeBattle.
  • Les robots communiquent avec le programme principal en utilisant les entres et sorties standarts.
  • Les robots peuvent a priori tre construit dans n'importe quel langage de programmation.
  • Jusqu' 120 robots peuvent combattre en mme temps sur le mme terrain.
  • Un langage trs simple est utilis pour la communication, ce qui permet de vite construire son premier robot.
  • Les robots ragissent comme des objets physiques.
  • Vous pouvez construire vos propres arnes.
  • Il comprend un grand nombre de paramtres configurables.

1.1 Plus d'informations

D'autres informations peuvent tre trouves dans les fichiers INSTALL, BUGS, TODO, README, FAQ and ChangeLog de la distribution. Des mises jour peuvent tre tlcharges partir de la page de RealTimeBattle, o vous pouvez aussi trouver de nouveaux robots, des nouvelles, des tournois et ce manuel dans diffrents formats.

1.2 Matriel ncessaire

Le matriel ncessaire dpend de l'utilisation que vous voulez faire du programme. Lancer quelques robots ne devrait pas poser de problmes partir de machines exploites par un GNU/Linux ou sur tout autre clne d'UNIX. La matriel devra bien entendu tre plus puissant si vous voulez augmenter le nombre de robots sur un mme champs de bataille; Lancer 120 gros robots demandera certainement un bon PC.

RealTimeBattle est uniquement utilisable sous Unix. Il est dvelop sur une 'machine Linux', mais il devrait tre compilable sur tout autre clne d'Unix. L'excution en mode comptition n'est disponible que sous Linux car il faut lire le rpertoire /proc pour obtenir des informations de l'utilisation processeur.

Le seul logiciel ncessaire est gtk+, qui est utilis pour les interfaces graphiques.

1.3 Background

Le projet a commenc en aout 1998. L'inspiration est venue de RobotBattle, un jeu trs interessant auquel nous avons beaucoup jou il y a quelques annes. Cette version de RobotBattle avait bien sure quelques dfauts : Elle tait seulement disponible sous Windows et les robots taient crits dans un langage propre l'application, ce qui limitait les possibilit d'intelligence des robots. RobotBattle est toujours en dvelopement, mais ne permet toujours pas d'etre utilise sous un autre systme d'exploitation.

C'est pour cela que nous avons dcid de construire un jeu de robots sous Unix, ce qui nous permet d'utiliser les caracteristiques d'une systme d'exploitation moderne.

1.4 Licence

RealTimeBattle est distribu sous la licence GNU General Public License, dans l'esprit de la communaut de Linux. Les versions officielles de RealTimeBattle seront mises jour par les auteurs.

Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony

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.

1.5 Bug reports

Si vous trouvez quoi que ce soit qui ne marche pas dans ce package, quelque chose d'trange, que quelque chose manque, quelque chose de mal orthographi ou mal traduit, n'hsitez pas envoyer un rapport aux auteurs. Mais s'il vous plait, vrifiez qu'il n'est pas dj mentionn dans la liste des bugs ou dans notre propre liste des bugs.


Suivant Prcdent Table des matires realtimebattle-1.0.8/Documentation/French/RealTimeBattle-2.html0000644000175000017500000004376410170545355022574 0ustar moimoi Manuel d'utilisation de RealTimeBattle, version 1.0.5 rev 1: Utilisation Suivant Prcdent Table des matires

2. Usilisation

Ce chapitre dcrit comment utiliser le programme. Si vous le trouvez ennuyant lire, passez le, et revenez le lire si vous n'arrivez pas utiliser l'interface d'utilisation. C'est tout de mme une bonne ide de lire la section concernant les options de lignes de commande ci-dessous. Notez aussi qu'il n'y a pas d'aide a propos de la compilation du programme. C'est ici que vous trouverez ces informations.

2.1 Options de ligne de commande

Sur la ligne de commande, il y a deux options qui contrlent les caractristiques gnrales de RealTimeBattle. Vous pouvez choisir le fichier qui dtermine les options. Vous pouvez aussi choisir le mode d'execution du programme : debug, normal ou competition.


 Utilisation: RealTimeBattle [options] 

 Options:
    --debug_mode,                -d   mode pour debugger le programme
    --debug_level [0-5],         -D   dfinie le niveau de debuggages (ncessite -d)
    --normal_mode,               -n   mode normal (option par defaut)
    --competition_mode,          -c   mode competition

    --no_graphics,               -g   execution sans le mode graphique
    --option_file [file],        -o   choix du fichier d'options 
                                      (defaut: $HOME/.rtbrc)

    --log_file [file],           -l   cration d'un fichier de log (Si le fichier 'file est '-'
                                      le log sera envoy vers la sortie standard

    --tournament_file [file],    -t   specifie le fichier de tournoi pour
                                      dmarrer automatiquement un tournoi

    --statistics_file [file],    -s   fichier vers lequel seront envoyes les
                                      statistique lors d'un autodmarage

    --message_file [file],       -m   redirige les messages vers 'file'.
                                      '-' est quivalent  STDOUT.
				      si les log et les messages sont envoys
				      vers la sortie standard, '-m' sera ignor

    --replay [file]              -r   un fichier log pour rejouer
                                      Si '_' est spcifi, les entre se feront
				       partir de STDIN

    --help,                      -h   affiche ce message
    --version,                   -v   affiche le numro de version du programme

Les diffrences entre les trois modes de comptition sont dfinies dans la table suivante :


Mode
Debug Normal Competition
Commandes de dbugage autorises Oui Non Non
Pause durant le jeu Oui Oui Non
Step through game Oui Non Non
Les robots peuvent lancer des processus fils Oui Non Non
Limitation du CPU du robot Non Non Oui

2.2 Controle des fentres

Nouveau tournoi:

Commencer un nouveau tournoi La section Fenetre de nouveau tournoi vous donnera plus d'informations.

Rejouer un tournoi:

Rejouer un jeu. Il vous sera demand le fichier de log file que vous voudrez rejouer pour l'tudier.

Pause:

Met le jeu en attente. En mode competition les pauses ne sont pas autorises pendant le jeu, elle s'effectue la fin du jeu.

Fin:

Termine le tournoi courant.

Options:

Ouvre la fentre des options.

Statistiques:

Ouvre la fentre des statistiques.

Montrer la fentre de l'arne:

Cette boite peut tre utilise pour montrer et cacher les trois fentres utilisables quand une partie est en cours : La fentre de l'arn, la fentre des scores et la fentre des messages.

Quitter:

Terminer le programme.

En mode debug il y a d'autres boutons utilisables. Ils sont l pour aider le debugage des robots. Vous pouvez debuguer un processus en cours d'execution; si vous utilisez gdb la commande est gdb nom-du-robot numro-du-processus.

Pas Pas:

Durant une pause Ce bouton permet de faire avancer le programme d'une unit de temps. C'est trs utile quand vous executer le robot dans un debugger, sinon le robot sera submerg par les messages.

Fin du jeu:

Ceci terminera la partie en cours. Il a le mme effet qu'aurait un depassement de temps.

Tuer le robot marqu:

En mode debug, vous pouvez marker un robot dans la fentre des scores. Ce robot mourira si vous pressez ce bouton.

Niveau de Debug:

Change le niveau de debuggage est une faon de dire au robot les messages qu'il doit envoyer. Les limites sont 0 et 5, o 0 est le mode normal, et 5 le plus haut niveau de debuggage.

Quand vous rejouer un ficher log (pas partir de stdout) il y a un certain nombre de 'widgets' pour contrler le droulement. Consulter le rubrique Rejouer.

2.3 Fentre de nouveau tournoi

Pour choisir un robot ou une arne pour un tournoi, marquez les fichiers de droite et pressez le bouton ajout. Choisisez les fichiers sur la gauche et effectuez la mme manoeuvre pour les retirer.

Un tournoi est constitu d'un nombre desequences de jeux. Dans chaque sequence, les mme robots jouent dans tous les jeux. C'est ici que vous choisissez le nombre de jeux et de sequences ainsi que le nombre de robots dans chaque squence. Si vous voulez faire jouer tous les robots dans tous les jeux vous devez choisir une squence et augmenter le nombre de jeux. Cela vite de relancer les processus des robots ce qui pourrait prendre du temps, spcialement quand le nombre de robots est grand.

Il est galement possible de charger un fichier de tournoi, ou de sauver la configuration courante. Le dernier tournoi jou est stock dans /tmp/rtb/tmp.tour et est toujours recharg quand vous ouvrez la fentre. Si il n'y en a pas, une tournoi vide est affich.

Vous devez choisir au moins deux robots et une arne pour commencer jouer.

2.4 Rpertoire des robots et arnes

Afin que le programme puisse trouver les robots et les arnes vous avez dfinie deux options : chemin d'accs aux Robots et chemin d'accs aux Arenes Les sous-repertoires Robots et Arenas dans le rpertoire d'installation de rtb (par dfaut: /usr/local/games/RealTimeBattle), spcifis la compilation dans le Makefile, sont toujours regards en premier, mais si vous crez un nouveau rpertoire, ou que RTB est install ailleur, vous devez redfinir ces options.

2.5 fentre de l'arne

This is where the battle takes place. If you want a more detailed view, use the zoom buttons or press +, - or 0. The robots are visualized as coloured circles with an angle shape showing the radar direction, the thick line is the cannon and the thin line points in the front direction.

2.6 fentre des scores

Dans cette fentre, les robots jouant dans la sequence courante sont lists.

2.7 Fentre des messages

Sont crits dans cette fentre les messages des robots envoys par les commandes Print et Debug. Les messages les plus rcents sont affichs en haut de la liste. Vous pouvez effacer cette fentre ou choisir d'afficher seulement les messages d'un robot en particulier.

2.8 Fentre d'options

Vous pouvez changer un certain nombre d'options. Dans le chapitre sur les options vous pouvez obtenir des informations dtailles propos de chaque option. Les changements ne sont pas appliqus avant que le bouton appliquer ou OK ne soit press.

Vous pouvez sauvegarder ces options dans un fichier : Sauver les options les sauvera dans un fichier de votre choix et Sauver par defaut les sauvera dans le fichier .rtbrc dans votre rpertoire personnel.

Le bouton Dfaut remettra toutes les options leur valeur par dfaut.

2.9 Fentre des statistiques

Vous pouvez tudier les statistiques du tournoi courant sous diffrents angles. Vous pouvez afficher

  • les statistiques individuelles de Robots,
  • le rsultat d'une partie,
  • la sequence totale ou
  • le tournoi total.
Presser sur les flches vous dplacera sur les statistiques du premier, prcdent, suivant ou dernier lment respectivement. La bar du milieu indique ce quelles sont les statisques affiches, et appuyer dessus mettra jour ces statistiques si le jeu progress. Si vous utilisez gtk+1.1.x, il est galement possible de trier les objets en fonction des diffrentes colonnes en cliquant sur le titre correspondant.

2.10 Lancement sans graphiques

Si vous voulez, vous pouvez lancer RTB sans aucun graphique. Ceci peut tre trs utile quand vous lancer une longue serie de tests ou que vous lancer une comptition. Pour utiliser cette option, vous devez choisir : Soit ajouter l'argument -g quand vous lancer votre programme, soit en empchant les graphiques la compilation (voir le fichier INSTALL pour plus d'informations). La dernire alternative est utile car l'executable est plus petit et plus rapide sur les machines ayant peu de mmoire. Il vous permet galement de lancer RTB sur une machine n'ayant pas gtk+ d'install.

Quand vous lancez sans graphiques, vous devez spcifier un fichier de tournoi, sinon rien ne se produira. Il est galement prfrable de crer un fichier de log et/ou de statistiques si vous voulez connatre les resultats.

2.11 Fichiers tournoi

Le fichier de tournoi doit tre spcifier comme option dans la ligne de commandes. Quand un tournoi est spcifi, il commencera et s'arrtera automatiquement. Pour sauver les statistiques, regardez la section fichier de statistiques pour plus d'informations.

Un fichier de tournoi est compos de 5 mots-cls. Tous ces mots-cls peuvent tre crits plusieurs fois, mais n'oubliez pas que seul le dernier mot-cl qui prend un nombre comme argument est retenu. Tous les mots-cls doivent tre suivient d'un point-virgule.

Games/Sequences ou g/s:

Prend un nombre ou une * comme argument. Le nombre est le nombre de jeu qui doit se jouer par tournoi. L'astrisque voulant dire que le programme prend le nombre d'arne est l'utilise comme argument. La valeur par dfaut est 1.

Robots/Sequence ou r/s:

Prend un nombre ou un * comme argument. Le nombre est le nombre de robot jouant dans chaque squence. L'astrisque signifie que le programme prend le nombre exact de robots est l'utilise comme argument. La valeur par dfaut est 2.

Sequences ou seq:

Prend un nombre ou un * comme argument. Ce nombre indique combien de squences doivent tre joues dans un tournoi. L'astrique signifie que le programme prend le nombre exact de robots le nombre de robots par squence pour dterminer le nombre de squence afin que tous les robots puissent se rencontrer exactement une fois, et utilise se nombre comme argument. La valeur par dfaut est 1.

Robots ou r:

Prend pour arguments les fichiers de robots.

Arenas ou a:

Prend pour arguments les fichiers d'arnes.

Les fichiers d'arguments peuvent tre les suivants:

Juste le fichier:

Le chemin d'accs sera le rpertoire par dfaut.

Exemple: Robot: empty.robot

Chemin d'accs complet au fichier:

Le programme prendra le fichier donn.

Exemple: Arena: /usr/local/games/RealTimeBattle/Arenas/Circle.arena

Tous les fichiers du rpertoire:

Recherche tous les fichiers dans le rpertoire d'accs par dfaut

Exemple: Arena: *

Un rpertoire spcifique:

Recherche les fichiers dans le rpertoire indiqu.

Exemple: Robot: /usr/local/games/RealTimeBattle/Robots/*

Il est possible de donner le nom d'un fichier plus d'une fois. Si vous voulez trois rotate_and_fire.robot. il suffit d'crire rotate_and_fire.robot trois fois. C'est galement possible avec *.

Exemple de fichier de tournoi:

R: * Arenas: Circle.arena Square.arena G/S: 2 r/s: 3 Sequences: *

2.12 Fichier log

Quelquefois, il est plus utile de rejouer une partie est de l'analyser en dtail ou de la garder pour de futures rfrences, et dans ce cas, un fichier de log peut-tre utile. Ajouter l'argument -l quand vous lancer RTB, avec le nom du fichier comme argument pour activer cette possibilit ou avec l'argument '-' pour que le log soit affich sur stdout.

Le format d'un fichier de log est le suivant : Chaque ligne comprend une lettre qui determine le type d'information, suivie d'une liste d'arguments spars par des espaces. Les informations suivantes sont donnes:

Entte:

H [games/sequence] [robots/sequence] [sequences] [robots]

Info sur les arnes:

A [line from the arena file]

Dbut de partie:

G [sequence number] [game number]

Option:

O [option:value]

Liste des proprit des robots:

L [robot id] [robot colour] [robot name]

Info sur la position du robot:

R [robot id] [x] [y] [cannon angle] [radar angle] [energy]

Temps:

T [time elapsed]

Message affich:

P [robot id] [message to print]

Cookie:

C [cookie id] [x] [y]

Mine:

M [mine id] [x] [y]

Missile:

S [shot id] [x] [y] [dx/dt] [dy/dt]

Mort:

D [type of object killed] [object id] (if robot: [points received] [position])

2.13 Revisualiser une partie

Vous pouvez rejouer une partie partir de son fichier de log soit en donnant l'option de ligne de commandes "-r" ou partir de la fentre de contrle. Notez que si le log ne vient pas de l'entre standard (par l'option "-r -"), vous ne pourrez pas faire grand chose d'autre que de regarder le jeu, si ce n'est qu'influencer sa vitesse :

  • La bar en haut montre la progression du jeu. Vous pouvez 'sauter' ou vous voulez dans le jeu en trainant le bidule.
  • L'avance rapide est le retour ne font rien de plus extraordinaire que ne l'indique leur nom. Vous pouvez modifier la vitesse en changeant les options facteur d'avance.
  • Lees boutons 'Pas en avant' et 'Pas en arrire' peuvent tre utiliss pour tudier ce qui se passe dans les dtails. Mais le jeu doit tre mis en pause avant de pouvoir utiliser cette option.
  • Avec les 4 boutons du bas, vous pouvez naviguer entre les diffrents jeux et squences.

2.14 Fichier de statistiques

Le fichier de statistiques est seulement utiliser lorsqu'un fichier de tournoi est spcifi. Les statistiques seront sauves dans ce fichier une fois que le tournoi sera termin. Sinon, vous pouvez les sauver la main en utilisant le bouton Sauver dans la fentre des statistiques.


Suivant Prcdent Table des matires realtimebattle-1.0.8/Documentation/French/RealTimeBattle-3.html0000644000175000017500000002275310170545355022570 0ustar moimoi Manuel d'utilisation de RealTimeBattle, version 1.0.5 rev 1: Structure Suivant Precedent Contents

3. Structure

Cette section prsente la structure du programme, comment les robots bougent, tirent et contrlent leur radar, comment les points sont compts et comment s'tablit un tournoi.

3.1 Dplacement d'un robot

Le robot ragit comme un vhicule quatre roues. Il se dplace dans une direction avec un lger coefficient de frottement au roulement et glisse sur le ct avec un coefficient de frottement au glissement beaucoup plus important. Le troisime effet de ralentissement est celui de la rsistance de l'air, qui s'applique dans la direction oppose au dplacement du robot et qui augmment avec la vitesse.

Il y a trois faon de modifier les dplacement d'un robot, l'accleration, la rotation et le freinage.

L'acclration est utilise pour augmenter la vitesse du robot dans la direction de l'avant du robot; Vous ne pouvez pas directement contrler la vitesse du robot. L'acclration est le seul moyen de faire bouger le robot.

En faisant pivoter le robot, vous pouver le faire tourner. Notez qu'une rotation n'affecte pas directement la direction du dplacement, mais seulement la direction de l'avant du robot. Le coefficient de frottement de glissement, avec l'acclration, pourra eventuellement engager le virage du robot.

Freiner augmentera le coefficient de frottement sa valeur maximum. C'est quand les roues sont bloques et que le robot glisse au lieu de rouler. N'oubliez pas de relacher le frein quand vous voulez repartir.

3.2 Energie

La sant du robot est mesure par son nergie. Il y a plusieurs faons de perdre de l'nergie : lorsque le robot

  • est atteint par un missile,
  • se cogne contre un autre robot ou contre un mur,
  • saute sur une mine ou
  • tire un missile.

Par contre, il n'y a qu'un seul moyen de regagner de l'nergie : manger de 'cookie'.

3.3 Le radar

La mthode principale permettant d'obtenir des informations sur le monde avoisinant est le radar. Chaque fois que le robot est 'mis jour', il reoit un message de son radar, donnant des informations sur l'objet le plus prs dans la direction du radar, i.e. la distance et le type de l'objet. Si il s'agit d'un robot, le niveau d'negie de ce robot sera galement donne.

Puisque le radar est la seul source d'information sur ce qui l'entoure, il est essentiel de le manipuler au maximum de ses performances. Il est galement important de bien manoeuvrer le radar, pour obtenir une colection de donnes utiles.

3.4 Tirer

Tirer est la meilleur mthode pour liminer les autres robots. Dans RealTimeBattle, les missiles se dplacent vitesse constante, obtenue en sommant la vitesse du robot au moment du tire et la vitesse du tire dans la direction pointe par le canon. Il se dplacera jusqu' ce qu'il rencontre un objet.

Quand le missile est tir, il lui faut une nergie qui entrainera des dgats sur le robot qui le tire. L'nergie est donc limite. L'nergie minimale interdit des tires trop faibles, qui permettrait de dtruire une mine trop facilement. L'nergie maximale est limite par le potentiel de tire du robot qui augmente avec le temps.

Tirer ne se fait donc pas sans risque, puisque le robot qui tire perdra de l'nergie, proportionellement l'nergie du tire.

Si un 'cookie' ou une mine est touche, il est dtruit, en fonction de l'nergie du missile. C'est pourquoi il faut une nergie minimum si vous voulez dtruire une mine.

Deux missiles s'entrechoquant ne seront pas dtruits. Leur vitesse et energie seront superposes pour ne former qu'un seul missile. Dans le cas de deux missiles se dplaant dans la mme direction, leurs nergies seront ajoutes et dans le cas contraire, leur nergie sera annules.

3.5 Collisions

Les robots sont des objets fragiles, et ils s'abiment lorsqu'ils se cognent contre des murs ou sur d'autres robots. Quand ils se choquent, les robots agissent comme des balles qui rebondissent, sous l'influence de trois facteurs, le coefficient de restitution, la durete et le coefficient de protection. Sur l'avant, les robots sont fait d'un matriel diffrent, plus dur et qui le protge plus. Vous pouvez utiliser cette proprit pour cogner les autres robots en leur affligeant plus de dgas que vous n'en recevrez.

3.6 Cookies et Mines

Les 'cookies' et les 'mines' sont de mme objets. Leur seule diffrence est que les robots gagneront de l'nergie en cognant des cookies et en perdront sur des mines. Ces objets sont placs alatoirement sur le terrain de jeu pendant le jeu. Leur nergie et frquence d'apparition peuvent tre modifies dans les options.

3.7 Temps

Comme le nom du programme le laisse entendre, le temps utilis est le temps rel. Il est essentiel que les robots rpondent suffisament rapidement aux vnements du jeu. Le jeu progresse en appelant une fonction de mise jour des intervalles de temps rguliers. Entre ces deux moments, les robots doivent se partager les resources CPU. Pour viter que les robots utilisent une trop grande partie du processeur, leur utilisation du CPU est limite en mode competition. Les options correspondantes donnent plus de dtails.

La ralit du temps peut tout de mme tre 'viole' dans certaines circonstances. Vous pouvez acclerer ou ralentir la vitesse du jeu en changeant l'option de l'chelle du temps et il y a une mthode pour prevenir sacadement du systme lorsqu'il est surcharg. Si le temps entre deux mises jour est plus long que le temps maximum (MaxTimestep), le jeu sera ralenti.

3.8 Une partie

Au dbut d'un combat, le jeu donne au robots une position alatoire sur le terrain, avec une orientation alatoire. Le radar et le cannon pointent tous les deux vers l'avant du robot et l'energie potentielle de tire est mise zero. Le but du robot est maintenant de survivre aussi longtemps que possible et en mme temps de dtruire les autres robots. Un robot gagnera un point pour chaque ennemi qu'il tuera. Un point de bonus est donn chaque robot participant. Des robots murant en mme temps se verront partager les points de faon quitable (en d'autres mots, ils gagneront un demi point pour chaque robot mourant en mme temps qu'eux).

Le jeu se termine lorsqu'il reste moins que deux robots ou que le temps est dpac.

3.9 Une squence

Une squence est une serie de jeux, o les robots se battent. Au dbut d'une sequence les processus des robots seront dmars. Le nombre de robots dans une squence est limit 120 (Linux limitant 256 le nombre de dscripteurs de fichiers). Pour chaque robot, deux 'pipes' sont ouverts enfin de communiquer avec le programme.

Puis le nombre de jeux est jou et enfin, le processus du robot est tu.

3.10 Un tournoi

Un tournoi est une collection de squences.

Le nombre de robots dans un tournoi est (thoriquement) illimit.

Un grand nombre de sequence est autorise, mais pour que le tournoi soit plus juste, il faut choisir un nombre de sequences, de telle sorte que tous les robots jouent le mme nombre de jeux (i.e. #sequence = #robots_par_jeu / PGDC( #robots_par_jeu, #robots_dans_le_tournoi)).


Next Previous Contents realtimebattle-1.0.8/Documentation/French/RealTimeBattle-4.html0000644000175000017500000004334710170545355022573 0ustar moimoi Manuel d'utilisation de RealTimeBattle, version 1.0.5 rev 1: Robot construction Next Previous Contents

4. Construction d'un robot

Ce chapitre dcrit ce dont vous aurez besoin afin de construire vos propres robots. Le plus important savoir est le langage de messages, qui est compos de 35 commandes utilises pour communiquer avec le serveur. Il peut galement tre interresant d'tudier les exemples de robots livrs dans le repertoire Robots/.

4.1 Lire un message

Au dbut de chaque squence, les processus des robots sont lancs par le serveur et deux 'pipes' leur sont assigns (un pour les 'Entrees' et l'autre pour les 'Sortie'). Ces deux pipes sont connects stdin et stdout, de telle sorte que du point de vue du robot, la communication avec le serveur s'effectue via l'entre et la sortie standards.

Cette approche vous laisse libre du langage de programmation. Toutefois, le robot doit savoir quand il reoit un nouveau message. Il y a (au moins) trois mthodes pour y parvenir :

Standard in blocks:

C'est la mthode la plus simple. En lisant l'entre standard stdin, le programme est bloqu jusqu' l'arrive d'un nouveau message. Vous pouvez donc construire votre programme comme si il y avait toujours un mesage en attente. Le point noir est que vous ne pouvez faire aucun calcul pendant que le programme attend un nouveau message.

Pour choisir cette mthode, il faut envoyer l'option suivante ds que le programme est lanc

cout << "RobotOption " << USE_NON_BLOCKING << " " << 0 << endl;
Ceci est un code C++. Si vous n'utilisez pas le C++, il suffit d'afficher l'information (comme si vous deviez afficher quelquechose l'cran). endl est l'quivalent de 'fin de ligne'.

Select:

Utiliser la fonction select de libc permet au robot d'avoir un meilleur contrle pour savoir quand regarder les nouveaux messages. Il vous permet, par exemple, de lire tous les messages, faire quelques calculs, envoyer les commandes puis d'attendre de nouveaux messages. Pour en savoir plus propos de select, lisez la documentation Unix ( e.g. man pages or emacs info ).

Pour choisir cette mthode, envoyer l'information suivante ds que le programme est lanc:

cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl;
Il s'agit encore une fois d'un ligne de code C++

Signals:

Si vous voulez, vous pouvez demander RealTimeBattle d'envoyer un signal au robot quand une nouvelle serie de messages est envoye. Cette mthode permet au robot d'tre continuellement mis au courant des informations du serveur mme lorsqu'il est occup par des calculs. Si vous n'en savez pas assez sur les signaux, regarder la documentation Unix ou tudiez les autres robots pour en savoir plus.

Pour utiliser cette mthoed, envoy l'option suivante au serveur ds le lancement du programme

cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl;
cout << "RobotOption " << SIGNAL << " " << SIGUSR1 << endl;
Toujours du C++.

Vous pouvez bien sr utiliser n'importe quel signal la place de SIGUSR1.

Pour vous aider implanter ces mthodes, le robot rotate_and_fire a t crit de trois manires diffrentes, mais fonctionnent de la mme faon. Vous tes libre de l'tudier et de le copier pour votre propre robot.

Ce n'est pas une bonne ide de faire du 'busy wait', i.e., de regarder rpetitivement les messages jusqu' en avoir un. Cela ralentit considrablement les choses et pire, en mode competition le robot sera vite au del du CPU qui lui est accord et mourrira.

4.2 Messagetypes.h

Le fichier Messagetypes.h est une bonne source d'information sur le langage de communication. C'est un fichier d'inclusion C/C++, mais il est facile de le rcrire dans un autre langage de programmation. Vous pourrez y trouver la liste des messages, les types d'avertissement, les objets, les options de jeu et de robot.

4.3 Tricher

Durant la progression de la bataille en temps rel, avec des processus rels, il est possible d'crire des programme qui 'trichent' un moment ou un autre. Par exemple, en examinant les autres robots ou le serveur pour avoir plus d'informations, en utilisant d'importantes resources pour ralentir les autres robots et de bien d'autres faons encore. Ce n'est bien sur pas la mthode attendue pour vaincre l'adversaire, alors nous essayons de limiter ces actions autant que possible.

Dans le mode competition les robots ne sont pas autoris lancer des processus fils et l'utilisation du CPU est limite. Ainsi, un robot ne peux pas utiliser tout le CPU.

Il n'est pas possible d'empecher toutes les faons de tricher dans RTB. Il est par exemple possible d'crire ou de lire des fichiers, mais souvenez vous que les organisateurs de comptitions peuvent interdir cele s'il le souhaite. Limiter les droits d'acces du robot donne des rsultats satisfaisants.

Il est toujours possible de trouver des moyens de contourner ces restrictions; si vous trouver un de ces moyens, s'il vous plait, envoyer nous un rapport de bug. Nanmoins, il est du bon plaisir de l'oganisateur du tournoi d'assurer le respect de ces rgles.

4.4 Messages vers les robots

Initialize [first? (int)]

C'est le premier message que le robot recevra. Si l'argument est 1, c'est la premire sequence d'un tournoi et le robot doit se prsenter en envoyant son Nom et sa Couleur au serveur, sinon il devra attendre les messages YourName et YourColour (voir plus loin). (En fait, je n'en suis pas trop sur...)

YourName [name (string)]

Le nom courant du robot, ne pas changer sans avoir une bonne raison.

YourColour [colour (hex)]

Couleur courante du robot, changer si elle n'est pas votre got.

GameOption [optionnr (int)] [value (double)]

Au dbut de chaque jeu, le robot recevra un certain nombre de caractristiques qui pourraient lui tre utiles. Pour obtenir une liste complte de ces messages, regardez le fichier Messagetypes.h pour voir l'enumeration des game_option_type. Dans le chapitre des options vous obtiendrez des informations plus dtailles. Le niveau de debuggage est aussi envoy comme option, mme s'il ne fait pas partie de la liste.

GameStarts

C'est le message envoy pour signaler le dbut de la bataille (surpris?)

Radar [distance (double)] [type de l'objet observ (int)] [angle radar (double)]

Ce message donne les informations venant du radar chaque tour. Souvenez vous que l'angle du radar est relatif l'avant du robot. Il est donn en radians.

Info [temps (double)] [vitesse (double)] [angle cannon (double)]

Le message Info suit toujours le message Radar. Il donne des informations plus gnrales sur l'tat du robot. Le temps est celui coul depuis le dbut du jeu. Ce n'est pas forcement le mme que le temps rellement coul ( cause de l'chelle de temps et du plus petit cart de temps.

Coordinates [x (double)] [y (double)] [angle (double)]

Vous donne la position courante du robot. Il est envoy seulement si l'option est 1 ou 2. Si elle est 1 les coordonnes sont envoys relativement la position de dpart (Le robot ne sait pas exactement o il a commenc, mais seulement de combien il s'est dplac).

RobotInfo [niveau d'energie (double)] [teammate? (int)]

Si vous dtecter un robot au radar, ce message suivra, donnant les informations sur ce robot. Le niveau d'nergie de l'adversaire sera donn de la mme faon que votre propre nergie (voir plus bas). Le second argument concerne seulement le mode en quipe (qui n'est pas encore implant), 1 signalant qu'il s'agit d'un membre de votre quipe et 0 un ennemi.

RotationReached [objet qui a attend(int)]

Quand l'option robot SEND_ROTATION_REACHED est active, ce message est envoy quand une rotation (avec RotateTo ou RotateAmount) est termine ou que la direction change (lors d'un balayage).

Energy [niveau d'energie (double)]

A la fin de chaque tour, le robot connatra son niveau d'nergie. Il ne connatra pas exactement son niveau exact, mais une approximation correspondant des niveaux d'nergie.

RobotsLeft [nombre de robots (int)]

Au dbut du jeu et quand un robot est tu, le nombre de robots restant est envoy tous les robots encore vivant.

Collision [type de l'objet recontr(int)] [angle relatif au robot (double)]

Quand un robot cogne (ou est cogn par) quelquechose, il reoit ce message. Dans le fichier Messagetypes.h vous trouverez la liste des types d'objets. Vous recevrez aussi l'angle auquel c'est produit la collision (angle relatif au robot) et le type de l'objet qui a t cogn, mais pas l'importance du choc. Elle peut tout de mme tre dtermine indirectement (approximativement) par la perte d'nergie.

Warning [type de l'avertissement (int)] [message (string)]

Un message d'avertissement peut tre envoy quand un robot fait quelquechose d'incorrecte. Pour le moment, il y a 7 messages d'avertissement diffrents :

UNKNOWN_MESSAGE: Le serveur a reu un message qu'il n'arrive pas reconnaitre.

PROCESS_TIME_LOW: L'utilisation du CPU a atteind le pourcentage critique de CPU. Seulement dans le mode competition.

MESSAGE_SENT_IN_ILLEGAL_STATE: Le message envoy ne correspond pas l'tat d'avancement du programme. Par exemple Rotate a t envoy avant le dbut du jeu.

UNKNOWN_OPTION: Le robot a envoy une option qui est soit un nom ingale, soit un argument ne correspondant pas une option.

OBSOLETE_KEYWORD: Le mot clef envoy est obselete et ne doit plus tre utilise. Voir le fichier ChangeLog pour des informations pour ce qu'il faut utiliser la place.

NAME_NOT_GIVEN: Le robot n'a pas envoy son nom avant le dbut du jeu. Ca arrive si le temps de dmarrage du robot est trop (...) ou que le robot n'envoye pas son nom assez tt.

COLOUR_NOT_GIVEN: Le robot n'a pas envoy sa couleur avant le dbut du jeu.

Dead

Le robot est mort. Ce n'est plus la peine d'envoyer de nouveaux messages au server avant la fin du jeu, le serveur ne les lit plus.

GameFinishes

Le jeu courant est termin, prparez vous au prochain jeu!!!

ExitRobot

Quitter le programme immdiatement!! Sinon on sera forc de le tuer.

4.5 Messages venant des robots.

RobotOption [option nr (int)] [valeur (int)]

Il n'y a pour le moment que deux options possibles :

SIGNAL: Dire au serveur d'envoyer un signal quand il y a un message qui attend. L'argument dterminera quel signal utiliser. Envoyez ce message (avec l'argument SIGUSR1 par exemple) ds que vous tes prt recevoir les signaux. Par dfaut, cette valeur est 0, ce qui veut dire que vous ne recevrez aucun signal.

SEND_SIGNAL: Demande au serveur d'envoyer SIGUSR1 quand il y un message qui attend. Envoyez ce message (avec l'argument 1 (=vrai)) ds que vous tre prt recevoir le signal. Par dfaut, la valeur est fausse.

SEND_ROTATION_REACHED: Si vous voulez que le serveur vous envoye le message RotationReached quand une rotation est termine, vous devez demander cette option. Avec une valeur de 1, le message est envoy quand un RotateTo ou un RotateAmount est termin, avec le valeur 2, quand les changement de direction d'un sweep est aussi indiqu. Par dfaut (0) aucun message ne sera envoy.

USE_NON_BLOCKING: Choisit comment la lecture des messages s'effectue. Cette option doit tre envoye ds que le programme est lanc. Puisqu'elle doit toujours tre donne, il n'y a pas de valeur par dfaut.

Name [nom (string)]

Quand vous recevez le message Initialize avec l'argument 1, indiquant qu'il s'agit de le premire squence, vous devez envoyer votre nom et votre couleur.

Colour [premire couleur (hex)] [couleur 'visiteur' (hex)]

(Voir plus haut). Les couleurs sont comme des maillons de foot, la premire couleur est utilise si personne ne l'a dj prise. Sinon, la couleur 'visiteur' ou en dernier recourt, une couleur choisie au hasard sera donne au robot.

Rotate [objet a tourner (int)] [vitesse angulaire (double)]

Selectionne la vitesse angulaire de rotation du robot, de son canon ou de son radar. L'objet doit tre 1 pour le robot, 2 pour le cannon, 4 pour le radar ou la somme pour faire tourner plusieurs objets en mme temps. La vitesse angulaire est donne en radians par seconde et est limit par la Vitesse maximum de rotation du Robot (cannon/radar).

RotateTo [objet tourner (int)] [vitesse angulaire (double)] [angle de fin (double)]

Comme Rotate, mais s'arrtera un angle donn. L'angle du radar et du cannon sont relatif l'angle du robot. Vous ne pouvez pas utiliser cette commande pour faire tourner le robot (Utilisez RotateAmount la place).

RotateAmount [objet tourner(int)] [vitesse angulaire (double)] [angle (double)]

Comme Rotate, mais tourne par rapport l'angle courant.

Sweep [objet a tourner(int)] [vitesse angulaire (dbl)] [angle gauche (dbl)] [angle droit(dbl)]

Comme rotate, mais fait tourner le radar et/ou le cannon (pas disponible pour le robot lui mme) dans un mode de balayage.

Accelerate [valeur (double)]

Dfinit l'acclaration du robot. La valeur est limite pas l'acclration max/min du Robot.

Brake [portion (double)]

ordonne un frainage. Le frein complet (portion = 1.0) signifie que la friction du robot dans le sens de dplacement est gal au frottement d au glissement.

Shoot [energie du missile (double)]

Tire un missile avec l'energie donne. Les options de tire donnent plus d'informations.

Print [message (string)]

Affiche un message sur la fentre de messages.

Debug [message (string)]

Affiche un message dans la fentre des messages si le mode debug est engag.

DebugLine [angle1 (double)] [rayon1 (double)] [angle2 (double)] [rayonn2 (double)]

Dessine une ligne directement sur l'arne. Seulement disponible dans le plus haut mode de debug(5), sinon un message d'avertissement est envoy. Les arguments sont les points de dpart et d'arrive donns en coordonnes polaires relativement au robot.

DebugCircle [angle centre (double)] [rayon centre (double)] [rayon cercle (double)]

Identique que pour DebugLine, mais dessine un cercle. Les deux premiers arguments sont l'angle et le rayon relativement au robot. Le troisime argument donne le rayon du cercle.


Next Previous Contents realtimebattle-1.0.8/Documentation/French/RealTimeBattle-5.html0000644000175000017500000003233410170545355022566 0ustar moimoi Manuel d'utilisation de RealTimeBattle, version 1.0.5 rev 1: Options Suivant Prcdent Table des matires

5. Options

RealTimeBattle est configurable par une flope d'options, regroupe en diffrents groupes. La philosophie est de vous donner une libert totale pour dfinir le jeu comme vous le voulez. Nanmoins, certaines combinaisons d'options peuvent tre mauvaise et causer des malfonctionnements du programme.

5.1 Options environmentales

Constante gravitationelle:

L'accleration due a la gravit. Elle vaut peu prs 9.8 sur terre. Un augmentation augmentera les frottements et ralentira les robots.

Resistence de l'air:

Elle augmente avec la vitesse.

Frottement due au roulement:

Le frottement dans la direction du robot s'il ne freine pas.

Frottement de glissement:

Le frottement orthogonal la direction du robot. C'est aussi le frottement maximum lors du freinage.

Envoyer les coordonnes au robot:

Dtermine comment sont envoys les coordonns au robot. Les options suivantes sont disponibles :

5.2 Options du robot

Acceleration maximum du robot:

Les robots ne peuvent pas acclerer plus vite que a et ...

Acceleration minimum du robot:

... moins vite que a.

Rayon du Robot:

Dtermine la taille du robot.

Masse du Robot:

Si la masse du robot est augmente, les impacts lors de collisions seront plus violents.

Coefficient de rebondissement:

Affecte le rebondissement des robots. Si il est nul, les robot se cognant resteront cols, si la valeur est 1, ils agiront comme de parfaites boules de billard.

Coefficient de rigidit:

Dtermine quel point le robot sera endommag lors d'une collision. Plus la valeur est basse, plus les matriaux seront fragiles.

Coefficient de protection:

Influence la protection du robot. Ce facteur est multipli par l'nergie de dgas pour obtenir la reduction d'nergie du robot.

Avant du robot:

L'avant du robot est une partie faite d'un autre materiel, en gnral plus dur et protecteur. Ainsi les robots peuvent abimer les autres en leur rentrant dedans.

Coefficient de rebondissement du Robot:

voir les 4 parties prcdentes.

Coefficient de duret du Robot:

Mme chose...

Coefficient de protection du Robot:

Pareil...

Energie de dpart:

Le niveau d'nergie qu'auront les robots au dbut d'une partie.

Energie max:

En mangeant des 'cookies', les robots augmentent leur niveau d'nergie; mais pas plus que cette option.

Vitesse max de rotation:

Vitesse maximum de rotation du robot lui-meme. Unit : rad/s.

Vitesse max de rot. du cannon:

... Notez que le cannon est le radar bougent relativement au robot, et donc que la vitesse de rotation par rapport un repre fixe peut tre plus haute.

Vitesse max de rot. du radar:

... Mme remarque que prcdemment.

Niveaux d'nergie du robot:

Le robot ne connatra qu'approximativement son niveau d'nergie. Cette option dtermine le nombre de niveaux diffrents d'nergie qui seront commniqus aux robots.

5.3 Options de tire

Rayon du missile:

Taille du missile. Doit tre infrieure au rayon du robot.

Vitesse de tire:

Les missiles sont tirs avec une certaine vitesse dans la direction du cannon, laquelle est ajoute la vitesse du robot.

Pnalit de tire:

Quand un robot tire, il s'affliche des dgas. Ceci est le facteur par lequel l'nergie du tire est multipli afin d'optenir l'nergie qui sera soustraite au robot. Si le nombre de robots est important, ce nombre sera rduit.

Energie min. du missile:

La plus petite energie autorise. Un robot essayant de tirer avec une nergie infrieur n'arrivera pas le faire.

Energie potentielle max de tire:

Le robot a une nergie de tire qui augmente avec le temps, mais qui ne dpassera jamais cette valeur.

Augmentation de l'nergie potentielle de tire:

Dtermine quelle vitesse les robots rcuprent leur nergie potentielle de tire. Unit : energie/s

5.4 Options suplmentaires

Energie max des 'Cookies':

L'nergie des cookies est un nombre alatoire compris entre le max. et le min.

Energie min des 'Cookies':

Voir plus haut.

Frquence de 'Cookies':

Le nombre de cookies par seconde moyen.

Rayon des Cookies:

Taille des cookies.

Energie max des mines:

>L'nergie des mines est un nombre alatoire compris entre le max. et le min.

Energie min des mines:

Voir plus haut.

Frquence des mines:

Le nombre de mines par seconde en moyenne.

Rayon des mines:

Taille des mines.

Couleur des cookies:

Couleur des cookies en hexa-RGB

Couleur des mines:

Voir plus haut.

5.5 Options de temps

Timeout:

C'est le temps le plus long que prendra un jeu. Quand le temps est coul, tous les robots encore en course sont tus sans obtenir de points supplmentaires.

Pas de temps max:

Si l'ordinateur ralentie momentanment, le temps entre deux mises jour peut tre long. Changer cette option ralentira artificiellement l'ordinateur et violera la loi du temps relle.

Echelle de temps:

L'augmentation de l'chelle du temps au dessus de 1 quivaut une accleration de l'horloge du jeu par rapport celle de l'ordinateur. Changer cette valeur peut tre utile si vous voulez laisser plus de temps aux robots ou si vous avez un ordinateur trop rapide et que vous voulez acclrer la vitesse du jeu.

Intervalle de mise jour:

Cette option dtermine le temps entre deux mise jour d'un robot. Il n'est pas influenc pas l'chelle de temps et ne peut pas tre modifi une fois que le programme est lanc. La prcision est de 1/100 s (Elle dpend de la prcision du systme sur lequel est install RTB).

Temps de dmarrage:

Dtermine le temps entre le lancement du processus d'un robot et le commancement d'une squence. Si les robots sont noirs et n'ont pas de nom, il faut peut tre augmenter le temps de dmarage par dfaut d'une seconde. Cela peut arriver par exemple si il y a beaucoup de robots en jeu, ou que votre ordinateur est trop lent.

CPU:
Ok, je n'ai pas tout compris en anglais ce qui va suivre propos du CPU, alors si vous ne comprennez pas non plus, reprenez la doc en une autre langue et faite moi part de votre traduction.

CPU au dmarrage:

En mode comptition l'utilisation du CPU par le robot est limit. Au lancement du programme, le robot aura cette quantit de CPU sa disposition pour dmarrer.

Extra CPU:

Quand le CPU de dmarrage est dpass, le robot aura cette quantit de CPU en plus.

Temps Extra CPU:

Le temps de CPU suplmentaire doit durrer au moins une priode du processeur, sinon le robot sera dclarer mort dans le jeu courant.

Pourcentage d'avertissement CPU:

Quand un robot a dpac cette utilisation du processeur, il reoit un message d'avertissement.

Intervalle de verification des processus:

En mode competition cette option dcide avec quelle frquence il faut vrifier l'utilisation du CPU

Frequence de Log:

Afin de rduire la taille des fichiers de log vous pouvez augmenter cette option. Avec cette option, les info sur la position des robots seront seulement enregistres tous les n:th Intervalle de mise jour.

5.6 Taille des fentres

Dans cette partie, vous pouvez initialiser les taille des fentre telles que la fentre des arnes, la fentre des messages, la fentre des scores et la fentre des statistiques. Vous pouvez galement dfinir la position de ces fentres et de la fentre de contrle.

5.7 Options diverses

Echelle de l'arene:

Modifie l'echelle de l'arne. Une valeur de 2 donnera une arne 2 fois plus large (4 fois plus vaste si vous prfrez).

Facteur d'avance rapide:

Dtermine, lors d'une revisualisation, la vitesse de l'animation lorsque le bouton avance rapide ou retour rapide est press.

Nb max de robots simulatans:

Autorise l'utilisateur changer le nombre max de robots dans une squence. Si il y en a trop, le systme se plaindra (Le nombre dpend un peu du systme).

Couleur de fond:

Couleur de fond et ...

Couleur des murs:

... couleur des murs des arnes.

Couleur des messages RTB:

Couleur du texte quand RTB envoye des messages.

Chemin d'accs aux robots:

C'est une liste de rpertoires spars pas un point virgule. C'est dans ces rpertoires que seront recherchs les robots lors de la cration d'un nouveau tournoi Le sous rpertoire Robots dans le rpertoire d'installation de RTB (par dfaut: /usr/local/games/RealTimeBattle) est toujours parcouru.

Chemin d'accs aux arnes:

Pareil, mais pour les arnes la place des robots. Ici, le sous rpertoire est Arenas.


Suivant Prcdent Table des matires realtimebattle-1.0.8/Documentation/French/RealTimeBattle-6.html0000644000175000017500000001402110170545355022560 0ustar moimoi Manuel d'utilisation de RealTimeBattle, version 1.0.5 rev 1: Construction d'une arne Suivante Prcdente Table des matires

6. Construction d'une arne

Dans RTB, il est trs simple de construire vos propres arnes. Le language est constitu de seulement 11 commandes et il y a principalement 4 bloques de construction : line, circle, inner_circle et arc. C'est surtout pour des raisons de rapidit, car pour des cercles ou des lignes, il est facile de dtecter une collision. Circle et inner_circle vitent respectivement aux robots d'entrer dans un cercle et de sortir d'un cercle. Les lignes et les arcs arrtent les robots qui essayent de rentrer dans un mur (dans une courbe pour un arc), mais aucun test n'est fait sur les extremits de la ligne. Vous devez donc mettre un cercle a chaque fin de ligne pour en faire un objet solide. Les commandes polygon, closed_polygon et poly_curve sont faites pour simplifier ces procdures, donnant des objets plus 'propres'.

Tous les angles sont par dfaut en radians, mais vous pouvez les changer en degrs avec la commande angle_unit degrees.

Il est important de noter que RTB ne vrifie pas si un fichier donne une arne correcte et c'est totalement de votre ressort. Il signalera tout de mme si il y a une erreur de syntaxe.

Les fichiers d'arnes doivent tre nomms avec le suffixe .arena et doit tre stock dans le rpertoire des arnes pour que RTB puisse le trouver.

Le coefficient de rebondissement et de duret doivent tre donns pour chaque mur cr, determinant le matriau utilis pour le mur. Ils ont tous les deux des valeurs comprises entre 0 et 1. Les murs plus dur causeront plus de dgas sur les robots et un coefficient de rebondissement plus grand amliorera les bonds.

Vous tes galement encourags tudier les arnes livres avec RTB et apprendre partir de ces exemples.

6.1 Commandes d'arnes

Une commande est compose un nom de commande et d'arguments spars pas des espaces. Soyez sr de donner le bon nombre d'arguments!

Dans la liste des commandes, les arguments sont donns entre crochs.

scale [valeur]

Cette valeur multiplie l'echelle de l'arne donnera le facteur d'echelle, celui par lequel tous les coordonnes seront multipli (Essay et vous verrez...) Cette commande doit tre, si vous voulez l'inclure, la premire ligne du fichier. La valeur par dfaut est 1.0.

angle_unit [unit]

Bascule l'unit des angles vers le mode d'unit choisi, qui peut tre les degrees(degrs) ou radians(radians). La valeur par dfaut est le radian.

boundary [gauche] [haut] [droite] [bas]

Les limites de l'anre, dans laquel les robots, les cookies et les mines seront placs. Elles dterminent aussi l'arne visible dans la fentre des arenes. Cette commande est ncessaire est ne peut tre prcde que de scale.

inner_circle [rebondissement] [duret] [centre_x] [centre_y] [rayon]

Les robots sont limits l'interieur de ce cercle.

circle [rebondissement] [duret] [centre_x] [centre_y] [rayon]

Murs en forme de cercle...

line [rebondissement] [duret] [paisseur] [dbut_x] [dbut_y] [fin_x] [fin_y]

Cre une ligne. Elles empchent seulement les robots de ne pas les franchir selon leur longueur, alors n'oubliez pas de placer des cercles aux extrmits.

arc [rbd] [drt] [epais] [centre_x] [ctr_y] [rayon_int] [rayon_ext] [angle1] [angle2]

Un arc est une section d'anneau compris entre deux angles. Comme les lignes, ils ont besoins de cercles leurs deux extrmites.

polygon [rbd] [drt] [ep] [nb de sommets] ([centre_x] [centre_y])...

Cre un certain nombre de cercles connects pas des lignes.

closed_polygon [rbd] [drt] [ep] [nb de sommets] ([centre_x] [centre_y])...

Comme les polygon, mais le premier et le dernier sommet sont galements connects.

poly_curve [rbd] [drt] [ep] [debut_x] [debut_y] [dir_x] [dir_y] ([arguments ...]) ...

La poly_curve est la commande la plus puissante des commandes. Elle est utilise pour construire des murs avec des arcs ou des lignes. A chaque tape il y a une position et une direction qui sont affectes pas des 'sous-commandes'. La derniere sous-commande doit tre C ou Q.

L [longueur]

dessine une ligne de longueur donne dans la direction courante.

T [angle]

Dvie la direction courante.

A [angle] [rayon]

Dessine un arc.

C

Termine en effectuant une connection au premier point

Q

Termine sans effectuer la connection

exclusion_point [position_x] [position_y]

Quand une arne l'interieur des limites est faite de plusieurs aires spares, vous devez toutes les exclures sauf une en inserrant un point d'exclusion. Tous les points partir desquels vous pouvez tracer une droite vers un point d'exclusion sans franchir un mur sont concidrs comme en dehors de l'arne.


Suivant Prcdent Table des matires realtimebattle-1.0.8/Documentation/French/RealTimeBattle.html0000644000175000017500000001024210170545355022416 0ustar moimoi Manuel d'utilisation de RealTimeBattle, version 1.0.5 rev 1 Suivant Prcdent Table des matires

Manuel d'utilisation de RealTimeBattle, version 1.0.5 rev 1

Erik Ouchterlony and Ragnar Ouchterlony,

Traduit de l'anglais par Benot Rousseau

rtb@users.sourceforge.net

19 Septembre 2000

1. Introduction

2. Utilisation

3. Structure

4. Construction d'un robot

5. Options

6. Construction d'un champs de bataille


Suivant Prcdent Table des matires realtimebattle-1.0.8/Documentation/French/next.gif0000644000175000017500000000047510170545355020346 0ustar moimoiGIF89app!# Imported from XPM image: next.xpm!,@63333B! 0 A0 0 0  0 `0 `0 A @ `0 `00000000000000000000000000000000000000000000  000000 0000000000000000000000000000` ;realtimebattle-1.0.8/Documentation/French/prev.gif0000644000175000017500000000047510170545355020344 0ustar moimoiGIF89app!# Imported from XPM image: prev.xpm!,@63333# B 0 A0 0 0 0 `0 `0 A   `0 `00000000000000000000000000000000000000000000  000 0000000000000000000000000000000` ;realtimebattle-1.0.8/Documentation/French/toc.gif0000644000175000017500000000047410170545355020154 0ustar moimoiGIF89ap!" Imported from XPM image: toc.xpm!,@6313c B0 0 A0 0 0 0 `0@`0 `  `0@`0 `0@`0000000000 0000000000 00000000 000000 0000 000000000 00000000000 00000000000000` ;realtimebattle-1.0.8/Documentation/German/0002755000175000017500000000000010404234035016667 5ustar moimoirealtimebattle-1.0.8/Documentation/German/Makefile.am0000644000175000017500000001016610213062667020735 0ustar moimoidocsdir = $(DOCS_DIR)/German docs_DATA = \ RealTimeBattle-1.html RealTimeBattle-2.html RealTimeBattle-3.html \ RealTimeBattle-4.html RealTimeBattle-5.html RealTimeBattle-6.html \ RealTimeBattle.html next.gif prev.gif toc.gif next.png prev.png toc.png RealTimeBattle.dvi RealTimeBattle.sgml RealTimeBattle.txt RealTimeBattle.info EXTRA_DIST = $(docs_DATA) PAPER_SIZE = a4 all: docs docs: RealTimeBattle-1.html RealTimeBattle-2.html RealTimeBattle-3.html \ RealTimeBattle-4.html RealTimeBattle-5.html RealTimeBattle-6.html \ RealTimeBattle.html RealTimeBattle.dvi RealTimeBattle.info RealTimeBattle.txt html_docs: RealTimeBattle-1.html RealTimeBattle-2.html RealTimeBattle-3.html \ RealTimeBattle-4.html RealTimeBattle-5.html RealTimeBattle-6.html \ RealTimeBattle.html # Targets to generate the files if the sgml source exists, otherwise nothing happens if SGML2HTML %.html: %.sgml @if [ -f $< ]; then \ echo "sgml2html --split=0 -c latin $<"; \ sgml2html --split=0 -c latin $<; \ fi else %.html: %.sgml @echo "Warning: $< cannot be generated, sgml2html is missing."; \ touch $@ endif # elif [ ! -f $@ ]; then \ # echo "Error: $@ is missing and cannot be generated"; \ # fi if SGML2HTML RealTimeBattle%.html: RealTimeBattle.sgml @if [ -f $< ]; then \ echo "sgml2html --imagebuttons -D table=real -c latin $<"; \ sgml2html --imagebuttons -D table=real -c latin $<; \ elif [ ! -f $@ ]; then \ echo "Error: $@ is missing and cannot be generated"; \ fi else RealTimeBattle%.html: RealTimeBattle.sgml @echo "Warning: $@ cannot be generated, sgml2html is missing."; \ touch $@ endif if SGML2LATEX %.dvi: %.sgml @if [ -f $< ]; then \ echo "sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o dvi $<"; \ sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o dvi $<; \ elif [ ! -f $@ ]; then \ echo "Error: $@ is missing and cannot be generated"; \ fi else %dvi: %.sgml @echo "Warning: $@ cannot be generated, sgml2latex is missing."; \ touch $@ endif if SGML2LATEX %.ps: %.sgml @if [ -f $< ]; then \ echo "sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o ps $<"; \ sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o ps $<; \ elif [ ! -f $@ ]; then \ echo "Error: $@ is missing and cannot be generated"; \ fi else %.ps: %.sgml @echo "Warning: $@ cannot be generated, sgml2latex is missing."; \ touch $@ endif if SGML2INFO %.info: %.sgml @if [ -f $< ]; then \ echo "sgml2info -D table=char -c latin $<"; \ sgml2info -D table=char -c latin $<; \ elif [ ! -f $@ ]; then \ echo "Error: $@ is missing and cannot be generated"; \ fi else %.info: %.sgml @echo "Warning: $@ cannot be generated, sgml2info is missing."; \ touch $@ endif if SGML2RTF %.rtf: %.sgml @if [ -f $< ]; then \ echo "sgml2rtf -D table=real -c latin $<"; \ sgml2rtf -D table=real -c latin $<; \ elif [ ! -f $@ ]; then \ echo "Error: $@ is missing and cannot be generated"; \ fi else %.rtf: %.sgml @echo "Warning: $@ cannot be generated, sgml2rtf is missing."; \ touch $@ endif if SGML2LYX %.lyx: %.sgml @if [ -f $< ]; then \ echo "sgml2lyx -D table=real -c latin $<"; \ sgml2lyx -D table=real -c latin $<; \ elif [ ! -f $@ ]; then \ echo "Error: $@ is missing and cannot be generated"; \ fi else %.lyx: %.sgml @echo "Warning: $@ cannot be generated, sgml2lyx is missing."; \ touch $@ endif if SGML2TXT %.txt: %.sgml @if [ -f $< ]; then \ echo "sgml2txt --filter -D table=char -c latin $<"; \ sgml2txt --filter -D table=char -c latin $<; \ fi else %.txt: %.sgml @echo "Warning: $@ cannot be generated, sgml2txt is missing."; \ touch $@ endif if SGML2TXT ../%: %.sgml @if [ -f $< ]; then \ echo "sgml2txt --filter -D table=char -c latin $<"; \ sgml2txt --filter -D table=char -c latin $<; \ echo "mv $(subst ../$(subst ../,,$@),$(subst ../,,$@).txt,$@) $@"; \ mv $(subst ../$(subst ../,,$@),$(subst ../,,$@).txt,$@) $@; \ elif [ ! -f $@ ]; then \ echo "Error: $@ is missing and cannot be generated"; \ fi else ../%: %.sgml @echo "Warning: $@ cannot be generated, sgml2txt is missing."; \ touch $@ endif #Just to allow for non-existing .sgml-file %.sgml: @true realtimebattle-1.0.8/Documentation/German/Makefile.in0000644000175000017500000004342010324167706020750 0ustar moimoi# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = Documentation/German DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = 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)$(docsdir)" docsDATA_INSTALL = $(INSTALL_DATA) DATA = $(docs_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ docsdir = $(DOCS_DIR)/German docs_DATA = \ RealTimeBattle-1.html RealTimeBattle-2.html RealTimeBattle-3.html \ RealTimeBattle-4.html RealTimeBattle-5.html RealTimeBattle-6.html \ RealTimeBattle.html next.gif prev.gif toc.gif next.png prev.png toc.png RealTimeBattle.dvi RealTimeBattle.sgml RealTimeBattle.txt RealTimeBattle.info EXTRA_DIST = $(docs_DATA) PAPER_SIZE = a4 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Documentation/German/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Documentation/German/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-docsDATA: $(docs_DATA) @$(NORMAL_INSTALL) test -z "$(docsdir)" || $(mkdir_p) "$(DESTDIR)$(docsdir)" @list='$(docs_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(docsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docsdir)/$$f'"; \ $(docsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docsdir)/$$f"; \ done uninstall-docsDATA: @$(NORMAL_UNINSTALL) @list='$(docs_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(docsdir)/$$f'"; \ rm -f "$(DESTDIR)$(docsdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 $(DATA) installdirs: for dir in "$(DESTDIR)$(docsdir)"; 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-docsDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-docsDATA uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-docsDATA 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-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-docsDATA \ uninstall-info-am all: docs docs: RealTimeBattle-1.html RealTimeBattle-2.html RealTimeBattle-3.html \ RealTimeBattle-4.html RealTimeBattle-5.html RealTimeBattle-6.html \ RealTimeBattle.html RealTimeBattle.dvi RealTimeBattle.info RealTimeBattle.txt html_docs: RealTimeBattle-1.html RealTimeBattle-2.html RealTimeBattle-3.html \ RealTimeBattle-4.html RealTimeBattle-5.html RealTimeBattle-6.html \ RealTimeBattle.html # Targets to generate the files if the sgml source exists, otherwise nothing happens @SGML2HTML_TRUE@%.html: %.sgml @SGML2HTML_TRUE@ @if [ -f $< ]; then \ @SGML2HTML_TRUE@ echo "sgml2html --split=0 -c latin $<"; \ @SGML2HTML_TRUE@ sgml2html --split=0 -c latin $<; \ @SGML2HTML_TRUE@ fi @SGML2HTML_FALSE@%.html: %.sgml @SGML2HTML_FALSE@ @echo "Warning: $< cannot be generated, sgml2html is missing."; \ @SGML2HTML_FALSE@ touch $@ # elif [ ! -f $@ ]; then \ # echo "Error: $@ is missing and cannot be generated"; \ # fi @SGML2HTML_TRUE@RealTimeBattle%.html: RealTimeBattle.sgml @SGML2HTML_TRUE@ @if [ -f $< ]; then \ @SGML2HTML_TRUE@ echo "sgml2html --imagebuttons -D table=real -c latin $<"; \ @SGML2HTML_TRUE@ sgml2html --imagebuttons -D table=real -c latin $<; \ @SGML2HTML_TRUE@ elif [ ! -f $@ ]; then \ @SGML2HTML_TRUE@ echo "Error: $@ is missing and cannot be generated"; \ @SGML2HTML_TRUE@ fi @SGML2HTML_FALSE@RealTimeBattle%.html: RealTimeBattle.sgml @SGML2HTML_FALSE@ @echo "Warning: $@ cannot be generated, sgml2html is missing."; \ @SGML2HTML_FALSE@ touch $@ @SGML2LATEX_TRUE@%.dvi: %.sgml @SGML2LATEX_TRUE@ @if [ -f $< ]; then \ @SGML2LATEX_TRUE@ echo "sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o dvi $<"; \ @SGML2LATEX_TRUE@ sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o dvi $<; \ @SGML2LATEX_TRUE@ elif [ ! -f $@ ]; then \ @SGML2LATEX_TRUE@ echo "Error: $@ is missing and cannot be generated"; \ @SGML2LATEX_TRUE@ fi @SGML2LATEX_FALSE@%dvi: %.sgml @SGML2LATEX_FALSE@ @echo "Warning: $@ cannot be generated, sgml2latex is missing."; \ @SGML2LATEX_FALSE@ touch $@ @SGML2LATEX_TRUE@%.ps: %.sgml @SGML2LATEX_TRUE@ @if [ -f $< ]; then \ @SGML2LATEX_TRUE@ echo "sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o ps $<"; \ @SGML2LATEX_TRUE@ sgml2latex -p $(PAPER_SIZE) -D table=real -c latin -o ps $<; \ @SGML2LATEX_TRUE@ elif [ ! -f $@ ]; then \ @SGML2LATEX_TRUE@ echo "Error: $@ is missing and cannot be generated"; \ @SGML2LATEX_TRUE@ fi @SGML2LATEX_FALSE@%.ps: %.sgml @SGML2LATEX_FALSE@ @echo "Warning: $@ cannot be generated, sgml2latex is missing."; \ @SGML2LATEX_FALSE@ touch $@ @SGML2INFO_TRUE@%.info: %.sgml @SGML2INFO_TRUE@ @if [ -f $< ]; then \ @SGML2INFO_TRUE@ echo "sgml2info -D table=char -c latin $<"; \ @SGML2INFO_TRUE@ sgml2info -D table=char -c latin $<; \ @SGML2INFO_TRUE@ elif [ ! -f $@ ]; then \ @SGML2INFO_TRUE@ echo "Error: $@ is missing and cannot be generated"; \ @SGML2INFO_TRUE@ fi @SGML2INFO_FALSE@%.info: %.sgml @SGML2INFO_FALSE@ @echo "Warning: $@ cannot be generated, sgml2info is missing."; \ @SGML2INFO_FALSE@ touch $@ @SGML2RTF_TRUE@%.rtf: %.sgml @SGML2RTF_TRUE@ @if [ -f $< ]; then \ @SGML2RTF_TRUE@ echo "sgml2rtf -D table=real -c latin $<"; \ @SGML2RTF_TRUE@ sgml2rtf -D table=real -c latin $<; \ @SGML2RTF_TRUE@ elif [ ! -f $@ ]; then \ @SGML2RTF_TRUE@ echo "Error: $@ is missing and cannot be generated"; \ @SGML2RTF_TRUE@ fi @SGML2RTF_FALSE@%.rtf: %.sgml @SGML2RTF_FALSE@ @echo "Warning: $@ cannot be generated, sgml2rtf is missing."; \ @SGML2RTF_FALSE@ touch $@ @SGML2LYX_TRUE@%.lyx: %.sgml @SGML2LYX_TRUE@ @if [ -f $< ]; then \ @SGML2LYX_TRUE@ echo "sgml2lyx -D table=real -c latin $<"; \ @SGML2LYX_TRUE@ sgml2lyx -D table=real -c latin $<; \ @SGML2LYX_TRUE@ elif [ ! -f $@ ]; then \ @SGML2LYX_TRUE@ echo "Error: $@ is missing and cannot be generated"; \ @SGML2LYX_TRUE@ fi @SGML2LYX_FALSE@%.lyx: %.sgml @SGML2LYX_FALSE@ @echo "Warning: $@ cannot be generated, sgml2lyx is missing."; \ @SGML2LYX_FALSE@ touch $@ @SGML2TXT_TRUE@%.txt: %.sgml @SGML2TXT_TRUE@ @if [ -f $< ]; then \ @SGML2TXT_TRUE@ echo "sgml2txt --filter -D table=char -c latin $<"; \ @SGML2TXT_TRUE@ sgml2txt --filter -D table=char -c latin $<; \ @SGML2TXT_TRUE@ fi @SGML2TXT_FALSE@%.txt: %.sgml @SGML2TXT_FALSE@ @echo "Warning: $@ cannot be generated, sgml2txt is missing."; \ @SGML2TXT_FALSE@ touch $@ @SGML2TXT_TRUE@../%: %.sgml @SGML2TXT_TRUE@ @if [ -f $< ]; then \ @SGML2TXT_TRUE@ echo "sgml2txt --filter -D table=char -c latin $<"; \ @SGML2TXT_TRUE@ sgml2txt --filter -D table=char -c latin $<; \ @SGML2TXT_TRUE@ echo "mv $(subst ../$(subst ../,,$@),$(subst ../,,$@).txt,$@) $@"; \ @SGML2TXT_TRUE@ mv $(subst ../$(subst ../,,$@),$(subst ../,,$@).txt,$@) $@; \ @SGML2TXT_TRUE@ elif [ ! -f $@ ]; then \ @SGML2TXT_TRUE@ echo "Error: $@ is missing and cannot be generated"; \ @SGML2TXT_TRUE@ fi @SGML2TXT_FALSE@../%: %.sgml @SGML2TXT_FALSE@ @echo "Warning: $@ cannot be generated, sgml2txt is missing."; \ @SGML2TXT_FALSE@ touch $@ #Just to allow for non-existing .sgml-file %.sgml: @true # 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: realtimebattle-1.0.8/Documentation/German/RealTimeBattle-1.html0000644000175000017500000002403010320530155022545 0ustar moimoi RealTimeBattle Benutzer-Handbuch, Version 1.0.8: Einführung Next Previous Contents

1. Einführung

Dies hier ist die Anleitung zu RealTimeBattle. Sie beschreibt wie man das Programm bedient, wie es funktioniert, wie man eigene Roboter programmiert und wie man sich eine eigene Arena erstellen kann.

RealTimeBattle ist ein "Programmier-Spiel" für Unix, in dem Programm-gesteuerte Roboter gegeneinander kämpfen. Das Ziel ist es, alle Gegner zu vernichten, wobei man den Radar einsetzt um die Gegend abzutasten, und die Kanone, um die Gegner abzuschießen.

Obwohl die Umgebung in der sich die Roboter bewegen relativ einfach gestaltet ist, ist es nicht einfach einen intelligenten Roboter zu programmieren. RealTimeBattle wurde so geschrieben, dass es leicht zu bedienen, flexibel und schnell ist. Die Idee dahinter war, das Programm zum testen von intelligenten Algorithmen zu verwenden, oder auch einfach zur Unterhaltung.

Features:

  • Das Spiel wird in Echtzeit ausgeführt; die Roboter laufen als Child-Prozesse von RealTimeBattle.
  • Die Roboter kommunizieren mit dem Programm durch standard input und output(stdin und stdout).
  • Die Roboter können in nahezu jeder Programmiersprache geschrieben werden.
  • Bis zu 120 Roboter können gleichzeitig gegeneinander antreten.
  • Für die Kommunikation wird eine simple "messaging"-Sprache benutzt, die es einfach macht neue Roboter zu schreiben.
  • Die Roboter verhalten sich wie richtige physikalische Objekte.
  • Man kann sich eigene Arenen bauen.
  • Viele Konfigurationsmöglichkeiten.
  • Externe Clients können das Spielgeschehen anzeigen.
  • Rudimentärer Team-Support ist direkt im Spiel eingebaut, Team Frameworks erlauben weitere Koordination der Roboter.

1.1 Weitere Informationen

Mehr Informationen gibt's in den Dateien INSTALL, AUTHORS, BUGS, TODO, README, FAQ und ChangeLog . Aktuellere Informationen kann man auf der RealTimeBattle Homepage finden, wo es auch verschiedene Roboter, Neuigkeiten zu diversen Wettkämpfen, sowie dieses Handbuch in mehreren Dateiformaten gibt.

1.2 Systemvoraussetzungen

Die Hardware-Voraussetzungen hängen sehr davon ab, was man machen will. Ein paar Roboter antreten zu lassen, sollte auf nahezu jedem Rechner auf dem Linux(oder ein anderes Unix) läuft möglich sein. Der Bedarf an schnellerer Hardware steigt jedoch mit der Zahl der Roboter, die man gleichzeitig aufs Schlachfeld schickt; 120 gut programmierte Roboter gleichzeitig kämpfen zu lassen, kann einem normalen PC schon einiges abverlangen.

RealTimeBattle gibt es nur für Unix. Es wird auf einem Linux-Rechner geschrieben, sollte sich aber auch auf anderen Unix-Derivaten kompilieren lassen. Der Competition-Modus ist im Moment nur verfügbar, wenn man unter Linux das /proc-Verzeichnis aktiviert hat, daRealTimeBattle Informationen über die momentane CPU-Last erhalten muss.

Die einzige benötigte Software ist gtk+, das für die grafische Benutzeroberfläche verwendet wird.

1.3 Hintergrundinformationen

Das Projekt wurde im August 1998 ins Leben gerufen. Die Inspiration dazu war RobotBattle, ein sehr interessantes Spiel, das wir früher gern gespielt haben. Die damalige Version von RobotBattle hatte jedoch zwei entscheidende Nachteile:

  • Das Spiel gibt es nur für Windows.
  • Die Roboter sind in einer eigenen Programmiersprache geschrieben, was die Möglichkeiten, intelligente Roboter zu schreiben zu sehr einschränkt.

RobotBattle wurde inzwischen weiterentwickelt, ist aber nach wie vor nicht für andere Betriebssysteme erhältlich.

Daher haben wir uns entschieden, eine Unix-Version zu entwickeln, die viele Features eines modernen Betriebssytems nutzt.

1.4 Lizenz

RealTimeBattle unterliegt, ganz im Sinne Linux-Philosophie, der GNU General Public License. Offizielle Versionen von RealTimeBattle werden von den Autoren freigegeben werden.

Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony, weitere Entwickler sind in der AUTHORS Datei zu finden.

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.

1.5 Bug Reports

Wenn du etwas in diesem Softwarepaket findest, das nicht funktioniert, nicht richtig funktioniert, fehlt, falsch geschrieben, oder einfach nur verwirrend ist, schicke einen Bug Report an RealTimeBattle Homepage.

1.6 Deutsche Übersetzung

Diese Übersetzung unterliegt der GNU General Public License. Nähere Infomationen gibt es unter http://www.fsf.org/copyleft/gpl.html rtb-docs.de -- german translation of the RTB documentation Copyright (C) 1999-2005 Uwe Hermann, Falko Menge, Johannes Nicolai 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.

Die deutsche Übersetzung(für RTB-Version 0.9.7) wurde von Uwe Hermann <uwe@hermann-uwe.de> am 16. Mai fertiggestellt. Ich habe mir Mühe gegeben die englische Anleitung möglichst genau zu übersetzen, und trotzdem ein gut verständliches Deutsch zu erhalten. Ich hoffe dies ist mir, trotz einiger Ausdrücke die mir selber nicht sonderlich gefallen, einigermaßen gelungen. Fehler, Verbesserungsvorschläge o.ä. in der Übersetzung bitte an uh1763@bingo-ev.de schicken. Ich möchte mich bei Daniel Reutter <reutter@dhreutter.de> dafür bedanken, dass er die Übersetzung durchgelesen hat, und mich auf "ein paar" Fehler aufmerksam gemacht hat :-).

Die neueste Version der Übersetzung ist unter http://realtimebattle.sourceforge.net/Documentation/German/ erhältlich.

Changelog:

  • 4. Oktober 2005 (von Johannes Nicolai):
    • Anpassung an Version 1.0.8
    • Aktuellere Links eingefügt
    • weitere kleinere Verbesserungen
  • 23. November 2004 (von Falko Menge):
    • Anpassung an Version 1.0.7
    • Bugs 206688 und 458248 behoben
    • weitere kleinere Verbesserungen
  • 23. November 2004 (von Falko Menge):
    • Anpassung an Version 1.0.5 Rev 1
  • 17.-22. November 2004 (von Falko Menge):
    • kleinere Fehler behoben
  • 4. Februar 2000:
    • Anpassung an Version 1.0.2
    • Alle 'Tournament's in 'Turnier'e geändert
    • Tippfehler ausgebessert
  • 7. September 1999:
    • Anpassung an Version 0.9.11(und dadurch natürlich auch an 0.9.10)
  • 16. August 1999:
    • kleinere Verbesserungen.
    • Übersetzung an Version 0.9.8 und dann 0.9.9 angepasst.
  • 21. Mai 1999:
    • einige Fehler verbessert.
    • Datum der deutschen Übersetzung hingefügt.
    • Anfang der GPL hinzugefügt(bisher war nur ein Link zur FSF-Homepage da)


Next Previous Contents realtimebattle-1.0.8/Documentation/German/RealTimeBattle-2.html0000644000175000017500000005131110320530155022550 0ustar moimoi RealTimeBattle Benutzer-Handbuch, Version 1.0.8: Bedienung des Programms Next Previous Contents

2. Bedienung des Programms

Dieses Kapitel beschreibt, wie man RealTimeBattle bedient. Wenn es Dir langweilig erscheint, die ganze Anleitung durchzulesen, kannst du auch nach dem Try-and-Error-Prinzip vorgehen, und nur nachschauen wenn du irgendwo nicht weiterkommst. Es ist aber eine gute Idee den kurzen Abschnitt über Kommandozeilen-Parameter zu lesen. Beachte auch, dass es keine eingebaute Hilfe im Programm selber gibt - um Hilfe zu erhalten musst du dieses Dokument lesen.

2.1 Kommandozeilenparameter

An der Kommandozeile gibt es die Möglichkeit, zwei Optionen zu setzen, die das allgemeine Verhalten von RealTimeBattle kontrollieren. Hier kannst du die Options-Datei wählen, die die Standardwerte der Optionen festlegt. Man kann auch auswählen, in welchem Spielmodus das Programm laufen wird: Debug-, Normal- oder Competition-Modus.


 Programmaufruf: RealTimeBattle [Optionen]

 Optionen:
    --debug_mode,                -d   Debug-Modus
    --debug_level [0-5],         -D   Setzt den anfänglichen Debug-Level. Impliziert -d
    --normal_mode,               -n   Normal-Modus (standard)
    --competition_mode,          -c   Competition-Modus
    
    --no_graphics,               -g   es werden keine Grafiken angezeigt
    --option_file [file],        -o   wählt die Options-Datei (standard: $HOME/.rtbrc)
    
    --log_file [file],           -l   erzeuge eine Log-Datei;
                                      wenn als Datei '-' angegeben wird,
                                      wird nach stdout geloggt.

    --tournament_file [file],    -t   Angabe einer Turnier-Datei um
                                      automatisch ein Turnier zu starten.

    --statistics_file [file],    -s   Datei in die Statistiken
                                      geschrieben werden, wenn
                                      automatisch gestartet wird.

    --message_file [file],       -m   Nachrichten in die Datei
                                      "file" umleiten. '-' entspricht
                                      stdout. Wenn die Logs und die
                                      Nachrichten nach STDOUT umgeleitet
                                      werden, wird '-m' ignoriert.
    --replay [file]              -r   Ein Logfile das abgespielt
                                      werden soll. Wenn '-' als Datei
                                      angegeben wird, wird von STDIN
                                      gelesen.

    --help,                      -h   zeigt diese Informationen
    --version,                   -v   gibt die Versionsnummer aus
    --port_number                -p   legt den Port fest, an denen externe Clients sich
                                      verbinden können (Standard: 32134)       

Die port_number Option ist nur dann verfügbar, wenn RealTimeBattle mit der --enable-network Option compiliert wurde (siehe Datei INSTALL). Die Unterschiede zwischen den drei Comepetition-Modi sind in folgender Tabelle zusammengefasst.


Modus Debug Normal Competition
Debug Kommando verfügbar Ja Nein Nein
Pause während des Spiels Ja Ja Nein
Programm schrittweise ausführbar Ja Nein Nein
CPU-Zeit der Roboter ist unbeschränkt Ja Ja Nein

2.2 Kontroll-Fenster

New tournament:

Ein neues Turnier wird gestartet. Die Sektion Neues Turnier-Fenster öffnen gibt mehr Informationen darüber.

Replay tournament:

Ein Spiel ablaufen lassen. Du wirst das Logfile des Spiels auswählen müssen das du studieren willst.

Pause:

Hält das Spiel an. Im Competition-Modus wird erst am Ende des aktuellen Spiels angehalten.

End:

Beendet das aktuelle Turnier.

Options:

Öffnet das Options-Fenster.

Statistics:

Zeigt das Statistik-Fenster an.

Show arena window:

Diese Box kann dazu benutzt werden die drei Fenster, die während eines laufenden Spieles zu sehen sind, zu verstecken oder anzuzeigen, nämlich: das Arena-Fenster, das Score-Fenster und das Nachrichten-Fenster.

Quit:

Beendet das Programm.

Im Debug-Modus stehen weitere Möglichkeiten zur Verfügung. Sie dienen dazu, beim debuggen von Robotern zu helfen. Es ist möglich, laufende Prozesse (und somit Roboter) zu debuggen. Wenn man gdb benutzt, muss man folgendermaßen starten: gdb Robotername Prozessnummer.

Step:

In einem angehaltenen Spiel wird dieser Button das Spiel um eine Zeiteinheit voranschreiten lassen. Dies ist sehr nützlich, wenn man einen Roboter im Debugger am Laufen hat, da der Roboter sonst mit Nachrichten überflutet werden würde.

End game:

Das aktuelle Spiel wird beendet. Das hat den selben Effekt wie ihn ein Timeout haben würde.

Kill marked robot:

Im Debug-Modus kann man einen Roboter im Score-Fenster markieren. Dieser Roboter wird sterben, wenn man diesen Button drückt.

Debug level:

Den Debug-Level zu ändern ist eine Möglichkeit, den Robotern mitzuteilen, welche Nachrichten sie senden sollen. Dieser Wert liegt zwischen 0 und 5, wobei 0 bedeutet, dass überhaupt nicht debuggt wird, und 5 ist der höchste Debug-Level, d.h. alle Debug-Nachrichten sollen gesendet werden.

Beim Abspielen einer Logdatei (nicht von STDOUT) gibt es eine Menge Möglichkeiten die Wiedergabe zu steuern. Siehe dazu auch das Kapitel über Replaying.

2.3 Neues Turnier-Fenster öffnen

Um Roboter und Arenas für ein neues Turnier auszusuchen, musst du die Dateien auf der rechten Seite markieren und den add-Knopf drücken. Die ausgesuchten Dateien werden links angezeigt. Sie können entsprechend auch wieder entfernt werden.

Ein Turnier besteht aus einer bestimmten Zahl von Sequenzen von Spielen. In jeder Sequenz spielen die gleichen Roboter in allen Spielen. Hier wählt man die Anzahl der Spiele und Sequenzen, und auch die Anzahl der Roboter in jeder Sequenz. Wenn du vorhast, jedes Spiel mit allen Robotern zu spielen, ist es ratsam, nur eine Sequenz zu wählen und stattdessen die Anzahl der Spiele zu erhöhen. Der Grund dafür ist, es zu vermeiden alle Roboter-Prozesse neu zu starten, da dies eine Weile dauern kann, besonders wenn viele Roboter gegeneinander antreten.

Es ist auch möglich eine Turnier-Datei zu laden oder das aktuelle Turnier zu speichern. Das letzte gespielte Turnier ist in /tmp/rtb/tmp.tour gespeichert und wird immer angezeigt wenn dieses Fenster geöffnet wird.

Wenn die Datei nicht existiert wird ein leeres Turnier angezeigt. Du musst mindestens zwei Roboter und eine Arena auswählen um starten zu können.

2.4 Roboter- und Arena-Verzeichnisse

Damit das Programm die Roboter und die Arenas findet, muss man zwei Optionen setzen: den Roboter-Suchpfad und den Arena-Suchpfad. Die Unterverzeichnisse Robots und Arenas im Installationsverzeichnis (Standard-Wert: /usr/local/games/RealTimeBattle), das vor dem Kompilieren im Haupt-Makefile festgelegt wird, werden auf jeden Fall durchsucht. Wenn man ein neues Verzeichnis erzeugt, oder wenn man RealTimeBattle in ein anderes Verzeichnis installiert hat, muss man diese Optionen setzen.

2.5 Arena-Fenster

Hier findet das Gemetzel statt. Wenn du das Spiel detaillierter betrachten willst, kannst du die Zoom-Knöpfe benutzen oder +, - oder 0 drücken. Die Roboter werden als farbige Kreise mit einer Spitze in dem Kreis, die die Radar-Richtung anzeigt, die dicke Linie ist die Kanone und die dünne Linie zeigt in Bewegungs-Richtung.

2.6 Score-Fenster

In diesem Fenster werden alle Roboter aufgelistet, die in der aktuellen Sequenz "mitspielen".

2.7 Nachrichten-Fenster

Hier werden Nachrichten angezeigt, die die Roboter mittels Print und Debug senden. Die neuesten Nachrichten erscheinen ganz oben. Du kannst das Fenster leeren und auswählen nur die neuen Nachrichten von einem bestimmten Roboter zu sehen.

2.8 Options-Fenster

Hier kannst du eine ganze Reihe von Optionen ändern. Im Optionen-Kapitel kannst du detaillierte Informationen zu jeder Option erhalten. Die Änderungen werden erst wirksam, wenn entweder der apply- oder der OK-Knopf gedrückt werden.

Man kann seine Optionen auch in eine Datei sichern: Save options wird die Optionen in eine Datei deiner Wahl speichern und Save as default wird sie in die Datei .rtbrc in deinem Homeverzeichnis sichern.

Der Default-Button wird alle Optionen auf ihre Standardwerte zurücksetzen.

2.9 Statistik-Fenster

Man kann sich die Statistiken des aktuellen Turniers auf verschiedene Arten anzeigen lassen:

  • Statistiken über einzelne Roboter,
  • die Ergebnisse eines Spieles (game),
  • die Gesamtergebnisse der Sequenz (sequence total) oder
  • die Gesamtergebnisse(total) des Turniers.
Mit den Pfeiltasten kann man zum ersten Element, eines zurück, eines vorwärts oder zum letzen Element gelangen. Der Balken in der Mitte ist ein Indikator dafür, was gerade angezeigt wird; Wenn man auf den Balken drückt, werden die Statistiken erneuert, vorausgesetzt das Spiel läuft gerade. Wenn du gtk+1.1.x verwendest ist es auch möglich, die einzelnen Spalten zu sortieren, indem man ins entsprechende Titel-Kästchen klickt.

2.10 Spiel ohne Grafiken

Wenn man will, kann man RealTimeBattle auch ganz ohne Grafiken laufen lassen. Dies kann besonders nützlich sein, wenn man eine lange Reihe von Tests oder einen Wettbewerb durchführt. Man hat zwei Möglichkeiten diese Option zu benutzen: Entweder man verwendet die Option -g beim Programmstart, oder man schaltet die Grafiken schon beim Kompilieren ab (die Datei INSTALL gibt dazu nähere Informationen). Die letze Alternative ist besonders nützlich, da die ausführbare Datei kleiner wird und daher auf Rechnern mit weniger Arbeitsspeicher schneller läuft. Das ermöglicht es auch, RealTimeBattle auf Rechnern laufen zu lassen, auf denen kein gtk+ installiert ist.

Wenn man ohne Grafiken arbeitet, muss man ein Turnier-file angeben, andernfalls wird nichts passieren. Es ist auch zu empfehlen eine Log-Datei und/oder Statistik-Datei zu erzeugen, wenn man die Ergebnisse wissen will :-)

2.11 Turnier-Dateien

Die Turnier-Datei wird als Kommandozeilenparameter angegeben. Wenn diese Datei verwendet wird, wird das Turnier automatisch anfangen und beendet werden. Wie man die Statistiken speichert steht im Kapitel Statistik-Datei.

Eine Turnier-Datei besteht aus 5 Schlüsselwörtern. Alle diese Schlüsselwörter können mehrmals benutzt werden, aber man muss sich dessen bewusst sein, dass nur das letzte Schlüsselwort, das eine Zahl als Parameter annimmt, gezählt wird. Alle Schlüsselwörter sollten mit einem Strichpunkt beendet werden.

Games/Sequence oder g/s:

Als Parameter muss man entweder eine Zahl oder ein * angeben. Die Zahl legt fest wieviele Spiele pro Turnier gespielt werden sollen. Das Sternchen bedeutet, dass das Programm die genaue Anzahl von Arenas hernimmt und diese Zahl als Parameter verwendet. Der voreingestellte Wert ist 1.

Robots/Sequence oder r/s:

Als Parameter muss man entweder eine Zahl oder ein * angeben. Die Zahl legt fest wie viele Roboter in jeder Sequenz antreten. Das Sternchen bedeutet, dass das Programm die Anzahl der Roboter als Parameter nimmt. Der Default-Wert ist hier 2.

Sequences oder seq:

Als Parameter muss man entweder eine Zahl oder ein * angeben. Die Zahl legt die Anzahl der Sequenzen die im Turnier gespielt werden sollen fest. Wenn man ein Sternchen angibt, errechnet das Programm aus der Anzahl der Roboter und der Anzahl der Roboter pro Sequenz eine Zahl, sodaß alle Roboter genau einmal gegeneinander antreten. Diese errechnete Zahl wird dann als Parameter verwendet. Der Default-Wert ist 1.

Robots oder r:

Als Parameter wird eine oder mehrere Roboter-Datei(en) angegeben.

Arenas oder a:

Eine oder mehrere Arena-Dateien werden als Parameter übergeben.

Datei-Argumente können wie folgt aussehen:

Nur die Datei selber:

Hier wird der Pfad nach der Datei durchsucht.

Beispiel: Robot: empty.robot

Der volle Pfad zur Datei + der Dateiname:

Die angegebene Datei wird verwendet.

Beispiel: Arena: /usr/local/Games/RealTimeBattle/Arenas/Circle.arena

Alle Dateien im Pfad:

Diese Angabe durchsucht den ganzen Pfad und verwendet alle gefundenen Dateien.

Beispiel: Arena: *

Ein bestimmtes Verzeichnis:

Es wird das angegebene Verzeichnis durchsucht und alle gefundenen Dateien werden verwendet.

Beispiel: Robot: /usr/local/Games/RealTimeBattle/Robots/*

Es ist möglich Dateien mehr als einmal in die Turnier-Datei zu schreiben. Wenn du z.B. drei rotate_and_fire.robots haben willst, trage einfach drei mal rotate_and_fire.robot in die Turnier-Datei ein. Dies gilt genauso für *.

Beispiel Turnier-Datei:

R: * Arenas: Circle.arena Square.arena G/S: 2 r/s: 3 Sequences: *

2.12 Log-Dateien

Manchmal ist es ganz nützlich, ein Spiel detailliert zu analysieren ( Replay), oder es einfach nur aufzuheben, weil man es später vielleicht noch brauchen könnte. Hierfür sind Log-Dateien sinnvoll. Gib -l als Kommandozeilenparameter an, wenn du RealTimeBattle startest, und dahinter den Dateinamen der Log-Datei, um dieses Feature zu aktivieren. Wenn du als Datei '-' angibst, wird nach stdout geloggt.

Die Log-Datei ist wie folgt aufgebaut: Jede Zeile besteht aus einem Buchstaben, der den Typ der Information angibt, gefolgt von einer Liste von Argumenten die durch 'Whitespaces' getrennt sind. Die folgenden Informationen werden angegeben:

Header:

H [Spiele/Sequenz] [Roboter/Sequenz] [Sequenzen] [Roboter]

Arena Info:

A [Zeile aus der Arena Datei]

Spielstart:

G [Sequenznummer] [Spielnummer]

Option:

O [Option:Wert]

Liste von Robotereigenschaften:

L [Roboter-ID] [Roboterfarbe] [Robotername]

Roboter Positions-Info:

R [Roboter-ID] [x] [y] [Kanonen-Winkel] [Radar-Winkel] [Energie]

Zeit:

T [verstrichene Zeit]

Nachricht ausgeben:

P [Roboter-ID] [Nachricht]

Cookie:

C [Cookie-ID] [x] [y]

Mine:

M [Minen-ID] [x] [y]

Schuß:

S [Schuß-ID] [x] [y] [dx/dt] [dy/dt]

Tod:

D [Typ des gekillten Objekts] [Object-ID] [Wenn's ein Roboter war: erhaltene Punkte] [Position]

2.13 Replaying

Du kannst ein aufgenommenes Spiel mit Hilfe seiner Log-Datei abspielen lassen, und zwar entweder aus dem Kontroll-Fenster heraus, oder indem du die Kommandozeilenoption "-r" verwendest. Beachte aber, dass du, wenn du Standard-Input als Log-Datei verwendest ( Kommandozeilenoption "-r -"), nicht viel mehr machen kannst als das Spiel anzusehen. Normalerweise kann man den Ablauf des Spiels folgendermaßen beinflussen:

  • Der Scroll-Balken ganz oben zeigt an, wie weit das aktuelle Spiel schon abgelaufen ist. Man kann an einen beliebigen Zeitpunkt springen, indem man an dem Scrollbalken zieht und ihn richtig positioniert.
  • Fast Forward und Rewind funktionieren so, wie man es von CD-Spielern und Video-Geräten gewohnt ist. Die Geschwindigkeit kann mittels Fast Forward Factor geändert werden.
  • Step forward und step backward können dazu verwendet werden zu studieren was im Detail passiert. Zuerst sollte man das Spiel allerdings auf Pause setzen.
  • Mit den vier Buttons ganz unten kann man zwischen Spielen und Sequenzen hin- und herwechseln.

2.14 Statistik-Datei

Die Statistik-Datei wird nur benutzt, wenn eine Turnier-Datei angegeben wurde. Die Statistiken werden in diese Datei gespeichert, wenn das Turnier zu Ende ist. Man kann die Statistiken aber auch mit dem save-Knopf im Statistik-Fenster manuell speichern.


Next Previous Contents realtimebattle-1.0.8/Documentation/German/RealTimeBattle-3.html0000644000175000017500000002660510320530155022561 0ustar moimoi RealTimeBattle Benutzer-Handbuch, Version 1.0.8: Aufbau des Programms Next Previous Contents

3. Aufbau des Programms

In diesem Abschnitt werden wir den Aufbau des Programms beschreiben, außerdem die Art, wie die Roboter sich bewegen, schießen und den Radar kontrollieren, wann Punkte vergeben werden, und wie ein Turnier aufgebaut ist.

3.1 Roboterbewegung

Der Roboter verhält sich wie ein Fahrzeug mit Rädern, er rollt mit einer leichten Roll-Reibung nach vorne und gleitet mit einer wesentlich höheren Gleit-Reibung zur Seite. Die dritte verlangsamende Kraft ist der Luftwiderstand, der entgegen der Bewegungsrichtung des Roboters wirkt, und mit zunehmender Geschwindigkeit größer wird. Es gibt drei Wege, die Roboterbewegung zu beinflussen: Beschleunigen, Rotieren und Bremsen. Das Beschleunigen erhöht die Geschwindigkeit des Roboters in die Richtung in die der Roboter schaut. Man kann die Geschwindigkeit nicht direkt kontrollieren, Beschleunigen ist der einzige Weg den Roboter vom Fleck zu bewegen.

Wenn man den Roboter rotieren lässt, muss man beachten, dass dies nicht direkt die Richtung der Bewegung beinflusst, sondern nur die Richtung der sich der Roboter zuwendet. Die Gleit-Reibung wird die eigentliche Drehung des Roboters bewerkstelligen.

Bremsen wird die Roll-Reibung des Roboters auf den Maximalwert erhöhen. Das passiert, wenn die Räder blockiert sind, und der Roboter rutscht anstatt zu rollen. Vergiss nicht, die Bremse wieder zu lösen, wenn du wieder schneller werden willst.

3.2 Energie

Der Zustand des Roboters wird anhand seiner Energie gemessen. Es gibt mehrere Möglichkeiten, Energie zu verlieren. der Roboter kann:

  • von einem Schuss getroffen werden,
  • mit einem anderen Roboter oder einer Mauer zusammenstoßen,
  • in eine Mine rennen oder
  • einen Schuss abfeuern.

Die einzige Methode, Energie zu gewinnen ist einen Keks zu essen.

3.3 Das Radar

Das einzige Mittel, um Informationen über die Umgebung zu bekommen ist das Radar. Jedes Mal, wenn der Roboter aktuallisiert wird, wird ihm eine Radar-Nachricht zugeschickt, die ihm Informationen über das nächste Objekt in Radar-Richtung, d.h. Entfernung und Typ des Objekts gibt. Wenn das Objekt ein Roboter ist, wird auch die Energie dieses Roboters bekanntgegeben.

Da die Radar-Informationen alles sind, was der Roboter über seine Umwelt weiß, ist es extrem wichtig das Radar möglichst gut zu nutzen. Außerdem ist es wichtig, das Radar richtig zu bewegen, damit das Radar brauchbare Informationen sammeln kann.

3.4 Die Position des Robters

Seit RealTimeBattle Version 1.0.5 ist es möglich, die Position des Roboter direkter zu bekommen. Anstatt die Umgebung mit dem Radar analysieren zu müssen und daraus die Position zu ermitteln, kann man RealTimeBattle so konfigurieren, dass es die Roboter Koordinaten übermittelt. Dieses Verhalten wird durch die Option Send robot coordinates gesteuert.

3.5 Schießen

Schießen ist die beste Methode andere Roboter zu eliminieren. In RealTimeBattle bewegt sich jeder Schuss mit konstanter Geschwindigkeit, die sich aus der Summe der Roboter-Geschwindigkeit und der Schuss-Geschwindigkeit in die Richtung in die die Kanone zeigt, errechnet. Der Schuss wird solange weiterfliegen, bis er mit irgendeinem Objekt kollidiert.

Wenn der Schuss abgefeuert wird, hat er eine bestimmte Energie, die den Schaden bestimmt, den ein getroffener Roboter erleiden wird. Die Energie ist jedoch begrenzt; die Mindest-Energie verbietet Schüsse mit sehr geringer Energie, die man z.B. zum Abschießen von Minen hätte verwenden können. Die Maximal-Energie wird von der momentanen potentiellen Schuss-Energie des Roboters begrenzt, die mit der Zeit zunimmt.

Schießen ist jedoch nicht ohne Risiko, da jeder abgegebene Schuss den Roboter eine gewisse Energie kostet, die proportional zur Schuss-Energie ist.

Wenn ein Keks oder eine Mine getroffen werden, werden sie zerstört, unabhängig von der Schuss-Energie. Daher sollte man minimalste Schuss-Energien verwenden, wenn man Minen abschießt.

Schüsse, die kollidieren, werden nicht automatisch vernichtet, sondern ihre Energie wird gegeneinander aufgerechnet. Wenn die Schüsse in die gleiche Richtung fliegen, wird ihre Energie aufaddiert, wenn sie in entgegengesetzte Richtungen fliegen, heben sich ihre Energien auf.

3.6 Kollisionen

Roboter sind zerbrechliche Objekte, die von Kollisionen mit Mauern oder anderen Robotern Schaden erleiden. Bei Kollisionen verhalten sich die Roboter wie Gummibälle: sie springen zurück. Es gibt drei Faktoren, die ihr Verhalten beinflussen, der Bounce-Koeffizient, der Härte-Koeffizient und der Schutz-Koeffizient. An der Vorderseite sind die Roboter aus anderem Material gebaut, das härter ist und mehr Schutz gewährt. Das kann ausgenutzt werden um andere Roboter zu rammen; man teilt so weit mehr Schaden aus, als man selber einstecken muss.

3.7 Kekse und Minen

Kekse und Minen sind gleichwertige Objekte, mit dem einzigen Unterschied, dass man bein Einsammeln von Keksen Energie bekommt, und beim 'Einsammeln' von Minen Energie verliert. Kekse und Minen werden während des Spiels zufällig in der Arena auftauchen. Die Energie, die man von ihnen bekommt/verliert, und die Häufigkeit mit der sie erscheinen, kann durch Optionen kontrolliert werden.

3.8 Zeit

Wie der Name des Programms schon andeutet, wird als Zeit die Echtzeit benutzt. Es ist einzig und allein die Aufgabe der Roboter, auf Signale und Nachrichten des Programms rechtzeitig zu antworten. Während des Spiels wird regelmässig die update-Funktion aufgerufen. Zwischen diesen Aufrufen müssen sich die Roboter die verbleibende CPU-Zeit aufteilen. Um Roboter daran zu hindern, nicht zuviel Prozessorleistung zu veranschlagen, ist ihre CPU-Zeit im Competition-Modus beschränkt. Die entsprechenden CPU-Optionen geben dazu mehr Infomationen.

Die 'Echtzeit-ness' kann aber unter Umständen verändert werden. Man kann die Spielgeschwindigkeit beschleunigen oder verlangsamen, indem man die Timescale-Option verändert, und es gibt eine Methode, die Unterbrechung des Spiels zu verhindern, wenn die Systemlast zu hoch ist. Wenn die Zeit zwischen zwei Updates länger als MaxTimestep ist, wird das Spiel entsprechend langsamer gemacht.

3.9 Ein Spiel

Am Anfang eines Spiels haben die Roboter eine zufällige Position auf dem Spielfeld, mit einer zufälligen Ausrichtung. Das Radar und die Kanone zeigen beide nach vorne und die potentielle Schuss-Energie ist Null. Das Ziel der Roboter ist es nun, solange wie möglich zu überleben und gleichzeitig möglichst viele andere Roboter zu zerstören. Ein Roboter erhält einen Punkt für jeden gegnerischen Roboter, den er überlebt. Ein Extra-Punkt geht jedoch auch an alle teilnehmenden Roboter. Roboter die gleichzeitig sterben, bekommen genausoviele Punkte, wie sie bekommen hätten, wenn sie nicht gleichzeitig gestorben wären(d.h. sie bekommen einen halben Punkt für den jeweils anderen, der gleichzeitig stirbt).

Ein Spiel ist beendet wenn entweder die Anzahl der lebenden Roboter weniger als zwei ist, oder die Zeit abgelaufen ist.

3.10 Eine Sequenz

Eine Sequenz ist eine Reihe von Spielen, in denen immer die gleichen Roboter kämpfen. Am Anfang der Sequenz werden die Roboter-Prozesse gestartet. Die Anzahl der Roboter in einer Sequenz ist, wegen der Beschränkung auf maximal 256 offene File-Deskriptoren in Linux, auf 120 begrenzt. Es werden für jeden Roboter zwei Pipes als Kommunikations-Kanäle geöffnet.

Nachdem eine bestimmte Anzahl von Spielen gespielt wurden, werden die Roboter-Prozesse schliesslich gekillt.

3.11 Ein Turnier

Ein Turnier ist eine Folge von Sequenzen. Die Anzahl der Roboter in einem Turnier ist(theorethisch) unbegrenzt. Eine beliebige Anzahl von Sequenzen ist erlaubt, um aber das Turnier fair zu gestalten, sollte man eine Anzahl von Sequenzen aussuchen, sodass alle Roboter die gleiche Anzahl von Spielen spielen (d.h. #Sequenzen = #Roboter pro Spiel / ggT(#Roboter pro Spiel, #Roboter im Turnier)).


Next Previous Contents realtimebattle-1.0.8/Documentation/German/RealTimeBattle-4.html0000644000175000017500000004773110320530155022565 0ustar moimoi RealTimeBattle Benutzer-Handbuch, Version 1.0.8: Roboter-Programmierung Next Previous Contents

4. Roboter-Programmierung

Dieses Kapitel beschreibt, wie man eigene Roboter programmiert. Das wichtigste was man wissen muss ist die Messaging-Sprache, die aus ca. 35 Befehlen besteht die zur Kommunikation mit dem Server-Programm benutzt werden. Zudem kann es sehr hilfreich sein, die Beispiel-Roboter im Robots/-Verzeichnis zu studieren.

4.1 Nachrichten lesen

Am Anfang jeder Sequenz werden die Roboter-Prozesse gestartet und jeder bekommt zwei Pipes zugewiesen, eine für Input die andere für Output. Diese Pipes sind mit stdin und stdout verbunden, so dass es für die Roboter so aussieht, als würden sie mit dem Server über Standard Input und Standard Output kommunizieren. Dieses Verfahren ermöglicht es, Roboter in nahezu jeder Programmiersprache zu schreiben. Es gibt nur ein Problem: der Roboter muss wissen, wann er eine Nachricht erhalten hat. Um das zu erreichen gibt es (mindestens) drei verschiedene Methoden:

STDIN blockiert:

Dies ist die einfachste Methode. Wenn man von stdin liest, wird das Program blockiert bis die nächste Nachricht ankommt. Daher kann man das Programm so schreiben als wäre immer eine Nachricht vorhanden. Der Nachteil ist, dass man keine Berechnungen durchführen kann während man auf neue Nachrichten wartet. Um die Blockieren-Methode auszuwählen, sende folgende Roboter-Option solbald das Programm gestartet wurde:

cout << "RobotOption " << USE_NON_BLOCKING << " " << 0 << endl;
Beachte, dass das C++ Code ist. Wenn du nicht C++ verwendest gib einfach die obenstehenden Informationen auf stdout aus. endl bedeutet 'end of line'.

Select:

Wenn man die Unix Libc Funktion select verwendet, hat der Roboter mehr Kontrolle darüber, wann er nach neuen Nachrichten schauen soll. Dies ermöglicht dir, z.B. alle vorhandenen Nachrichten zu lesen, einige Berechnungen durchzuführen, Kommandos zu senden und dann auf weitere Nachrichten zu warten. Um mehr über select zu lernen, lies bitte die Unix-Dokumentation (man- oder info-pages).

Um die Select-Methode auszuwählen sende folgede Roboter-Option solbald das Programm gestartet wurde:

cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl;
Beachte auch hier, dass das C++ Code ist.

Signale:

Wenn du willst kannst du RealTimeBattle sagen, der Roboter soll jedesmal ein Signal gesendet bekommen, wenn neue Nachrichten gesendet werden. Diese Methode ermöglicht es dem Roboter ständig auf dem laufenden zu sein, auch wenn er gerade mit Berechnungen beschäftigt ist. Verwende die Unix-Dokumentation um mehr über Signale zu erfahren, oder alternativ: schau dir den Quelltext anderer Roboter an um mehr darüber zu lernen.

Um die Signal-Methode auszuwählen sende folgede Roboter-Optionen solbald das Programm gestartet wurde:

cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl;
cout << "RobotOption " << SIGNAL << " " << SIGUSR1 << endl;
Beachte auch hier, dass das C++ Code ist.

Natürlich kannst du irgendein anderes Signal als SIGUSR1 wählen.

Als kleine Hilfe diese drei Methoden zu implementieren, wurde der Roboter rotate_and_fire in drei verschiedenen, aber funktionell äquivalenten, Versionen geschrieben. Du kannst diese gerne studieren und in deinen eigenen Robotern verwenden.

Ein ''busy wait'', also ein wiederholtes Nachschauen, ob eine Nachricht da ist, ist keine gute Idee. Das würde zu einer drastischen Verlangsamung des Spielablaufs führen, schlimmer noch: im Competition-Modus würde der Roboter ziemlich schnell wegen mangelnder CPU-Zeit draufgehen.

4.2 Messagetypes.h

Die Datei Messagetypes.h ist eine gute Quelle für Informationen über die Messaging-Sprache. Es ist eine C/C++ Include-Datei, kann aber leicht für die Benutzung mit anderen Programmiersprachen umgeschrieben werden. Dort findet man eine Auflistung von Nachrichten, Warning-Typen, Objekten, Spiel-Optionen und Roboter-Optionen.

4.3 Schummeln

Da der Kampf der Roboter in Echtzeit und mit richtigen Prozessen stattfindet, gibt es möglicherweise Methoden Roboter zu schreiben, die auf die eine oder andere Art schummeln, z.B. indem sie andere Roboter oder sogar RealTimeBattle selber untersuchen, um mehr Informationen zu erhalten, sehr viele Ressourcen aufbrauchen damit andere Roboter weniger haben, etc. Das ist natürlich nicht die feine, englische Art, einen Gegner zu schlagen, daher versuchen wir das so gut wie möglich zu verhindern.

Im Competition-Modus ist die CPU-Zeit der Roboter beschränkt, denn auf diese Art kann ein Roboter nicht die ganze CPU-Zeit aufbrauchen. Dies könnte man durch das Öffnen weiterer Kind-Prozesse umgehen, aber seitdem die vom Kind-Prozess genutzte Zeit beim Beenden des Prozesses gezählt wird, sollte es sehr einfach sein zu Erkennen ob ein Roboter irgendetwas verdächtiges tut.

Es ist nicht möglich alle Möglichkeiten des Schummelns in RTB zu verhindern. So ist es z.B erlaubt, Dateien zu lesen und zu schreiben, man sollte sich aber dessen bewusst sein, dass die Organisatoren von Wettkämpfen dies verbieten können, wenn sie wollen, indem die einfach Besitzer und Rechte der Roboter-Programme richtig setzen. Es ist vielleicht immer noch möglich, Wege zu finden, um diese Einschränkungen zu umgehen; Wenn du eine solche Möglichkeit findest, sende bitte einen Bug-Report an uns. Im übrigen ist es die Aufgabe der Turnier-Organisatoren sicherzustellen, dass die Regeln befolgt werden.

4.4 Nachrichten an Roboter

Initialize [ErsteSequenz? (int)]

Dies ist die allererste Nachricht die der Roboter bekommen wird. Wenn das Argument eins ist, ist es die erste Sequenz im Turnier und der Roboter sollte seinen Namen und seine Farbe and den Server senden, ansonsten sollte er auf YourName- und YourColor-Nachrichten warten.

YourName [Name (string)]

Der momentane Name des Roboters; man sollte ihn nur ändern, wenn man sehr gute Gründe dafür hat.

YourColour [Farbe (hex)]

Die momentane Farbe des Roboters; wenn sie einem nicht gefällt, kann man sie ändern. Alle Roboter in einem Team haben dieselbe Farbe.

GameOption [Optionsnummer (int)] [value (double)]

Am Anfang jedes Spieles werden dem Roboter einige Einstellungen mitgeteilt, die dem Roboter nützlich sein können. Für eine komplette Liste sollte man sich das game_option_type enum in der Datei Messagetypes.h anschauen. Im Optionen-Kapitel gibt's mehr Informationen zu den einzelnen Optionen. Der Debug-Level wird auch als Spiel-Option gesendet obwohl es nicht in der Options-Liste ist.

GameStarts

Diese Nachricht wird gesendet wenn das Spiel anfängt (wer hätte das gedacht?).

Radar [Entfernung (double)] [Typ des beobachteten Objekts (int)] [Radar-Winkel (double)]

Diese Nachricht gibt jede Runde Radar-Informationen. Der Radar-Winkel wird relativ zur Vorderseite des Roboters angegeben, und zwar im Bogenmaß.

Info [Zeit (double)] [Geschwindigkeit (double)] [Kanonen-Winkel (double)]

Die Info-Nachricht wird immer nach der Radar-Nachricht gesendet. Sie gibt mehr allgemeine Informationen über den Status des Roboters. Die Zeit ist jene Zeit, die seit dem Start des Spieles vergangen ist. Dies ist nicht unbedingt die Zeit, die in Wirklichkeit vergangen ist, und zwar wegen time scale und max timestep.

Coordinates [x (double)] [y (double)] [angle (double)]

Diese Nachricht teilt Dir die aktuelle Prosition mit. Sie ist nur gesendet wenn die Option Send robot coordinates auf 1 oder 2 gesetzt ist. Der Wert 1 bedeutet das die Koordinaten relativ zur Startposition gesendet werden, so dass der Roboter nicht weiß wo er gestartet ist sondern nur wohin er sich seitdem bewegt hat.

RobotInfo [Energie-Level (double)] [Team-Mitglied? (int)]

Wenn dein Roboter einen anderen Roboter mittels des Radars entdeckt, wird diese Nachricht an deinen Roboter gesendet. Sie gibt verschiedene Informationen über den feindlichen Roboter. Die Energie des anderen Roboters wird auf die gleiche Art und Weise angegeben, wie die Energie deines eigenen Roboters(siehe unten). Der zweite Parameter ist nur im Team-Mode interessant, 1 heisst Team-Mitglied, 0 steht für einen Gegner.

RotationReached [Was hat seine Rotation beendet?(int)]

Wenn die Roboter-Option SEND_ROTATION_REACHED richtig gesetzt ist, wird diese Nachricht gesendet, wenn eine Rotation (mit RotateTo oder RotateAmount) beendet wurde, oder die Richtung sich geändert hat (beim 'sweeping'). Der Parameter entspricht dem 'was soll ich rotieren', z.B. bei Rotate.

Energy [Energie-Level(double)]

Am Ende jeder Runde wird der Roboter seinen eigenen Energie-Level erfahren. Er wird jedoch nicht die exakte Energie gesagt bekommen, sondern nur einen der Energie-Level.

RobotsLeft [Anzahl der Roboter (int)]

Am Anfang des Spiels, und wenn ein Roboter getötet wird, wird die Anzahl der verbleibenden Roboter allen noch lebenden Robotern bekanntgegeben.

Collision [Objekt-Typ mit dem der Roboter zusammengestossen ist (int)] [angle relative robot (double)]

Wenn ein Roboter von etwas getroffen wird, oder selber etwas rammt, bekommt er diese Nachricht. In der Datei Messagetypes.h findest du eine Liste aller Objekt-Typen.

Warning [Warnungs-Typ (int)] [Nachricht (string)]

Eine Warnungs-Nachricht wird dann gesendet wenn ein Problem aufgetaucht ist. Momentan können 7 verschiedene Warnungs-Nachrichten gesendet werden, nämlich:

UNKNOWN_MESSAGE: Der Server hat eine Nachricht erhalten, mit der er nichts anfangen kann.

PROCESS_TIME_LOW: Die CPU-Last hat den CPU Warnungs-Prozentsatz erreicht. Taucht nur im Competition-Modus auf.

MESSAGE_SENT_IN_ILLEGAL_STATE: Die erhaltene Nachricht konnte in diesem Spielstadium nicht verarbeitet werden. Z.B. wenn Rotate vor dem Anfang des Spiels gesendet wurde.

UNKNOWN_OPTION: Der Roboter hat eine robot option gesendet, die entweder einen unzulässigen Optionsnamen oder Options-Parameter enthielt.

OBSOLETE_KEYWORD: Das Schlüsselwort ist veraltet, und sollte nicht mehr verwendet werden. Lies die Datei ChangeLog um herauszufinden was stattdessen benutzt werden sollte.

NAME_NOT_GIVEN: Der Roboter hat seinen Namen nicht vor Spielbeginn gesendet. Das passiert wenn die robot startup time zu kurz ist oder der Roboter seinen Namen nicht früh genug sendet.

COLOUR_NOT_GIVEN: Der Roboter hat seine Farbe nicht vor Spielbeginn gesendet.

Dead

Der Roboter ist gestorben. Versuche nicht, weitere Nachrichten an den Server zu senden bis das Spiel zu ende ist. Der Server wird sie nicht lesen.

GameFinishes

Das aktuelle Spiel ist beendet, mache dich bereit für das nächste.

ExitRobot

Verlasse *sofort* das Programm, oder du wirst mit Gewalt rausgeschmissen!

4.5 Nachrichten von Robotern

Nachrichten von einem Roboter an RealTimeBattle dürfen nicht länger als 128 Zeichen sein. Anderenfalls wird RealTimeBattle die Nachricht in zwei Teile schneiden und möglicherweise eine "Unbekannte Nachricht" melden.

When you send messages to RealTimeBattle make shure that they are not longer than 128 chars, otherwise RealTimeBattle will cut them in two parts and may report an unknown message.

RobotOption [Optionsnummer (int)] [Wert (int)]

Momentan sind nur zwei Optionen verfügbar:

SIGNAL: Teilt dem Server mit, er soll ein Signal senden, wenn Nachrichten eintreffen. Der Parameter wird angeben, welches Signal. Sende diese Nachricht (z.B. mit Parameter SIGUSR1), sobald du bereit bist Signale zu empfangen. Der Standardwert ist 0, d.h. der Server soll keine Signale senden.

SEND_SIGNAL: Sagt dem Server er soll SIGUSR1 senden, wenn eine Nachricht eintrifft. Sende diese Nachricht (mit Parameter 1 (=true)) sobald du bereit bist ein Signal zu empfangen. Der Standardwert ist false.

SEND_ROTATION_REACHED: Wenn du willst das der Server eine RotationReached Nachricht sendet, wenn eine Rotation beendet wurde, solltest du diese Option setzen. Mit 1 als Wert wird die Nachricht gesendet, wenn ein RotateTo oder ein RotateAmount fertig ist, mit 2 als Wert werden auch Veränderungen in der Sweep-Richtung gemeldet. Standardwert ist 0, d.h. es werden keine Nachrichten gesendet.

USE_NON_BLOCKING: Bestimmt wie Nachrichten gelesen werden. Diese Option sollte genau einmal gesendet werden, sobald das Programm gestartet wird. Da die Option immer angegeben werden sollte, gibt es keinen Default-Wert.

Name [Name (string)]

Wenn man die Initialize-Nachricht mit 1 als Argument erhält, die anzeigt dass dies die erste Sequenz ist, sollte der Roboter seinen Namen und seine Farbe senden. Im Namen kann die Teamzugehörigkeit mitgeteilt werden. Lautet der Name foo Team: bar, so heißt der Roboter foo und spielt im Team bar. Teammitglieder bekommen dieselbe Farbe und erkennen sich als Freund bei der RobotInfo Nachricht. Ausgefeilteren Team-Support bietet das RealTimeBattle Team FrameWork.

Colour [home colour (hex)] [away colour (hex)]

Siehe oben. Die Farben sind wie normale Fußballtrikots. Die "home colour" wird verwendet falls sie nicht schon vergeben ist. Anderenfalls wird die "away colour" oder als letzten Ausweg eine zufällig gewählte, freie Farbe benutzt.

Rotate [Was soll rotieren (int)] [angular velocity (double)]

Setzt die "angular velocity" für den Roboter, die Kanone und den Radar. Setze 'Was soll rotieren' auf 1 für den Roboter, 2 für die Kanone, 4 für den Radar, oder zu einer Summe dieser Werte, um mehrere Objekte gleichzeitig zu rotieren. Die "angular velocity" wird in "Radians" pro Sekunde angegeben und wird von Robot (cannon/radar) max rotate speed begrenzt.

RotateTo [Was soll rotieren (int)] [angular velocity (double)] [End-Winkel (double)]

Genau wie Rotate, allerdings wird nur um einen bestimmten Winkel rotiert. Beachte dass Radar- und Kanonen-Winkel relativ zum Roboter-Winkel angegeben werden. Dieses Kommando kann nicht dazu benutzt werden den Roboter selber rotieren zu lassen, benutze RotateAmount dafür.

RotateAmount [Was soll rotieren (int)] [angular velocity (double)] [Winkel (double)]

Funktioniert wie Rotate, wird aber relativ zum momentanen Winkel rotieren.

Sweep [what to rotate (int)] [angular velocity (double)] [right angle (double)] [left angle (double)]

Funktioniert wie Rotate, setzt aber den Radar und/oder die Kanone in einen "Sweep Mode"(nicht möglich für den Roboter selber).

Accelerate [Wert (double)]

Setzt die Roboter-Beschleunigung. Der Wert ist durch Robot max/min acceleration beschränkt.

Brake [portion (double)]

Dient zum Bremsen. Vollbremsung (portion=1.0) heisst dass die Reibung in Roboter-Richtung gleich der Gleit-Reibung ist.

Shoot [Schuss-Energie (double)]

Schuss mit der angegebenen Energie. Die Schuss-Optionen geben dazu mehr Informationen.

Print [Nachricht (string)]

Zeigt die Nachricht im Message-Fenster an.

Debug [message (string)]

Zeigt die Nachricht im Message-Fenster an, wenn man sich im Debug-Modus befindet.

DebugLine [Winkel1 (double)] [Radius1 (double)] [Winkel2 (double)] [Radius2 (double)]

Zeichnet eine Linie direkt in die Arena. Dies ist nur im höchsten Debug-Level(5) erlaubt; Ist dies nicht der Fall wird eine Warnungs-Nachricht gesendet. Die Parameter sind die Start- und End-Punkte der Linie, angegeben in Polarkoordinaten relativ zum Roboter.

DebugCircle [Mittelpunkts-Winkel (double)] [Mittelpunkts-Radius (double)] [Kreisradius (double)]

Ähnlich wie DebugLine, zeichnet aber einen Kreis. Die ersten zwei Parameter sind Winkel und Radius des Kreismittelpunktes relativ zum Roboter. Der dritte Parameter gibt den Radius des Kreises an.


Next Previous Contents realtimebattle-1.0.8/Documentation/German/RealTimeBattle-5.html0000644000175000017500000003326110320530155022557 0ustar moimoi RealTimeBattle Benutzer-Handbuch, Version 1.0.8: Optionen Next Previous Contents

5. Optionen

RealTimeBattle kann durch eine ganze Reihe von Optionen konfiguriert werden, die in verschiedenen Gruppen zusammengefasst sind. Die Philosophie dahinter ist, dir größtmögliche Freiheit zu geben, das Spiel so zu gestalten wie du es willst. Das heisst aber auch, dass bestimmte Kombinationen der Optionen zu schlechten Ergebnissen führen können, und dem Programm Schwierigkeiten machen könnten.

5.1 Umwelt-Optionen

Gravitational Constant:

Die Beschleunigung, die von der Gravitation herrührt. Auf der Erde ist diese Konstante ungefähr 9.81. Eine Erhöhung wird zu einer erhöhten Reibung führen und die Roboter langsamer machen.

AirResistance:

Richtig geraten. Der Luftwiderstand nimmt mit der Geschwindigkeit zu.

RollFriction:

Die Reibung in Richtung des Roboters, wenn er nicht bremst (Rollreibung).

SlideFriction:

Die Reibung orthogonal zur Richtung des Roboters. Ist gleichzeitig die maximale Reibung, wenn der Roboter bremst (Gleitreibung).

Send robot coordinates:

Legt fest wie Koordinaten zu den Robotern gesendet werde. Folgende Optionen sind verfügbar:

  • 0 - kein Koordinaten senden (standart)
  • 1 - sendet die Koordinaten relativ zur Startposition
  • 2 - sendet absolute Koordinaten

5.2 Roboter Optionen

Robot max acceleration:

Roboter dürfen nicht mehr beschleunigen, als dieser Wert angibt, und...

Robot min acceleration:

...nicht weniger als dieser Wert.

Robot radius:

Gibt die Größe des Roboters an.

Robot mass:

Robotergewicht. Ein grosses Robotergewicht erhöht die Auswirkungen eines Zusammenpralls.

Robot bounce coefficient:

Gibt an wie gut der Roboter abprallen kann. Wenn dieser Wert 0 ist, werden die Roboter 'aufeinanderklatschen' wenn sie kollidieren, wenn der Wert 1, ist werden sie sich wie perfekte Billiardbälle verhalten.

Robot hardness coefficient:

Gibt an wieviel Schaden die Roboter erleiden, wenn sie kollidieren. Je kleiner der Wert, desto weicher das Material.

Robot protection coefficient:

Bestimmt, wie gut der Roboter geschützt ist. Dieser Faktor wird mit der Energie des Schadens multipliziert, und man erhält den Wert, um den man die Roboterenergie verringern muss.

Robot frontsize:

Die Vorderseite des Roboters ist ein Gebiet aus verschiedenen Materialien, normalerweise härter und schützender, sodass Roboter sich gegenseitig Schaden können indem sie sich rammen.

Robot front bounce coefficient:

Siehe vorherige 4 Erklärungen.

Robot front hardness coefficient:

Siehe vorherige 5 Erklärungen.

Robot front protection coefficient:

Siehe vorherige 6 Erklärungen.

Robot start energy:

Die Menge an Energie, die der Roboter am Anfang jeden Spieles haben wird.

Robot max energy:

Durch aufnehmen eines Kekses kann der Roboter seine Energie erhöhen, allerdings nicht mehr als auf diesen Wert.

Robot max rotate speed:

Wie schnell der Roboter rotieren darf. Einheit: 'radians'/s.

Robot cannon max rotate speed:

Maximale Geschwindigkeit, mit der die Kanone rotieren darf. Allerdings rotieren die Kanone und der Radar relativ zum Roboter, sodass die eigentliche Rotationsgeschwindigkeit höher sein kann.

Robot radar max rotate speed:

Maximale Radar-Rotationsigeschwindigkeit. Siehe auch obige Bemerkung.

Robot energy levels:

Der Roboter wird seine Energie nur ungefähr wissen. Diese Option entscheidet wieviele unterschiedliche Energie-Stufen es im Spiel gibt.

5.3 Schuß-Optionen

Shot radius:

Größe der Schüsse. Sollte kleiner sein als der Roboter Radius.

Shot speed:

Schüsse bewegen sich mit dieser Geschwindigkeit in die Richtung der Kanone plus der Geschwindigkeit des Roboters.

Shooting penalty:

Wenn der Roboter schiesst, nimmt er dabei selber Schaden. Dies ist der Faktor, mit dem die Schuß-Energie multipliziert wird, um die Energie zu bekommen, die dem Roboter abgezogen wird. Wenn die Anzahl der Roboter gross ist, wird diese Zahl verkleinert, sodass man nie unverhältnismäßig viel Energie verliert.

Shot min energy:

Die kleinste erlaubte Schuß-Energie. Ein Roboter, der versucht mit weniger Energie zu schiessen wird gar nicht schiessen.

Shot max potential energy:

Die Roboter haben eine Schuss-Energie, die mit der Zeit zunimmt, diesen Wert aber nicht überschreitet.

Shot potential energy increase speed:

Gibt an, wie schnell die Schuss-Energie des Roboters (siehe oben) zunimmt. Einheit: Energie/Sekunde.

5.4 Extra-Optionen

Cookie max energy:

Die Energie, die man von einem Keks bekommt ist ein zufälliger Wert zwischen Cookie max energy und Cookie min energy .

Cookie min energy:

Siehe oben.

Cookie frequency:

Die Zahl der Kekse pro Sekunde, die durchschnittlich auftauchen werden.

Cookie radius:

Größe der Kekse.

Mine max energy:

Die Minen-Energie ist ein Zufallswert zwischen Mine max energy und Mine min energy

Mine min energy:

Siehe oben.

Mine frequency:

Die Anzahl der Minen pro Sekunde, die durschnittlich auf dem Spielfeld erscheinen werden.

Mine radius:

Größe der Minen.

Cookie colour:

Farbe der Kekse in hexadezimaler Schreibweise, angegeben in rot-gruen-blau Werten.

Mine colour:

siehe oben.

5.5 Zeit Optionen

Timeout:

Dies ist die maximale Dauer eines Spiels. Wenn die Zeit abgelaufen ist, werden alle verbleibenden Roboter gekillt, ohne noch irgendwelche Punkte zu bekommen.

Max timestep:

Wenn der Computer zeitweise sehr langsam wird, kann die Zeit zwischen updates ziemlich lang werden. Indem man diese Option setzt, kann sich das Programm in solchen Fällen künstlich verlangsamen und damit die "realtimeness" verletzen.

Time scale:

Setzt man Timescale grösser als 1, heisst das, dass die Spiel-Uhr schneller als eine "richtige" Uhr gehen wird. Diesen Wert zu verändern kann nützlich sein wenn man entweder den Robotern mehr Zeit geben will, oder wenn man (k)einen schnellen Computer hat und man das Spiel beschleunigen will.

Update interval:

Diese Option gibt die Zeit zwischen Roboter-updates an, d.h. wie oft der Roboter-Zustand verändert wird. Sie wird nicht von der "Time Scale"-Option beinflusst, und kann nicht verändert werden, wenn das Programm läuft. Die Genauigkeit ist 1/100 s(je nach Genauigkeit des Systems auf dem RealTimeBattle läuft).

Robot startup time:

Legt die Zeit zwischen dem ausführen der Roboter und dem Anfang der Sequenz fest. Wenn Roboter schwarz sind und keine Namen haben, solltest du die RobotStartupTime etwas erhöhen(voreingestellt ist 1 Sekunde). Dies kann z.B. passieren wenn es viele Roboter gibt, die Roboter ziemlich groß sind, man auf einem langsamen Rechner arbeitet.

Start CPU time:

Im Competition-Modus ist die CPU-Zeit eines Roboters begrenzt. Am Anfang einer Sequenz bekommt ein Roboter diese Menge an CPU-Zeit, die er verbrauchen darf.

Extra CPU time:

Wenn die anfängliche CPU-Zeit verbraucht ist, bekommt der Roboter die Menge an Extra-CPU-Zeit.

Extra CPU period:

Die Extra CPU-Zeit muss eine ganze CPU-Periode reichen, sonst stirbt der Roboter im aktuellen Spiel.

CPU warning percentage:

Wenn der Roboter diesen Betrag an CPU-Zeit aufgebraucht hat, bekommt er eine Warnung zugeschickt.

Process check interval:

Im Competition-Modus entscheidet dieser Wert, wie oft das Programm den CPU-Verbrauch überprüfen wird.

Logging frequency:

Um die Größe der log files zu reduzieren kannst du diesen Wert vergrössern. Mit dieser Option werden robot position info nur jedes 'n'te Update-Interval aktualisiert.

5.6 Fenstergrößen

Hier kann man die Größe für verschiedene Fenster setzen, nämlich das Arena-Fenster, das Message-Fenster, das Score-Fenster und das Statistik-Fenster. Man kann auch die Position für die ersten drei und das Kontroll-Fenster angeben.

5.7 Verschiedene Optionen

Arena scale:

"Overall Scale" der Arena. Ein Wert von 2 ergibt eine doppelte Seitenlänge, d.h. eine viermal so große Arena.

Fast forward factor:

Legt die Geschwindigkeit fest mit der das Spiel mittels fast forward oder rewind abläuft(siehe auch Replay).

Max. Anzahl von Robotern, die gleichzeitig erlaubt sind:

Erlaubt dem User die maximal erlaubte Anzahl an Robotern in einer Sequenz zu verändern. Wenn es zu viele sind, kann sich das Betriebssystem beschweren (bei wievielen dies passiert ist systemabhängig).

Background colour:

Hintergrundfarbe und...

Foreground colour:

...Vordergrundfarbe der Arena.

Farbe der RTB-Nachrichten:

Farbe des Textes der RTB-Nachrichten.

Robot search path:

Dies ist eine durch Doppelpunkte getrennte Liste von Verzeichnissen die nach Robotern durchsucht werden, wenn ein neues Turnier anfängt. Das Verzeichnis Robots im Installationsverzeichnis (Standard-Wert: /usr/local/games/RealTimeBattle) wird immer durchsucht.

Arena search path:

Ähnlich wie oben, allerdings für Arena-Dateien, nicht für Roboter. Das Verzeichnis Arenas im Installationsverzeichnis (Standard-Wert: /usr/local/games/RealTimeBattle) wird immer durchsucht.


Next Previous Contents realtimebattle-1.0.8/Documentation/German/RealTimeBattle-6.html0000644000175000017500000001517310320530155022562 0ustar moimoi RealTimeBattle Benutzer-Handbuch, Version 1.0.8: Arena-Konstruktion Next Previous Contents

6. Arena-Konstruktion

In ReatTimeBattle ist es sehr einfach, eine eigene Arena zu erstellen. Die Sprache, die dafür verwendet wird besteht aus lediglich elf Kommandos, und es gibt nur vier grundlegende Bauelemente: Linie, Kreis, 'Innenkreis' und Bogen. Dies ist hauptsächlich aus Gründen der Programm-Geschwindigkeit so, da man bei Kreisen und Linien sehr einfach prüfen kann, ob es eine Kollision gab. Kreise und 'Innenkreise' hindern die Roboter daran, in einen Kreis hinein- oder aus einem Kreis herauszugelangen. Die Linie und der Bogen hindern Roboter daran an der Längsseite (bzw.an der gekrümmten Seite beim Bogen) hineinzugelangen, allerdings wird das an den zwei Enden der Linie nicht geprüft. Daher muss man an jedes Ende einer Linie einen Kreis anhängen, um es zu einem soliden Objekt zu machen. Die Kommandos polygon, closed_polygon und poly_curve sollen diese Prozedur vereinfachen, und ergeben immer ein richtiges Objekt.

Alle Winkel sind in der Voreinstellung im Bogenmaß. Das kann jedoch durch den Befehl angle_unit degrees geändert werden.

Man sollte beachten, dass RTB nicht überprüft ob eine Arena-Datei eine korrekte Arena ergibt, das ist einzig und allein deine Sache. Allerdings wird RTB sich beschweren, wenn du die Regeln der Arena-Konstruktionssprache nicht beachtest.

Arena-Dateien sollten mit .arena enden und im Arena-Verzeichnis untergebracht werden, so dass RealTimeBattle sie finden kann.

Die bounce coefficient- und hardness-Parameter, die an alle Mauer-erzeugenden Kommandos übergeben werden, legen das Material der Mauer fest. Beides sind Werte zwischen 0 und 1. Härtere Mauern beschädigen kollidierende Roboter mehr, und ein höherer Bounce-Koeffizient brigt sie dazu, besser abzuprallen.

Du solltest dir auch mal die Arenas die mit RTB mitgeliefert werden ansehen und von den Beispielen lernen.

6.1 Arena Kommandos

Ein Kommando besteht aus dem Kommandonamen und den Parametern, die durch Whitespaces getrennt werden. Du solltest immer sicherstellen, dass die richtige Anzahl der Parameter übergeben wird.

In der Kommando-Liste werden die Parameter in eckigen Klammern angegeben.

scale [Wert]

Dieser Wert multipliziert mit der arena scale ergibt den Skalierungsfaktor mit dem alle Koordinaten multipliziert werden. Dieses Kommando muss, wenn es verwendet wird, das este Kommando in der Datei sein, Standardwert ist 1.0.

angle_unit [unit]

Schaltet zu der ausgewählten Winkel-Einheit um. Mögliche Einheiten sind degrees (Gradmaß) or radians (Bogenmaß). Die Voreinstellung verwendet das Bogenmaß.

boundary [links] [oben] [rechts] [unten]

Diese Begrenzungen umschliessen das Gebiet, in der Roboter, Kekse und Minen aufgestellt werden. Ausserdem legen sie das sichtbare Gebiet im Arena-Fenster fest. Dieses Kommando wird unbedingt benötigt und nur scale darf vorher verwendet werden.

inner_circle [Bounce] [Härte] [Mittelpunkt_x] [Mittelpunkt_y] [Radius]

Roboter sind im inneren dieses Kreises gefangen.

circle [Bounce] [Härte] [Mittelpunkt_x] [Mittelpunkt_y] [Radius]

Eine Mauer in Form eines Kreises.

line [Bounce] [Härte] [Dicke] [Start_x] [Start_y] [Ende_x] [Ende_y]

Erzeugt eine Linie. Sie hindert den Roboter nur daran an der Längsseite durchzudringen, daher müssen Kreise an die Enden gesetzt werden.

arc [Bounce] [Härte] [Dicke] [Mittelpunkt_x] [Mittelpunkt_y] [Innenradius] [Außenradius] [Winkel1] [Winkel2]

Ein Bogen ist ein Kreissegment zwischen zwei Winkeln. Genau wie die Linie benötigt der Bogen zwei Kreise an seinen Endpunkten.

polygon [Bounce] [Härte] [Dicke] [Anzahl der Seiten] ([Mittelpunkt_x] [Mittelpunkt_y])...

Dieses Kommando wird eine Menge Kreise erzeugen, die durch Linien verbunden sind, und dadurch ein Polygon-ähnliches Gebilde schaffen.

closed_polygon [Bounce] [Härte] [Dicke] [Anzahl der Seiten] ([Mittelpunkt_x] [Mittelpunkt_y])...

Ähnlich wie ein Polygon, aber die erste und letzte Seite sind auch durch eine Linie verbunden.

poly_curve [Bounce] [Härte] [Dicke] [Start_x] [Start_y] [Richtung_x] [Richtung_y] ([Befehlsargumente ...]) ...

Die poly_curve ist das mächtigste der Arena-Kommandos. Sie wird genutzt im Wände aus Linien und Bögen zu bauen. Nach jeden Abschnitt hatt man eine aktuelle Position und eine aktuelle Richtung, die si

It is used to build walls with lines and arcs. At each step you have a current position and direction, which are affected by the subcommands. The last subcommand must be C or Q.

L [length]

Draw a line with given length in the current direction.

T [angle]

Turn the current dircetion.

A [angle] [radius]

Draw an arc.

C

Finish by connecting with the starting point.

Q

Quit.

exclusion_point [Position_x] [Position_y]

Wenn die Arena innerhalb der Begrenzungen aus mehreren getrennten Gebieten besteht, solltest du alle bis auf eins ausschliessen, indem du "Exclusion-Punkte" setzt. Alle Punkte von denen aus man eine gerade Linie bis zu einem "Exclusion-Punkt" ziehen kann, ohne eine Mauer zu überschreiten, gelten als ausserhalb der Arena.


Next Previous Contents realtimebattle-1.0.8/Documentation/German/RealTimeBattle.html0000644000175000017500000001241410320530155022412 0ustar moimoi RealTimeBattle Benutzer-Handbuch, Version 1.0.8 Next Previous Contents

RealTimeBattle Benutzer-Handbuch, Version 1.0.8

Erik Ouchterlony and Ragnar Ouchterlony, Johannes Nicolai ( jonico@users.sourceforge.net)

4. Oktober 2005
Deutsche Übersetzung von Uwe Hermann, Falko Menge und Johannes Nicolai

1. Einführung

2. Bedienung des Programms

3. Aufbau des Programms

4. Roboter-Programmierung

5. Optionen

6. Arena-Konstruktion


Next Previous Contents realtimebattle-1.0.8/Documentation/German/next.gif0000644000175000017500000000047510170545355020352 0ustar moimoiGIF89app!# Imported from XPM image: next.xpm!,@63333B! 0 A0 0 0  0 `0 `0 A @ `0 `00000000000000000000000000000000000000000000  000000 0000000000000000000000000000` ;realtimebattle-1.0.8/Documentation/German/prev.gif0000644000175000017500000000047510170545355020350 0ustar moimoiGIF89app!# Imported from XPM image: prev.xpm!,@63333# B 0 A0 0 0 0 `0 `0 A   `0 `00000000000000000000000000000000000000000000  000 0000000000000000000000000000000` ;realtimebattle-1.0.8/Documentation/German/toc.gif0000644000175000017500000000047410170545355020160 0ustar moimoiGIF89ap!" Imported from XPM image: toc.xpm!,@6313c B0 0 A0 0 0 0 `0@`0 `  `0@`0 `0@`0000000000 0000000000 00000000 000000 0000 000000000 00000000000 00000000000000` ;realtimebattle-1.0.8/Documentation/German/next.png0000644000175000017500000000037210170545355020365 0ustar moimoiPNG  IHDRb PLTEppdtRNS@*bKGDH pHYsHHFk>@IDATxc Hz 1H|gBiU#֪U+@fVf:{ jv.QRE+tEXtcomment Imported from XPM image: next.xpm4vRIENDB`realtimebattle-1.0.8/Documentation/German/prev.png0000644000175000017500000000037410170545355020365 0ustar moimoiPNG  IHDRb PLTEppdtRNS@*bKGDH pHYsHHFk>BIDATxc Hz q? WZBZCV500hZG{bxw.I+tEXtcomment Imported from XPM image: prev.xpm.IENDB`realtimebattle-1.0.8/Documentation/German/toc.png0000644000175000017500000000034510170545355020174 0ustar moimoiPNG  IHDRb PLTEpWktRNS@*bKGDH pHYsHHFk>,IDATxc?0BKJY %>ZX!p0(F#?s.>Y*tEXtcomment Imported from XPM image: toc.xpm|IENDB`realtimebattle-1.0.8/Documentation/German/RealTimeBattle.dvi0000644000175000017500000031370410320530157022240 0ustar moimoi; TeX output 2005.10.04:1840_2 ~?ՁZݺIqqecss2074RealTimeBattlefBenutzer-Handbuch,Vwmersion1.0.8 cG 1 ecrm1000ErikU OuchterlonyandRagnarOuchterlony*,JohannesNicolai(HЃ ecti1000jonic}/o@users.sourceforge.net) 4.qOktobGer2005&6 ecss1000DeutscheU bGersetzungvonUweHermann,FalkoMengeundJohannesNicolai(&Lt$ffffecbx1440Conctents]f ecbx10001EinfhrungTW2ؼ1.1%W*eitereU InformationenG.荍.......................................w31.2%SystemvoraussetzungenaS.荍......................................w31.3%HintergrundinformationenS.荍.....................................w31.4%Lizenz.荍................................................w41.5%BugU RepGorts+.荍............................................w41.6%DeutscheU bGersetzungǍ.荍.......................................w42Bedien>ungdesProgramms:&52.1%Kommandozeilenparameter!.荍....................................w62.2%Kontroll-F*ensterQ.荍..........................................w62.3%NeuesU T*urnier-FensterneniW.荍...................................w82.4%RobGoter-U undArena-V*erzeichnisse.荍................................w82.5%Arena-F*enster|s.荍............................................w82.6%Score-F*enster{.荍............................................w82.7%Nachrichten-F*enster[.荍........................................w82.8%Options-F*enster..荍...........................................w92.9%Statistik-F*ensteru.荍..........................................w92.10%SpielU ohneGraken.荍.........................................w92.11%T*urnier-DateienCۍ.荍...........................................w92.12%Log-Dateien?.荍.............................................x?112.13%Replaying+.荍..............................................x?122.14%Statistik-Dateiѻ.荍...........................................x?123AufbaudesProgrammsDV123.1%RobGoterbewegungu.荍..........................................x?123.2%Energie׷.荍...............................................x?133.3%DasU RadarC.荍..............................................x?133.4%DieU PositiondesRobtershύ.荍......................................x?133.5%SchieenIǍ.荍...............................................x?13*_2 ~?G1.8Einfhrung02ՁV3.6%Kollisionen;ύ.荍.............................................x?14ؼ3.7%KekseU undMinenߍ.荍..........................................x?143.8%Zeitύ.荍.................................................x?143.9%EinU Spiel4.荍...............................................x?143.10%EineU Sequenz.荍............................................x?143.11%EinU T*urnierQS.荍.............................................x?154RobQoter-Programmierung8154.1%NachrichtenU lesenÍ.荍..........................................x?154.2%MessagetypGes.h.荍...........................................x?164.3%SchummelnX_.荍.............................................x?164.4%NachrichtenU anRobGoter{.荍......................................x?174.5%NachrichtenU vonRobGoternӍ.荍.....................................x?185OptionenǞ205.1%Umwelt-Optionen.ύ.荍..........................................x?205.2%RobGoterU Optionen .荍.........................................x?215.3%Schu-Optionenu.荍...........................................x?225.4%Extra-Optionen ?.荍...........................................x?225.5%ZeitU Optionen.荍............................................x?235.6%F*enstergrenQ.荍............................................x?245.7%V*erschiedeneU Optionen6.荍.......................................x?246Arena-K>onstruktionU?256.1%ArenaU Kommandos};.荍.........................................x?25(y鍍1Einfhrung:Dies̶hieristdieAnleitungzuRealTimeBattle.ASiebGeschreibtwiemandasProgrammbedient,*wiees funktioniert,U wiemaneigeneRobGoterprogrammiertundwiemansicheineeigeneArenaerstellenkqann.RealTimeBattle distein"Programmier-Spiel"frUnix,*indemProgramm-gesteuerteRobGotergegeneinanderkqЀmpfen. DasbZielistes,halleGegnerzuvernichten,wobGeibmandenRadareinsetztumdieGegendabzutasten,undU dieKanone,umdieGegnerabzuschieen.ObwohlmdieUmgebungindersichdieRobGoterbewegenrelativeinfachgestaltetist,istesnichteinfacheinenintelligentenp8RobGoterzuprogrammieren.RealTimeBattlewurdesogeschrieben,vdassesleichtp8zubedienen,exibGeljundschnellist.-DieIdeedahinterwar,pdasProgrammzumtestenvonintelligentenAlgorithmenzuverwenden,U oGderaucheinfachzurUnterhaltung.F*eatures:>  !", cmsy10DasU SpielwirdinEchtzeitU ausgefhrt;dieRobGoterlaufenalsChild-ProzessevonRealTimeBattle. ֍DieNRobGoterkommunizierenNmitdemProgrammdurchstandardinputundoutput(stdinundstdout).1a_2 ~?G1.8Einfhrung03ՁVDieU RobGoterknneninnahezujederProgrammiersprachegeschriebGenwerden.BisU zu120RobGoterknnengleichzeitiggegeneinanderantreten.FrfdieKommunikqationfwirdeinesimple"messaging"-SprachebGenutzt,dieeseinfachmachtneue RobGoterU zuschreiben.DieU RobGoterverhaltensichwierichtigephysikqalischeOb0jekte.ManU kqannsicheigeneArenenbauen.VieleU Kongurationsmglichkeiten.ExterneU ClientsknnendasSpielgeschehenanzeigen.RudimentreroT*eam-SuppGortistdirektimSpieleingebaut,v_TeamFrameworkserlaubGenweitereKoGor-dinationU derRobGoter.#Í!N ecbx12001.1WeitereInformationenMMehrLInformationengibt'sindenDateienqL ectt1000INSTALL,AUTHORS,BUGS,TODO,README,FAQKٹundChangeLog.AktuellereU InformationenkqannmanaufderؼR}/ealTimeBattleHomepageU http://realtimebattle.sourceforge.net/nden,nwoesauchverschiedeneRobGoter,nNeuigkeitenzudiversenW*ettkqЀmpfen,nsowiediesesHandbuchinmehrerenU Dateiformatengibt.#Í1.2SystemvoraussetzungenMDieHardware-V*oraussetzungenhngensehrdavonab,APwasmanmachenwill.ZEinpaarRobGoterantretenzuslassen,HsollteaufnahezujedemRechneraufdemLinux(oGdereinanderesUnix)luftmglichsein.yDerBedarfEanschnellererHardwaresteigtjedoGchmitderZahlderRobGoter,>diemangleichzeitigaufsSchlachfeldschickt;120:gutprogrammierteRobGotergleichzeitigkqЀmpfenzulassen,́kanneinemnormalenPCschoneinigesU abverlangen.RealTimeBattle.gibtesnurfrUnix.ĩEswirdaufeinemLinux-RechnergeschriebGen,qsolltesichabGerauchaufanderenUnix-Derivqatenkompilierenlassen.Der2.1(CompGetition-Modus)istimMomentnurverfg-bar,|rwenntmanunterLinuxdas/proc-V*erzeichnisaktivierthat,|rdaRealTimeBattleInformationenbGerdiemomentaneU CPU-Lasterhaltenmuss.Die*einzigebGentigteSoftware*istgtk+http://www.gtk.org,?,dasfrdiegrascheBenutzerobGercheverwendetU wird.#Í1.3HintergrundinformationenMDasU Pro0jektwurdeimAugust1998insLebGengerufen.qDieInspirationdazuwarR}/obotBattlelhttp://www.robotbattle.com/,[einsehrinteressanteslSpiel,daswirfrhergerngespielthabGen.DieU damaligeV*ersionvonRobGotBattlehattejedochzweientscheidendeNachteile:ؼDasU SpielgibtesnurfrWindows.Die:RobGotersindineinereigenenProgrammiersprachegeschriebGen,wasdieMglichkeiten,intelligenteRobGoterU zuschreibenzusehreinschrnkt.[_2 ~?G1.8Einfhrung04ՁVRobGotBattleywurdeinzwischenweiterentwickelt,'istabGernachwievornichtfrandereBetriebssysteme erhltlich.ؼDaherhabGenwirunsentschieden,eineUnix-V*ersionzuentwickeln,dievieleF*eatureseinesmoGdernenBe-triebssytemsU nutzt.#Í1.4LizenzMRealTimeBattleU unterliegt,ganzimSinneLinux-Philosophie,derGNUGener}/alPublicLicensenhttp://www.gnu.org/copyleft/gpl.html.OzielleV*ersionenvonReal-TimeBattleU werdenvondenAutorenfreigegebGenwerden.Copyright7(C)1998-2000ErikOuchterlony7andRagnarOuchterlony*,fweitere7EntwicklersindinderAUTHORSDateiU zunden.Thisprogramisfreesoftware;'youcanredistributeitand/ormoGdifyitunderthetermsoftheGNUGeneralPublicLicenseaspublishedbytheF*reeSoftwareF*oundation;N eitherversion2oftheLicense,$or(atyouroption)U anylaterversion.This*programisdistributedinthehopGethatitwillbeuseful,2butWITHOUT*ANYWARRANTY;*withouteventheimpliedwarrantyofMERCHANT*ABILITYorFITNESSFORAP*ARTICULARPURPOSE.SeetheU GNUGeneralPublicLicenseformoredetails.Y*ous3shouldhaves3receivedacopyoftheGNUs+GeneralPublicLicensealongwiththisprogram;or(atyouroption)anylaterversion./ThisprogramisdistributedinthehopGethatitwillbeuseful,̬butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyofMERCHANT*ABILITYorPFITNESS1FORAP*ARTICULAR1PURPOSE.SeetheGNUGeneralPublicLicenseformoredetails.HY*oushouldxhavereceivedacopyoftheGNU`GeneralPublicLicensealongwiththisprogram;[ifnot, writetotheF*reeU SoftwareF*oundation,Inc.,59TemplePlace-Suite330,Boston,MA02111-1307,USA.DieU deutschebGersetzung(frR*TB-VersionU 0.9.7)wurdevonUweHermann b> cmmi10U mailto:uh1763@bingo-ev.deamw16.'Maifertiggestellt.IchhabGemirMhegegebendieenglischeAnleitungmglichstgenauzubGersetzen,undQ trotzdemeingutverstndlichesQ Deutschzuerhalten.p$Ichhoediesistmir,QtrotzeinigerAusdrckediemirq/selbGernichtq/sonderlichgefallen,3einigermaengelungen.ŭF*ehler,VerbGesserungsvorschlgeq/o..ŭinderbGersetzungU bitteanuh1763@bingo-ev.dehР_2 ~?G2.8Bedien>ungdesProgramms8Q5ՁVschicken.gqIch6mGchtemichbGeiDanielwR}/eutter6dafrbGedanken,ungdesProgramms8Q6ՁV2.1KommandozeilenparameterMAn>derKommandozeilegibtesdieMglichkeit,1zweiOptionenzusetzen,1diedasallgemeineV*erhalten vonsRealTimeBattlekontrollieren.1yHierkqannstdudieOptions-Dateiwhlen,diedieStandardwerteder5(Optionen)Bfestlegt.KMankqannauchauswhlen,inwelchemSpielmoGdusdasProgrammlaufenwird:9Debug-,Normal-U oGderCompetition-Modus.`EffG͍?Programmaufruf:RealTimeBattle[Optionen]?Optionen:--debug_mode,S-dDebug-Modus--debug_level?[0-5],/= -DSetztdenanfnglichenDebug-Level.Impliziert-d--normal_mode,N-nNormal-Modus?(standard)--competition_mode,4|-cCompetition-Modus--no_graphics,N-ges?werdenkeineGrafikenangezeigt--option_file?[file],)`-owhltdieOptions-Datei(standard:$HOME/.rtbrc)--log_file?[file],9d-lerzeugeeineLog-Datei;swenn?alsDatei'-'angegebenwird,swird?nachstdoutgeloggt.--tournament_file?[file],-tAngabeeinerTurnier-Dateiumsautomatisch?einTurnierzustarten.--statistics_file?[file],-sDateiindieStatistikensgeschrieben?werden,wennsautomatisch?gestartetwird.--message_file?[file],$-mNachrichtenindieDateis"file"?umleiten.'-'entsprichtsstdout.?WenndieLogsunddiesNachrichten?nachSTDOUTumgeleitetswerden,?wird'-m'ignoriert.--replay?[file]I{h-rEinLogfiledasabgespieltswerden?soll.Wenn'-'alsDateisangegeben?wird,wirdvonSTDINsgelesen.--help,sx-hzeigt?dieseInformationen--version,c-vgibt?dieVersionsnummeraus--port_numberS-plegt?denPortfest,andenenexterneClientssichsverbinden?knnen(Standard:32134){ffG獹DieCpGort_numberCOptionistnurdannverfgbar,wennRealTimeBattlemitderenable-networkOptioncompiliertbwurde(sieheDateiINSTALL).DieUnterschiedebzwischendendreiComepGetition-ModisindinfolgenderU T*abGellezusammengefasst."2.2Kontroll-FensterNewtournamen>t:-_2 ~?G2.8Bedien>ungdesProgramms8Q7Ձ@ճ8BIffQ- qͤ ffΟ^MoGdus ff]DebugaNormalxuCompGetition͟ ffffQ-ͤ ffΟ^DebugU Kommandoverfgbar5 ffJaNein%ENein ff ͤ ffΟ^PauseU whrenddesSpielsD%Y ffJa$uJa%ENein ffͤ ffΟ^ProgrammU schrittweiseausfhrbar'ɡ ffJaNein%ENein ffͤ ffΟ^CPU-ZeitU derRobGoteristunbeschrnkt͡ ffJa$uJa%ENein ffffQ-펎EinneuesT*urnierwirdgestartet.DieSektion2.3(NeuesTurnier-Fensternen)gibtmehrInforma- tionenU darbGer.Repla>ytournament:2.13(EinSpielablaufenlassen).BDuwirstdas2.12(Logle)desSpielsauswhlenmssendasdustudierenU willst.P>ause:HltU dasSpielan.qIm2.1(CompGetition-Modus)U wirderstamEndedesaktuellenSpielsangehalten.End:BeendetU dasaktuelleT*urnier.Options:netU das2.8(Options-F*enster).Statistics:ZeigtU das2.9(Statistik-F*enster)an.Sho>warenawindow:DieseBoxkqanndazubGenutztwerdendiedreiF*enster,~diewhrendeineslaufendenSpieleszusehen sind,zuversteckenoGderanzuzeigen,nmlich:7Gdas2.5(Arena-F*enster),das2.6(Score-Fenster)unddas2.7U (Nachrichten-F*enster).Quit:BeendetU dasProgramm.ؼIm02.1(Debug-MoGdus)stehenweitereMglichkeitenzurV*erfgung.'Siedienendazu, bGeimdebuggenvonRobGoternԧzuhelfen.Esistmglich,laufendeProzesse(undsomitRoboter)zudebuggen.W*ennmangdbbGenutzt,U mussmanfolgendermaenstarten:qgdb?RoboternameProzessnummer.Step:Ineinem2.2(angehaltenen)SpielwirddieserButtondasSpielumeineZeiteinheitvoranschreitenlassen.;[Diesiistsehrntzlich,;wennimaneinenRobGoterimDebuggeramLaufenhat,daderRobGotersonstU mitNachrichtenU bGerutetwerdenwrde.Endgame:DasU aktuelleSpielwirdbGeendet.qDashatdenselbenEektwieihnein5.5(Timeout)habenwrde.Killmark>edrobQot:ImV Debug-MoGduskqannmaneinenRoboterim2.6(Score-F*enster)markieren.t~DieserRoboterwird sterbGen,U wennmandiesenButtondrckt._2 ~?G2.8Bedien>ungdesProgramms8Q8ՁVDebuglev>el:DenBDebug-LevelzundernisteineMglichkeit,~\denRobGoternmitzuteilen,welcheBNachrichtensie sendensollen.:DieserW*ertliegtzwischen0und5,wobGei0bedeutet,dassberhauptnichtdebuggtwird,U und5istderhGchsteDebug-Level,d.h.qalleDebug-Nachrichtensollengesendetwerden.ؼBeimAbspieleneinerLogdatei(nichtvonSTDOUT)|gibteseineMengeMglichkeitendieWiedergabGezusteuern.qSieheU dazuauchdasKapitelbGer2.13(Replaying).#Í2.3NeuesTurnier-FensternenMUmZRobGoterundArenasfreinneuesT*urnierauszusuchen,;musstZdudieDateienaufderrechtenZSeitemarkierenGunddenadd-Knopfdrcken. DieGausgesuchtenDateienwerdenlinksangezeigt. SieknnenentsprechendU auchwiederentferntwerden.ؼEin3.11(T*urnier)bGestehtauseinerbestimmtenZahlvon3.10(Sequenzen)von3.9(Spielen).JInjederSequenzspielendiegleichenRobGoterinallenSpielen.X HierwhltmandieAnzahlderSpieleundSequenzen,undauchdieAnzahlderRobGoterinjederSequenz.xW*ennduvorhast,>jedesSpielmitallenRobGoternzuspielen,istEesratsam,nureineSequenzzuwhlenundstattdessendieAnzahlderSpielezuerhhen.DerGrund]dafrist,eszuvermeidenalleRobGoter-Prozesseneuzustarten,dadieseineW*eiledauernkqann,bGesondersU wennvieleRobotergegeneinanderantreten.Es:`istauchmglicheineT*urnier-DateizuladenoGderdasaktuelleTurnierzuspGeichern.hDasletztegespielteT*urnierU istin/tmp/rtb/tmp.tourgespGeichertundwirdimmerangezeigtwenndiesesF*enstergenetwird.W*enndieDateinichtexistiertwirdeinleeresTurnierangezeigt.DDumusstmindestenszweiRobGoterundeineU Arenaauswhlenumstartenzuknnen.#Í2.4Rob_oter-undArena-VerzeichnisseMDamitdasProgrammdieRobGoterunddieArenasndet,ImussmanzweiOptionensetzen:':den5.7(RobGoter-Suchpfad)kundden5.7(Arena-Suchpfad).\DieUnterverzeichnisseRobotsundArenasimInstallationsverze-ichnisN(Standard-W*ert:N/usr/local/games/RealTimeBattle),EdasvordemKompilierenimHaupt-Makelefestgelegt 8wird,*werdenaufjedenF*alldurchsucht._W*ennmaneinneuesVerzeichniserzeugt,*oGderwennmanRealTimeBattleU ineinanderesV*erzeichnisinstallierthat,mussmandieseOptionensetzen.2.5Arena-FensterMHierhndetdasGemetzelstatt.3CW*enndudasSpieldetaillierterbGetrachtenhwillst,kqannstdudieZoom-KnpfebGenutzenoder+,s-oder0drcken.TxDieRobGoterwerdenalsfarbigeKreisemiteinerSpitzeindemKreis,sdiedieRadar-Richtunganzeigt,diedickeLinieistdieKanoneunddiednneLiniezeigtinBewegungs-Richtung.2.6Score-FensterMInU diesemF*ensterwerdenalleRobGoteraufgelistet,dieinderaktuellenSequenz"mitspielen".2.7Nachrichten-FensterHier CwerdenNachrichtenangezeigt,S diedieRobGotermittels4.5(PrintundDebug)senden.Dieneuesten Nachrichtenb&erscheinenganzobGen.DukqannstdasF*ensterleerenundauswhlennurdieneuenNachrichtenvonU einembGestimmtenRobGoterzusehen. M_2 ~?G2.8Bedien>ungdesProgramms8Q9ՁV2.8Options-FensterMHierJkqannstdueineganzeReihevonOptionenndern.jIm5(Optionen-Kapitel)kannstdudetaillierte InformationenzujederOptionerhalten.TDienderungenwerdenerstwirksam,wennentwederderapply-oGderU derOK-Knopfgedrcktwerden.ؼMan>UkqannseineOptionenauchineineDateisichern:fSave?optionswirddieOptionenineineDateideinerW*ahlU spGeichernundSave?asdefaultU wirdsieindieDatei.rtbrcindeinemHomeverzeichnissichern.DerU Default-ButtonwirdalleOptionenaufihreStandardwertezurcksetzen.#Í2.9Statistik-FensterMManU kqannsichdieStatistikendesaktuellenT*urniersaufverschiedeneArtenanzeigenlassen:ؼStatistikenU bGereinzelneRobQoter,dieU ErgebnisseeinesSpieles(game),dieU GesamtergebnissederSequenz(sequencetotal)oGderdieU Gesamtergebnisse(total)desT*urniers.MitܓdenPfeiltastenkqannmanzumerstenElement,peineszurck,peinesvorwrtsoGderzumletzenElement gelangen.3DerBalkeninderMitteisteinIndikqatordafr,wasgeradeangezeigtwird;W*ennmanaufdenBalkenPdrckt,2werdendieStatistikenerneuert,2vorausgesetztdasSpielluftgerade.W*enndugtk+1.1.xverwendestistesauchmglich,dieeinzelnenSpaltenzusortieren,indemmaninsentsprechendeTitel-KstchenU klickt.#Í2.10%}SpielohneGrakenMW*ennHKmanwill,kqannmanRealTimeBattleauchganzohneGrakenlaufenlassen.KDieskqannbGesondersntzlichsein, .wennmaneinelangeReihevonT*estsoGdereinenWettbGewerbdurchfhrt.ManhatzweiMglichkeitenJdieseOptionzubGenutzen:%EntwederJmanverwendetJdieOption-gbeimProgrammstart,ۨodermanDFschaltetdieGrakenschonbGeimKompilierenab(dieDateiINSTALLDAgibtdazunhereInformationen).Die|nletzeAlternativeistbGesondersntzlich,AdadieausfhrbareDateikleinerwirdunddaheraufRechnernmitwenigerArbGeitsspeicherschnellerluft.P*Dasermglichtesauch,RealTimeBattleaufRechnernlaufenzulassen,U aufdenenkeingtk+installiertist.ؼW*enngmanohneGrakenarbGeitet,'mussmaneinT*urnier-leangebGen,'andernfallswirdnichtspassieren.^EsistauchzuempfehleneineLog-Dateiund/oGderStatistik-Dateizuerzeugen,vwennmandieErgebnissewissenwillU :-)2.11%}Turnier-DateienMDieT*urnier-Dateiwirdals2.1(Kommandozeilenparameter)angegebGen.WenndieseDateiverwendetwird,wird qdasT*urnierautomatischanfangenundbGeendetwerden.rWiemandieStatistikenspGeichertstehtimKapitelU 2.14(Statistik-Datei).ؼEineNT*urnier-DateibGestehtaus5Schlsselwrtern.7:AlledieseSchlsselwrterknnenmehrmalsbGenutztwer-den,abGer manmusssichdessenbGewusstsein,dassnurdasletzteSchlsselwort,daseineZahlalsParameterannimmt,U gezhltwird.qAlleSchlsselwrtersolltenmiteinemStrichpunktbGeendetwerden. g_2 ~?G2.8Bedien>ungdesProgramms310ՁVGames/SequenceoQderg/s:Als.ParametermussmanentwedereineZahloGderein*angeben.\/DieZahllegtfestwievieleSpielepro T*urniergespieltwerdensollen.DasSternchenbGedeutet,ldassdasProgrammdiegenaueAnzahlvonArenasU hernimmtunddieseZahlalsParameterverwendet.qDervoreingestellteW*ertist1.RobQots/Sequenceoderr/s:Als[ParametermussmanentwedereineZahloGderein*angeben.DieZahllegtfestwievieleRoboterinٺjederSequenzantreten.NDasSternchenbGedeutet,dassdasProgrammdieAnzahlderRoboteralsParameterU nimmt.qDerDefault-W*ertisthier2.SequencesoQderseq:AlsEParametermussmanentwedereineZahloGderein*angeben.DieZahllegtdieAnzahlderSequenzendieimT*urniergespieltwerdensollenfest.WennmaneinSternchenangibt, errechnetdasProgrammausderAnzahlderRobGoterundderAnzahlderRoboterproSequenzeineZahl,4sodaalleRobotergenau1einmalgegeneinanderantreten.eDieseerrechneteZahlwirddannalsParameterverwendet.eDerDefault-W*ertU ist1.RobQotsoderr:AlsU ParameterwirdeineoGdermehrereRoboter-Datei(en)angegeben.ArenasoQdera:EineU oGdermehrereArena-DateienwerdenalsParameterbGergeben.ؼDatei-ArgumenteU knnenwiefolgtaussehen:ؼNurdieDateiselbQer:HierU wirdderPfadnachderDateidurchsucht.Beispiel:qRobot: Xempty.robotDerv>ollePfadzurDatei+derDateiname:DieU angegebGeneDateiwirdverwendet.Beispiel:qArena: X/usr/local/Games/RealTimeBattle/Arenas/Circle.arenaAlleDateienimPfad:DieseU AngabGedurchsuchtU denganzenPfadundverwendetU allegefundenenDateien.Beispiel:qArena: X*EinbQestimm>tesV erzeichnis:EsU wirddasangegebGeneV*erzeichnisdurchsuchtundallegefundenenDateienwerdenverwendet.Beispiel:qRobot: X/usr/local/Games/RealTimeBattle/Robots/*ؼEs gistmglichDateienmehralseinmalindieT*urnier-DateizuschreibGen.TW*ennduz.B.drei rotate_and_fire.robotshabGenwillst,Ɖtrageeinfachdreimalrotate_and_fire.robotindieT*urnier-Dateiein.qDiesU giltgenausofr*.ؼBeispielU T*urnier-Datei:R:?*Arenas: XCircle.arenaSquare.arenaG/S:2r/s:3Sequences:* Š_2 ~?G2.8Bedien>ungdesProgramms311ՁV2.12%}Log-DateienMManchmaldistesganzntzlich,FeinSpieldetailliertzuanalysieren(2.13(Replay)),FoGdereseinfachnur aufzuhebGen,{1weil@amanessptervielleichtnoGchbrauchenknnte.3BHierfrsindLog-Dateiensinnvoll.3BGib-llalsKommandozeilenparameteran,r~wennduRealTimeBattlestartest,r~unddahinterdenDateinamenderLog-Datei,U umdiesesF*eaturezuaktivieren.qWenndualsDatei'-'angibst,wirdnachstdoutgeloggt.ؼDieqLog-Dateiistwiefolgtaufgebaut:JedeZeilebGestehtauseinemBuchstabGen,xderdenTypderInforma-tionangibt,ߧgefolgtvoneinerListevonArgumentendiedurch'Whitespaces'getrenntsind.DiefolgendenInformationenU werdenangegebGen:ؼHeader:HU [Spiele/Sequenz][RobGoter/Sequenz][Sequenzen][Roboter]ArenaInfo:AU [ZeileausderArenaDatei]Spielstart:GU [Sequenznummer][Spielnummer]Option:OU [Option:W*ert]Listev>onRobQotereigenschaften:LU [RobGoter-ID][Roboterfarbe][Robotername]RobQoterP>ositions-Info:RU [RobGoter-ID][x][y][Kanonen-Winkel][Radar-Winkel][Energie]Zeit:TU [verstricheneZeit]Nac>hrichtausgebQen:PU [RobGoter-ID][Nachricht]CoQokie:CU [CoGokie-ID][x][y]Mine:MU [Minen-ID][x][y]Sc>hu:SU [Schu-ID][x][y][dx/dt][dy/dt]T oQd:DU [TypdesgekilltenOb0jekts][Object-ID][W*enn'seinRobGoterwar:qerhaltenePunkte][Position] _2 ~?G3.8AufbaudesProgrammsB12ՁV2.13%}ReplayingMDukqannsteinaufgenommenesSpielmitHilfeseiner2.12(Log-Datei)abspielenlassen,Ȱundzwarentweder ausgdem2.2(Kontroll-F*enster)gheraus,EyoGderindemdudie2.1(Kommandozeilenoption)"-r"verwendest.Beachte}pabGer,DŽdassdu,wennduStandard-InputalsLog-Dateiverwendest(2.1(Kommandozeilenoption)"-r?-"),nichtvielmehrmachenkqannstalsdasSpielanzusehen.NormalerweisekqannmandenAblaufdesSpielsU folgendermaenbGeinussen:ؼDer7Scroll-BalkenganzobGenzeigtan,}wieweitdasaktuelleSpielschonabgelaufenist.4MankqannaneinenbGeliebigenZeitpunktspringen,indemmanandemScrollbalkenziehtundihnrichtigpGositioniert.F*astfForwardundRewindfunktionierenso,jPwiemanesvonCD-SpielernundVideo-Gertengewohntist.qDieU Geschwindigkeitkqannmittels5.7(F*astForwardFactor)gendertwerden.StepzforwardundstepbackwardknnendazuverwendetwerdenzustudierenwasimDetailpassiert.ZuerstU solltemandasSpielallerdingsauf2.2(Pause)setzen.MitU denvierButtonsganzuntenkqannmanzwischenSpielenundSequenzenhin-undherwechseln.#Í2.14%}Statistik-DateiMDieStatistik-DateiwirdnurbGenutzt,kwenneine2.11(T*urnier-Datei)angegebGenwurde.GDieStatistikenwerdenindieseDateigespGeichert,ȮwenndasT*urnierzuEndeist.MankqanndieStatistikenabGerauchmitdemU save-Knopfim2.9(Statistik-F*enster)manuellspGeichern.(3AufbauG\desProgramms:InxdiesemAbschnittwerdenwirdenAufbaudesProgrammsbGeschreiben,auerdemxdieArt,wiedieRobGotersichbGewegen,NschieenunddenRadarkontrollieren,NwannPunktevergebGenwerden,NundwieeinT*urnieraufgebautU ist.3.1Rob_oterbewegungMDerRobGoterverhltsichwieeinF*ahrzeugmitRdern,errolltmiteinerleichten5.1(Roll-Reibung)nachvornek{undgleitetmiteinerwesentlichhheren5.1(Gleit-Reibung)zurSeite.#DiedritteverlangsamendeKraftistԧder5.1(Luftwiderstand),YderentgegenderBewegungsrichtungdesRobGoterswirkt,YundmitzunehmenderGeschwindigkeit_grerwird.fEsgibtdreiW*ege,bkdieRobGoterbewegung_zubGeinussen:4.5(Beschleunigen),4.5H(Rotieren)und4.5(Bremsen).maDasBeschleunigenerhhtdieGeschwindigkeitdesRobGotersindieRich-tungOindiederRobGoterschaut.oMankqanndieGeschwindigkeitnichtdirektkontrollieren,PBeschleunigenistderU einzigeW*egdenRobGotervomFleckzubGewegen.ؼW*ennmandenRobGoterrotierenlsst,٥mussmanbeachten,٥dassdiesnichtdirektdieRichtungderBewegungbGeinusst,PGsondernOnurdieRichtungdersichderRobGoterzuwendet.o{DieGleit-ReibungwirddieeigentlicheDrehungU desRobGotersbewerkstelligen.BremsenwirddieRoll-ReibungdesRobGotersaufdenMaximalwerterhhen.Daspassiert,CwenndieRderbloGckiertsind,undderRoboterrutschtanstattzurollen.oV*ergissnicht,dieBremsewiederzulsen,wennduU wiederschnellerwerdenwillst. s_2 ~?G3.8AufbaudesProgrammsB13ՁV3.2EnergieMDer/ZustanddesRobGoterswirdanhandseinerEnergiegemessen.REsgibtmehrereMglichkeiten, Energie/zu verlieren.qderU RobGoterkqann:#vonU einemSchussgetroenwerden,SCmitU einemanderenRobGoterodereinerMauerzusammenstoen,inU eineMinerennenoGdereinenU Schussabfeuern.DieU einzigeMethoGde,EnergiezugewinnenisteinenKekszuessen."z3.3DasRadarMDas8einzigeMittel,umInformationenbGerdieUmgebungzubekommenistdasRadar.?JedesMal,wenn derԧRobGoteraktuallisiertwird,Ywirdihmeine4.4(Radar-Nachricht)ԧzugeschickt,dieԧihmInformationenbGerdasnchsteOb0jektinRadar-Richtung,9d.h.EntfernungundTypdesOb0jektsgibt.W*enndasObjekteinRobGoterU ist,wirdauchdieEnergiediesesRobotersbekqanntgegeben.ؼDadieRadar-Informationenallessind,wasderRobGoterberseineUmweltwei,istesextremwichtigdasRadarmglichstgutzunutzen.rAuerdemisteswichtig,EdasRadarrichtigzu4.5(bGewegen),EdamitdasRadarU brauchbareInformationensammelnkqann.3.4DiePositiondesRobtersMSeit|3RealTimeBattleV*ersion1.0.5istesmglich,diePositiondesRobGoterdirekterzubekommen.AnstattdieUUmgebungmitdemRadaranalysierenzumssenunddarausdiePositionzuermitteln,?ckqannmanRealTimeBattleEsokongurieren,Idassesdie4.4(RobGoterKoGordinaten)bermittelt.luDiesesV*erhaltenwirddurchU dieOption5.1(SendrobGotcoordinates)gesteuert.3.5SchieenMSchieenS(istdiebGesteMethodeandereRoboterzueliminieren.pInRealTimeBattlebewegtsichjederSchussmitSkonstanterGeschwindigkeit,S|diesichausderSummederRobGoter-Geschwindigkeitundder5.3(Schuss-Geschwindigkeit)]indieRichtung]indiedieKanonezeigt,_errechnet.DerSchusswirdsolangeweiteriegen,bisU ermitirgendeinemOb0jektkollidiert.ؼW*ennderSchussabgefeuertwird,hatereinebGestimmteEnergie,diedenSchadenbGestimmt,deneingetrof-fenerRobGotererleidenwird.7 DieEnergieistjedochbegrenzt;5die5.3(Mindest-Energie)verbietetSchssemitsehrEgeringerEnergie,>diemanz.B.zumAbschieenvonMinenhtteverwendenknnen.U7Die5.3(Maximal-Energie)wirdvondermomentanenpGotentiellenSchuss-EnergiedesRobGotersbegrenzt,ediemitderZeitzunimmt.SchieenistjedoGchnichtohneRisiko,6dajederabgegebGeneSchussdenRobGotereinegewisse5.3(Energie)kostet,U diepropGortionalzurSchuss-Energieist.W*ennreinKeksoGdereineMinegetroenwerden,Fwerdenrsiezerstrt,unabhngigvonderSchuss-Energie.DaherU solltemanminimalsteSchuss-EnergienU verwenden,wennmanMinenabschiet.Schsse,dielkollidieren,werdenlnichtautomatischvernichtet,sondernihreEnergiewirdgegeneinanderaufgerechnet.W*ennLdieSchsseindiegleicheRichtungiegen,wirdihreEnergieaufaddiert,wennsieinU entgegengesetzteRichtungeniegen,hebGensichihreEnergienauf.Y_2 ~?G3.8AufbaudesProgrammsB14ՁV3.6KollisionenMRobGoterQsindzerbrechlicheQOb0jekte,dievonKollisionenmitMauernoGderanderenRoboternSchadenerleiden. Bei_KollisionenverhaltensichdieRobGoterwieGummiblle:csiespringenzurck.EsgibtdreiF*aktoren,b.dieihrV*erhaltenbGeinussen,kiert:DiesBistdieeinfachsteMethoGde.TW*ennmanvonstdinliest,wirddasProgrambloGckiertbisdienchsteNachricht?ankommt.(DaherkqannmandasProgrammsoschreibGenalswreimmereineNachrichtvorhanden.DerNachteilist,dassmankeineBerechnungendurchfhrenkqannwhrendmanaufneueNachrichtenI~wartet.mUmdieBloGckieren-MethodeI~auszuwhlen,KsendefolgendeRobGoter-Optionsolb}/alddasPr}/ogrammgestartetwurdeO:cout?<<"RobotOption"<DateiMessagetypes.histeineguteQuellefrInformationenbGerdieMessaging-Sprache.aEsisteineC/C++Include-Datei,kqannabGerleichtfrdieBenutzungmitanderenProgrammiersprachenumgeschriebGenwerden.p^DortndetmaneineAuistungvonNachrichten,RW*arning-TypGen,Ob0jekten,Spiel-OptionenundRobGoter-Optionen.4.3SchummelnMDaderKampfderRobGoterinEchtzeitundmitrichtigenProzessenstattndet,ZOgibtesmglicherweiseMethoGdenRoboterzuschreiben,JdieaufdieeineoderandereArtschummeln,Jz.B.indemsieandereRobGoteroGder{sogarRealTimeBattleselberuntersuchen,um{mehrInformationenzuerhalten,sehrvieleRessourcenaufbrauchen damitandereRobGoterwenigerhabGen,etc.MDasistnatrlichnichtdiefeine,englischeArt,einenGegnerU zuschlagen,daherversuchenwirdassogutwiemglichzuverhindern.ؼIm2.1(CompGetition-Modus)istdieCPU-ZeitderRobGoterbeschrnkt,t)]*Dies)istdieallerersteNachricht)diederRobGoterbekommenwird. W*enndasArgumenteinsist,]ist esdieersteSequenzimT*urnierundderRobGotersollte4.5(seinenNamenundseineFarbGe)anddenServerU senden,ansonstensollteeraufY*ourName-undYourColor-NachrichtenU warten.AY ourName[Name(string)]DerÈmomentaneNamedesRobGoters;mansollteihnnurndern,!wennmansehrguteGrndedafrhat.AY ourColour[FarbQe(hex)]DieZ^momentaneF*arbGedesRoboters;\wennsieeinemnichtgefllt,[kqannmansiendern.:AlleRobGoterinU einemT*eamhabGendieselbeF*arbe.AGameOption[Optionsn>ummer(int)][v\|alue(double)]AmltAnfangjedesSpieleswerdendemRobGotereinigeEinstellungenmitgeteilt,diedemRoboterntzlichseinknnen.FreinekompletteListesolltemansichdasgame_option_typeenuminderDatei4.2(MessagetypGes.h)sTanschauen.Im5(Optionen-Kapitel)gibt'smehrInformationenzudeneinzelnenOptionen.fDer42.2(Debug-Level)wirdauchalsSpiel-OptiongesendetobwohlesnichtinderOptions-ListeU ist.AGameStartsDieseU NachrichtwirdgesendetwenndasSpielanfngt(werhttedasgedacht?).Radar[En>tfernung(double)][TypdesbQeobachtetenObjekts(int)][Radar-Winkel(double)]DieseNachrichtgibtjedeRundeRadar-Informationen.RDerRadar-WinkelwirdrelativzurV*orderseite desU RobGotersangegeben,undzwarimBogenma.Info[Zeit(double)][Gesc>hwindigkeit(double)][Kanonen-Wink>el(double)]DieInfo-NachrichtwirdimmernachderRadar-Nachrichtgesendet.SiegibtmehrallgemeineInfor- mationenel(double)][T eam-Mitglied? (int)]W*ennFdeinRobGotereinenanderenRobotermittelsdesRadarsentdeckt,kwirdFdieseNachrichtFandeinenRobGotergesendet.SiegibtverschiedeneInformationenberdenfeindlichenRoboter.DieEnergiẽdesanderenRobGoterswirdaufdiegleicheArtundW*eiseangegeben,[wiedieEnergiedeineseigenendRobGoters(sieheunten).LDerzweiteParameteristnurimT*eam-MoGdeinteressant,1heisstT*eam-Mitglied,U 0stehtfreinenGegner.ARotationReac>hed[W ashatseineRotationbQeendet?(int)]W*ennRdieRobGoter-Option4.5(SEND_ROTATION_REACHED)RrichtigRgesetztist,3wirddieseNachrichtbgesendet,f@wenneineRotation(mitRotateT*ooGderRotateAmount)bGeendetwurde,f@oderdieRichtungLsichgenderthat(bGeim'sweeping').DerParameterentsprichtdem'wassollichrotieren',z.B.U bGei4.5(Rotate).@_2 ~?G4.8RobQoter-Programmierung7p18ՁVEnergy[Energie-Lev>el(double)]AmCEndejederRundewirdderRobGoterseineneigenenEnergie-Levelerfahren.Erwirdjedochnicht dieU exakteEnergiegesagtbGekommen,sondernnureinender5.2(Energie-Level).RobQotsLeft[AnzahlderRoboter(in>t)]Am!AnfangdesSpiels,undwenneinRobGotergettetwird,wirddieAnzahlderverbleibGendenRoboterallenU noGchlebendenRoboternbekqanntgegeben.Collision[Objekt-T>ypmitdemderRobQoterzusammengestossenist(int)][anglerelativerobQot(double)]W*enn einRobGotervonetwasgetroenwird,oGderselberetwas rammt,bekommt erdieseNachricht.XInderU Datei4.2(MessagetypGes.h)ndestdueineListeallerOb0jekt-TypGen.W arning[Warn>ungs-Typ(int)][Nachricht(string)]EineW*arnungs-NachrichtwirddanngesendetwenneinProblemaufgetauchtist.]Momentanknnen7verschiedeneU W*arnungs-Nachrichtengesendetwerden,nmlich:UNKNOWN_MESSAGE:U DerServerhateineNachrichterhalten,mitderernichtsanfangenkqann.PROCESS_TIME_LOW: DieCPU-Lasthatden5.5(CPU W*arnungs-Prozentsatz) erreicht.YTaucht nurim2.1U (CompGetition-Modus)auf.MESSAGE_SENT_IN_ILLEGAL_STATE:0DieerhalteneNachricht0konnteindiesemSpielstadiumnichtver-arbGeitetU werden.qZ.B.wenn4.5(Rotate)vordemAnfangdesSpielsgesendetwurde.UNKNOWN_OPTION:DerRobGoterhateine4.5(robotoption)gesendet,:dieentwedereinenunzulssigenOptionsnamenU oGderOptions-Parameterenthielt.OBSOLETE_KEYWORD:kDasSchlsselwortkistveraltet,q>undsolltenichtmehrverwendetwerden.LiesdieDateiU ChangeLogumherauszundenwasstattdessenbGenutztwerdensollte.NAME_NOT_GIVEN:DerRobGoterhatseinenNamennichtvorSpielbGeginngesendet.DaspassiertwenndieU 5.5(robGotstartuptime)zukurzistoderderRoboterseinenNamennichtU frhgenugsendet.COLOUR_NOT_GIVEN:U DerRobGoterhatseineF*arbenichtU vorSpielbGeginngesendet.DeadDerRRobGoteristgestorben.pV*ersuchenicht,S&weitereNachrichtenandenServerzusendenbisdasSpielzuU endeist.qDerServerwirdsienichtlesen.GameFinishesDasU aktuelleSpielistbGeendet,machedichbGereitfrdasnchste.ExitRobQotV*erlasseU *sofort*dasProgramm,oGderduwirstmitGewaltrausgeschmissen!#Í4.5NachrichtenvonRob_oternMNachrichtenvoneinemRobGoteranRealTimeBattledrfennichtlngerals128Zeichensein.Anderenfalls wirdERealTimeBattledieNachrichtEinzweiT*eileschneidenundmglicherweiseeine"UnbGekqannteNachricht"melden.ؼWhenAwyousendmessagestoRealTimeBattlemakeshurethattheyarenotlongerthan128chars,EfotherwiseRealTimeBattleU willcutthemintwoU partsandmayrepGortanunknownmessage.%z_2 ~?G4.8RobQoter-Programmierung7p19ՁVRobQotOption[Optionsn>ummer(int)][W ert(int)]H;MomentanU sindnurzweiOptionenverfgbar:SIGNAL:{T*eiltdemServermit,ersolleinSignalsenden,wennNachrichteneintreen.DerParameter wirdangebGen,welchesSignal.ZSendedieseNachricht(z.B.mitParameterSIGUSR1),sobalddubGereitbistU Signalezuempfangen.qDerStandardwertist0,d.h.derServersollkeineSignalesenden.H;SEND_SIGNAL:SagtdemServerersollSIGUSR1senden,1wenneineNachrichteintrit.SendedieseNachricht(mitParameter1(=true))sobalddubGereitbisteinSignalzuempfangen.GeDerStandardwertistU false.SEND_ROTATION_REACHED:йW*ennduwillstdasderServereine4.4(RotationReached)Nachrichtsendet,wenneineRotationbGeendetwurde,*PsolltestdudieseOptionsetzen._Mit1alsW*ertwirddieNachrichtgesendet,BwenneinRotateT*ooGdereinRotateAmountfertigist,Bmit2alsW*ertwerdenauchV*ern-derungenJinderSweep-RichtungJgemeldet.IStandardwertist0,Td.h.IeswerdenkeineNachrichtengesendet.USE_NON_BLOCKING:Bestimmtwie4.1(Nachrichtengelesenwerden).6ZDieseOptionsolltegenaueinmalgesendetwerden,+sobalddasProgrammgestartetwird.LDadieOptionimmerangegebGenwerdensollte,gibtU eskeinenDefault-W*ert.bName[Name(string)]W*ennrmandie4.4(Initialize)-Nachrichtrmit1alsArgumenterhlt,dieanzeigtdassdiesdieer-ste+Sequenzist,wsolltederRobGoterseinenNamenundseineF*arbesenden. ImNamenkqanndieT*eamzugehrigkeitmitgeteiltwerden.|LautetderNamefoo?Team: Xbar,/)soheitderRobGoterfooundn spieltimT*eambar.DTeammitgliederbGekommendieselbeF*arbeunderkennensichalsF*reundbGeider9RobGotInfoNachricht.Ausgefeilteren9T*eam-SupportbietetdasR}/ealTimeBattleT;eamF;rameWorkhttp://rtb-team.sf.netU .bColour[homecolour(hex)][a>waycolour(hex)]SiehesobGen.wxDieF*arbensindwienormaleF*uballtrikots.wxDie"homecolour"wirdverwendetfallssienichtschonvergebGenist.{Anderenfallswirddie"awaycolour"oGderalsletztenAuswegeinezuflliggewhlte,U freieF*arbGebenutzt.bRotate[W assollrotieren(in>t)][angularveloQcity(double)]Setzt die"angularveloGcity" frdenRoboter,dieKanoneunddenRadar.ZSetze'W*assollrotieren'auf1qfrdenRobGoter,#2frdieKanone,4frdenRadar,oGderzueinerSummedieserW*erte,ummehrereOb0jekteqgleichzeitigzurotieren.DDie"angularveloGcity"wirdin"Radians"proSekundeangegebGenundwirdU von5.2(RobGot(cannon/radar)maxrotatespeed)begrenzt.bRotateT o[Wassollrotieren(in>t)][angularveloQcity(double)][End-Winkel(double)]Genau&wieRotate,Z>allerdingswirdnurumeinenbGestimmtenWinkelrotiert..BeachtedassRadar-undhKanonen-WinkelrelativzumRobGoter-WinkelangegebGenwerden.XDiesesKommandokqannnichtdazuU bGenutztwerdendenRobGoterselberrotierenzulassen,benutzeRotateAmoun>tdafr.bRotateAmoun>t[W assollrotieren(int)][angularveloQcity(double)][Winkel(double)]F*unktioniertU wieRotate,wirdabGerrelativzummomentanenWinkelrotieren.Sw>eep[whattorotate(int)][angularveloQcity(double)][rightangle(double)][leftangle(double)] F*unktioniertwieRotate,$setztabGerdenRadarund/oderdieKanoneineinen"SweepMode"(nichtmglichU frdenRobGoterselber).bA>ccelerate[W ert(double)]SetztU dieRobGoter-Beschleunigung.qDerW*ertistdurch5.2(RobGotmax/minacceleration)beschrnkt.3s_2 ~?G5.8Optionend&20ՁVBrak>e[pQortion(double)]yDientgzumBremsen.mV*ollbremsung(pGortion=1.0)heisstdassdieReibunginRoboter-Richtungggleich derU 5.1(Gleit-Reibung)ist.ݍShoQot[Sc>huss-Energie(double)]SchussU mitderangegebGenenEnergie.qDie5.3(Schuss-Optionen)U gebendazumehrInformationen.Prin>t[Nachricht(string)]ZeigtU dieNachrichtU im2.7(Message-F*enster)an.Debug[message(string)]ZeigtU dieNachrichtU im2.7(Message-F*enster)an,wennmansichim2.1(Debug-MoGdus)bendet.DebugLine[Wink>el1(double)][Radius1(double)][Winkel2(double)][Radius2(double)]ZeichneteineLiniedirektindieArena.MVDiesistnurimhGchstenDebug-Level(5)erlaubt; Istdiesnicht der%UF*allwirdeine4.4(Warnungs-Nachricht)%Ugesendet.aDieParametersinddieStart-undEnd-PunktederU Linie,angegebGeninPolarkoordinatenU relativzumRoboter.DebugCircle[Mittelpunkts-Wink>el(double)][Mittelpunkts-Radius(double)][Kreisradius(double)]yhnlichwieDebugLine, ?zeichnetabGereinenKreis.RMDieerstenzweiParametersindWinkelundRadiusdesU KreismittelpunktesrelativzumRobGoter.qDerdritteParametergibtdenRadiusdesKreisesan.(5Optionen:RealTimeBattle(kqanndurcheineganzeReihevonOptionenkonguriertwerden,1~dieinverschiedenenGrup-pGenzusammengefasstsind.HDiePhilosophiedahinterist,IdirgrtmglicheF*reiheitzugebGen,IdasSpielsozugestaltenwiedueswillst.^DasheisstabGerauch,(.dassbestimmteKombinationenderOptionenzuschlechtenErgebnissenU fhrenknnen,unddemProgrammSchwierigkeitenmachenknnten."l5.1Umwelt-OptionenUgGra>vitationalConstant:DieBeschleunigung,dievonderGravitationherrhrt.JAufderErdeistdieseKonstanteungefhr9.81.EineU ErhhungwirdzueinererhhtenReibungfhrenunddieRobGoterlangsamermachen.ݍAirResistance:RichtigU geraten.qDerLuftwiderstandnimmtmitderGeschwindigkeitzu.RollF riction:DieU ReibunginRichtungU desRobGoters,wennernichtbremst(Rollreibung).SlideF riction:DieReibungorthogonalzurRichtungdesRobGoters.tIstgleichzeitigdiemaximaleReibung,wennder RobGoterU bremst(Gleitreibung).SendrobQotcoordinates:LegtU festwieKoGordinatenzudenRoboterngesendetwerde.qF*olgendeOptionensindverfgbar:%/0U -keinKoGordinatensenden(standart)ݍ%/1U -sendetdieKoGordinatenrelativzurStartposition%/2U -sendetabsoluteKoGordinatenE/_2 ~?G5.8Optionend&21ՁV5.2Rob_oterOptionenMRobQotmaxacceleration:RobGoterU drfennichtU mehrbeschleunigen,alsdieserW*ertangibt,und...P*RobQotminacceleration:...nichtU wenigeralsdieserW*ert.RobQotradius:GibtU dieGredesRobGotersan.RobQotmass:RobGotergewicht.qEinU grossesRobotergewichtU erhhtdieAuswirkungeneinesZusammenpralls.RobQotbouncecoecien>t:GibtanwiegutderRobGoterabprallenkqann.EW*enndieserWert0ist,werdendieRobGoter'aufeinan- derklatschen',wennsiekollidieren,.wennderW*ert1,.istwerdensiesichwiepGerfekteBilliardblleverhalten.RobQothardnesscoecien>t:GibtAanwievielSchadendieRobGotererleiden,Erwennsiekollidieren.jJekleinerderW*ert,ErdestoweicherdasU Material.RobQotprotectioncoecien>t:Bestimmt,EwwieAgutderRobGotergeschtztist.jDieserF*aktorwirdmitderEnergiedesSchadensmulti-pliziert,U undmanerhltdenW*ert,umdenmandieRobGoterenergieverringernmuss.RobQotfron>tsize:DieUV*orderseitedesRobGotersisteinGebietausverschiedenenUMaterialien,"normalerweisehrterundschtzender,U soGdassRobotersichgegenseitigSchadenknnenindemsiesichrammen.RobQotfron>tbouncecoecien>t:SieheU vorherige4Erklrungen.RobQotfron>thardnesscoecien>t:SieheU vorherige5Erklrungen.RobQotfron>tprotectioncoecien>t:SieheU vorherige6Erklrungen.RobQotstartenergy:DieU MengeanEnergie,diederRobGoteramAnfangjedenSpieleshabenwird.RobQotmaxenergy:DurchZaufnehmeneinesKekseskqannderRobGoterseineEnergieerhhen,\ allerdingsnichtmehralsauf diesenU W*ert.RobQotmaxrotatespeed:WieU schnellderRobGoterrotierendarf.qEinheit:'radians'/s.RobQotcannonmaxrotatespeed:MaximaleUfGeschwindigkeit,UxmitderdieKanonerotierendarf.rSAllerdingsrotierendieKanoneundder RadarU relativzumRobGoter,sodassdieeigentlicheU Rotationsgeschwindigkeithherseinkqann.Q_2 ~?G5.8Optionend&22ՁVRobQotradarmaxrotatespeed:MaximaleU Radar-Rotationsigeschwindigkeit.qSieheauchobigeBemerkung.RobQotenergylev>els:DerjRobGoterwirdseineEnergienurungefhrwissen.#QDieseOptionentscheidetwievieleunterschiedliche Energie-StufenU esimSpielgibt.#Í5.3Schu-Optionen#Shotradius:GreU derSchsse.qSollteU kleinerseinalsder5.2(RobGoterRadius).ShotspQeed:SchssebGewegensichmitdieserGeschwindigkeitindieRichtungderKanoneplusderGeschwindigkeit desU RobGoters.ShoQotingpenalt>y:W*ennyderRobGoterschiesst,nimmtyerdabeiselberSchaden.qDiesistderF*aktor,mitdemdieSchu- Energietialenergy:DielRobGoterhabeneineSchuss-Energie,dielmitderZeitzunimmt,diesenW*ertabGernichtlberschreitet.ShotpQoten>tialenergyincreasespeed:Gibtan,wieschnelldieSchuss-EnergiedesRobGoters(sieheoben)zunimmt.0UEinheit:Energie/Sekunde.#Í5.4Extra-Optionen#CoQokiemaxenergy:DieEnergie,diemanvoneinemKeksbGekommtisteinzuflligerW*ertzwischenCookie?maxenergy undU Cookie?minenergy.CoQokieminenergy:SieheU obGen.CoQokiefrequency:DieU ZahlderKekseproSekunde,diedurchschnittlichU auftauchenwerden.CoQokieradius:GreU derKekse.Minemaxenergy:DieU Minen-EnergieisteinZufallswertzwischenMine?maxenergyU undMine?minenergy\A_2 ~?G5.8Optionend&23ՁVMineminenergy:_SieheU obGen.Minefrequency:DieU AnzahlderMinenproSekunde,diedurschnittlichU aufdemSpielfelderscheinenwerden.Mineradius:GreU derMinen.CoQokiecolour:F*arbGeU derKekseinhexadezimalerSchreibweise,U angegebeninrot-gruen-blauW*erten.Minecolour:sieheU obGen."#5.5ZeitOptionenMTimeout:DiesX*istdiemaximaleDauereinesSpiels.zW*enndieZeitabgelaufenist,werdenalleverbleibGenden RobGoterU gekillt,ohnenochirgendwelchePunktezubGekommen.Maxtimestep:W*ennxderComputerzeitweisexsehrlangsamwird,fkqanndieZeitzwischenupGdatesziemlichlangwerden. IndemRmandieseOptionsetzt,"kqannsichdasProgramminsolchenFllenknstlichverlangsamenunddamitU die"realtimeness"verletzen.Timescale:_Setzt2manTimescalegrsserals1,heisstdas,dassdieSpiel-Uhrschnelleralseine"richtige"Uhrgehenwird.OuDiesenW*ertzuverndernkqannntzlichseinwennmanentwederdenRobGoternmehrZeitgebenwill,U oGderwennman(k)einenschnellenComputerhatundmandasSpielbGeschleunigenwill.UpQdatein>terv\|al:_DiesegIOptiongibtdieZeitzwischenRobGoter-updatesgIan,d.h.wieoftderRobGoter-Zustandvern-dertwird.~Siewirdnichtvonder"TimeScale"-OptionbGeinusst,4undkqannnichtverndertwerden,wenndasProgrammluft.DieGenauigkeitist1/100s(jenachGenauigkeitdesSystemsaufdemRealTimeBattleU luft).RobQotstartuptime:_LegtidieZeitzwischendemausfhrenderRobGoterunddemAnfangderSequenzfest.W*ennRoboterschwarzQarningpQercentage:W*ennP derRobGoterdiesenBetraganCPU-ZeitaufgebrauchtP hat,TbekommtP ereineW*arnungzugeschickt.ProQcessc>heckinterv\|al:ImB2.1(CompGetition-Modus)BentscheidetdieserW*ert,OwieoftdasProgrammdenCPU-Verbrauch bGerprfenU wird.Loggingfrequency:UmUdieGreder2.12(logles)zureduzierenkqannstdudiesenW*ertvergrssern.sbMitdieserOption werdenU 2.12(robGotpositioninfo)nurjedes'n'te5.5(Update-Intervqal)aktualisiert.#Í5.6FenstergrenMHierkqannmandieGrefrverschiedeneF*enstersetzen,̵nmlichdas2.5(Arena-Fenster),̵das2.7(Message-F*enster),JbdasG2.6(Score-Fenster)unddas2.9(Statistik-Fenster).mMankqannauchdiePositionfrdieerstendreiU unddas2.2(Kontroll-F*enster)U angebGen.5.7VerschiedeneOptionenMArenascale:"OverallScale"derArena.LEinW*ertvon2ergibteinedoppGelteSeitenlnge,!d.h.LeineviermalsogroeArena.F astforw>ardfactor:Legt dieGeschwindigkeit festmitderdasSpielmittelsfastforwardoGderrewindabluft(sieheauch2.13U (Replay)).Max. Anzahlv>onRobQotern,diegleichzeitigerlaubtsind:ErlaubtMkgroundcolour:HintergrundfarbGeU und...F oregroundcolour:...V*ordergrundfarbGeU derArena.F arbQederRTB-Nac>hrichten:F*arbGeU desTextesderRTB-Nachrichten.RobQotsearc>hpath:Dies)FisteinedurchDoppGelpunktegetrennteListevonV*erzeichnissendienachRobGoterndurchsucht werden,wennein2.3(neuesT*urnier)anfngt.5DasVerzeichnisRobotsimInstallationsverzeichnis(Standard-W*ert:q/usr/local/games/RealTimeBattle)U wirdimmerdurchsucht.Arenasearc>hpath:hnlichJtwieobGen,LallerdingsfrArena-Dateien,nichtJtfrRobGoter.mDasV*erzeichnisArenasimInstal-lationsverzeichnisU (Standard-W*ert:q/usr/local/games/RealTimeBattle)wirdimmerdurchsucht.q_2 ~?G6.8Arena-K>onstruktionTǹ25ՁV6Arena-Kconstruktion:InWReatTimeBattleistessehreinfach,@eineeigeneArenazuerstellen.yDieSprache,@diedafrverwendet wird1nbGestehtauslediglichelfKommandos,hundesgibtnurviergrundlegendeBauelemente:*Linie,hKreis,'Innenkreis')undBogen.cDiesisthauptschlich)ausGrndenderProgramm-Geschwindigkeit)so,2damanbGeiKreisen]undLiniensehreinfachprfenkqann,_obeseineKollisiongab.Kreiseund'Innenkreise'hinderndieRobGoter daran,ineinenKreishinein-oderauseinemKreisherauszugelangen.X~DieLinieundderBogenhin-dernRobGoterdarananderLngsseite(bzw.andergekrmmtenSeitebeimBogen)hineinzugelangen, allerd-ingsxwirddasandenzweiEndenderLinienichtgeprft.tDahermussmananjedesEndeeinerLinieeinenKreisanhngen,G@umeszueinemsolidenOb0jektzumachen.DieKommandospolygon,G@closed_polygonundU poly_curvesollendieseProzedurvereinfachen,U undergebGenimmereinrichtigesU Ob0jekt.ؼAlleWinkelsindinderV*oreinstellungimBogenma. eDaskqannjedoGchdurchdenBefehlangle_unitdegreesU gendertwerden.MansolltebGeachten,dassR*TB>nichtbGerprftobeineArena-DateieinekorrekteArenaergibt,dasisteinzig"vundalleindeineSache. قAllerdingswirdR*TB!sichbGeschweren,wenndudieRegelnderArena-KonstruktionsspracheU nichtbGeachtest.Arena-Dateiensolltenmit.arenaendenundimArena-V*erzeichnisuntergebrachtwerden,ՌsodassRealTime-BattleU siendenkqann.Diebounce?coefficient-undhardness-Parameter,֦dieanalleMauer-erzeugendenKommandosbGergebenwerden,2legendasMaterialderMauerfest.+BeidessindW*ertezwischen0und1.+HrtereMauernbGeschdigenkollidierendeU RobGotermehr,undeinhhererBounce-KoGezientbrigtsiedazu,bGesserabzuprallen.DusolltestdirauchmaldieArenasdiemitR*TBlmitgeliefertwerdenansehenundvondenBeispielenlernen.#Í6.1ArenaKommandosMEin܇KommandobGestehtausdemKommandonamenunddenParametern,adiedurchWhitespacesgetrenntwerden.qDuU solltestimmersicherstellen,dassdierichtigeAnzahlderParameterbGergebenU wird.InU derKommando-ListewerdendieParameterineckigenKlammernangegebGen.ؼscale[W ert]DieserW*ertmultipliziertmitder5.7(arenascale)ergibtdenSkqalierungsfaktormitdemalleKoGordi-natenPimultipliziertwerden.oDiesesKommandomuss,Q[wennesverwendetwird,Q[dasesteKommandoinderU Dateisein,Standardwertist1.0.angle_unit[unit]SchaltetrzuderausgewhltenWinkel-Einheitum.MglicheEinheitensinddegrees(Gradma)orradiansU (Bogenma).qDieV*oreinstellungverwendetU dasBogenma.bQoundary[links][oben][rec>hts][unten]Diese!BegrenzungenumschliessendasGebiet,TinderRobGoter,KekseundMinenaufgestelltwerden.Ausserdem8legensiedassichtbare8Gebietim2.5(Arena-F*enster)fest.gDiesesKommandowirdunbGed-ingtU bGentigtundnurscaledarfvorherverwendetwerden.inner_circle[Bounce][Hrte][Mittelpunkt_x][Mittelpunkt_y][Radius]RobGoterU sindiminnerendiesesKreisesgefangen.circle[Bounce][Hrte][Mittelpunkt_x][Mittelpunkt_y][Radius]EineU MauerinF*ormeinesKreises.|_2 ~?G6.8Arena-K>onstruktionTǹ26ՁVline[Bounce][Hrte][Dic>ke][Start_x][Start_y][Ende_x][Ende_y]Erzeugt7eineLinie.03SiehindertdenRobGoternurdarananderLngsseitedurchzudringen,edahermssen KreiseU andieEndengesetztwerden.arc[Bounce][Hrte][Dic>ke][Mittelpunkt_x][Mittelpunkt_y][Innenradius][Auenradius][Wink>el1][Winkel2]Ein^BogenisteinKreissegmentzwischenzweiWinkeln.GenauwiedieLiniebGentigtderBogenzweiKreiseU anseinenEndpunkten.pQolygon[Bounce][Hrte][Dic>ke][AnzahlderSeiten]([Mittelpunkt_x][Mittelpunkt_y])...Dieses'KommandowirdeineMengeKreiseerzeugen,)diedurchLinienverbundensind,)unddadurcheinU Polygon-hnlichesGebildeschaen.closed_pQolygon[Bounce][Hrte][Dic>ke][AnzahlderSeiten]([Mittelpunkt_x][Mittelpunkt_y])...hnlichU wieeinPolygon,abGerdieersteundletzteSeitesindauchdurcheineLinieverbunden.pQoly_curv>e[Bounce][Hrte][Dicke][Start_x][Start_y][Richtung_x][Richtung_y]([Befehlsargumente...]) ...Diepoly_curveistdasmchtigstederArena-Kommandos.>TSiewirdgenutztimWndeausLinienundBgen"zubauen. NachjedenAbschnitthattmaneineaktuellePositionundeineaktuelleRichtung,dieU siIt)isusedtobuildwallswithlinesandarcs.vAteachstepyouhaveacurrentpGositionanddirection,whichU areaectedbythesubGcommands.qThelastsubcommandmustbeCorQ.L[length]/DrawU alinewithgivenlengthinthecurrentdirection.T[angle]/T*urnU thecurrentdircetion.A[angle][radius]/DrawU anarc.C/FinishU byconnectingwiththestartingpGoint.Q/Quit.exclusion_pQoin>t[Position_x][Position_y]W*enn!dieArenainnerhalbderBegrenzungenausmehrerengetrenntenGebietenbGesteht,"!solltestdu alle bisaufeinsausschliessen,Dindemdu"Exclusion-Punkte"setzt.>AllePunktevondenenausmaneinegeradeLiniebiszueinem"Exclusion-Punkt"ziehenkqann,{ohneeineMauerzubGerschreiten,geltenU alsausserhalbderArena.f;_2G!N ecbx1200]f ecbx1000&Lt$ffffecbx14406 ecss1000HЃ ecti1000Iqqecss2074qL ectt1000 1 ecrm1000 !", cmsy10 b> cmmi10realtimebattle-1.0.8/Documentation/German/RealTimeBattle.sgml0000644000175000017500000021500210320530153022404 0ustar moimoi
RealTimeBattle Benutzer-Handbuch, Version 1.0.8 <author>Erik Ouchterlony and Ragnar Ouchterlony, Johannes Nicolai (<htmlurl name="jonico@users.sourceforge.net" url="mailto:jonico@users.sourceforge.net">) <date> 4. Oktober 2005 <abstract>Deutsche bersetzung von Uwe Hermann, Falko Menge und Johannes Nicolai</abstract> </titlepag> <toc> <!-- ################ Introduction ################## --> <sect>Einfhrung<label id="Introduction"> <p> Dies hier ist die Anleitung zu RealTimeBattle. Sie beschreibt wie man das Programm bedient, wie es funktioniert, wie man eigene Roboter programmiert und wie man sich eine eigene Arena erstellen kann. RealTimeBattle ist ein "Programmier-Spiel" fr Unix, in dem Programm-gesteuerte Roboter gegeneinander kmpfen. Das Ziel ist es, alle Gegner zu vernichten, wobei man den Radar einsetzt um die Gegend abzutasten, und die Kanone, um die Gegner abzuschieen. Obwohl die Umgebung in der sich die Roboter bewegen relativ einfach gestaltet ist, ist es nicht einfach einen intelligenten Roboter zu programmieren. RealTimeBattle wurde so geschrieben, dass es leicht zu bedienen, flexibel und schnell ist. Die Idee dahinter war, das Programm zum testen von intelligenten Algorithmen zu verwenden, oder auch einfach zur Unterhaltung. Features: <itemize> <item>Das Spiel wird in Echtzeit ausgefhrt; die Roboter laufen als Child-Prozesse von RealTimeBattle.</item> <item>Die Roboter kommunizieren mit dem Programm durch standard input und output(stdin und stdout).</item> <item>Die Roboter knnen in nahezu jeder Programmiersprache geschrieben werden.</item> <item>Bis zu 120 Roboter knnen gleichzeitig gegeneinander antreten.</item> <item>Fr die Kommunikation wird eine simple "messaging"-Sprache benutzt, die es einfach macht neue Roboter zu schreiben.</item> <item>Die Roboter verhalten sich wie richtige physikalische Objekte.</item> <item>Man kann sich eigene Arenen bauen.</item> <item>Viele Konfigurationsmglichkeiten.</item> <item>Externe Clients knnen das Spielgeschehen anzeigen.</item> <item>Rudimentrer Team-Support ist direkt im Spiel eingebaut, Team Frameworks erlauben weitere Koordination der Roboter.</item> </itemize> <sect1>Weitere Informationen<label id="More information"> <p> Mehr Informationen gibt's in den Dateien <tt>INSTALL</tt>, <tt>AUTHORS</tt>, <tt>BUGS</tt>, <tt>TODO</tt>, <tt>README</tt>, <tt>FAQ</tt> und <tt>ChangeLog</tt> . Aktuellere Informationen kann man auf der <url name="RealTimeBattle Homepage" url="http://realtimebattle.sourceforge.net/"> finden, wo es auch verschiedene Roboter, Neuigkeiten zu diversen Wettkmpfen, sowie dieses Handbuch in mehreren Dateiformaten gibt. <sect1>Systemvoraussetzungen<label id="Requirements"> <p> Die Hardware-Voraussetzungen hngen sehr davon ab, was man machen will. Ein paar Roboter antreten zu lassen, sollte auf nahezu jedem Rechner auf dem Linux(oder ein anderes Unix) luft mglich sein. Der Bedarf an schnellerer Hardware steigt jedoch mit der Zahl der Roboter, die man gleichzeitig aufs Schlachfeld schickt; 120 gut programmierte Roboter gleichzeitig kmpfen zu lassen, kann einem normalen PC schon einiges abverlangen. RealTimeBattle gibt es nur fr Unix. Es wird auf einem Linux-Rechner geschrieben, sollte sich aber auch auf anderen Unix-Derivaten kompilieren lassen. Der <ref id="Command line options" name="Competition-Modus"> ist im Moment nur verfgbar, wenn man unter Linux das <tt>/proc</tt>-Verzeichnis aktiviert hat, daRealTimeBattle Informationen ber die momentane CPU-Last erhalten muss. Die einzige bentigte Software ist <url url="http://www.gtk.org" name="gtk+">, das fr die grafische Benutzeroberflche verwendet wird. <sect1>Hintergrundinformationen<label id="Background"> <p> Das Projekt wurde im August 1998 ins Leben gerufen. Die Inspiration dazu war <url url="http://www.robotbattle.com/" name="RobotBattle">, ein sehr interessantes Spiel, das wir frher gern gespielt haben. Die damalige Version von RobotBattle hatte jedoch zwei entscheidende Nachteile: <itemize> <item>Das Spiel gibt es nur fr Windows.</item> <item>Die Roboter sind in einer eigenen Programmiersprache geschrieben, was die Mglichkeiten, intelligente Roboter zu schreiben zu sehr einschrnkt.</item> </itemize> RobotBattle wurde inzwischen weiterentwickelt, ist aber nach wie vor nicht fr andere Betriebssysteme erhltlich. Daher haben wir uns entschieden, eine Unix-Version zu entwickeln, die viele Features eines modernen Betriebssytems nutzt. <sect1>Lizenz<label id="License"> <p> RealTimeBattle unterliegt, ganz im Sinne Linux-Philosophie, der <url url="http://www.gnu.org/copyleft/gpl.html" name="GNU General Public License">. Offizielle Versionen von RealTimeBattle werden von den Autoren freigegeben werden. Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony, weitere Entwickler sind in der <tt>AUTHORS</tt> Datei zu finden. 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. <sect1>Bug Reports<label id="BugReports"> <p> Wenn du etwas in diesem Softwarepaket findest, das nicht funktioniert, nicht <tt>richtig</tt> funktioniert, fehlt, falsch geschrieben, oder einfach nur verwirrend ist, schicke einen Bug Report an <url name="RealTimeBattle Homepage" url="http://sourceforge.net/bugs/?group_id=561">. <sect1>Deutsche bersetzung<label id="German Translation"> <p> Diese bersetzung unterliegt der GNU General Public License. Nhere Infomationen gibt es unter <url url="http://www.fsf.org/copyleft/gpl.html" name="http://www.fsf.org/copyleft/gpl.html"> rtb-docs.de -- german translation of the RTB documentation Copyright (C) 1999-2005 Uwe Hermann, Falko Menge, Johannes Nicolai 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. Die deutsche bersetzung(fr RTB-Version 0.9.7) wurde von <url url="mailto:uh1763@bingo-ev.de" name="Uwe Hermann <uwe@hermann-uwe.de>"> am 16. Mai fertiggestellt. Ich habe mir Mhe gegeben die englische Anleitung mglichst genau zu bersetzen, und trotzdem ein gut verstndliches Deutsch zu erhalten. Ich hoffe dies ist mir, trotz einiger Ausdrcke die mir selber nicht sonderlich gefallen, einigermaen gelungen. Fehler, Verbesserungsvorschlge o.. in der bersetzung bitte an <htmlurl url="mailto:uh1763@bingo-ev.de" name="uh1763@bingo-ev.de"> schicken. Ich mchte mich bei <htmlurl url="mailto:br1764@bingo-ev.de" name="Daniel Reutter <reutter@dhreutter.de>"> dafr bedanken, dass er die bersetzung durchgelesen hat, und mich auf "ein paar" Fehler aufmerksam gemacht hat :-). Die neueste Version der bersetzung ist unter <htmlurl url="http://realtimebattle.sourceforge.net/Documentation/German/" name="http://realtimebattle.sourceforge.net/Documentation/German/"> erhltlich. Changelog: <itemize> <item>4. Oktober 2005 (von Johannes Nicolai): <itemize> <item>Anpassung an Version 1.0.8</item> <item>Aktuellere Links eingefgt</item> <item>weitere kleinere Verbesserungen</item> </itemize> </item> <item>23. November 2004 (von Falko Menge): <itemize> <item>Anpassung an Version 1.0.7</item> <item>Bugs 206688 und 458248 behoben</item> <item>weitere kleinere Verbesserungen</item> </itemize> </item> <item>23. November 2004 (von Falko Menge): <itemize> <item>Anpassung an Version 1.0.5 Rev 1</item> </itemize> </item> <item>17.-22. November 2004 (von Falko Menge): <itemize> <item>kleinere Fehler behoben</item> </itemize> </item> <item>4. Februar 2000: <itemize> <item>Anpassung an Version 1.0.2</item> <item>Alle 'Tournament's in 'Turnier'e gendert</item> <item>Tippfehler ausgebessert</item> </itemize> </item> <item>7. September 1999: <itemize> <item>Anpassung an Version 0.9.11(und dadurch natrlich auch an 0.9.10)</item> </itemize> </item> <item>16. August 1999: <itemize> <item>kleinere Verbesserungen.</item> <item>bersetzung an Version 0.9.8 und dann 0.9.9 angepasst.</item> </itemize> </item> <item>21. Mai 1999: <itemize> <item>einige Fehler verbessert.</item> <item>Datum der deutschen bersetzung hingefgt.</item> <item>Anfang der GPL hinzugefgt(bisher war nur ein Link zur FSF-Homepage da)</item> </itemize> </item> </itemize> <!-- ################ Usage ################## --> <sect>Bedienung des Programms<label id="Usage"> <p> Dieses Kapitel beschreibt, wie man RealTimeBattle bedient. Wenn es Dir langweilig erscheint, die ganze Anleitung durchzulesen, kannst du auch nach dem <tt>Try-and-Error</tt>-Prinzip vorgehen, und nur nachschauen wenn du irgendwo nicht weiterkommst. Es ist aber eine gute Idee den kurzen Abschnitt ber <ref name="Kommandozeilen-Parameter" id="Command line options"> zu lesen. Beachte auch, dass es keine eingebaute Hilfe im Programm selber gibt - um Hilfe zu erhalten musst du dieses Dokument lesen. <sect1>Kommandozeilenparameter<label id="Command line options"> <p> An der Kommandozeile gibt es die Mglichkeit, zwei Optionen zu setzen, die das allgemeine Verhalten von RealTimeBattle kontrollieren. Hier kannst du die Options-Datei whlen, die die Standardwerte der <ref name="Optionen" id="Options"> festlegt. Man kann auch auswhlen, in welchem Spielmodus das Programm laufen wird: <tt>Debug-</tt>, <tt>Normal-</tt> oder <tt>Competition-</tt>Modus. <code> Programmaufruf: RealTimeBattle [Optionen] Optionen: --debug_mode, -d Debug-Modus --debug_level [0-5], -D Setzt den anfnglichen Debug-Level. Impliziert -d --normal_mode, -n Normal-Modus (standard) --competition_mode, -c Competition-Modus --no_graphics, -g es werden keine Grafiken angezeigt --option_file [file], -o whlt die Options-Datei (standard: $HOME/.rtbrc) --log_file [file], -l erzeuge eine Log-Datei; wenn als Datei '-' angegeben wird, wird nach stdout geloggt. --tournament_file [file], -t Angabe einer Turnier-Datei um automatisch ein Turnier zu starten. --statistics_file [file], -s Datei in die Statistiken geschrieben werden, wenn automatisch gestartet wird. --message_file [file], -m Nachrichten in die Datei "file" umleiten. '-' entspricht stdout. Wenn die Logs und die Nachrichten nach STDOUT umgeleitet werden, wird '-m' ignoriert. --replay [file] -r Ein Logfile das abgespielt werden soll. Wenn '-' als Datei angegeben wird, wird von STDIN gelesen. --help, -h zeigt diese Informationen --version, -v gibt die Versionsnummer aus --port_number -p legt den Port fest, an denen externe Clients sich verbinden knnen (Standard: 32134) </code> Die port_number Option ist nur dann verfgbar, wenn RealTimeBattle mit der --enable-network Option compiliert wurde (siehe Datei <tt>INSTALL</tt>). Die Unterschiede zwischen den drei Comepetition-Modi sind in folgender Tabelle zusammengefasst. <#if table="char" > <code> +---------------------------------------+-------+--------+-------------+ | Modus | Debug | Normal | Competition | +---------------------------------------+-------+--------+-------------+ | Debug Kommando verfgbar | Ja | Nein | Nein | | Pause whrend des Spiels | Ja | Ja | Nein | | Programm schrittweise ausfhrbar | Ja | Nein | Nein | | CPU-Zeit der Roboter ist unbeschrnkt | Ja | Ja | Nein | +---------------------------------------+-------+--------+-------------+ </code> </#if> <#if table="real" > <table loc="htb"> <tabular ca="|l|ccc|"><hline> Modus | Debug | Normal | Competition @<hline> Debug Kommando verfgbar | Ja | Nein | Nein @ Pause whrend des Spiels | Ja | Ja | Nein @ Programm schrittweise ausfhrbar | Ja | Nein | Nein @ CPU-Zeit der Roboter ist unbeschrnkt | Ja | Ja | Nein @<hline> </tabular> </table> </#if> <sect1>Kontroll-Fenster<label id="Control window"> <p> <descrip> <tag>New tournament:</tag> Ein neues Turnier wird gestartet. Die Sektion <ref id="Start new tournament window" name="Neues Turnier-Fenster ffnen"> gibt mehr Informationen darber. <tag>Replay tournament:</tag> <ref id="replaying" name="Ein Spiel ablaufen lassen">. Du wirst das <ref id="log_files" name="Logfile"> des Spiels auswhlen mssen das du studieren willst. <label id="pause"> <tag>Pause:</tag> Hlt das Spiel an. Im <ref id="Command line options" name="Competition-Modus"> wird erst am Ende des aktuellen Spiels angehalten. <tag>End:</tag> Beendet das aktuelle Turnier. <tag>Options:</tag> ffnet das <ref id="Options_window" name="Options-Fenster">. <tag>Statistics:</tag> Zeigt das <ref id="Statistics window" name="Statistik-Fenster"> an. <tag>Show arena window:</tag> Diese Box kann dazu benutzt werden die drei Fenster, die whrend eines laufenden Spieles zu sehen sind, zu verstecken oder anzuzeigen, nmlich: das <ref id="Arena_window" name="Arena-Fenster">, das <ref id="Score window" name="Score-Fenster"> und das <ref id="Message window" name="Nachrichten-Fenster">. <tag>Quit:</tag> Beendet das Programm. </descrip> Im <ref id="Command line options" name="Debug-Modus"> stehen weitere Mglichkeiten zur Verfgung. Sie dienen dazu, beim debuggen von Robotern zu helfen. Es ist mglich, laufende Prozesse (und somit Roboter) zu debuggen. Wenn man <tt>gdb</tt> benutzt, muss man folgendermaen starten: <tt>gdb Robotername Prozessnummer</tt>. <descrip> <tag>Step:</tag> In einem <ref name="angehaltenen" id="pause"> Spiel wird dieser Button das Spiel um eine Zeiteinheit voranschreiten lassen. Dies ist sehr ntzlich, wenn man einen Roboter im Debugger am Laufen hat, da der Roboter sonst mit Nachrichten berflutet werden wrde. <tag>End game:</tag> Das aktuelle Spiel wird beendet. Das hat den selben Effekt wie ihn ein <ref id="Timeout" name="Timeout"> haben wrde. <tag>Kill marked robot:</tag> Im Debug-Modus kann man einen Roboter im <ref id="Score window" name="Score-Fenster"> markieren. Dieser Roboter wird sterben, wenn man diesen Button drckt. <label id="Debug level"> <tag>Debug level:</tag> Den Debug-Level zu ndern ist eine Mglichkeit, den Robotern mitzuteilen, welche Nachrichten sie senden sollen. Dieser Wert liegt zwischen 0 und 5, wobei 0 bedeutet, dass berhaupt nicht debuggt wird, und 5 ist der hchste Debug-Level, d.h. alle Debug-Nachrichten sollen gesendet werden. </descrip> Beim Abspielen einer Logdatei (nicht von STDOUT) gibt es eine Menge Mglichkeiten die Wiedergabe zu steuern. Siehe dazu auch das Kapitel ber <ref id="replaying" name="Replaying">. <sect1>Neues Turnier-Fenster ffnen<label id="Start new tournament window"> <p> Um Roboter und Arenas fr ein neues Turnier auszusuchen, musst du die Dateien auf der rechten Seite markieren und den <tt>add</tt>-Knopf drcken. Die ausgesuchten Dateien werden links angezeigt. Sie knnen entsprechend auch wieder entfernt werden. <label id="NumberOfGames"> Ein <ref id="A_tournament" name="Turnier"> besteht aus einer bestimmten Zahl von <ref id="A_sequence" name="Sequenzen"> von <ref id="A_game" name="Spielen">. In jeder Sequenz spielen die gleichen Roboter in allen Spielen. Hier whlt man die Anzahl der Spiele und Sequenzen, und auch die Anzahl der Roboter in jeder Sequenz. Wenn du vorhast, jedes Spiel mit allen Robotern zu spielen, ist es ratsam, nur eine Sequenz zu whlen und stattdessen die Anzahl der Spiele zu erhhen. Der Grund dafr ist, es zu vermeiden alle Roboter-Prozesse neu zu starten, da dies eine Weile dauern kann, besonders wenn viele Roboter gegeneinander antreten. Es ist auch mglich eine Turnier-Datei zu laden oder das aktuelle Turnier zu speichern. Das letzte gespielte Turnier ist in /tmp/rtb/tmp.tour gespeichert und wird immer angezeigt wenn dieses Fenster geffnet wird. Wenn die Datei nicht existiert wird ein leeres Turnier angezeigt. Du musst mindestens zwei Roboter und eine Arena auswhlen um starten zu knnen. <sect1>Roboter- und Arena-Verzeichnisse<label id="robot_and_arena_directories"> <p> Damit das Programm die Roboter und die Arenas findet, muss man zwei Optionen setzen: den <ref id="Robot search path" name="Roboter-Suchpfad"> und den <ref id="Arena search path" name="Arena-Suchpfad">. Die Unterverzeichnisse <tt>Robots</tt> und <tt>Arenas</tt> im Installationsverzeichnis (Standard-Wert: <tt>/usr/local/games/RealTimeBattle</tt>), das vor dem Kompilieren im Haupt-Makefile festgelegt wird, werden auf jeden Fall durchsucht. Wenn man ein neues Verzeichnis erzeugt, oder wenn man RealTimeBattle in ein anderes Verzeichnis installiert hat, muss man diese Optionen setzen. <sect1>Arena-Fenster<label id="Arena_window"> <p> Hier findet das Gemetzel statt. Wenn du das Spiel detaillierter betrachten willst, kannst du die Zoom-Knpfe benutzen oder +, - oder 0 drcken. Die Roboter werden als farbige Kreise mit einer Spitze in dem Kreis, die die Radar-Richtung anzeigt, die dicke Linie ist die Kanone und die dnne Linie zeigt in Bewegungs-Richtung. <sect1>Score-Fenster<label id="Score window"> <p> In diesem Fenster werden alle Roboter aufgelistet, die in der aktuellen Sequenz "mitspielen". <sect1>Nachrichten-Fenster<label id="Message window"> <p> Hier werden Nachrichten angezeigt, die die Roboter mittels <ref id="Print" name="Print und Debug"> senden. Die neuesten Nachrichten erscheinen ganz oben. Du kannst das Fenster leeren und auswhlen nur die neuen Nachrichten von einem bestimmten Roboter zu sehen. <sect1>Options-Fenster<label id="Options_window"> <p> Hier kannst du eine ganze Reihe von Optionen ndern. Im <ref id="Options" name="Optionen-Kapitel"> kannst du detaillierte Informationen zu jeder Option erhalten. Die nderungen werden erst wirksam, wenn entweder der <tt>apply</tt>- oder der <tt>OK</tt>-Knopf gedrckt werden. Man kann seine Optionen auch in eine Datei sichern: <tt>Save options</tt> wird die Optionen in eine Datei deiner Wahl speichern und <tt>Save as default</tt> wird sie in die Datei <tt>.rtbrc</tt> in deinem Homeverzeichnis sichern. Der <tt>Default</tt>-Button wird alle Optionen auf ihre Standardwerte zurcksetzen. <sect1>Statistik-Fenster<label id="Statistics window"> <p> Man kann sich die Statistiken des aktuellen Turniers auf verschiedene Arten anzeigen lassen: <itemize> <item> Statistiken ber einzelne <bf>Robot</bf>er,</item> <item> die Ergebnisse eines Spieles (<bf>game</bf>),</item> <item> die Gesamtergebnisse der Sequenz (<bf>sequence total</bf>) oder</item> <item> die Gesamtergebnisse(<bf>total</bf>) des Turniers.</item> </itemize> Mit den Pfeiltasten kann man zum ersten Element, eines zurck, eines vorwrts oder zum letzen Element gelangen. Der Balken in der Mitte ist ein Indikator dafr, was gerade angezeigt wird; Wenn man auf den Balken drckt, werden die Statistiken erneuert, vorausgesetzt das Spiel luft gerade. Wenn du gtk+1.1.x verwendest ist es auch mglich, die einzelnen Spalten zu sortieren, indem man ins entsprechende Titel-Kstchen klickt. <sect1>Spiel ohne Grafiken<label id="no_graphics"> <p> Wenn man will, kann man RealTimeBattle auch ganz ohne Grafiken laufen lassen. Dies kann besonders ntzlich sein, wenn man eine lange Reihe von Tests oder einen Wettbewerb durchfhrt. Man hat zwei Mglichkeiten diese Option zu benutzen: Entweder man verwendet die Option <tt>-g</tt> beim Programmstart, oder man schaltet die Grafiken schon beim Kompilieren ab (die Datei <tt>INSTALL</tt> gibt dazu nhere Informationen). Die letze Alternative ist besonders ntzlich, da die ausfhrbare Datei kleiner wird und daher auf Rechnern mit weniger Arbeitsspeicher schneller luft. Das ermglicht es auch, RealTimeBattle auf Rechnern laufen zu lassen, auf denen kein <tt>gtk+</tt> installiert ist. Wenn man ohne Grafiken arbeitet, muss man ein Turnier-file angeben, andernfalls wird nichts passieren. Es ist auch zu empfehlen eine Log-Datei und/oder Statistik-Datei zu erzeugen, wenn man die Ergebnisse wissen will :-) <sect1>Turnier-Dateien<label id="tournament_files"> <p> Die Turnier-Datei wird als <ref id="Command line options" name="Kommandozeilenparameter"> angegeben. Wenn diese Datei verwendet wird, wird das Turnier automatisch anfangen und beendet werden. Wie man die Statistiken speichert steht im Kapitel <ref id="statistics_files" name="Statistik-Datei">. Eine Turnier-Datei besteht aus 5 Schlsselwrtern. Alle diese Schlsselwrter knnen mehrmals benutzt werden, aber man muss sich dessen bewusst sein, dass nur das letzte Schlsselwort, das eine Zahl als Parameter annimmt, gezhlt wird. Alle Schlsselwrter sollten mit einem Strichpunkt beendet werden. <descrip> <tag>Games/Sequence oder g/s:</tag> Als Parameter muss man entweder eine Zahl oder ein <tt>*</tt> angeben. Die Zahl legt fest wieviele Spiele pro Turnier gespielt werden sollen. Das Sternchen bedeutet, dass das Programm die genaue Anzahl von Arenas hernimmt und diese Zahl als Parameter verwendet. Der voreingestellte Wert ist 1. <tag>Robots/Sequence oder r/s:</tag> Als Parameter muss man entweder eine Zahl oder ein <tt>*</tt> angeben. Die Zahl legt fest wie viele Roboter in jeder Sequenz antreten. Das Sternchen bedeutet, dass das Programm die Anzahl der Roboter als Parameter nimmt. Der Default-Wert ist hier 2. <tag>Sequences oder seq:</tag> Als Parameter muss man entweder eine Zahl oder ein <tt>*</tt> angeben. Die Zahl legt die Anzahl der Sequenzen die im Turnier gespielt werden sollen fest. Wenn man ein Sternchen angibt, errechnet das Programm aus der Anzahl der Roboter und der Anzahl der Roboter pro Sequenz eine Zahl, soda alle Roboter genau einmal gegeneinander antreten. Diese errechnete Zahl wird dann als Parameter verwendet. Der Default-Wert ist 1. <tag>Robots oder r:</tag> Als Parameter wird eine oder mehrere Roboter-Datei(en) angegeben. <tag>Arenas oder a:</tag> Eine oder mehrere Arena-Dateien werden als Parameter bergeben. </descrip> Datei-Argumente knnen wie folgt aussehen: <descrip> <tag>Nur die Datei selber:</tag> Hier wird der Pfad nach der Datei durchsucht. Beispiel: <tt>Robot: empty.robot</tt> <tag>Der volle Pfad zur Datei + der Dateiname:</tag> Die angegebene Datei wird verwendet. Beispiel: <tt>Arena: /usr/local/Games/RealTimeBattle/Arenas/Circle.arena</tt> <tag>Alle Dateien im Pfad:</tag> Diese Angabe durchsucht den ganzen Pfad und verwendet alle gefundenen Dateien. Beispiel: <tt>Arena: *</tt> <tag>Ein bestimmtes Verzeichnis:</tag> Es wird das angegebene Verzeichnis durchsucht und alle gefundenen Dateien werden verwendet. Beispiel: <tt>Robot: /usr/local/Games/RealTimeBattle/Robots/*</tt> </descrip> Es ist mglich Dateien mehr als einmal in die Turnier-Datei zu schreiben. Wenn du z.B. drei <tt>rotate_and_fire.robot</tt>s haben willst, trage einfach drei mal <tt>rotate_and_fire.robot</tt> in die Turnier-Datei ein. Dies gilt genauso fr <tt>*</tt>. Beispiel Turnier-Datei: <tt>R: * Arenas: Circle.arena Square.arena G/S: 2 r/s: 3 Sequences: *</tt> <sect1>Log-Dateien<label id="log_files"> <p> Manchmal ist es ganz ntzlich, ein Spiel detailliert zu analysieren (<ref id="replaying" name="Replay">), oder es einfach nur aufzuheben, weil man es spter vielleicht noch brauchen knnte. Hierfr sind Log-Dateien sinnvoll. Gib <tt>-l</tt> als Kommandozeilenparameter an, wenn du RealTimeBattle startest, und dahinter den Dateinamen der Log-Datei, um dieses Feature zu aktivieren. Wenn du als Datei '-' angibst, wird nach stdout geloggt. Die Log-Datei ist wie folgt aufgebaut: Jede Zeile besteht aus einem Buchstaben, der den Typ der Information angibt, gefolgt von einer Liste von Argumenten die durch 'Whitespaces' getrennt sind. Die folgenden Informationen werden angegeben: <descrip> <tag>Header:</tag> H [Spiele/Sequenz] [Roboter/Sequenz] [Sequenzen] [Roboter] <tag>Arena Info:</tag> A [Zeile aus der Arena Datei] <tag>Spielstart:</tag> G [Sequenznummer] [Spielnummer] <tag>Option:</tag> O [Option:Wert] <tag>Liste von Robotereigenschaften:</tag> L [Roboter-ID] [Roboterfarbe] [Robotername] <label id="RobotPositionInfo"> <tag>Roboter Positions-Info:</tag> R [Roboter-ID] [x] [y] [Kanonen-Winkel] [Radar-Winkel] [Energie] <tag>Zeit:</tag> T [verstrichene Zeit] <tag>Nachricht ausgeben:</tag> P [Roboter-ID] [Nachricht] <tag>Cookie:</tag> C [Cookie-ID] [x] [y] <tag>Mine:</tag> M [Minen-ID] [x] [y] <tag>Schu:</tag> S [Schu-ID] [x] [y] [dx/dt] [dy/dt] <tag>Tod:</tag> D [Typ des gekillten Objekts] [Object-ID] [Wenn's ein Roboter war: erhaltene Punkte] [Position] </descrip> <sect1>Replaying<label id="replaying"> <p> Du kannst ein aufgenommenes Spiel mit Hilfe seiner <ref id="log_files" name="Log-Datei"> abspielen lassen, und zwar entweder aus dem <ref id="Control window" name="Kontroll-Fenster"> heraus, oder indem du die <ref id="Command line options" name="Kommandozeilenoption"> <tt>&dquot;-r&dquot;</tt> verwendest. Beachte aber, dass du, wenn du Standard-Input als Log-Datei verwendest (<ref id="Command line options" name="Kommandozeilenoption"> <tt>&dquot;-r -&dquot;</tt>), nicht viel mehr machen kannst als das Spiel anzusehen. Normalerweise kann man den Ablauf des Spiels folgendermaen beinflussen: <itemize> <item> Der Scroll-Balken ganz oben zeigt an, wie weit das aktuelle Spiel schon abgelaufen ist. Man kann an einen beliebigen Zeitpunkt springen, indem man an dem Scrollbalken zieht und ihn richtig positioniert. <item> Fast Forward und Rewind funktionieren so, wie man es von CD-Spielern und Video-Gerten gewohnt ist. Die Geschwindigkeit kann mittels <ref name="Fast Forward Factor" id="Fast forward factor"> gendert werden. <item> Step forward und step backward knnen dazu verwendet werden zu studieren was im Detail passiert. Zuerst sollte man das Spiel allerdings auf <ref name="Pause" id="pause"> setzen. <item> Mit den vier Buttons ganz unten kann man zwischen Spielen und Sequenzen hin- und herwechseln. </itemize> <sect1>Statistik-Datei<label id="statistics_files"> <p> Die Statistik-Datei wird nur benutzt, wenn eine <ref id="tournament_files" name="Turnier-Datei"> angegeben wurde. Die Statistiken werden in diese Datei gespeichert, wenn das Turnier zu Ende ist. Man kann die Statistiken aber auch mit dem <tt>save</tt>-Knopf im <ref id="Statistics window" name="Statistik-Fenster"> manuell speichern. <!-- ################ Structure ################## --> <sect>Aufbau des Programms<label id="Structure"> <p> In diesem Abschnitt werden wir den Aufbau des Programms beschreiben, auerdem die Art, wie die Roboter sich bewegen, schieen und den Radar kontrollieren, wann Punkte vergeben werden, und wie ein Turnier aufgebaut ist. <sect1>Roboterbewegung<label id="Robot_motion"> <p> Der Roboter verhlt sich wie ein Fahrzeug mit Rdern, er rollt mit einer leichten <ref id="RollFriction" name="Roll-Reibung"> nach vorne und gleitet mit einer wesentlich hheren <ref id="SlideFriction" name="Gleit-Reibung"> zur Seite. Die dritte verlangsamende Kraft ist der <ref id="AirResistance" name="Luftwiderstand">, der entgegen der Bewegungsrichtung des Roboters wirkt, und mit zunehmender Geschwindigkeit grer wird. Es gibt drei Wege, die Roboterbewegung zu beinflussen: <ref id="Accelerate" name="Beschleunigen">, <ref id="Rotate" name="Rotieren"> und <ref id="Brake" name="Bremsen">. Das Beschleunigen erhht die Geschwindigkeit des Roboters in die Richtung in die der Roboter schaut. Man kann die Geschwindigkeit nicht direkt kontrollieren, Beschleunigen ist der einzige Weg den Roboter vom Fleck zu bewegen. Wenn man den Roboter rotieren lsst, muss man beachten, dass dies nicht direkt die Richtung der Bewegung beinflusst, sondern nur die Richtung der sich der Roboter zuwendet. Die Gleit-Reibung wird die eigentliche Drehung des Roboters bewerkstelligen. Bremsen wird die Roll-Reibung des Roboters auf den Maximalwert erhhen. Das passiert, wenn die Rder blockiert sind, und der Roboter rutscht anstatt zu rollen. Vergiss nicht, die Bremse wieder zu lsen, wenn du wieder schneller werden willst. <sect1>Energie<label id="Energy"> <p> Der Zustand des Roboters wird anhand seiner Energie gemessen. Es gibt mehrere Mglichkeiten, Energie zu verlieren. der Roboter kann:<itemize> <item> von einem Schuss getroffen werden, <item> mit einem anderen Roboter oder einer Mauer zusammenstoen, <item> in eine Mine rennen oder <item> einen Schuss abfeuern. </itemize> Die einzige Methode, Energie zu <tt>gewinnen</tt> ist einen Keks zu essen. <sect1>Das Radar<label id="The_radar"> <p> Das einzige Mittel, um Informationen ber die Umgebung zu bekommen ist das Radar. Jedes Mal, wenn der Roboter aktuallisiert wird, wird ihm eine <ref id="Radar" name="Radar-Nachricht"> zugeschickt, die ihm Informationen ber das nchste Objekt in Radar-Richtung, d.h. Entfernung und Typ des Objekts gibt. Wenn das Objekt ein Roboter ist, wird auch die Energie dieses Roboters bekanntgegeben. Da die Radar-Informationen alles sind, was der Roboter ber seine Umwelt wei, ist es extrem wichtig das Radar mglichst gut zu nutzen. Auerdem ist es wichtig, das Radar richtig zu <ref id="Rotate" name="bewegen">, damit das Radar brauchbare Informationen sammeln kann. <sect1>Die Position des Robters<label id="Position"> <p>Seit RealTimeBattle Version 1.0.5 ist es mglich, die Position des Roboter direkter zu bekommen. Anstatt die Umgebung mit dem Radar analysieren zu mssen und daraus die Position zu ermitteln, kann man RealTimeBattle so konfigurieren, dass es die <ref name="Roboter Koordinaten" id="Coordinates"> bermittelt. Dieses Verhalten wird durch die Option <ref name="Send robot coordinates" id="SendCoordinates"> gesteuert. <sect1>Schieen<label id="Shooting"> <p> Schieen ist die beste Methode andere Roboter zu eliminieren. In RealTimeBattle bewegt sich jeder Schuss mit konstanter Geschwindigkeit, die sich aus der Summe der Roboter-Geschwindigkeit und der <ref id="ShotSpeed" name="Schuss-Geschwindigkeit"> in die Richtung in die die Kanone zeigt, errechnet. Der Schuss wird solange weiterfliegen, bis er mit irgendeinem Objekt kollidiert. Wenn der Schuss abgefeuert wird, hat er eine bestimmte Energie, die den Schaden bestimmt, den ein getroffener Roboter erleiden wird. Die Energie ist jedoch begrenzt; die <ref id="ShotMinEnergy" name="Mindest-Energie"> verbietet Schsse mit sehr geringer Energie, die man z.B. zum Abschieen von Minen htte verwenden knnen. Die <ref id="ShotMaxEnergy" name="Maximal-Energie"> wird von der momentanen potentiellen Schuss-Energie des Roboters begrenzt, die mit der Zeit zunimmt. Schieen ist jedoch nicht ohne Risiko, da jeder abgegebene Schuss den Roboter eine gewisse <ref id="ShootingPenalty" name="Energie"> kostet, die proportional zur Schuss-Energie ist. Wenn ein Keks oder eine Mine getroffen werden, werden sie zerstrt, unabhngig von der Schuss-Energie. Daher sollte man minimalste Schuss-Energien verwenden, wenn man Minen abschiet. Schsse, die kollidieren, werden nicht automatisch vernichtet, sondern ihre Energie wird gegeneinander aufgerechnet. Wenn die Schsse in die gleiche Richtung fliegen, wird ihre Energie aufaddiert, wenn sie in entgegengesetzte Richtungen fliegen, heben sich ihre Energien auf. <sect1>Kollisionen<label id="Collisions"> <p> Roboter sind zerbrechliche Objekte, die von Kollisionen mit Mauern oder anderen Robotern Schaden erleiden. Bei Kollisionen verhalten sich die Roboter wie Gummiblle: sie springen zurck. Es gibt drei Faktoren, die ihr Verhalten beinflussen, der <ref id="BounceCoefficient" name="Bounce-Koeffizient">, der <ref id="BounceCoefficient" name="Hrte-Koeffizient"> und der <ref id="BounceCoefficient" name="Schutz-Koeffizient">. An der <ref id="RobotFront" name="Vorderseite"> sind die Roboter aus anderem Material gebaut, das hrter ist und mehr Schutz gewhrt. Das kann ausgenutzt werden um andere Roboter zu rammen; man teilt so weit mehr Schaden aus, als man selber einstecken muss. <sect1>Kekse und Minen<label id="Cookies_and_mines"> <p> Kekse und Minen sind gleichwertige Objekte, mit dem einzigen Unterschied, dass man bein Einsammeln von Keksen Energie bekommt, und beim 'Einsammeln' von Minen Energie verliert. Kekse und Minen werden whrend des Spiels zufllig in der Arena auftauchen. Die Energie, die man von ihnen bekommt/verliert, und die Hufigkeit mit der sie erscheinen, kann durch <ref id="Cookie_and_mine_options" name="Optionen"> kontrolliert werden. <sect1>Zeit<label id="Time"> <p> Wie der Name des Programms schon andeutet, wird als Zeit die Echtzeit benutzt. Es ist einzig und allein die Aufgabe der Roboter, auf Signale und Nachrichten des Programms rechtzeitig zu antworten. Whrend des Spiels wird regelmssig die update-Funktion aufgerufen. Zwischen diesen Aufrufen mssen sich die Roboter die verbleibende CPU-Zeit aufteilen. Um Roboter daran zu hindern, nicht zuviel Prozessorleistung zu veranschlagen, ist ihre CPU-Zeit im <ref id="Command line options" name="Competition-Modus"> beschrnkt. Die entsprechenden <ref id="CPUOptions" name="CPU-Optionen"> geben dazu mehr Infomationen. Die 'Echtzeit-ness' kann aber unter Umstnden verndert werden. Man kann die Spielgeschwindigkeit beschleunigen oder verlangsamen, indem man die <ref id="TimeScale" name="Timescale">-Option verndert, und es gibt eine Methode, die Unterbrechung des Spiels zu verhindern, wenn die Systemlast zu hoch ist. Wenn die Zeit zwischen zwei Updates lnger als <ref id="MaxTimestep" name="MaxTimestep"> ist, wird das Spiel entsprechend langsamer gemacht. <sect1>Ein Spiel<label id="A_game"> <p> Am Anfang eines Spiels haben die Roboter eine zufllige Position auf dem Spielfeld, mit einer zuflligen Ausrichtung. Das Radar und die Kanone zeigen beide nach vorne und die <ref id="Shooting" name="potentielle Schuss-Energie"> ist Null. Das Ziel der Roboter ist es nun, solange wie mglich zu berleben und gleichzeitig mglichst viele andere Roboter zu zerstren. Ein Roboter erhlt einen Punkt fr jeden gegnerischen Roboter, den er berlebt. Ein Extra-Punkt geht jedoch auch an alle teilnehmenden Roboter. Roboter die gleichzeitig sterben, bekommen genausoviele Punkte, wie sie bekommen htten, wenn sie nicht gleichzeitig gestorben wren(d.h. sie bekommen einen halben Punkt fr den jeweils anderen, der gleichzeitig stirbt). Ein Spiel ist beendet wenn entweder die Anzahl der lebenden Roboter weniger als zwei ist, oder <ref id="Timeout" name="die Zeit abgelaufen ist."> <sect1>Eine Sequenz<label id="A_sequence"> <p> Eine Sequenz ist eine Reihe von Spielen, in denen immer die gleichen Roboter kmpfen. Am Anfang der Sequenz werden die Roboter-Prozesse gestartet. Die Anzahl der Roboter in einer Sequenz ist, wegen der Beschrnkung auf maximal 256 offene File-Deskriptoren in Linux, auf 120 begrenzt. Es werden fr jeden Roboter zwei Pipes als Kommunikations-Kanle geffnet. Nachdem eine bestimmte <ref id="NumberOfGames" name="Anzahl von Spielen"> gespielt wurden, werden die Roboter-Prozesse schliesslich gekillt. <sect1>Ein Turnier<label id="A_tournament"> <p> Ein Turnier ist eine Folge von Sequenzen. Die Anzahl der Roboter in einem Turnier ist(theorethisch) unbegrenzt. Eine beliebige Anzahl von Sequenzen ist erlaubt, um aber das Turnier fair zu gestalten, sollte man eine Anzahl von Sequenzen aussuchen, sodass alle Roboter die gleiche Anzahl von Spielen spielen (d.h. #Sequenzen = #Roboter pro Spiel / ggT(#Roboter pro Spiel, #Roboter im Turnier)). <!-- ################ Robot Construction ################## --> <sect>Roboter-Programmierung<label id="Robot construction"> <p> Dieses Kapitel beschreibt, wie man eigene Roboter programmiert. Das wichtigste was man wissen muss ist die Messaging-Sprache, die aus ca. 35 Befehlen besteht die zur Kommunikation mit dem Server-Programm benutzt werden. Zudem kann es sehr hilfreich sein, die Beispiel-Roboter im <tt>Robots/</tt>-Verzeichnis zu studieren. <sect1>Nachrichten lesen<label id="Reading messages"> <p> Am Anfang jeder Sequenz werden die Roboter-Prozesse gestartet und jeder bekommt zwei Pipes zugewiesen, eine fr Input die andere fr Output. Diese Pipes sind mit <tt>stdin</tt> und <tt>stdout</tt> verbunden, so dass es fr die Roboter so aussieht, als wrden sie mit dem Server ber Standard Input und Standard Output kommunizieren. Dieses Verfahren ermglicht es, Roboter in nahezu jeder Programmiersprache zu schreiben. Es gibt nur ein Problem: der Roboter muss wissen, wann er eine Nachricht erhalten hat. Um das zu erreichen gibt es (mindestens) drei verschiedene Methoden: <descrip> <tag>STDIN blockiert:</tag> Dies ist die einfachste Methode. Wenn man von stdin liest, wird das Program blockiert bis die nchste Nachricht ankommt. Daher kann man das Programm so schreiben als wre immer eine Nachricht vorhanden. Der Nachteil ist, dass man keine Berechnungen durchfhren kann whrend man auf neue Nachrichten wartet. Um die Blockieren-Methode auszuwhlen, sende folgende Roboter-Option <em>solbald das Programm gestartet wurde</em>: <verb> cout << "RobotOption " << USE_NON_BLOCKING << " " << 0 << endl; </verb> Beachte, dass das C++ Code ist. Wenn du nicht C++ verwendest gib einfach die obenstehenden Informationen auf stdout aus. endl bedeutet 'end of line'. <tag>Select:</tag> Wenn man die Unix Libc Funktion <tt>select</tt> verwendet, hat der Roboter mehr Kontrolle darber, wann er nach neuen Nachrichten schauen soll. Dies ermglicht dir, z.B. alle vorhandenen Nachrichten zu lesen, einige Berechnungen durchzufhren, Kommandos zu senden und dann auf weitere Nachrichten zu warten. Um mehr ber <tt>select</tt> zu lernen, lies bitte die Unix-Dokumentation (man- oder info-pages). Um die Select-Methode auszuwhlen sende folgede Roboter-Option <em>solbald das Programm gestartet wurde</em>: <verb> cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl; </verb> Beachte auch hier, dass das C++ Code ist. <tag>Signale:</tag> Wenn du willst kannst du RealTimeBattle sagen, der Roboter soll jedesmal ein Signal gesendet bekommen, wenn neue Nachrichten gesendet werden. Diese Methode ermglicht es dem Roboter stndig auf dem laufenden zu sein, auch wenn er gerade mit Berechnungen beschftigt ist. Verwende die Unix-Dokumentation um mehr ber Signale zu erfahren, oder alternativ: schau dir den Quelltext anderer Roboter an um mehr darber zu lernen. Um die Signal-Methode auszuwhlen sende folgede Roboter-Optionen <em>solbald das Programm gestartet wurde</em>: <verb> cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl; cout << "RobotOption " << SIGNAL << " " << SIGUSR1 << endl; </verb> Beachte auch hier, dass das C++ Code ist. Natrlich kannst du irgendein anderes Signal als <tt>SIGUSR1</tt> whlen. </descrip> Als kleine Hilfe diese drei Methoden zu implementieren, wurde der Roboter <tt>rotate_and_fire</tt> in drei verschiedenen, aber funktionell quivalenten, Versionen geschrieben. Du kannst diese gerne studieren und in deinen eigenen Robotern verwenden. Ein ''busy wait'', also ein wiederholtes Nachschauen, ob eine Nachricht da ist, ist keine gute Idee. Das wrde zu einer drastischen Verlangsamung des Spielablaufs fhren, schlimmer noch: im <ref id="Command line options" name="Competition-Modus"> wrde der Roboter ziemlich schnell wegen mangelnder CPU-Zeit draufgehen. <sect1>Messagetypes.h<label id="Messagetypes.h"> <p> Die Datei <tt>Messagetypes.h</tt> ist eine gute Quelle fr Informationen ber die Messaging-Sprache. Es ist eine C/C++ Include-Datei, kann aber leicht fr die Benutzung mit anderen Programmiersprachen umgeschrieben werden. Dort findet man eine Auflistung von Nachrichten, Warning-Typen, Objekten, Spiel-Optionen und Roboter-Optionen. <sect1>Schummeln<label id="Cheating"> <p> Da der Kampf der Roboter in Echtzeit und mit richtigen Prozessen stattfindet, gibt es mglicherweise Methoden Roboter zu schreiben, die auf die eine oder andere Art schummeln, z.B. indem sie andere Roboter oder sogar RealTimeBattle selber untersuchen, um mehr Informationen zu erhalten, sehr viele Ressourcen aufbrauchen damit andere Roboter weniger haben, etc. Das ist natrlich nicht die feine, englische Art, einen Gegner zu schlagen, daher versuchen wir das so gut wie mglich zu verhindern. Im <ref id="Command line options" name="Competition-Modus"> ist die CPU-Zeit der Roboter beschrnkt, denn auf diese Art kann ein Roboter nicht die ganze CPU-Zeit aufbrauchen. Dies knnte man durch das ffnen weiterer Kind-Prozesse umgehen, aber seitdem die vom Kind-Prozess genutzte Zeit beim Beenden des Prozesses gezhlt wird, sollte es sehr einfach sein zu Erkennen ob ein Roboter irgendetwas verdchtiges tut. Es ist nicht mglich alle Mglichkeiten des Schummelns in RTB zu verhindern. So ist es z.B erlaubt, Dateien zu lesen und zu schreiben, man sollte sich aber dessen bewusst sein, dass die Organisatoren von Wettkmpfen dies verbieten knnen, wenn sie wollen, indem die einfach Besitzer und Rechte der Roboter-Programme richtig setzen. Es ist vielleicht immer noch mglich, Wege zu finden, um diese Einschrnkungen zu umgehen; Wenn du eine solche Mglichkeit findest, sende bitte einen <ref id="BugReports" name="Bug-Report"> an uns. Im brigen ist es die Aufgabe der Turnier-Organisatoren sicherzustellen, dass die Regeln befolgt werden. <!-- ################ Messages to robots ################## --> <sect1>Nachrichten an Roboter<label id="Messages to robots"> <p> <descrip> <label id="Initialize"> <tag>Initialize [ErsteSequenz? (int)]</tag> Dies ist die allererste Nachricht die der Roboter bekommen wird. Wenn das Argument eins ist, ist es die erste Sequenz im Turnier und der Roboter sollte <ref id="NameAndColour" name="seinen Namen und seine Farbe"> and den Server senden, ansonsten sollte er auf YourName- und YourColor-Nachrichten warten. <label id="YourName"> <tag>YourName [Name (string)]</tag> Der momentane Name des Roboters; man sollte ihn nur ndern, wenn man <tt>sehr</tt> gute Grnde dafr hat. <label id="YourColour"> <tag>YourColour [Farbe (hex)]</tag> Die momentane Farbe des Roboters; wenn sie einem nicht gefllt, kann man sie ndern. Alle Roboter in einem Team haben dieselbe Farbe. <tag>GameOption [Optionsnummer (int)] [value (double)]</tag> Am Anfang jedes Spieles werden dem Roboter einige Einstellungen mitgeteilt, die dem Roboter ntzlich sein knnen. Fr eine komplette Liste sollte man sich das <tt>game_option_type</tt> enum in der Datei <ref id="Messagetypes.h" name="Messagetypes.h"> anschauen. Im <ref id="Options" name="Optionen-Kapitel"> gibt's mehr Informationen zu den einzelnen Optionen. Der <ref id="Debug level" name="Debug-Level"> wird auch als Spiel-Option gesendet obwohl es nicht in der Options-Liste ist. <tag>GameStarts</tag> Diese Nachricht wird gesendet wenn das Spiel anfngt (wer htte das gedacht?). <label id="Radar"> <tag>Radar [Entfernung (double)] [Typ des beobachteten Objekts (int)] [Radar-Winkel (double)]</tag> Diese Nachricht gibt jede Runde Radar-Informationen. Der Radar-Winkel wird relativ zur Vorderseite des Roboters angegeben, und zwar im Bogenma. <tag>Info [Zeit (double)] [Geschwindigkeit (double)] [Kanonen-Winkel (double)]</tag> Die <bf>Info</bf>-Nachricht wird immer nach der <bf>Radar</bf>-Nachricht gesendet. Sie gibt mehr allgemeine Informationen ber den Status des Roboters. Die Zeit ist jene Zeit, die seit dem Start des Spieles vergangen ist. Dies ist nicht unbedingt die Zeit, die in Wirklichkeit vergangen ist, und zwar wegen <ref id="TimeScale" name="time scale"> und <ref id="MaxTimestep" name="max timestep">. <label id="Coordinates"> <tag>Coordinates [x (double)] [y (double)] [angle (double)]</tag> Diese Nachricht teilt Dir die aktuelle Prosition mit. Sie ist nur gesendet wenn die Option <ref name="Send robot coordinates" id="SendCoordinates"> auf 1 oder 2 gesetzt ist. Der Wert 1 bedeutet das die Koordinaten relativ zur Startposition gesendet werden, so dass der Roboter nicht wei wo er gestartet ist sondern nur wohin er sich seitdem bewegt hat. <tag>RobotInfo [Energie-Level (double)] [Team-Mitglied? (int)]</tag> Wenn dein Roboter einen anderen Roboter mittels des Radars entdeckt, wird diese Nachricht an deinen Roboter gesendet. Sie gibt verschiedene Informationen ber den feindlichen Roboter. Die Energie des anderen Roboters wird auf die gleiche Art und Weise angegeben, wie die Energie deines eigenen Roboters(siehe unten). Der zweite Parameter ist nur im Team-Mode interessant, 1 heisst Team-Mitglied, 0 steht fr einen Gegner. <label id="RotationReached"> <tag>RotationReached [Was hat seine Rotation beendet?(int)]</tag> Wenn die Roboter-Option <ref id="RobotOption" name="SEND_ROTATION_REACHED"> richtig gesetzt ist, wird diese Nachricht gesendet, wenn eine Rotation (mit RotateTo oder RotateAmount) beendet wurde, oder die Richtung sich gendert hat (beim 'sweeping'). Der Parameter entspricht dem 'was soll ich rotieren', z.B. bei <ref id="Rotate" name="Rotate">. <tag>Energy [Energie-Level(double)]</tag> Am Ende jeder Runde wird der Roboter seinen eigenen Energie-Level erfahren. Er wird jedoch nicht die exakte Energie gesagt bekommen, sondern nur einen der <ref id="EnergyLevels" name="Energie-Level">. <tag>RobotsLeft [Anzahl der Roboter (int)]</tag> Am Anfang des Spiels, und wenn ein Roboter gettet wird, wird die Anzahl der verbleibenden Roboter allen noch lebenden Robotern bekanntgegeben. <tag>Collision [Objekt-Typ mit dem der Roboter zusammengestossen ist (int)] [angle relative robot (double)]</tag> Wenn ein Roboter von etwas getroffen wird, oder selber etwas rammt, bekommt er diese Nachricht. In der Datei <ref id="Messagetypes.h" name="Messagetypes.h"> findest du eine Liste aller Objekt-Typen. <label id="Warning"> <tag>Warning [Warnungs-Typ (int)] [Nachricht (string)]</tag> Eine Warnungs-Nachricht wird dann gesendet wenn ein Problem aufgetaucht ist. Momentan knnen 7 verschiedene Warnungs-Nachrichten gesendet werden, nmlich: <tt>UNKNOWN_MESSAGE:</tt> Der Server hat eine Nachricht erhalten, mit der er nichts anfangen kann. <tt>PROCESS_TIME_LOW:</tt> Die CPU-Last hat den <ref id="CPUWarningPercentage" name="CPU Warnungs-Prozentsatz"> erreicht. Taucht nur im <ref id="Command line options" name="Competition-Modus"> auf. <tt>MESSAGE_SENT_IN_ILLEGAL_STATE:</tt> Die erhaltene Nachricht konnte in diesem Spielstadium nicht verarbeitet werden. Z.B. wenn <ref id="Rotate" name="Rotate"> vor dem Anfang des Spiels gesendet wurde. <tt>UNKNOWN_OPTION:</tt> Der Roboter hat eine <ref id="RobotOption" name="robot option"> gesendet, die entweder einen unzulssigen Optionsnamen oder Options-Parameter enthielt. <tt>OBSOLETE_KEYWORD:</tt> Das Schlsselwort ist veraltet, und sollte nicht mehr verwendet werden. Lies die Datei <tt>ChangeLog</tt> um herauszufinden was stattdessen benutzt werden sollte. <tt>NAME_NOT_GIVEN:</tt> Der Roboter hat seinen Namen nicht vor Spielbeginn gesendet. Das passiert wenn die <ref id="RobotStartupTime" name="robot startup time"> zu kurz ist oder der Roboter seinen Namen nicht frh genug sendet. <tt>COLOUR_NOT_GIVEN:</tt> Der Roboter hat seine Farbe nicht vor Spielbeginn gesendet. <tag>Dead</tag> Der Roboter ist gestorben. Versuche nicht, weitere Nachrichten an den Server zu senden bis das Spiel zu ende ist. Der Server wird sie nicht lesen. <tag>GameFinishes</tag> Das aktuelle Spiel ist beendet, mache dich bereit fr das nchste. <label id="ExitRobot"> <tag>ExitRobot</tag> Verlasse *sofort* das Programm, oder du wirst mit Gewalt rausgeschmissen! </descrip> <!-- ################ Messages from robots ################## --> <sect1>Nachrichten von Robotern<label id="Messages from robots"> <p> Nachrichten von einem Roboter an RealTimeBattle drfen nicht lnger als 128 Zeichen sein. Anderenfalls wird RealTimeBattle die Nachricht in zwei Teile schneiden und mglicherweise eine "Unbekannte Nachricht" melden. When you send messages to RealTimeBattle make shure that they are not longer than 128 chars, otherwise RealTimeBattle will cut them in two parts and may report an unknown message. <descrip> <label id="RobotOption"> <tag>RobotOption [Optionsnummer (int)] [Wert (int)]</tag> Momentan sind nur zwei Optionen verfgbar: <tt>SIGNAL:</tt> Teilt dem Server mit, er soll ein Signal senden, wenn Nachrichten eintreffen. Der Parameter wird angeben, welches Signal. Sende diese Nachricht (z.B. mit Parameter SIGUSR1), sobald du bereit bist Signale zu empfangen. Der Standardwert ist 0, d.h. der Server soll keine Signale senden. <tt>SEND_SIGNAL:</tt> Sagt dem Server er soll SIGUSR1 senden, wenn eine Nachricht eintrifft. Sende diese Nachricht (mit Parameter 1 (=true)) sobald du bereit bist ein Signal zu empfangen. Der Standardwert ist false. <tt>SEND_ROTATION_REACHED:</tt> Wenn du willst das der Server eine <ref id="RotationReached" name="RotationReached"> Nachricht sendet, wenn eine Rotation beendet wurde, solltest du diese Option setzen. Mit 1 als Wert wird die Nachricht gesendet, wenn ein RotateTo oder ein RotateAmount fertig ist, mit 2 als Wert werden auch Vernderungen in der Sweep-Richtung gemeldet. Standardwert ist 0, d.h. es werden keine Nachrichten gesendet. <tt>USE_NON_BLOCKING:</tt> Bestimmt wie <ref id="Reading messages" name="Nachrichten gelesen werden">. Diese Option sollte genau einmal gesendet werden, sobald das Programm gestartet wird. Da die Option immer angegeben werden sollte, gibt es keinen Default-Wert. <label id="NameAndColour"> <tag>Name [Name (string)]</tag> Wenn man die <ref id="Initialize" name="Initialize">-Nachricht mit 1 als Argument erhlt, die anzeigt dass dies die erste Sequenz ist, sollte der Roboter seinen Namen und seine Farbe senden. Im Namen kann die Teamzugehrigkeit mitgeteilt werden. Lautet der Name <tt>foo Team: bar</tt>, so heit der Roboter <tt>foo</tt> und spielt im Team <tt>bar</tt>. Teammitglieder bekommen dieselbe Farbe und erkennen sich als Freund bei der RobotInfo Nachricht. Ausgefeilteren Team-Support bietet das <url name="RealTimeBattle Team FrameWork" url="http://rtb-team.sf.net">. <tag>Colour [home colour (hex)] [away colour (hex)]</tag> Siehe oben. Die Farben sind wie normale Fuballtrikots. Die "home colour" wird verwendet falls sie nicht schon vergeben ist. Anderenfalls wird die "away colour" oder als letzten Ausweg eine zufllig gewhlte, freie Farbe benutzt. <label id="Rotate"> <tag>Rotate [Was soll rotieren (int)] [angular velocity (double)]</tag> Setzt die "angular velocity" fr den Roboter, die Kanone und den Radar. Setze 'Was soll rotieren' auf 1 fr den Roboter, 2 fr die Kanone, 4 fr den Radar, oder zu einer Summe dieser Werte, um mehrere Objekte gleichzeitig zu rotieren. Die "angular velocity" wird in "Radians" pro Sekunde angegeben und wird von <ref id="RobotMaxRotateSpeed" name="Robot (cannon/radar) max rotate speed"> begrenzt. <tag>RotateTo [Was soll rotieren (int)] [angular velocity (double)] [End-Winkel (double)]</tag> Genau wie <bf>Rotate</bf>, allerdings wird nur um einen bestimmten Winkel rotiert. Beachte dass Radar- und Kanonen-Winkel relativ zum Roboter-Winkel angegeben werden. Dieses Kommando kann nicht dazu benutzt werden den Roboter selber rotieren zu lassen, benutze <bf>RotateAmount</bf> dafr. <label id="RotateAmount"> <tag>RotateAmount [Was soll rotieren (int)] [angular velocity (double)] [Winkel (double)]</tag> Funktioniert wie <bf>Rotate</bf>, wird aber relativ zum momentanen Winkel rotieren. <tag>Sweep [what to rotate (int)] [angular velocity (double)] [right angle (double)] [left angle (double)]</tag> Funktioniert wie <bf>Rotate</bf>, setzt aber den Radar und/oder die Kanone in einen "Sweep Mode"(nicht mglich fr den Roboter selber). <label id="Accelerate"> <tag>Accelerate [Wert (double)]</tag> Setzt die Roboter-Beschleunigung. Der Wert ist durch <ref id="RobotMaxAcceleration" name="Robot max/min acceleration"> beschrnkt. <label id="Brake"> <tag>Brake [portion (double)]</tag> Dient zum Bremsen. Vollbremsung (portion=1.0) heisst dass die Reibung in Roboter-Richtung gleich der <ref id="SlideFriction" name="Gleit-Reibung"> ist. <tag>Shoot [Schuss-Energie (double)]</tag> Schuss mit der angegebenen Energie. Die <ref id="Shot options" name="Schuss-Optionen"> geben dazu mehr Informationen. <label id="Print"> <tag>Print [Nachricht (string)]</tag> Zeigt die Nachricht im <ref id="Message window" name="Message-Fenster"> an. <tag>Debug [message (string)]</tag> Zeigt die Nachricht im <ref id="Message window" name="Message-Fenster"> an, wenn man sich im <ref id="Command line options" name="Debug-Modus"> befindet. <tag>DebugLine [Winkel1 (double)] [Radius1 (double)] [Winkel2 (double)] [Radius2 (double)]</tag> Zeichnet eine Linie direkt in die Arena. Dies ist nur im hchsten Debug-Level(5) erlaubt; Ist dies nicht der Fall wird eine <ref id="Warning" name="Warnungs-Nachricht"> gesendet. Die Parameter sind die Start- und End-Punkte der Linie, angegeben in Polarkoordinaten relativ zum Roboter. <tag>DebugCircle [Mittelpunkts-Winkel (double)] [Mittelpunkts-Radius (double)] [Kreisradius (double)]</tag> hnlich wie DebugLine, zeichnet aber einen Kreis. Die ersten zwei Parameter sind Winkel und Radius des Kreismittelpunktes relativ zum Roboter. Der dritte Parameter gibt den Radius des Kreises an. </descrip> <!-- ################ Options ################## --> <sect>Optionen<label id="Options"> <p> RealTimeBattle kann durch eine ganze Reihe von Optionen konfiguriert werden, die in verschiedenen Gruppen zusammengefasst sind. Die Philosophie dahinter ist, dir grtmgliche Freiheit zu geben, das Spiel so zu gestalten wie du es willst. Das heisst aber auch, dass bestimmte Kombinationen der Optionen zu schlechten Ergebnissen fhren knnen, und dem Programm Schwierigkeiten machen knnten. <sect1>Umwelt-Optionen<label id="Environmental options"> <p> <descrip> <tag>Gravitational Constant:</tag> Die Beschleunigung, die von der Gravitation herrhrt. Auf der Erde ist diese Konstante ungefhr 9.81. Eine Erhhung wird zu einer erhhten Reibung fhren und die Roboter langsamer machen. <label id="AirResistance"> <tag>AirResistance:</tag> Richtig geraten. Der Luftwiderstand nimmt mit der Geschwindigkeit zu. <label id="RollFriction"> <tag>RollFriction:</tag> Die Reibung in Richtung des Roboters, wenn er nicht bremst (Rollreibung). <label id="SlideFriction"> <tag>SlideFriction:</tag> Die Reibung orthogonal zur Richtung des Roboters. Ist gleichzeitig die maximale Reibung, wenn der Roboter bremst (Gleitreibung). <label id="SendCoordinates"> <tag>Send robot coordinates:</tag> Legt fest wie Koordinaten zu den Robotern gesendet werde. Folgende Optionen sind verfgbar: <itemize> <item> 0 - kein Koordinaten senden (standart) <item> 1 - sendet die Koordinaten relativ zur Startposition <item> 2 - sendet absolute Koordinaten </itemize> </descrip> <sect1>Roboter Optionen<label id="Robot options"> <p> <descrip> <label id="RobotMaxAcceleration"> <tag>Robot max acceleration:</tag> Roboter drfen nicht mehr beschleunigen, als dieser Wert angibt, und... <tag>Robot min acceleration:</tag> ...nicht weniger als dieser Wert. <label id="RobotRadius"> <tag>Robot radius:</tag> Gibt die Gre des Roboters an. <tag>Robot mass:</tag> Robotergewicht. Ein grosses Robotergewicht erhht die Auswirkungen eines Zusammenpralls. <label id="BounceCoefficient"> <tag>Robot bounce coefficient:</tag> Gibt an wie gut der Roboter abprallen kann. Wenn dieser Wert 0 ist, werden die Roboter 'aufeinanderklatschen' wenn sie kollidieren, wenn der Wert 1, ist werden sie sich wie perfekte Billiardblle verhalten. <tag>Robot hardness coefficient:</tag> Gibt an wieviel Schaden die Roboter erleiden, wenn sie kollidieren. Je kleiner der Wert, desto weicher das Material. <tag>Robot protection coefficient:</tag> Bestimmt, wie gut der Roboter geschtzt ist. Dieser Faktor wird mit der Energie des Schadens multipliziert, und man erhlt den Wert, um den man die Roboterenergie verringern muss. <label id="RobotFront"> <tag>Robot frontsize:</tag> Die Vorderseite des Roboters ist ein Gebiet aus verschiedenen Materialien, normalerweise hrter und schtzender, sodass Roboter sich gegenseitig Schaden knnen indem sie sich rammen. <tag>Robot front bounce coefficient:</tag> Siehe vorherige 4 Erklrungen. <tag>Robot front hardness coefficient:</tag> Siehe vorherige 5 Erklrungen. <tag>Robot front protection coefficient:</tag> Siehe vorherige 6 Erklrungen. <tag>Robot start energy:</tag> Die Menge an Energie, die der Roboter am Anfang jeden Spieles haben wird. <tag>Robot max energy:</tag> Durch aufnehmen eines Kekses kann der Roboter seine Energie erhhen, allerdings nicht mehr als auf diesen Wert. <label id="RobotMaxRotateSpeed"> <tag>Robot max rotate speed:</tag> Wie schnell der Roboter rotieren darf. Einheit: 'radians'/s. <tag>Robot cannon max rotate speed:</tag> Maximale Geschwindigkeit, mit der die Kanone rotieren darf. Allerdings rotieren die Kanone und der Radar relativ zum Roboter, sodass die eigentliche Rotationsgeschwindigkeit hher sein kann. <tag>Robot radar max rotate speed:</tag> Maximale Radar-Rotationsigeschwindigkeit. Siehe auch obige Bemerkung. <label id="EnergyLevels"> <tag>Robot energy levels:</tag> Der Roboter wird seine Energie nur ungefhr wissen. Diese Option entscheidet wieviele unterschiedliche Energie-Stufen es im Spiel gibt. </descrip> <sect1>Schu-Optionen<label id="Shot options"> <p> <descrip> <tag>Shot radius:</tag> Gre der Schsse. Sollte kleiner sein als der <ref id="RobotRadius" name="Roboter Radius">. <label id="ShotSpeed"> <tag>Shot speed:</tag> Schsse bewegen sich mit dieser Geschwindigkeit in die Richtung der Kanone plus der Geschwindigkeit des Roboters. <label id="ShootingPenalty"> <tag>Shooting penalty:</tag> Wenn der Roboter schiesst, nimmt er dabei selber Schaden. Dies ist der Faktor, mit dem die Schu-Energie multipliziert wird, um die Energie zu bekommen, die dem Roboter abgezogen wird. Wenn die Anzahl der Roboter gross ist, wird diese Zahl verkleinert, sodass man nie unverhltnismig viel Energie verliert. <label id="ShotMinEnergy"> <tag>Shot min energy:</tag> Die kleinste erlaubte Schu-Energie. Ein Roboter, der versucht mit weniger Energie zu schiessen wird gar nicht schiessen. <label id="ShotMaxEnergy"> <tag>Shot max potential energy:</tag> Die Roboter haben eine Schuss-Energie, die mit der Zeit zunimmt, diesen Wert aber nicht berschreitet. <label id="ShotEnergyIncreaseSpeed"> <tag>Shot potential energy increase speed:</tag> Gibt an, wie schnell die Schuss-Energie des Roboters (siehe oben) zunimmt. Einheit: Energie/Sekunde. </descrip> <sect1>Extra-Optionen<label id="Cookie_and_mine_options"> <p> <descrip> <tag>Cookie max energy:</tag> Die Energie, die man von einem Keks bekommt ist ein zuflliger Wert zwischen <tt>Cookie max energy</tt> und <tt>Cookie min energy</tt> . <tag>Cookie min energy:</tag> Siehe oben. <tag>Cookie frequency:</tag> Die Zahl der Kekse pro Sekunde, die durchschnittlich auftauchen werden. <tag>Cookie radius:</tag> Gre der Kekse. <tag>Mine max energy:</tag> Die Minen-Energie ist ein Zufallswert zwischen <tt>Mine max energy</tt> und <tt>Mine min energy</tt> <tag>Mine min energy:</tag> Siehe oben. <tag>Mine frequency:</tag> Die Anzahl der Minen pro Sekunde, die durschnittlich auf dem Spielfeld erscheinen werden. <tag>Mine radius:</tag> Gre der Minen. <tag>Cookie colour:</tag> Farbe der Kekse in hexadezimaler Schreibweise, angegeben in rot-gruen-blau Werten. <tag>Mine colour:</tag> siehe oben. </descrip> <sect1>Zeit Optionen<label id="Time options"> <p> <descrip> <label id="Timeout"> <tag>Timeout:</tag> Dies ist die maximale Dauer eines Spiels. Wenn die Zeit abgelaufen ist, werden alle verbleibenden Roboter gekillt, ohne noch irgendwelche Punkte zu bekommen. <label id="MaxTimestep"> <tag>Max timestep:</tag> Wenn der Computer zeitweise sehr langsam wird, kann die Zeit zwischen updates ziemlich lang werden. Indem man diese Option setzt, kann sich das Programm in solchen Fllen knstlich verlangsamen und damit die "realtimeness" verletzen. <label id="TimeScale"> <tag>Time scale:</tag> Setzt man Timescale grsser als 1, heisst das, dass die Spiel-Uhr schneller als eine "richtige" Uhr gehen wird. Diesen Wert zu verndern kann ntzlich sein wenn man entweder den Robotern mehr Zeit geben will, oder wenn man (k)einen schnellen Computer hat und man das Spiel beschleunigen will. <label id="UpdateInterval"> <tag>Update interval:</tag> Diese Option gibt die Zeit zwischen Roboter-updates an, d.h. wie oft der Roboter-Zustand verndert wird. Sie wird nicht von der "Time Scale"-Option beinflusst, und kann nicht verndert werden, wenn das Programm luft. Die Genauigkeit ist 1/100 s(je nach Genauigkeit des Systems auf dem RealTimeBattle luft). <label id="RobotStartupTime"> <tag>Robot startup time:</tag> Legt die Zeit zwischen dem ausfhren der Roboter und dem Anfang der Sequenz fest. Wenn Roboter schwarz sind und keine Namen haben, solltest du die RobotStartupTime etwas erhhen(voreingestellt ist 1 Sekunde). Dies kann z.B. passieren wenn es viele Roboter gibt, die Roboter ziemlich gro sind, man auf einem langsamen Rechner arbeitet. <label id="CPUOptions"> <tag>Start CPU time:</tag> Im <ref id="Command line options" name="Competition-Modus"> ist die CPU-Zeit eines Roboters begrenzt. Am Anfang einer Sequenz bekommt ein Roboter diese Menge an CPU-Zeit, die er verbrauchen darf. <tag>Extra CPU time:</tag> Wenn die anfngliche CPU-Zeit verbraucht ist, bekommt der Roboter die Menge an Extra-CPU-Zeit. <tag>Extra CPU period:</tag> Die Extra CPU-Zeit muss eine ganze CPU-Periode reichen, sonst stirbt der Roboter im aktuellen Spiel. <label id="CPUWarningPercentage"> <tag>CPU warning percentage:</tag> Wenn der Roboter diesen Betrag an CPU-Zeit aufgebraucht hat, bekommt er eine Warnung zugeschickt. <tag>Process check interval:</tag> Im <ref id="Command line options" name="Competition-Modus"> entscheidet dieser Wert, wie oft das Programm den CPU-Verbrauch berprfen wird. <label id="LoggingFrequency"> <tag>Logging frequency:</tag> Um die Gre der <ref id="log_files" name="log files"> zu reduzieren kannst du diesen Wert vergrssern. Mit dieser Option werden <ref id="RobotPositionInfo" name="robot position info"> nur jedes 'n'te <ref id="UpdateInterval" name="Update-Interval"> aktualisiert. </descrip> <sect1>Fenstergren<label id="Window sizes"> <p> Hier kann man die Gre fr verschiedene Fenster setzen, nmlich das <ref id="Arena_window" name="Arena-Fenster">, das <ref id="Message window" name="Message-Fenster">, das <ref id="Score window" name="Score-Fenster"> und das <ref id="Statistics window" name="Statistik-Fenster">. Man kann auch die Position fr die ersten drei und das <ref id="Control window" name="Kontroll-Fenster"> angeben. <sect1>Verschiedene Optionen<label id="Miscellaneous options"> <p> <descrip> <label id="ArenaScale"> <tag>Arena scale:</tag> "Overall Scale" der Arena. Ein Wert von 2 ergibt eine doppelte Seitenlnge, d.h. eine viermal so groe Arena. <label id="Fast forward factor"> <tag>Fast forward factor:</tag> Legt die Geschwindigkeit fest mit der das Spiel mittels fast forward oder rewind abluft(siehe auch <ref id="replaying" name="Replay">). <label id="Max robots allowed simultaneously"> <tag>Max. Anzahl von Robotern, die gleichzeitig erlaubt sind:</tag>Erlaubt dem User die maximal erlaubte Anzahl an Robotern in einer Sequenz zu verndern. Wenn es zu viele sind, kann sich das Betriebssystem beschweren (bei wievielen dies passiert ist systemabhngig). <tag>Background colour:</tag> Hintergrundfarbe und... <tag>Foreground colour:</tag> ...Vordergrundfarbe der Arena. <label id="Colour for RTB messages"> <tag>Farbe der RTB-Nachrichten:</tag> Farbe des Textes der RTB-Nachrichten. <label id="Robot search path"> <tag>Robot search path:</tag> Dies ist eine durch Doppelpunkte getrennte Liste von Verzeichnissen die nach Robotern durchsucht werden, wenn ein <ref id="Start new tournament window" name="neues Turnier"> anfngt. Das Verzeichnis <tt>Robots</tt> im Installationsverzeichnis (Standard-Wert: <tt>/usr/local/games/RealTimeBattle</tt>) wird immer durchsucht. <label id="Arena search path"> <tag>Arena search path:</tag> hnlich wie oben, allerdings fr Arena-Dateien, nicht fr Roboter. Das Verzeichnis <tt>Arenas</tt> im Installationsverzeichnis (Standard-Wert: <tt>/usr/local/games/RealTimeBattle</tt>) wird immer durchsucht. </descrip> <!-- ################ Arena Construction ################## --> <sect>Arena-Konstruktion<label id="Arena construction"> <p> In ReatTimeBattle ist es sehr einfach, eine eigene Arena zu erstellen. Die Sprache, die dafr verwendet wird besteht aus lediglich elf Kommandos, und es gibt nur vier grundlegende Bauelemente: Linie, Kreis, 'Innenkreis' und Bogen. Dies ist hauptschlich aus Grnden der Programm-Geschwindigkeit so, da man bei Kreisen und Linien sehr einfach prfen kann, ob es eine Kollision gab. Kreise und 'Innenkreise' hindern die Roboter daran, in einen Kreis hinein- oder aus einem Kreis herauszugelangen. Die Linie und der Bogen hindern Roboter daran an der Lngsseite (bzw.an der gekrmmten Seite beim Bogen) hineinzugelangen, allerdings wird das an den zwei Enden der Linie nicht geprft. Daher muss man an jedes Ende einer Linie einen Kreis anhngen, um es zu einem soliden Objekt zu machen. Die Kommandos <tt>polygon</tt>, <tt>closed_polygon</tt> und <tt>poly_curve</tt> sollen diese Prozedur vereinfachen, und ergeben immer ein richtiges Objekt. Alle Winkel sind in der Voreinstellung im Bogenma. Das kann jedoch durch den Befehl <tt>angle_unit degrees</tt> gendert werden. Man sollte beachten, dass RTB nicht berprft ob eine Arena-Datei eine korrekte Arena ergibt, das ist einzig und allein deine Sache. Allerdings wird RTB sich beschweren, wenn du die Regeln der Arena-Konstruktionssprache nicht beachtest. Arena-Dateien sollten mit <tt>.arena</tt> enden und im Arena-Verzeichnis untergebracht werden, so dass RealTimeBattle sie finden kann. Die <tt>bounce coefficient</tt>- und <tt>hardness</tt>-Parameter, die an alle Mauer-erzeugenden Kommandos bergeben werden, legen das Material der Mauer fest. Beides sind Werte zwischen 0 und 1. Hrtere Mauern beschdigen kollidierende Roboter mehr, und ein hherer Bounce-Koeffizient brigt sie dazu, besser abzuprallen. Du solltest dir auch mal die Arenas die mit RTB mitgeliefert werden ansehen und von den Beispielen lernen. <sect1>Arena Kommandos<label id="Arena_commands"> <p> Ein Kommando besteht aus dem Kommandonamen und den Parametern, die durch Whitespaces getrennt werden. Du solltest immer sicherstellen, dass die richtige Anzahl der Parameter bergeben wird. In der Kommando-Liste werden die Parameter in eckigen Klammern angegeben. <descrip> <tag>scale [Wert]</tag> Dieser Wert multipliziert mit der <ref id="ArenaScale" name="arena scale"> ergibt den Skalierungsfaktor mit dem alle Koordinaten multipliziert werden. Dieses Kommando muss, wenn es verwendet wird, das este Kommando in der Datei sein, Standardwert ist 1.0. <tag>angle_unit [unit]</tag> Schaltet zu der ausgewhlten Winkel-Einheit um. Mgliche Einheiten sind <tt>degrees</tt> (Gradma) or <tt>radians</tt> (Bogenma). Die Voreinstellung verwendet das Bogenma. <tag>boundary [links] [oben] [rechts] [unten]</tag> Diese Begrenzungen umschliessen das Gebiet, in der Roboter, Kekse und Minen aufgestellt werden. Ausserdem legen sie das sichtbare Gebiet im <ref id="Arena_window" name="Arena-Fenster"> fest. Dieses Kommando wird unbedingt bentigt und nur <tt>scale</tt> darf vorher verwendet werden. <tag>inner_circle [Bounce] [Hrte] [Mittelpunkt_x] [Mittelpunkt_y] [Radius]</tag> Roboter sind im inneren dieses Kreises gefangen. <tag>circle [Bounce] [Hrte] [Mittelpunkt_x] [Mittelpunkt_y] [Radius]</tag> Eine Mauer in Form eines Kreises. <tag>line [Bounce] [Hrte] [Dicke] [Start_x] [Start_y] [Ende_x] [Ende_y]</tag> Erzeugt eine Linie. Sie hindert den Roboter nur daran an der Lngsseite durchzudringen, daher mssen Kreise an die Enden gesetzt werden. <tag>arc [Bounce] [Hrte] [Dicke] [Mittelpunkt_x] [Mittelpunkt_y] [Innenradius] [Auenradius] [Winkel1] [Winkel2]</tag> Ein Bogen ist ein Kreissegment zwischen zwei Winkeln. Genau wie die Linie bentigt der Bogen zwei Kreise an seinen Endpunkten. <tag>polygon [Bounce] [Hrte] [Dicke] [Anzahl der Seiten] ([Mittelpunkt_x] [Mittelpunkt_y])...</tag> Dieses Kommando wird eine Menge Kreise erzeugen, die durch Linien verbunden sind, und dadurch ein Polygon-hnliches Gebilde schaffen. <tag>closed_polygon [Bounce] [Hrte] [Dicke] [Anzahl der Seiten] ([Mittelpunkt_x] [Mittelpunkt_y])...</tag> hnlich wie ein Polygon, aber die erste und letzte Seite sind auch durch eine Linie verbunden. <tag>poly_curve [Bounce] [Hrte] [Dicke] [Start_x] [Start_y] [Richtung_x] [Richtung_y] ([Befehlsargumente ...]) ...</tag> Die <tt>poly_curve</tt> ist das mchtigste der Arena-Kommandos. Sie wird genutzt im Wnde aus Linien und Bgen zu bauen. Nach jeden Abschnitt hatt man eine aktuelle Position und eine aktuelle Richtung, die si It is used to build walls with lines and arcs. At each step you have a current position and direction, which are affected by the subcommands. The last subcommand must be <tt>C</tt> or <tt>Q</tt>. <descrip> <tag>L [length]</tag> Draw a line with given length in the current direction. <tag>T [angle]</tag> Turn the current dircetion. <tag>A [angle] [radius]</tag> Draw an arc. <tag>C</tag> Finish by connecting with the starting point. <tag>Q</tag> Quit. </descrip> <tag>exclusion_point [Position_x] [Position_y]</tag> Wenn die Arena innerhalb der Begrenzungen aus mehreren getrennten Gebieten besteht, solltest du alle bis auf eins ausschliessen, indem du "Exclusion-Punkte" setzt. Alle Punkte von denen aus man eine gerade Linie bis zu einem "Exclusion-Punkt" ziehen kann, ohne eine Mauer zu berschreiten, gelten als ausserhalb der Arena. </descrip> </article> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������realtimebattle-1.0.8/Documentation/German/RealTimeBattle.txt����������������������������������������0000644�0001750�0001750�00000210762�10320530157�022275� 0����������������������������������������������������������������������������������������������������ustar �moi�����������������������������moi�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� RealTimeBattle Benutzer-Handbuch, Version 1.0.8 Erik Ouchterlony and Ragnar Ouchterlony, Johannes Nicolai (jonico@users.sourceforge.net) 4. Oktober 2005 Deutsche bersetzung von Uwe Hermann, Falko Menge und Johannes Nicolai ______________________________________________________________________ Table of Contents 1. Einfhrung 1.1 Weitere Informationen 1.2 Systemvoraussetzungen 1.3 Hintergrundinformationen 1.4 Lizenz 1.5 Bug Reports 1.6 Deutsche bersetzung 2. Bedienung des Programms 2.1 Kommandozeilenparameter 2.2 Kontroll-Fenster 2.3 Neues Turnier-Fenster ffnen 2.4 Roboter- und Arena-Verzeichnisse 2.5 Arena-Fenster 2.6 Score-Fenster 2.7 Nachrichten-Fenster 2.8 Options-Fenster 2.9 Statistik-Fenster 2.10 Spiel ohne Grafiken 2.11 Turnier-Dateien 2.12 Log-Dateien 2.13 Replaying 2.14 Statistik-Datei 3. Aufbau des Programms 3.1 Roboterbewegung 3.2 Energie 3.3 Das Radar 3.4 Die Position des Robters 3.5 Schieen 3.6 Kollisionen 3.7 Kekse und Minen 3.8 Zeit 3.9 Ein Spiel 3.10 Eine Sequenz 3.11 Ein Turnier 4. Roboter-Programmierung 4.1 Nachrichten lesen 4.2 Messagetypes.h 4.3 Schummeln 4.4 Nachrichten an Roboter 4.5 Nachrichten von Robotern 5. Optionen 5.1 Umwelt-Optionen 5.2 Roboter Optionen 5.3 Schu-Optionen 5.4 Extra-Optionen 5.5 Zeit Optionen 5.6 Fenstergren 5.7 Verschiedene Optionen 6. Arena-Konstruktion 6.1 Arena Kommandos ______________________________________________________________________ 1. Einfhrung Dies hier ist die Anleitung zu RealTimeBattle. Sie beschreibt wie man das Programm bedient, wie es funktioniert, wie man eigene Roboter programmiert und wie man sich eine eigene Arena erstellen kann. RealTimeBattle ist ein "Programmier-Spiel" fr Unix, in dem Programm- gesteuerte Roboter gegeneinander kmpfen. Das Ziel ist es, alle Gegner zu vernichten, wobei man den Radar einsetzt um die Gegend abzutasten, und die Kanone, um die Gegner abzuschieen. Obwohl die Umgebung in der sich die Roboter bewegen relativ einfach gestaltet ist, ist es nicht einfach einen intelligenten Roboter zu programmieren. RealTimeBattle wurde so geschrieben, dass es leicht zu bedienen, flexibel und schnell ist. Die Idee dahinter war, das Programm zum testen von intelligenten Algorithmen zu verwenden, oder auch einfach zur Unterhaltung. Features: Das Spiel wird in Echtzeit ausgefhrt; die Roboter laufen als Child-Prozesse von RealTimeBattle. Die Roboter kommunizieren mit dem Programm durch standard input und output(stdin und stdout). Die Roboter knnen in nahezu jeder Programmiersprache geschrieben werden. Bis zu 120 Roboter knnen gleichzeitig gegeneinander antreten. Fr die Kommunikation wird eine simple "messaging"-Sprache benutzt, die es einfach macht neue Roboter zu schreiben. Die Roboter verhalten sich wie richtige physikalische Objekte. Man kann sich eigene Arenen bauen. Viele Konfigurationsmglichkeiten. Externe Clients knnen das Spielgeschehen anzeigen. Rudimentrer Team-Support ist direkt im Spiel eingebaut, Team Frameworks erlauben weitere Koordination der Roboter. 1.1. Weitere Informationen Mehr Informationen gibt's in den Dateien INSTALL, AUTHORS, BUGS, TODO, README, FAQ und ChangeLog . Aktuellere Informationen kann man auf der RealTimeBattle Homepage <http://realtimebattle.sourceforge.net/> finden, wo es auch verschiedene Roboter, Neuigkeiten zu diversen Wettkmpfen, sowie dieses Handbuch in mehreren Dateiformaten gibt. 1.2. Systemvoraussetzungen Die Hardware-Voraussetzungen hngen sehr davon ab, was man machen will. Ein paar Roboter antreten zu lassen, sollte auf nahezu jedem Rechner auf dem Linux(oder ein anderes Unix) luft mglich sein. Der Bedarf an schnellerer Hardware steigt jedoch mit der Zahl der Roboter, die man gleichzeitig aufs Schlachfeld schickt; 120 gut programmierte Roboter gleichzeitig kmpfen zu lassen, kann einem normalen PC schon einiges abverlangen. RealTimeBattle gibt es nur fr Unix. Es wird auf einem Linux-Rechner geschrieben, sollte sich aber auch auf anderen Unix-Derivaten kompilieren lassen. Der ``Competition-Modus'' ist im Moment nur verfgbar, wenn man unter Linux das /proc-Verzeichnis aktiviert hat, daRealTimeBattle Informationen ber die momentane CPU-Last erhalten muss. Die einzige bentigte Software ist gtk+ <http://www.gtk.org>, das fr die grafische Benutzeroberflche verwendet wird. 1.3. Hintergrundinformationen Das Projekt wurde im August 1998 ins Leben gerufen. Die Inspiration dazu war RobotBattle <http://www.robotbattle.com/>, ein sehr interessantes Spiel, das wir frher gern gespielt haben. Die damalige Version von RobotBattle hatte jedoch zwei entscheidende Nachteile: Das Spiel gibt es nur fr Windows. Die Roboter sind in einer eigenen Programmiersprache geschrieben, was die Mglichkeiten, intelligente Roboter zu schreiben zu sehr einschrnkt. RobotBattle wurde inzwischen weiterentwickelt, ist aber nach wie vor nicht fr andere Betriebssysteme erhltlich. Daher haben wir uns entschieden, eine Unix-Version zu entwickeln, die viele Features eines modernen Betriebssytems nutzt. 1.4. Lizenz RealTimeBattle unterliegt, ganz im Sinne Linux-Philosophie, der GNU General Public License <http://www.gnu.org/copyleft/gpl.html>. Offizielle Versionen von RealTimeBattle werden von den Autoren freigegeben werden. Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony, weitere Entwickler sind in der AUTHORS Datei zu finden. 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. 1.5. Bug Reports Wenn du etwas in diesem Softwarepaket findest, das nicht funktioniert, nicht richtig funktioniert, fehlt, falsch geschrieben, oder einfach nur verwirrend ist, schicke einen Bug Report an RealTimeBattle Homepage <http://sourceforge.net/bugs/?group_id=561>. 1.6. Deutsche bersetzung Diese bersetzung unterliegt der GNU General Public License. Nhere Infomationen gibt es unter http://www.fsf.org/copyleft/gpl.html <http://www.fsf.org/copyleft/gpl.html> rtb-docs.de -- german translation of the RTB documentation Copyright (C) 1999-2005 Uwe Hermann, Falko Menge, Johannes Nicolai 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. Die deutsche bersetzung(fr RTB-Version 0.9.7) wurde von Uwe Hermann <uwe@hermann-uwe.de> <mailto:uh1763@bingo-ev.de> am 16. Mai fertiggestellt. Ich habe mir Mhe gegeben die englische Anleitung mglichst genau zu bersetzen, und trotzdem ein gut verstndliches Deutsch zu erhalten. Ich hoffe dies ist mir, trotz einiger Ausdrcke die mir selber nicht sonderlich gefallen, einigermaen gelungen. Fehler, Verbesserungsvorschlge o.. in der bersetzung bitte an uh1763@bingo-ev.de schicken. Ich mchte mich bei Daniel Reutter <reutter@dhreutter.de> dafr bedanken, dass er die bersetzung durchgelesen hat, und mich auf "ein paar" Fehler aufmerksam gemacht hat :-). Die neueste Version der bersetzung ist unter http://realtimebattle.sourceforge.net/Documentation/German/ erhltlich. Changelog: 4. Oktober 2005 (von Johannes Nicolai): Anpassung an Version 1.0.8 Aktuellere Links eingefgt weitere kleinere Verbesserungen 23. November 2004 (von Falko Menge): Anpassung an Version 1.0.7 Bugs 206688 und 458248 behoben weitere kleinere Verbesserungen 23. November 2004 (von Falko Menge): Anpassung an Version 1.0.5 Rev 1 17.-22. November 2004 (von Falko Menge): kleinere Fehler behoben 4. Februar 2000: Anpassung an Version 1.0.2 Alle 'Tournament's in 'Turnier'e gendert Tippfehler ausgebessert 7. September 1999: Anpassung an Version 0.9.11(und dadurch natrlich auch an 0.9.10) 16. August 1999: kleinere Verbesserungen. bersetzung an Version 0.9.8 und dann 0.9.9 angepasst. 21. Mai 1999: einige Fehler verbessert. Datum der deutschen bersetzung hingefgt. Anfang der GPL hinzugefgt(bisher war nur ein Link zur FSF- Homepage da) 2. Bedienung des Programms Dieses Kapitel beschreibt, wie man RealTimeBattle bedient. Wenn es Dir langweilig erscheint, die ganze Anleitung durchzulesen, kannst du auch nach dem Try-and-Error-Prinzip vorgehen, und nur nachschauen wenn du irgendwo nicht weiterkommst. Es ist aber eine gute Idee den kurzen Abschnitt ber ``Kommandozeilen-Parameter'' zu lesen. Beachte auch, dass es keine eingebaute Hilfe im Programm selber gibt - um Hilfe zu erhalten musst du dieses Dokument lesen. 2.1. Kommandozeilenparameter An der Kommandozeile gibt es die Mglichkeit, zwei Optionen zu setzen, die das allgemeine Verhalten von RealTimeBattle kontrollieren. Hier kannst du die Options-Datei whlen, die die Standardwerte der ``Optionen'' festlegt. Man kann auch auswhlen, in welchem Spielmodus das Programm laufen wird: Debug-, Normal- oder Competition-Modus. ______________________________________________________________________ Programmaufruf: RealTimeBattle [Optionen] Optionen: --debug_mode, -d Debug-Modus --debug_level [0-5], -D Setzt den anfnglichen Debug-Level. Impliziert -d --normal_mode, -n Normal-Modus (standard) --competition_mode, -c Competition-Modus --no_graphics, -g es werden keine Grafiken angezeigt --option_file [file], -o whlt die Options-Datei (standard: $HOME/.rtbrc) --log_file [file], -l erzeuge eine Log-Datei; wenn als Datei '-' angegeben wird, wird nach stdout geloggt. --tournament_file [file], -t Angabe einer Turnier-Datei um automatisch ein Turnier zu starten. --statistics_file [file], -s Datei in die Statistiken geschrieben werden, wenn automatisch gestartet wird. --message_file [file], -m Nachrichten in die Datei "file" umleiten. '-' entspricht stdout. Wenn die Logs und die Nachrichten nach STDOUT umgeleitet werden, wird '-m' ignoriert. --replay [file] -r Ein Logfile das abgespielt werden soll. Wenn '-' als Datei angegeben wird, wird von STDIN gelesen. --help, -h zeigt diese Informationen --version, -v gibt die Versionsnummer aus --port_number -p legt den Port fest, an denen externe Clients sich verbinden knnen (Standard: 32134) ______________________________________________________________________ Die port_number Option ist nur dann verfgbar, wenn RealTimeBattle mit der --enable-network Option compiliert wurde (siehe Datei INSTALL). Die Unterschiede zwischen den drei Comepetition-Modi sind in folgender Tabelle zusammengefasst. ______________________________________________________________________ +---------------------------------------+-------+--------+-------------+ | Modus | Debug | Normal | Competition | +---------------------------------------+-------+--------+-------------+ | Debug Kommando verfgbar | Ja | Nein | Nein | | Pause whrend des Spiels | Ja | Ja | Nein | | Programm schrittweise ausfhrbar | Ja | Nein | Nein | | CPU-Zeit der Roboter ist unbeschrnkt | Ja | Ja | Nein | +---------------------------------------+-------+--------+-------------+ ______________________________________________________________________ 2.2. Kontroll-Fenster New tournament: Ein neues Turnier wird gestartet. Die Sektion ``Neues Turnier- Fenster ffnen'' gibt mehr Informationen darber. Replay tournament: ``Ein Spiel ablaufen lassen''. Du wirst das ``Logfile'' des Spiels auswhlen mssen das du studieren willst. Pause: Hlt das Spiel an. Im ``Competition-Modus'' wird erst am Ende des aktuellen Spiels angehalten. End: Beendet das aktuelle Turnier. Options: ffnet das ``Options-Fenster''. Statistics: Zeigt das ``Statistik-Fenster'' an. Show arena window: Diese Box kann dazu benutzt werden die drei Fenster, die whrend eines laufenden Spieles zu sehen sind, zu verstecken oder anzuzeigen, nmlich: das ``Arena-Fenster'', das ``Score- Fenster'' und das ``Nachrichten-Fenster''. Quit: Beendet das Programm. Im ``Debug-Modus'' stehen weitere Mglichkeiten zur Verfgung. Sie dienen dazu, beim debuggen von Robotern zu helfen. Es ist mglich, laufende Prozesse (und somit Roboter) zu debuggen. Wenn man gdb benutzt, muss man folgendermaen starten: gdb Robotername Prozessnummer. Step: In einem ``angehaltenen'' Spiel wird dieser Button das Spiel um eine Zeiteinheit voranschreiten lassen. Dies ist sehr ntzlich, wenn man einen Roboter im Debugger am Laufen hat, da der Roboter sonst mit Nachrichten berflutet werden wrde. End game: Das aktuelle Spiel wird beendet. Das hat den selben Effekt wie ihn ein ``Timeout'' haben wrde. Kill marked robot: Im Debug-Modus kann man einen Roboter im ``Score-Fenster'' markieren. Dieser Roboter wird sterben, wenn man diesen Button drckt. Debug level: Den Debug-Level zu ndern ist eine Mglichkeit, den Robotern mitzuteilen, welche Nachrichten sie senden sollen. Dieser Wert liegt zwischen 0 und 5, wobei 0 bedeutet, dass berhaupt nicht debuggt wird, und 5 ist der hchste Debug-Level, d.h. alle Debug-Nachrichten sollen gesendet werden. Beim Abspielen einer Logdatei (nicht von STDOUT) gibt es eine Menge Mglichkeiten die Wiedergabe zu steuern. Siehe dazu auch das Kapitel ber ``Replaying''. 2.3. Neues Turnier-Fenster ffnen Um Roboter und Arenas fr ein neues Turnier auszusuchen, musst du die Dateien auf der rechten Seite markieren und den add-Knopf drcken. Die ausgesuchten Dateien werden links angezeigt. Sie knnen entsprechend auch wieder entfernt werden. Ein ``Turnier'' besteht aus einer bestimmten Zahl von ``Sequenzen'' von ``Spielen''. In jeder Sequenz spielen die gleichen Roboter in allen Spielen. Hier whlt man die Anzahl der Spiele und Sequenzen, und auch die Anzahl der Roboter in jeder Sequenz. Wenn du vorhast, jedes Spiel mit allen Robotern zu spielen, ist es ratsam, nur eine Sequenz zu whlen und stattdessen die Anzahl der Spiele zu erhhen. Der Grund dafr ist, es zu vermeiden alle Roboter-Prozesse neu zu starten, da dies eine Weile dauern kann, besonders wenn viele Roboter gegeneinander antreten. Es ist auch mglich eine Turnier-Datei zu laden oder das aktuelle Turnier zu speichern. Das letzte gespielte Turnier ist in /tmp/rtb/tmp.tour gespeichert und wird immer angezeigt wenn dieses Fenster geffnet wird. Wenn die Datei nicht existiert wird ein leeres Turnier angezeigt. Du musst mindestens zwei Roboter und eine Arena auswhlen um starten zu knnen. 2.4. Roboter- und Arena-Verzeichnisse Damit das Programm die Roboter und die Arenas findet, muss man zwei Optionen setzen: den ``Roboter-Suchpfad'' und den ``Arena-Suchpfad''. Die Unterverzeichnisse Robots und Arenas im Installationsverzeichnis (Standard-Wert: /usr/local/games/RealTimeBattle), das vor dem Kompilieren im Haupt-Makefile festgelegt wird, werden auf jeden Fall durchsucht. Wenn man ein neues Verzeichnis erzeugt, oder wenn man RealTimeBattle in ein anderes Verzeichnis installiert hat, muss man diese Optionen setzen. 2.5. Arena-Fenster Hier findet das Gemetzel statt. Wenn du das Spiel detaillierter betrachten willst, kannst du die Zoom-Knpfe benutzen oder +, - oder 0 drcken. Die Roboter werden als farbige Kreise mit einer Spitze in dem Kreis, die die Radar-Richtung anzeigt, die dicke Linie ist die Kanone und die dnne Linie zeigt in Bewegungs-Richtung. 2.6. Score-Fenster In diesem Fenster werden alle Roboter aufgelistet, die in der aktuellen Sequenz "mitspielen". 2.7. Nachrichten-Fenster Hier werden Nachrichten angezeigt, die die Roboter mittels ``Print und Debug'' senden. Die neuesten Nachrichten erscheinen ganz oben. Du kannst das Fenster leeren und auswhlen nur die neuen Nachrichten von einem bestimmten Roboter zu sehen. 2.8. Options-Fenster Hier kannst du eine ganze Reihe von Optionen ndern. Im ``Optionen- Kapitel'' kannst du detaillierte Informationen zu jeder Option erhalten. Die nderungen werden erst wirksam, wenn entweder der apply- oder der OK-Knopf gedrckt werden. Man kann seine Optionen auch in eine Datei sichern: Save options wird die Optionen in eine Datei deiner Wahl speichern und Save as default wird sie in die Datei .rtbrc in deinem Homeverzeichnis sichern. Der Default-Button wird alle Optionen auf ihre Standardwerte zurcksetzen. 2.9. Statistik-Fenster Man kann sich die Statistiken des aktuellen Turniers auf verschiedene Arten anzeigen lassen: Statistiken ber einzelne Roboter, die Ergebnisse eines Spieles (game), die Gesamtergebnisse der Sequenz (sequence total) oder die Gesamtergebnisse(total) des Turniers. Mit den Pfeiltasten kann man zum ersten Element, eines zurck, eines vorwrts oder zum letzen Element gelangen. Der Balken in der Mitte ist ein Indikator dafr, was gerade angezeigt wird; Wenn man auf den Balken drckt, werden die Statistiken erneuert, vorausgesetzt das Spiel luft gerade. Wenn du gtk+1.1.x verwendest ist es auch mglich, die einzelnen Spalten zu sortieren, indem man ins entsprechende Titel-Kstchen klickt. 2.10. Spiel ohne Grafiken Wenn man will, kann man RealTimeBattle auch ganz ohne Grafiken laufen lassen. Dies kann besonders ntzlich sein, wenn man eine lange Reihe von Tests oder einen Wettbewerb durchfhrt. Man hat zwei Mglichkeiten diese Option zu benutzen: Entweder man verwendet die Option -g beim Programmstart, oder man schaltet die Grafiken schon beim Kompilieren ab (die Datei INSTALL gibt dazu nhere Informationen). Die letze Alternative ist besonders ntzlich, da die ausfhrbare Datei kleiner wird und daher auf Rechnern mit weniger Arbeitsspeicher schneller luft. Das ermglicht es auch, RealTimeBattle auf Rechnern laufen zu lassen, auf denen kein gtk+ installiert ist. Wenn man ohne Grafiken arbeitet, muss man ein Turnier-file angeben, andernfalls wird nichts passieren. Es ist auch zu empfehlen eine Log- Datei und/oder Statistik-Datei zu erzeugen, wenn man die Ergebnisse wissen will :-) 2.11. Turnier-Dateien Die Turnier-Datei wird als ``Kommandozeilenparameter'' angegeben. Wenn diese Datei verwendet wird, wird das Turnier automatisch anfangen und beendet werden. Wie man die Statistiken speichert steht im Kapitel ``Statistik-Datei''. Eine Turnier-Datei besteht aus 5 Schlsselwrtern. Alle diese Schlsselwrter knnen mehrmals benutzt werden, aber man muss sich dessen bewusst sein, dass nur das letzte Schlsselwort, das eine Zahl als Parameter annimmt, gezhlt wird. Alle Schlsselwrter sollten mit einem Strichpunkt beendet werden. Games/Sequence oder g/s: Als Parameter muss man entweder eine Zahl oder ein * angeben. Die Zahl legt fest wieviele Spiele pro Turnier gespielt werden sollen. Das Sternchen bedeutet, dass das Programm die genaue Anzahl von Arenas hernimmt und diese Zahl als Parameter verwendet. Der voreingestellte Wert ist 1. Robots/Sequence oder r/s: Als Parameter muss man entweder eine Zahl oder ein * angeben. Die Zahl legt fest wie viele Roboter in jeder Sequenz antreten. Das Sternchen bedeutet, dass das Programm die Anzahl der Roboter als Parameter nimmt. Der Default-Wert ist hier 2. Sequences oder seq: Als Parameter muss man entweder eine Zahl oder ein * angeben. Die Zahl legt die Anzahl der Sequenzen die im Turnier gespielt werden sollen fest. Wenn man ein Sternchen angibt, errechnet das Programm aus der Anzahl der Roboter und der Anzahl der Roboter pro Sequenz eine Zahl, soda alle Roboter genau einmal gegeneinander antreten. Diese errechnete Zahl wird dann als Parameter verwendet. Der Default-Wert ist 1. Robots oder r: Als Parameter wird eine oder mehrere Roboter-Datei(en) angegeben. Arenas oder a: Eine oder mehrere Arena-Dateien werden als Parameter bergeben. Datei-Argumente knnen wie folgt aussehen: Nur die Datei selber: Hier wird der Pfad nach der Datei durchsucht. Beispiel: Robot: empty.robot Der volle Pfad zur Datei + der Dateiname: Die angegebene Datei wird verwendet. Beispiel: Arena: /usr/local/Games/RealTimeBattle/Arenas/Circle.arena Alle Dateien im Pfad: Diese Angabe durchsucht den ganzen Pfad und verwendet alle gefundenen Dateien. Beispiel: Arena: * Ein bestimmtes Verzeichnis: Es wird das angegebene Verzeichnis durchsucht und alle gefundenen Dateien werden verwendet. Beispiel: Robot: /usr/local/Games/RealTimeBattle/Robots/* Es ist mglich Dateien mehr als einmal in die Turnier-Datei zu schreiben. Wenn du z.B. drei rotate_and_fire.robots haben willst, trage einfach drei mal rotate_and_fire.robot in die Turnier-Datei ein. Dies gilt genauso fr *. Beispiel Turnier-Datei: R: * Arenas: Circle.arena Square.arena G/S: 2 r/s: 3 Sequences: * 2.12. Log-Dateien Manchmal ist es ganz ntzlich, ein Spiel detailliert zu analysieren (``Replay''), oder es einfach nur aufzuheben, weil man es spter vielleicht noch brauchen knnte. Hierfr sind Log-Dateien sinnvoll. Gib -l als Kommandozeilenparameter an, wenn du RealTimeBattle startest, und dahinter den Dateinamen der Log-Datei, um dieses Feature zu aktivieren. Wenn du als Datei '-' angibst, wird nach stdout geloggt. Die Log-Datei ist wie folgt aufgebaut: Jede Zeile besteht aus einem Buchstaben, der den Typ der Information angibt, gefolgt von einer Liste von Argumenten die durch 'Whitespaces' getrennt sind. Die folgenden Informationen werden angegeben: Header: H [Spiele/Sequenz] [Roboter/Sequenz] [Sequenzen] [Roboter] Arena Info: A [Zeile aus der Arena Datei] Spielstart: G [Sequenznummer] [Spielnummer] Option: O [Option:Wert] Liste von Robotereigenschaften: L [Roboter-ID] [Roboterfarbe] [Robotername] Roboter Positions-Info: R [Roboter-ID] [x] [y] [Kanonen-Winkel] [Radar-Winkel] [Energie] Zeit: T [verstrichene Zeit] Nachricht ausgeben: P [Roboter-ID] [Nachricht] Cookie: C [Cookie-ID] [x] [y] Mine: M [Minen-ID] [x] [y] Schu: S [Schu-ID] [x] [y] [dx/dt] [dy/dt] Tod: D [Typ des gekillten Objekts] [Object-ID] [Wenn's ein Roboter war: erhaltene Punkte] [Position] 2.13. Replaying Du kannst ein aufgenommenes Spiel mit Hilfe seiner ``Log-Datei'' abspielen lassen, und zwar entweder aus dem ``Kontroll-Fenster'' heraus, oder indem du die ``Kommandozeilenoption'' "-r" verwendest. Beachte aber, dass du, wenn du Standard-Input als Log-Datei verwendest (``Kommandozeilenoption'' "-r-"), nicht viel mehr machen kannst als das Spiel anzusehen. Normalerweise kann man den Ablauf des Spiels folgendermaen beinflussen: Der Scroll-Balken ganz oben zeigt an, wie weit das aktuelle Spiel schon abgelaufen ist. Man kann an einen beliebigen Zeitpunkt springen, indem man an dem Scrollbalken zieht und ihn richtig positioniert. Fast Forward und Rewind funktionieren so, wie man es von CD- Spielern und Video-Gerten gewohnt ist. Die Geschwindigkeit kann mittels ``Fast Forward Factor'' gendert werden. Step forward und step backward knnen dazu verwendet werden zu studieren was im Detail passiert. Zuerst sollte man das Spiel allerdings auf ``Pause'' setzen. Mit den vier Buttons ganz unten kann man zwischen Spielen und Sequenzen hin- und herwechseln. 2.14. Statistik-Datei Die Statistik-Datei wird nur benutzt, wenn eine ``Turnier-Datei'' angegeben wurde. Die Statistiken werden in diese Datei gespeichert, wenn das Turnier zu Ende ist. Man kann die Statistiken aber auch mit dem save-Knopf im ``Statistik-Fenster'' manuell speichern. 3. Aufbau des Programms In diesem Abschnitt werden wir den Aufbau des Programms beschreiben, auerdem die Art, wie die Roboter sich bewegen, schieen und den Radar kontrollieren, wann Punkte vergeben werden, und wie ein Turnier aufgebaut ist. 3.1. Roboterbewegung Der Roboter verhlt sich wie ein Fahrzeug mit Rdern, er rollt mit einer leichten ``Roll-Reibung'' nach vorne und gleitet mit einer wesentlich hheren ``Gleit-Reibung'' zur Seite. Die dritte verlangsamende Kraft ist der ``Luftwiderstand'', der entgegen der Bewegungsrichtung des Roboters wirkt, und mit zunehmender Geschwindigkeit grer wird. Es gibt drei Wege, die Roboterbewegung zu beinflussen: ``Beschleunigen'', ``Rotieren'' und ``Bremsen''. Das Beschleunigen erhht die Geschwindigkeit des Roboters in die Richtung in die der Roboter schaut. Man kann die Geschwindigkeit nicht direkt kontrollieren, Beschleunigen ist der einzige Weg den Roboter vom Fleck zu bewegen. Wenn man den Roboter rotieren lsst, muss man beachten, dass dies nicht direkt die Richtung der Bewegung beinflusst, sondern nur die Richtung der sich der Roboter zuwendet. Die Gleit-Reibung wird die eigentliche Drehung des Roboters bewerkstelligen. Bremsen wird die Roll-Reibung des Roboters auf den Maximalwert erhhen. Das passiert, wenn die Rder blockiert sind, und der Roboter rutscht anstatt zu rollen. Vergiss nicht, die Bremse wieder zu lsen, wenn du wieder schneller werden willst. 3.2. Energie Der Zustand des Roboters wird anhand seiner Energie gemessen. Es gibt mehrere Mglichkeiten, Energie zu verlieren. der Roboter kann: von einem Schuss getroffen werden, mit einem anderen Roboter oder einer Mauer zusammenstoen, in eine Mine rennen oder einen Schuss abfeuern. Die einzige Methode, Energie zu gewinnen ist einen Keks zu essen. 3.3. Das Radar Das einzige Mittel, um Informationen ber die Umgebung zu bekommen ist das Radar. Jedes Mal, wenn der Roboter aktuallisiert wird, wird ihm eine ``Radar-Nachricht'' zugeschickt, die ihm Informationen ber das nchste Objekt in Radar-Richtung, d.h. Entfernung und Typ des Objekts gibt. Wenn das Objekt ein Roboter ist, wird auch die Energie dieses Roboters bekanntgegeben. Da die Radar-Informationen alles sind, was der Roboter ber seine Umwelt wei, ist es extrem wichtig das Radar mglichst gut zu nutzen. Auerdem ist es wichtig, das Radar richtig zu ``bewegen'', damit das Radar brauchbare Informationen sammeln kann. 3.4. Die Position des Robters Seit RealTimeBattle Version 1.0.5 ist es mglich, die Position des Roboter direkter zu bekommen. Anstatt die Umgebung mit dem Radar analysieren zu mssen und daraus die Position zu ermitteln, kann man RealTimeBattle so konfigurieren, dass es die ``Roboter Koordinaten'' bermittelt. Dieses Verhalten wird durch die Option ``Send robot coordinates'' gesteuert. 3.5. Schieen Schieen ist die beste Methode andere Roboter zu eliminieren. In RealTimeBattle bewegt sich jeder Schuss mit konstanter Geschwindigkeit, die sich aus der Summe der Roboter-Geschwindigkeit und der ``Schuss-Geschwindigkeit'' in die Richtung in die die Kanone zeigt, errechnet. Der Schuss wird solange weiterfliegen, bis er mit irgendeinem Objekt kollidiert. Wenn der Schuss abgefeuert wird, hat er eine bestimmte Energie, die den Schaden bestimmt, den ein getroffener Roboter erleiden wird. Die Energie ist jedoch begrenzt; die ``Mindest-Energie'' verbietet Schsse mit sehr geringer Energie, die man z.B. zum Abschieen von Minen htte verwenden knnen. Die ``Maximal-Energie'' wird von der momentanen potentiellen Schuss-Energie des Roboters begrenzt, die mit der Zeit zunimmt. Schieen ist jedoch nicht ohne Risiko, da jeder abgegebene Schuss den Roboter eine gewisse ``Energie'' kostet, die proportional zur Schuss- Energie ist. Wenn ein Keks oder eine Mine getroffen werden, werden sie zerstrt, unabhngig von der Schuss-Energie. Daher sollte man minimalste Schuss- Energien verwenden, wenn man Minen abschiet. Schsse, die kollidieren, werden nicht automatisch vernichtet, sondern ihre Energie wird gegeneinander aufgerechnet. Wenn die Schsse in die gleiche Richtung fliegen, wird ihre Energie aufaddiert, wenn sie in entgegengesetzte Richtungen fliegen, heben sich ihre Energien auf. 3.6. Kollisionen Roboter sind zerbrechliche Objekte, die von Kollisionen mit Mauern oder anderen Robotern Schaden erleiden. Bei Kollisionen verhalten sich die Roboter wie Gummiblle: sie springen zurck. Es gibt drei Faktoren, die ihr Verhalten beinflussen, der ``Bounce-Koeffizient'', der ``Hrte-Koeffizient'' und der ``Schutz-Koeffizient''. An der ``Vorderseite'' sind die Roboter aus anderem Material gebaut, das hrter ist und mehr Schutz gewhrt. Das kann ausgenutzt werden um andere Roboter zu rammen; man teilt so weit mehr Schaden aus, als man selber einstecken muss. 3.7. Kekse und Minen Kekse und Minen sind gleichwertige Objekte, mit dem einzigen Unterschied, dass man bein Einsammeln von Keksen Energie bekommt, und beim 'Einsammeln' von Minen Energie verliert. Kekse und Minen werden whrend des Spiels zufllig in der Arena auftauchen. Die Energie, die man von ihnen bekommt/verliert, und die Hufigkeit mit der sie erscheinen, kann durch ``Optionen'' kontrolliert werden. 3.8. Zeit Wie der Name des Programms schon andeutet, wird als Zeit die Echtzeit benutzt. Es ist einzig und allein die Aufgabe der Roboter, auf Signale und Nachrichten des Programms rechtzeitig zu antworten. Whrend des Spiels wird regelmssig die update-Funktion aufgerufen. Zwischen diesen Aufrufen mssen sich die Roboter die verbleibende CPU- Zeit aufteilen. Um Roboter daran zu hindern, nicht zuviel Prozessorleistung zu veranschlagen, ist ihre CPU-Zeit im ``Competition-Modus'' beschrnkt. Die entsprechenden ``CPU-Optionen'' geben dazu mehr Infomationen. Die 'Echtzeit-ness' kann aber unter Umstnden verndert werden. Man kann die Spielgeschwindigkeit beschleunigen oder verlangsamen, indem man die ``Timescale''-Option verndert, und es gibt eine Methode, die Unterbrechung des Spiels zu verhindern, wenn die Systemlast zu hoch ist. Wenn die Zeit zwischen zwei Updates lnger als ``MaxTimestep'' ist, wird das Spiel entsprechend langsamer gemacht. 3.9. Ein Spiel Am Anfang eines Spiels haben die Roboter eine zufllige Position auf dem Spielfeld, mit einer zuflligen Ausrichtung. Das Radar und die Kanone zeigen beide nach vorne und die ``potentielle Schuss-Energie'' ist Null. Das Ziel der Roboter ist es nun, solange wie mglich zu berleben und gleichzeitig mglichst viele andere Roboter zu zerstren. Ein Roboter erhlt einen Punkt fr jeden gegnerischen Roboter, den er berlebt. Ein Extra-Punkt geht jedoch auch an alle teilnehmenden Roboter. Roboter die gleichzeitig sterben, bekommen genausoviele Punkte, wie sie bekommen htten, wenn sie nicht gleichzeitig gestorben wren(d.h. sie bekommen einen halben Punkt fr den jeweils anderen, der gleichzeitig stirbt). Ein Spiel ist beendet wenn entweder die Anzahl der lebenden Roboter weniger als zwei ist, oder ``die Zeit abgelaufen ist.'' 3.10. Eine Sequenz Eine Sequenz ist eine Reihe von Spielen, in denen immer die gleichen Roboter kmpfen. Am Anfang der Sequenz werden die Roboter-Prozesse gestartet. Die Anzahl der Roboter in einer Sequenz ist, wegen der Beschrnkung auf maximal 256 offene File-Deskriptoren in Linux, auf 120 begrenzt. Es werden fr jeden Roboter zwei Pipes als Kommunikations-Kanle geffnet. Nachdem eine bestimmte ``Anzahl von Spielen'' gespielt wurden, werden die Roboter-Prozesse schliesslich gekillt. 3.11. Ein Turnier Ein Turnier ist eine Folge von Sequenzen. Die Anzahl der Roboter in einem Turnier ist(theorethisch) unbegrenzt. Eine beliebige Anzahl von Sequenzen ist erlaubt, um aber das Turnier fair zu gestalten, sollte man eine Anzahl von Sequenzen aussuchen, sodass alle Roboter die gleiche Anzahl von Spielen spielen (d.h. #Sequenzen = #Roboter pro Spiel / ggT(#Roboter pro Spiel, #Roboter im Turnier)). 4. Roboter-Programmierung Dieses Kapitel beschreibt, wie man eigene Roboter programmiert. Das wichtigste was man wissen muss ist die Messaging-Sprache, die aus ca. 35 Befehlen besteht die zur Kommunikation mit dem Server-Programm benutzt werden. Zudem kann es sehr hilfreich sein, die Beispiel- Roboter im Robots/-Verzeichnis zu studieren. 4.1. Nachrichten lesen Am Anfang jeder Sequenz werden die Roboter-Prozesse gestartet und jeder bekommt zwei Pipes zugewiesen, eine fr Input die andere fr Output. Diese Pipes sind mit stdin und stdout verbunden, so dass es fr die Roboter so aussieht, als wrden sie mit dem Server ber Standard Input und Standard Output kommunizieren. Dieses Verfahren ermglicht es, Roboter in nahezu jeder Programmiersprache zu schreiben. Es gibt nur ein Problem: der Roboter muss wissen, wann er eine Nachricht erhalten hat. Um das zu erreichen gibt es (mindestens) drei verschiedene Methoden: STDIN blockiert: Dies ist die einfachste Methode. Wenn man von stdin liest, wird das Program blockiert bis die nchste Nachricht ankommt. Daher kann man das Programm so schreiben als wre immer eine Nachricht vorhanden. Der Nachteil ist, dass man keine Berechnungen durchfhren kann whrend man auf neue Nachrichten wartet. Um die Blockieren-Methode auszuwhlen, sende folgende Roboter- Option solbald das Programm gestartet wurde: cout << "RobotOption " << USE_NON_BLOCKING << " " << 0 << endl; Beachte, dass das C++ Code ist. Wenn du nicht C++ verwendest gib einfach die obenstehenden Informationen auf stdout aus. endl bedeutet 'end of line'. Select: Wenn man die Unix Libc Funktion select verwendet, hat der Roboter mehr Kontrolle darber, wann er nach neuen Nachrichten schauen soll. Dies ermglicht dir, z.B. alle vorhandenen Nachrichten zu lesen, einige Berechnungen durchzufhren, Kommandos zu senden und dann auf weitere Nachrichten zu warten. Um mehr ber select zu lernen, lies bitte die Unix-Dokumentation (man- oder info-pages). Um die Select-Methode auszuwhlen sende folgede Roboter-Option solbald das Programm gestartet wurde: cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl; Beachte auch hier, dass das C++ Code ist. Signale: Wenn du willst kannst du RealTimeBattle sagen, der Roboter soll jedesmal ein Signal gesendet bekommen, wenn neue Nachrichten gesendet werden. Diese Methode ermglicht es dem Roboter stndig auf dem laufenden zu sein, auch wenn er gerade mit Berechnungen beschftigt ist. Verwende die Unix-Dokumentation um mehr ber Signale zu erfahren, oder alternativ: schau dir den Quelltext anderer Roboter an um mehr darber zu lernen. Um die Signal-Methode auszuwhlen sende folgede Roboter-Optionen solbald das Programm gestartet wurde: cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl; cout << "RobotOption " << SIGNAL << " " << SIGUSR1 << endl; Beachte auch hier, dass das C++ Code ist. Natrlich kannst du irgendein anderes Signal als SIGUSR1 whlen. Als kleine Hilfe diese drei Methoden zu implementieren, wurde der Roboter rotate_and_fire in drei verschiedenen, aber funktionell quivalenten, Versionen geschrieben. Du kannst diese gerne studieren und in deinen eigenen Robotern verwenden. Ein ''busy wait'', also ein wiederholtes Nachschauen, ob eine Nachricht da ist, ist keine gute Idee. Das wrde zu einer drastischen Verlangsamung des Spielablaufs fhren, schlimmer noch: im ``Competition-Modus'' wrde der Roboter ziemlich schnell wegen mangelnder CPU-Zeit draufgehen. 4.2. Messagetypes.h Die Datei Messagetypes.h ist eine gute Quelle fr Informationen ber die Messaging-Sprache. Es ist eine C/C++ Include-Datei, kann aber leicht fr die Benutzung mit anderen Programmiersprachen umgeschrieben werden. Dort findet man eine Auflistung von Nachrichten, Warning- Typen, Objekten, Spiel-Optionen und Roboter-Optionen. 4.3. Schummeln Da der Kampf der Roboter in Echtzeit und mit richtigen Prozessen stattfindet, gibt es mglicherweise Methoden Roboter zu schreiben, die auf die eine oder andere Art schummeln, z.B. indem sie andere Roboter oder sogar RealTimeBattle selber untersuchen, um mehr Informationen zu erhalten, sehr viele Ressourcen aufbrauchen damit andere Roboter weniger haben, etc. Das ist natrlich nicht die feine, englische Art, einen Gegner zu schlagen, daher versuchen wir das so gut wie mglich zu verhindern. Im ``Competition-Modus'' ist die CPU-Zeit der Roboter beschrnkt, denn auf diese Art kann ein Roboter nicht die ganze CPU-Zeit aufbrauchen. Dies knnte man durch das ffnen weiterer Kind-Prozesse umgehen, aber seitdem die vom Kind-Prozess genutzte Zeit beim Beenden des Prozesses gezhlt wird, sollte es sehr einfach sein zu Erkennen ob ein Roboter irgendetwas verdchtiges tut. Es ist nicht mglich alle Mglichkeiten des Schummelns in RTB zu verhindern. So ist es z.B erlaubt, Dateien zu lesen und zu schreiben, man sollte sich aber dessen bewusst sein, dass die Organisatoren von Wettkmpfen dies verbieten knnen, wenn sie wollen, indem die einfach Besitzer und Rechte der Roboter-Programme richtig setzen. Es ist vielleicht immer noch mglich, Wege zu finden, um diese Einschrnkungen zu umgehen; Wenn du eine solche Mglichkeit findest, sende bitte einen ``Bug-Report'' an uns. Im brigen ist es die Aufgabe der Turnier-Organisatoren sicherzustellen, dass die Regeln befolgt werden. 4.4. Nachrichten an Roboter Initialize [ErsteSequenz? (int)] Dies ist die allererste Nachricht die der Roboter bekommen wird. Wenn das Argument eins ist, ist es die erste Sequenz im Turnier und der Roboter sollte ``seinen Namen und seine Farbe'' and den Server senden, ansonsten sollte er auf YourName- und YourColor- Nachrichten warten. YourName [Name (string)] Der momentane Name des Roboters; man sollte ihn nur ndern, wenn man sehr gute Grnde dafr hat. YourColour [Farbe (hex)] Die momentane Farbe des Roboters; wenn sie einem nicht gefllt, kann man sie ndern. Alle Roboter in einem Team haben dieselbe Farbe. GameOption [Optionsnummer (int)] [value (double)] Am Anfang jedes Spieles werden dem Roboter einige Einstellungen mitgeteilt, die dem Roboter ntzlich sein knnen. Fr eine komplette Liste sollte man sich das game_option_type enum in der Datei ``Messagetypes.h'' anschauen. Im ``Optionen-Kapitel'' gibt's mehr Informationen zu den einzelnen Optionen. Der ``Debug-Level'' wird auch als Spiel-Option gesendet obwohl es nicht in der Options-Liste ist. GameStarts Diese Nachricht wird gesendet wenn das Spiel anfngt (wer htte das gedacht?). Radar [Entfernung (double)] [Typ des beobachteten Objekts (int)] [Radar-Winkel (double)] Diese Nachricht gibt jede Runde Radar-Informationen. Der Radar- Winkel wird relativ zur Vorderseite des Roboters angegeben, und zwar im Bogenma. Info [Zeit (double)] [Geschwindigkeit (double)] [Kanonen-Winkel (double)] Die Info-Nachricht wird immer nach der Radar-Nachricht gesendet. Sie gibt mehr allgemeine Informationen ber den Status des Roboters. Die Zeit ist jene Zeit, die seit dem Start des Spieles vergangen ist. Dies ist nicht unbedingt die Zeit, die in Wirklichkeit vergangen ist, und zwar wegen ``time scale'' und ``max timestep''. Coordinates [x (double)] [y (double)] [angle (double)] Diese Nachricht teilt Dir die aktuelle Prosition mit. Sie ist nur gesendet wenn die Option ``Send robot coordinates'' auf 1 oder 2 gesetzt ist. Der Wert 1 bedeutet das die Koordinaten relativ zur Startposition gesendet werden, so dass der Roboter nicht wei wo er gestartet ist sondern nur wohin er sich seitdem bewegt hat. RobotInfo [Energie-Level (double)] [Team-Mitglied? (int)] Wenn dein Roboter einen anderen Roboter mittels des Radars entdeckt, wird diese Nachricht an deinen Roboter gesendet. Sie gibt verschiedene Informationen ber den feindlichen Roboter. Die Energie des anderen Roboters wird auf die gleiche Art und Weise angegeben, wie die Energie deines eigenen Roboters(siehe unten). Der zweite Parameter ist nur im Team-Mode interessant, 1 heisst Team-Mitglied, 0 steht fr einen Gegner. RotationReached [Was hat seine Rotation beendet?(int)] Wenn die Roboter-Option ``SEND_ROTATION_REACHED'' richtig gesetzt ist, wird diese Nachricht gesendet, wenn eine Rotation (mit RotateTo oder RotateAmount) beendet wurde, oder die Richtung sich gendert hat (beim 'sweeping'). Der Parameter entspricht dem 'was soll ich rotieren', z.B. bei ``Rotate''. Energy [Energie-Level(double)] Am Ende jeder Runde wird der Roboter seinen eigenen Energie- Level erfahren. Er wird jedoch nicht die exakte Energie gesagt bekommen, sondern nur einen der ``Energie-Level''. RobotsLeft [Anzahl der Roboter (int)] Am Anfang des Spiels, und wenn ein Roboter gettet wird, wird die Anzahl der verbleibenden Roboter allen noch lebenden Robotern bekanntgegeben. Collision [Objekt-Typ mit dem der Roboter zusammengestossen ist (int)] [angle relative robot (double)] Wenn ein Roboter von etwas getroffen wird, oder selber etwas rammt, bekommt er diese Nachricht. In der Datei ``Messagetypes.h'' findest du eine Liste aller Objekt-Typen. Warning [Warnungs-Typ (int)] [Nachricht (string)] Eine Warnungs-Nachricht wird dann gesendet wenn ein Problem aufgetaucht ist. Momentan knnen 7 verschiedene Warnungs- Nachrichten gesendet werden, nmlich: UNKNOWN_MESSAGE: Der Server hat eine Nachricht erhalten, mit der er nichts anfangen kann. PROCESS_TIME_LOW: Die CPU-Last hat den ``CPU Warnungs- Prozentsatz'' erreicht. Taucht nur im ``Competition-Modus'' auf. MESSAGE_SENT_IN_ILLEGAL_STATE: Die erhaltene Nachricht konnte in diesem Spielstadium nicht verarbeitet werden. Z.B. wenn ``Rotate'' vor dem Anfang des Spiels gesendet wurde. UNKNOWN_OPTION: Der Roboter hat eine ``robot option'' gesendet, die entweder einen unzulssigen Optionsnamen oder Options- Parameter enthielt. OBSOLETE_KEYWORD: Das Schlsselwort ist veraltet, und sollte nicht mehr verwendet werden. Lies die Datei ChangeLog um herauszufinden was stattdessen benutzt werden sollte. NAME_NOT_GIVEN: Der Roboter hat seinen Namen nicht vor Spielbeginn gesendet. Das passiert wenn die ``robot startup time'' zu kurz ist oder der Roboter seinen Namen nicht frh genug sendet. COLOUR_NOT_GIVEN: Der Roboter hat seine Farbe nicht vor Spielbeginn gesendet. Dead Der Roboter ist gestorben. Versuche nicht, weitere Nachrichten an den Server zu senden bis das Spiel zu ende ist. Der Server wird sie nicht lesen. GameFinishes Das aktuelle Spiel ist beendet, mache dich bereit fr das nchste. ExitRobot Verlasse *sofort* das Programm, oder du wirst mit Gewalt rausgeschmissen! 4.5. Nachrichten von Robotern Nachrichten von einem Roboter an RealTimeBattle drfen nicht lnger als 128 Zeichen sein. Anderenfalls wird RealTimeBattle die Nachricht in zwei Teile schneiden und mglicherweise eine "Unbekannte Nachricht" melden. When you send messages to RealTimeBattle make shure that they are not longer than 128 chars, otherwise RealTimeBattle will cut them in two parts and may report an unknown message. RobotOption [Optionsnummer (int)] [Wert (int)] Momentan sind nur zwei Optionen verfgbar: SIGNAL: Teilt dem Server mit, er soll ein Signal senden, wenn Nachrichten eintreffen. Der Parameter wird angeben, welches Signal. Sende diese Nachricht (z.B. mit Parameter SIGUSR1), sobald du bereit bist Signale zu empfangen. Der Standardwert ist 0, d.h. der Server soll keine Signale senden. SEND_SIGNAL: Sagt dem Server er soll SIGUSR1 senden, wenn eine Nachricht eintrifft. Sende diese Nachricht (mit Parameter 1 (=true)) sobald du bereit bist ein Signal zu empfangen. Der Standardwert ist false. SEND_ROTATION_REACHED: Wenn du willst das der Server eine ``RotationReached'' Nachricht sendet, wenn eine Rotation beendet wurde, solltest du diese Option setzen. Mit 1 als Wert wird die Nachricht gesendet, wenn ein RotateTo oder ein RotateAmount fertig ist, mit 2 als Wert werden auch Vernderungen in der Sweep-Richtung gemeldet. Standardwert ist 0, d.h. es werden keine Nachrichten gesendet. USE_NON_BLOCKING: Bestimmt wie ``Nachrichten gelesen werden''. Diese Option sollte genau einmal gesendet werden, sobald das Programm gestartet wird. Da die Option immer angegeben werden sollte, gibt es keinen Default-Wert. Name [Name (string)] Wenn man die ``Initialize''-Nachricht mit 1 als Argument erhlt, die anzeigt dass dies die erste Sequenz ist, sollte der Roboter seinen Namen und seine Farbe senden. Im Namen kann die Teamzugehrigkeit mitgeteilt werden. Lautet der Name foo Team: bar, so heit der Roboter foo und spielt im Team bar. Teammitglieder bekommen dieselbe Farbe und erkennen sich als Freund bei der RobotInfo Nachricht. Ausgefeilteren Team-Support bietet das RealTimeBattle Team FrameWork <http://rtb- team.sf.net>. Colour [home colour (hex)] [away colour (hex)] Siehe oben. Die Farben sind wie normale Fuballtrikots. Die "home colour" wird verwendet falls sie nicht schon vergeben ist. Anderenfalls wird die "away colour" oder als letzten Ausweg eine zufllig gewhlte, freie Farbe benutzt. Rotate [Was soll rotieren (int)] [angular velocity (double)] Setzt die "angular velocity" fr den Roboter, die Kanone und den Radar. Setze 'Was soll rotieren' auf 1 fr den Roboter, 2 fr die Kanone, 4 fr den Radar, oder zu einer Summe dieser Werte, um mehrere Objekte gleichzeitig zu rotieren. Die "angular velocity" wird in "Radians" pro Sekunde angegeben und wird von ``Robot (cannon/radar) max rotate speed'' begrenzt. RotateTo [Was soll rotieren (int)] [angular velocity (double)] [End-Winkel (double)] Genau wie Rotate, allerdings wird nur um einen bestimmten Winkel rotiert. Beachte dass Radar- und Kanonen-Winkel relativ zum Roboter-Winkel angegeben werden. Dieses Kommando kann nicht dazu benutzt werden den Roboter selber rotieren zu lassen, benutze RotateAmount dafr. RotateAmount [Was soll rotieren (int)] [angular velocity (double)] [Winkel (double)] Funktioniert wie Rotate, wird aber relativ zum momentanen Winkel rotieren. Sweep [what to rotate (int)] [angular velocity (double)] [right angle (double)] [left angle (double)] Funktioniert wie Rotate, setzt aber den Radar und/oder die Kanone in einen "Sweep Mode"(nicht mglich fr den Roboter selber). Accelerate [Wert (double)] Setzt die Roboter-Beschleunigung. Der Wert ist durch ``Robot max/min acceleration'' beschrnkt. Brake [portion (double)] Dient zum Bremsen. Vollbremsung (portion=1.0) heisst dass die Reibung in Roboter-Richtung gleich der ``Gleit-Reibung'' ist. Shoot [Schuss-Energie (double)] Schuss mit der angegebenen Energie. Die ``Schuss-Optionen'' geben dazu mehr Informationen. Print [Nachricht (string)] Zeigt die Nachricht im ``Message-Fenster'' an. Debug [message (string)] Zeigt die Nachricht im ``Message-Fenster'' an, wenn man sich im ``Debug-Modus'' befindet. DebugLine [Winkel1 (double)] [Radius1 (double)] [Winkel2 (double)] [Radius2 (double)] Zeichnet eine Linie direkt in die Arena. Dies ist nur im hchsten Debug-Level(5) erlaubt; Ist dies nicht der Fall wird eine ``Warnungs-Nachricht'' gesendet. Die Parameter sind die Start- und End-Punkte der Linie, angegeben in Polarkoordinaten relativ zum Roboter. DebugCircle [Mittelpunkts-Winkel (double)] [Mittelpunkts-Radius (double)] [Kreisradius (double)] hnlich wie DebugLine, zeichnet aber einen Kreis. Die ersten zwei Parameter sind Winkel und Radius des Kreismittelpunktes relativ zum Roboter. Der dritte Parameter gibt den Radius des Kreises an. 5. Optionen RealTimeBattle kann durch eine ganze Reihe von Optionen konfiguriert werden, die in verschiedenen Gruppen zusammengefasst sind. Die Philosophie dahinter ist, dir grtmgliche Freiheit zu geben, das Spiel so zu gestalten wie du es willst. Das heisst aber auch, dass bestimmte Kombinationen der Optionen zu schlechten Ergebnissen fhren knnen, und dem Programm Schwierigkeiten machen knnten. 5.1. Umwelt-Optionen Gravitational Constant: Die Beschleunigung, die von der Gravitation herrhrt. Auf der Erde ist diese Konstante ungefhr 9.81. Eine Erhhung wird zu einer erhhten Reibung fhren und die Roboter langsamer machen. AirResistance: Richtig geraten. Der Luftwiderstand nimmt mit der Geschwindigkeit zu. RollFriction: Die Reibung in Richtung des Roboters, wenn er nicht bremst (Rollreibung). SlideFriction: Die Reibung orthogonal zur Richtung des Roboters. Ist gleichzeitig die maximale Reibung, wenn der Roboter bremst (Gleitreibung). Send robot coordinates: Legt fest wie Koordinaten zu den Robotern gesendet werde. Folgende Optionen sind verfgbar: 0 - kein Koordinaten senden (standart) 1 - sendet die Koordinaten relativ zur Startposition 2 - sendet absolute Koordinaten 5.2. Roboter Optionen Robot max acceleration: Roboter drfen nicht mehr beschleunigen, als dieser Wert angibt, und... Robot min acceleration: ...nicht weniger als dieser Wert. Robot radius: Gibt die Gre des Roboters an. Robot mass: Robotergewicht. Ein grosses Robotergewicht erhht die Auswirkungen eines Zusammenpralls. Robot bounce coefficient: Gibt an wie gut der Roboter abprallen kann. Wenn dieser Wert 0 ist, werden die Roboter 'aufeinanderklatschen' wenn sie kollidieren, wenn der Wert 1, ist werden sie sich wie perfekte Billiardblle verhalten. Robot hardness coefficient: Gibt an wieviel Schaden die Roboter erleiden, wenn sie kollidieren. Je kleiner der Wert, desto weicher das Material. Robot protection coefficient: Bestimmt, wie gut der Roboter geschtzt ist. Dieser Faktor wird mit der Energie des Schadens multipliziert, und man erhlt den Wert, um den man die Roboterenergie verringern muss. Robot frontsize: Die Vorderseite des Roboters ist ein Gebiet aus verschiedenen Materialien, normalerweise hrter und schtzender, sodass Roboter sich gegenseitig Schaden knnen indem sie sich rammen. Robot front bounce coefficient: Siehe vorherige 4 Erklrungen. Robot front hardness coefficient: Siehe vorherige 5 Erklrungen. Robot front protection coefficient: Siehe vorherige 6 Erklrungen. Robot start energy: Die Menge an Energie, die der Roboter am Anfang jeden Spieles haben wird. Robot max energy: Durch aufnehmen eines Kekses kann der Roboter seine Energie erhhen, allerdings nicht mehr als auf diesen Wert. Robot max rotate speed: Wie schnell der Roboter rotieren darf. Einheit: 'radians'/s. Robot cannon max rotate speed: Maximale Geschwindigkeit, mit der die Kanone rotieren darf. Allerdings rotieren die Kanone und der Radar relativ zum Roboter, sodass die eigentliche Rotationsgeschwindigkeit hher sein kann. Robot radar max rotate speed: Maximale Radar-Rotationsigeschwindigkeit. Siehe auch obige Bemerkung. Robot energy levels: Der Roboter wird seine Energie nur ungefhr wissen. Diese Option entscheidet wieviele unterschiedliche Energie-Stufen es im Spiel gibt. 5.3. Schu-Optionen Shot radius: Gre der Schsse. Sollte kleiner sein als der ``Roboter Radius''. Shot speed: Schsse bewegen sich mit dieser Geschwindigkeit in die Richtung der Kanone plus der Geschwindigkeit des Roboters. Shooting penalty: Wenn der Roboter schiesst, nimmt er dabei selber Schaden. Dies ist der Faktor, mit dem die Schu-Energie multipliziert wird, um die Energie zu bekommen, die dem Roboter abgezogen wird. Wenn die Anzahl der Roboter gross ist, wird diese Zahl verkleinert, sodass man nie unverhltnismig viel Energie verliert. Shot min energy: Die kleinste erlaubte Schu-Energie. Ein Roboter, der versucht mit weniger Energie zu schiessen wird gar nicht schiessen. Shot max potential energy: Die Roboter haben eine Schuss-Energie, die mit der Zeit zunimmt, diesen Wert aber nicht berschreitet. Shot potential energy increase speed: Gibt an, wie schnell die Schuss-Energie des Roboters (siehe oben) zunimmt. Einheit: Energie/Sekunde. 5.4. Extra-Optionen Cookie max energy: Die Energie, die man von einem Keks bekommt ist ein zuflliger Wert zwischen Cookie max energy und Cookie min energy . Cookie min energy: Siehe oben. Cookie frequency: Die Zahl der Kekse pro Sekunde, die durchschnittlich auftauchen werden. Cookie radius: Gre der Kekse. Mine max energy: Die Minen-Energie ist ein Zufallswert zwischen Mine max energy und Mine min energy Mine min energy: Siehe oben. Mine frequency: Die Anzahl der Minen pro Sekunde, die durschnittlich auf dem Spielfeld erscheinen werden. Mine radius: Gre der Minen. Cookie colour: Farbe der Kekse in hexadezimaler Schreibweise, angegeben in rot- gruen-blau Werten. Mine colour: siehe oben. 5.5. Zeit Optionen Timeout: Dies ist die maximale Dauer eines Spiels. Wenn die Zeit abgelaufen ist, werden alle verbleibenden Roboter gekillt, ohne noch irgendwelche Punkte zu bekommen. Max timestep: Wenn der Computer zeitweise sehr langsam wird, kann die Zeit zwischen updates ziemlich lang werden. Indem man diese Option setzt, kann sich das Programm in solchen Fllen knstlich verlangsamen und damit die "realtimeness" verletzen. Time scale: Setzt man Timescale grsser als 1, heisst das, dass die Spiel- Uhr schneller als eine "richtige" Uhr gehen wird. Diesen Wert zu verndern kann ntzlich sein wenn man entweder den Robotern mehr Zeit geben will, oder wenn man (k)einen schnellen Computer hat und man das Spiel beschleunigen will. Update interval: Diese Option gibt die Zeit zwischen Roboter-updates an, d.h. wie oft der Roboter-Zustand verndert wird. Sie wird nicht von der "Time Scale"-Option beinflusst, und kann nicht verndert werden, wenn das Programm luft. Die Genauigkeit ist 1/100 s(je nach Genauigkeit des Systems auf dem RealTimeBattle luft). Robot startup time: Legt die Zeit zwischen dem ausfhren der Roboter und dem Anfang der Sequenz fest. Wenn Roboter schwarz sind und keine Namen haben, solltest du die RobotStartupTime etwas erhhen(voreingestellt ist 1 Sekunde). Dies kann z.B. passieren wenn es viele Roboter gibt, die Roboter ziemlich gro sind, man auf einem langsamen Rechner arbeitet. Start CPU time: Im ``Competition-Modus'' ist die CPU-Zeit eines Roboters begrenzt. Am Anfang einer Sequenz bekommt ein Roboter diese Menge an CPU-Zeit, die er verbrauchen darf. Extra CPU time: Wenn die anfngliche CPU-Zeit verbraucht ist, bekommt der Roboter die Menge an Extra-CPU-Zeit. Extra CPU period: Die Extra CPU-Zeit muss eine ganze CPU-Periode reichen, sonst stirbt der Roboter im aktuellen Spiel. CPU warning percentage: Wenn der Roboter diesen Betrag an CPU-Zeit aufgebraucht hat, bekommt er eine Warnung zugeschickt. Process check interval: Im ``Competition-Modus'' entscheidet dieser Wert, wie oft das Programm den CPU-Verbrauch berprfen wird. Logging frequency: Um die Gre der ``log files'' zu reduzieren kannst du diesen Wert vergrssern. Mit dieser Option werden ``robot position info'' nur jedes 'n'te ``Update-Interval'' aktualisiert. 5.6. Fenstergren Hier kann man die Gre fr verschiedene Fenster setzen, nmlich das ``Arena-Fenster'', das ``Message-Fenster'', das ``Score-Fenster'' und das ``Statistik-Fenster''. Man kann auch die Position fr die ersten drei und das ``Kontroll-Fenster'' angeben. 5.7. Verschiedene Optionen Arena scale: "Overall Scale" der Arena. Ein Wert von 2 ergibt eine doppelte Seitenlnge, d.h. eine viermal so groe Arena. Fast forward factor: Legt die Geschwindigkeit fest mit der das Spiel mittels fast forward oder rewind abluft(siehe auch ``Replay''). Max. Anzahl von Robotern, die gleichzeitig erlaubt sind: Erlaubt dem User die maximal erlaubte Anzahl an Robotern in einer Sequenz zu verndern. Wenn es zu viele sind, kann sich das Betriebssystem beschweren (bei wievielen dies passiert ist systemabhngig). Background colour: Hintergrundfarbe und... Foreground colour: ...Vordergrundfarbe der Arena. Farbe der RTB-Nachrichten: Farbe des Textes der RTB-Nachrichten. Robot search path: Dies ist eine durch Doppelpunkte getrennte Liste von Verzeichnissen die nach Robotern durchsucht werden, wenn ein ``neues Turnier'' anfngt. Das Verzeichnis Robots im Installationsverzeichnis (Standard-Wert: /usr/local/games/RealTimeBattle) wird immer durchsucht. Arena search path: hnlich wie oben, allerdings fr Arena-Dateien, nicht fr Roboter. Das Verzeichnis Arenas im Installationsverzeichnis (Standard-Wert: /usr/local/games/RealTimeBattle) wird immer durchsucht. 6. Arena-Konstruktion In ReatTimeBattle ist es sehr einfach, eine eigene Arena zu erstellen. Die Sprache, die dafr verwendet wird besteht aus lediglich elf Kommandos, und es gibt nur vier grundlegende Bauelemente: Linie, Kreis, 'Innenkreis' und Bogen. Dies ist hauptschlich aus Grnden der Programm-Geschwindigkeit so, da man bei Kreisen und Linien sehr einfach prfen kann, ob es eine Kollision gab. Kreise und 'Innenkreise' hindern die Roboter daran, in einen Kreis hinein- oder aus einem Kreis herauszugelangen. Die Linie und der Bogen hindern Roboter daran an der Lngsseite (bzw.an der gekrmmten Seite beim Bogen) hineinzugelangen, allerdings wird das an den zwei Enden der Linie nicht geprft. Daher muss man an jedes Ende einer Linie einen Kreis anhngen, um es zu einem soliden Objekt zu machen. Die Kommandos polygon, closed_polygon und poly_curve sollen diese Prozedur vereinfachen, und ergeben immer ein richtiges Objekt. Alle Winkel sind in der Voreinstellung im Bogenma. Das kann jedoch durch den Befehl angle_unit degrees gendert werden. Man sollte beachten, dass RTB nicht berprft ob eine Arena-Datei eine korrekte Arena ergibt, das ist einzig und allein deine Sache. Allerdings wird RTB sich beschweren, wenn du die Regeln der Arena- Konstruktionssprache nicht beachtest. Arena-Dateien sollten mit .arena enden und im Arena-Verzeichnis untergebracht werden, so dass RealTimeBattle sie finden kann. Die bounce coefficient- und hardness-Parameter, die an alle Mauer- erzeugenden Kommandos bergeben werden, legen das Material der Mauer fest. Beides sind Werte zwischen 0 und 1. Hrtere Mauern beschdigen kollidierende Roboter mehr, und ein hherer Bounce-Koeffizient brigt sie dazu, besser abzuprallen. Du solltest dir auch mal die Arenas die mit RTB mitgeliefert werden ansehen und von den Beispielen lernen. 6.1. Arena Kommandos Ein Kommando besteht aus dem Kommandonamen und den Parametern, die durch Whitespaces getrennt werden. Du solltest immer sicherstellen, dass die richtige Anzahl der Parameter bergeben wird. In der Kommando-Liste werden die Parameter in eckigen Klammern angegeben. scale [Wert] Dieser Wert multipliziert mit der ``arena scale'' ergibt den Skalierungsfaktor mit dem alle Koordinaten multipliziert werden. Dieses Kommando muss, wenn es verwendet wird, das este Kommando in der Datei sein, Standardwert ist 1.0. angle_unit [unit] Schaltet zu der ausgewhlten Winkel-Einheit um. Mgliche Einheiten sind degrees (Gradma) or radians (Bogenma). Die Voreinstellung verwendet das Bogenma. boundary [links] [oben] [rechts] [unten] Diese Begrenzungen umschliessen das Gebiet, in der Roboter, Kekse und Minen aufgestellt werden. Ausserdem legen sie das sichtbare Gebiet im ``Arena-Fenster'' fest. Dieses Kommando wird unbedingt bentigt und nur scale darf vorher verwendet werden. inner_circle [Bounce] [Hrte] [Mittelpunkt_x] [Mittelpunkt_y] [Radius] Roboter sind im inneren dieses Kreises gefangen. circle [Bounce] [Hrte] [Mittelpunkt_x] [Mittelpunkt_y] [Radius] Eine Mauer in Form eines Kreises. line [Bounce] [Hrte] [Dicke] [Start_x] [Start_y] [Ende_x] [Ende_y] Erzeugt eine Linie. Sie hindert den Roboter nur daran an der Lngsseite durchzudringen, daher mssen Kreise an die Enden gesetzt werden. arc [Bounce] [Hrte] [Dicke] [Mittelpunkt_x] [Mittelpunkt_y] [Innenradius] [Auenradius] [Winkel1] [Winkel2]" Ein Bogen ist ein Kreissegment zwischen zwei Winkeln. Genau wie die Linie bentigt der Bogen zwei Kreise an seinen Endpunkten. polygon [Bounce] [Hrte] [Dicke] [Anzahl der Seiten] ([Mit- telpunkt_x] [Mittelpunkt_y])... Dieses Kommando wird eine Menge Kreise erzeugen, die durch Linien verbunden sind, und dadurch ein Polygon-hnliches Gebilde schaffen. closed_polygon [Bounce] [Hrte] [Dicke] [Anzahl der Seiten] ([Mit- telpunkt_x] [Mittelpunkt_y])... hnlich wie ein Polygon, aber die erste und letzte Seite sind auch durch eine Linie verbunden. poly_curve [Bounce] [Hrte] [Dicke] [Start_x] [Start_y] [Rich- tung_x] [Richtung_y] ([Befehlsargumente ...]) ..." Die poly_curve ist das mchtigste der Arena-Kommandos. Sie wird genutzt im Wnde aus Linien und Bgen zu bauen. Nach jeden Abschnitt hatt man eine aktuelle Position und eine aktuelle Richtung, die si It is used to build walls with lines and arcs. At each step you have a current position and direction, which are affected by the subcommands. The last subcommand must be C or Q. L [length] Draw a line with given length in the current direction. T [angle] Turn the current dircetion. A [angle] [radius] Draw an arc. C Finish by connecting with the starting point. Q Quit. exclusion_point [Position_x] [Position_y] Wenn die Arena innerhalb der Begrenzungen aus mehreren getrennten Gebieten besteht, solltest du alle bis auf eins ausschliessen, indem du "Exclusion-Punkte" setzt. Alle Punkte von denen aus man eine gerade Linie bis zu einem "Exclusion- Punkt" ziehen kann, ohne eine Mauer zu berschreiten, gelten als ausserhalb der Arena. ��������������realtimebattle-1.0.8/Documentation/Spanish/���������������������������������������������������������0002755�0001750�0001750�00000000000�10404234032�017060� 5����������������������������������������������������������������������������������������������������ustar �moi�����������������������������moi��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������realtimebattle-1.0.8/Documentation/Spanish/Makefile.am����������������������������������������������0000644�0001750�0001750�00000000433�10170545356�021130� 0����������������������������������������������������������������������������������������������������ustar �moi�����������������������������moi��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������docsdir = $(DOCS_DIR)/Spanish docs_DATA = \ rtb-docs-1.0.5-es-1.html rtb-docs-1.0.5-es-2.html rtb-docs-1.0.5-es-3.html \ rtb-docs-1.0.5-es-4.html rtb-docs-1.0.5-es-5.html rtb-docs-1.0.5-es-6.html \ rtb-docs-1.0.5-es.html next.gif prev.gif toc.gif EXTRA_DIST = $(docs_DATA) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������realtimebattle-1.0.8/Documentation/Spanish/Makefile.in����������������������������������������������0000644�0001750�0001750�00000031435�10324167707�021150� 0����������������������������������������������������������������������������������������������������ustar �moi�����������������������������moi��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.9.3 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ subdir = Documentation/Spanish DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = 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)$(docsdir)" docsDATA_INSTALL = $(INSTALL_DATA) DATA = $(docs_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ARENADIR = @ARENADIR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOCS_DIR = @DOCS_DIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_RPM_FALSE = @ENABLE_RPM_FALSE@ ENABLE_RPM_TRUE = @ENABLE_RPM_TRUE@ ETR_SOCKET_LIBS = @ETR_SOCKET_LIBS@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ASPRINTF = @HAVE_ASPRINTF@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ HAVE_SNPRINTF = @HAVE_SNPRINTF@ HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ JAVA = @JAVA@ JAVAC = @JAVAC@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NO_GETOPT_LONG_FALSE = @NO_GETOPT_LONG_FALSE@ NO_GETOPT_LONG_TRUE = @NO_GETOPT_LONG_TRUE@ NO_GRAPHICS_FALSE = @NO_GRAPHICS_FALSE@ NO_GRAPHICS_TRUE = @NO_GRAPHICS_TRUE@ NO_NETWORK_FALSE = @NO_NETWORK_FALSE@ NO_NETWORK_TRUE = @NO_NETWORK_TRUE@ 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@ PERLINTERP = @PERLINTERP@ PERL_SHEBANG = @PERL_SHEBANG@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ ROBOTDIR = @ROBOTDIR@ RTB_DIR = @RTB_DIR@ RTB_LOCALEDIR = @RTB_LOCALEDIR@ RTB_MAJOR_VERSION = @RTB_MAJOR_VERSION@ RTB_MICRO_VERSION = @RTB_MICRO_VERSION@ RTB_MINOR_VERSION = @RTB_MINOR_VERSION@ RTB_RPM_RELEASE = @RTB_RPM_RELEASE@ RTB_RPM_VERSION = @RTB_RPM_VERSION@ RTB_VERSION = @RTB_VERSION@ SET_MAKE = @SET_MAKE@ SGML2HTML_FALSE = @SGML2HTML_FALSE@ SGML2HTML_TRUE = @SGML2HTML_TRUE@ SGML2INFO_FALSE = @SGML2INFO_FALSE@ SGML2INFO_TRUE = @SGML2INFO_TRUE@ SGML2LATEX_FALSE = @SGML2LATEX_FALSE@ SGML2LATEX_TRUE = @SGML2LATEX_TRUE@ SGML2LYX_FALSE = @SGML2LYX_FALSE@ SGML2LYX_TRUE = @SGML2LYX_TRUE@ SGML2RTF_FALSE = @SGML2RTF_FALSE@ SGML2RTF_TRUE = @SGML2RTF_TRUE@ SGML2TXT_FALSE = @SGML2TXT_FALSE@ SGML2TXT_TRUE = @SGML2TXT_TRUE@ SHELL = @SHELL@ STDCXX_LIBS = @STDCXX_LIBS@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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 = @datadir@ 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_info = @install_info@ install_sh = @install_sh@ javaavailable_FALSE = @javaavailable_FALSE@ javaavailable_TRUE = @javaavailable_TRUE@ javacavailable_FALSE = @javacavailable_FALSE@ javacavailable_TRUE = @javacavailable_TRUE@ libdir = @libdir@ libexecdir = @libexecdir@ linuxjoystickavailable_FALSE = @linuxjoystickavailable_FALSE@ linuxjoystickavailable_TRUE = @linuxjoystickavailable_TRUE@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ perlavailable_FALSE = @perlavailable_FALSE@ perlavailable_TRUE = @perlavailable_TRUE@ prefix = @prefix@ program_transform_name = @program_transform_name@ pythonavailable_FALSE = @pythonavailable_FALSE@ pythonavailable_TRUE = @pythonavailable_TRUE@ sbindir = @sbindir@ sgml2html = @sgml2html@ sgml2info = @sgml2info@ sgml2latex = @sgml2latex@ sgml2lyx = @sgml2lyx@ sgml2rtf = @sgml2rtf@ sgml2txt = @sgml2txt@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ uudecode = @uudecode@ docsdir = $(DOCS_DIR)/Spanish docs_DATA = \ rtb-docs-1.0.5-es-1.html rtb-docs-1.0.5-es-2.html rtb-docs-1.0.5-es-3.html \ rtb-docs-1.0.5-es-4.html rtb-docs-1.0.5-es-5.html rtb-docs-1.0.5-es-6.html \ rtb-docs-1.0.5-es.html next.gif prev.gif toc.gif EXTRA_DIST = $(docs_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(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 Documentation/Spanish/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Documentation/Spanish/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-docsDATA: $(docs_DATA) @$(NORMAL_INSTALL) test -z "$(docsdir)" || $(mkdir_p) "$(DESTDIR)$(docsdir)" @list='$(docs_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(docsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docsdir)/$$f'"; \ $(docsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docsdir)/$$f"; \ done uninstall-docsDATA: @$(NORMAL_UNINSTALL) @list='$(docs_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(docsdir)/$$f'"; \ rm -f "$(DESTDIR)$(docsdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 $(DATA) installdirs: for dir in "$(DESTDIR)$(docsdir)"; 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-docsDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-docsDATA uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-docsDATA 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-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-docsDATA \ uninstall-info-am # 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: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������realtimebattle-1.0.8/Documentation/Spanish/rtb-docs-1.0.5-es-1.html���������������������������������0000644�0001750�0001750�00000013476�10170545356�022714� 0����������������������������������������������������������������������������������������������������ustar �moi�����������������������������moi��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9"> <TITLE>Manual de Usuario de Real Time Battle, version 1.0.5 rev 1: Introduccion Next Previous Contents

1. Introduccion

Este es el manual de usuario de Real Time Battle. Aquí encontraras como ejecutar el programa, como funciona, como crear tus robots y como construir tus campos de batalla, tambien llamados Arenas (N del T. de ahora en adelante usaré el termino Arena para referirme al lugar donde compiten los Robots).

Real Time Battle es un juego de programacion para UNIX, en el cual robots controlados por programas luchan unos contra otros. La meta es destruir a los enemigos, usando el radar para examinar el entorno y el cañón para disparar.

Real Time Battle ha sido construido de forma que sea flexible. rápido y fácil de usaro. La intención es que este programa pueda ser usado como test de algoritmos de Inteligencia Artifical, asi como para jugar y para pasarlo bien.

Caracteristicas incluidas:

  • Progreso de juego en tiempo real, con los robots ejecutandose como procesos hijos de Real Time Battle.
  • Los robots se comunican con el programa principal usando la entrada estandar y la salida estandar.
  • Los robots pueden ser construidos en casi cualquier lenguaje.
  • Pueden competir mas de 120 robots simultaneamente.
  • Se usa un lenguaje simple para la comunicación, lo cual hace que sea fácil comenzar a construir un robot.
  • Los robots tienen un comportamiento similar a los objetos reales.
  • Puedes crear tus propias arenas.
  • Altamente configurable.

1.1 Mas informacion

Para mas informacion puedes mirar en los ficheros INSTALL, BUGS, TODO, README, FAQ y ChangeLog incluidos en la distribución. Mas información disponible en RealTimeBattle homepage, donde encontrarás Robots, noticias, torneos asi como diferentes versiones de este manual.

1.2 Requerimientos

Las necesidades de hardware dependen mucho de lo que quieras hacer. Para jugar con unos pocos robots se puede usar cualquier ordenador en el que se tenga GNU/LINUX o UNIX. No obstante, los requerimientos de hardware crecerán con el número de Robots que quieras tener a la vez en la Arena; ejecutar 120 robots avanzados es ciertamente 'pesado' para cualquier PC. RealTimeBattle esta únicamente disponible en UNIX. Ha sido desarrollado en una máquina Linux, aunque puede ser compilado para otros sabores de UNIX. Ejecutarlo en 'competition-mode' actualmente solo es posible en una máquina Linux con el directorio /proc activo, debido a que es necesario el uso de la cpu para los procesos hijo. El único software requerido es gtk+, que es usado para la interfaz gráfica de usuario.

1.3 Transfondo (Background)

El proyecto comenzo en Agosto del 98 inspirado en RobotBattle,un juego muy interesante que usamos hace unos años. Esa version de Robot Battle, de todas formas, tiene algunas pegas: solo esta disponible en Windows y los Robots son escritos en un lenguaje propio, lo cual limita las posibilidades de escribir Robots inteligentes. RobotBattle ha estado desde entonces en desarrollo, pero aun no esta disponible en otros sistemas operativos. Por lo tanto, decidimos hacer un juego de programacion en UNIX, que hace uso de las caracteristicas de un SO moderno.

1.4 Licencia

RealTimeBattle es distribuido bajo licencia GNU General Public License, en el espiritu de la comunidad Linux. Las versiones oficiales de Real Time Battle seran liberadas por los propios autores.

Copyright (C) 1998-2000 Erik Ouchterlony and Ragnar Ouchterlony

Este programa es Free Software, puedes redistribuirlo y/o modificarlo, segun los términos de GNU publicados por la FSF (Free Software Fundation); version 2 de la licencia o superior.

Este programa esta distribuido con la esperanza de que sea útil, pero sin ninguna garantía. Ver la licencia GNU para mas detalles

Deberías haber recibido una copia de la licencia GNU junto a este programa; si no es asi, dirígete a Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

1.5 Errores (Bug reports)

Si encuentras algo que no funciona, o algo raro, algo que falta, o cualquier otra cosa, no dudes en enviar un bug report a los autores authors. Pero mira primero la lista de errores incluida en la pagina bug list on the homepage.


Next Previous Contents realtimebattle-1.0.8/Documentation/Spanish/rtb-docs-1.0.5-es-2.html0000644000175000017500000004651410170545356022714 0ustar moimoi Manual de Usuario de Real Time Battle, version 1.0.5 rev 1: Uso del programa Next Previous Contents

2. Uso del programa

Este capitulo describe como usar el programa en sí mismo. Si te aburre leerlo de seguido, usa el método de prueba-error de toda la vida, y vuelve aquí si te atascas con algo de la interfaz. Aunque es buena idea leer la mini sección opciones de la linea de comandos (command line options) mostrada abajo. Ten en cuenta que no hay ayuda en el programa; es aquí donde debes buscar ayuda.

2.1 Opciones de la linea de comandos (Command line options)

En la linea de comandos hay varias opciones que controlan el comportamiento global de RealTimeBattle. Aqui puedes elegir el "archivo de opciones" que determina los valores por defecto de las 'opciones' (options). También puedes seleccionar en que modo de juego se ejecutará el programa: debug, normal o competición.


 Uso: RealTimeBattle [opciones] 

 Opciones:
    --debug_mode,                -d   debug mode.
    --debug_level [0-5],         -D   determina el nivel inicial de debug. Implica -d.
    --normal_mode,               -n   modo normal (por defecto).
    --competition_mode,          -c   modo competición.

    --no_graphics,               -g   sin gráficos.
    --option_file [file],        -o   selecciona el archivo de opciones (por defectot: $HOME/.rtbrc)

    --log_file [file],           -l   genera un fichero de registro (log file). Si 'file' es '-' el log se en                                      viará a la salida estandar (STDOUT)

    --tournament_file [file],    -t   especifica un fichero de torneo para comenzar un torneo.

    --statistics_file [file],    -s   fichero en el que se guardarán las estadisticas.

    --message_file [file],       -m   redirecciona los mensajes a un fichero 'file'. Si ponemos '-' en lugar                                       de un nombre de fichero, se redireccionarán a STDOUT. Si tanto el log c                                      omo los mensajes son enviados a STDOUT, '-m' sera ignorado.

    --replay [file]              -r   repite un fichero de registro. Si se pone '-' como nombre de fichero la                                      entrada será tomada de la entrada estandar (STDIN).

    --help,                      -h   muestra este mensaje.
    --version,                   -v   muestra el numero de versión.

Las diferencias entre los tres modos de competición son mostradas a continuación:

2.2 Ventana de control (Control window)

Nuevo torneo (New tournament):

Para comenzar un torneo nuevo. La sección Comenzar un torneo nuevo (Start new tournament window) te dará mas información.

Repetir torneo (Replay tournament):

Replay a game. Te permite seleccionar un fichero de registro (log file) del juego para poder estudiarlo.

Pausa:

Detiene el juego, en el modo competición (competition-mode) la pausa del juego sera postpuesta hasta la finalizacion del juego actual.

Finalizar (End):

Finaliza el torneo actual.

Opciones (Options):

Muestra la ventana de opciones (options window).

Estadisticas (Statistics):

Muestra la ventana de estadisticas (statistics window).

Mostrar Arena (Show arena window):

Esta opción puede ser usada para mostrar y ocultar las tres ventanas durante el juego: the Ventana de Arena (arena window), the Ventana de puntuación (score window) and the Ventana de mensajes (message window).

Quit:

Finaliza el programa.

En el modo debug (debug-mode) hay otro grupo de botones disponibles, los cuales estan pensados para ayudar en la depuración de Robots. Ten en cuenta que puedes depurar un proceso ejecutandose; si usas gdb el comando es gdb robot-name process-number.

Paso a paso (Step):

En un juego modo debug (debug-mode)<@@ref>pauseden pausa (pausa) ejecutará un 'paso' hacia delante. Es muy útil cuando se depura un Robot, ya que de otra manera el robot es 'floodeado' con mensajes (N. del T. el robot recibe demasiados mensajes como para poder analizarlos).

Finalizar juego (End game):

Finaliza el juego actual. Tiene el mismo efecto que un timeout .

Matar el Robot señalado (Kill marked robot):

En el modo debug, se puede marcar un Robot en la ventana de puntuación (score window). Dicho Robot morirá al pulsar este botón.

Grado de depuración (Debug level):

Cambiar el nivel de depuración es una manera de señalar a los robots que mensajes y cuales no deben enviar. El rango posible es ente 0 y 5, donde 0 significa que no hay ningun tipo de debug y 5 es el maximo nivel de debug, esto es, todos los mensajes de debug seran enviados.

Cuando estas repitiendo un log-file que no sea desde la STDOUT, hay varios botones para controlar la repetición. Para mas información mira en la sección repetición (replaying).

2.3 Comenzar un nuevo torneo (Start new tournament window)

Para seleccionar robots y arenas para el torneo, marca los archivos de la derecha y pulsa en el botón añadir (add). Los ficheros seleccionados son mostrados a la izquierda y pueden ser borrados igualmente, pulsando el botón eliminar (remove).

Un torneo consiste en un numero de secuencias de juegos. En cada secuencia el mismo robot compite en todos los juegos. Aqui se puede seleccionar el numero de juegos y de secuencias asi como el numero de robots de cada secuencia. Si pretendes jugar con todos los robots en todos los juegos mejor escoger una secuencia en lugar de incrementar el numero de juegos. La razon es evitar el reseteo de los procesos de los robots que llevan un periodo de tiempo, especialmente si hay muchos.

Tambien es posible cargar un torneo desde un archivo o salvar el torneo actual. El último torneo jugado será almacenado en /tmp/rtb/tmp.tour y será siempre mostrado cuando se abre la ventana. Si no está disponible se muestra un torneo vacío.

Debes seleccionar al menos dos robots y una arena para poder empezar.

2.4 Directorios de Robots y Arenas

Hay dos maneras de encontrar robots o arenas: Ruta de búsqueda de Robots (Robot search path) y Ruta de búsqueda de Arenas (Arena search path). Por defecto siempre se busca en los subdirectorios Robots and Arenas de la instalación de Real Time Battle (por defecto: /usr/local/games/RealTimeBattle), especificados en el Makefile principal, aun cuando en las opciones ponga otra cosa, pero si creas un directorio nuevo, o si tienes instalado Real Time Battle en otro directorio tendras que especificar estas opciones.

2.5 Arena (Arena window)

Aqui es donde tienen lugar las batallas. Si quieres una vista mas detallada, usa los botones de zoom o las teclas +, -, o 0. Los Robots son unos circulos coloreados con una pequeña marca en forma escuadra que muestra la dirección del radar. La linea gruesa es el cañón y la linea delgada apunta en la direccion frontal.

2.6 Ventana de puntuación (Score window)

En esta ventana se muestran los robots que compiten en la secuencia actual.

2.7 Ventana de mensajes (Message window)

Se muestran los mensajes enviados por los Robots usando Print y Debug. Los mensajes mas recientes son mostrados en la parte superior. Puedes limpiar la ventana y ver solo los mensajes nuevos de un robot en particular.

2.8 Ventana de Opciones (Options window)

Aqui tienes la posibilidad de cambiar un gran numero de opciones.En el Capitulo de opciones (Options chapter) puedes encontrar informacion mas detallada. Los cambios no serán aplicados hasta que pulses el botón apply o el botón OK.

Puedes guardar las opciones en un archivo: Salvar Opciones (Save options) salvará las opciones a un fichero que tu elijas y Salvar por defecto (Save as default) guardará las opciones en el fichero .rtbrc de tu directorio home.

El botón Default pondrá todas las opciones con sus valores por defecto.

2.9 Ventana de estadisticas (Statistics window)

Hay varias maneras de ver las estadisticas del tornoe. Puedes elegir entre:

  • esdisticas de un Robot Individual (Robot),
  • el resultado de un juego (game),
  • toda la secuencia (sequence total) o
  • todo el torneo (total).
Pulsando las flechas puedes moverte al primer elemento, retroceder uno, avanzar uno o ir al último. La barra del centro muestra que es lo que se esta mostrando y pulsandola se actualizaran los datos de las estadisticas del juego actual. Si usas gtk+ 1.1.x, tambien puedes ordenar los datos por columnas presionando en los correspondientes titulos de columnas.

2.10 Sin Gráficos (Running without graphics)

Es posible ejecutar RealTimeBattle sin ningun tipo de gráficos. Esto puede ser muy útil cuando se dan casos de series de tests o cuando se ejecuta una competición. Para usar esta opcion tienes dos opciones: pasar el parametro -g cuando se ejecute el programa, o bien deshabilitar los gráficos cuando se compila el programa (mira en el fichero INSTALL para mas información). La segunda opcion es mejor ya que el ejecutable será menor e irá mas rápido en máquinas lentas. Ello tambien te permite ejecutar RealTimeBattle en ordenadores que no tengan gtk+ instalado.

Cuando se ejecuta sin gráficos tienes que indicarle un fichero de torneo, o de lo contrario no sucederá nada. También es buena idea crear un fichero de registro o un fichero de estadisticas si quieres saber el resultado.

2.11 Ficheros de Torneo (Tournament files)

El fichero de torneo se especifica en las opciones de la linea de comandos (command line option). Cuando se especifica un torneo, él comienza y finaliza automaticamente. Para mas información sobre como guardar las estadisticas mira en la seccion estadisticas (statistics file).

Un fichero de torneo esta conformado por cinco 'palabras'. Todas esas 'palabras' pueden ser escritar muchas veces, pero ten en cuenta que solo la ultima de esas 'palabras', que tiene un numero como argumento, es realmente importatnte. Todas las 'palabras' estarán seguidas de una comilla simple.

Games/Sequence o g/s:

Toma un numero * como argumento. El numero indica cuantos juegos deben ser jugados por torneo. El asterisco significa que el programa ejecutará un juego por cada arena que haya. El valor por defecto es 1.

Robots/Sequence o r/s:

Toma un número * como argumento. El número significa cuantos robots competirán en cada secuencia. El asterisco significa que el programa utilizará el máximo número de robots disponibles. El valor por defecto es 2.

Sequences o seq:

toma un número * como argumento. Este número indica cuantas secuencias serán jugadas en este torneo. El asterisco implica que el programa tomará el numero de robots y el numero de secuencias para todos los robots, y realizará un calculo binomial de forma que cada robot compita contra cada uno de los otros robots exactamente una vez. El valor por defecto es 1.

Robots or r:

Toma uno o mas ficheros de robot como argumento.

Arenas or a:

Toma uno o mas ficheros de arena como argumento.

Los argumentos de fichero pueden ser algunos de los siguientes:

Just the file:

Busca la ruta del fichero:

Por ejemplo: Robot: empty.robot

Full path to the file:

toma el fichero dado

Por Ejemplo: Arena: /usr/local/games/RealTimeBattle/Arenas/Circle.arena

All files in path:

Busca en todas las rutas del path y selecciona todos los ficheros que encuentre.

Por Ejemplo: Arena: *

One specific directory:

Busca en el directorio dado y toma todos los ficheros que encuentre.

Por Ejemplo: Robot: /usr/local/games/RealTimeBattle/Robots/*

Es posible también escribir numerosas veces el mismo fichero. Esto es, si quieres 3 robots rotate_and_fire.robot, simplemente escribe rotate_and_fire.robot tres veces. Esto se verifica tambien con *.

Ejemplo de fichero de torneo:

R: * Arenas: Circle.arena Square.arena G/S: 2 r/s: 3 Sequences: *

2.12 Ficheros de Registro (Log files)

A veces puede ser útil repetir (replay) un juego y analizarlo detalladamente o simplemente guardarlo para una futura referencia. Añade -l al iniciar RealTimeBattle, junto con el nombre de fichero para activar esta opcion, y utiliza '-' para que el registro sea mostrado en la salida estándar.

El formato del fichero de registro es de la siguiente manera: cada linea consiste en una letra, que determina el tipo de informacion, seguido de una lista de argumentos separados por espacios. Se muestra la siguiente informacion:

Header:

H [games/sequence] [robots/sequence] [sequences] [robots]

Arena info:

A [line from the arena file]

Game start:

G [sequence number] [game number]

Option:

O [option:value]

List of robot properties:

L [robot id] [robot colour] [robot name]

Robot position info:

R [robot id] [x] [y] [cannon angle] [radar angle] [energy]

Time:

T [time elapsed]

Print message:

P [robot id] [message to print]

Cookie:

C [cookie id] [x] [y]

Mine:

M [mine id] [x] [y]

Shot:

S [shot id] [x] [y] [dx/dt] [dy/dt]

Die:

D [type of object killed] [object id] (if robot: [points received] [position])

2.13 Repetición (Replaying)

Puedes repetir un juego a partir de su fichero de registro (log file) pasando al programa desde la linea de comandos (command line option) el parámetro "-r" o bien desde la ventana de control (control window). Ten en cuenta que si el registro proviene de la entrada estándar (comando "-r -"), no podrás hacer demasiado, pero por otro lado podrás influir en el desarrollo del juego:

  • La barra de dsplazamiento superior muestra el progreso del juego. Puedes saltar a cualquier momento del juego desplazandote en la barra.
  • El rebobinado y el avance rápido sirven para avanzar o retroceder en la repetición. Puedes variar la velocidad cambiando la opción factor de avance rápido (fast forward factor).
  • Puedes estudiar el juego detenidamente avanzando o retrocediendo paso a paso en la repetición. Para ello el juego debera estar en factor de avance rápido (fast forward factor)<@@ref>pausedpausa (paused).
  • Con los cuatro botones puedes saltar entre los juegos y las secuencias.

2.14 Fichero de estadisticas (Statistics files)

El fichero de estadisticas se usa solo cuando es especificado un fichero de torneo (tournament file). Las estadisticas serán guardadas en dicho fichero cuando el torneo finalize. De todoas modos, puedes salvarlas a mano usando el botón save de la ventana de estadisticas (statistics window).


Next Previous Contents realtimebattle-1.0.8/Documentation/Spanish/rtb-docs-1.0.5-es-3.html0000644000175000017500000002566110170545356022715 0ustar moimoi Manual de Usuario de Real Time Battle, version 1.0.5 rev 1: Estructura (Structure) Next Previous Contents

3. Estructura (Structure)

En esta sección se describe la estructura del programa, como se mueven los robots, los disparos, el control del radar, la puntuación y como se monta un torneo.

3.1 Movimiento del Robot (Robot motion)

El Robot se comporta como un vehículo con ruedas, se mueve hacia adelante con un pequeño rozamiento (roll friction) y resbala hacia los laterales (derrapa) con un gran rozamiento lateral (sliding friction). El tercer efecto de resistencia es la resistencia del aire (air resistance), que es aplicada en dirección contraria al movimiento y que incrementa con la velocidad.

Hay tres formas de variar el movimiento del robot: acelerar (acceleration), rotar (rotation) y frenar (braking).

La aceleracion se usa para incrementar la velocidad de los robots en la dirección frontal. No es posible controlar directamente la velocidad. La aceleración es la unica manera de mover al robot.

Rotando el robot puedes hacer que este gire. Ten en cuenta que la rotación no afecta directamente al movimiento, si no que afecta unicamente a la direccion de la frontal del robot. La fricción junto con la aceleración, llevarán a cabo el giro del robot.

Cuando se frena se incrementa la fricción hasta llegar a un valor máximo. Este se da cuando las ruedas son bloqueadas y el robot, en lugar de rodar, derrapa. No te olvides de liberar el freno cuando quieras aumentar la velocidad otra vez.

3.2 Energía (Energy)

La salud del Robot es medida por su energía. Hay varias maneras de que el robot pierda energía. El robot puede:

  • ser alcanzado por un disparo,
  • chocar con un muro o con otro robot,
  • 'pisar' una mina o
  • disparar.

Y solo hay una manera de ganar energia: comer una cookie (N. del T. o galletita ;))

3.3 El radar (The radar)

El método principal para obtener información sobre nuestro entorno es mediante el radar. Cada vez que el robot es actualizado recibirá un mensaje del radar (radar message), dándole información sobre los objetos mas cercanos en la dirección actual del radar, por ejemplo la distancia y el tipo de objeto. Si detectamos un robot, nos mostrará el nivel de energía de dicho robot.

Ya que la información ofrecida por el radar es prácticamente lo único que conoceremos de nuestros alrededores, es muy importante hacer un uso óptimo del radar. Es también importante maniobrar lo mejor posible el radar, para obtener información útil.

3.4 Posición de los robots (The robots position)

A aprtir de la versión 1.0.5 de RTB es posible obtener la posición de los robots directamente. En lugar de tener que analizar los alrededores con el radar y encontrar tu posicion a partir de él, puedes configurar RTB para que mande las coordenadas del robot (robot coordinates). El comportamiento es controlado por la opcion enviar coordenadas del robot (Send robot coordinates).

3.5 Disparo (Shooting)

Disparar es el principal método de eliminar a los otros robots. En RealTimeBattle un disparo se mueve con una velocidad constante, calculada como la suma de la velocidad del robot mas la velocidad de disparo (shot speed) en la dirección hacia la que apunta el cañón. El disparo se moverá hasta que choque con un objeto.

Cuando se dispara un proyectil se le da una energia, que determina el daño que sufrirá el robot contra el que impacte. La energia es, no obstante, limitada; la energia minima (minimal energy) evita los disparos de muy baja energía, por ejemplo si quieres eliminar una mina. La energia maxima (maximal energy) esta restringida por la cantidad de la energia de disparo potencial del robot, que se incrementa con el tiempo.

El disparar conlleva asi mismo cierto riesgo, ya que al disparar el mismo robot pierde una cantidad de energía proporcional a la energia del disparo.

Si se impacta sobre una mina o una cookie, estas son destruidas, independientemente de la energia del disparo. Asi pues deberias usar una cantidad mínima de energía para disparar a las minas.

Los disparos que choquen no seran destruidos inmediatamente, sino que sus velocidades y sus energias seran superpuestas, con lo que si chocan dos disparos que viajan en la misma direccion, sus energías seran sumadas, y en caso de que choquen de frente, sus energías seran canceladas.

3.6 Choques (Collisions)

Los robots son objetos frágiles, que sufirán daños cuando choquen contra las paredes o contra otros robots. Cuando se choca, los robots son como pelotas, con tres factores que afectan su comportamiento el coeficiente de robote, el coeficiente de dureza y el coeficiente de protecciónt. En la parte delantera, los robots estan hechos de un material diferente, normalmente mas duro. Esto puede ser usado para arrollar a otros robots, haciendo mas daño del recibido.

3.7 Cookies y minas (Cookies and Mines)

Las cookies y las minas son esencialmente objetos iguales, con la diferencia que los robots ganarán energia tomando una cookie y perderán energía con las minas. Tanto las minas como las cookies son colocadas aleatoriamente en la arena durante el juego. Su potencia y su frecuencia pueden ser controladas mediante las opciones (options).

3.8 Tiempo (Time)

Como el propio nombre del programa indica, el tiempo que se usa es tiempo real. Es tarea de los robots responder rápidamente a los eventos del juego. El juego avanza con una frecuencia de refresco regular. Entre cada llamada los robots comparten el resto del tiempo de la CPU. Para prevenir que los robots utilicen masivamente el procesador, su tiempo de CPU esta limitado en el modo competición. Las opciones correspondientes te darán mayor informacion.

De todas formas, el tiempo real puede ser violado en algunos casos. Puedes aumentar o disminiur la velocidad del juego cambiando la escala de tiempo (timescale). Asimismo hay un metodo para prevenir el colapso del sistema, cuando la carga es demasiado alta. Si el tiempo entre dos refrescos es superior a max timestep, la velocidad del juego se reducira correspondientemente.

3.9 Un juego (A game)

Al comienzo de un juego, los robots seran dispuestos en una posición aleatoria en la arena, con una orientación aleatoria. El radar y el cañón estaran los dos apuntando al frente y la energia potencial de disparo (potential shot-energy) estará puesta a cero. El objetivo de los robots es sobrevivir el mayor tiempo posible a la vez que destruir los otros robots. Un robot recibirá un punto por cada robot enemigo que elimine. Asi mismo, se les dará un punto extra a cada uno de los robots participantes. Si dos robots mueren al mismo tiempo, se reparten los puntos amistosamente (en otras palabras, obtendrán medio punto por cada robot que muera al mismo tiempo).

Un juego finaliza cuando el numero de robots vivos es menor que dos o cuando finaliza el tiempo (time is up).

3.10 Una secuencia (A sequence)

Una secuencia es una serie de juegos, donde luchan los mismos robots. Al comienzo de una secuencia se inicias los procesos de los robots. El número de robots en una secuencia esta limitado a 120. Para cada robot se crean dos tuberias (pipes) para comunicarse con el robot.

A partir de entonces se juegan el número de juegos indicados y finalmente se eliminan los procesos de los robots.

3.11 Un torneo (A tournament)

Un torneo es una serie de secuencias. El numero de robots en un torneo es (teoricamente) ilimitado. Esta permitido Cualquier número de secuencias, pero para hacer un torneo agradable, deberás elegir un numero de secuencias de forma que cada robot compita en el mismo numero de juegos (por ejemplo #secuencia = #robots por juego / GCD( #robots por juego, #robots en el torneo)).


Next Previous Contents realtimebattle-1.0.8/Documentation/Spanish/rtb-docs-1.0.5-es-4.html0000644000175000017500000004506410170545356022715 0ustar moimoi Manual de Usuario de Real Time Battle, version 1.0.5 rev 1: Construccion de Robots (Robot construction) Next Previous Contents

4. Construccion de Robots (Robot construction)

Este capitulo explica lo que se necesita saber para construir tus propios robots. Lo mas importante es conocer el lenguaje de mensajes, formado aproximadamente por 35 comandos usados para comunicarse con el programa servidor. Es también muy útil estudiarse los robots de ejemplo del directorio Robots/.

4.1 Leer Mensajes (Reading messages)

Al comienzo de cada secuencia el proceso robot es lanzado por el servidor y asigna dos pipes (tuberias), una para la entrada y otra para la salida. Estas estan conectadas a stdin y a stdout, por lo que desde el punto de vista del robot, este se comunica con el servidor mediante la salida estandar y mediante la entrada estandar.

Esto significa que los robots pueden ser escritos en casi cualquier lenguaje de programación. De todas formas, el robot ha de ser capaz de saber cuando recibe un mensaje. Para ello hay al menos tres métodos, que son:

Standard in blocks:

Este es el método mas simple. Es como si siempre hubiera un mensaje esperando. Lo malo es que con este método no puedes hacer ningun cálculo mientras esperas nuevos mensajes.

Para elegir este metodo, manda la siguiente opcion en cuanto el programa comience.:

"cout << "RobotOption " << USE_NON_BLOCKING << " " << 0 << endl;"
Ten en cuenta que esto es codigo c++. Si no usas c++ simplemente imprime en la salida estandar al mensaje mostrado. endl es lo mismo que 'end of line'.

Select:

Usar la funcion select hace posible que el robot tenga un mejor control a la hora de recibir nuevos mensajes. Te permite, por ejemplo, leer nuevos mensajes disponibles, hacer algunos calculos, mandar comandos y esperar mensajes. Para aprender mas sobre select, lee la documentacion de Unix (las paginas man o la informacion del emacs).

Para seleccionar el metodo select, envia la siguiente opcion en cuanto el programa comience

cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl;
Ten en cuenta que esto es codigo c++.

Signals:

Si quieres, puedes indicarle a RealTimeBattle que envie una señal al robot en cuanto este disponible un nuevo mensaje. Este metodo permite al robot estar continuamente informado por el servidor incluso cuando el robot esta ocupado calculando algo. Si no estas seguro de como usar las señales, mira en la documetnacion de unix o estudia los otros robots para aprender mas.

Para seleccionar este metodo, envia la siguiente opcion en cuanto se inice el programa:

cout << "RobotOption " << USE_NON_BLOCKING << " " << 1 << endl;
cout << "RobotOption " << SIGNAL << " " << SIGUSR1 << endl;
Se trata de codigo c++.

Puedes seleccionar cualquier señal en lugar de SIGUSR1

Como apoyo para la implementacion de estos tres metodos, el robot rotate_and_fire ha sido escrito en tres versiones diferentes. Tomate la libertad de estudiar y coger código de este robot, si quieres.

No es recomendable estar continuamente mirando si hay mensajes nuevos, ya que esto ralentiza los procesos de una forma considerable, y en una competition-mode el robot moririía por salirse del tiempo de CPU.

4.2 Messagetypes.h

El fichero Messagetypes.h es una buena fuente de informacion sobre el lenguaje de mensajes. Es un fichero c/c++ (un include, vamos), pero se puede reescribir facilmente para usarlo con otros lenguajes. Aquí encontrarás un listado de los mensajes, los avisos (los warning), objetos, opciones de juego y opciones de los robots.

4.3 Cheating

Desde el momento en que el prograso de la batalla es en tiempo real con procesos reales, es posible escribir programas que 'hagan trampas' de una manera u otra. Por ejemplo examinando los otros robots o incluso al RealTimeBattle mismamente para obtener mas informacion, usando muchos recursos para 'ahogar' a los otros robots, etc... Esta no es la manera de vencer a los oponentes, por supuesto, asi que intentaremos erradicarlo al maximo posible.

En el modo competicion (competition-mode) los robots tienen un uso limitado de CPU, por lo que un robot no puede usar toda la CPU. Esta 'norma' podria ser saltada lanzando procesos hijos. Aunque sería fácilmente detectable un robot con comportamiento sospechoso.

No es posible prevenir todas las maneras de 'hacer trampas' en RealTimeBattle. Por ejemplo esta permitido leer y escribir en ficheros, pero recuerda que los organizadores de las competiciones pueden prohibir esto si quieren. Poniendo permisos sobre los executables de los robots y sobre los directorios esto se puede hacer facilmente.

Es posible que haya mas formas de hacer cosas 'ilegales' con los robots. Si detectas una de estas formas, por favor manda un bug report. De todas formas es responsabilidad del organizador del torneo asegurarse de que se cumplen todas las normas.

4.4 Mensajes a los Robots (Messages to robots)

Initialize [first? (int)]

Este es el primer mensaje que el robot recibirá. Si el argumento es uno, esta es la primera secuencia del torneo y se deberá mandar el nombre y el color (Name and Colour) al servidor, o de lo contrario el esperaría los mensajes de nombre (YourName) y color (YourColor). Ver debajo.

YourName [name (string)]

El nombre actual del robot.

YourColour [colour (hex)]

Color actual del robot. Cambialo si no te gusta el actual.

GameOption [option (int)] [value (double)]

Al comienzo de cada juego, se enviarán a los robots un número de parámetros, que pueden ser útiles al robot. Para obtener una lista de ellos, mira en el fichero Messagetypes.h la sección de game_option_type. En el capitulo de opciones (options chapter) encontraras información mas detallada de cada opción.

debug level es enviado al robot como una opcion de juego, aunque no se haya indicado en las opciones.

GameStarts

Este mensaje es enviado cuando comienza el juego.

Radar [distance (double)] [observed object type (int)] [radar angle (double)]

Este mensaje ofrece información sobre el radar en cada turno. Recuerda que el angulo del radar es relativo al frontal del robot y viene dado en radianes.

Info [time (double)] [speed (double)] [cannon angle (double)]

El mensaje Info siempre sigue al mensage Radar. Ofrece mayor información sobre el estado del Robot. 'Time' es el tiempo transcurrido desde el comienzo del juego. Esto no tiene porque ser igual que el tiempo real transcurrido, debido a la escala de tiempo (time scale) y al max timestep.

Coordinates [x (double)] [y (double)] [angle (double)]

Informa sobre la posición actual del robot. Este mensaje se envia solo si la opción Send robot coordinates es 1 o 2. Si es 1 las coordenadas son enviadas relativas a las posicion de comienzo, aunque el robot no sabe exactamente donde empieza, pero si sabe si se ha movido de su punto de origen.

RobotInfo [energy level (double)] [teammate? (int)]

Si detectas un robot con el radar, este mensaje será enviado a continuación, dando información sobre el robot. Se dará el nivel de energía del oponente asi como tu propia energia (ver abajo). El segundo argumento es solo interesante en el modo equipo (team-mate), que aun no esta implementado. 1 significa compañero de equipo y 2 significa enemigo.

RotationReached [what has reached(int)]

Cuando la opción SEND_ROTATION_REACHED esta puesta adecuadamente, este mensaje es enviado cuando un giro (realizado mediante RotateTo o RotateAmount) ha finalizado o bien cuando se modifica la dirección (sweeping). El argumento corresponde a la opción 'what to rotate', como en Rotate.

Energy [energy level(double)]

Al final de cada turno el robot conocerá su nivel de energía. De todas formas, no sera un numero exacto, sino un numero limitado a los niveles de energia (energy levels).

RobotsLeft [number of robots (int)]

Al principio de cada juego y cuando un robot muera, el número restante de robots sera enviado a todos los robots que aun esten vivos.

Collision [colliding object type (int)] [angle relative robot (double)]

Cuando un robot se golpea o es golpeado por algo recibe este mensaje. En el fichero Messagetypes.h puedes encontrar una lista de los tipos de objeto. Obtendrás el ángulo desde el cual la colisión ha ocurrido (angulo relativo al robot) y el tipo de objeto contra el que has chocado, aunque no recibiraá la información de la gravedad del choque. Esto puede ser determinado, indirectamente, por el decremento de la energía.

Warning [warning type (int)] [message (string)]

Un mensaje de aviso (warning) sera enviado al robot en caso de que ocurra algun problema. Actualmente hay siete mensajes de aviso que pueden ser enviados, que son:

UNKNOWN_MESSAGE: El servidor ha recibido un mensaje que no puede reconocer.

PROCESS_TIME_LOW: El uso de la CPU ha sobrepasado el porcentaje de CPU (CPU warning percentage). Solo en modo competicion (competition-mode).

MESSAGE_SENT_IN_ILLEGAL_STATE: El mensaje que se ha recibido no se puede procesar en ese momento del juego. Por ejemplo cuando envia un mensaje Rotate antes de comenzar el juego.

UNKNOWN_OPTION: Cuando el robot envía una opción (robot option)con un nombre inválido o con un argumento incorrecto para esa opcion.

OBSOLETE_KEYWORD: Ese 'keyword' (comando) esta obsoleto y no debería ser usado nunca mas. Para mas informacion mira en el fichero ChangeLog.

NAME_NOT_GIVEN: El robot no ha enviado su nombre antes de que el juego comience. Esto sucede si el tiempo de inicio (robot startup time) es demasiado corto o bien el robot no ha enviado su nombre lo suficientemente pronto.

COLOUR_NOT_GIVEN: El robot no ha enviado su color antes de que el juego comience.

Dead

El robot ha muerto. No intentes enviar nuevos mensajes hasta el final del juego, ya que el servidor no los leerá.

GameFinishes

El juego actual ha finalizado. Preparate para el siguiente !!!

ExitRobot

Sal del programa inmediatamente!!! Sino sera matado (killed) a la fuerza.

4.5 Mensajes de los Robots (Messages from robots)

RobotOption [option nr (int)] [value (int)]

Actualmente solo hay dos opciones disponibles:

SIGNAL: Le comunica al servidor que envie una señal cuando haya un mensaje esperando. El argumento determinará esa señal. Envia este mensage (con el argumento SIGUSR1, por ejemplo) tan pronto como estes listo para recibir la señal. Por defecto es 0, lo que significa que no se envie ninguna señal.

SEND_SIGNAL: Le indica al servidor que envie SIGUSR1 cuando haya un mensaje esperando. Envia este mensaje (con argumento 1 (=cierto)) tan pronto como estes preparado para recibir la señal. Por defecto es falso.

SEND_ROTATION_REACHED: Activa esta opcion si quieres que el servidor te envie un mensaje RotationReached cuando finalize una rotacion. Con un valor de 1, el mensaje será enviado cuando finalice un RotateTo o bien un RotateAmount. Con un valor 2, los cambios en la direccion sweep (de barrido) seran también notificados. Por defecto esta opcion esta a 0, con lo que ningun mensaje sera enviado.

USE_NON_BLOCKING: Selecciona como funciona la lectura de mensajes (reading messages). Esta opcion será enviada tan pronto como el programa comienza. Esta opcion debe ser activada siempre, ya que no hay disponbible ningun valor por defecto.

Name [name (string)]

Cuando se recibe un mensaje de inicializacion (Initialize) con un argumento a 1, indicando que esa es la primera secuencia, debes enviar tanto el nombre como el color del robot.

Colour [home colour (hex)] [away colour (hex)]

Mirar arriba. Los colores son como las camisetas de fútbol, el color propio es usado excepto que ya este ocupado por otro. Si no se pueden utilizar ninguno de los colores indicados, se escogerá uno aleatoriamente.

Rotate [what to rotate (int)] [angular velocity (double)]

Fija la velocidad angular del robot, del cañón y/o del radar. 'what to rotate' 1 para el robot, 2 para el cañón, 4 para el radar o una suma de cualquiera de los tres para fijar la velocidad de rotación de mas de uno a la vez. La velocidad angular viene dada en radianes por segundo y esta limitada a maxima velocidad de rotacion (Robot (cannon/radar) max rotate speed).

RotateTo [what to rotate (int)] [angular velocity (double)] [end angle (double)]

Como Rotate, pero rotará a un angulo dado. Ten en cuenta que los angulos del radar y del cañón son relativos al ángulo del robot. No podras usar este comando para rotar el robot, para ello utiliza RotateAmount.

RotateAmount [what to rotate (int)] [angular velocity (double)] [angle (double)]

Como Rotate, pero rotará de una forma relativa al angulo actual.

Sweep [what to rotate (int)] [angular velocity (dbl)] [left angle (dbl)] [right angle (dbl)]

Como rotate, pero fija el radar y/o el cañón en un modo de barrido (sweep). No sera válido para el robot.

Accelerate [value (double)]

Fija la aceleracion del robot. El valor sera fijado entre los valores aceleracion maxima/minima (Robot max/min acceleration).

Brake [portion (double)]

Activa el freno. Freno total (portion= 1.0) significa que el rozamiento en la direccion del robot es igual al Slide friction.

Shoot [shot energy (double)]

Dispara con la energia dada. Las opciones de disparo (The shot options) te darán mas información.

Print [message (string)]

Muestra un mensaje en la ventana de mensajes (message window).

Debug [message (string)]

Muestra mensajes en la ventana de mensaje (message window) si estamos en modo debug (debug-mode).

DebugLine [angle1 (double)] [radius1 (double)] [angle2 (double)] [radius2 (double)]

Dibuja una linea directamente sobre la arena. Solo esta disponible en el máximo nivel de debug (5), de lo contrario se enviara un aviso (warning message) . Los argumentos son el punto inicial y el punto final de la linea dada en coordenadas polares relativas al robot.

DebugCircle [center angle (double)] [center radius (double)] [circle radius (double)]

Similar a la opcion anterior, pero dibuja un circulo. Los primeros dos argumentos indican el angulo y el radio del punto central relativo al robot. El tercer argumento indica el radio del circulo.


Next Previous Contents realtimebattle-1.0.8/Documentation/Spanish/rtb-docs-1.0.5-es-5.html0000644000175000017500000003601110170545356022706 0ustar moimoi Manual de Usuario de Real Time Battle, version 1.0.5 rev 1: Opciones (Options) Next Previous Contents

5. Opciones (Options)

Existen unas cuantas opciones para configurar RealTimeBattle, reunidas en diferentes grupos. Nuestra filosofia es ofrecer la máxima libertad para configurar el juego. Esto siginifica que puede haber combinaciones de opciones que causen problemas en el juego.

5.1 Opciones de entorno (Environmental options)

Constante Gravitacional (Gravitational Constant):

Es la aceleración producida por la gravedad. En la Tierra es 9,8 aproximadamente. Un valor superior incrementará la friccion, lo que frenará al robot.

Resistencia del aire (Air resistance):

Como su propio nombre indica. Incrementa con la velocidad.

Rozamiento (Roll friction):

La fricción en la direccion del robot si este no esta frenando.

Rozamiento 'lateral' (Slide friction):

La friccion perpendicular a la direccion del Robot. Tambien es la maxima friccion si el robot esta frenando.

Enviar coordenadas del Robot (Send robot coordinates):

Determina como seran enviadas las coordenadas a los robots. Estan disponibles las siguientes opciones:

  • 0 - no enviar coordenadas (por defecto)
  • 1 - enviar coordenadas relativas a la posicion de inicio
  • 2 - enviar coordenadas absolutas

5.2 (Opciones de Robot) Robot options

Máxima acceleración (Robot max acceleration):

Los robots no pueden acelerar por encima de este valor ni...

Minima aceleracion (Robot min acceleration):

... por debajo de este.

Radio del Robot (Robot radius):

Determina el tamaño del Robot.

Masa del Robot (Robot mass):

Una masa mayor incrementará el daño en las colisiones.

Coeficiente de rebote (Robot bounce coefficient):

Afecta al rebote de los robots en las colisiones. Si es cero los robots quedaran unidos en un choque, y si es uno se comportaran como bolas de billar perfectas.

Coeficiente de dureza (Robot hardness coefficient):

Determina el daño que sufriran los robots en las colisiones. Cuanto mas bajo sea el valor, mas blando es el material de los robots.

Coeficiente de protección (Robot protection coefficient):

Influye en la protección que lleva el robot. Este factor debe ser multiplicado por la energia de impacto para saber cuanto se reduce la energía del robot.

Delantera del Robot (Robot frontszie):

La parte delantera del robot es de un material diferente que el resto, normalmente un material mas duro y mas protector, con lo que los robots pueden dañarse unos a tros chocándose entre sí.

Coeficiente de rebote frontal (Robot front bounce coefficient):

Ver arriba.

Coeficiente de dureza frontal (Robot front hardness coefficient):

Ver arriba.

Coeficiente de protección frontal (Robot front protection coefficient):

Ver arriba.

Energia de inicio (Robot start energy):

Representa la cantidad de energía que tendra el Robot al inicio de cada juego.

Máxima energia del Robot (Robot max energy):

Comiendo galletitas, el robot puede incrementar su energía; aunque no mas allá de este valor.

Máxima velocidad de rotación (Maxium rotate speed):

Indica cuan rápido puede girar un robot sobre si mismo. Unidades: radianes/sg .

Máxima velocidad de rotación del cañón (Robot cannon max rotate speed):

Indica cual es la velocidad maxima de rotación del cañón. Ten en cuenta que el cañón y el radar se mueven de forma relativa al robot, con lo que la velocidad de rotación en un momento dado puede ser mayor que este valor.

Velocidad máxima de rotación del Radar (Robot radar max rotate speed):

Indica cual es la velocidad de rotación maxima del radar. Mirar la nota anterior.

Niveles de energía del Robot (Robot energy levels):

El Robot solo puede averiguar su energía de forma aproximada. Esta opción marca cuales seran los niveles de discretización usados.

5.3 Opciones de disparo (Shot options)

Radio del disparo (Shot radius):

Es el tamaño de los disparos. Debería ser menor que el radio del robot (robot radius).

Velocidad del disparo (Shot speed):

Los disparos se mueven a esta velocidad mas la velocidad del robot en la dirección del cañón.

Penalización de disparo (Shooting penalty):

Cuando un robot dispara, él mismo sufre un daño. Este factor multiplicado por la energía del disparo indican el daño. Si el número de robots es grande, este número es reducido, por lo que practicamente no perderas energía al disparar.

Mínima energia de disparo (Shot min energy):

Indica la menor potencia de disparo disponible. Un robot que trate de disparar con una energía menor a esta no efectuará el disparo.

Máxima potencia de disparo (Shot max potential energy):

Los robots tienen una energía de disparo que incrementa con el tiempo, pero que nunca excede de este valor.

Velocidad de incremento de la energia potencial de disparo (Shot potential energy increase speed):

Determina con cuanta rapidez se incrementara la energía de disparo mencionada anteriormente. Unidades: energia/sg.

5.4 Opciones Extra (Extra options)

Máxima energía de una Cookie (Cookie max energy):

La energía de una cookie es una valor comprendido entre la máxima energía de una cookie y la minima energía de una cookie.

Mínima energía de una Cookie (Cookie min energy):

Ver arriba.

Frecuencia de las cookies (Cookie frequency):

El numero de cookies por segundo que apareceran.

Radio de la Cookie (Cookie radius):

Tamaño de la cookie.

Maxima energía de una Mina (Mine max energy):

La energía de las minas es un valor aleatorio comprendido entre el máximo valor de una mina y el minimo valor de una mina.

Minima energia de una mina (Mine min energy):

Ver arriba.

Frecuencia de las minas (Mine frequency):

El numero de minas por segundo que apareceran.

Radio de la mina (Mine radius):

Indica el tamaño de la mina.

Color de las cookies (Cookie colour):

Indica el color de las cookies en hexadecimal, en la forma -R-G-B (rojo-verde-azul).

Color de la mina (Mine colour):

Ver arriba.

5.5 Opciones de tiempo (Time options)

Timeout:

Es el máximo de tiempo que durara un juego. Cuando el tiempo acaba todos los Robots que aun viven serán eliminados, y ninguno recibirá punto alguno.

Tiempo de Refresco (Max timestep):

Si la máquina se ralentiza temporalmente, el tiempo de refresco podría aumentarse. Mediante esta opción RealTimeBattle ralentizará el reloj cuando sea necesario, aunque ello suponga violar el término de Tiempo Real.

Escala de tiempo (Time scale):

Incrementando la escala de tiempo en un valor mayor que 1 significa que el reloj del juego irá mas rapido que un reloj corriente. Cambiar este valor puede ser útil si quieres dar mas tiempo a los robots o si tienes un ordenador rápido y quieres incrementar la velocidad de juego.

Intervalos de refresco (Update interval):

Esta opción determina el tiempo entre dos refrescos de robot. Por ejemplo, la frecuencia con la que los estados del robot serán cambiados. Este valor no es influenciado por la 'Escala de Tiempo' y no puede ser alterado una vez que el programa esta en marcha. La precision es de 1/100 sg (dependiendo de la precisión del sistema sobre el que se ejecuta Real Time Battle).

Robot startup time:

Determina el tiempo entre la ejecución de los procesos Robot y el inicio de la secuencia. Si los robots son negros y no tienen nombre, tal vez debas incrementar este valor un segundo por encima del que tienes. Esto puede ocurrir, por ejemplo, si hay numerosos robots o si la computadora es demasiado lenta o si se ejecuta sobre un ordenador remoto.

Tiempo de inicio de la CPU (Start CPU time):

En el modo competición (competition-mode) el tiempo de uso de la CPU es limitado. Al inicio de una secuencia el robot recibirá esta cantidad de tiempo.

Tiempo extra de CPU (Extra CPU time):

Cuando el tiempo de inicio ha sido agotado, el robot recibiráa esta cantidad extra de tiempo.

Período extra de CPU (Extra CPU period):

El tiempo extra de CPU será al menos un período completo de CPU, de otra manera el robot morirá en el juego actual.

Aviso de CPU (CPU warning percentage):

Cuando el Robot ha usado este porcentaje de tiempo de CPU recibirá un mensaje de aviso.

Intervalo de chequeo (Process check interval):

En modo competición (competition-mode) determina la frecuencia con la que se chequeará el uso de CPU.

Frecuencia de registro (Logging frequency):

Con el fin de reducir los ficheros de registro (log files) puedes incrementar este valor. Con esta opción, la posición del robot será registrada cada n:th intervalos..

5.6 Tamaños de ventana (Window sizes)

Aqui se pueden ajustar los tamaños iniciales de las ventanas, llamadas la ventana de la arena (arena window), ls ventana de mensajes (message window), ls ventana de puntuacion (score window) y ls ventana de estadisticas. También puedes definir la posición de las tres primeras ventanas y de la ventana de control (control window).

5.7 Miscelanea (Miscellaneous options)

Escala de la Arena (Arena scale):

Representa la escala de la Arena. Un valor de 2 proporciona un tamaño el doble de largo, esto es, ofrece un area 4 veces mayor.

Factor de Avance (Fast forward factor):

Determina, cuando se esta en modo repetición (replaying), la velocidad de avance o de retroceso cuando de pulsa el boton de avanzar o de retroceder.

Máximo numero de robots admitidos simultaneamente (Max robots allowed simultaneously):

Permite cambiar el numero maximo de robots que puede haber en una secuencia. Si hay demasiados, el sistema podría verse ralentizado (depende tambien de la maquina que se use).

Color de fondo (Background colour):

El color de fondo y...

Color del primer plano (Foreground colour):

... el color del primer plano de la Arena.

Color de los mensajes de Real Time Battle (Colour for RTB messages):

Color para el texto de los mensajes enviados por el RTB.

Ruta de búsqueda de robots (Robot search path):

Es una lista de directorios separados por comas donde se buscaran los robots cuando se comience un nuevo torneo (new tournament) . De todas formas, siempre se buscara en el subdirectorio Robots situado en el directorio de instalacion del RTB (por defecto: /usr/local/games/RealTimeBattle).

Ruta de búsqueda de la Arena (Arena search path):

Al igual que arriba, pero para los ficheros de Arena. Aqui el subdirectorio que llama Arenas.


Next Previous Contents realtimebattle-1.0.8/Documentation/Spanish/rtb-docs-1.0.5-es-6.html0000644000175000017500000001341310170545356022710 0ustar moimoi Manual de Usuario de Real Time Battle, version 1.0.5 rev 1: Construcción de Arenas (Arena construction) Next Previous Contents

6. Construcción de Arenas (Arena construction)

En el RealTimeBattle, es muy sencillo construir tus propias arenas. El lenguaje consiste unicamente en 11 comandos, y hay basicamente cuatro bloques de construcción: lineas, circulos, circulos_internos y arcos. Esto es asi debido a una razon de rapidez, ya que es muy facil detectar las colisiones en un entorno formado por circulos y lineas. Los circulos y los circulos internos impiden a los robots entrar en un circulo o bien les impiden salir de un circulo, respectivamente. Las lineas y los arcos impiden a los robots el paso, aunque tienes que poner circulos en cada final de linea para crear objectos sólidos. Los comandos polygon, closed_polygon y poly_curve pretenden simplificar este procedimiento.

Todos los angulos se dan por defecto en radianes pero pueden ser cambiados a grados mediante el comando angle_unit degrees.

Ten en cuenta que el RealTimeBattle no prueba si el fichero de Arena es correcto, eso se deja enteramente a tu disposición. De todas formas, se producirá algun error si se violan las reglas del lenguaje.

Los ficheros de Arena deben llevar la extension .arena y deben ser colocados en el directorio de Arenas para que el RTB los encuentre.

Los argumantos coeficiente de rebote y dureza determinan el material de los muros. Estos parametros toman valores entre 0 y 1. Muros mas duros supondran un mayor daño a los robots que choquen contra ellos y un mayor coeficiente de rebote producira un rebote mayor en las colisiones.

Es una buena idea estudiarse las Arenas incluidas y aprender de los ejemplos.

6.1 Comandos de Arena (Arena commands)

Un comando esta compuesto por el nombre y los argumentos separados por espacios. Asegurate que proporcionas el numero correcto de argumentos !!.

En la lista de comandos, los argumentos vinen dados entre corchetes.

scale [value]

Este valor indica el factor escala, por el cual serán multiplicadas todas las coordenadas. Este es el primer valor que se debe proporcionar, si existe. Por defecto es 1.0.

angle_unit [unit]

Cambia a la unidad seleccionada, que pueden ser en grados (degrees) o radianes (radians). Por defecto viene dado en radianes.

boundary [left] [up] [right] [down]

Este comando indica los limites de la Arena en la cual estarán los robots, las minas y las cookies. Tambien determina el area visible en la ventana de Arena (arena window). Este comando es requerido y puede ir precedido del comando scale.

inner_circle [bounce] [hardness] [center_x] [center_y] [radius]

Los robots estan limitados al area interior de este circulo.

circle [bounce] [hardness] [center_x] [center_y] [radius]

Un muro en forma de circulo.

line [bounce] [hardness] [thickness] [start_x] [start_y] [end_x] [end_y]

Crea una linea. Esta solamente impide al robot cruzarla a lo largo, asi que recuerda poner circulos en los extremos.

arc [bnc] [hardn] [thickn] [center_x] [ctr_y] [inner_radius] [outer_rds] [angle1] [angle2]

Un arco es un sector de un anillo entre dos angulos.Al igual que la linea, necesita un circulo en los extremos.

polygon [bounce] [hardn] [thickn] [number of vertices] ([center_x] [center_y])...

Esto creara un numero de circulos conectados mediante lineas.

closed_polygon [bounce] [hardn] [thickn] [number of vertices] ([center_x] [center_y])...

Igual que polygon, pero tanto el primer como el ultimo vértice estan tambien unidos por una linea.

poly_curve [bnc] [hardn] [thickn] [start_x] [start_y] [dir_x] [dir_y] ([command args ...]) ...

El comando poly_curve es el comando mas util de todos. Es usado para construir muros mediante lineas y arcos. En cada paso tienes una posicion y una direccion determindas, que son afectadas por los subcomandos. El ultimo subcomando debera ser C o Q.

L [length]

Dibuja una linea con la longitud dada en la direccion actual.

T [angle]

Gira la direccion actual.

A [angle] [radius]

Dibuja un arco.

C

Finaliza conectando con el punto inicial.

Q

Salir.

exclusion_point [position_x] [position_y]

Cuando la Arena consiste en un numero de areas separadas, tienes que excluir todas menos una insertando puntos de exclusion. Todos los puntos que dibujes en una linea recta hasta un punto de exclusión, sin cruzar ningun muro, seran considerados exteriores a la Arena


Next Previous Contents realtimebattle-1.0.8/Documentation/Spanish/rtb-docs-1.0.5-es.html0000644000175000017500000001235410170545356022550 0ustar moimoi Manual de Usuario de Real Time Battle, version 1.0.5 rev 1 Next Previous Contents

Manual de Usuario de Real Time Battle, version 1.0.5 rev 1

Erik Ouchterlony and Ragnar Ouchterlony, rtb@users.sourceforge.net

16 September 2000

Traducido por Joseba Roldan (NESSIE) rbustos@arrakis.es

1. Introduccion

2. Uso del programa

3. Estructura (Structure)

4. Construccion de Robots (Robot construction)

5. Opciones (Options)

6. Construcción de Arenas (Arena construction)


Next Previous Contents realtimebattle-1.0.8/Documentation/Spanish/next.gif0000644000175000017500000000047510170545356020547 0ustar moimoiGIF89app!# Imported from XPM image: next.xpm!,@63333B! 0 A0 0 0  0 `0 `0 A @ `0 `00000000000000000000000000000000000000000000  000000 0000000000000000000000000000` ;realtimebattle-1.0.8/Documentation/Spanish/prev.gif0000644000175000017500000000047510170545356020545 0ustar moimoiGIF89app!# Imported from XPM image: prev.xpm!,@63333# B 0 A0 0 0 0 `0 `0 A   `0 `00000000000000000000000000000000000000000000  000 0000000000000000000000000000000` ;realtimebattle-1.0.8/Documentation/Spanish/toc.gif0000644000175000017500000000047410170545356020355 0ustar moimoiGIF89ap!" Imported from XPM image: toc.xpm!,@6313c B0 0 A0 0 0 0 `0@`0 `  `0@`0 `0@`0000000000 0000000000 00000000 000000 0000 000000000 00000000000 00000000000000` ;realtimebattle-1.0.8/EXTRAROBOTS.README0000644000175000017500000000350510320512673015345 0ustar moimoiIf you do not get one robot per robot directory, you do not have certain compilers or API's needed on your system. Simply read the output of configure to find out what is missing. If you do not have certain features, the related robot will be left out. Robots in the directory rtb-team-framework: For more information about sophisticated teamplay possibilities in RTB and configuration take a look on http://rtb-team.sourceforge.net. We have included only a first tutorial strategy for our framework: brotfrucht Should you have any problems compiling rtb-team so that the whole building process will stop and you cannot procede with some quirks, please a) write a bug report to jonico@users.sourceforge.net b) simply remove the rtb-team-framework directory and start configure again, so you can enjoy the rest of the extra stuff included in this edition 8-) brotfrucht<...>.robot: There are as much robots because they are all individual, so you can't let one of them participate twice or more in a game. Furthermore, brotfrucht will only work if you have ABSOLUTE COORDINATES activated in RealTimeBattle. The binary for every robot for the framework is the same, only the configuration files differ. The brotfrucht robots log into the /tmp/ directory, so look there if something won't work. Robots in the Robots directory with some special issues: joypad_robot: This robot needs a joystick on /dev/js0 or /dev/input/js0 and a working linux joystick api to let it work. It can be started only ONCE. jBot.robot: You will need java and a startup time in RealTimeBattle of about half and a second to let this robot work. perl.robot, perl-Skeleton.robot: As the name says, you will nedd perl in order to start these robots. perl.robot will create a log file located at /tmp/perl.robot.log raziel.py.robot: You will need python in order to run this robot.