From: <sv...@ww...> - 2004-12-02 19:18:49
|
Author: delta Date: 2004-12-02 11:18:43 -0800 (Thu, 02 Dec 2004) New Revision: 1337 Added: trunk/CSP/IndexServer/VisualStudio2003/ trunk/CSP/IndexServer/VisualStudio2003/IndexServer.sln trunk/CSP/IndexServer/VisualStudio2003/IndexServer.vcproj Modified: trunk/CSP/IndexServer/IndexServer.cpp Log: * 'interface' is a key word for vc++. * Added VS2003 directory & initial project files (linked against SimCore-New). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1337 Modified: trunk/CSP/IndexServer/IndexServer.cpp =================================================================== --- trunk/CSP/IndexServer/IndexServer.cpp 2004-12-02 18:18:12 UTC (rev 1336) +++ trunk/CSP/IndexServer/IndexServer.cpp 2004-12-02 19:18:43 UTC (rev 1337) @@ -42,16 +42,16 @@ void IndexServer::initPrimaryInterface() { assert(m_NetworkServer.isNull()); - const std::string interface = g_Config.getString("Network", "Bind", "127.0.0.1:4999", true); - const std::string::size_type colon = interface.find(':'); + const std::string server_interface = g_Config.getString("Network", "Bind", "127.0.0.1:4999", true); + const std::string::size_type colon = server_interface.find(':'); std::string address; simnet::Port port = 0; if (colon != std::string::npos) { - port = atoi(interface.substr(colon + 1).c_str()); - address = interface.substr(0, colon); + port = static_cast<simnet::Port>(atoi(server_interface.substr(colon + 1).c_str())); + address = server_interface.substr(0, colon); } if (address.size() == 0 || port == 0) { - std::cerr << "Invalid value for Network.Bind in .ini file: " << interface << "\n"; + std::cerr << "Invalid value for Network.Bind in .ini file: " << server_interface << "\n"; std::cerr << "Should be of the form www.xxx.yyy.zzz:port\n"; ::exit(1); } @@ -71,7 +71,7 @@ CSP_LOG(APP, INFO, "starting network loop"); simdata::Timer timer; timer.start(); - while (1) { + for (;;) { m_NetworkServer->processAndWait(0.01, 0.01, 0.10); m_Battlefield->update(timer.incremental()); } @@ -94,3 +94,4 @@ IndexServer server; server.run(); } + Added: trunk/CSP/IndexServer/VisualStudio2003/IndexServer.sln =================================================================== --- trunk/CSP/IndexServer/VisualStudio2003/IndexServer.sln 2004-12-02 18:18:12 UTC (rev 1336) +++ trunk/CSP/IndexServer/VisualStudio2003/IndexServer.sln 2004-12-02 19:18:43 UTC (rev 1337) @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IndexServer", "IndexServer.vcproj", "{B2F61A0D-4653-4E7E-ACA2-5767B2F65E32}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {B2F61A0D-4653-4E7E-ACA2-5767B2F65E32}.Debug.ActiveCfg = Debug|Win32 + {B2F61A0D-4653-4E7E-ACA2-5767B2F65E32}.Debug.Build.0 = Debug|Win32 + {B2F61A0D-4653-4E7E-ACA2-5767B2F65E32}.Release.ActiveCfg = Release|Win32 + {B2F61A0D-4653-4E7E-ACA2-5767B2F65E32}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal Added: trunk/CSP/IndexServer/VisualStudio2003/IndexServer.vcproj =================================================================== --- trunk/CSP/IndexServer/VisualStudio2003/IndexServer.vcproj 2004-12-02 18:18:12 UTC (rev 1336) +++ trunk/CSP/IndexServer/VisualStudio2003/IndexServer.vcproj 2004-12-02 19:18:43 UTC (rev 1337) @@ -0,0 +1,146 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="IndexServer" + ProjectGUID="{B2F61A0D-4653-4E7E-ACA2-5767B2F65E32}" + Keyword="MakeFileProj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../SimData/Include;../.." + RuntimeLibrary="3" + RuntimeTypeInfo="TRUE" + ExpandAttributedSource="TRUE" + BrowseInformation="1" + WarningLevel="4" + Detect64BitPortabilityProblems="FALSE" + DebugInformationFormat="3" + DisableSpecificWarnings="4511;4512;4100"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="SpatialIndexd.lib SimNetd.lib _cSimDatad.lib ccgnu2.lib SimCore-Newd.lib" + OutputFile="../$(ProjectName)d.exe" + AdditionalLibraryDirectories="../../SpatialIndex/.bin;../../SimNet/.bin;../../SimData/SimData;../../SimCore/.bin" + GenerateDebugInformation="TRUE" + AssemblyDebug="1" + GenerateMapFile="TRUE" + MapExports="FALSE" + MapLines="FALSE"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + GlobalOptimizations="FALSE" + InlineFunctionExpansion="0" + EnableIntrinsicFunctions="FALSE" + FavorSizeOrSpeed="0" + OptimizeForProcessor="0" + OptimizeForWindowsApplication="FALSE" + AdditionalIncludeDirectories="../../SimData/Include;../.." + RuntimeLibrary="2" + EnableEnhancedInstructionSet="0" + RuntimeTypeInfo="TRUE" + WarningLevel="3" + DebugInformationFormat="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="ws2_32.lib pthreadVC.lib SpatialIndex.lib SimNet.lib _cSimData.lib ccgnu2.lib SimCore-New.lib" + OutputFile="../$(ProjectName).exe" + LinkIncremental="0" + AdditionalLibraryDirectories="../../SpatialIndex/.bin;../../SimNet/.bin;../../SimData/SimData;../../SimCore/.bin"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + <File + RelativePath="..\Config.cpp"> + </File> + <File + RelativePath="..\IndexServer.cpp"> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + <File + RelativePath="..\Config.h"> + </File> + <File + RelativePath="..\IndexServer.h"> + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> |