Remove expired ports:
2020-08-26 audio/timidity++-tcltk: Broken for more than 6 months 2020-08-26 biology/pbcopper: Broken for more than 6 months 2020-08-26 devel/ace: Broken for more than 6 months 2020-08-26 devel/bin86: Broken for more than 6 months 2020-08-26 devel/erlang-oserl: Broken for more than 6 months 2020-08-20 emulators/qemu40: Please consider using qemu or qemu41 2020-08-26 games/linux-darwinia-demo: Broken for more than 6 months 2020-08-26 games/linux-defcon: Broken for more than 6 months 2020-08-26 games/linux-uplink-demo: Broken for more than 6 months 2020-08-26 games/xevil: Broken for more than 6 months 2020-08-26 games/xminesweep: Broken for more than 6 months 2020-08-26 graphics/backfract: Broken for more than 6 months 2020-08-26 japanese/kanjipad: Broken for more than 6 months 2020-08-26 japanese/xdtp: Broken for more than 6 months 2020-08-26 korean/hpscat: Broken for more than 6 months 2020-08-26 math/barvinok: Broken for more than 6 months 2020-08-26 math/openmesh: Broken for more than 6 months 2020-08-26 math/rehearse: Broken for more than 6 months 2020-08-26 net/hinfo: Broken for more than 6 months 2020-08-26 science/fleur: Broken for more than 6 months 2020-08-26 science/lm: Broken for more than 6 months 2020-08-26 security/ddos_scan: Broken for more than 6 months 2020-08-26 security/gag: Broken for more than 6 months 2020-08-26 security/py-keystone: Broken for more than 6 months 2020-08-26 sysutils/mono-kmod: mastersite disappeared, unfetchable 2020-08-26 x11-themes/gtk-cleanice-engine: Broken for more than 6 months 2020-08-26 x11-wm/aewm: Broken for more than 6 months
This commit is contained in:
parent
3ba6db94dd
commit
09df8f4601
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=546333
3
LEGAL
3
LEGAL
@ -49,12 +49,10 @@ cos-* java/cos Special conditions apply for commercial use
|
||||
cosmo/* games/cosmo Possible copyright infringement
|
||||
CrystalSVGforGnomeIcons* x11-themes/gnome-icons-crystal Themes may contain artwork not done by the author. Keep FreeBSD safe if theme author violated copyrights.
|
||||
cyberbit/* x11-fonts/cyberbit-ttfonts Not free for commercial use
|
||||
darwinia-demo* games/linux-darwinia-demo Redistribution is limited, see license
|
||||
datamodeler databases/datamodeler Packaging prohibited by Oracle license
|
||||
dbvis java/dbvis Redistribution is not permitted
|
||||
dcl-*-C.tar.gz science/cdcl No commercial use
|
||||
dcl-*.tar.gz science/dcl No commercial use
|
||||
defcon* games/linux-defcon Redistribution is limited, see license
|
||||
djbdns* dns/djbdns No license -- see http://cr.yp.to/softwarelaw.html
|
||||
djbfft-* math/djbfft No license -- see http://cr.yp.to/softwarelaw.html
|
||||
dlv lang/dlv Not sure if we can redistribute it
|
||||
@ -197,7 +195,6 @@ tuc-* converters/tuc Author does not allow CD-ROM distribution
|
||||
tw_cli-* sysutils/tw_cli Redistribution forbidden by license
|
||||
ue*dev.zip editors/uemacs Resale allowed for media cost only
|
||||
unifi-5*/UniFi.unix.zip net-mgmt/unifi5 Redistribution of bundled firmware images is not permitted
|
||||
uplink-demo* games/linux-uplink-demo Redistribution is limited, see license
|
||||
uzap.tar.gz editors/uzap This software may not be used to make a profit in any way.
|
||||
vdbench*.zip benchmarks/linux-vdbench Redistribution is not permitted
|
||||
vdr-markad-* multimedia/vdr-plugin-markad Installs station logos
|
||||
|
27
MOVED
27
MOVED
@ -15379,3 +15379,30 @@ net/frr5|net/frr7|2020-08-25|Has expired: Upstream no longer maintained
|
||||
textproc/rubygem-kramdown22|textproc/rubygem-kramdown|2020-08-26|Obsolete, please use textproc/rubygem-kramdown instead
|
||||
devel/rubygem-health_check26-rails60|devel/rubygem-health_check|2020-08-26|Obsolete, please use devel/rubygem-health_check instead
|
||||
devel/rubygem-omniauth_crowd22|devel/rubygem-omniauth_crowd|2020-08-26|Obsolete, please use devel/rubygem-omniauth_crowd instead
|
||||
audio/timidity++-tcltk||2020-08-27|Has expired: Broken for more than 6 months
|
||||
biology/pbcopper||2020-08-27|Has expired: Broken for more than 6 months
|
||||
devel/ace||2020-08-27|Has expired: Broken for more than 6 months
|
||||
devel/bin86||2020-08-27|Has expired: Broken for more than 6 months
|
||||
devel/erlang-oserl||2020-08-27|Has expired: Broken for more than 6 months
|
||||
emulators/qemu40||2020-08-27|Has expired: Please consider using qemu or qemu41
|
||||
games/linux-darwinia-demo||2020-08-27|Has expired: Broken for more than 6 months
|
||||
games/linux-defcon||2020-08-27|Has expired: Broken for more than 6 months
|
||||
games/linux-uplink-demo||2020-08-27|Has expired: Broken for more than 6 months
|
||||
games/xevil||2020-08-27|Has expired: Broken for more than 6 months
|
||||
games/xminesweep||2020-08-27|Has expired: Broken for more than 6 months
|
||||
graphics/backfract||2020-08-27|Has expired: Broken for more than 6 months
|
||||
japanese/kanjipad||2020-08-27|Has expired: Broken for more than 6 months
|
||||
japanese/xdtp||2020-08-27|Has expired: Broken for more than 6 months
|
||||
korean/hpscat||2020-08-27|Has expired: Broken for more than 6 months
|
||||
math/barvinok||2020-08-27|Has expired: Broken for more than 6 months
|
||||
math/openmesh||2020-08-27|Has expired: Broken for more than 6 months
|
||||
math/rehearse||2020-08-27|Has expired: Broken for more than 6 months
|
||||
net/hinfo||2020-08-27|Has expired: Broken for more than 6 months
|
||||
science/fleur||2020-08-27|Has expired: Broken for more than 6 months
|
||||
science/lm||2020-08-27|Has expired: Broken for more than 6 months
|
||||
security/ddos_scan||2020-08-27|Has expired: Broken for more than 6 months
|
||||
security/gag||2020-08-27|Has expired: Broken for more than 6 months
|
||||
security/py-keystone||2020-08-27|Has expired: Broken for more than 6 months
|
||||
sysutils/mono-kmod||2020-08-27|Has expired: mastersite disappeared, unfetchable
|
||||
x11-themes/gtk-cleanice-engine||2020-08-27|Has expired: Broken for more than 6 months
|
||||
x11-wm/aewm||2020-08-27|Has expired: Broken for more than 6 months
|
||||
|
@ -803,7 +803,6 @@
|
||||
SUBDIR += timidity++-gtk
|
||||
SUBDIR += timidity++-motif
|
||||
SUBDIR += timidity++-slang
|
||||
SUBDIR += timidity++-tcltk
|
||||
SUBDIR += timidity++-xaw
|
||||
SUBDIR += timidity++-xskin
|
||||
SUBDIR += tkeca
|
||||
|
@ -1,17 +0,0 @@
|
||||
# Created by: Yoichi Asai <yatt@msc.biglobe.ne.jp>
|
||||
# $FreeBSD$
|
||||
|
||||
PKGNAMESUFFIX= -tcltk
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Tcl/Tk interface for TiMidity++
|
||||
|
||||
BROKEN= fails to build: /bin/sh: tclsh: not found
|
||||
DEPRECATED= Broken for more than 6 months
|
||||
EXPIRATION_DATE= 2020-08-26
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../../audio/timidity++
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
@ -1,7 +0,0 @@
|
||||
This port allows you to operate TiMidity++ with Tcl/Tk interface.
|
||||
|
||||
Formerly, the original version of this program was written by Tuuka
|
||||
Toivonen(until version 0.2i).
|
||||
Now, Masanao Izumo and many hackers are developing "TiMidity++".
|
||||
|
||||
WWW: http://timidity.sourceforge.net/
|
@ -1,27 +0,0 @@
|
||||
bin/tkmidi
|
||||
%%TIMID_LIBDIR%%/bitmaps/arrow.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/back.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/check.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/fast.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/fwrd.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/keydown.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/keyup.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/next.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/off.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/on.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/pause.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/play.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/prev.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/quit.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/random.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/repeat.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/slow.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/stop.xbm
|
||||
%%TIMID_LIBDIR%%/bitmaps/timidity.xbm
|
||||
%%TIMID_LIBDIR%%/browser.tcl
|
||||
%%TIMID_LIBDIR%%/if_tcltk.so
|
||||
%%TIMID_LIBDIR%%/misc.tcl
|
||||
%%TIMID_LIBDIR%%/tkmidity.tcl
|
||||
%%TIMID_LIBDIR%%/tkpanel.tcl
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.tk
|
||||
%%PORTDOCS%%share/doc/ja/timidity++/README.tk
|
@ -107,7 +107,6 @@
|
||||
SUBDIR += p5-transdecoder
|
||||
SUBDIR += paml
|
||||
SUBDIR += pbbam
|
||||
SUBDIR += pbcopper
|
||||
SUBDIR += pbseqan
|
||||
SUBDIR += pear-merger
|
||||
SUBDIR += phrap
|
||||
|
@ -1,35 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= pbcopper
|
||||
DISTVERSION= 0.4.1 # Test with biology/unanimity before upgrading!
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= biology
|
||||
|
||||
# As of March 2018, unanimity is no longer open source.
|
||||
# See https://github.com/PacificBiosciences/ccs.
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Core C++ library for Pacific Biosciences tools
|
||||
|
||||
LICENSE= BSD3CLAUSE
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
|
||||
|
||||
BROKEN= fails to build
|
||||
DEPRECATED= Broken for more than 6 months
|
||||
EXPIRATION_DATE= 2020-08-26
|
||||
|
||||
LIB_DEPENDS= libboost_regex.so:devel/boost-libs
|
||||
|
||||
# Meson needs BOOST_ROOT=${LOCALBASE}
|
||||
# https://github.com/mesonbuild/meson/issues/2239
|
||||
USES= compiler:c++14-lang localbase meson
|
||||
USE_LDCONFIG= yes
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= PacificBiosciences
|
||||
|
||||
post-install:
|
||||
${RLN} ${STAGEDIR}${PREFIX}/lib/libpbcopper.so.${PORTVERSION} \
|
||||
${STAGEDIR}${PREFIX}/lib/libpbcopper.so.0.4
|
||||
${RLN} ${STAGEDIR}${PREFIX}/lib/libpbcopper.so.${PORTVERSION} \
|
||||
${STAGEDIR}${PREFIX}/lib/libpbcopper.so.0
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,3 +0,0 @@
|
||||
TIMESTAMP = 1550453144
|
||||
SHA256 (PacificBiosciences-pbcopper-0.4.1_GH0.tar.gz) = 4c8daf6c1a6efe3860a16fb5b6111ebe65221423254819f3a68a400d0a984fcd
|
||||
SIZE (PacificBiosciences-pbcopper-0.4.1_GH0.tar.gz) = 3095846
|
@ -1,7 +0,0 @@
|
||||
--- meson_options.txt.orig 2019-02-17 22:34:29 UTC
|
||||
+++ meson_options.txt
|
||||
@@ -1,3 +1,3 @@
|
||||
option('build-examples', type : 'boolean', value : true, description : 'Build pbcopper examples')
|
||||
option('build-docs', type : 'boolean', value : false, description : 'Build pbcopper docs')
|
||||
-option('tests', type : 'boolean', value : true, description : 'Enable dependencies required for testing')
|
||||
+option('tests', type : 'boolean', value : false, description : 'Enable dependencies required for testing')
|
@ -1,5 +0,0 @@
|
||||
The pbcopper library provides a suite of data structures, algorithms, and
|
||||
utilities for C++ applications. It is a core component of Pacific Biosciences
|
||||
genomics analysis tools.
|
||||
|
||||
WWW: https://github.com/PacificBiosciences/pbcopper
|
@ -1,78 +0,0 @@
|
||||
include/pbcopper/PbcopperConfig.h
|
||||
include/pbcopper/PbcopperMakeUnique.h
|
||||
include/pbcopper/align/Seed.h
|
||||
include/pbcopper/align/Seeds.h
|
||||
include/pbcopper/align/internal/Seed-inl.h
|
||||
include/pbcopper/align/internal/Seeds-inl.h
|
||||
include/pbcopper/cli/CLI.h
|
||||
include/pbcopper/cli/HelpPrinter.h
|
||||
include/pbcopper/cli/Interface.h
|
||||
include/pbcopper/cli/Option.h
|
||||
include/pbcopper/cli/OptionFlags.h
|
||||
include/pbcopper/cli/Parser.h
|
||||
include/pbcopper/cli/PositionalArg.h
|
||||
include/pbcopper/cli/Results.h
|
||||
include/pbcopper/cli/SingleDashMode.h
|
||||
include/pbcopper/cli/VersionPrinter.h
|
||||
include/pbcopper/cli/internal/Option-inl.h
|
||||
include/pbcopper/cli/toolcontract/Config.h
|
||||
include/pbcopper/cli/toolcontract/Driver.h
|
||||
include/pbcopper/cli/toolcontract/InputFileType.h
|
||||
include/pbcopper/cli/toolcontract/JsonPrinter.h
|
||||
include/pbcopper/cli/toolcontract/OutputFileType.h
|
||||
include/pbcopper/cli/toolcontract/ResolvedToolContract.h
|
||||
include/pbcopper/cli/toolcontract/ResourceType.h
|
||||
include/pbcopper/cli/toolcontract/Task.h
|
||||
include/pbcopper/cli/toolcontract/TaskType.h
|
||||
include/pbcopper/cli/toolcontract/internal/Driver-inl.h
|
||||
include/pbcopper/cli/toolcontract/internal/InputFileType-inl.h
|
||||
include/pbcopper/cli/toolcontract/internal/OutputFileType-inl.h
|
||||
include/pbcopper/cli/toolcontract/internal/Task-inl.h
|
||||
include/pbcopper/data/CCSTag.h
|
||||
include/pbcopper/data/Cigar.h
|
||||
include/pbcopper/data/CigarOperation.h
|
||||
include/pbcopper/data/Interval.h
|
||||
include/pbcopper/data/MovieName.h
|
||||
include/pbcopper/data/Position.h
|
||||
include/pbcopper/data/RSMovieName.h
|
||||
include/pbcopper/data/RSReadName.h
|
||||
include/pbcopper/data/ReadName.h
|
||||
include/pbcopper/data/Zmw.h
|
||||
include/pbcopper/data/internal/CigarOperation-inl.h
|
||||
include/pbcopper/data/internal/Interval-inl.h
|
||||
include/pbcopper/data/internal/MovieName-inl.h
|
||||
include/pbcopper/data/internal/RSMovieName-inl.h
|
||||
include/pbcopper/data/internal/ReadNameBase-inl.h
|
||||
include/pbcopper/data/internal/ReadNameBase.h
|
||||
include/pbcopper/json/JSON.h
|
||||
include/pbcopper/json/internal/json.hpp
|
||||
include/pbcopper/logging/Logging.h
|
||||
include/pbcopper/logging/internal/Logging-inl.h
|
||||
include/pbcopper/parallel/FireAndForget.h
|
||||
include/pbcopper/parallel/WorkQueue.h
|
||||
include/pbcopper/qgram/Index.h
|
||||
include/pbcopper/qgram/IndexHit.h
|
||||
include/pbcopper/qgram/IndexHits.h
|
||||
include/pbcopper/qgram/internal/Hashing-inl.h
|
||||
include/pbcopper/qgram/internal/Index-inl.h
|
||||
include/pbcopper/stream/Stream.h
|
||||
include/pbcopper/utility/CallbackTimer.h
|
||||
include/pbcopper/utility/EnumClassHash.h
|
||||
include/pbcopper/utility/FileUtils.h
|
||||
include/pbcopper/utility/MoveAppend.h
|
||||
include/pbcopper/utility/PbcopperVersion.h
|
||||
include/pbcopper/utility/SafeSubtract.h
|
||||
include/pbcopper/utility/Stopwatch.h
|
||||
include/pbcopper/utility/StringUtils.h
|
||||
include/pbcopper/utility/SystemInfo.h
|
||||
include/pbcopper/utility/Unused.h
|
||||
include/pbcopper/utility/internal/CallbackTimer-inl.h
|
||||
include/pbcopper/utility/internal/FileUtils-inl.h
|
||||
include/pbcopper/utility/internal/Stopwatch-inl.h
|
||||
include/pbcopper/utility/internal/StringUtils-inl.h
|
||||
include/pbcopper/utility/internal/SystemInfo-inl.h
|
||||
lib/libpbcopper.so
|
||||
lib/libpbcopper.so.0
|
||||
lib/libpbcopper.so.0.4
|
||||
lib/libpbcopper.so.0.4.1
|
||||
libdata/pkgconfig/pbcopper.pc
|
@ -99,7 +99,6 @@
|
||||
SUBDIR += aarch64-xtoolchain-gcc
|
||||
SUBDIR += abi-compliance-checker
|
||||
SUBDIR += abseil
|
||||
SUBDIR += ace
|
||||
SUBDIR += acsccid
|
||||
SUBDIR += activitymail
|
||||
SUBDIR += ada-util
|
||||
@ -230,7 +229,6 @@
|
||||
SUBDIR += bennugd-modules
|
||||
SUBDIR += bglibs
|
||||
SUBDIR += bicyclerepair
|
||||
SUBDIR += bin86
|
||||
SUBDIR += binaryen
|
||||
SUBDIR += bingrep
|
||||
SUBDIR += binutils
|
||||
@ -609,7 +607,6 @@
|
||||
SUBDIR += erlang-meck
|
||||
SUBDIR += erlang-metrics
|
||||
SUBDIR += erlang-neotoma
|
||||
SUBDIR += erlang-oserl
|
||||
SUBDIR += erlang-parse_trans
|
||||
SUBDIR += erlang-poolboy
|
||||
SUBDIR += erlang-pooler
|
||||
|
@ -1,98 +0,0 @@
|
||||
# Created by: Sergey Matveychuk <sem@ciam.ru>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= ace
|
||||
PORTVERSION= 6.5.2
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= ftp://download.dre.vanderbilt.edu/previous_versions/ \
|
||||
http://download.dre.vanderbilt.edu/previous_versions/
|
||||
DISTNAME= ${PORTNAME:tu}-${PORTVERSION}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Adaptive Communication Environment for C++
|
||||
|
||||
LICENSE= ACE
|
||||
LICENSE_NAME= ACE
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
|
||||
|
||||
BROKEN= fails to build
|
||||
DEPRECATED= Broken for more than 6 months
|
||||
EXPIRATION_DATE= 2020-08-26
|
||||
BROKEN_powerpc= Does not compile on ${ARCH}
|
||||
BROKEN_sparc64= Does not compile on ${ARCH}
|
||||
|
||||
USES= compiler:c++11-lang gmake localbase:ldflags perl5 pkgconfig shebangfix tar:bzip2
|
||||
USE_PERL5= build
|
||||
SHEBANG_FILES= bin/*.pl MPC/*.pl
|
||||
MAKE_ENV= LD_LIBRARY_PATH="${WRKSRC}/lib" ACE_ROOT="${WRKSRC}" \
|
||||
CROSS-COMPILE=1
|
||||
MAKEFILE= GNUmakefile
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
WRKSRC= ${WRKDIR}/ACE_wrappers
|
||||
|
||||
PLIST_SUB= VERSION="${PORTVERSION}"
|
||||
|
||||
CONFLICTS= ace+tao-5*
|
||||
|
||||
OPTIONS_DEFINE= FLTK SSL TK TRIO X11
|
||||
OPTIONS_DEFAULT= SSL
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
FLTK_DESC= FLTK GUI toolkit
|
||||
FLTK_LIB_DEPENDS= libfltk.so:x11-toolkits/fltk
|
||||
FLTK_MAKE_ENV= fl=1
|
||||
SSL_USES= ssl
|
||||
SSL_MAKE_ENV= ssl=1
|
||||
TK_USES= tk
|
||||
TK_MAKE_ENV= tk=1
|
||||
TRIO_DESC= Trio portable string functions
|
||||
TRIO_BUILD_DEPENDS= trio>=0:devel/trio
|
||||
TRIO_MAKE_ENV= trio=1
|
||||
X11_USES= xorg
|
||||
X11_USE= XORG=xt
|
||||
X11_MAKE_ENV= xt=1
|
||||
|
||||
CPPFLAGS+= -D_WANT_SEMUN
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e \
|
||||
's|/$$libdir/pkgconfig|/libdata/pkgconfig|g' \
|
||||
${WRKSRC}/bin/ace_install_pkgconfig.pl
|
||||
@${REINPLACE_CMD} -i "" -e \
|
||||
'/^C[CX]/s|\([[:space:]]\)=|\1?=| ; \
|
||||
s|/usr/local|${LOCALBASE}| ; \
|
||||
s|/usr/X11R6|${LOCALBASE}|' \
|
||||
${WRKSRC}/include/makeinclude/platform_freebsd.GNU
|
||||
|
||||
do-configure:
|
||||
@cd ${WRKSRC}/ace \
|
||||
&& ${ECHO_CMD} "#include <ace/config-${OPSYS:tl}.h>" >> config.h
|
||||
@cd ${WRKSRC}/include/makeinclude \
|
||||
&& ${ECHO_CMD} "include \$$(ACE_ROOT)/include/makeinclude/platform_${OPSYS:tl}.GNU" >> platform_macros.GNU \
|
||||
&& ${ECHO_CMD} "CC= ${CC}" >> platform_macros.GNU \
|
||||
&& ${ECHO_CMD} "CXX= ${CXX}" >> platform_macros.GNU \
|
||||
&& ${ECHO_CMD} "CPPFLAGS= ${CPPFLAGS}" >> platform_macros.GNU \
|
||||
&& ${ECHO_CMD} "LDFLAGS= ${LDFLAGS}" >> platform_macros.GNU \
|
||||
&& ${ECHO_CMD} "DCFLAGS=" >> platform_macros.GNU \
|
||||
&& ${ECHO_CMD} "OCFLAGS= ${CFLAGS}" >> platform_macros.GNU \
|
||||
&& ${ECHO_CMD} "INSTALL_PREFIX= ${PREFIX}" >> platform_macros.GNU \
|
||||
&& ${ECHO_CMD} "PLATFORM_TK_CPPFLAGS= \$$(shell . ${TK_LIBDIR}/tkConfig.sh && ${ECHO_CMD} -n \$$\$$TK_INCLUDE_SPEC)" >> platform_macros.GNU \
|
||||
&& ${ECHO_CMD} "PLATFORM_TK_LIBS= \$$(shell . ${TK_LIBDIR}/tkConfig.sh && ${ECHO_CMD} -n \$$\$$TK_LIB_FLAG)" >> platform_macros.GNU \
|
||||
&& ${ECHO_CMD} "PLATFORM_TCL_CPPFLAGS= \$$(shell . ${TCL_LIBDIR}/tclConfig.sh && ${ECHO_CMD} -n \$$\$$TCL_INCLUDE_SPEC)" >> platform_macros.GNU \
|
||||
&& ${ECHO_CMD} "PLATFORM_TCL_LIBS= \$$(shell . ${TCL_LIBDIR}/tclConfig.sh && ${ECHO_CMD} -n \$$\$$TCL_LIB_FLAG)" >> platform_macros.GNU
|
||||
|
||||
post-install:
|
||||
@for f in `${LS} -d \
|
||||
${STAGEDIR}${PREFIX}/lib/libACE*.so.${PORTVERSION} \
|
||||
${STAGEDIR}${PREFIX}/lib/libJAWS.so.${PORTVERSION} \
|
||||
${STAGEDIR}${PREFIX}/lib/libKokyu.so.${PORTVERSION} \
|
||||
| ${XARGS} ${BASENAME}`; do \
|
||||
n=`${ECHO_CMD} $${f}|${SED} -e 's/.so.${PORTVERSION}/.so/'`; \
|
||||
${LN} -sf $${n}.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/$${n}.6; \
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/$${n}.${PORTVERSION}; \
|
||||
done
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,3 +0,0 @@
|
||||
TIMESTAMP = 1537466321
|
||||
SHA256 (ACE-6.5.2.tar.bz2) = f0393d6df25ee92e0cbc6539c68ccf122caae0ffd5ae9a786163403bb2306cc5
|
||||
SIZE (ACE-6.5.2.tar.bz2) = 8074873
|
@ -1,14 +0,0 @@
|
||||
--- ace/os_include/os_pthread.h.orig 2015-09-17 06:55:18 UTC
|
||||
+++ ace/os_include/os_pthread.h
|
||||
@@ -277,7 +277,11 @@
|
||||
# undef THR_DAEMON
|
||||
|
||||
# define THR_BOUND 0x00000001
|
||||
+# if defined(__FreeBSD__)
|
||||
+# define THR_NEW_LWP 0x00000000
|
||||
+# else
|
||||
# define THR_NEW_LWP 0x00000002
|
||||
+# endif
|
||||
# define THR_DAEMON 0x00000010
|
||||
# define THR_DETACHED 0x00000040
|
||||
# define THR_SUSPENDED 0x00000080
|
@ -1,15 +0,0 @@
|
||||
--- ace/OS_NS_Thread.h.orig 2015-09-17 06:55:18 UTC
|
||||
+++ ace/OS_NS_Thread.h
|
||||
@@ -42,6 +42,12 @@
|
||||
# endif /* VxWorks and ! SMP */
|
||||
#endif
|
||||
|
||||
+# include <sys/param.h>
|
||||
+#if (defined(__FreeBSD__) && ((__FreeBSD_version >= 700110 && __FreeBSD_version < 800000) || __FreeBSD_version >= 800024))
|
||||
+# include <sys/cpuset.h>
|
||||
+# define cpu_set_t cpuset_t
|
||||
+#endif
|
||||
+
|
||||
# if defined (ACE_EXPORT_MACRO)
|
||||
# undef ACE_EXPORT_MACRO
|
||||
# endif
|
@ -1,56 +0,0 @@
|
||||
--- ace/OS_NS_netdb.inl.orig 2015-09-17 06:55:18 UTC
|
||||
+++ ace/OS_NS_netdb.inl
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "ace/OS_NS_string.h"
|
||||
#include "ace/OS_NS_errno.h"
|
||||
|
||||
+#include <sys/param.h>
|
||||
+
|
||||
#if defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
|
||||
# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) && !defined (HPUX_11)
|
||||
# define ACE_NETDBCALL_RETURN(OP,TYPE,FAILVALUE,TARGET,SIZE) \
|
||||
@@ -116,7 +118,7 @@ ACE_OS::gethostbyaddr_r (const char *add
|
||||
*h_errnop = h_errno;
|
||||
return (struct hostent *) 0;
|
||||
}
|
||||
-# elif defined (__GLIBC__)
|
||||
+# elif defined (__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700015)
|
||||
// GNU C library has a different signature
|
||||
ACE_OS::memset (buffer, 0, sizeof (ACE_HOSTENT_DATA));
|
||||
|
||||
@@ -301,7 +303,7 @@ ACE_OS::gethostbyname_r (const char *nam
|
||||
*h_errnop = h_errno;
|
||||
return (struct hostent *) 0;
|
||||
}
|
||||
-# elif defined (__GLIBC__)
|
||||
+# elif defined (__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700015)
|
||||
// GNU C library has a different signature
|
||||
ACE_OS::memset (buffer, 0, sizeof (ACE_HOSTENT_DATA));
|
||||
|
||||
@@ -514,7 +516,7 @@ ACE_OS::getprotobyname_r (const char *na
|
||||
else
|
||||
return 0;
|
||||
//FUZZ: enable check_for_lack_ACE_OS
|
||||
-# elif defined (__GLIBC__)
|
||||
+# elif defined (__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700015)
|
||||
// GNU C library has a different signature
|
||||
//FUZZ: disable check_for_lack_ACE_OS
|
||||
if (::getprotobyname_r (name,
|
||||
@@ -595,7 +597,7 @@ ACE_OS::getprotobynumber_r (int proto,
|
||||
//FUZZ: enable check_for_lack_ACE_OS
|
||||
else
|
||||
return 0;
|
||||
-# elif defined (__GLIBC__)
|
||||
+# elif defined (__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700015)
|
||||
// GNU C library has a different signature
|
||||
//FUZZ: disable check_for_lack_ACE_OS
|
||||
if (::getprotobynumber_r (proto,
|
||||
@@ -681,7 +683,7 @@ ACE_OS::getservbyname_r (const char *svc
|
||||
//FUZZ: enable check_for_lack_ACE_OS
|
||||
else
|
||||
return (struct servent *) 0;
|
||||
-# elif defined (__GLIBC__)
|
||||
+# elif defined (__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700015)
|
||||
// GNU C library has a different signature
|
||||
ACE_OS::memset (buf, 0, sizeof (ACE_SERVENT_DATA));
|
||||
|
@ -1,16 +0,0 @@
|
||||
--- ace/OS_NS_signal.h.orig 2015-09-17 06:55:18 UTC
|
||||
+++ ace/OS_NS_signal.h
|
||||
@@ -31,10 +31,10 @@
|
||||
#endif
|
||||
#define ACE_EXPORT_MACRO ACE_Export
|
||||
|
||||
-#if defined (__Lynx__) || defined (__OpenBSD__)
|
||||
-// LynxOS and OpenBSD define pthread_sigmask() in pthread.h
|
||||
+#if defined (__Lynx__) || defined (__OpenBSD__) || defined (__FreeBSD__)
|
||||
+// LynxOS, OpenBSD and FreeBSD define pthread_sigmask() in pthread.h
|
||||
# include "ace/os_include/os_pthread.h"
|
||||
-#endif /* __Lynx__ || OpenBSD */
|
||||
+#endif /* __Lynx__ || OpenBSD || FreeBSD */
|
||||
|
||||
/*
|
||||
* We inline and undef some functions that may be implemented
|
@ -1,11 +0,0 @@
|
||||
--- ace/SSL/SSL_Context.cpp.orig 2018-09-18 07:26:56 UTC
|
||||
+++ ace/SSL/SSL_Context.cpp
|
||||
@@ -179,7 +179,7 @@ ACE_SSL_Context::ssl_library_init (void)
|
||||
# endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
|
||||
#endif /* WIN32 */
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x00905100L
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x00905100L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
// OpenSSL < 0.9.5 doesn't have EGD support.
|
||||
|
||||
const char *egd_socket_file =
|
@ -1,11 +0,0 @@
|
||||
--- tests/Chrono_Test.cpp.orig 2018-10-05 15:55:54 UTC
|
||||
+++ tests/Chrono_Test.cpp
|
||||
@@ -208,7 +208,7 @@ test_streamers ()
|
||||
std::chrono::seconds day_test_ts { day_test_h+day_test_s };
|
||||
std::chrono::microseconds day_test_tus { day_test_ms+day_test_us };
|
||||
ACE_Time_Value const test_day {
|
||||
- ACE_Time_Value { day_test_ts.count (), ACE_Utils::truncate_cast<suseconds_t>(day_test_tus.count ()) }};
|
||||
+ ACE_Time_Value { (int)(day_test_ts.count ()), ACE_Utils::truncate_cast<suseconds_t>(day_test_tus.count ()) }};
|
||||
|
||||
constexpr int expected_min {nr_hours * 60};
|
||||
constexpr int64_t expected_sec { expected_min * 60 + 54 };
|
@ -1,7 +0,0 @@
|
||||
The ADAPTIVE Communication Environment (ACE) is an object-oriented
|
||||
(OO) toolkit that implements fundamental design patterns for
|
||||
communication software. ACE provides a rich set of reusable C++
|
||||
wrappers and frameworks that perform common communication software
|
||||
tasks across a range of OS platforms.
|
||||
|
||||
WWW: http://www.cs.wustl.edu/~schmidt/ACE.html
|
1571
devel/ace/pkg-plist
1571
devel/ace/pkg-plist
File diff suppressed because it is too large
Load Diff
@ -1,34 +0,0 @@
|
||||
# Created by: trevor
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= bin86
|
||||
PORTVERSION= 0.16.21
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://v3.sk/~lkundrak/dev86/
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= 16-bit assembler and loader
|
||||
|
||||
BROKEN= unfetchable
|
||||
DEPRECATED= Broken for more than 6 months
|
||||
EXPIRATION_DATE= 2020-08-26
|
||||
|
||||
CONFLICTS= bcc-[0-9]* dev86-[0-9]*
|
||||
|
||||
PLIST_FILES= bin/as86 bin/catimage bin/ld86 bin/objchop bin/objdump86 \
|
||||
man/man1/as86.1.gz man/man1/ld86.1.gz
|
||||
PORTDOCS= ChangeLog README README-0.4
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
do-install:
|
||||
${INSTALL_MAN} ${WRKSRC}/man/*1 ${STAGEDIR}${MAN1PREFIX}/man/man1
|
||||
.for prog in as/as86 ld/ld86 ld/objchop ld/catimage ld/objdump86
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/${prog} ${STAGEDIR}${PREFIX}/bin
|
||||
.endfor
|
||||
|
||||
do-install-DOCS-on:
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,2 +0,0 @@
|
||||
SHA256 (bin86-0.16.21.tar.gz) = 021e37cde3a20632c4c9000993cb4aa9f58cb82b1d3c26b9aeb62d6566925738
|
||||
SIZE (bin86-0.16.21.tar.gz) = 154283
|
@ -1,21 +0,0 @@
|
||||
--- Makefile.orig 2005-02-01 05:45:39.000000000 +0900
|
||||
+++ Makefile 2012-05-30 05:45:03.000000000 +0900
|
||||
@@ -1,16 +1,12 @@
|
||||
|
||||
-CFLAGS=-O2 -D_POSIX_SOURCE
|
||||
+CFLAGS+=-D_POSIX_SOURCE
|
||||
LDFLAGS=
|
||||
DIRS=ld as
|
||||
|
||||
-PREFIX=/usr/local
|
||||
+PREFIX?=/usr/local
|
||||
BINDIR=$(PREFIX)/bin
|
||||
LIBDIR=$(PREFIX)/lib
|
||||
-ifeq ($(PREFIX),/usr)
|
||||
-MANDIR=$(PREFIX)/share/man/man1
|
||||
-else
|
||||
MANDIR=$(PREFIX)/man/man1
|
||||
-endif
|
||||
SUF=86
|
||||
|
||||
INSTALL_OPT=-m 755
|
@ -1,18 +0,0 @@
|
||||
--- ld/catimage.c.orig 2011-09-28 14:37:07.000000000 +0800
|
||||
+++ ld/catimage.c 2011-09-28 14:37:59.000000000 +0800
|
||||
@@ -30,6 +30,7 @@
|
||||
unsigned long text_offt[10]; /* Locations to patch (0=don't) */
|
||||
unsigned long data_offt[10];
|
||||
|
||||
+void patch_bin(long, int);
|
||||
char * input_file = "";
|
||||
FILE * ofd;
|
||||
FILE * ifd = 0;
|
||||
@@ -139,6 +140,7 @@ long out_offset, in_offset, length;
|
||||
}
|
||||
}
|
||||
|
||||
+void
|
||||
patch_bin(file_off, value)
|
||||
long file_off;
|
||||
int value;
|
@ -1,12 +0,0 @@
|
||||
--- ld/ld.c.orig 2004-01-21 16:17:09.000000000 -0500
|
||||
+++ ld/ld.c 2008-07-14 14:56:28.000000000 -0500
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
/* Copyright (C) 1994 Bruce Evans */
|
||||
|
||||
+#include <errno.h>
|
||||
+
|
||||
+#undef BUGCOMPAT
|
||||
#include "syshead.h"
|
||||
#include "const.h"
|
||||
#include "byteord.h"
|
@ -1,13 +0,0 @@
|
||||
--- ld/x86_aout.h.orig 2003-01-29 07:17:14.000000000 +0900
|
||||
+++ ld/x86_aout.h 2012-05-30 05:49:38.000000000 +0900
|
||||
@@ -13,7 +13,9 @@
|
||||
typedef long Long;
|
||||
#define __OUT_OK 1
|
||||
#else
|
||||
-typedef char Long[4];
|
||||
+#define __OUT_OK 1
|
||||
+#include <sys/types.h>
|
||||
+typedef int32_t Long;
|
||||
#endif
|
||||
|
||||
struct exec { /* a.out header */
|
@ -1,15 +0,0 @@
|
||||
--- man/as86.1.orig Tue Sep 26 13:18:31 2000
|
||||
+++ man/as86.1 Thu Nov 2 16:10:08 2000
|
||||
@@ -20,8 +20,8 @@
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B as86
|
||||
-is an assembler for the 8086..80386 processors, it's syntax is closer
|
||||
-to the intel/microsoft form rather than the more normal generic form of
|
||||
-the unix system assembler.
|
||||
+is an assembler for the 8086..80386 processors. Its syntax is closer
|
||||
+to the Intel/Microsoft form rather than the more normal generic form of
|
||||
+the Unix system assembler.
|
||||
|
||||
The
|
||||
.B src
|
@ -1,6 +0,0 @@
|
||||
This consists of a 16-bit assembler and loader for x86 or 6809
|
||||
CPUs. Unlike the GNU binutils in the base system (recent versions
|
||||
of which have 16-bit capability), these are for code written with
|
||||
Intel syntax.
|
||||
|
||||
WWW: http://www.debath.co.uk/
|
@ -1,49 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= oserl
|
||||
PORTVERSION= 3.2.4
|
||||
CATEGORIES= devel
|
||||
PKGNAMEPREFIX= erlang-
|
||||
|
||||
MAINTAINER= erlang@FreeBSD.org
|
||||
COMMENT= SMPP library for Erlang
|
||||
|
||||
BROKEN= fails to build
|
||||
DEPRECATED= Broken for more than 6 months
|
||||
EXPIRATION_DATE= 2020-08-26
|
||||
|
||||
BUILD_DEPENDS= erlc:lang/erlang \
|
||||
txt2tags:textproc/txt2tags
|
||||
RUN_DEPENDS= erl:lang/erlang \
|
||||
erlang-common_lib>=3.3.4:devel/erlang-common_lib
|
||||
|
||||
PLIST_SUB= VERSION="${PORTVERSION}"
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= iamaleksey
|
||||
|
||||
USES= dos2unix gmake iconv
|
||||
ALL_TARGET= compile doc
|
||||
DOS2UNIX_GLOB= Makefile *.hrl *.erl
|
||||
|
||||
post-extract:
|
||||
# Trick rebar into locating the oserl include files (see also patch-rebar.config)
|
||||
@${LN} -s ${WRKSRC} ${WRKDIR}/${PORTNAME}
|
||||
@${REINPLACE_CMD} -e "s@<@<@g" -e "s@>@>@g" ${WRKSRC}/doc/*.ndoc
|
||||
|
||||
do-install:
|
||||
@for manpage in ${WRKSRC}/doc/man/*; do \
|
||||
${MV} $${manpage} $${manpage}.src; \
|
||||
${ICONV_CMD} -f UTF-8 -t ISO-8859-1 $${manpage}.src > $${manpage}; \
|
||||
done
|
||||
${INSTALL_MAN} ${WRKSRC}/doc/man/*.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
|
||||
${INSTALL_MAN} ${WRKSRC}/doc/man/*.3 ${STAGEDIR}${MAN1PREFIX}/man/man3
|
||||
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/oserl-${PORTVERSION}
|
||||
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/oserl-${PORTVERSION}/ebin
|
||||
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/oserl-${PORTVERSION}/include
|
||||
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/oserl-${PORTVERSION}/src
|
||||
${INSTALL_DATA} ${WRKSRC}/ebin/* ${STAGEDIR}${PREFIX}/lib/erlang/lib/oserl-${PORTVERSION}/ebin
|
||||
${INSTALL_DATA} ${WRKSRC}/include/* ${STAGEDIR}${PREFIX}/lib/erlang/lib/oserl-${PORTVERSION}/include
|
||||
${INSTALL_DATA} ${WRKSRC}/src/* ${STAGEDIR}${PREFIX}/lib/erlang/lib/oserl-${PORTVERSION}/src
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,2 +0,0 @@
|
||||
SHA256 (iamaleksey-oserl-3.2.4_GH0.tar.gz) = c0bf81b296236dd87bf87a510af32903ec1a12c19333501dcbd17531d1ebbfc0
|
||||
SIZE (iamaleksey-oserl-3.2.4_GH0.tar.gz) = 248906
|
@ -1,47 +0,0 @@
|
||||
--- Makefile.orig 2015-06-25 10:06:03 UTC
|
||||
+++ Makefile
|
||||
@@ -10,6 +10,13 @@ HTMS = $(DOCS:.ndoc=.html)
|
||||
TEXS = $(DOCS:.ndoc=.tex)
|
||||
PDFS = $(DOCS:.ndoc=.pdf)
|
||||
|
||||
+CD = cd
|
||||
+ERLDOC = txt2tags
|
||||
+MKDIR = mkdir
|
||||
+MV = mv -vf
|
||||
+RM = rm -vf
|
||||
+SED = sed
|
||||
+
|
||||
### Dependecy Search Paths
|
||||
VPATH = src:include:ebin:doc
|
||||
|
||||
@@ -35,7 +42,11 @@ clobber: clean
|
||||
@$(RM) -R doc/man
|
||||
@$(RM) -R doc/pdf
|
||||
|
||||
-doc: man html pdf
|
||||
+doc: dirs man html
|
||||
+
|
||||
+dirs:
|
||||
+ @$(MKDIR) doc/man
|
||||
+ @$(MKDIR) doc/html
|
||||
|
||||
man: $(MANS)
|
||||
@$(MV) doc/man/$(APPNAME)_overview.3 doc/man/$(APPNAME).1
|
||||
@@ -49,14 +60,14 @@ pdf: $(PDFS)
|
||||
%.3: %.ndoc
|
||||
@$(CD) doc; $(SED) "s|%MODULES%|`echo $(MODS)`|g" ../$^ | \
|
||||
$(SED) "s|%VSN%|$(VSN)|g" | $(SED) "s|%APPLICATION%|$(APPNAME)|g" | \
|
||||
- $(ERLDOC) -i - -t man --no-toc --erl -o man/$@; $(CD) ..
|
||||
+ $(ERLDOC) -i - -t man --no-toc -o man/$@; $(CD) ..
|
||||
|
||||
%.html: %.ndoc
|
||||
@$(CD) doc; $(SED) "s|%MODULES%|`echo $(MODS)`|g" ../$^ | \
|
||||
$(SED) "s|%VSN%|$(VSN)|g" | $(SED) "s|%APPLICATION%|$(APPNAME)|g" | \
|
||||
- $(ERLDOC) -i - -t xhtml --erl -o html/$@; $(CD) ..
|
||||
+ $(ERLDOC) -i - -t xhtml -o html/$@; $(CD) ..
|
||||
|
||||
%.pdf: %.ndoc
|
||||
@$(CD) doc; $(SED) "s|%MODULES%|`echo $(MODS)`|g" ../$^ | \
|
||||
$(SED) "s|%VSN%|$(VSN)|g" | $(SED) "s|%APPLICATION%|$(APPNAME)|g" | \
|
||||
- $(ERLDOC) -i - -t pdf --no-toc --erl -o pdf/$@; $(CD) ..
|
||||
+ $(ERLDOC) -i - -t pdf --no-toc -o pdf/$@; $(CD) ..
|
@ -1,14 +0,0 @@
|
||||
--- rebar.config.orig 2013-05-10 18:52:27 UTC
|
||||
+++ rebar.config
|
||||
@@ -1,9 +1,6 @@
|
||||
-{lib_dirs, ["deps"]}.
|
||||
-
|
||||
-{erl_opts, [warnings_as_errors, debug_info]}.
|
||||
+{lib_dirs, ["deps", ".."]}.
|
||||
|
||||
-{deps, [{common_lib, "3.3.4",
|
||||
- {git, "git://github.com/iamaleksey/common_lib.git", {tag, "3.3.4"}}}]}.
|
||||
+{erl_opts, [debug_info]}.
|
||||
|
||||
{erl_first_files, ["src/gen_esme_session.erl",
|
||||
"src/gen_mc_session.erl",
|
@ -1,11 +0,0 @@
|
||||
--- src/smpp_param.hrl.orig 2015-06-25 10:06:03 UTC
|
||||
+++ src/smpp_param.hrl
|
||||
@@ -159,7 +159,7 @@
|
||||
%% destination_addr
|
||||
%%
|
||||
%% %@doc Specifies the destination SME address. For mobile terminated
|
||||
-%% messages, this is the directory number of the recipient MS. IP addresses ç
|
||||
+%% messages, this is the directory number of the recipient MS. IP addresses
|
||||
%% are specified in "aaa.bbb.ccc.ddd" notation. C-Octet String, Var. max 21
|
||||
%% octets.
|
||||
%% %@end
|
@ -1,10 +0,0 @@
|
||||
The Short Message Peer-to-Peer (SMPP) in telecommunications is an
|
||||
open, industry standard protocol designed to provide a flexible
|
||||
data communication interface for the transfer of short message data
|
||||
between External Short Messaging Entities (ESME), Routing Entities
|
||||
(RE) and Message Centres.
|
||||
|
||||
The oserl library provides an Erlang framework to interface with
|
||||
SMPP entities.
|
||||
|
||||
WWW: https://github.com/iamaleksey/oserl
|
@ -1,61 +0,0 @@
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/gen_esme.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/gen_esme_session.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/gen_mc.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/gen_mc_session.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/oserl.app
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/smpp_base.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/smpp_base_syntax.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/smpp_disk_log_hlr.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/smpp_error.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/smpp_log_mgr.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/smpp_operation.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/smpp_param_syntax.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/smpp_pdu_syntax.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/smpp_ref_num.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/smpp_req_tab.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/smpp_session.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/smpp_sm.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/ebin/smpp_tty_log_hlr.beam
|
||||
lib/erlang/lib/oserl-%%VERSION%%/include/e164.hrl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/include/oserl.hrl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/include/smpp_globals.hrl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/gen_esme.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/gen_esme_session.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/gen_mc.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/gen_mc_session.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_base.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_base.hrl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_base_syntax.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_base_syntax.hrl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_disk_log_hlr.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_error.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_log_mgr.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_operation.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_param.hrl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_param_syntax.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_param_syntax.hrl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_pdu.hrl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_pdu_syntax.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_pdu_syntax.hrl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_ref_num.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_req_tab.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_session.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_sm.erl
|
||||
lib/erlang/lib/oserl-%%VERSION%%/src/smpp_tty_log_hlr.erl
|
||||
man/man1/oserl.1.gz
|
||||
man/man3/gen_esme.3.gz
|
||||
man/man3/gen_esme_session.3.gz
|
||||
man/man3/gen_mc.3.gz
|
||||
man/man3/gen_mc_session.3.gz
|
||||
man/man3/smpp_base.3.gz
|
||||
man/man3/smpp_base_syntax.3.gz
|
||||
man/man3/smpp_disk_log_hlr.3.gz
|
||||
man/man3/smpp_error.3.gz
|
||||
man/man3/smpp_log_mgr.3.gz
|
||||
man/man3/smpp_operation.3.gz
|
||||
man/man3/smpp_param_syntax.3.gz
|
||||
man/man3/smpp_pdu_syntax.3.gz
|
||||
man/man3/smpp_ref_num.3.gz
|
||||
man/man3/smpp_req_tab.3.gz
|
||||
man/man3/smpp_sm.3.gz
|
||||
man/man3/smpp_tty_log_hlr.3.gz
|
@ -118,7 +118,6 @@
|
||||
SUBDIR += qemu-user-static-devel
|
||||
SUBDIR += qemu-utils
|
||||
SUBDIR += qemu31
|
||||
SUBDIR += qemu40
|
||||
SUBDIR += qemu41
|
||||
SUBDIR += qemu50
|
||||
SUBDIR += qmc2
|
||||
|
@ -1,165 +0,0 @@
|
||||
# Created by: Juergen Lock <nox@jelal.kn-bremen.de>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= qemu
|
||||
PORTVERSION= 4.0.1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= emulators
|
||||
MASTER_SITES= https://download.qemu.org/
|
||||
PKGNAMESUFFIX= 40
|
||||
DIST_SUBDIR= qemu/${PORTVERSION}
|
||||
|
||||
MAINTAINER= bofh@FreeBSD.org
|
||||
COMMENT= QEMU CPU Emulator - 4.0.X version
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
ONLY_FOR_ARCHS= amd64 i386 powerpc powerpc64
|
||||
|
||||
LIB_DEPENDS= libnettle.so:security/nettle \
|
||||
libfontconfig.so:x11-fonts/fontconfig \
|
||||
libfreetype.so:print/freetype2 \
|
||||
libepoxy.so:graphics/libepoxy \
|
||||
libpcre2-8.so:devel/pcre2
|
||||
|
||||
USES= bison compiler:c11 cpe gmake gnome iconv:wchar_t perl5 \
|
||||
pkgconfig python:build tar:xz
|
||||
USE_GNOME= cairo glib20 libxml2
|
||||
USE_PERL5= build
|
||||
|
||||
DEPRECATED= Please consider using qemu or qemu41
|
||||
EXPIRATION_DATE=2020-08-20
|
||||
#BROKEN_powerpc64= fails to compile: In function aio_bh_poll: internal compiler error: Segmentation fault
|
||||
|
||||
#.if !defined(PKGNAMESUFFIX) || (${PKGNAMESUFFIX} != "-utils" && ${PKGNAMESUFFIX} != "-guest-agent")
|
||||
#.endif
|
||||
|
||||
HAS_CONFIGURE= yes
|
||||
MAKE_ENV+= BSD_MAKE="${MAKE}" V=1
|
||||
|
||||
OPTIONS_DEFINE= SAMBA X11 GTK3 OPENGL GNUTLS SASL JPEG PNG CURL \
|
||||
VDE CDROM_DMA PCAP USBREDIR X86_TARGETS \
|
||||
STATIC_LINK DOCS NCURSES
|
||||
SAMBA_DESC= samba dependency (for -smb)
|
||||
GNUTLS_DESC= gnutls dependency (vnc encryption)
|
||||
SASL_DESC= cyrus-sasl dependency (vnc encryption)
|
||||
JPEG_DESC= jpeg dependency (vnc lossy compression)
|
||||
PNG_DESC= png dependency (vnc compression)
|
||||
CDROM_DMA_DESC= IDE CDROM DMA
|
||||
PCAP_DESC= pcap dependency (networking with bpf)
|
||||
USBREDIR_DESC= usb device network redirection (experimental!)
|
||||
X86_TARGETS_DESC= Build only x86 system targets
|
||||
STATIC_LINK_DESC= Statically link the executables
|
||||
VDE_DESC= vde dependency (for vde networking)
|
||||
OPTIONS_DEFAULT=X11 GTK3 OPENGL GNUTLS SASL JPEG PNG CDROM_DMA CURL PCAP NCURSES VDE
|
||||
OPTIONS_SUB= yes
|
||||
X11_USE= SDL=sdl2 XORG=x11,xext GNOME=gdkpixbuf2
|
||||
X11_USES= gnome sdl xorg
|
||||
X11_CONFIGURE_ENABLE= sdl
|
||||
GTK3_LIB_DEPENDS= libxkbcommon.so:x11/libxkbcommon
|
||||
GTK3_USE= GNOME=gdkpixbuf2,gtk30,vte3 XORG=x11,xext
|
||||
GTK3_USES= gettext gl xorg
|
||||
GTK3_CONFIGURE_OFF= --disable-gtk --disable-vte
|
||||
GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
|
||||
GNUTLS_CONFIGURE_OFF= --disable-gnutls
|
||||
SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2
|
||||
SASL_CONFIGURE_OFF= --disable-vnc-sasl
|
||||
JPEG_USES= jpeg
|
||||
JPEG_CONFIGURE_OFF= --disable-vnc-jpeg
|
||||
PNG_LIB_DEPENDS= libpng.so:graphics/png
|
||||
PNG_CONFIGURE_OFF= --disable-vnc-png
|
||||
CURL_LIB_DEPENDS= libcurl.so:ftp/curl
|
||||
CURL_CONFIGURE_OFF= --disable-curl
|
||||
OPENGL_USE= GL=gl
|
||||
OPENGL_USES= gl
|
||||
OPENGL_CONFIGURE_OFF= --disable-opengl
|
||||
USBREDIR_BUILD_DEPENDS= usbredir>=0.6:net/usbredir
|
||||
USBREDIR_RUN_DEPENDS= usbredir>=0.6:net/usbredir
|
||||
USBREDIR_CONFIGURE_OFF= --disable-usb-redir
|
||||
PCAP_CONFIGURE_ON= --enable-pcap
|
||||
PCAP_EXTRA_PATCHES= ${FILESDIR}/pcap-patch-qapi_net.json ${FILESDIR}/pcap-patch-net_net.c \
|
||||
${FILESDIR}/pcap-patch-net_clients.h
|
||||
VDE_LIB_DEPENDS= libvdeplug.so:net/vde2
|
||||
VDE_CONFIGURE_OFF= --disable-vde
|
||||
STATIC_LINK_CONFIGURE_ON= --static
|
||||
STATIC_LINK_PREVENTS= GTK3 X11
|
||||
STATIC_LINK_PREVENTS_MSG= X11 ui cannot be built static
|
||||
NCURSES_USES= ncurses:base
|
||||
SAMBA_USES= samba:run # smbd
|
||||
SAMBA_CONFIGURE_ON= --smbd=${LOCALBASE}/sbin/smbd
|
||||
DOCS_BUILD_DEPENDS= texi2html:textproc/texi2html \
|
||||
sphinx-build:textproc/py-sphinx
|
||||
DOCS_USES= makeinfo
|
||||
DOCS_MAKE_ARGS_OFF= NOPORTDOCS=1
|
||||
X86_TARGETS_USE_OFF= XORG=pixman,x11
|
||||
X86_TARGETS_USES_OFF= xorg
|
||||
|
||||
PORTDOCS= docs interop/.buildinfo interop/* qemu-doc.html qemu-doc.txt qemu-ga-ref.html qemu-ga-ref.txt \
|
||||
qemu-qmp-ref.html qemu-qmp-ref.txt
|
||||
|
||||
WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation
|
||||
CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//}
|
||||
CONFIGURE_ARGS= --localstatedir=/var --extra-ldflags=-L\"/usr/lib\" \
|
||||
--extra-ldflags=-L\"${LOCALBASE}/lib\" --disable-libssh2 --enable-debug \
|
||||
--prefix=${PREFIX} --cc=${CC} --enable-netmap --enable-docs --disable-kvm \
|
||||
--disable-linux-user --disable-linux-aio --disable-xen \
|
||||
--enable-debug-info --python=${PYTHON_CMD} \
|
||||
--extra-cflags=-I${WRKSRC}\ -I${LOCALBASE}/include\ -DPREFIX=\\\"\"${PREFIX}\\\"\"
|
||||
INSTALLS_ICONS= yes
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if !defined(STRIP) || ${STRIP} == ""
|
||||
CONFIGURE_ARGS+=--disable-strip
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == "amd64"
|
||||
MAKE_ARGS+= ARCH=x86_64
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == "powerpc"
|
||||
MAKE_ARGS+= ARCH=ppc
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == "powerpc64"
|
||||
MAKE_ARGS+= ARCH=ppc64
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == "sparc64"
|
||||
CONFIGURE_ARGS+= --sparc_cpu=v9
|
||||
.endif
|
||||
|
||||
PLIST_SUB+= LINUXBOOT_DMA=""
|
||||
|
||||
# -lprocstat actually only _needs_ -lelf after r249666 or r250870 (MFC)
|
||||
# but it shouldn't matter much
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e '/LIBS/s|-lprocstat|-lprocstat -lelf|' \
|
||||
-e '/libusb/s/ --atleast-version=1\.0\.[0-9]*//' \
|
||||
${WRKSRC}/configure
|
||||
@${REINPLACE_CMD} -E \
|
||||
-e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing -I.|" \
|
||||
-e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \
|
||||
${WRKSRC}/Makefile
|
||||
|
||||
post-patch-CDROM_DMA-off:
|
||||
@${REINPLACE_CMD} -e '/USE_DMA_CDROM/d' ${WRKSRC}/include/hw/ide/internal.h
|
||||
|
||||
# XXX need to disable usb host code on head while it's not ported to the
|
||||
# new usb stack yet
|
||||
post-configure:
|
||||
@${REINPLACE_CMD} -E \
|
||||
-e "s|^(HOST_USB=)bsd|\1stub|" \
|
||||
${WRKSRC}/config-host.mak
|
||||
|
||||
.if !target(post-install)
|
||||
post-install:
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup.sample ${STAGEDIR}${PREFIX}/etc
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown.sample ${STAGEDIR}${PREFIX}/etc
|
||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qemu-*
|
||||
|
||||
post-install-DOCS-on:
|
||||
@(cd ${WRKSRC} && ${COPYTREE_SHARE} docs ${STAGEDIR}${DOCSDIR}/)
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,3 +0,0 @@
|
||||
TIMESTAMP = 1574541700
|
||||
SHA256 (qemu/4.0.1/qemu-4.0.1.tar.xz) = f2674dd6053ef1d48593aa1f0a50c5ac9039f7a059ecb6f9b8307f3fb2fcedad
|
||||
SIZE (qemu/4.0.1/qemu-4.0.1.tar.xz) = 55637016
|
@ -1,42 +0,0 @@
|
||||
--- Makefile.orig 2019-04-23 18:14:45 UTC
|
||||
+++ Makefile
|
||||
@@ -311,9 +311,14 @@ LIBS+=-lz $(LIBS_TOOLS)
|
||||
HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF)
|
||||
|
||||
ifdef BUILD_DOCS
|
||||
+ifdef NOPORTDOCS
|
||||
+DOCS=qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8
|
||||
+DOCS+=docs/interop/qemu-qmp-ref.7 docs/interop/qemu-ga-ref.7
|
||||
+else
|
||||
DOCS=qemu-doc.html qemu-doc.txt qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8
|
||||
DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7
|
||||
DOCS+=docs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7
|
||||
+endif
|
||||
DOCS+=docs/qemu-block-drivers.7
|
||||
DOCS+=docs/qemu-cpu-models.7
|
||||
ifdef CONFIG_VIRTFS
|
||||
@@ -742,11 +747,13 @@ install-sphinxdocs: sphinxdocs
|
||||
$(call install-manual,interop)
|
||||
|
||||
install-doc: $(DOCS) install-sphinxdocs
|
||||
+ifndef NOPORTDOCS
|
||||
$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
|
||||
$(INSTALL_DATA) qemu-doc.html "$(DESTDIR)$(qemu_docdir)"
|
||||
$(INSTALL_DATA) qemu-doc.txt "$(DESTDIR)$(qemu_docdir)"
|
||||
$(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)"
|
||||
$(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)"
|
||||
+endif
|
||||
ifdef CONFIG_POSIX
|
||||
$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
|
||||
$(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1"
|
||||
@@ -764,8 +771,10 @@ ifdef CONFIG_TRACE_SYSTEMTAP
|
||||
endif
|
||||
ifneq (,$(findstring qemu-ga,$(TOOLS)))
|
||||
$(INSTALL_DATA) qemu-ga.8 "$(DESTDIR)$(mandir)/man8"
|
||||
+ifndef NOPORTDOCS
|
||||
$(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)"
|
||||
$(INSTALL_DATA) docs/interop/qemu-ga-ref.txt "$(DESTDIR)$(qemu_docdir)"
|
||||
+endif
|
||||
$(INSTALL_DATA) docs/interop/qemu-ga-ref.7 "$(DESTDIR)$(mandir)/man7"
|
||||
endif
|
||||
endif
|
@ -1,213 +0,0 @@
|
||||
--- configure.orig 2019-10-17 20:17:43 UTC
|
||||
+++ configure
|
||||
@@ -396,7 +396,7 @@ DSOSUF=".so"
|
||||
LDFLAGS_SHARED="-shared"
|
||||
modules="no"
|
||||
prefix="/usr/local"
|
||||
-mandir="\${prefix}/share/man"
|
||||
+mandir="\${prefix}/man"
|
||||
datadir="\${prefix}/share"
|
||||
firmwarepath="\${prefix}/share/qemu-firmware"
|
||||
qemu_docdir="\${prefix}/share/doc/qemu"
|
||||
@@ -476,6 +476,9 @@ numa=""
|
||||
tcmalloc="no"
|
||||
jemalloc="no"
|
||||
replication="yes"
|
||||
+pcap="no"
|
||||
+pcap_create="no"
|
||||
+bpf="no"
|
||||
vxhs=""
|
||||
bochs="yes"
|
||||
cloop="yes"
|
||||
@@ -1118,6 +1121,10 @@ for opt do
|
||||
;;
|
||||
--enable-vnc-png) vnc_png="yes"
|
||||
;;
|
||||
+ --enable-pcap) pcap="yes"
|
||||
+ ;;
|
||||
+ --disable-pcap) pcap="no"
|
||||
+ ;;
|
||||
--disable-slirp) slirp="no"
|
||||
;;
|
||||
--enable-slirp=system) slirp="system"
|
||||
@@ -2972,6 +2979,14 @@ if ! check_include "ifaddrs.h" ; then
|
||||
fi
|
||||
|
||||
##########################################
|
||||
+# getifaddrs (for tests/test-io-channel-socket )
|
||||
+
|
||||
+have_ifaddrs_h=yes
|
||||
+if ! check_include "ifaddrs.h" ; then
|
||||
+ have_ifaddrs_h=no
|
||||
+fi
|
||||
+
|
||||
+##########################################
|
||||
# VTE probe
|
||||
|
||||
if test "$vte" != "no"; then
|
||||
@@ -3629,7 +3644,7 @@ for i in $glib_modules; do
|
||||
glib_libs=$($pkg_config --libs $i)
|
||||
QEMU_CFLAGS="$glib_cflags $QEMU_CFLAGS"
|
||||
LIBS="$glib_libs $LIBS"
|
||||
- libs_qga="$glib_libs $libs_qga"
|
||||
+ libs_qga="$glib_libs -lintl $libs_qga"
|
||||
else
|
||||
error_exit "glib-$glib_req_ver $i is required to compile QEMU"
|
||||
fi
|
||||
@@ -4723,11 +4738,6 @@ has_sphinx_build() {
|
||||
if test "$docs" != "no" ; then
|
||||
if has makeinfo && has pod2man && has_sphinx_build; then
|
||||
docs=yes
|
||||
- else
|
||||
- if test "$docs" = "yes" ; then
|
||||
- feature_not_found "docs" "Install texinfo, Perl/perl-podlators and python-sphinx"
|
||||
- fi
|
||||
- docs=no
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -4861,7 +4871,7 @@ fi
|
||||
|
||||
# check for libusb
|
||||
if test "$libusb" != "no" ; then
|
||||
- if $pkg_config --atleast-version=1.0.13 libusb-1.0; then
|
||||
+ if $pkg_config libusb-1.0; then
|
||||
libusb="yes"
|
||||
libusb_cflags=$($pkg_config --cflags libusb-1.0)
|
||||
libusb_libs=$($pkg_config --libs libusb-1.0)
|
||||
@@ -5251,7 +5261,51 @@ if test "$debug_stack_usage" = "yes"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
+##########################################
|
||||
+# pcap probe
|
||||
|
||||
+if test "$pcap" = "yes" -a "$pcap" != "no"; then
|
||||
+ cat > $TMPC << EOF
|
||||
+#include <pcap.h>
|
||||
+int main(void) { return (pcap_lib_version() == (char *)0 ? 1 : 0); }
|
||||
+EOF
|
||||
+ if test "$mingw32" = "no" ; then
|
||||
+ libpcap=-lpcap
|
||||
+ else
|
||||
+ libpcap=-lwpcap
|
||||
+ fi
|
||||
+ if compile_prog "" "$libpcap" ; then
|
||||
+ :
|
||||
+ else
|
||||
+ echo
|
||||
+ echo "Error: Could not find pcap"
|
||||
+ echo "Make sure to have the pcap libs and headers installed."
|
||||
+ echo
|
||||
+ exit 1
|
||||
+ fi
|
||||
+ cat > $TMPC << EOF
|
||||
+#include <pcap.h>
|
||||
+int main(void)
|
||||
+{
|
||||
+ char errbuf[PCAP_ERRBUF_SIZE];
|
||||
+ return (pcap_create("foo", errbuf) == (pcap_t *)0 ? 1 : 0);
|
||||
+}
|
||||
+EOF
|
||||
+ if compile_prog "" "$libpcap" ; then
|
||||
+ pcap_create="yes"
|
||||
+ fi
|
||||
+ cat > $TMPC << EOF
|
||||
+#define PCAP_DONT_INCLUDE_PCAP_BPF_H
|
||||
+#include <pcap.h>
|
||||
+#include <net/bpf.h>
|
||||
+int main(void) { return (BPF_MAJOR_VERSION); }
|
||||
+EOF
|
||||
+ if compile_prog ; then
|
||||
+ bpf="yes"
|
||||
+ fi
|
||||
+ libs_softmmu="$libpcap $libs_softmmu"
|
||||
+fi # test "$pcap"
|
||||
+
|
||||
##########################################
|
||||
# check if we have open_by_handle_at
|
||||
|
||||
@@ -6196,27 +6250,30 @@ if ( [ "$linux_user" = yes ] || [ "$bsd_user" = yes ]
|
||||
cat > $TMPC <<EOF
|
||||
int main(void) { return 0; }
|
||||
EOF
|
||||
- textseg_ldflags="-Wl,-Ttext-segment=$textseg_addr"
|
||||
+ textseg_ldflags="-Wl,--image-base=$textseg_addr"
|
||||
if ! compile_prog "" "$textseg_ldflags"; then
|
||||
- # In case ld does not support -Ttext-segment, edit the default linker
|
||||
- # script via sed to set the .text start addr. This is needed on FreeBSD
|
||||
- # at least.
|
||||
- if ! $ld --verbose >/dev/null 2>&1; then
|
||||
- error_exit \
|
||||
- "We need to link the QEMU user mode binaries at a" \
|
||||
- "specific text address. Unfortunately your linker" \
|
||||
- "doesn't support either the -Ttext-segment option or" \
|
||||
- "printing the default linker script with --verbose." \
|
||||
- "If you don't want the user mode binaries, pass the" \
|
||||
- "--disable-user option to configure."
|
||||
- fi
|
||||
+ textseg_ldflags="-Wl,-Ttext-segment=$textseg_addr"
|
||||
+ if ! compile_prog "" "$textseg_ldflags"; then
|
||||
+ # In case ld does not support -Ttext-segment, edit the default linker
|
||||
+ # script via sed to set the .text start addr. This is needed on FreeBSD
|
||||
+ # at least.
|
||||
+ if ! $ld --verbose >/dev/null 2>&1; then
|
||||
+ error_exit \
|
||||
+ "We need to link the QEMU user mode binaries at a" \
|
||||
+ "specific text address. Unfortunately your linker" \
|
||||
+ "doesn't support either the -Ttext-segment option or" \
|
||||
+ "printing the default linker script with --verbose." \
|
||||
+ "If you don't want the user mode binaries, pass the" \
|
||||
+ "--disable-user option to configure."
|
||||
+ fi
|
||||
|
||||
- $ld --verbose | sed \
|
||||
- -e '1,/==================================================/d' \
|
||||
- -e '/==================================================/,$d' \
|
||||
- -e "s/[.] = [0-9a-fx]* [+] SIZEOF_HEADERS/. = $textseg_addr + SIZEOF_HEADERS/" \
|
||||
- -e "s/__executable_start = [0-9a-fx]*/__executable_start = $textseg_addr/" > config-host.ld
|
||||
- textseg_ldflags="-Wl,-T../config-host.ld"
|
||||
+ $ld --verbose | sed \
|
||||
+ -e '1,/==================================================/d' \
|
||||
+ -e '/==================================================/,$d' \
|
||||
+ -e "s/[.] = [0-9a-fx]* [+] SIZEOF_HEADERS/. = $textseg_addr + SIZEOF_HEADERS/" \
|
||||
+ -e "s/__executable_start = [0-9a-fx]*/__executable_start = $textseg_addr/" > config-host.ld
|
||||
+ textseg_ldflags="-Wl,-T../config-host.ld"
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -6332,6 +6389,7 @@ echo "Audio drivers $audio_drv_list"
|
||||
echo "Block whitelist (rw) $block_drv_rw_whitelist"
|
||||
echo "Block whitelist (ro) $block_drv_ro_whitelist"
|
||||
echo "VirtFS support $virtfs"
|
||||
+echo "pcap support $pcap"
|
||||
echo "Multipath support $mpath"
|
||||
echo "VNC support $vnc"
|
||||
if test "$vnc" = "yes" ; then
|
||||
@@ -6565,6 +6623,15 @@ fi
|
||||
if test "$profiler" = "yes" ; then
|
||||
echo "CONFIG_PROFILER=y" >> $config_host_mak
|
||||
fi
|
||||
+if test "$pcap" = "yes" ; then
|
||||
+ echo "CONFIG_PCAP=y" >> $config_host_mak
|
||||
+ if test "$pcap_create" = "yes" ; then
|
||||
+ echo "CONFIG_PCAP_CREATE=y" >> $config_host_mak
|
||||
+ fi
|
||||
+ if test "$bpf" = "yes" ; then
|
||||
+ echo "CONFIG_BPF=y" >> $config_host_mak
|
||||
+ fi
|
||||
+fi
|
||||
if test "$slirp" != "no"; then
|
||||
echo "CONFIG_SLIRP=y" >> $config_host_mak
|
||||
echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
|
||||
@@ -6812,6 +6879,9 @@ fi
|
||||
# if this macro is set.
|
||||
if test "$have_fsxattr" = "yes" ; then
|
||||
echo "HAVE_FSXATTR=y" >> $config_host_mak
|
||||
+fi
|
||||
+if test "$have_ifaddrs_h" = "yes" ; then
|
||||
+ echo "HAVE_IFADDRS_H=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$have_copy_file_range" = "yes" ; then
|
||||
echo "HAVE_COPY_FILE_RANGE=y" >> $config_host_mak
|
@ -1,11 +0,0 @@
|
||||
--- disas/libvixl/vixl/a64/disasm-a64.cc.orig 2019-04-23 18:14:45 UTC
|
||||
+++ disas/libvixl/vixl/a64/disasm-a64.cc
|
||||
@@ -2693,7 +2693,7 @@ void Disassembler::AppendPCRelativeOffsetToOutput(cons
|
||||
if (offset < 0) {
|
||||
abs_offset = -abs_offset;
|
||||
}
|
||||
- AppendToOutput("#%c0x%" PRIx64, sign, abs_offset);
|
||||
+ AppendToOutput("#%c0x%" PRIx64, sign, offset < 0 ? -offset : offset);
|
||||
}
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- include/net/net.h.orig 2019-04-23 18:14:46 UTC
|
||||
+++ include/net/net.h
|
||||
@@ -209,8 +209,8 @@ void qmp_netdev_add(QDict *qdict, QObject **ret, Error
|
||||
int net_hub_id_for_client(NetClientState *nc, int *id);
|
||||
NetClientState *net_hub_port_find(int hub_id);
|
||||
|
||||
-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
|
||||
-#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
|
||||
+#define DEFAULT_NETWORK_SCRIPT PREFIX "/etc/qemu-ifup"
|
||||
+#define DEFAULT_NETWORK_DOWN_SCRIPT PREFIX "/etc/qemu-ifdown"
|
||||
#define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/qemu-bridge-helper"
|
||||
#define DEFAULT_BRIDGE_INTERFACE "br0"
|
||||
|
@ -1,54 +0,0 @@
|
||||
--- include/qemu/atomic.h.orig 2019-04-23 18:14:46 UTC
|
||||
+++ include/qemu/atomic.h
|
||||
@@ -201,10 +201,12 @@
|
||||
/* Provide shorter names for GCC atomic builtins, return old value */
|
||||
#define atomic_fetch_inc(ptr) __atomic_fetch_add(ptr, 1, __ATOMIC_SEQ_CST)
|
||||
#define atomic_fetch_dec(ptr) __atomic_fetch_sub(ptr, 1, __ATOMIC_SEQ_CST)
|
||||
+#ifndef __cplusplus
|
||||
#define atomic_fetch_add(ptr, n) __atomic_fetch_add(ptr, n, __ATOMIC_SEQ_CST)
|
||||
#define atomic_fetch_sub(ptr, n) __atomic_fetch_sub(ptr, n, __ATOMIC_SEQ_CST)
|
||||
#define atomic_fetch_and(ptr, n) __atomic_fetch_and(ptr, n, __ATOMIC_SEQ_CST)
|
||||
#define atomic_fetch_or(ptr, n) __atomic_fetch_or(ptr, n, __ATOMIC_SEQ_CST)
|
||||
+#endif
|
||||
#define atomic_fetch_xor(ptr, n) __atomic_fetch_xor(ptr, n, __ATOMIC_SEQ_CST)
|
||||
|
||||
#define atomic_inc_fetch(ptr) __atomic_add_fetch(ptr, 1, __ATOMIC_SEQ_CST)
|
||||
@@ -218,10 +220,12 @@
|
||||
/* And even shorter names that return void. */
|
||||
#define atomic_inc(ptr) ((void) __atomic_fetch_add(ptr, 1, __ATOMIC_SEQ_CST))
|
||||
#define atomic_dec(ptr) ((void) __atomic_fetch_sub(ptr, 1, __ATOMIC_SEQ_CST))
|
||||
+#ifndef __cplusplus
|
||||
#define atomic_add(ptr, n) ((void) __atomic_fetch_add(ptr, n, __ATOMIC_SEQ_CST))
|
||||
#define atomic_sub(ptr, n) ((void) __atomic_fetch_sub(ptr, n, __ATOMIC_SEQ_CST))
|
||||
#define atomic_and(ptr, n) ((void) __atomic_fetch_and(ptr, n, __ATOMIC_SEQ_CST))
|
||||
#define atomic_or(ptr, n) ((void) __atomic_fetch_or(ptr, n, __ATOMIC_SEQ_CST))
|
||||
+#endif
|
||||
#define atomic_xor(ptr, n) ((void) __atomic_fetch_xor(ptr, n, __ATOMIC_SEQ_CST))
|
||||
|
||||
#else /* __ATOMIC_RELAXED */
|
||||
@@ -389,10 +393,12 @@
|
||||
|
||||
#define atomic_inc_fetch(ptr) __sync_add_and_fetch(ptr, 1)
|
||||
#define atomic_dec_fetch(ptr) __sync_add_and_fetch(ptr, -1)
|
||||
+#ifndef __cplusplus
|
||||
#define atomic_add_fetch(ptr, n) __sync_add_and_fetch(ptr, n)
|
||||
#define atomic_sub_fetch(ptr, n) __sync_sub_and_fetch(ptr, n)
|
||||
#define atomic_and_fetch(ptr, n) __sync_and_and_fetch(ptr, n)
|
||||
#define atomic_or_fetch(ptr, n) __sync_or_and_fetch(ptr, n)
|
||||
+#endif
|
||||
#define atomic_xor_fetch(ptr, n) __sync_xor_and_fetch(ptr, n)
|
||||
|
||||
#define atomic_cmpxchg(ptr, old, new) __sync_val_compare_and_swap(ptr, old, new)
|
||||
@@ -401,10 +407,12 @@
|
||||
/* And even shorter names that return void. */
|
||||
#define atomic_inc(ptr) ((void) __sync_fetch_and_add(ptr, 1))
|
||||
#define atomic_dec(ptr) ((void) __sync_fetch_and_add(ptr, -1))
|
||||
+#ifndef __cplusplus
|
||||
#define atomic_add(ptr, n) ((void) __sync_fetch_and_add(ptr, n))
|
||||
#define atomic_sub(ptr, n) ((void) __sync_fetch_and_sub(ptr, n))
|
||||
#define atomic_and(ptr, n) ((void) __sync_fetch_and_and(ptr, n))
|
||||
#define atomic_or(ptr, n) ((void) __sync_fetch_and_or(ptr, n))
|
||||
+#endif
|
||||
#define atomic_xor(ptr, n) ((void) __sync_fetch_and_xor(ptr, n))
|
||||
|
||||
#endif /* __ATOMIC_RELAXED */
|
@ -1,10 +0,0 @@
|
||||
--- net/tap-bsd.c.orig 2019-04-23 18:14:46 UTC
|
||||
+++ net/tap-bsd.c
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#include <sys/ioctl.h>
|
||||
+#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_tap.h>
|
||||
#endif
|
@ -1,21 +0,0 @@
|
||||
--- qemu-doc.texi.orig 2019-04-23 18:14:46 UTC
|
||||
+++ qemu-doc.texi
|
||||
@@ -200,7 +200,7 @@ VGA BIOS.
|
||||
QEMU uses YM3812 emulation by Tatsuyuki Satoh.
|
||||
|
||||
QEMU uses GUS emulation (GUSEMU32 @url{http://www.deinmeister.de/gusemu/})
|
||||
-by Tibor "TS" Schütz.
|
||||
+by Tibor "TS" Schuetz.
|
||||
|
||||
Note that, by default, GUS shares IRQ(7) with parallel ports and so
|
||||
QEMU must be told to not have parallel ports to have working GUS.
|
||||
@@ -560,7 +560,8 @@ Send the escape character to the frontend
|
||||
|
||||
@c man begin SEEALSO
|
||||
The HTML documentation of QEMU for more precise information and Linux
|
||||
-user mode emulator invocation.
|
||||
+user mode emulator invocation, as well as the FreeBSD host notes in
|
||||
+@file{pkg-message} in the relevant qemu port directory.
|
||||
@c man end
|
||||
|
||||
@c man begin AUTHOR
|
@ -1,41 +0,0 @@
|
||||
--- util/cacheinfo.c.orig 2019-10-17 15:17:44.000000000 -0500
|
||||
+++ util/cacheinfo.c 2020-01-17 21:13:29.459470000 -0600
|
||||
@@ -65,25 +65,28 @@ static void sys_cache_info(int *isize, int *dsize)
|
||||
g_free(buf);
|
||||
}
|
||||
|
||||
-#elif defined(__APPLE__) \
|
||||
- || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
+#elif defined(__APPLE__)
|
||||
# include <sys/sysctl.h>
|
||||
-# if defined(__APPLE__)
|
||||
-# define SYSCTL_CACHELINE_NAME "hw.cachelinesize"
|
||||
-# else
|
||||
-# define SYSCTL_CACHELINE_NAME "machdep.cacheline_size"
|
||||
-# endif
|
||||
-
|
||||
static void sys_cache_info(int *isize, int *dsize)
|
||||
{
|
||||
/* There's only a single sysctl for both I/D cache line sizes. */
|
||||
long size;
|
||||
size_t len = sizeof(size);
|
||||
- if (!sysctlbyname(SYSCTL_CACHELINE_NAME, &size, &len, NULL, 0)) {
|
||||
+ if (!sysctlbyname("hw.cachelinesize", &size, &len, NULL, 0)) {
|
||||
*isize = *dsize = size;
|
||||
}
|
||||
}
|
||||
-
|
||||
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
+# include <sys/sysctl.h>
|
||||
+static void sys_cache_info(int *isize, int *dsize)
|
||||
+{
|
||||
+ /* There's only a single sysctl for both I/D cache line sizes. */
|
||||
+ int size;
|
||||
+ size_t len = sizeof(size);
|
||||
+ if (!sysctlbyname("machdep.cacheline_size", &size, &len, NULL, 0)) {
|
||||
+ *isize = *dsize = size;
|
||||
+ }
|
||||
+}
|
||||
#else
|
||||
/* POSIX */
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- net/clients.h.orig 2018-04-24 16:30:47 UTC
|
||||
+++ net/clients.h
|
||||
@@ -61,4 +61,10 @@ int net_init_netmap(const Netdev *netdev, const char *
|
||||
int net_init_vhost_user(const Netdev *netdev, const char *name,
|
||||
NetClientState *peer, Error **errp);
|
||||
|
||||
+#ifdef CONFIG_PCAP
|
||||
+int net_init_pcap(const Netdev *netdev, const char *name,
|
||||
+ NetClientState *peer, Error **errp);
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
#endif /* QEMU_NET_CLIENTS_H */
|
@ -1,250 +0,0 @@
|
||||
--- net/net.c.orig 2018-04-24 16:30:47 UTC
|
||||
+++ net/net.c
|
||||
@@ -52,6 +52,11 @@
|
||||
#include "net/filter.h"
|
||||
#include "qapi/string-output-visitor.h"
|
||||
|
||||
+#include <sys/ioctl.h>
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <net/if.h>
|
||||
+#endif
|
||||
+
|
||||
/* Net bridge is currently not supported for W32. */
|
||||
#if !defined(_WIN32)
|
||||
# define CONFIG_NET_BRIDGE
|
||||
@@ -929,7 +934,225 @@ static int net_init_nic(const Netdev *netdev, const ch
|
||||
return idx;
|
||||
}
|
||||
|
||||
+#if defined(CONFIG_PCAP)
|
||||
+#if defined(CONFIG_BPF)
|
||||
+#define PCAP_DONT_INCLUDE_PCAP_BPF_H
|
||||
+#include <net/bpf.h>
|
||||
+#endif
|
||||
+#include <pcap.h>
|
||||
|
||||
+struct PCAPState {
|
||||
+ NetClientState nc;
|
||||
+ pcap_t *handle;
|
||||
+ int max_eth_frame_size;
|
||||
+};
|
||||
+
|
||||
+static ssize_t pcap_receive(NetClientState *nc, const uint8_t *buf, size_t size)
|
||||
+{
|
||||
+ struct PCAPState *s = DO_UPCAST(struct PCAPState, nc, nc);
|
||||
+
|
||||
+ return pcap_inject(s->handle, (u_char*)buf, size);
|
||||
+}
|
||||
+
|
||||
+static void pcap_callback(u_char *user, struct pcap_pkthdr *phdr, u_char *pdata
|
||||
+ )
|
||||
+{
|
||||
+ NetClientState *nc = (NetClientState *)user;
|
||||
+
|
||||
+ int len = phdr->len;
|
||||
+#ifdef __FreeBSD__
|
||||
+ struct PCAPState *s = DO_UPCAST(struct PCAPState, nc, nc);
|
||||
+ int max_eth_frame_size = s->max_eth_frame_size;
|
||||
+
|
||||
+ if (len > max_eth_frame_size) {
|
||||
+ fprintf(stderr,
|
||||
+ "pcap_send: packet size > %d (%d), truncating\n",
|
||||
+ max_eth_frame_size, len);
|
||||
+ len = max_eth_frame_size;
|
||||
+ }
|
||||
+#endif
|
||||
+ qemu_send_packet(nc, pdata, len);
|
||||
+}
|
||||
+
|
||||
+static void pcap_send(void *opaque)
|
||||
+{
|
||||
+ struct PCAPState *s = (struct PCAPState *)opaque;
|
||||
+
|
||||
+ for (;;) {
|
||||
+ if (pcap_dispatch(s->handle, 0, (pcap_handler)&pcap_callback, (u_char *)&s->nc) >= 0)
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void pcap_cleanup(NetClientState *nc)
|
||||
+{
|
||||
+ struct PCAPState *s = DO_UPCAST(struct PCAPState, nc, nc);
|
||||
+
|
||||
+ qemu_purge_queued_packets(nc);
|
||||
+ pcap_close(s->handle);
|
||||
+}
|
||||
+
|
||||
+static NetClientInfo net_pcap_info = {
|
||||
+ .type = NET_CLIENT_DRIVER_PCAP,
|
||||
+ .size = sizeof(struct PCAPState),
|
||||
+ .receive = pcap_receive,
|
||||
+// .receive_raw = pcap_receive_raw,
|
||||
+// .receive_iov = pcap_receive_iov,
|
||||
+// .poll = pcap_poll,
|
||||
+ .cleanup = pcap_cleanup,
|
||||
+};
|
||||
+/*
|
||||
+ * ... -net pcap,ifname="..."
|
||||
+ */
|
||||
+
|
||||
+int net_init_pcap(const Netdev *netdev,
|
||||
+ const char *name, NetClientState *peer, Error **errp)
|
||||
+{
|
||||
+ const NetdevPcapOptions *pcap_opts;
|
||||
+ NetClientState *nc;
|
||||
+ struct PCAPState *s;
|
||||
+ const char *ifname;
|
||||
+ char errbuf[PCAP_ERRBUF_SIZE];
|
||||
+#if defined(_WIN32)
|
||||
+ HANDLE h;
|
||||
+#endif
|
||||
+ int i;
|
||||
+
|
||||
+ assert(netdev->type == NET_CLIENT_DRIVER_PCAP);
|
||||
+ pcap_opts = &netdev->u.pcap;
|
||||
+ if (!pcap_opts->has_ifname)
|
||||
+ return -1;
|
||||
+
|
||||
+ ifname = pcap_opts->ifname;
|
||||
+
|
||||
+ /* create the object */
|
||||
+ nc = qemu_new_net_client(&net_pcap_info, peer, "pcap", ifname);
|
||||
+ s = DO_UPCAST(struct PCAPState, nc, nc);
|
||||
+
|
||||
+ if (ifname == NULL && (ifname = pcap_lookupdev(errbuf)) == NULL) {
|
||||
+ fprintf(stderr, "qemu: pcap_create: %s\n", errbuf);
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+#ifdef __FreeBSD__
|
||||
+ /*
|
||||
+ * We want to avoid passing oversize packets to the guest, which
|
||||
+ * at least on FreeBSD can happen if the host interface uses tso
|
||||
+ * (seen with an em(4) in this case) - so find out the host
|
||||
+ * interface's mtu and assume the guest is configured the same.
|
||||
+ */
|
||||
+ s->max_eth_frame_size = 1514;
|
||||
+ i = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
+ if (i >= 0) {
|
||||
+ struct ifreq ifr;
|
||||
+
|
||||
+ (void) memset(&ifr, 0, sizeof(ifr));
|
||||
+ strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
|
||||
+ if (ioctl(i, SIOCGIFMTU, &ifr) != -1)
|
||||
+ s->max_eth_frame_size = ifr.ifr_mtu + 14;
|
||||
+ close(i);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+#if defined(CONFIG_PCAP_CREATE) || defined(_WIN32)
|
||||
+ /*
|
||||
+ * Create pcap handle for the device, set promiscuous mode and activate.
|
||||
+ */
|
||||
+ s->handle = (void *)pcap_create(ifname, errbuf);
|
||||
+ if (!s->handle) {
|
||||
+ fprintf(stderr, "qemu: pcap_create: %s\n", errbuf);
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ if (pcap_set_promisc(s->handle, 1) != 0) {
|
||||
+ pcap_perror(s->handle, (char *)"qemu: pcap_set_promisc:");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ if (pcap_activate(s->handle) != 0) {
|
||||
+ pcap_perror(s->handle, (char *)"qemu: pcap_activate:");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+#else
|
||||
+ /* Attempt to connect device. */
|
||||
+ s->handle = (void *)pcap_open_live(ifname, 65535, 1, 0, errbuf);
|
||||
+ if (!s->handle) {
|
||||
+ fprintf(stderr, "qemu: pcap_open_live: %s\n", errbuf);
|
||||
+ goto fail;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ /* Set non-blocking mode. */
|
||||
+ if (pcap_setnonblock(s->handle, 1, errbuf) < 0) {
|
||||
+ fprintf(stderr, "qemu: pcap_setnonblock: %s\n", errbuf);
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+#if defined(_WIN32)
|
||||
+ /*
|
||||
+ * Tell the kernel that the packet has to be seen immediately.
|
||||
+ */
|
||||
+ if (pcap_setmintocopy(s->handle, 0) < 0) {
|
||||
+ fprintf(stderr, "qemu: pcap failed to set immediate mode\n");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+#else /* !_WIN32 */
|
||||
+#if defined(CONFIG_BPF)
|
||||
+#if defined(BIOCIMMEDIATE)
|
||||
+ /*
|
||||
+ * Tell the kernel that the packet has to be seen immediately.
|
||||
+ */
|
||||
+ {
|
||||
+ unsigned int one = 1;
|
||||
+ if (ioctl(pcap_fileno(s->handle), BIOCIMMEDIATE, &one) < 0) {
|
||||
+ fprintf(stderr, "qemu: pcap failed to set immediate mode\n");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ }
|
||||
+#endif /* BIOCIMMEDIATE */
|
||||
+#if defined(BIOCFEEDBACK)
|
||||
+ /*
|
||||
+ * Tell the kernel that the sent packet has to be fed back.
|
||||
+ * This is necessary to connect host and guest.
|
||||
+ */
|
||||
+ {
|
||||
+ unsigned int one = 1;
|
||||
+ if (ioctl(pcap_fileno(s->handle), BIOCFEEDBACK, &one) < 0) {
|
||||
+ fprintf(stderr, "qemu: pcap failed to set feedback mode\n");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ }
|
||||
+#endif /* BIOCFEEDBACK */
|
||||
+#endif /* CONFIG_BPF */
|
||||
+#endif /* _WIN32 */
|
||||
+
|
||||
+ snprintf(s->nc.info_str, sizeof(s->nc.info_str), "pcap redirector");
|
||||
+
|
||||
+#if defined(_WIN32)
|
||||
+ if ((h = pcap_getevent(s->handle)) == NULL) {
|
||||
+ fprintf(stderr, "qemu: pcap_getevent failed\n");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ qemu_add_wait_object(h, pcap_send, s);
|
||||
+#else /* !_WIN32 */
|
||||
+ if ((i = pcap_get_selectable_fd(s->handle)) < 0) {
|
||||
+ fprintf(stderr, "qemu: pcap_get_selectable_fd failed\n");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ qemu_set_fd_handler(i, pcap_send, NULL, s);
|
||||
+#endif /* _WIN32 */
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+fail:
|
||||
+ if (s) {
|
||||
+ if (s->handle)
|
||||
+ pcap_close(s->handle);
|
||||
+ }
|
||||
+
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
static int (* const net_client_init_fun[NET_CLIENT_DRIVER__MAX])(
|
||||
const Netdev *netdev,
|
||||
const char *name,
|
||||
@@ -955,6 +1178,9 @@ static int (* const net_client_init_fun[NET_CLIENT_DRI
|
||||
#endif
|
||||
#ifdef CONFIG_L2TPV3
|
||||
[NET_CLIENT_DRIVER_L2TPV3] = net_init_l2tpv3,
|
||||
+#endif
|
||||
+#ifdef CONFIG_PCAP
|
||||
+ [NET_CLIENT_DRIVER_PCAP] = net_init_pcap,
|
||||
#endif
|
||||
};
|
||||
|
@ -1,56 +0,0 @@
|
||||
--- qapi/net.json.orig 2018-04-24 16:30:47 UTC
|
||||
+++ qapi/net.json
|
||||
@@ -388,6 +388,19 @@
|
||||
'*helper': 'str' } }
|
||||
|
||||
##
|
||||
+# @NetdevPcapOptions:
|
||||
+#
|
||||
+# Use ifname as a source to capture
|
||||
+#
|
||||
+# @ifname: #required to determine which interface to capture
|
||||
+#
|
||||
+# Since: 1.2
|
||||
+##
|
||||
+{ 'struct': 'NetdevPcapOptions',
|
||||
+ 'data': {
|
||||
+ '*ifname': 'str' } }
|
||||
+
|
||||
+##
|
||||
# @NetdevHubPortOptions:
|
||||
#
|
||||
# Connect two or more net clients through a software hub.
|
||||
@@ -454,7 +467,7 @@
|
||||
##
|
||||
{ 'enum': 'NetClientDriver',
|
||||
'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
|
||||
- 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
|
||||
+ 'bridge', 'hubport', 'netmap', 'vhost-user', 'pcap' ] }
|
||||
|
||||
##
|
||||
# @Netdev:
|
||||
@@ -478,6 +491,7 @@
|
||||
'user': 'NetdevUserOptions',
|
||||
'tap': 'NetdevTapOptions',
|
||||
'l2tpv3': 'NetdevL2TPv3Options',
|
||||
+ 'pcap': 'NetdevPcapOptions',
|
||||
'socket': 'NetdevSocketOptions',
|
||||
'vde': 'NetdevVdeOptions',
|
||||
'bridge': 'NetdevBridgeOptions',
|
||||
@@ -514,7 +528,7 @@
|
||||
##
|
||||
{ 'enum': 'NetLegacyOptionsType',
|
||||
'data': ['none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
|
||||
- 'bridge', 'netmap', 'vhost-user'] }
|
||||
+ 'bridge', 'netmap', 'vhost-user', 'pcap'] }
|
||||
|
||||
##
|
||||
# @NetLegacyOptions:
|
||||
@@ -532,6 +546,7 @@
|
||||
'user': 'NetdevUserOptions',
|
||||
'tap': 'NetdevTapOptions',
|
||||
'l2tpv3': 'NetdevL2TPv3Options',
|
||||
+ 'pcap': 'NetdevPcapOptions',
|
||||
'socket': 'NetdevSocketOptions',
|
||||
'vde': 'NetdevVdeOptions',
|
||||
'bridge': 'NetdevBridgeOptions',
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
exec true
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
exec true
|
@ -1,19 +0,0 @@
|
||||
QEMU is a FAST! processor emulator using dynamic translation to achieve
|
||||
good emulation speed.
|
||||
QEMU has two operating modes:
|
||||
|
||||
* Full system emulation. In this mode, QEMU emulates a full system
|
||||
(for example a PC), including a processor and various peripherials.
|
||||
It can be used to launch different Operating Systems without rebooting
|
||||
the PC or to debug system code.
|
||||
* User mode emulation (Linux host only). In this mode, QEMU can launch
|
||||
Linux processes compiled for one CPU on another CPU. It can be used to
|
||||
launch the Wine Windows API emulator or to ease cross-compilation and
|
||||
cross-debugging.
|
||||
|
||||
As QEMU requires no host kernel patches to run, it is very safe and easy to use.
|
||||
|
||||
See also the preconfigured system images on http://oszoo.org/
|
||||
Many live cd isos also work.
|
||||
|
||||
WWW: http://wiki.qemu.org/Main_Page
|
@ -1,188 +0,0 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
FreeBSD host notes
|
||||
==================
|
||||
|
||||
- Needs to set net.link.tap.user_open sysctl in order to use /dev/tap*
|
||||
networking as non-root. Don't forget to adjust device node permissions in
|
||||
/etc/devfs.rules.
|
||||
|
||||
- slirp (usermode networking) is fixed now in cvs, on FreeSBIE 1.0 guests you
|
||||
still have to manually do: echo nameserver 10.0.2.3 >/etc/resolv.conf but
|
||||
i've been told that that's normal. (fixed on FreeSBIE 1.1.) And you have
|
||||
to wait a bit for dhclient to do its thing; traffic to address 10.0.2.2 is
|
||||
routed to 127.1 on the host.
|
||||
|
||||
- Expect timer problems when guest kernel HZ is > hosts, for example time
|
||||
sleep 1 takes 49 seconds and booting sleeps for minutes at the acd0 probe
|
||||
with a FreeSBIE 1.0 guest, thats because its kernel is built with HZ=5000,
|
||||
and FreeBSD's default is 100... (no longer a problem with FreeSBIE 1.1.)
|
||||
The linux 2.6 kernel uses 1000 by default btw. (changed to 250 later, and
|
||||
recent linux kernels now no longer have a fixed HZ, aka `tickless
|
||||
kernel'...) Enabling /dev/rtc doesn't seem to help either (not included
|
||||
since it needs a patch to emulators/rtc.)
|
||||
|
||||
- Update: the above problem has gotten worse with FreeBSD guests
|
||||
somewhere before 8.0, mainly since the kernel now usually wants
|
||||
double or even quadruple number of timer irqs compared to HZ if
|
||||
it detects an apic (and at least early versions of FreeBSD 8 had
|
||||
a bug that essentially halved qemu's clock rate too); the only
|
||||
reason you usually don't see symptoms of this with FreeBSD 8
|
||||
guests is they automatically reduce their HZ to 100 when running
|
||||
in a VM while the default for the host kernel is still HZ=1000.
|
||||
Workaround: you can disable the apic clock in the guest by setting
|
||||
|
||||
hint.apic.0.clock="0"
|
||||
|
||||
in loader.conf(5) (or manually at the loader prompt), if that
|
||||
doesn't work the only things you can do is either reduce the
|
||||
guest's HZ to, say, 100 by setting e.g.
|
||||
|
||||
kern.hz="100"
|
||||
|
||||
from the loader as above (which usually is a good idea in a VM
|
||||
anyway and FreeBSD 8 now does by itself as mentioned), or otherwise
|
||||
increase the host's HZ to 2000 or even 4000 from the loader in
|
||||
the same way.
|
||||
|
||||
- The -smb option (smb-export local dir to guest using the default
|
||||
slirp networking) needs the samba port/package installed
|
||||
in addition to qemu. (SAMBA knob.)
|
||||
|
||||
- If you want to use usb devices connected to the host in the guest
|
||||
yot need either recent 10-current (not tested yet much) or you can
|
||||
use usbredir over the network (see below); also unless you are
|
||||
running qemu as root you then need to fix permissions for /dev/ugen*
|
||||
device nodes: if you are on 5.x or later (devfs) put a rule in
|
||||
/etc/devfs.rules, activate it in /etc/rc.conf and run /etc/rc.d/devfs
|
||||
restart. Example devfs.rules:
|
||||
|
||||
[ugen_ruleset=20]
|
||||
add path 'ugen*' mode 660 group operator
|
||||
|
||||
corresponding rc.conf line:
|
||||
|
||||
devfs_system_ruleset="ugen_ruleset"
|
||||
|
||||
- If you want to test the new (in 0.15.0) usb network redirection (USBREDIR
|
||||
option) see this thread by Hans de Goede <hdegoede <at> redhat.com>:
|
||||
|
||||
http://thread.gmane.org/gmane.comp.emulators.qemu/110176/focus=110183
|
||||
|
||||
Quote:
|
||||
|
||||
Example usage:
|
||||
|
||||
1) Start usbredirserver for a usb device:
|
||||
sudo usbredirserver 045e:0772
|
||||
2) Start qemu with usb2 support + a chardev talking to usbredirserver +
|
||||
a usb-redir device using this chardev:
|
||||
qemu -usb \
|
||||
-readconfig docs/ich9-ehci-uhci.cfg \
|
||||
-chardev socket,id=usbredirchardev,host=localhost,port=4000 \
|
||||
-device usb-redir,chardev=usbredirchardev,id=usbredirdev ...
|
||||
|
||||
[you would replace docs/ich9-ehci-uhci.cfg with e.g.
|
||||
/usr/local/share/doc/qemu/docs/ich9-ehci-uhci.cfg, but turns out
|
||||
ehci was broken for me here with FreeBSD guests and the previous
|
||||
qemu version at least, I got:
|
||||
|
||||
FETCHENTRY: entry at 22C5484 is of type 2 which is not supported yet
|
||||
processing error - resetting ehci HC
|
||||
Assertion failed: (0), function ehci_advance_state, file /data/ports/emulators/qemu-devel/work/qemu-0.15.0/hw/usb-ehci.c, line 2045.
|
||||
|
||||
The new qemu version works better tho.]
|
||||
|
||||
- Still usb: since the hub is no longer attached to the uchi controller and
|
||||
the wakeup mechanism, resume interrupt is not implemented yet linux guests
|
||||
will suspend the bus, i.e. they wont see devices usb_add'ed after its
|
||||
(linux') uhci module got loaded. Workaround: either add devices before
|
||||
linux loads the module or rmmod and modprobe it afterwards. [Not sure
|
||||
if this still applies to the new libusb host code used on recent
|
||||
10-current.]
|
||||
|
||||
- If you get repeated `atapi_poll called!' console messages with FreeBSD
|
||||
guests or other weird cdrom problems then thats probably because the guest
|
||||
has atapicam loaded, which for reasons still to be determined has problems
|
||||
with qemu's now by default enabled cdrom dma. You can build the port with
|
||||
CDROM_DMA disabled to disable it. [Looks like this is fixed in recent
|
||||
FreeBSD guest versions.]
|
||||
|
||||
- If you build qemu wihout SDL and then get crashes running it try passing it
|
||||
-nographic. This should probably be default in that case...
|
||||
|
||||
- qemu's network boot roms (-boot n) have a bug when bootfiles sizes are a
|
||||
multiple of blksize, if this affects you (like with FreeBSD's /boot/pxeboot)
|
||||
you can do like
|
||||
|
||||
cp /boot/pxeboot pxeboot-qemu && chmod +w pxeboot-qemu && echo >>pxeboot-qemu
|
||||
|
||||
and then use pxeboot-qemu. Actually you need recent btx code
|
||||
(from after 7.0 was released) because of the real mode boot
|
||||
problem, so use at least pxeboot from there. And I just did that
|
||||
for the pxeboot extracted out of
|
||||
|
||||
ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/200805/7.0-STABLE-200805-i386-bootonly.iso
|
||||
|
||||
and placed it here:
|
||||
|
||||
http://people.freebsd.org/~nox/qemu/pxeboot-qemu
|
||||
|
||||
- If you use slirp (usernet, the default) and want to mount nfs into the guest
|
||||
and you are not running qemu as root, then mountd(8) on the exporting box
|
||||
needs to be run with -n in order to accept requests from ports >= 1024.
|
||||
|
||||
- (not FreeBSD-specific:) There have been reports of qcow2 corruption with (at
|
||||
least) win2k guests on recent kvm (which uses similar qcow2 code than qemu
|
||||
now, see this thread:
|
||||
|
||||
http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg00713.html -
|
||||
|
||||
the consensus on that thread seems to be that qcow(2) code has always been
|
||||
experimental and you should use raw images if you want reliability; raw is
|
||||
also usually faster.) You should be able to migrate existing images to raw
|
||||
using qemu-img(1)'s convert function; raw doesn't support advanced features
|
||||
like snapshots tho. [a few important qcow2 bugfixed have been committed in
|
||||
the meantime so this _might_ be less of an issue now; and meanwhile there
|
||||
also is the new qed format - I don't know how stable that one is.]
|
||||
|
||||
- (also not FreeBSD-specific:) It is recommended to pass raw images using the
|
||||
new -drive syntax, specifying format=raw explicitly in order to avoid
|
||||
malicious guests being able to exploit the format autodetection thats
|
||||
otherwise getting used. (Not that you should run malicious guests anyway,
|
||||
but this eleminates at least a known attack vector.)
|
||||
|
||||
- qemu now has improved physical cdrom support, but still there is at
|
||||
least one known problem: you need to have the guest eject the disc if you
|
||||
want to change it/take it out, or otherwise the guest may continue using
|
||||
state (like size) of the old disc. (You can also do like `change ide1-cd0
|
||||
/dev/acd0' in the monitor after taking out the disc if a guest cannot eject
|
||||
it itself.)
|
||||
|
||||
- The default configuration location (qemu-ifup script etc.) has been changed
|
||||
from /etc to PREFIX/etc (usually /usr/local/etc). Move your files
|
||||
accordingly.
|
||||
|
||||
- The pcap code (-net nic... -net pcap,ifname=...) should work properly now,
|
||||
with only one exception: Advanced features like TSO used on the host
|
||||
interface can cause oversize packets which now do get truncated to avoid
|
||||
confusing/panicing guests but of course still will cause retransmissions.
|
||||
So if you see slow throughput and `pcap_send: packet size > ..., truncating'
|
||||
messages on qemu's tty try disabling TSO etc on the host interface at least
|
||||
while using pcap.
|
||||
|
||||
- kqemu is no longer supported in qemu upstream after the 0.11 branch
|
||||
was created, which means also not in this version. (Linux has moved
|
||||
on to kvm now for qemu(-like) virtualization needs, so if you want qemu
|
||||
to go faster and don't want to switch to virtualbox or stick to the older
|
||||
emulators/qemu port which is at 0.11.1 atm and as such still supports
|
||||
kqemu you should help getting the FreeBSD kvm port updated and
|
||||
completed:
|
||||
|
||||
http://wiki.freebsd.org/FabioChecconi/PortingLinuxKVMToFreeBSD
|
||||
|
||||
)
|
||||
EOM
|
||||
}
|
||||
]
|
@ -1,155 +0,0 @@
|
||||
bin/elf2dmp
|
||||
bin/qemu-edid
|
||||
bin/qemu-ga
|
||||
bin/qemu-i386
|
||||
bin/qemu-img
|
||||
bin/qemu-io
|
||||
%%GTK3%%bin/qemu-keymap
|
||||
bin/qemu-nbd
|
||||
%%NO_X86_TARGETS%%bin/qemu-sparc
|
||||
%%NO_X86_TARGETS%%bin/qemu-sparc64
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-aarch64
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-alpha
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-arm
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-cris
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-hppa
|
||||
bin/qemu-system-i386
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-lm32
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-m68k
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-microblaze
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-microblazeel
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-mips
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-mips64
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-mips64el
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-mipsel
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-moxie
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-nios2
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-or1k
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-ppc
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-ppc64
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-riscv32
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-riscv64
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-s390x
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-sh4
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-sh4eb
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-sparc
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-sparc64
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-tricore
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-unicore32
|
||||
bin/qemu-system-x86_64
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-xtensa
|
||||
%%NO_X86_TARGETS%%bin/qemu-system-xtensaeb
|
||||
bin/qemu-x86_64
|
||||
man/man1/qemu.1.gz
|
||||
man/man1/qemu-img.1.gz
|
||||
man/man7/qemu-block-drivers.7.gz
|
||||
man/man7/qemu-cpu-models.7.gz
|
||||
man/man7/qemu-ga-ref.7.gz
|
||||
man/man7/qemu-qmp-ref.7.gz
|
||||
man/man8/qemu-ga.8.gz
|
||||
man/man8/qemu-nbd.8.gz
|
||||
@sample etc/qemu-ifup.sample
|
||||
@sample etc/qemu-ifdown.sample
|
||||
%%DATADIR%%/QEMU,tcx.bin
|
||||
%%DATADIR%%/QEMU,cgthree.bin
|
||||
%%DATADIR%%/bios-256k.bin
|
||||
%%DATADIR%%/bios.bin
|
||||
%%DATADIR%%/canyonlands.dtb
|
||||
%%DATADIR%%/efi-e1000.rom
|
||||
%%DATADIR%%/efi-e1000e.rom
|
||||
%%DATADIR%%/efi-eepro100.rom
|
||||
%%DATADIR%%/efi-ne2k_pci.rom
|
||||
%%DATADIR%%/efi-pcnet.rom
|
||||
%%DATADIR%%/efi-rtl8139.rom
|
||||
%%DATADIR%%/efi-virtio.rom
|
||||
%%DATADIR%%/efi-vmxnet3.rom
|
||||
%%DATADIR%%/hppa-firmware.img
|
||||
%%DATADIR%%/qemu_vga.ndrv
|
||||
%%DATADIR%%/s390-netboot.img
|
||||
%%DATADIR%%/u-boot-sam460-20100605.bin
|
||||
%%DATADIR%%/vgabios.bin
|
||||
%%DATADIR%%/vgabios-cirrus.bin
|
||||
%%DATADIR%%/vgabios-qxl.bin
|
||||
%%DATADIR%%/vgabios-stdvga.bin
|
||||
%%DATADIR%%/vgabios-virtio.bin
|
||||
%%DATADIR%%/vgabios-vmware.bin
|
||||
%%DATADIR%%/palcode-clipper
|
||||
%%DATADIR%%/ppc_rom.bin
|
||||
%%DATADIR%%/openbios-ppc
|
||||
%%DATADIR%%/openbios-sparc32
|
||||
%%DATADIR%%/openbios-sparc64
|
||||
%%DATADIR%%/pxe-e1000.rom
|
||||
%%DATADIR%%/pxe-eepro100.rom
|
||||
%%DATADIR%%/pxe-ne2k_pci.rom
|
||||
%%DATADIR%%/pxe-rtl8139.rom
|
||||
%%DATADIR%%/pxe-pcnet.rom
|
||||
%%DATADIR%%/pxe-virtio.rom
|
||||
%%DATADIR%%/petalogix-ml605.dtb
|
||||
%%DATADIR%%/spapr-rtas.bin
|
||||
%%DATADIR%%/slof.bin
|
||||
%%DATADIR%%/s390-ccw.img
|
||||
%%DATADIR%%/linuxboot.bin
|
||||
%%LINUXBOOT_DMA%%%%DATADIR%%/linuxboot_dma.bin
|
||||
%%DATADIR%%/multiboot.bin
|
||||
%%DATADIR%%/sgabios.bin
|
||||
%%DATADIR%%/skiboot.lid
|
||||
%%DATADIR%%/trace-events-all
|
||||
%%DATADIR%%/petalogix-s3adsp1800.dtb
|
||||
%%DATADIR%%/bamboo.dtb
|
||||
%%DATADIR%%/kvmvapic.bin
|
||||
%%DATADIR%%/u-boot.e500
|
||||
%%DATADIR%%/keymaps/ar
|
||||
%%DATADIR%%/keymaps/bepo
|
||||
%%DATADIR%%/keymaps/cz
|
||||
%%DATADIR%%/keymaps/da
|
||||
%%DATADIR%%/keymaps/de
|
||||
%%DATADIR%%/keymaps/de-ch
|
||||
%%DATADIR%%/keymaps/en-gb
|
||||
%%DATADIR%%/keymaps/en-us
|
||||
%%DATADIR%%/keymaps/es
|
||||
%%DATADIR%%/keymaps/et
|
||||
%%DATADIR%%/keymaps/fi
|
||||
%%DATADIR%%/keymaps/fo
|
||||
%%DATADIR%%/keymaps/fr
|
||||
%%DATADIR%%/keymaps/fr-be
|
||||
%%DATADIR%%/keymaps/fr-ca
|
||||
%%DATADIR%%/keymaps/fr-ch
|
||||
%%DATADIR%%/keymaps/hr
|
||||
%%DATADIR%%/keymaps/hu
|
||||
%%DATADIR%%/keymaps/is
|
||||
%%DATADIR%%/keymaps/it
|
||||
%%DATADIR%%/keymaps/ja
|
||||
%%DATADIR%%/keymaps/lt
|
||||
%%DATADIR%%/keymaps/lv
|
||||
%%DATADIR%%/keymaps/mk
|
||||
%%DATADIR%%/keymaps/nl
|
||||
%%DATADIR%%/keymaps/no
|
||||
%%DATADIR%%/keymaps/pl
|
||||
%%DATADIR%%/keymaps/pt
|
||||
%%DATADIR%%/keymaps/pt-br
|
||||
%%DATADIR%%/keymaps/ru
|
||||
%%DATADIR%%/keymaps/sl
|
||||
%%DATADIR%%/keymaps/sv
|
||||
%%DATADIR%%/keymaps/th
|
||||
%%DATADIR%%/keymaps/tr
|
||||
%%DATADIR%%/pvh.bin
|
||||
%%DATADIR%%/vgabios-bochs-display.bin
|
||||
%%DATADIR%%/vgabios-ramfb.bin
|
||||
share/icons/hicolor/128x128/apps/qemu.png
|
||||
share/icons/hicolor/16x16/apps/qemu.png
|
||||
share/icons/hicolor/24x24/apps/qemu.png
|
||||
share/icons/hicolor/256x256/apps/qemu.png
|
||||
share/icons/hicolor/32x32/apps/qemu.bmp
|
||||
share/icons/hicolor/32x32/apps/qemu.png
|
||||
share/icons/hicolor/48x48/apps/qemu.png
|
||||
share/icons/hicolor/512x512/apps/qemu.png
|
||||
share/icons/hicolor/64x64/apps/qemu.png
|
||||
share/icons/hicolor/scalable/apps/qemu.svg
|
||||
share/applications/qemu.desktop
|
||||
%%GTK3%%share/locale/bg/LC_MESSAGES/qemu.mo
|
||||
%%GTK3%%share/locale/de_DE/LC_MESSAGES/qemu.mo
|
||||
%%GTK3%%share/locale/fr_FR/LC_MESSAGES/qemu.mo
|
||||
%%GTK3%%share/locale/hu/LC_MESSAGES/qemu.mo
|
||||
%%GTK3%%share/locale/it/LC_MESSAGES/qemu.mo
|
||||
%%GTK3%%share/locale/tr/LC_MESSAGES/qemu.mo
|
||||
%%GTK3%%share/locale/zh_CN/LC_MESSAGES/qemu.mo
|
@ -538,8 +538,6 @@
|
||||
SUBDIR += lightyears
|
||||
SUBDIR += lincity
|
||||
SUBDIR += lincity-ng
|
||||
SUBDIR += linux-darwinia-demo
|
||||
SUBDIR += linux-defcon
|
||||
SUBDIR += linux-doom3
|
||||
SUBDIR += linux-doom3-demo
|
||||
SUBDIR += linux-dwarffortress
|
||||
@ -561,7 +559,6 @@
|
||||
SUBDIR += linux-unigine-heaven
|
||||
SUBDIR += linux-unigine-valley
|
||||
SUBDIR += linux-unrealgold
|
||||
SUBDIR += linux-uplink-demo
|
||||
SUBDIR += linux-ut
|
||||
SUBDIR += linux-ut2003-demo
|
||||
SUBDIR += linux-virtual-jay-peak
|
||||
@ -1047,7 +1044,6 @@
|
||||
SUBDIR += xdigger
|
||||
SUBDIR += xdino
|
||||
SUBDIR += xemeraldia
|
||||
SUBDIR += xevil
|
||||
SUBDIR += xeyesplus
|
||||
SUBDIR += xfireworks
|
||||
SUBDIR += xfrisk
|
||||
@ -1078,7 +1074,6 @@
|
||||
SUBDIR += xmine
|
||||
SUBDIR += xminehunter
|
||||
SUBDIR += xmines
|
||||
SUBDIR += xminesweep
|
||||
SUBDIR += xmlink
|
||||
SUBDIR += xmoto
|
||||
SUBDIR += xmris
|
||||
|
@ -1,46 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= darwinia-demo
|
||||
PORTVERSION= 1.3.0
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= games linux
|
||||
MASTER_SITES= http://download.introversion.co.uk/mirror/introversion/darwinia/downloads/
|
||||
PKGNAMEPREFIX= linux-
|
||||
DISTNAME= ${PORTNAME}2-${PORTVERSION}
|
||||
EXTRACT_SUFX= .sh
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Real-time action strategy with programs
|
||||
|
||||
BROKEN= unfetchable
|
||||
DEPRECATED= Broken for more than 6 months
|
||||
EXPIRATION_DATE= 2020-08-26
|
||||
|
||||
ONLY_FOR_ARCHS= i386 amd64
|
||||
USES= linux
|
||||
USE_LINUX= dri libogg libvorbis sdl12 xorglibs
|
||||
NO_CDROM= Redistribution is limited, see license
|
||||
NO_BUILD= yes
|
||||
NO_WRKSUBDIR= yes
|
||||
|
||||
DATADIR= ${PREFIX}/lib/${PKGNAMEPREFIX}${PORTNAME}
|
||||
SUB_FILES= darwinia
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
do-extract:
|
||||
@cd ${WRKSRC} && ${TAIL} +376 ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} | \
|
||||
${TAR} zxf -
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}
|
||||
@cd ${WRKSRC}/lib && \
|
||||
${INSTALL_PROGRAM} darwinia.bin.x86 ${STAGEDIR}${DATADIR} && \
|
||||
${INSTALL_DATA} *.dat open-www.sh ${STAGEDIR}${DATADIR}
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/darwinia \
|
||||
${STAGEDIR}${PREFIX}/bin/${PKGNAMEPREFIX}darwinia
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/LICENSE ${STAGEDIR}${DOCSDIR}/LICENSE
|
||||
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}/README
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,2 +0,0 @@
|
||||
SHA256 (darwinia-demo2-1.3.0.sh) = 2a51ca4e881f7aafe237fedf2e45ea84b48f02488482f55fb3af605a37833d85
|
||||
SIZE (darwinia-demo2-1.3.0.sh) = 22470072
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd %%DATADIR%% || exit 1
|
||||
exec ./darwinia.bin.x86 "$@"
|
@ -1,8 +0,0 @@
|
||||
From the homepage: The world of Darwinia is a virtual themepark,
|
||||
running entirely inside a computer network and populated by a
|
||||
sentient evolving life form called the Darwinians. Unfortunately
|
||||
Darwinia has been overrun by a computer virus which has multiplied
|
||||
out of control. Your task is to destroy the Viral Infection and
|
||||
save the Darwinians from extinction.
|
||||
|
||||
WWW: http://www.introversion.co.uk/darwinia/
|
@ -1,17 +0,0 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
This game will attempt to obtain some system information by
|
||||
accessing files in linux's procfs. You must install the Linux
|
||||
emulation procfs filesystem for this to work correctly. This can be
|
||||
accomplished by adding the following line to your /etc/fstab file:
|
||||
|
||||
linprocfs /compat/linux/proc linprocfs rw 0 0
|
||||
|
||||
and then, as root, executing the commands:
|
||||
|
||||
kldload linprocfs
|
||||
mount /compat/linux/proc
|
||||
EOM
|
||||
}
|
||||
]
|
@ -1,8 +0,0 @@
|
||||
bin/linux-darwinia
|
||||
%%DATADIR%%/darwinia.bin.x86
|
||||
%%DATADIR%%/main.dat
|
||||
%%DATADIR%%/sounds.dat
|
||||
%%DATADIR%%/language.dat
|
||||
%%DATADIR%%/open-www.sh
|
||||
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
@ -1,41 +0,0 @@
|
||||
# Created by: Marcus von Appen <mva@sysfault.org
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= defcon
|
||||
PORTVERSION= 1.42
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= games linux
|
||||
MASTER_SITES= http://download.introversion.co.uk/defcon/linux/
|
||||
PKGNAMEPREFIX= linux-
|
||||
DISTNAME= ${PORTNAME}-v${PORTVERSION}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Defcon for Linux
|
||||
|
||||
BROKEN= unfetchable
|
||||
DEPRECATED= Broken for more than 6 months
|
||||
EXPIRATION_DATE= 2020-08-26
|
||||
|
||||
ONLY_FOR_ARCHS= i386 amd64
|
||||
USES= linux
|
||||
USE_LINUX= dri libogg libvorbis sdl12 xorglibs
|
||||
NO_CDROM= Redistribution is limited, see license
|
||||
NO_BUILD= yes
|
||||
|
||||
DATADIR= ${PREFIX}/lib/${PKGNAMEPREFIX}${PORTNAME}
|
||||
SUB_FILES= defcon
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}
|
||||
@cd ${WRKSRC}/lib && \
|
||||
${INSTALL_PROGRAM} defcon.bin.x86 ${STAGEDIR}${DATADIR} && \
|
||||
${INSTALL_DATA} *.dat open-www.sh ${STAGEDIR}${DATADIR}
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/defcon \
|
||||
${STAGEDIR}${PREFIX}/bin/${PKGNAMEPREFIX}defcon
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/license.txt ${STAGEDIR}${DOCSDIR}/license.txt
|
||||
${INSTALL_DATA} ${WRKSRC}/manual.pdf ${STAGEDIR}${DOCSDIR}/manual.pdf
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,2 +0,0 @@
|
||||
SHA256 (defcon-v1.42.tar.gz) = 5973c32ef55d245b9adfbce33bb7c503d3f0ad7bf5deb55eba8754f9850cdf40
|
||||
SIZE (defcon-v1.42.tar.gz) = 63093946
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd %%DATADIR%% || exit 1
|
||||
exec ./defcon.bin.x86 "$@"
|
@ -1,6 +0,0 @@
|
||||
Defcon is announced as "The World's first Genocide 'em up". It is a
|
||||
global thermonuclear war simulation inspired by movies like WarGames
|
||||
and features multiplayer support, different game modes and support for
|
||||
own game mods.
|
||||
|
||||
WWW: http://www.introversion.co.uk/defcon/
|
@ -1,17 +0,0 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
This game will attempt to obtain some system information by
|
||||
accessing files in linux's procfs. You must install the Linux
|
||||
emulation procfs filesystem for this to work correctly. This can be
|
||||
accomplished by adding the following line to your /etc/fstab file:
|
||||
|
||||
linprocfs /compat/linux/proc linprocfs rw 0 0
|
||||
|
||||
and then, as root, executing the commands:
|
||||
|
||||
kldload linprocfs
|
||||
mount /compat/linux/proc
|
||||
EOM
|
||||
}
|
||||
]
|
@ -1,7 +0,0 @@
|
||||
bin/linux-defcon
|
||||
%%DATADIR%%/defcon.bin.x86
|
||||
%%DATADIR%%/main.dat
|
||||
%%DATADIR%%/sounds.dat
|
||||
%%DATADIR%%/open-www.sh
|
||||
%%PORTDOCS%%%%DOCSDIR%%/license.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/manual.pdf
|
@ -1,51 +0,0 @@
|
||||
# Created by: Marcus von Appen <mva@sysfault.org>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= uplink-demo
|
||||
PORTVERSION= 1.55
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= games linux
|
||||
MASTER_SITES= http://www.introversion.co.uk/uplink/downloads/
|
||||
PKGNAMEPREFIX= linux-
|
||||
DISTNAME= ${PORTNAME}-${PORTVERSION}DEMO
|
||||
EXTRACT_SUFX= .sh
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= High tech computer crime and industrial espionage on the Internet
|
||||
|
||||
BROKEN= unfetchable
|
||||
DEPRECATED= Broken for more than 6 months
|
||||
EXPIRATION_DATE= 2020-08-26
|
||||
|
||||
ONLY_FOR_ARCHS= i386 amd64
|
||||
USES= linux
|
||||
USE_LINUX= dri jpeg sdl12 sdlmixer
|
||||
USE_LDCONFIG= yes
|
||||
NO_CDROM= Redistribution is limited, see license
|
||||
NO_BUILD= yes
|
||||
NO_WRKSUBDIR= yes
|
||||
|
||||
DATADIR= ${PREFIX}/lib/${PKGNAMEPREFIX}${PORTNAME}
|
||||
SUB_FILES= uplink
|
||||
SUB_LIST= LINUXBASE=${LINUXBASE}
|
||||
DOCFILES= license.txt mods.txt Readme-UplinkSupport.txt readme.txt
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
do-extract:
|
||||
@cd ${WRKSRC} && ${TAIL} +376 ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} | \
|
||||
${TAR} zxf -
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}
|
||||
@cd ${WRKSRC}/lib && \
|
||||
${INSTALL_PROGRAM} uplink.bin.x86 libftgl.so.0 ${STAGEDIR}${DATADIR} && \
|
||||
${INSTALL_DATA} *.dat ${STAGEDIR}${DATADIR}
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/uplink \
|
||||
${STAGEDIR}${PREFIX}/bin/${PKGNAMEPREFIX}uplink
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
.for file in ${DOCFILES}
|
||||
${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}/${file}
|
||||
.endfor
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,2 +0,0 @@
|
||||
SHA256 (uplink-demo-1.55DEMO.sh) = d00de7891a7ee47afb5b39345d14afdad3563bc17c9ef356284f3edffbe515e8
|
||||
SIZE (uplink-demo-1.55DEMO.sh) = 10545660
|
@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
LD_PRELOAD_FTGL=%%LINUXBASE%%/usr/lib/libfreetype.so.6:%%DATADIR%%/libftgl.so.0
|
||||
|
||||
if [ -n "$LD_PRELOAD" ]; then
|
||||
export LD_PRELOAD="$LD_PRELOAD_FTGL:$LD_PRELOAD"
|
||||
else
|
||||
export LD_PRELOAD="$LD_PRELOAD_FTGL"
|
||||
fi
|
||||
|
||||
cd %%DATADIR%% || exit 1
|
||||
exec ./uplink.bin.x86 "$@"
|
@ -1,13 +0,0 @@
|
||||
From the homepage: You play an Uplink Agent who makes a living by performing
|
||||
jobs for major corporations. Your tasks involve hacking into rival computer
|
||||
systems, stealing research data, sabotaging other companies, laundering money,
|
||||
erasing evidence, or framing innocent people.
|
||||
You use the money you earn to upgrade your computer systems, and to buy new
|
||||
software and tools. As your experience level increases you find more
|
||||
dangerous and profitable missions become available. You can speculate on a
|
||||
fully working stock market (and even influence its outcome). You can modify
|
||||
peoples academic or criminal records. You can divert money from bank transfers
|
||||
into your own accounts. You can even take part in the construction of the most
|
||||
deadly computer virus ever designed.
|
||||
|
||||
WWW: http://uplink.co.uk
|
@ -1,17 +0,0 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
This game will attempt to obtain some system information by
|
||||
accessing files in linux's procfs. You must install the Linux
|
||||
emulation procfs filesystem for this to work correctly. This can be
|
||||
accomplished by adding the following line to your /etc/fstab file:
|
||||
|
||||
linprocfs /compat/linux/proc linprocfs rw 0 0
|
||||
|
||||
and then, as root, executing the commands:
|
||||
|
||||
kldload linprocfs
|
||||
mount /compat/linux/proc
|
||||
EOM
|
||||
}
|
||||
]
|
@ -1,16 +0,0 @@
|
||||
bin/linux-uplink
|
||||
%%DATADIR%%/uplink.bin.x86
|
||||
%%DATADIR%%/libftgl.so.0
|
||||
%%DATADIR%%/data.dat
|
||||
%%DATADIR%%/fonts.dat
|
||||
%%DATADIR%%/graphics.dat
|
||||
%%DATADIR%%/loading.dat
|
||||
%%DATADIR%%/music.dat
|
||||
%%DATADIR%%/patch.dat
|
||||
%%DATADIR%%/patch2.dat
|
||||
%%DATADIR%%/patch3.dat
|
||||
%%DATADIR%%/sounds.dat
|
||||
%%PORTDOCS%%%%DOCSDIR%%/license.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/mods.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Readme-UplinkSupport.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/readme.txt
|
@ -1,46 +0,0 @@
|
||||
# Created by: G_ran Runfeldt <goranrunfeldt@home.se>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= xevil
|
||||
PORTVERSION= 2.02.r2
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= http://www.xevil.com/download/stable/
|
||||
DISTNAME= ${PORTNAME}src${PORTVERSION:S/.r/r/}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Fast-action, networked, anti-social, kill-everything game
|
||||
|
||||
BROKEN= unfetchable
|
||||
DEPRECATED= Broken for more than 6 months
|
||||
EXPIRATION_DATE= 2020-08-26
|
||||
|
||||
LICENSE= GPLv2+
|
||||
LICENSE_FILE= ${WRKSRC}/gpl.txt
|
||||
|
||||
NO_WRKSUBDIR= yes
|
||||
|
||||
USES= dos2unix xorg zip
|
||||
USE_XORG= xpm
|
||||
DOS2UNIX_GLOB= *.cpp *.h config.mk makefile
|
||||
MAKEFILE= makefile
|
||||
MAKE_ARGS= DEPTH="${WRKSRC}"
|
||||
ALL_TARGET= ${OPSYS:tl}
|
||||
|
||||
PORTDOCS= *
|
||||
PLIST_FILES= bin/${PORTNAME}
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
post-patch:
|
||||
@${FIND} ${WRKSRC} -name "*.xpm" | ${XARGS} ${REINPLACE_CMD} -e \
|
||||
's|^static char|static const char|'
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/x11/${OPSYS:tu}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/readme.txt ${STAGEDIR}${DOCSDIR}
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}/instructions
|
||||
${INSTALL_DATA} ${WRKSRC}/instructions/* ${STAGEDIR}${DOCSDIR}/instructions
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,2 +0,0 @@
|
||||
SHA256 (xevilsrc2.02r2.zip) = 45a72def6f7532bd4b7193932df09c1ba4eada2433382c494b37d4733e743188
|
||||
SIZE (xevilsrc2.02r2.zip) = 1857315
|
@ -1,208 +0,0 @@
|
||||
--- cmn/actual.cpp.orig 2012-05-27 06:52:29.000000000 +0900
|
||||
+++ cmn/actual.cpp 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
// Include Files
|
||||
#if X11
|
||||
-#include <strstream.h>
|
||||
+#include <sstream>
|
||||
#endif
|
||||
#if WIN32
|
||||
#include <strstrea.h>
|
||||
@@ -122,6 +122,7 @@
|
||||
#include "bitmaps/yeti/yeti.bitmaps"
|
||||
|
||||
|
||||
+using namespace std;
|
||||
|
||||
///// Some helper macros to define creatures with certain abilities.
|
||||
#define DEFINE_CREATURE_CTORS_2(CLASSNAME,ABILITY0,ability0,ABILITY1,ability1) \
|
||||
@@ -454,9 +455,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
- ostrstream msg;
|
||||
- msg << "Explosion hits " << hit << " objects." << ends;
|
||||
- locator->message_enq(msg.str());
|
||||
+ stringstream msg;
|
||||
+ msg << "Explosion hits " << hit << " objects.";
|
||||
+ locator->message_enq(Utils::strdup(msg.str().c_str()));
|
||||
|
||||
kill_self();
|
||||
Physical::act();
|
||||
@@ -1001,7 +1002,7 @@
|
||||
if (other && (other->get_class_id() != A_AltarOfSin) &&
|
||||
(intel = other->get_intel())) {
|
||||
LocatorP locator = get_locator();
|
||||
- ostrstream str;
|
||||
+ stringstream str;
|
||||
|
||||
// Turned into a frog/baby seal.
|
||||
if (Utils::coin_flip() && other->is_moving() &&
|
||||
@@ -1014,8 +1015,8 @@
|
||||
|
||||
str << intel->get_name() << " attacks the Altar of Sin and is "
|
||||
<< "turned into a " << (doFrog ? "frog" : "baby-seal")
|
||||
- << "." << ends;
|
||||
- locator->message_enq(str.str());
|
||||
+ << ".";
|
||||
+ locator->message_enq(Utils::strdup(str.str().c_str()));
|
||||
|
||||
other->set_intel(NULL);
|
||||
if (!other->get_mapped()) {
|
||||
@@ -1047,8 +1048,8 @@
|
||||
// Lose all health.
|
||||
else {
|
||||
str << "BLASPHMER! " << intel->get_name() <<
|
||||
- " loses health for daring to attack the Altar of Sin." << ends;
|
||||
- locator->message_enq(str.str());
|
||||
+ " loses health for daring to attack the Altar of Sin.";
|
||||
+ locator->message_enq(Utils::strdup(str.str().c_str()));
|
||||
|
||||
int damage = other->get_health();
|
||||
other->corporeal_attack(this,damage);
|
||||
@@ -1075,8 +1076,8 @@
|
||||
(intel = other->get_intel()) && intel->is_human()) {
|
||||
int lives = intel->get_lives();
|
||||
LocatorP locator = get_locator();
|
||||
- ostrstream msg;
|
||||
- ostrstream arenaMsg;
|
||||
+ stringstream msg;
|
||||
+ stringstream arenaMsg;
|
||||
|
||||
// Choose different blessings to give.
|
||||
int n = 0;
|
||||
@@ -1112,8 +1113,8 @@
|
||||
}
|
||||
else {
|
||||
intel->set_lives(lives + 1);
|
||||
- msg << intel->get_name() << " sells soul for an extra life." << ends;
|
||||
- arenaMsg << "You Sold Your Soul For an Extra Life" << ends;
|
||||
+ msg << intel->get_name() << " sells soul for an extra life.";
|
||||
+ arenaMsg << "You Sold Your Soul For an Extra Life";
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1123,8 +1124,8 @@
|
||||
mod = new DoubleSpeed();
|
||||
assert(mod);
|
||||
modList->append_unique(mod);
|
||||
- msg << intel->get_name() << " sells soul for Double Speed." << ends;
|
||||
- arenaMsg << "Double Speed" << ends;
|
||||
+ msg << intel->get_name() << " sells soul for Double Speed.";
|
||||
+ arenaMsg << "Double Speed";
|
||||
break;
|
||||
|
||||
|
||||
@@ -1138,9 +1139,8 @@
|
||||
mod = new DoubleJump();
|
||||
assert(mod);
|
||||
modList->append_unique(mod);
|
||||
- msg << intel->get_name() << " sells soul for extra jumping powers."
|
||||
- << ends;
|
||||
- arenaMsg << "Extra Jumping Powers" << ends;
|
||||
+ msg << intel->get_name() << " sells soul for extra jumping powers.";
|
||||
+ arenaMsg << "Extra Jumping Powers";
|
||||
break;
|
||||
|
||||
|
||||
@@ -1157,8 +1157,8 @@
|
||||
// So max health takes effect immediately.
|
||||
other->heal();
|
||||
|
||||
- msg << intel->get_name() << " sells soul for Double Health." << ends;
|
||||
- arenaMsg << "Double Health" << ends;
|
||||
+ msg << intel->get_name() << " sells soul for Double Health.";
|
||||
+ arenaMsg << "Double Health";
|
||||
break;
|
||||
|
||||
|
||||
@@ -1176,8 +1176,8 @@
|
||||
// Might as well make sure they can take advantage of it now.
|
||||
other->heal();
|
||||
|
||||
- msg << intel->get_name() << " sells soul for Healing Powers." << ends;
|
||||
- arenaMsg << "Healing Powers" << ends;
|
||||
+ msg << intel->get_name() << " sells soul for Healing Powers.";
|
||||
+ arenaMsg << "Healing Powers";
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1193,8 +1193,8 @@
|
||||
// Already checked that other is a Creature().
|
||||
((CreatureP)other)->add_ability(a);
|
||||
|
||||
- msg << intel->get_name() << " sells soul for HellFire Powers." << ends;
|
||||
- arenaMsg << "HellFire Powers" << ends;
|
||||
+ msg << intel->get_name() << " sells soul for HellFire Powers.";
|
||||
+ arenaMsg << "HellFire Powers";
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1217,8 +1217,8 @@
|
||||
// Already checked that other is a Creature().
|
||||
((CreatureP)other)->add_ability(a);
|
||||
|
||||
- msg << intel->get_name() << " sells soul for Fireballs." << ends;
|
||||
- arenaMsg << "Fireballs" << ends;
|
||||
+ msg << intel->get_name() << " sells soul for Fireballs.";
|
||||
+ arenaMsg << "Fireballs";
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1241,8 +1241,8 @@
|
||||
// Already checked that other is a Creature().
|
||||
((CreatureP)other)->add_ability(a);
|
||||
|
||||
- msg << intel->get_name() << " sells soul for Flying Powers." << ends;
|
||||
- arenaMsg << "Flying Powers" << ends;
|
||||
+ msg << intel->get_name() << " sells soul for Flying Powers.";
|
||||
+ arenaMsg << "Flying Powers";
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1274,8 +1274,8 @@
|
||||
// Already checked that other is a Creature().
|
||||
((CreatureP)other)->add_ability(a);
|
||||
|
||||
- msg << intel->get_name() << " sells soul for Sticky Powers." << ends;
|
||||
- arenaMsg << "Sticky Powers" << ends;
|
||||
+ msg << intel->get_name() << " sells soul for Sticky Powers.";
|
||||
+ arenaMsg << "Sticky Powers";
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1285,8 +1285,8 @@
|
||||
}
|
||||
} // while
|
||||
|
||||
- locator->message_enq(msg.str());
|
||||
- locator->arena_message_enq(arenaMsg.str(),other);
|
||||
+ locator->message_enq(Utils::strdup(msg.str().c_str()));
|
||||
+ locator->arena_message_enq(Utils::strdup(arenaMsg.str().c_str()),other);
|
||||
|
||||
kill_self();
|
||||
turnTaken = True;
|
||||
@@ -1534,7 +1534,7 @@
|
||||
void *closure) {
|
||||
// notThis is used to prevent transmogifying into the same class an object
|
||||
// already is.
|
||||
- ClassId notThis = (ClassId)closure;
|
||||
+ ClassId notThis = (long)closure;
|
||||
if (pc->classId == notThis) {
|
||||
return False;
|
||||
}
|
||||
@@ -2087,10 +2087,9 @@
|
||||
PhysicalP seal = new Seal(w,l,pos);
|
||||
assert(seal);
|
||||
|
||||
- char sealStr[20];
|
||||
- ostrstream str(sealStr,20);
|
||||
- str << "seal-" << sealsNum << ends;
|
||||
- NeutralP sealIntel = new SealIntel(w,l,sealStr,homeId);
|
||||
+ stringstream str;
|
||||
+ str << "seal-" << sealsNum;
|
||||
+ NeutralP sealIntel = new SealIntel(w,l,Utils::strdup(str.str().c_str()),homeId);
|
||||
seal->set_intel(sealIntel);
|
||||
l->register_neutral(sealIntel);
|
||||
seals[sealsNum] = sealIntel->get_intel_id();
|
@ -1,17 +0,0 @@
|
||||
--- cmn/area.cpp.orig 2012-05-27 06:52:29.000000000 +0900
|
||||
+++ cmn/area.cpp 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -34,12 +34,13 @@
|
||||
extern "C" {
|
||||
#include <limits.h> // For INT_MAX
|
||||
}
|
||||
-#include <iostream.h>
|
||||
+#include <iostream>
|
||||
#include "utils.h"
|
||||
#include "coord.h"
|
||||
#include "area.h"
|
||||
|
||||
|
||||
+using namespace std;
|
||||
|
||||
Size Area::operator - (const Area &other) const {
|
||||
assert ((shape == AR_RECT) && (other.shape == AR_RECT));
|
@ -1,11 +0,0 @@
|
||||
--- cmn/coord.h.orig 2012-05-27 06:52:31.000000000 +0900
|
||||
+++ cmn/coord.h 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -619,7 +619,7 @@
|
||||
int enemiesInitial; // enemies on first level
|
||||
int enemiesIncr; // this many more enemies each level
|
||||
int enemiesMax; // maximum number of enemies (for levels)
|
||||
- char *name; // of this difficulty level
|
||||
+ const char *name; // of this difficulty level
|
||||
};
|
||||
enum {DIFF_TRIVIAL,DIFF_NORMAL,DIFF_HARD,DIFF_BEND_OVER,
|
||||
DIFFICULTY_LEVELS_NUM, DIFF_NONE=DIFFICULTY_LEVELS_NUM};
|
@ -1,577 +0,0 @@
|
||||
--- cmn/game.cpp.orig 2012-05-27 06:52:29.000000000 +0900
|
||||
+++ cmn/game.cpp 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -31,16 +31,17 @@
|
||||
#include "stdafx.h"
|
||||
extern "C" {
|
||||
#include <string.h>
|
||||
+#include <stdlib.h>
|
||||
}
|
||||
|
||||
#if X11
|
||||
-#include <strstream.h>
|
||||
+#include <sstream>
|
||||
#endif
|
||||
#if WIN32
|
||||
#include <strstrea.h>
|
||||
#endif
|
||||
|
||||
-#include <iomanip.h>
|
||||
+#include <iomanip>
|
||||
|
||||
#include "utils.h"
|
||||
#include "coord.h"
|
||||
@@ -123,7 +124,7 @@
|
||||
#define SOUNDONOFF_DEFAULT True
|
||||
|
||||
|
||||
-char *Game::wittySayings[Game::WITTY_SAYINGS_NUM] = {
|
||||
+const char *Game::wittySayings[Game::WITTY_SAYINGS_NUM] = {
|
||||
"If it moves it's a threat. If it doesn't move it's a potential threat.",
|
||||
"Happy, happy. Joy, joy.",
|
||||
"For the mother country!!!",
|
||||
@@ -271,11 +272,19 @@
|
||||
"Prepare to Qualify.",
|
||||
"I got a bad feeling about this drop.",
|
||||
"Cowboys never quit!",
|
||||
+ "The voices say I'm not crazy, so I'm OK!",
|
||||
+ "Cure Sars!?!",
|
||||
+ "Ha Ha Ha, Loser!",
|
||||
+ "It's all fun and games until someone loses an eye.",
|
||||
+ "Eye for an eye, tooth for a tooth.",
|
||||
+ "Mo-o-m!",
|
||||
+ "Timmy's touching me!",
|
||||
+ "I'm not touching you! See? I'm not touching you!"
|
||||
};
|
||||
|
||||
|
||||
|
||||
-char *Game::intelNames[Game::INTEL_NAMES_NUM] = {
|
||||
+const char *Game::intelNames[Game::INTEL_NAMES_NUM] = {
|
||||
"Dr. Pain",
|
||||
"Steve",
|
||||
"hardts",
|
||||
@@ -350,6 +359,9 @@
|
||||
"Stan",
|
||||
"Mr. Hat",
|
||||
"Cid",
|
||||
+ "Mr. Hankey",
|
||||
+ "Michael Jackson",
|
||||
+ "O.J. Simpson"
|
||||
};
|
||||
|
||||
|
||||
@@ -793,7 +805,7 @@
|
||||
|
||||
// Just for tracing in the debugger.
|
||||
char* version = Utils::get_OS_info();
|
||||
- delete version;
|
||||
+ delete [] version;
|
||||
|
||||
noUi = False;
|
||||
noNewLevel = False;
|
||||
@@ -1056,7 +1068,7 @@
|
||||
|
||||
Game::~Game() {
|
||||
if (oneItem) {
|
||||
- delete oneItem;
|
||||
+ delete [] oneItem;
|
||||
}
|
||||
|
||||
delete ui;
|
||||
@@ -1500,13 +1512,13 @@
|
||||
|
||||
if (mask & UIconnectServer) {
|
||||
delete role;
|
||||
- ostrstream portName;
|
||||
- portName << settings.connectPort << ends;
|
||||
+ stringstream portName;
|
||||
+ portName << settings.connectPort;
|
||||
IViewportInfo* vInfo = Ui::get_viewport_info();
|
||||
- ClientP client = new Client(settings.connectHostname,portName.str(),
|
||||
+ ClientP client = new Client(settings.connectHostname,
|
||||
+ Utils::strdup(portName.str().c_str()),
|
||||
0,settings.humanName,vInfo,
|
||||
Connection::ADJUST_SKIP,&locator);
|
||||
- delete portName.str();
|
||||
assert(client);
|
||||
role = client;
|
||||
ui->set_role_type(role->get_type());
|
||||
@@ -1544,10 +1556,9 @@
|
||||
}
|
||||
|
||||
delete role;
|
||||
- ostrstream portName;
|
||||
- portName << settings.serverPort << ends;
|
||||
- role = new Server(settings.localHuman,portName.str(),&locator);
|
||||
- delete portName.str();
|
||||
+ stringstream portName;
|
||||
+ portName << settings.serverPort;
|
||||
+ role = new Server(settings.localHuman,portName.str().c_str(),&locator);
|
||||
assert(role);
|
||||
restartEnd = RE_RESTART;
|
||||
ui->set_role_type(role->get_type());
|
||||
@@ -1573,9 +1584,9 @@
|
||||
ui->set_style(styleType);
|
||||
}
|
||||
|
||||
- ostrstream str;
|
||||
+ stringstream str;
|
||||
styleNext->describe(str);
|
||||
- locator.message_enq(str.str());
|
||||
+ locator.message_enq(Utils::strdup(str.str().c_str()));
|
||||
}
|
||||
|
||||
|
||||
@@ -1589,9 +1600,9 @@
|
||||
human->reincarnate();
|
||||
obj->set_intel(human);
|
||||
|
||||
- ostrstream msg;
|
||||
- msg << human->get_name() << " is back from the dead." << ends;
|
||||
- locator.message_enq(msg.str());
|
||||
+ stringstream msg;
|
||||
+ msg << human->get_name() << " is back from the dead.";
|
||||
+ locator.message_enq(Utils::strdup(msg.str().c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1615,7 +1626,7 @@
|
||||
void Game::new_level_check(int enemiesPlaying) {
|
||||
assert(state == gameOn);
|
||||
|
||||
- ostrstream str;
|
||||
+ stringstream str;
|
||||
Boolean lStrChanged = False;
|
||||
int val = style->new_level_check(enemiesPlaying,&world,&locator,
|
||||
level,lStrChanged,str,timer,
|
||||
@@ -1645,11 +1656,8 @@
|
||||
// if str has anything in it. Fucking Linux compilers.
|
||||
if (lStrChanged) {
|
||||
if (ui) {
|
||||
- ui->set_level(str.str());
|
||||
+ ui->set_level(str.str().c_str());
|
||||
}
|
||||
- // Ok to delete even if ui is NULL, str.str() will allocate the memory to
|
||||
- // kill off.
|
||||
- delete str.str();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1841,7 +1849,7 @@
|
||||
|
||||
|
||||
|
||||
-char *Game::choose_ranking(int kills) {
|
||||
+const char *Game::choose_ranking(int kills) {
|
||||
// Figure out the ranking set, they are listed in order.
|
||||
int setNum = 0;
|
||||
assert(kills >= 0 && rankingSets[0].killsMin == 0);
|
||||
@@ -1876,7 +1884,7 @@
|
||||
if (showMessages) {
|
||||
for (int n = 0; n < locator.humans_registered(); n++) {
|
||||
HumanP human = locator.get_human(n);
|
||||
- ostrstream msg;
|
||||
+ stringstream msg;
|
||||
|
||||
// Soups are only taken into account if you have unlimited lives.
|
||||
int totalKills;
|
||||
@@ -1894,11 +1902,11 @@
|
||||
totalKills = human->get_human_kills() + human->get_enemy_kills();
|
||||
}
|
||||
|
||||
- char *ranking = choose_ranking(totalKills);
|
||||
+ const char *ranking = choose_ranking(totalKills);
|
||||
msg << totalKills << (totalKills == 1 ? "Kill" : " Kills")
|
||||
- << ", Rank: " << ranking << ends;
|
||||
+ << ", Rank: " << ranking;
|
||||
IntelId humanIntelId = human->get_intel_id();
|
||||
- locator.arena_message_enq(msg.str(),&humanIntelId,10000);
|
||||
+ locator.arena_message_enq(Utils::strdup(msg.str().c_str()),&humanIntelId,10000);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1919,8 +1927,8 @@
|
||||
// Will clean out non-persistent teams.
|
||||
locator.level_reset();
|
||||
|
||||
- ostrstream lStr; // For level box on the side of the ui->
|
||||
- ostrstream lTitleStr; // For Ui title screen.
|
||||
+ stringstream lStr; // For level box on the side of the ui->
|
||||
+ stringstream lTitleStr; // For Ui title screen.
|
||||
Boolean doBonus;
|
||||
|
||||
// Possibly increment level count number.
|
||||
@@ -1960,7 +1968,7 @@
|
||||
if (doBonus) {
|
||||
delete levelTitleStored; // If it already exists.
|
||||
// Store levelTitle string for later use.
|
||||
- levelTitleStored = lTitleStr.str();
|
||||
+ levelTitleStored = Utils::strdup(lTitleStr.str().c_str());
|
||||
|
||||
// Tell user about the bonus.
|
||||
award_bonuses_now();
|
||||
@@ -1970,13 +1978,12 @@
|
||||
}
|
||||
// Go to getBearings state.
|
||||
else {
|
||||
- get_bearings(lTitleStr.str());
|
||||
+ get_bearings(Utils::strdup(lTitleStr.str().c_str()));
|
||||
}
|
||||
|
||||
if (ui) {
|
||||
- ui->set_level(lStr.str());
|
||||
+ ui->set_level(lStr.str().c_str());
|
||||
}
|
||||
- delete lStr.str();
|
||||
|
||||
// Will pass in more info later.
|
||||
role->new_level(this,&world,&locator);
|
||||
@@ -1997,7 +2004,7 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
- char* awardMsg = NULL;
|
||||
+ const char* awardMsg = NULL;
|
||||
int count = 0;
|
||||
while (!awardMsg && count < AWARD_BONUS_TRIES) {
|
||||
count++;
|
||||
@@ -2184,9 +2191,9 @@
|
||||
|
||||
// Moved resetting world rooms to new_level();
|
||||
|
||||
- ostrstream msg;
|
||||
- msg << wittySayings[Utils::choose(WITTY_SAYINGS_NUM)] << ends;
|
||||
- locator.message_enq(msg.str());
|
||||
+ stringstream msg;
|
||||
+ msg << wittySayings[Utils::choose(WITTY_SAYINGS_NUM)];
|
||||
+ locator.message_enq(Utils::strdup(msg.str().c_str()));
|
||||
|
||||
/* Don't need to call Ui::set_* because the new values originally came
|
||||
from ui-> */
|
||||
@@ -2242,41 +2249,39 @@
|
||||
{ // Right keys.
|
||||
right[n][which] = 0;
|
||||
|
||||
- ostrstream strm;
|
||||
+ stringstream strm;
|
||||
if (which == 0)
|
||||
- strm << "right_" << keysNames[n] << ends;
|
||||
+ strm << "right_" << keysNames[n];
|
||||
else
|
||||
- strm << "right_" << keysNames[n] << "_2" << ends;
|
||||
- char *option = strm.str();
|
||||
+ strm << "right_" << keysNames[n] << "_2";
|
||||
+ const string & option = strm.str();
|
||||
|
||||
// Should we free value??
|
||||
- char *value = XGetDefault(ui->get_dpy(0),XEVIL_CLASS,option);
|
||||
+ char *value = XGetDefault(ui->get_dpy(0),XEVIL_CLASS,option.c_str());
|
||||
if (value) {
|
||||
KeySym keysym = XStringToKeysym(value);
|
||||
if (keysym != NoSymbol)
|
||||
right[n][which] = keysym;
|
||||
}
|
||||
- delete option;
|
||||
}
|
||||
|
||||
{ // Left Keys.
|
||||
left[n][which] = 0;
|
||||
|
||||
- ostrstream strm;
|
||||
+ stringstream strm;
|
||||
if (which == 0)
|
||||
- strm << "left_" << keysNames[n] << ends;
|
||||
+ strm << "left_" << keysNames[n];
|
||||
else
|
||||
- strm << "left_" << keysNames[n] << "_2" << ends;
|
||||
- char *option = strm.str();
|
||||
+ strm << "left_" << keysNames[n] << "_2";
|
||||
+ const string & option = strm.str();
|
||||
|
||||
// Should we free value??
|
||||
- char *value = XGetDefault(ui->get_dpy(0),XEVIL_CLASS,option);
|
||||
+ char *value = XGetDefault(ui->get_dpy(0),XEVIL_CLASS,option.c_str());
|
||||
if (value) {
|
||||
KeySym keysym = XStringToKeysym(value);
|
||||
if (keysym != NoSymbol)
|
||||
left[n][which] = keysym;
|
||||
}
|
||||
- delete option;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2291,10 +2296,10 @@
|
||||
void Game::parse_args(int *argc,char **argv) {
|
||||
// Create a bunch of "-name<x>" strings for comparing with command-line
|
||||
// args.
|
||||
- ostrstream dashName[Locator::HUMANS_MAX];
|
||||
+ stringstream dashName[Locator::HUMANS_MAX];
|
||||
int n;
|
||||
for (n = 0; n < Locator::HUMANS_MAX; n++) {
|
||||
- dashName[n] << "-name" << n << ends;
|
||||
+ dashName[n] << "-name" << n;
|
||||
}
|
||||
|
||||
// Defaults
|
||||
@@ -2351,7 +2356,7 @@
|
||||
// Check "-name<x>" arguments.
|
||||
else {
|
||||
for (int j = 0; j < Locator::HUMANS_MAX; j++) {
|
||||
- if ((! strcmp(dashName[j].str(),argv[n])) && (n + 1 < *argc)) {
|
||||
+ if ((! strcmp(dashName[j].str().c_str(),argv[n])) && (n + 1 < *argc)) {
|
||||
humanNames[j] = Utils::strdup(argv[n+1]);
|
||||
n++;
|
||||
}
|
||||
@@ -2728,12 +2733,6 @@
|
||||
n++;
|
||||
}
|
||||
} // for
|
||||
-
|
||||
-
|
||||
- // Delete memory for "-name" strings.
|
||||
- for (n = 0; n < Locator::HUMANS_MAX; n++) {
|
||||
- delete dashName[n].str();
|
||||
- }
|
||||
}
|
||||
|
||||
|
||||
@@ -2741,15 +2740,15 @@
|
||||
char **Game::display_names(int *argc,char **argv) {
|
||||
|
||||
#if X11
|
||||
- ostrstream dashDisplay[UI_VIEWPORTS_MAX][2];
|
||||
+ stringstream dashDisplay[UI_VIEWPORTS_MAX][2];
|
||||
char **displayNames = new charP [UI_VIEWPORTS_MAX];
|
||||
|
||||
int n;
|
||||
for (n = 0; n < UI_VIEWPORTS_MAX; n++) {
|
||||
displayNames[n] = new char [Xvars::DISPLAY_NAME_LENGTH];
|
||||
strcpy(displayNames[n],"");
|
||||
- dashDisplay[n][0] << "-display" << n << ends;
|
||||
- dashDisplay[n][1] << "-d" << n << ends;
|
||||
+ dashDisplay[n][0] << "-display" << n;
|
||||
+ dashDisplay[n][1] << "-d" << n;
|
||||
}
|
||||
|
||||
// Loop through all command line arguments.
|
||||
@@ -2765,7 +2764,7 @@
|
||||
// Set display name for one viewport.
|
||||
for (int m = 0; m < UI_VIEWPORTS_MAX; m++) {
|
||||
for (int which = 0; which < 2; which++) {
|
||||
- if (!strcmp(argv[n],dashDisplay[m][which].str())) {
|
||||
+ if (!strcmp(argv[n],dashDisplay[m][which].str().c_str())) {
|
||||
assert(strlen(argv[n+1]) < Xvars::DISPLAY_NAME_LENGTH);
|
||||
strcpy(displayNames[m],argv[n+1]);
|
||||
}
|
||||
@@ -2773,11 +2772,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- for (n = 0; n < UI_VIEWPORTS_MAX; n++) {
|
||||
- for (int which = 0; which < 2; which++) {
|
||||
- delete dashDisplay[n][which].str();
|
||||
- }
|
||||
- }
|
||||
return displayNames;
|
||||
#endif
|
||||
|
||||
@@ -2890,7 +2884,7 @@
|
||||
assert(role->get_type() != R_CLIENT);
|
||||
|
||||
// Choose random name if -name was not specified for this player.
|
||||
- char *nameNonPc =
|
||||
+ const char *nameNonPc =
|
||||
Utils::strlen(humanNames[h]) ?
|
||||
humanNames[h] :
|
||||
intelNames[intelNamesIndices[h % INTEL_NAMES_NUM]];
|
||||
@@ -2954,13 +2948,12 @@
|
||||
|
||||
// Put message in the status bar when the game starts up.
|
||||
// Use \n in string for locator.message_enq.
|
||||
- ostrstream msg;
|
||||
+ stringstream msg;
|
||||
msg
|
||||
<< "XEvil(TM) " << VERSION
|
||||
<< " http://www.xevil.com satan@xevil.com " << XETP::versionStr << "\n"
|
||||
- << "Copyright(C) 1994,2000 Steve Hardt and Michael Judge"
|
||||
- << ends;
|
||||
- locator.message_enq(msg.str());
|
||||
+ << "Copyright(C) 1994,2000 Steve Hardt and Michael Judge";
|
||||
+ locator.message_enq(Utils::strdup(msg.str().c_str()));
|
||||
|
||||
|
||||
// Print message to standard out. Doesn't really do anything on Windows.
|
||||
@@ -3075,11 +3068,10 @@
|
||||
IntelOptions ops;
|
||||
ITmask opMask = intel_options_for(ops,obj->get_class_id());
|
||||
|
||||
- ostrstream name;
|
||||
- name << "Machine-" << (enemyNameCount++) << ends;
|
||||
- EnemyP enemy = new Enemy(&world,&locator,name.str(),&ops,opMask);
|
||||
+ stringstream name;
|
||||
+ name << "Machine-" << (enemyNameCount++);
|
||||
+ EnemyP enemy = new Enemy(&world,&locator,name.str().c_str(),&ops,opMask);
|
||||
assert(enemy);
|
||||
- delete name.str();
|
||||
locator.register_enemy(enemy);
|
||||
|
||||
if (addToLocator) {
|
||||
@@ -3235,14 +3227,13 @@
|
||||
switch (Utils::choose(8)) {
|
||||
case 0: { // A bunch of Heros and an Alien.
|
||||
for (int n = 0; n < 10; n++) {
|
||||
- ostrstream name;
|
||||
- name << "Enemy-" << n << ends;
|
||||
+ stringstream name;
|
||||
+ name << "Enemy-" << n;
|
||||
IntelOptions ops;
|
||||
ops.harmless = True;
|
||||
- EnemyP enemy = new Enemy(&world,&locator,name.str(),
|
||||
+ EnemyP enemy = new Enemy(&world,&locator,name.str().c_str(),
|
||||
&ops,ITharmless);
|
||||
assert(enemy);
|
||||
- delete name.str();
|
||||
locator.register_enemy(enemy);
|
||||
|
||||
Pos pos = world.empty_rect(Hero::get_size_max());
|
||||
@@ -3268,16 +3259,15 @@
|
||||
|
||||
case 1: { // Hero, FThrower, and a bunch of Frogs (does not mean Frenchmen).
|
||||
for (int n = 0; n < 15; n++) {
|
||||
- ostrstream name;
|
||||
- name << "Enemy-" << n << ends;
|
||||
+ stringstream name;
|
||||
+ name << "Enemy-" << n;
|
||||
IntelOptions ops;
|
||||
ops.psychotic = Utils::coin_flip();
|
||||
- EnemyP enemy = new Enemy(&world,&locator,name.str(),
|
||||
+ EnemyP enemy = new Enemy(&world,&locator,name.str().c_str(),
|
||||
&ops,ITpsychotic);
|
||||
assert(enemy);
|
||||
- delete name.str();
|
||||
locator.register_enemy(enemy);
|
||||
-
|
||||
+
|
||||
Pos pos = world.empty_rect(Frog::get_size_max());
|
||||
PhysicalP obj = new Frog(&world,&locator,pos);
|
||||
assert(obj);
|
||||
@@ -3304,15 +3294,14 @@
|
||||
case 2: { // A bunch of Enforcers.
|
||||
for (int n = 0; n < 10; n++)
|
||||
{
|
||||
- ostrstream name;
|
||||
- name << "Enemy-" << n << ends;
|
||||
+ stringstream name;
|
||||
+ name << "Enemy-" << n;
|
||||
IntelOptions ops;
|
||||
ops.classFriends = False;
|
||||
ops.psychotic = True;
|
||||
- EnemyP enemy = new Enemy(&world,&locator,name.str(),
|
||||
+ EnemyP enemy = new Enemy(&world,&locator,name.str().c_str(),
|
||||
&ops,ITclassFriends|ITpsychotic);
|
||||
assert(enemy);
|
||||
- delete name.str();
|
||||
locator.register_enemy(enemy);
|
||||
|
||||
Pos pos = world.empty_rect(Enforcer::get_size_max());
|
||||
@@ -3327,14 +3316,13 @@
|
||||
|
||||
case 3: { // A bunch of Ninjas and a chainsaw.
|
||||
for (int n = 0; n < 10; n++) {
|
||||
- ostrstream name;
|
||||
- name << "Enemy-" << n << ends;
|
||||
+ stringstream name;
|
||||
+ name << "Enemy-" << n;
|
||||
IntelOptions ops;
|
||||
ops.classFriends = False;
|
||||
- EnemyP enemy = new Enemy(&world,&locator,name.str(),
|
||||
+ EnemyP enemy = new Enemy(&world,&locator,name.str().c_str(),
|
||||
&ops,ITclassFriends);
|
||||
assert(enemy);
|
||||
- delete name.str();
|
||||
locator.register_enemy(enemy);
|
||||
|
||||
Pos pos = world.empty_rect(Ninja::get_size_max());
|
||||
@@ -3373,12 +3361,11 @@
|
||||
}
|
||||
|
||||
for (int m = 0; m < 10; m++) {
|
||||
- ostrstream name;
|
||||
- name << "Enemy-" << m << ends;
|
||||
- EnemyP enemy = new Enemy(&world,&locator,name.str(),
|
||||
+ stringstream name;
|
||||
+ name << "Enemy-" << m;
|
||||
+ EnemyP enemy = new Enemy(&world,&locator,name.str().c_str(),
|
||||
NULL,ITnone);
|
||||
assert(enemy);
|
||||
- delete name.str();
|
||||
locator.register_enemy(enemy);
|
||||
|
||||
Pos pos = world.empty_rect(Hero::get_size_max());
|
||||
@@ -3414,14 +3401,13 @@
|
||||
case 5: { // Ninjas and ChopperBoys.
|
||||
int n;
|
||||
for (n = 0; n < 10; n++) {
|
||||
- ostrstream name;
|
||||
- name << "Enemy-" << n << ends;
|
||||
+ stringstream name;
|
||||
+ name << "Enemy-" << n;
|
||||
IntelOptions ops;
|
||||
ops.classFriends = False;
|
||||
- EnemyP enemy = new Enemy(&world,&locator,name.str(),
|
||||
+ EnemyP enemy = new Enemy(&world,&locator,name.str().c_str(),
|
||||
&ops,ITclassFriends);
|
||||
assert(enemy);
|
||||
- delete name.str();
|
||||
locator.register_enemy(enemy);
|
||||
|
||||
PhysicalP obj;
|
||||
@@ -3458,11 +3444,10 @@
|
||||
// and the scenario isn't set up yet.
|
||||
|
||||
for (n = 0; n < 9; n++) {
|
||||
- ostrstream name;
|
||||
- name << "Dog-" << n << ends;
|
||||
- EnemyP intel = new Enemy(&world,&locator,name.str(),NULL,ITnone);
|
||||
+ stringstream name;
|
||||
+ name << "Dog-" << n;
|
||||
+ EnemyP intel = new Enemy(&world,&locator,name.str().c_str(),NULL,ITnone);
|
||||
assert(intel);
|
||||
- delete name.str();
|
||||
locator.register_enemy(intel);
|
||||
|
||||
Pos pos = world.empty_rect(Dog::get_size_max());
|
||||
@@ -3473,13 +3458,12 @@
|
||||
}
|
||||
|
||||
for (n = 0; n < 3; n++) {
|
||||
- ostrstream name;
|
||||
- name << "Enemy-" << n << ends;
|
||||
+ stringstream name;
|
||||
+ name << "Enemy-" << n;
|
||||
IntelOptions ops;
|
||||
ops.harmless = True;
|
||||
- EnemyP enemy = new Enemy(&world,&locator,name.str(),&ops,ITharmless);
|
||||
+ EnemyP enemy = new Enemy(&world,&locator,name.str().c_str(),&ops,ITharmless);
|
||||
assert(enemy);
|
||||
- delete name.str();
|
||||
locator.register_enemy(enemy);
|
||||
|
||||
PhysicalP obj;
|
||||
@@ -3510,13 +3494,12 @@
|
||||
Segmented::create_and_add_composite(ret,&world,&locator,Dragon::SEGMENTS_NUM,pos,
|
||||
Dragon::create,NULL);
|
||||
for (int m = 0; m < ret.length(); m++) {
|
||||
- ostrstream name;
|
||||
- name << "Enemy-" << n << ends;
|
||||
+ stringstream name;
|
||||
+ name << "Enemy-" << n;
|
||||
IntelOptions ops;
|
||||
ops.harmless = True;
|
||||
- EnemyP enemy = new Enemy(&world,&locator,name.str(),&ops,ITharmless);
|
||||
+ EnemyP enemy = new Enemy(&world,&locator,name.str().c_str(),&ops,ITharmless);
|
||||
assert(enemy);
|
||||
- delete name.str();
|
||||
locator.register_enemy(enemy);
|
||||
PhysicalP p = (PhysicalP)ret.get(m);
|
||||
p->set_intel(enemy);
|
@ -1,51 +0,0 @@
|
||||
--- cmn/game.h.orig 2012-05-27 06:52:31.000000000 +0900
|
||||
+++ cmn/game.h 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -35,7 +35,7 @@
|
||||
extern "C" {
|
||||
#include <time.h>
|
||||
}
|
||||
-#include <iostream.h>
|
||||
+#include <iostream>
|
||||
#include "utils.h"
|
||||
#include "ui.h"
|
||||
#include "world.h"
|
||||
@@ -136,7 +136,7 @@
|
||||
struct RankingSet {
|
||||
enum {RANKING_SET_MAX = 8}; // Max number of rankings in a set.
|
||||
int killsMin; // Min number of kills to get this rank.
|
||||
- char *rankings[RANKING_SET_MAX + 1]; // Extra for NULL.
|
||||
+ const char *rankings[RANKING_SET_MAX + 1]; // Extra for NULL.
|
||||
};
|
||||
|
||||
|
||||
@@ -268,8 +268,8 @@
|
||||
|
||||
private:
|
||||
enum {
|
||||
- WITTY_SAYINGS_NUM = 147,
|
||||
- INTEL_NAMES_NUM = 74,
|
||||
+ WITTY_SAYINGS_NUM = 155,
|
||||
+ INTEL_NAMES_NUM = 77,
|
||||
RANKING_SETS_NUM = 12,
|
||||
};
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
static Boolean potential_enemy_filter(const PhysicalContext* pc,void*);
|
||||
/* EFFECTS: Filter those classes whose potentialEnemy flag is True. */
|
||||
|
||||
- char *choose_ranking(int kills);
|
||||
+ const char *choose_ranking(int kills);
|
||||
/* EFFECTS: Choose a rank for the player at the end of game based on the
|
||||
number of kills. */
|
||||
|
||||
@@ -412,8 +412,8 @@
|
||||
SoundName currentSoundName;
|
||||
//keeps track of current sound track being played: can be 0
|
||||
|
||||
- static char *wittySayings[WITTY_SAYINGS_NUM];
|
||||
- static char *intelNames[INTEL_NAMES_NUM];
|
||||
+ static const char *wittySayings[WITTY_SAYINGS_NUM];
|
||||
+ static const char *intelNames[INTEL_NAMES_NUM];
|
||||
static DifficultyLevel difficultyLevels[DIFFICULTY_LEVELS_NUM];
|
||||
static RankingSet rankingSets[RANKING_SETS_NUM];
|
||||
|
@ -1,911 +0,0 @@
|
||||
--- cmn/game_style.cpp.orig 2012-05-27 06:52:29.000000000 +0900
|
||||
+++ cmn/game_style.cpp 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -33,15 +33,9 @@
|
||||
#include <string.h>
|
||||
}
|
||||
|
||||
-#if X11
|
||||
-#include <strstream.h>
|
||||
-#endif
|
||||
-
|
||||
-#if WIN32
|
||||
-#include <strstrea.h>
|
||||
-#endif
|
||||
+#include <sstream>
|
||||
|
||||
-#include <iomanip.h>
|
||||
+#include <iomanip>
|
||||
#include "utils.h"
|
||||
#include "coord.h"
|
||||
#include "world.h"
|
||||
@@ -109,13 +103,13 @@
|
||||
/* DEFAULT: True */
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP) = 0;
|
||||
|
||||
virtual void setup_world(WorldP,LocatorP,const DifficultyLevel &) = 0;
|
||||
virtual void new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int humansNum) = 0;
|
||||
/* EFFECTS: These two functions start a new level in a scenario. setup_world() should
|
||||
just setup the map and size of the world. new_level() is called after world.reset()
|
||||
@@ -158,13 +152,13 @@
|
||||
virtual ScenarioType get_scenario_type() {return EXTERMINATE;}
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
|
||||
virtual void setup_world(WorldP,LocatorP,const DifficultyLevel &);
|
||||
virtual void new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int humansNum);
|
||||
|
||||
|
||||
@@ -183,13 +177,13 @@
|
||||
virtual Boolean can_refill_game_objects();
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
|
||||
virtual void setup_world(WorldP,LocatorP,const DifficultyLevel &);
|
||||
virtual void new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int humansNum);
|
||||
|
||||
virtual void new_level_set_timer(Timer &timer);
|
||||
@@ -209,7 +203,7 @@
|
||||
virtual ScenarioType get_scenario_type() {return HIVE;}
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
|
||||
virtual Boolean award_bonus();
|
||||
@@ -218,7 +212,7 @@
|
||||
virtual void setup_world(WorldP,LocatorP,const DifficultyLevel &);
|
||||
virtual void new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int humansNum);
|
||||
|
||||
virtual void refill_enemies(Boolean enemiesRefill,WorldP,LocatorP,IPhysicalManagerP);
|
||||
@@ -242,13 +236,13 @@
|
||||
virtual ScenarioType get_scenario_type() {return CAPTURE_THE_FLAG;}
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
|
||||
virtual void setup_world(WorldP,LocatorP,const DifficultyLevel &);
|
||||
virtual void new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int humansNum);
|
||||
|
||||
virtual void refill_enemies(Boolean enemiesRefill,WorldP,LocatorP,IPhysicalManagerP);
|
||||
@@ -269,7 +263,7 @@
|
||||
virtual void setup_world(WorldP,LocatorP,const DifficultyLevel &);
|
||||
virtual void new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int humansNum);
|
||||
|
||||
virtual Boolean advance_level();
|
||||
@@ -292,7 +286,7 @@
|
||||
|
||||
virtual Boolean (*get_team())(LocatorP,PhysicalP,PhysicalP) = 0;
|
||||
|
||||
- virtual void set_level_strings(int level,ostrstream &lStr,ostrstream &lTitleStr) = 0;
|
||||
+ virtual void set_level_strings(int level,stringstream &lStr,stringstream &lTitleStr) = 0;
|
||||
/* EFFECTS: Called in new_level() to set the appropriate messages. */
|
||||
|
||||
|
||||
@@ -311,7 +305,7 @@
|
||||
virtual ScenarioType get_scenario_type() {return SEALS;}
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
|
||||
virtual Boolean award_bonus();
|
||||
@@ -323,7 +317,7 @@
|
||||
#endif
|
||||
virtual Boolean (*get_team())(LocatorP,PhysicalP,PhysicalP);
|
||||
|
||||
- virtual void set_level_strings(int level,ostrstream &lStr,ostrstream &lTitleStr);
|
||||
+ virtual void set_level_strings(int level,stringstream &lStr,stringstream &lTitleStr);
|
||||
|
||||
|
||||
private:
|
||||
@@ -342,7 +336,7 @@
|
||||
virtual ScenarioType get_scenario_type() {return ANTI_SEALS;}
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
|
||||
|
||||
@@ -351,7 +345,7 @@
|
||||
#endif
|
||||
virtual Boolean (*get_team())(LocatorP,PhysicalP,PhysicalP);
|
||||
|
||||
- virtual void set_level_strings(int level,ostrstream &lStr,ostrstream &lTitleStr);
|
||||
+ virtual void set_level_strings(int level,stringstream &lStr,stringstream &lTitleStr);
|
||||
|
||||
|
||||
private:
|
||||
@@ -369,13 +363,13 @@
|
||||
virtual SoundName get_midisoundtrack(){return SoundNames::FIRE_SOUNDTRACK;}
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
|
||||
virtual void setup_world(WorldP,LocatorP,const DifficultyLevel &);
|
||||
virtual void new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int humansNum);
|
||||
|
||||
virtual Boolean award_bonus();
|
||||
@@ -391,13 +385,13 @@
|
||||
virtual ScenarioType get_scenario_type() {return KILL_THE_DRAGON;}
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
|
||||
virtual void setup_world(WorldP,LocatorP,const DifficultyLevel &);
|
||||
virtual void new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int humansNum);
|
||||
|
||||
virtual SoundName get_midisoundtrack(){return SoundNames::FIRE_SOUNDTRACK;}
|
||||
@@ -419,13 +413,13 @@
|
||||
virtual Pos human_initial_pos(WorldP,LocatorP,const Size &s);
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
|
||||
virtual void setup_world(WorldP,LocatorP,const DifficultyLevel &);
|
||||
virtual void new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int humansNum);
|
||||
|
||||
virtual void refill_enemies(Boolean enemiesRefill,WorldP,LocatorP,IPhysicalManagerP);
|
||||
@@ -447,13 +441,13 @@
|
||||
virtual ScenarioType get_scenario_type() {return THE_POUND;}
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
|
||||
virtual void setup_world(WorldP,LocatorP,const DifficultyLevel &);
|
||||
virtual void new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int humansNum);
|
||||
};
|
||||
|
||||
@@ -466,13 +460,13 @@
|
||||
virtual ScenarioType get_scenario_type() {return JAPAN_TOWN;}
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
|
||||
virtual void setup_world(WorldP,LocatorP,const DifficultyLevel &);
|
||||
virtual void new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int humansNum);
|
||||
|
||||
virtual void filter_weapons_and_other_items(LocatorP,int &weaponsNum,
|
||||
@@ -581,7 +575,7 @@
|
||||
|
||||
|
||||
int GameStyle::new_level_check(int,WorldP,LocatorP,
|
||||
- int,Boolean &,ostrstream &,Timer &timer,
|
||||
+ int,Boolean &,stringstream &,Timer &timer,
|
||||
IPhysicalManagerP) {
|
||||
// A timer-based level.
|
||||
if (timer.ready()) {
|
||||
@@ -791,8 +785,8 @@
|
||||
|
||||
|
||||
|
||||
-void Normal::describe(ostrstream &str) {
|
||||
- str << "Complete each level/scenario to proceed to the next one." << ends;
|
||||
+void Normal::describe(stringstream &str) {
|
||||
+ str << "Complete each level/scenario to proceed to the next one.";
|
||||
}
|
||||
|
||||
|
||||
@@ -852,7 +846,7 @@
|
||||
|
||||
|
||||
int Normal::new_level_check(int enemiesPlaying,WorldP w,LocatorP l,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP manager) {
|
||||
GameStyleP delegate = get_delegate();
|
||||
return delegate->new_level_check(enemiesPlaying,w,l,level,lStrChanged,levelStr,timer,manager);
|
||||
@@ -876,7 +870,7 @@
|
||||
|
||||
void Normal::new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int humansNum) {
|
||||
// Choose which delegate to use.
|
||||
if (level % NORMAL_SCENARIOS_FREQUENCY == 0) {
|
||||
@@ -934,11 +928,10 @@
|
||||
|
||||
|
||||
|
||||
-void Levels::describe(ostrstream &str) {
|
||||
+void Levels::describe(stringstream &str) {
|
||||
str << "Human player(s) fights through increasing levels of "
|
||||
<< "difficulty." << "\n"
|
||||
- << "To complete a level you must kill all enemy players."
|
||||
- << ends;
|
||||
+ << "To complete a level you must kill all enemy players.";
|
||||
}
|
||||
|
||||
|
||||
@@ -969,7 +962,7 @@
|
||||
|
||||
|
||||
int Levels::new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int,Boolean &,ostrstream &,Timer &,
|
||||
+ int,Boolean &,stringstream &,Timer &,
|
||||
IPhysicalManagerP) {
|
||||
if (enemiesPlaying == 0) {
|
||||
return 1;
|
||||
@@ -983,7 +976,7 @@
|
||||
|
||||
void Levels::new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int) {
|
||||
world->reset();
|
||||
|
||||
@@ -991,8 +984,8 @@
|
||||
clean_physicals(False,world,locator,manager);
|
||||
|
||||
|
||||
- lTitleStr << "[" << level << "] Kill All Machines" << ends;
|
||||
- lStr << "Level: " << level << ends;
|
||||
+ lTitleStr << "[" << level << "] Kill All Machines";
|
||||
+ lStr << "Level: " << level;
|
||||
|
||||
enemiesNum += dLevel.enemiesIncr;
|
||||
enemiesNum = Utils::minimum(enemiesNum,dLevel.enemiesMax);
|
||||
@@ -1037,8 +1030,8 @@
|
||||
|
||||
|
||||
|
||||
-void KillKillKill::describe(ostrstream &str) {
|
||||
- str << "Every human and machine for him/her/itself." << ends;
|
||||
+void KillKillKill::describe(stringstream &str) {
|
||||
+ str << "Every human and machine for him/her/itself.";
|
||||
}
|
||||
|
||||
|
||||
@@ -1095,15 +1088,15 @@
|
||||
|
||||
void KillKillKill::new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int) {
|
||||
world->reset();
|
||||
|
||||
// Don't wipe out the Enemies.
|
||||
clean_physicals(True,world,locator,manager);
|
||||
|
||||
- lTitleStr << "Level: " << level << ends;
|
||||
- lStr << "Level: " << level << ends;
|
||||
+ lTitleStr << "Level: " << level;
|
||||
+ lStr << "Level: " << level;
|
||||
|
||||
// Only create enemies first time or if enemiesRefill is set.
|
||||
if (justReset) {
|
||||
@@ -1152,9 +1145,9 @@
|
||||
|
||||
|
||||
|
||||
-void Duel::describe(ostrstream &str) {
|
||||
+void Duel::describe(stringstream &str) {
|
||||
str << "Human vs. human battle to the death."
|
||||
- << "\n" << "Each human has 3 lives." << ends;
|
||||
+ << "\n" << "Each human has 3 lives.";
|
||||
}
|
||||
|
||||
|
||||
@@ -1207,13 +1200,13 @@
|
||||
|
||||
void Duel::new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int) {
|
||||
world->reset();
|
||||
clean_physicals(False,world,locator,manager);
|
||||
|
||||
- lTitleStr << "Level: " << level << ends;
|
||||
- lStr << "Level: " << level << ends;
|
||||
+ lTitleStr << "Level: " << level;
|
||||
+ lStr << "Level: " << level;
|
||||
|
||||
// Only create enemies first time.
|
||||
if (justReset) {
|
||||
@@ -1256,9 +1249,9 @@
|
||||
|
||||
|
||||
|
||||
-void ExtendedDuel::describe(ostrstream &str) {
|
||||
+void ExtendedDuel::describe(stringstream &str) {
|
||||
str << "Human vs. human battle to the death."
|
||||
- << "\n" << "Unlimited lives." << ends;
|
||||
+ << "\n" << "Unlimited lives.";
|
||||
}
|
||||
|
||||
|
||||
@@ -1318,13 +1311,13 @@
|
||||
|
||||
void ExtendedDuel::new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int) {
|
||||
world->reset();
|
||||
clean_physicals(False,world,locator,manager);
|
||||
|
||||
- lTitleStr << "Level: " << level << ends;
|
||||
- lStr << "Level: " << level << ends;
|
||||
+ lTitleStr << "Level: " << level;
|
||||
+ lStr << "Level: " << level;
|
||||
|
||||
// Only create enemies first time.
|
||||
if (justReset) {
|
||||
@@ -1367,8 +1360,8 @@
|
||||
|
||||
|
||||
|
||||
-void Training::describe(ostrstream &str) {
|
||||
- str << "No enemies. Useful for learning the controls." << ends;
|
||||
+void Training::describe(stringstream &str) {
|
||||
+ str << "No enemies. Useful for learning the controls.";
|
||||
}
|
||||
|
||||
|
||||
@@ -1392,13 +1385,13 @@
|
||||
|
||||
void Training::new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int) {
|
||||
world->reset();
|
||||
clean_physicals(False,world,locator,manager);
|
||||
|
||||
- lTitleStr << "Level: " << level << ends;
|
||||
- lStr << "Level: " << level << ends;
|
||||
+ lTitleStr << "Level: " << level;
|
||||
+ lStr << "Level: " << level;
|
||||
}
|
||||
|
||||
|
||||
@@ -1428,10 +1421,10 @@
|
||||
|
||||
|
||||
|
||||
-void Scenarios::describe(ostrstream &str) {
|
||||
+void Scenarios::describe(stringstream &str) {
|
||||
str << "A number of different scenarios." << "\n"
|
||||
<< "You must complete each scenario to continue on to the "
|
||||
- << "next one." << ends;
|
||||
+ << "next one.";
|
||||
}
|
||||
|
||||
|
||||
@@ -1499,7 +1492,7 @@
|
||||
|
||||
int Scenarios::new_level_check(int enemiesPlaying,WorldP w,LocatorP l,
|
||||
int level,Boolean &lStrChanged,
|
||||
- ostrstream &levelStr,Timer &timer,
|
||||
+ stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP manager) {
|
||||
assert(scenario);
|
||||
return scenario->new_level_check(enemiesPlaying,w,l,level,
|
||||
@@ -1534,7 +1527,7 @@
|
||||
|
||||
void Scenarios::new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int humansNum) {
|
||||
// Works even if scenario is NULL.
|
||||
if (!scenario || scenario->advance_level()) {
|
||||
@@ -1804,7 +1797,7 @@
|
||||
|
||||
|
||||
int Exterminate::new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int,Boolean &,ostrstream &,Timer &,
|
||||
+ int,Boolean &,stringstream &,Timer &,
|
||||
IPhysicalManagerP) {
|
||||
if (enemiesPlaying == 0) {
|
||||
return 1;
|
||||
@@ -1822,10 +1815,10 @@
|
||||
|
||||
void Exterminate::new_level(int level,WorldP,LocatorP,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int) {
|
||||
- lTitleStr << "[" << level << "] EXTERMINATE" << ends;
|
||||
- lStr << "[" << level << "] EXTERMINATE\nKill all machines." << ends;
|
||||
+ lTitleStr << "[" << level << "] EXTERMINATE";
|
||||
+ lStr << "[" << level << "] EXTERMINATE\nKill all machines.";
|
||||
|
||||
// Doesn't increment like LEVELS game style
|
||||
enemiesNum = dLevel.enemiesIncr;
|
||||
@@ -1852,7 +1845,7 @@
|
||||
|
||||
int Bonus::new_level_check(int,WorldP,LocatorP locator,
|
||||
int level,Boolean &lStrChanged,
|
||||
- ostrstream &levelStr,Timer &timer,
|
||||
+ stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP) {
|
||||
// Ran out of time.
|
||||
if (timer.ready()) {
|
||||
@@ -1873,13 +1866,13 @@
|
||||
if (remaining != frogsRemaining) {
|
||||
frogsRemaining = remaining;
|
||||
levelStr << "[" << level << "] BONUS LEVEL\nfrogs remaining: "
|
||||
- << remaining << ends;
|
||||
+ << remaining;
|
||||
lStrChanged = True;
|
||||
if (remaining > 0) {
|
||||
- ostrstream arenaStr;
|
||||
+ stringstream arenaStr;
|
||||
arenaStr << remaining << " Frog" <<
|
||||
- (remaining > 1 ? "s" : "") << " Remaining" << ends;
|
||||
- locator->arena_message_enq(arenaStr.str());
|
||||
+ (remaining > 1 ? "s" : "") << " Remaining";
|
||||
+ locator->arena_message_enq(Utils::strdup(arenaStr.str().c_str()));
|
||||
}
|
||||
|
||||
// Will only be called once per level.
|
||||
@@ -1907,7 +1900,7 @@
|
||||
|
||||
void Bonus::new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int) {
|
||||
// Create frogs
|
||||
for (int n = 0; n < SCENARIO_BONUS_FROGS; n++) {
|
||||
@@ -1940,9 +1933,9 @@
|
||||
frogsRemaining = SCENARIO_BONUS_FROGS;
|
||||
|
||||
lTitleStr << "[" << level << "] Bonus Level: Kill "
|
||||
- << (int)SCENARIO_BONUS_FROGS << " Frogs" << ends;
|
||||
+ << (int)SCENARIO_BONUS_FROGS << " Frogs";
|
||||
lStr << "[" << level << "] BONUS LEVEL\nfrogs remaining: "
|
||||
- << (int)SCENARIO_BONUS_FROGS << ends;
|
||||
+ << (int)SCENARIO_BONUS_FROGS;
|
||||
}
|
||||
|
||||
|
||||
@@ -1960,7 +1953,7 @@
|
||||
|
||||
|
||||
int Hive::new_level_check(int,WorldP,LocatorP locator,
|
||||
- int,Boolean &,ostrstream &,Timer &,
|
||||
+ int,Boolean &,stringstream &,Timer &,
|
||||
IPhysicalManagerP) {
|
||||
PhysicalP xit = locator->lookup(xitId);
|
||||
assert(xit); // The Xit should never be destroyed.
|
||||
@@ -1987,7 +1980,7 @@
|
||||
|
||||
void Hive::new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int) {
|
||||
// Aliens are created in Game::clock.
|
||||
|
||||
@@ -2012,8 +2005,8 @@
|
||||
locator->add(egg);
|
||||
}
|
||||
|
||||
- lTitleStr << "[" << level << "] HIVE" << ends;
|
||||
- lStr << "[" << level << "] HIVE.\nFind the exit." << ends;
|
||||
+ lTitleStr << "[" << level << "] HIVE";
|
||||
+ lStr << "[" << level << "] HIVE.\nFind the exit.";
|
||||
}
|
||||
|
||||
|
||||
@@ -2073,7 +2066,7 @@
|
||||
|
||||
|
||||
int CaptureTheFlag::new_level_check(int,WorldP,LocatorP locator,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &,
|
||||
IPhysicalManagerP manager) {
|
||||
int fRemaining = 0;
|
||||
for (int n = 0; n < SCENARIO_FLAG_FLAGS; n++) {
|
||||
@@ -2091,19 +2084,19 @@
|
||||
flagsRemaining = fRemaining;
|
||||
levelStr << "[" << level << "] COLLECT "
|
||||
<< (int)SCENARIO_FLAG_FLAGS
|
||||
- << " FLAGS\nremaining: "<< flagsRemaining << ends;
|
||||
+ << " FLAGS\nremaining: "<< flagsRemaining;
|
||||
lStrChanged = True;
|
||||
|
||||
- ostrstream arenaStr;
|
||||
+ stringstream arenaStr;
|
||||
if (fRemaining != 0) {
|
||||
arenaStr << flagsRemaining << " Flag" <<
|
||||
- (flagsRemaining > 1 ? "s" : "") << " Remaining" << ends;
|
||||
+ (flagsRemaining > 1 ? "s" : "") << " Remaining";
|
||||
}
|
||||
else {
|
||||
- arenaStr << "All Flags Collected" << ends;
|
||||
+ arenaStr << "All Flags Collected";
|
||||
}
|
||||
|
||||
- locator->arena_message_enq(arenaStr.str());
|
||||
+ locator->arena_message_enq(Utils::strdup(arenaStr.str().c_str()));
|
||||
}
|
||||
|
||||
if (fRemaining == 0) { // All flags are gone, so end level.
|
||||
@@ -2124,7 +2117,7 @@
|
||||
|
||||
void CaptureTheFlag::new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP,int) {
|
||||
for (int n = 0; n < SCENARIO_FLAG_FLAGS; n++) {
|
||||
Pos pos = world->empty_accessible_rect(Flag::get_size_max());
|
||||
@@ -2136,9 +2129,9 @@
|
||||
flagsRemaining = SCENARIO_FLAG_FLAGS;
|
||||
|
||||
lTitleStr << "[" << level << "] Capture The Flag: "
|
||||
- << (int)SCENARIO_FLAG_FLAGS << " Flags" << ends;
|
||||
+ << (int)SCENARIO_FLAG_FLAGS << " Flags";
|
||||
lStr << "[" << level << "] COLLECT " << (int)SCENARIO_FLAG_FLAGS
|
||||
- << " FLAGS.\nremaining: " << (int)SCENARIO_FLAG_FLAGS << ends;
|
||||
+ << " FLAGS.\nremaining: " << (int)SCENARIO_FLAG_FLAGS;
|
||||
}
|
||||
|
||||
|
||||
@@ -2169,7 +2162,7 @@
|
||||
|
||||
void GenericSeals::new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP,int) {
|
||||
// Add a team for each human in the game.
|
||||
// Don't use locator->humans_registered() because they may not have been
|
||||
@@ -2298,7 +2291,7 @@
|
||||
|
||||
|
||||
int Seals::new_level_check(int,WorldP,LocatorP locator,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &,
|
||||
IPhysicalManagerP) {
|
||||
int lemOut,lemSafe,lemActive,lemDead;
|
||||
compute_out_safe_active_dead(locator,lemOut,lemSafe,lemActive,lemDead);
|
||||
@@ -2312,10 +2305,10 @@
|
||||
|
||||
// Only update arena string if sealsSafe has changed.
|
||||
if (lemSafe != sealsSafe && lemSafe != SCENARIO_SEALS_NEED) {
|
||||
- ostrstream arenaStr;
|
||||
+ stringstream arenaStr;
|
||||
arenaStr << "Save " << (SCENARIO_SEALS_NEED - lemSafe)
|
||||
- << " More Baby Seals" << ends;
|
||||
- locator->arena_message_enq(arenaStr.str());
|
||||
+ << " More Baby Seals";
|
||||
+ locator->arena_message_enq(Utils::strdup(arenaStr.str().c_str()));
|
||||
}
|
||||
|
||||
sealsSafe = lemSafe;
|
||||
@@ -2324,18 +2317,17 @@
|
||||
levelStr << "[" << level << "] SAVE "
|
||||
<< (int)SCENARIO_SEALS_NEED << " BABY SEALS\n"
|
||||
<< "out: " << sealsOut << " safe: " << sealsSafe
|
||||
- << " dead: " << lemDead
|
||||
- << ends;
|
||||
+ << " dead: " << lemDead;
|
||||
lStrChanged = True;
|
||||
|
||||
// New level if enough seals are safe or too many are dead.
|
||||
if (lemDead > (SCENARIO_SEALS_SEALS - SCENARIO_SEALS_NEED)
|
||||
|| lemSafe >= SCENARIO_SEALS_NEED) {
|
||||
if (lemSafe < SCENARIO_SEALS_NEED) {
|
||||
- ostrstream msg;
|
||||
+ stringstream msg;
|
||||
msg << "YOU FAILED TO SAVE " << (int)SCENARIO_SEALS_NEED
|
||||
- << " BABY SEALS. TRY THIS LEVEL AGAIN." << ends;
|
||||
- locator->arena_message_enq(msg.str());
|
||||
+ << " BABY SEALS. TRY THIS LEVEL AGAIN.";
|
||||
+ locator->arena_message_enq(Utils::strdup(msg.str().c_str()));
|
||||
}
|
||||
else {
|
||||
locator->arena_message_enq(Utils::strdup("Good work. Go to the next level."));
|
||||
@@ -2365,11 +2357,10 @@
|
||||
|
||||
|
||||
|
||||
-void Seals::set_level_strings(int level,ostrstream &lStr,ostrstream &lTitleStr) {
|
||||
- lTitleStr << "[" << level << "] SAVE THE BABY SEALS" << ends;
|
||||
+void Seals::set_level_strings(int level,stringstream &lStr,stringstream &lTitleStr) {
|
||||
+ lTitleStr << "[" << level << "] SAVE THE BABY SEALS";
|
||||
lStr << "[" << level << "] SAVE "<<
|
||||
- (int)SCENARIO_SEALS_NEED << " BABY SEALS\n"
|
||||
- << "out: 0 safe: 0 dead: 0" << ends;
|
||||
+ (int)SCENARIO_SEALS_NEED << " BABY SEALS\n" << "out: 0 safe: 0 dead: 0";
|
||||
}
|
||||
|
||||
|
||||
@@ -2430,7 +2421,7 @@
|
||||
|
||||
|
||||
int AntiSeals::new_level_check(int,WorldP,LocatorP locator,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &,
|
||||
IPhysicalManagerP) {
|
||||
// level not over by default.
|
||||
int ret = -1;
|
||||
@@ -2441,15 +2432,13 @@
|
||||
|
||||
// Failure
|
||||
if (lemSafe > SCENARIO_ANTI_SEALS_MAX_SLIPPAGE) {
|
||||
- ostrstream msg;
|
||||
#if 0
|
||||
// Not enough space on screen, need two lines.
|
||||
msg << "YOU LET TOO MANY OF THE FAT BASTARDS GET AWAY\n"
|
||||
<< "Try this level again" << ends;
|
||||
#else
|
||||
- msg << "YOU LET TOO MANY OF THE FAT BASTARDS GET AWAY" << ends;
|
||||
#endif
|
||||
- locator->arena_message_enq(msg.str());
|
||||
+ locator->arena_message_enq(Utils::strdup("YOU LET TOO MANY OF THE FAT BASTARDS GET AWAY"));
|
||||
|
||||
// start new level
|
||||
ret = 1;
|
||||
@@ -2473,13 +2462,11 @@
|
||||
}
|
||||
// Update UI
|
||||
else if (lemSafe == sealsSafe) { // o.w. the "one got away" message takes priority
|
||||
- ostrstream arenaStr;
|
||||
- arenaStr << "Kill "
|
||||
- << lemToKill << " More Baby Seals" << ends;
|
||||
- locator->arena_message_enq(arenaStr.str());
|
||||
+ stringstream arenaStr;
|
||||
+ arenaStr << "Kill " << lemToKill << " More Baby Seals";
|
||||
+ locator->arena_message_enq(Utils::strdup(arenaStr.str().c_str()));
|
||||
|
||||
- levelStr << "[" << level << "] KILL "
|
||||
- << lemToKill << " BABY SEALS" << ends;
|
||||
+ levelStr << "[" << level << "] KILL " << lemToKill << " BABY SEALS";
|
||||
lStrChanged = True;
|
||||
}
|
||||
} // lemDead != sealsDead
|
||||
@@ -2502,10 +2489,10 @@
|
||||
|
||||
|
||||
|
||||
-void AntiSeals::set_level_strings(int level,ostrstream &lStr,ostrstream &lTitleStr) {
|
||||
- lTitleStr << "[" << level << "] KILL THE BABY SEALS" << ends;
|
||||
+void AntiSeals::set_level_strings(int level,stringstream &lStr,stringstream &lTitleStr) {
|
||||
+ lTitleStr << "[" << level << "] KILL THE BABY SEALS";
|
||||
lStr << "[" << level << "] KILL "<<
|
||||
- (int)SCENARIO_SEALS_SEALS << " BABY SEALS" << ends;
|
||||
+ (int)SCENARIO_SEALS_SEALS << " BABY SEALS";
|
||||
}
|
||||
|
||||
|
||||
@@ -2552,7 +2539,7 @@
|
||||
|
||||
|
||||
int KillTheFireDemon::new_level_check(int enemiesPlaying,WorldP,LocatorP locator,
|
||||
- int,Boolean &,ostrstream &,Timer &,
|
||||
+ int,Boolean &,stringstream &,Timer &,
|
||||
IPhysicalManagerP) {
|
||||
if (enemiesPlaying == 0) {
|
||||
locator->arena_message_enq(Utils::strdup("Take That, You Mother-Fucking Spawn From Hell"));
|
||||
@@ -2572,12 +2559,12 @@
|
||||
|
||||
void KillTheFireDemon::new_level(int level,WorldP,LocatorP,
|
||||
const DifficultyLevel &,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int) {
|
||||
manager->create_enemy(manager->enemy_physical(A_FireDemon));
|
||||
|
||||
- lTitleStr << "[" << level << "] FIRE DEMON" << ends;
|
||||
- lStr << "[" << level << "] Kill the Fire Demon." << ends;
|
||||
+ lTitleStr << "[" << level << "] FIRE DEMON";
|
||||
+ lStr << "[" << level << "] Kill the Fire Demon.";
|
||||
}
|
||||
|
||||
|
||||
@@ -2594,7 +2581,7 @@
|
||||
|
||||
|
||||
int KillTheDragon::new_level_check(int enemiesPlaying,WorldP,LocatorP locator,
|
||||
- int,Boolean &,ostrstream &,Timer &,
|
||||
+ int,Boolean &,stringstream &,Timer &,
|
||||
IPhysicalManagerP) {
|
||||
if (enemiesPlaying == 0) {
|
||||
locator->arena_message_enq(Utils::strdup("The Infernal Worm has been vanquished"));
|
||||
@@ -2614,7 +2601,7 @@
|
||||
|
||||
void KillTheDragon::new_level(int level,WorldP w,LocatorP l,
|
||||
const DifficultyLevel &,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int) {
|
||||
const PhysicalContext *cx = &Dragon::creatureContext.movingContext.physicalContext;
|
||||
Pos pos = w->empty_rect(cx->sizeMax);
|
||||
@@ -2628,8 +2615,8 @@
|
||||
manager->create_enemy(p,False);
|
||||
}
|
||||
|
||||
- lTitleStr << "[" << level << "] Dragon" << ends;
|
||||
- lStr << "[" << level << "] Kill the Dragon." << ends;
|
||||
+ lTitleStr << "[" << level << "] Dragon";
|
||||
+ lStr << "[" << level << "] Kill the Dragon.";
|
||||
}
|
||||
|
||||
|
||||
@@ -2667,7 +2654,7 @@
|
||||
|
||||
|
||||
int ZigZag::new_level_check(int,WorldP world,LocatorP locator,
|
||||
- int,Boolean &,ostrstream &,Timer &,
|
||||
+ int,Boolean &,stringstream &,Timer &,
|
||||
IPhysicalManagerP) {
|
||||
PhysicalP xit = locator->lookup(xitId);
|
||||
assert(xit); // The Xit should never be destroyed.
|
||||
@@ -2680,7 +2667,7 @@
|
||||
HumanP human = locator->get_human(n);
|
||||
if (human) {
|
||||
// previous depth
|
||||
- int depthOld = (int)human->get_data();
|
||||
+ long depthOld = (long)human->get_data();
|
||||
Id id = human->get_id();
|
||||
|
||||
// Get physical for intelligence
|
||||
@@ -2697,9 +2684,9 @@
|
||||
human->set_data((void *)depth);
|
||||
|
||||
// Use 1-based counting for the User.
|
||||
- ostrstream str;
|
||||
- str << "Depth " << (depth + 1) << ends;
|
||||
- locator->arena_message_enq(str.str(),p);
|
||||
+ stringstream str;
|
||||
+ str << "Depth " << (depth + 1);
|
||||
+ locator->arena_message_enq(Utils::strdup(str.str().c_str()),p);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2718,7 +2705,7 @@
|
||||
|
||||
void ZigZag::new_level(int level,WorldP world,LocatorP locator,
|
||||
const DifficultyLevel &,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP,int) {
|
||||
Rooms worldRooms = world->get_rooms();
|
||||
RoomIndex upperRight(0,worldRooms.acrossMax - 1);
|
||||
@@ -2731,9 +2718,8 @@
|
||||
xitId = p->get_id();
|
||||
|
||||
// 1-based counting of depth for the user.
|
||||
- lTitleStr << "[" << level << "] ZIG-ZAG: Depth "
|
||||
- << worldRooms.downMax << ends;
|
||||
- lStr << "[" << level << "] ZIG-ZAG.\nFind the exit." << ends;
|
||||
+ lTitleStr << "[" << level << "] ZIG-ZAG: Depth " << worldRooms.downMax;
|
||||
+ lStr << "[" << level << "] ZIG-ZAG.\nFind the exit.";
|
||||
}
|
||||
|
||||
|
||||
@@ -2761,7 +2747,7 @@
|
||||
|
||||
|
||||
int ThePound::new_level_check(int enemiesPlaying,WorldP,LocatorP locator,
|
||||
- int,Boolean &,ostrstream &,Timer &,
|
||||
+ int,Boolean &,stringstream &,Timer &,
|
||||
IPhysicalManagerP) {
|
||||
if (enemiesPlaying == 0) {
|
||||
locator->arena_message_enq(Utils::strdup("Killed the Mutts"));
|
||||
@@ -2781,7 +2767,7 @@
|
||||
|
||||
void ThePound::new_level(int level,WorldP,LocatorP locator,
|
||||
const DifficultyLevel &,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int) {
|
||||
locator->add_team(Scenarios::dog_team,NULL);
|
||||
|
||||
@@ -2789,8 +2775,8 @@
|
||||
manager->create_enemy(manager->enemy_physical(A_Dog));
|
||||
}
|
||||
|
||||
- lTitleStr << "[" << level << "] The Pound" << ends;
|
||||
- lStr << "[" << level << "] The Pound" << ends;
|
||||
+ lTitleStr << "[" << level << "] The Pound";
|
||||
+ lStr << "[" << level << "] The Pound";
|
||||
}
|
||||
|
||||
|
||||
@@ -2801,7 +2787,7 @@
|
||||
|
||||
|
||||
int JapanTown::new_level_check(int enemiesPlaying,WorldP,LocatorP locator,
|
||||
- int,Boolean &,ostrstream &,Timer &,
|
||||
+ int,Boolean &,stringstream &,Timer &,
|
||||
IPhysicalManagerP) {
|
||||
if (enemiesPlaying == 0) {
|
||||
locator->arena_message_enq(Utils::strdup("Damn Ninjas. Worse than roaches."));
|
||||
@@ -2821,7 +2807,7 @@
|
||||
|
||||
void JapanTown::new_level(int level,WorldP,LocatorP locator,
|
||||
const DifficultyLevel &,
|
||||
- ostrstream &lStr,ostrstream &lTitleStr,
|
||||
+ stringstream &lStr,stringstream &lTitleStr,
|
||||
IPhysicalManagerP manager,int) {
|
||||
locator->add_team(JapanTown::ninja_team,NULL);
|
||||
|
||||
@@ -2829,8 +2815,8 @@
|
||||
manager->create_enemy(manager->enemy_physical(A_Ninja));
|
||||
}
|
||||
|
||||
- lTitleStr << "[" << level << "] Japan-Town" << ends;
|
||||
- lStr << "[" << level << "] Japan-Town" << ends;
|
||||
+ lTitleStr << "[" << level << "] Japan-Town";
|
||||
+ lStr << "[" << level << "] Japan-Town";
|
||||
}
|
||||
|
||||
|
@ -1,201 +0,0 @@
|
||||
--- cmn/game_style.h.orig 2012-05-27 06:52:31.000000000 +0900
|
||||
+++ cmn/game_style.h 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -30,12 +30,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
-#if X11
|
||||
-#include <strstream.h>
|
||||
-#endif
|
||||
-#if WIN32
|
||||
-#include <strstrea.h>
|
||||
-#endif
|
||||
+#include <sstream>
|
||||
|
||||
#include "utils.h"
|
||||
#include "coord.h"
|
||||
@@ -44,6 +39,8 @@
|
||||
#include "intel.h"
|
||||
|
||||
|
||||
+using namespace std;
|
||||
+
|
||||
#define SCENARIO_SEALS_TRAPDOORS 2
|
||||
#define SCENARIO_BONUS_FROGS 12
|
||||
#define SCENARIO_FLAG_FLAGS 15
|
||||
@@ -91,7 +88,7 @@
|
||||
|
||||
virtual GameStyle *clone() = 0;
|
||||
|
||||
- virtual void describe(ostrstream &) = 0;
|
||||
+ virtual void describe(stringstream &) = 0;
|
||||
/* EFFECTS: Write a two-line description of the style to the stream. */
|
||||
|
||||
virtual GameStyleType get_type() = 0;
|
||||
@@ -137,7 +134,7 @@
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
int level,
|
||||
- Boolean &lStrChanged,ostrstream &levelStr,
|
||||
+ Boolean &lStrChanged,stringstream &levelStr,
|
||||
Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
/* MODIFIES: lStrChanged */
|
||||
@@ -166,7 +163,7 @@
|
||||
|
||||
virtual void new_level(int level,WorldP,LocatorP,
|
||||
const DifficultyLevel &dLevel,
|
||||
- ostrstream &levelStr,ostrstream &levelTitleStr,
|
||||
+ stringstream &levelStr,stringstream &levelTitleStr,
|
||||
IPhysicalManagerP,int humansNum) = 0;
|
||||
/* MODIFIES: level */
|
||||
/* EFFECTS: Start a new level. Use levelStr levelTitleStr to
|
||||
@@ -249,7 +246,7 @@
|
||||
|
||||
virtual GameStyleP clone();
|
||||
|
||||
- virtual void describe(ostrstream &);
|
||||
+ virtual void describe(stringstream &);
|
||||
|
||||
virtual GameStyleType get_type();
|
||||
|
||||
@@ -269,7 +266,7 @@
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
int level,Boolean &lStrChanged,
|
||||
- ostrstream &levelStr,Timer &timer,
|
||||
+ stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
|
||||
virtual Boolean advance_level();
|
||||
@@ -277,7 +274,7 @@
|
||||
virtual Boolean award_bonus();
|
||||
|
||||
virtual void new_level(int level,WorldP,LocatorP,const DifficultyLevel &dLevel,
|
||||
- ostrstream &levelStr,ostrstream &levelTitleStr,
|
||||
+ stringstream &levelStr,stringstream &levelTitleStr,
|
||||
IPhysicalManagerP,int humansNum);
|
||||
|
||||
virtual void new_level_set_timer(Timer &timer);
|
||||
@@ -305,7 +302,7 @@
|
||||
|
||||
virtual GameStyleP clone();
|
||||
|
||||
- virtual void describe(ostrstream &);
|
||||
+ virtual void describe(stringstream &);
|
||||
|
||||
virtual GameStyleType get_type();
|
||||
|
||||
@@ -314,11 +311,11 @@
|
||||
virtual void reset(WorldP,LocatorP,const DifficultyLevel &,int enemiesNumNext);
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
|
||||
virtual void new_level(int level,WorldP,LocatorP,const DifficultyLevel &dLevel,
|
||||
- ostrstream &levelStr,ostrstream &levelTitleStr,
|
||||
+ stringstream &levelStr,stringstream &levelTitleStr,
|
||||
IPhysicalManagerP,int humansNum);
|
||||
|
||||
virtual void new_level_set_timer(Timer &timer);
|
||||
@@ -340,7 +337,7 @@
|
||||
|
||||
virtual GameStyleP clone();
|
||||
|
||||
- virtual void describe(ostrstream &);
|
||||
+ virtual void describe(stringstream &);
|
||||
|
||||
virtual GameStyleType get_type();
|
||||
|
||||
@@ -355,7 +352,7 @@
|
||||
virtual Boolean game_over_check(int humansPlaying,int enemiesPlaying);
|
||||
|
||||
virtual void new_level(int level,WorldP,LocatorP,const DifficultyLevel &dLevel,
|
||||
- ostrstream &levelStr,ostrstream &levelTitleStr,
|
||||
+ stringstream &levelStr,stringstream &levelTitleStr,
|
||||
IPhysicalManagerP,int humansNum);
|
||||
|
||||
virtual void refill_enemies(Boolean enemiesRefill,WorldP,LocatorP,IPhysicalManagerP);
|
||||
@@ -376,7 +373,7 @@
|
||||
|
||||
virtual GameStyleP clone();
|
||||
|
||||
- virtual void describe(ostrstream &);
|
||||
+ virtual void describe(stringstream &);
|
||||
|
||||
virtual GameStyleType get_type();
|
||||
|
||||
@@ -389,7 +386,7 @@
|
||||
virtual Boolean game_over_check(int humansPlaying,int enemiesPlaying);
|
||||
|
||||
virtual void new_level(int level,WorldP,LocatorP,const DifficultyLevel &dLevel,
|
||||
- ostrstream &levelStr,ostrstream &levelTitleStr,
|
||||
+ stringstream &levelStr,stringstream &levelTitleStr,
|
||||
IPhysicalManagerP,int humansNum);
|
||||
|
||||
virtual void refill_enemies(Boolean enemiesRefill,WorldP,LocatorP,IPhysicalManagerP);
|
||||
@@ -408,7 +405,7 @@
|
||||
|
||||
virtual GameStyleP clone();
|
||||
|
||||
- virtual void describe(ostrstream &);
|
||||
+ virtual void describe(stringstream &);
|
||||
|
||||
virtual GameStyleType get_type();
|
||||
|
||||
@@ -423,7 +420,7 @@
|
||||
virtual Boolean game_over_check(int humansPlaying,int enemiesPlaying);
|
||||
|
||||
virtual void new_level(int level,WorldP,LocatorP,const DifficultyLevel &dLevel,
|
||||
- ostrstream &levelStr,ostrstream &levelTitleStr,
|
||||
+ stringstream &levelStr,stringstream &levelTitleStr,
|
||||
IPhysicalManagerP,int humansNum);
|
||||
|
||||
virtual void refill_enemies(Boolean enemiesRefill,WorldP,LocatorP,IPhysicalManagerP);
|
||||
@@ -442,7 +439,7 @@
|
||||
|
||||
virtual GameStyleP clone();
|
||||
|
||||
- virtual void describe(ostrstream &);
|
||||
+ virtual void describe(stringstream &);
|
||||
|
||||
virtual GameStyleType get_type();
|
||||
|
||||
@@ -451,7 +448,7 @@
|
||||
virtual void reset(WorldP,LocatorP,const DifficultyLevel &dLevel,int);
|
||||
|
||||
virtual void new_level(int level,WorldP,LocatorP,const DifficultyLevel &dLevel,
|
||||
- ostrstream &levelStr,ostrstream &levelTitleStr,
|
||||
+ stringstream &levelStr,stringstream &levelTitleStr,
|
||||
IPhysicalManagerP,int humansNum);
|
||||
|
||||
virtual void refill_enemies(Boolean enemiesRefill,WorldP,LocatorP,IPhysicalManagerP);
|
||||
@@ -466,7 +463,7 @@
|
||||
|
||||
virtual GameStyleP clone();
|
||||
|
||||
- virtual void describe(ostrstream &);
|
||||
+ virtual void describe(stringstream &);
|
||||
|
||||
virtual GameStyleType get_type();
|
||||
|
||||
@@ -485,7 +482,7 @@
|
||||
virtual void reset(WorldP,LocatorP,const DifficultyLevel &,int enemiesNumNext);
|
||||
|
||||
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
|
||||
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
|
||||
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
|
||||
IPhysicalManagerP);
|
||||
|
||||
virtual Boolean advance_level();
|
||||
@@ -493,7 +490,7 @@
|
||||
virtual Boolean award_bonus();
|
||||
|
||||
virtual void new_level(int level,WorldP,LocatorP,const DifficultyLevel &dLevel,
|
||||
- ostrstream &levelStr,ostrstream &levelTitleStr,
|
||||
+ stringstream &levelStr,stringstream &levelTitleStr,
|
||||
IPhysicalManagerP manager,int humansNum);
|
||||
|
||||
virtual void new_level_set_timer(Timer &timer);
|
@ -1,109 +0,0 @@
|
||||
--- cmn/intel.cpp.orig 2012-05-27 06:52:29.000000000 +0900
|
||||
+++ cmn/intel.cpp 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <string.h>
|
||||
}
|
||||
#if X11
|
||||
-#include <strstream.h>
|
||||
+#include <sstream>
|
||||
#endif
|
||||
#if WIN32
|
||||
#include <strstrea.h>
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "xdata.h"
|
||||
|
||||
|
||||
+using namespace std;
|
||||
|
||||
// Defines
|
||||
#define FIGHT_RANGE 40 // made it smaller for Dogs 45 // [50-40]
|
||||
@@ -212,7 +213,7 @@
|
||||
|
||||
|
||||
|
||||
-Intel::Intel(WorldP w,LocatorP l,char *name,
|
||||
+Intel::Intel(WorldP w,LocatorP l,const char *name,
|
||||
const IntelOptions *ops,ITmask opMask) {
|
||||
intelStatusChanged = True;
|
||||
living = True;
|
||||
@@ -755,7 +756,7 @@
|
||||
|
||||
|
||||
|
||||
-Human::Human(WorldP w,LocatorP l,char *name,int lves,
|
||||
+Human::Human(WorldP w,LocatorP l,const char *name,int lves,
|
||||
int *sharedLves,ColorNum cNum)
|
||||
: Intel(w,l,name,NULL,ITnone) {
|
||||
lives = lves;
|
||||
@@ -931,7 +932,7 @@
|
||||
|
||||
|
||||
|
||||
-Machine::Machine(WorldP w,LocatorP l,char *name,const IntelOptions *ops,
|
||||
+Machine::Machine(WorldP w,LocatorP l,const char *name,const IntelOptions *ops,
|
||||
ITmask opMask)
|
||||
: Intel(w,l,name,ops,opMask)
|
||||
{
|
||||
@@ -1829,7 +1830,7 @@
|
||||
|
||||
|
||||
|
||||
-Enemy::Enemy(WorldP w,LocatorP l,char *name,
|
||||
+Enemy::Enemy(WorldP w,LocatorP l,const char *name,
|
||||
const IntelOptions *ops,ITmask opMask)
|
||||
:Machine(w,l,name,ops,opMask) {}
|
||||
|
||||
@@ -1854,7 +1855,7 @@
|
||||
|
||||
|
||||
|
||||
-Neutral::Neutral(WorldP w,LocatorP l,char *name,
|
||||
+Neutral::Neutral(WorldP w,LocatorP l,const char *name,
|
||||
const IntelOptions *ops,ITmask opMask)
|
||||
:Machine(w,l,name,ops,opMask) {}
|
||||
|
||||
@@ -1867,7 +1868,7 @@
|
||||
|
||||
|
||||
|
||||
-SealIntel::SealIntel(WorldP w,LocatorP l,char *name,const Id &home_id)
|
||||
+SealIntel::SealIntel(WorldP w,LocatorP l,const char *name,const Id &home_id)
|
||||
:Neutral(w,l,name,NULL,ITnone)
|
||||
{
|
||||
// Timer oTimer(LADDER_JUMP_TIME);
|
||||
@@ -1906,7 +1907,7 @@
|
||||
|
||||
|
||||
|
||||
-DoppelIntel::DoppelIntel(WorldP w,LocatorP l,char *name,
|
||||
+DoppelIntel::DoppelIntel(WorldP w,LocatorP l,const char *name,
|
||||
const IntelOptions *ops,ITmask opMask,IntelP master)
|
||||
:Neutral(w,l,name,ops,opMask) {
|
||||
assert(master);
|
||||
@@ -2073,7 +2074,7 @@
|
||||
|
||||
|
||||
|
||||
-Pet::Pet(WorldP w,LocatorP l,char *name,
|
||||
+Pet::Pet(WorldP w,LocatorP l,const char *name,
|
||||
const IntelOptions *ops,ITmask opMask,IntelP master)
|
||||
:DoppelIntel(w,l,name,ops,opMask,master) {
|
||||
mode = Heel;
|
||||
@@ -2095,7 +2096,7 @@
|
||||
char buffer[80];
|
||||
ostrstream str(buffer,80);
|
||||
str << "mode changing from:" << Pet::mode_string(prev) <<
|
||||
- " to: " << Pet::mode_string(curr) << endl << ends;
|
||||
+ " to: " << Pet::mode_string(curr) << endl;
|
||||
#if WIN32
|
||||
TRACE(buffer);
|
||||
#endif
|
||||
@@ -2308,7 +2309,7 @@
|
||||
|
||||
|
||||
|
||||
-char *Pet::mode_string(int mode) {
|
||||
+const char *Pet::mode_string(int mode) {
|
||||
switch (mode) {
|
||||
case Heel:
|
||||
return "Heel";
|
@ -1,83 +0,0 @@
|
||||
--- cmn/intel.h.orig 2012-05-27 06:52:31.000000000 +0900
|
||||
+++ cmn/intel.h 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -123,7 +123,7 @@
|
||||
// Class Definitions.
|
||||
class Intel {
|
||||
public:
|
||||
- Intel(WorldP w,LocatorP l,char *name,
|
||||
+ Intel(WorldP w,LocatorP l,const char *name,
|
||||
const IntelOptions *ops,ITmask opMask);
|
||||
/* EFFECTS: Create a new intel with the options specified in opMakse that are
|
||||
in ops. ops will never be referenced if opMask is ITnone. lives now
|
||||
@@ -293,7 +293,7 @@
|
||||
// Simply buffers input from a user interface.
|
||||
class Human: public Intel {
|
||||
public:
|
||||
- Human(WorldP w,LocatorP l,char *name,int lives,
|
||||
+ Human(WorldP w,LocatorP l,const char *name,int lives,
|
||||
int *sharedLives,ColorNum colorNum);
|
||||
/* NOTE: Uses all default options. intelOptions should be meaningless for
|
||||
a human. If "sharedLives" is non-null, ignore "lives" and share the lives. */
|
||||
@@ -346,7 +346,7 @@
|
||||
|
||||
class Machine: public Intel {
|
||||
public:
|
||||
- Machine(WorldP w,LocatorP l,char *name,
|
||||
+ Machine(WorldP w,LocatorP l,const char *name,
|
||||
const IntelOptions *ops,ITmask opMask);
|
||||
|
||||
virtual IntelId get_master_intel_id();
|
||||
@@ -464,7 +464,7 @@
|
||||
|
||||
class Enemy: public Machine {
|
||||
public:
|
||||
- Enemy(WorldP w,LocatorP l,char *name,
|
||||
+ Enemy(WorldP w,LocatorP l,const char *name,
|
||||
const IntelOptions *ops,ITmask opMask);
|
||||
|
||||
static void set_reflexes_time(int time) {reflexesTime = time;}
|
||||
@@ -491,7 +491,7 @@
|
||||
|
||||
class Neutral: public Machine {
|
||||
public:
|
||||
- Neutral(WorldP w,LocatorP l,char *name,
|
||||
+ Neutral(WorldP w,LocatorP l,const char *name,
|
||||
const IntelOptions *ops,ITmask opMask);
|
||||
|
||||
virtual Boolean is_enemy();
|
||||
@@ -502,7 +502,7 @@
|
||||
|
||||
class SealIntel: public Neutral {
|
||||
public:
|
||||
- SealIntel(WorldP w,LocatorP l,char *name,const Id &homeId);
|
||||
+ SealIntel(WorldP w,LocatorP l,const char *name,const Id &homeId);
|
||||
|
||||
virtual Boolean is_seal_intel();
|
||||
|
||||
@@ -522,7 +522,7 @@
|
||||
|
||||
class DoppelIntel: public Neutral {
|
||||
public:
|
||||
- DoppelIntel(WorldP w,LocatorP l,char *name,
|
||||
+ DoppelIntel(WorldP w,LocatorP l,const char *name,
|
||||
const IntelOptions *ops,ITmask opMask,
|
||||
IntelP master = NULL);
|
||||
|
||||
@@ -572,7 +572,7 @@
|
||||
// in choose_strategy() and go_get_em().
|
||||
class Pet: public DoppelIntel {
|
||||
public:
|
||||
- Pet(WorldP w,LocatorP l,char *name,
|
||||
+ Pet(WorldP w,LocatorP l,const char *name,
|
||||
const IntelOptions *ops,ITmask opMask,
|
||||
IntelP master = NULL);
|
||||
|
||||
@@ -583,7 +583,7 @@
|
||||
IT_WEAPON_{some dir}, or to come back to him if command is IT_WEAPON_CENTER.
|
||||
This will also set p to be the new master. */
|
||||
|
||||
- static char *mode_string(int mode);
|
||||
+ static const char *mode_string(int mode);
|
||||
/* NOTE: For debugging. */
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- cmn/locator.cpp.orig 2012-05-27 06:52:30.000000000 +0900
|
||||
+++ cmn/locator.cpp 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -50,6 +50,7 @@
|
||||
|
||||
#include "bitmaps/locator/locator.bitmaps" // for arrows
|
||||
|
||||
+using namespace std;
|
||||
|
||||
// When we reach this, start deleting objects.
|
||||
#define OL_LIST_WARN ((int)(OL_LIST_MAX * 0.9))
|
@ -1,20 +0,0 @@
|
||||
--- cmn/locator.h.orig 2012-05-27 06:52:31.000000000 +0900
|
||||
+++ cmn/locator.h 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
|
||||
// Include Files
|
||||
-#include <iostream.h>
|
||||
+#include <iostream>
|
||||
|
||||
#include "utils.h"
|
||||
#include "coord.h"
|
||||
@@ -96,6 +96,8 @@
|
||||
#define OL_RECENT_SOUNDS_MAX 30
|
||||
|
||||
|
||||
+class OLgridEntry;
|
||||
+class OLshadowEntry;
|
||||
|
||||
// An entry for one object in the list of all objects currently in the game.
|
||||
class OLentry {
|
@ -1,191 +0,0 @@
|
||||
--- cmn/physical.cpp.orig 2012-05-27 06:52:30.000000000 +0900
|
||||
+++ cmn/physical.cpp 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -33,10 +33,10 @@
|
||||
// Include Files
|
||||
#include "xdata.h"
|
||||
#include "physical.h"
|
||||
-#include <iostream.h>
|
||||
+#include <iostream>
|
||||
|
||||
#if X11
|
||||
-#include <strstream.h>
|
||||
+#include <sstream>
|
||||
#endif
|
||||
#if WIN32
|
||||
#include <strstrea.h>
|
||||
@@ -54,6 +54,7 @@
|
||||
|
||||
#include "bitmaps/transform/transform.bitmaps"
|
||||
|
||||
+using namespace std;
|
||||
|
||||
// Defines
|
||||
#define VEL_SMALL 1
|
||||
@@ -523,9 +524,9 @@
|
||||
|
||||
if (heat == 0 && heatNext > 0) {
|
||||
LocatorP l = get_locator();
|
||||
- ostrstream str;
|
||||
- str << get_class_name() << " is on fire." << ends;
|
||||
- locator->message_enq(str.str());
|
||||
+ stringstream str;
|
||||
+ str << get_class_name() << " is on fire.";
|
||||
+ locator->message_enq(Utils::strdup(str.str().c_str()));
|
||||
}
|
||||
}
|
||||
previousHeatWasSecondary = secondary;
|
||||
@@ -1844,7 +1845,7 @@
|
||||
}
|
||||
|
||||
// Use the pixmap resource id as the base.
|
||||
- u_int cmnBitsId = (unsigned int)mc->pixmapBits[baseDir][animNum];
|
||||
+ u_int cmnBitsId = (unsigned long)mc->pixmapBits[baseDir][animNum];
|
||||
|
||||
// It is ok to call OneTransform::compute_key() even if there is no
|
||||
// transformation, will just return 0x0.
|
||||
@@ -2556,17 +2557,17 @@
|
||||
|
||||
void Item::die() {
|
||||
LocatorP locator = get_locator();
|
||||
- ostrstream msg;
|
||||
+ stringstream msg;
|
||||
switch (dieMessage) {
|
||||
case NONE:
|
||||
break;
|
||||
case USED:
|
||||
- msg << get_class_name() << " has been used." << ends;
|
||||
- locator->message_enq(msg.str());
|
||||
+ msg << get_class_name() << " has been used.";
|
||||
+ locator->message_enq(Utils::strdup(msg.str().c_str()));
|
||||
break;
|
||||
case DESTROYED:
|
||||
- msg << get_class_name() << " is destroyed." << ends;
|
||||
- locator->message_enq(msg.str());
|
||||
+ msg << get_class_name() << " is destroyed.";
|
||||
+ locator->message_enq(Utils::strdup(msg.str().c_str()));
|
||||
break;
|
||||
};
|
||||
|
||||
@@ -2650,10 +2651,8 @@
|
||||
// Prevent non-biologicals from picking up drugs.
|
||||
|
||||
if (p->is_creature() && !((CreatureP)p)->biological()) {
|
||||
- ostrstream msg;
|
||||
- msg << "Non-Biological Creatures Cannot Use Drugs" << ends;
|
||||
LocatorP locator = get_locator();
|
||||
- locator->arena_message_enq(msg.str(),p);
|
||||
+ locator->arena_message_enq(Utils::strdup("Non-Biological Creatures Cannot Use Drugs"), p);
|
||||
kill_self();
|
||||
}
|
||||
else {
|
||||
@@ -2673,13 +2672,11 @@
|
||||
assert(context->odChance >= 0);
|
||||
if (context->odChance && Utils::choose(context->odChance) == 0) {
|
||||
p->kill_self();
|
||||
- ostrstream msg;
|
||||
- msg << p->get_class_name() << " dies from crack overdose." << ends;
|
||||
- locator->message_enq(msg.str());
|
||||
+ stringstream msg;
|
||||
+ msg << p->get_class_name() << " dies from crack overdose.";
|
||||
+ locator->message_enq(Utils::strdup(msg.str().c_str()));
|
||||
|
||||
- ostrstream arenaMsg;
|
||||
- arenaMsg << "You Died From Drug Overdose" << ends;
|
||||
- locator->arena_message_enq(arenaMsg.str(),p);
|
||||
+ locator->arena_message_enq(Utils::strdup("You Died From Drug Overdose"),p);
|
||||
|
||||
set_quiet_death(); // so doesn't report "has been used" message.
|
||||
}
|
||||
@@ -2693,9 +2690,7 @@
|
||||
}
|
||||
else {
|
||||
// Shouldn't get here, should kill self when picking it up.
|
||||
- ostrstream msg;
|
||||
- msg << "Non-Biological Creatures Cannot Use Drugs" << ends;
|
||||
- locator->arena_message_enq(msg.str(),p);
|
||||
+ locator->arena_message_enq(Utils::strdup("Non-Biological Creatures Cannot Use Drugs"),p);
|
||||
}
|
||||
|
||||
kill_self();
|
||||
@@ -4334,14 +4329,14 @@
|
||||
if (!get_quiet_death() && !alive() &&
|
||||
(corpseTimer.ready() || (get_health() < - cc->corpseHealth))) {
|
||||
LocatorP locator = get_locator();
|
||||
- ostrstream msg;
|
||||
+ stringstream msg;
|
||||
if (corpseTimer.ready()) {
|
||||
- msg << get_class_name() << " corpse has decomposed." << ends;
|
||||
- locator->message_enq(msg.str());
|
||||
+ msg << get_class_name() << " corpse has decomposed.";
|
||||
+ locator->message_enq(Utils::strdup(msg.str().c_str()));
|
||||
}
|
||||
else {
|
||||
- msg << get_class_name() << " corpse has been destroyed." << ends;
|
||||
- locator->message_enq(msg.str());
|
||||
+ msg << get_class_name() << " corpse has been destroyed.";
|
||||
+ locator->message_enq(Utils::strdup(msg.str().c_str()));
|
||||
}
|
||||
set_delete_me();
|
||||
}
|
||||
@@ -4399,9 +4394,9 @@
|
||||
set_vel_next(velNew);
|
||||
set_stance_next(CO_air);
|
||||
|
||||
- ostrstream msg;
|
||||
- msg << get_class_name() << " has died." << ends;
|
||||
- locator->message_enq(msg.str());
|
||||
+ stringstream msg;
|
||||
+ msg << get_class_name() << " has died.";
|
||||
+ locator->message_enq(Utils::strdup(msg.str().c_str()));
|
||||
|
||||
set_no_death_delete();
|
||||
}
|
||||
@@ -6072,10 +6067,10 @@
|
||||
}
|
||||
// If User is already holding the max number of weapons.
|
||||
else if (weaponsNum >= PH_WEAPONS_MAX) {
|
||||
- ostrstream msg;
|
||||
- msg << "Can only hold " << PH_WEAPONS_MAX << " weapons" << ends;
|
||||
+ stringstream msg;
|
||||
+ msg << "Can only hold " << PH_WEAPONS_MAX << " weapons";
|
||||
LocatorP locator = cre->get_locator();
|
||||
- locator->arena_message_enq(msg.str(),cre);
|
||||
+ locator->arena_message_enq(Utils::strdup(msg.str().c_str()),cre);
|
||||
destroyOther = True;
|
||||
}
|
||||
// Actually pick it up.
|
||||
@@ -6124,15 +6119,14 @@
|
||||
else {
|
||||
LocatorP locator = cre->get_locator();
|
||||
if (itemsNum == PH_ITEMS_MAX) {
|
||||
- ostrstream msg;
|
||||
- msg << "Can only hold " << PH_ITEMS_MAX << " items" << ends;
|
||||
- locator->arena_message_enq(msg.str(),cre);
|
||||
+ stringstream msg;
|
||||
+ msg << "Can only hold " << PH_ITEMS_MAX << " items";
|
||||
+ locator->arena_message_enq(Utils::strdup(msg.str().c_str()),cre);
|
||||
}
|
||||
else if (itemClassCount >= ITEM_CLASS_MAX) {
|
||||
- ostrstream msg;
|
||||
- msg << "Can only hold " << ITEM_CLASS_MAX
|
||||
- << " of any one item" << ends;
|
||||
- locator->arena_message_enq(msg.str(),cre);
|
||||
+ stringstream msg;
|
||||
+ msg << "Can only hold " << ITEM_CLASS_MAX << " of any one item";
|
||||
+ locator->arena_message_enq(Utils::strdup(msg.str().c_str()),cre);
|
||||
}
|
||||
|
||||
other->set_quiet_death();
|
||||
@@ -6661,9 +6655,9 @@
|
||||
((ItemP)p)->use(cre);
|
||||
}
|
||||
else {
|
||||
- ostrstream str;
|
||||
- str << "Cannot use " << p->get_class_name() << ends;
|
||||
- locator->arena_message_enq(str.str(),cre);
|
||||
+ stringstream str;
|
||||
+ str << "Cannot use " << p->get_class_name();
|
||||
+ locator->arena_message_enq(Utils::strdup(str.str().c_str()),cre);
|
||||
}
|
||||
}
|
||||
break;
|
@ -1,11 +0,0 @@
|
||||
--- cmn/physical.h.orig Wed Jan 19 12:54:08 2000
|
||||
+++ cmn/physical.h Mon Nov 3 21:36:14 2003
|
||||
@@ -93,7 +93,7 @@
|
||||
CLASSNAME::CLASSNAME(InStreamP in,const CLASSNAME ## Context &cx, \
|
||||
CLASSNAME ## Xdata &x_data, \
|
||||
WorldP w,LocatorP l) \
|
||||
- : PARENT(in,cx. ## parent ## Context,x_data,w,l)
|
||||
+ : PARENT(in,cx. parent ## Context,x_data,w,l)
|
||||
|
||||
// Used by internal nodes and leaves.
|
||||
#define DEFINE_UPDATE_FROM_STREAM(CLASSNAME,PARENT) \
|
@ -1,487 +0,0 @@
|
||||
--- cmn/role.cpp.orig 2012-05-27 06:52:30.000000000 +0900
|
||||
+++ cmn/role.cpp 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -29,9 +29,9 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
-#include <iostream.h>
|
||||
+#include <iostream>
|
||||
#if X11
|
||||
-#include <strstream.h>
|
||||
+#include <sstream>
|
||||
#include <time.h>
|
||||
#endif
|
||||
#if WIN32
|
||||
@@ -266,43 +266,39 @@
|
||||
|
||||
|
||||
void Role::error(const char *msg1,const char *msg2,const char *msg3) {
|
||||
- ostrstream str;
|
||||
+ stringstream str;
|
||||
|
||||
if (msg2 == NULL) {
|
||||
- str << msg1 << ends;
|
||||
+ str << msg1;
|
||||
}
|
||||
else if (msg3 == NULL) {
|
||||
- str << msg1 << msg2 << ends;
|
||||
+ str << msg1 << msg2;
|
||||
}
|
||||
else {
|
||||
- str << msg1 << msg2 << msg3 << ends;
|
||||
+ str << msg1 << msg2 << msg3;
|
||||
}
|
||||
|
||||
// Call one argument version.
|
||||
- _error(str.str());
|
||||
-
|
||||
- delete str.str();
|
||||
+ _error(str.str().c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Role::message(const char *msg1,const char *msg2,const char *msg3) {
|
||||
- ostrstream str;
|
||||
+ stringstream str;
|
||||
|
||||
if (msg2 == NULL) {
|
||||
- str << msg1 << ends;
|
||||
+ str << msg1;
|
||||
}
|
||||
else if (msg3 == NULL) {
|
||||
- str << msg1 << msg2 << ends;
|
||||
+ str << msg1 << msg2;
|
||||
}
|
||||
else {
|
||||
- str << msg1 << msg2 << msg3 << ends;
|
||||
+ str << msg1 << msg2 << msg3;
|
||||
}
|
||||
|
||||
// Call one argument version.
|
||||
- _message(str.str());
|
||||
-
|
||||
- delete str.str();
|
||||
+ _message(str.str().c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -605,11 +601,11 @@
|
||||
// Display message that we are looking up IP address.
|
||||
// Assumes that caller will call Client::connect_server after a turn or two,
|
||||
// so the message will be displayed on the Ui.
|
||||
- ostrstream str;
|
||||
- str << "Looking up IP address for server " << serverName << ends;
|
||||
+ stringstream str;
|
||||
+ str << "Looking up IP address for server " << serverName;
|
||||
// Display for a long time.
|
||||
- errLocator->arena_message_enq(str.str(),NULL,1000000);
|
||||
- errLocator->message_enq(Utils::strdup(str.str()));
|
||||
+ errLocator->arena_message_enq(Utils::strdup(str.str().c_str()),NULL,1000000);
|
||||
+ errLocator->message_enq(Utils::strdup(str.str().c_str()));
|
||||
// Probably would be better to use Role::message(), but we want it to stay
|
||||
// up for a long time. Should add argument to Role::message().
|
||||
|
||||
@@ -657,18 +653,16 @@ void Client::connect_server() {
|
||||
client.sin_family = AF_INET;
|
||||
client.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
client.sin_port = htons((u_short)(clientPortBase + n));
|
||||
- if (bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) >= 0) {
|
||||
+ if (::bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) >= 0) {
|
||||
// Success.
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (n == CLIENT_PORT_TRIES) {
|
||||
- ostrstream str;
|
||||
+ stringstream str;
|
||||
str << "Could not bind local UDP port to any of "
|
||||
- << clientPortBase << "-" << (clientPortBase + CLIENT_PORT_TRIES - 1)
|
||||
- << ends;
|
||||
- error(str.str());
|
||||
- delete str.str();
|
||||
+ << clientPortBase << "-" << (clientPortBase + CLIENT_PORT_TRIES - 1);
|
||||
+ error(str.str().c_str());
|
||||
return;
|
||||
}
|
||||
// cout << "UDP port seems to be" << client.sin_port << endl;
|
||||
@@ -703,22 +697,19 @@
|
||||
|
||||
// Inform user of failed connection
|
||||
if (!ok()) {
|
||||
- strstream msg;
|
||||
+ stringstream msg;
|
||||
msg << "Could not connect to " << serverName << " on port " <<
|
||||
- port << "." << ends;
|
||||
- error(msg.str());
|
||||
- delete(msg.str());
|
||||
+ port << ".";
|
||||
+ error(msg.str().c_str());
|
||||
delete tcpOut;
|
||||
return;
|
||||
}
|
||||
|
||||
// Inform user of successful connection
|
||||
- strstream msg;
|
||||
+ stringstream msg;
|
||||
msg << hostName << " connected to " << serverName << " on port " <<
|
||||
- port << ends;
|
||||
- message(msg.str());
|
||||
- delete msg.str();
|
||||
-
|
||||
+ port;
|
||||
+ message(msg.str().c_str());
|
||||
|
||||
// Create TCP and UDP streams.
|
||||
tcpIn = new NetInStream(tcpSock,False);
|
||||
@@ -967,11 +958,11 @@
|
||||
Role::_error(msg);
|
||||
|
||||
if (errorLocator) {
|
||||
- ostrstream str2;
|
||||
- str2 << "ERROR: " << msg << ends;
|
||||
- errorLocator->arena_message_enq(str2.str(),NULL,ROLE_FAILED_TIME);
|
||||
+ stringstream str2;
|
||||
+ str2 << "ERROR: " << msg;
|
||||
+ errorLocator->arena_message_enq(Utils::strdup(str2.str().c_str()),NULL,ROLE_FAILED_TIME);
|
||||
// Don't delete str2.str(), give memory to the Locator.
|
||||
- errorLocator->message_enq(Utils::strdup(str2.str()));
|
||||
+ errorLocator->message_enq(Utils::strdup(str2.str().c_str()));
|
||||
}
|
||||
#if WIN32
|
||||
// Only the client can afford to block on error messages.
|
||||
@@ -986,11 +977,9 @@
|
||||
Role::_error(msg);
|
||||
|
||||
if (errorLocator) {
|
||||
- ostrstream str2;
|
||||
- str2 << msg << ends;
|
||||
- errorLocator->arena_message_enq(str2.str());
|
||||
+ errorLocator->arena_message_enq(Utils::strdup(msg));
|
||||
// Don't delete str2.str(), give memory to the Locator.
|
||||
- errorLocator->message_enq(Utils::strdup(str2.str()));
|
||||
+ errorLocator->message_enq(Utils::strdup(msg));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1256,10 +1245,9 @@
|
||||
if (turn > turnMax) {
|
||||
turnMax = turn;
|
||||
if (echoPingPong) {
|
||||
- ostrstream str;
|
||||
- str << "PONG the server with turn " << turnMax << ends;
|
||||
- message(str.str());
|
||||
- delete str.str();
|
||||
+ stringstream str;
|
||||
+ str << "PONG the server with turn " << turnMax;
|
||||
+ message(str.str().c_str());
|
||||
}
|
||||
// Tell server so it can free turn windows to send more data.
|
||||
XETP::send_pong(udpOut,turnMax);
|
||||
@@ -1365,10 +1353,9 @@
|
||||
}
|
||||
}
|
||||
else {
|
||||
- ostrstream str;
|
||||
- str << "No context for classId " << classId << ends;
|
||||
- error(str.str());
|
||||
- delete str.str();
|
||||
+ stringstream str;
|
||||
+ str << "No context for classId " << classId;
|
||||
+ error(str.str().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1582,9 +1569,9 @@
|
||||
return Utils::strdup(clientName);
|
||||
}
|
||||
|
||||
- ostrstream str;
|
||||
- str << '\"' << intel->get_name() << "\"@" << clientName << ends;
|
||||
- return str.str();
|
||||
+ stringstream str;
|
||||
+ str << '\"' << intel->get_name() << "\"@" << clientName;
|
||||
+ return Utils::strdup(str.str().c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -1695,11 +1682,10 @@
|
||||
}
|
||||
|
||||
#ifdef SKIP_MESSAGES
|
||||
- ostrstream msg;
|
||||
+ stringstream msg;
|
||||
msg << "Average delay is " << avg << " out of "
|
||||
- << delaysNum << " samples." << ends;
|
||||
+ << delaysNum << " samples.";
|
||||
server->message(msg.str());
|
||||
- delete msg.str();
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
@@ -1723,10 +1709,9 @@
|
||||
// server->error("Client has reached maximum skip value.");
|
||||
// }
|
||||
#ifdef SKIP_MESSAGES
|
||||
- ostrstream msg;
|
||||
- msg << "Increasing skip to " << skip << ends;
|
||||
+ stringstream msg;
|
||||
+ msg << "Increasing skip to " << skip;
|
||||
server->message(msg.str());
|
||||
- delete msg.str();
|
||||
#endif
|
||||
}
|
||||
// We have moved back into our target range, can send more data now.
|
||||
@@ -1734,10 +1719,9 @@
|
||||
skip--;
|
||||
|
||||
#ifdef SKIP_MESSAGES
|
||||
- ostrstream msg;
|
||||
- msg << "Decreasing skip to " << skip << ends;
|
||||
+ stringstream msg;
|
||||
+ msg << "Decreasing skip to " << skip;
|
||||
server->message(msg.str());
|
||||
- delete msg.str();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1777,7 +1761,7 @@
|
||||
|
||||
|
||||
|
||||
-Server::Server(Boolean lHuman,char *portName,LocatorP errLocator) {
|
||||
+Server::Server(Boolean lHuman,const char *portName,LocatorP errLocator) {
|
||||
// Hack, using errLocator for more than reporting errors.
|
||||
errLocator->set_remember_deleted(True);
|
||||
errLocator->set_remember_sounds(True);
|
||||
@@ -1842,20 +1826,18 @@ void Server::run() {
|
||||
serverAddr.sin_port = htons(port);
|
||||
|
||||
// Give address to both the TCP and UDP sockets.
|
||||
- if (bind(tcpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) {
|
||||
- ostrstream str;
|
||||
+ if (::bind(tcpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) {
|
||||
+ stringstream str;
|
||||
str << "Couldn't bind socket name to TCP socket on port "
|
||||
- << port << "." << ends;
|
||||
- error(str.str());
|
||||
- delete str.str();
|
||||
+ << port << ".";
|
||||
+ error(str.str().c_str());
|
||||
return;
|
||||
}
|
||||
- if (bind(udpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) {
|
||||
- ostrstream str;
|
||||
+ if (::bind(udpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) {
|
||||
+ stringstream str;
|
||||
str << "Couldn't bind socket name to UDP socket on port "
|
||||
- << port << "." << ends;
|
||||
- error(str.str());
|
||||
- delete str.str();
|
||||
+ << port << ".";
|
||||
+ error(str.str().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1868,10 +1850,9 @@
|
||||
assert(udpIn);
|
||||
|
||||
// Message to server log.
|
||||
- strstream msg;
|
||||
- msg << "Set up server on port " << port << ends;
|
||||
- message(msg.str());
|
||||
- delete(msg.str());
|
||||
+ stringstream msg;
|
||||
+ msg << "Set up server on port " << port;
|
||||
+ message(msg.str().c_str());
|
||||
|
||||
running = True;
|
||||
}
|
||||
@@ -1951,10 +1932,9 @@
|
||||
localHumanId = hId;
|
||||
|
||||
// Log the human's name.
|
||||
- strstream msg;
|
||||
- msg << "Player 0 \"" << human->get_name() << '\"' << "@SERVER" << ends;
|
||||
- message(msg.str());
|
||||
- delete(msg.str());
|
||||
+ stringstream msg;
|
||||
+ msg << "Player 0 \"" << human->get_name() << '\"' << "@SERVER";
|
||||
+ message(msg.str().c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -1985,12 +1965,11 @@
|
||||
|
||||
// Log all the players in the game, some code duplication for the
|
||||
// local human.
|
||||
- ostrstream str;
|
||||
+ stringstream str;
|
||||
char* fullName = cn->get_full_client_name();
|
||||
- str << "Player " << num << " " << fullName << ends;
|
||||
- message(str.str());
|
||||
+ str << "Player " << num << " " << fullName;
|
||||
+ message(str.str().c_str());
|
||||
delete fullName;
|
||||
- delete str.str();
|
||||
|
||||
// Send assign_intel via TCP
|
||||
OutStreamP out = cn->get_tcp_out_stream();
|
||||
@@ -2007,13 +1986,12 @@
|
||||
// anyway.
|
||||
for (m = 0; m < connections.length() && m != n; m++) {
|
||||
char* fullName = cn->get_full_client_name();
|
||||
- ostrstream str;
|
||||
- str << fullName << " has joined the game" << ends;
|
||||
+ stringstream str;
|
||||
+ str << fullName << " has joined the game";
|
||||
delete fullName;
|
||||
|
||||
OutStreamP out = cn->get_udp_out_stream();
|
||||
- XETP::send_arena_message(out,timeMS,str.str());
|
||||
- delete str.str();
|
||||
+ XETP::send_arena_message(out,timeMS,str.str().c_str());
|
||||
}
|
||||
cn->creation_message_sent();
|
||||
}
|
||||
@@ -2101,13 +2079,12 @@
|
||||
// Give the connection some slack when it is first starting up.
|
||||
turn - cn->get_start_turn() >= MINIMUM_CUTOFF) {
|
||||
char* fullName = cn->get_full_client_name();
|
||||
- ostrstream str;
|
||||
+ stringstream str;
|
||||
str << fullName
|
||||
<< " has not responded in "
|
||||
- << diff << " turns. Disconnect." << ends;
|
||||
- message(str.str());
|
||||
+ << diff << " turns. Disconnect.";
|
||||
+ message(str.str().c_str());
|
||||
delete fullName;
|
||||
- delete str.str();
|
||||
tooOld = True;
|
||||
}
|
||||
}
|
||||
@@ -2147,11 +2124,10 @@
|
||||
diff == NO_ACTIVITY_WARN_2 ||
|
||||
diff == NO_ACTIVITY_WARN_3) {
|
||||
if (echoPingPong) {
|
||||
- ostrstream str;
|
||||
+ stringstream str;
|
||||
str << "Haven't heard from " << cn->get_client_name()
|
||||
- << " in " << diff << " turns, sending PING." << ends;
|
||||
- message(str.str());
|
||||
- delete str.str();
|
||||
+ << " in " << diff << " turns, sending PING.";
|
||||
+ message(str.str().c_str());
|
||||
}
|
||||
XETP::send_ping(cn->get_udp_out_stream());
|
||||
}
|
||||
@@ -2311,7 +2287,11 @@
|
||||
for (m = 0; m < followers.length(); m++) {
|
||||
PhysicalP q = (PhysicalP)followers.get(m);
|
||||
netData = q->get_net_data();
|
||||
- assert(!netData->get_sent_flag());
|
||||
+ // This line was aborting network games, often in the pound scenario.
|
||||
+ // Without it, the server seems to continue without error.
|
||||
+ // I tried replacing it with a warning, but there is so much of it
|
||||
+ // that it is nearly impossible to see anything else. -Brandon
|
||||
+// assert(!netData->get_sent_flag());
|
||||
netData->set_sent_flag(True);
|
||||
}
|
||||
|
||||
@@ -2713,9 +2693,9 @@
|
||||
// Careful to set the propagate flag to False so the message doesn't get
|
||||
// sent to the clients.
|
||||
if (errorLocator) {
|
||||
- ostrstream str2;
|
||||
- str2 << "SERVER: " << msg << ends;
|
||||
- errorLocator->arena_message_enq(str2.str(),NULL,ROLE_FAILED_TIME,False);
|
||||
+ stringstream str2;
|
||||
+ str2 << "SERVER: " << msg;
|
||||
+ errorLocator->arena_message_enq(Utils::strdup(str2.str().c_str()),NULL,ROLE_FAILED_TIME,False);
|
||||
// Don't delete str2.str(), give memory to the Locator.
|
||||
|
||||
// Could do a regular message_enq(), but would have to deal with the
|
||||
@@ -2728,10 +2708,9 @@
|
||||
void Server::display_chat_message(LocatorP l,const char* sender,
|
||||
const char* msg) {
|
||||
// Log the chat message, then let Role handle it.
|
||||
- strstream logMsg;
|
||||
- logMsg << '<' << sender << '>' << msg << ends;
|
||||
- message(logMsg.str());
|
||||
- delete logMsg.str();
|
||||
+ stringstream logMsg;
|
||||
+ logMsg << '<' << sender << '>' << msg;
|
||||
+ message(logMsg.str().c_str());
|
||||
|
||||
Role::display_chat_message(l,sender,msg);
|
||||
}
|
||||
@@ -2851,12 +2830,11 @@
|
||||
udpAddr->sin_port = htons(udpPort);
|
||||
|
||||
// Log the connection.
|
||||
- strstream msg;
|
||||
+ stringstream msg;
|
||||
msg << clientName <<
|
||||
" connected (TCP port " << ntohs(tcpAddr.sin_port) <<
|
||||
- ", UDP port " << udpPort << ")" << ends;
|
||||
- message(msg.str());
|
||||
- delete(msg.str());
|
||||
+ ", UDP port " << udpPort << ")";
|
||||
+ message(msg.str().c_str());
|
||||
|
||||
Connection* cn =
|
||||
new Connection(this,errorLocator,
|
||||
@@ -2874,7 +2852,7 @@
|
||||
XETP::send_reset(out,manager->get_game_style_type());
|
||||
|
||||
// Say hello to the new client.
|
||||
- ostrstream greeting;
|
||||
+ stringstream greeting;
|
||||
greeting << "Welcome to " << hostName << ".";
|
||||
|
||||
if (get_humans_num() == 1) {
|
||||
@@ -2884,10 +2862,8 @@
|
||||
greeting << " There are now "
|
||||
<< get_humans_num() << " players.";
|
||||
}
|
||||
- greeting << ends;
|
||||
int timeMS = quantaToMS(UI_ARENA_MESSAGE_TIME,manager);
|
||||
- XETP::send_arena_message(out,timeMS,greeting.str());
|
||||
- delete greeting.str();
|
||||
+ XETP::send_arena_message(out,timeMS,greeting.str().c_str());
|
||||
|
||||
manager->humans_num_incremented();
|
||||
}
|
||||
@@ -2918,18 +2894,16 @@
|
||||
Connection* cm = get_connection(m);
|
||||
|
||||
char* fullName = cn->get_full_client_name();
|
||||
- ostrstream str;
|
||||
+ stringstream str;
|
||||
str << fullName << " has disconnected";
|
||||
if (intel) {
|
||||
str << ", " << kills << " human kills";
|
||||
}
|
||||
- str << ends;
|
||||
XETP::send_arena_message(cm->get_udp_out_stream(),
|
||||
- timeMS,str.str());
|
||||
+ timeMS,str.str().c_str());
|
||||
|
||||
|
||||
delete fullName;
|
||||
- delete str.str();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3262,8 +3236,8 @@
|
||||
void Server::send_udp_server_pong(IGameManager* manager,LocatorP locator,
|
||||
CMN_SOCKET udpSock,
|
||||
CMN_SOCKADDR_IN* destAddr) {
|
||||
- static char* unknownString = "<unknown>";
|
||||
- static char* serverString = "<server>";
|
||||
+ static const char* unknownString = "<unknown>";
|
||||
+ static const char* serverString = "<server>";
|
||||
|
||||
|
||||
// Temporary stream.
|
@ -1,11 +0,0 @@
|
||||
--- cmn/role.h.orig 2012-05-27 06:52:31.000000000 +0900
|
||||
+++ cmn/role.h 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -539,7 +539,7 @@
|
||||
|
||||
|
||||
public:
|
||||
- Server(Boolean localHuman,char *portName,LocatorP);
|
||||
+ Server(Boolean localHuman,const char *portName,LocatorP);
|
||||
/* EFFECTS: Create a server that listens for connections on given port.
|
||||
If NULL is passed in, use XETP::DEFAULT_PORT. */
|
||||
|
@ -1,35 +0,0 @@
|
||||
--- cmn/streams.cpp.orig 2012-05-27 06:52:30.000000000 +0900
|
||||
+++ cmn/streams.cpp 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -31,12 +31,13 @@
|
||||
#include "utils.h"
|
||||
#include "neth.h" // needed for recv, send, recvfrom, sendto
|
||||
|
||||
-#include <iostream.h>
|
||||
+#include <iostream>
|
||||
|
||||
#include "streams.h"
|
||||
#include "xetp.h" // yuck, need this for XETP::versionStr
|
||||
|
||||
|
||||
+using namespace std;
|
||||
|
||||
Checksum GenericStream::compute_checksum(u_char *data,int len) {
|
||||
Checksum c = 0;
|
||||
@@ -205,7 +206,7 @@
|
||||
|
||||
|
||||
|
||||
-Boolean NetOutStream::write(void *buf,int size) {
|
||||
+Boolean NetOutStream::write(const void *buf,int size) {
|
||||
if (!isAlive) {
|
||||
return False;
|
||||
}
|
||||
@@ -518,7 +519,7 @@
|
||||
|
||||
|
||||
|
||||
-Boolean UDPOutStream::write(void *buf,int size) {
|
||||
+Boolean UDPOutStream::write(const void *buf,int size) {
|
||||
if (!isAlive) {
|
||||
return False;
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
--- cmn/streams.h.orig 2012-05-27 06:52:31.000000000 +0900
|
||||
+++ cmn/streams.h 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -97,7 +97,7 @@
|
||||
public:
|
||||
OutStream(Boolean ownSock) : GenericStream(ownSock) {}
|
||||
|
||||
- virtual Boolean write(void *buf,int size) = 0;
|
||||
+ virtual Boolean write(const void *buf,int size) = 0;
|
||||
/* EFFECTS: Write size number of bytes into buf. Return True if
|
||||
successful. */
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
|
||||
virtual Boolean alive();
|
||||
|
||||
- virtual Boolean write(void *buf,int size);
|
||||
+ virtual Boolean write(const void *buf,int size);
|
||||
|
||||
virtual void write_char(u_char);
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
|
||||
virtual void done_packet();
|
||||
|
||||
- virtual Boolean write(void *buf,int size);
|
||||
+ virtual Boolean write(const void *buf,int size);
|
||||
|
||||
void flush();
|
||||
|
@ -1,107 +0,0 @@
|
||||
--- cmn/utils.cpp.orig 2012-05-27 06:52:30.000000000 +0900
|
||||
+++ cmn/utils.cpp 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -30,16 +30,16 @@
|
||||
|
||||
// Include Files
|
||||
#include "stdafx.h"
|
||||
-#include <iostream.h>
|
||||
+#include <iostream>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
-#include <fstream.h>
|
||||
+#include <fstream>
|
||||
#if WIN32
|
||||
#include <strstrea.h>
|
||||
#endif
|
||||
#if X11
|
||||
-#include <strstream.h>
|
||||
+#include <sstream>
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
@@ -422,10 +422,8 @@
|
||||
|
||||
|
||||
char* Utils::get_OS_info() {
|
||||
- ostrstream ret;
|
||||
-
|
||||
-
|
||||
#ifdef WIN32
|
||||
+ stringstream ret;
|
||||
OSVERSIONINFO osInfo;
|
||||
osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
Boolean set = False;
|
||||
@@ -465,12 +463,11 @@
|
||||
Utils::strcmp(osInfo.szCSDVersion," ")) {
|
||||
ret << '(' << osInfo.szCSDVersion << ')';
|
||||
}
|
||||
- ret << ends;
|
||||
}
|
||||
}
|
||||
|
||||
if (!set) {
|
||||
- ret << "Unknown Win32" << ends;
|
||||
+ ret << "Unknown Win32";
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -494,20 +491,15 @@
|
||||
if (buffer[strLen - 1] == '\n') {
|
||||
buffer[strLen - 1] = '\0';
|
||||
}
|
||||
- ret << buffer << ends;
|
||||
- set = True;
|
||||
+ return strdup(buffer);
|
||||
}
|
||||
}
|
||||
pclose(fp);
|
||||
}
|
||||
|
||||
- if (!set) {
|
||||
- ret << "Unknown UNIX" << ends;
|
||||
- }
|
||||
+ return strdup("Unknown UNIX");
|
||||
#endif
|
||||
|
||||
-
|
||||
- return ret.str();
|
||||
}
|
||||
|
||||
|
||||
@@ -605,7 +597,7 @@
|
||||
// Not tested.
|
||||
out->write_int(len);
|
||||
for (int n = 0; n < len; n++) {
|
||||
- out->write_int((int)data[n]);
|
||||
+ out->write_int((long)data[n]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -761,7 +753,7 @@
|
||||
|
||||
|
||||
private:
|
||||
- Bucket* HashTable::_get(int &index,void* key);
|
||||
+ Bucket* _get(int &index,void* key);
|
||||
/* MODIFIES: index */
|
||||
/* EFFECTS: Internal helper function. Return the Bucket containing key
|
||||
or NULL if not found. Set index to the bucket list for key whether
|
||||
@@ -944,7 +936,7 @@
|
||||
// Pretty crappy hash function, I know.
|
||||
// Careful if bucketsNum is a power of 2.
|
||||
int HashTable::defaultHash(void* key,int bucketsNum) {
|
||||
- return ((unsigned int)key) % bucketsNum;
|
||||
+ return ((unsigned long)key) % bucketsNum;
|
||||
}
|
||||
|
||||
|
||||
@@ -1024,7 +1016,7 @@
|
||||
#endif
|
||||
|
||||
#if X11
|
||||
- cout << str << endl;
|
||||
+ std::cout << str << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
@ -1,28 +0,0 @@
|
||||
--- cmn/utils.h.orig 2012-05-27 06:52:31.000000000 +0900
|
||||
+++ cmn/utils.h 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
typedef int GameStyleType;
|
||||
// Possible values of GameStyleType.
|
||||
-enum {SCENARIOS,LEVELS_ONLY,KILL,DUEL,EXTENDED,TRAINING,LEVELS};
|
||||
+enum {SCENARIOS,LEVELS_ONLY,KILL,DUEL,EXTENDED,TRAINING,LEVELS,NUM_GAME_STYLES};
|
||||
|
||||
|
||||
|
||||
@@ -237,13 +237,13 @@
|
||||
/* EFFECTS: Wrapper for C library strcmp(). Return 0 if strings are the
|
||||
same. */
|
||||
|
||||
- static char* strchr(const char* cs,int c)
|
||||
+ static const char* strchr(const char* cs,int c)
|
||||
{return ::strchr(cs,c);}
|
||||
|
||||
- static char* strrchr(const char* cs,int c)
|
||||
+ static const char* strrchr(const char* cs,int c)
|
||||
{return ::strrchr(cs,c);}
|
||||
|
||||
- static char* strstr(const char* cs,const char* ct)
|
||||
+ static const char* strstr(const char* cs,const char* ct)
|
||||
{return ::strstr(cs,ct);}
|
||||
|
||||
static void strcpy(char* s,const char* ct)
|
@ -1,19 +0,0 @@
|
||||
--- cmn/world.cpp.orig 2012-05-27 06:52:30.000000000 +0900
|
||||
+++ cmn/world.cpp 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -35,7 +35,7 @@
|
||||
#endif
|
||||
|
||||
// Include Files.
|
||||
-#include <iostream.h>
|
||||
+#include <iostream>
|
||||
|
||||
#include "utils.h"
|
||||
#include "coord.h"
|
||||
@@ -48,6 +48,7 @@
|
||||
// For PhysMover.
|
||||
#include "actual.h"
|
||||
|
||||
+using namespace std;
|
||||
|
||||
// Defines.
|
||||
#define HANGING_PERCENT 0.40 // The % of the edge hanging off the corner.
|
@ -1,50 +0,0 @@
|
||||
--- cmn/xetp.cpp.orig 2012-05-27 06:52:30.000000000 +0900
|
||||
+++ cmn/xetp.cpp 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -29,9 +29,9 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
-#include <iostream.h>
|
||||
+#include <iostream>
|
||||
#if X11
|
||||
-#include <strstream.h>
|
||||
+#include <sstream>
|
||||
#endif
|
||||
#if WIN32
|
||||
#include <strstrea.h>
|
||||
@@ -53,6 +53,8 @@
|
||||
#include "xetp.h"
|
||||
|
||||
|
||||
+using namespace std;
|
||||
+
|
||||
|
||||
void XETP::check_sizes() {
|
||||
XETPBasic::check_sizes();
|
||||
@@ -159,7 +161,7 @@
|
||||
for (n = 0; n < physicals.length(); n++) {
|
||||
PhysicalP p = (PhysicalP)physicals.get(n);
|
||||
// computing object_length twice, but who cares.
|
||||
- _send_object(out,p,turn,(TickType)tickTypes.get(n),
|
||||
+ _send_object(out,p,turn,(long)tickTypes.get(n),
|
||||
compute_object_length(p));
|
||||
}
|
||||
|
||||
@@ -274,7 +276,7 @@
|
||||
|
||||
|
||||
|
||||
-void XETP::send_message(OutStreamP out,char *msg) {
|
||||
+void XETP::send_message(OutStreamP out,const char *msg) {
|
||||
assert(msg);
|
||||
u_int len = strlen(msg);
|
||||
|
||||
@@ -293,7 +295,7 @@
|
||||
|
||||
|
||||
|
||||
-void XETP::send_arena_message(OutStreamP out,int time,char *msg) {
|
||||
+void XETP::send_arena_message(OutStreamP out,int time,const char *msg) {
|
||||
assert(msg);
|
||||
u_int len = sizeof(int) + // time
|
||||
strlen(msg); // string body
|
@ -1,14 +0,0 @@
|
||||
--- cmn/xetp.h.orig 2012-05-27 06:52:31.000000000 +0900
|
||||
+++ cmn/xetp.h 2012-05-27 06:53:11.000000000 +0900
|
||||
@@ -83,9 +83,9 @@
|
||||
static void send_rooms_known(OutStreamP,const Rooms &,
|
||||
int worldVersion,Boolean *map);
|
||||
|
||||
- static void send_message(OutStreamP,char *msg);
|
||||
+ static void send_message(OutStreamP,const char *msg);
|
||||
|
||||
- static void send_arena_message(OutStreamP,int timeMS,char *msg);
|
||||
+ static void send_arena_message(OutStreamP,int timeMS,const char *msg);
|
||||
|
||||
static void send_command(OutStreamP,const IntelId &,ITcommand);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user