diff options
Diffstat (limited to 'cpp/src')
55 files changed, 2055 insertions, 7899 deletions
diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp index da4d0af3534..d6e3b64678c 100644 --- a/cpp/src/Ice/PropertyNames.cpp +++ b/cpp/src/Ice/PropertyNames.cpp @@ -1,7 +1,7 @@ // // Copyright (c) ZeroC, Inc. All rights reserved. // -// Generated by makeprops.py from file ./config/PropertyNames.xml, Thu Jul 2 14:55:02 2020 +// Generated by makeprops.py from file ./config/PropertyNames.xml, Fri Jan 29 15:05:58 2021 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -1056,66 +1056,6 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::IceGridProps(IceGridPropsData, sizeof(IceGridPropsData)/sizeof(IceGridPropsData[0])); -const IceInternal::Property IcePatch2PropsData[] = -{ - IceInternal::Property("IcePatch2.ACM.Timeout", false, 0), - IceInternal::Property("IcePatch2.ACM.Heartbeat", false, 0), - IceInternal::Property("IcePatch2.ACM.Close", false, 0), - IceInternal::Property("IcePatch2.ACM", false, 0), - IceInternal::Property("IcePatch2.AdapterId", false, 0), - IceInternal::Property("IcePatch2.Endpoints", false, 0), - IceInternal::Property("IcePatch2.Locator.EndpointSelection", false, 0), - IceInternal::Property("IcePatch2.Locator.ConnectionCached", false, 0), - IceInternal::Property("IcePatch2.Locator.PreferSecure", false, 0), - IceInternal::Property("IcePatch2.Locator.LocatorCacheTimeout", false, 0), - IceInternal::Property("IcePatch2.Locator.InvocationTimeout", false, 0), - IceInternal::Property("IcePatch2.Locator.Locator", false, 0), - IceInternal::Property("IcePatch2.Locator.Router", false, 0), - IceInternal::Property("IcePatch2.Locator.CollocationOptimized", false, 0), - IceInternal::Property("IcePatch2.Locator.Context.*", false, 0), - IceInternal::Property("IcePatch2.Locator", false, 0), - IceInternal::Property("IcePatch2.PublishedEndpoints", false, 0), - IceInternal::Property("IcePatch2.ReplicaGroupId", false, 0), - IceInternal::Property("IcePatch2.Router.EndpointSelection", false, 0), - IceInternal::Property("IcePatch2.Router.ConnectionCached", false, 0), - IceInternal::Property("IcePatch2.Router.PreferSecure", false, 0), - IceInternal::Property("IcePatch2.Router.LocatorCacheTimeout", false, 0), - IceInternal::Property("IcePatch2.Router.InvocationTimeout", false, 0), - IceInternal::Property("IcePatch2.Router.Locator", false, 0), - IceInternal::Property("IcePatch2.Router.Router", false, 0), - IceInternal::Property("IcePatch2.Router.CollocationOptimized", false, 0), - IceInternal::Property("IcePatch2.Router.Context.*", false, 0), - IceInternal::Property("IcePatch2.Router", false, 0), - IceInternal::Property("IcePatch2.ProxyOptions", false, 0), - IceInternal::Property("IcePatch2.ThreadPool.Size", false, 0), - IceInternal::Property("IcePatch2.ThreadPool.SizeMax", false, 0), - IceInternal::Property("IcePatch2.ThreadPool.SizeWarn", false, 0), - IceInternal::Property("IcePatch2.ThreadPool.StackSize", false, 0), - IceInternal::Property("IcePatch2.ThreadPool.Serialize", false, 0), - IceInternal::Property("IcePatch2.ThreadPool.ThreadIdleTime", false, 0), - IceInternal::Property("IcePatch2.ThreadPool.ThreadPriority", false, 0), - IceInternal::Property("IcePatch2.MessageSizeMax", false, 0), - IceInternal::Property("IcePatch2.Directory", false, 0), - IceInternal::Property("IcePatch2.InstanceName", false, 0), -}; - -const IceInternal::PropertyArray - IceInternal::PropertyNames::IcePatch2Props(IcePatch2PropsData, - sizeof(IcePatch2PropsData)/sizeof(IcePatch2PropsData[0])); - -const IceInternal::Property IcePatch2ClientPropsData[] = -{ - IceInternal::Property("IcePatch2Client.ChunkSize", false, 0), - IceInternal::Property("IcePatch2Client.Directory", false, 0), - IceInternal::Property("IcePatch2Client.Proxy", false, 0), - IceInternal::Property("IcePatch2Client.Remove", false, 0), - IceInternal::Property("IcePatch2Client.Thorough", false, 0), -}; - -const IceInternal::PropertyArray - IceInternal::PropertyNames::IcePatch2ClientProps(IcePatch2ClientPropsData, - sizeof(IcePatch2ClientPropsData)/sizeof(IcePatch2ClientPropsData[0])); - const IceInternal::Property IceSSLPropsData[] = { IceInternal::Property("IceSSL.Alias", false, 0), @@ -1393,8 +1333,6 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::validProps[] = IceBridgeProps, IceGridAdminProps, IceGridProps, - IcePatch2Props, - IcePatch2ClientProps, IceSSLProps, IceStormAdminProps, IceBTProps, @@ -1415,8 +1353,6 @@ const char* IceInternal::PropertyNames::clPropNames[] = "IceBridge", "IceGridAdmin", "IceGrid", - "IcePatch2", - "IcePatch2Client", "IceSSL", "IceStormAdmin", "IceBT", diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h index 8f65258d805..42bf1fce9bc 100644 --- a/cpp/src/Ice/PropertyNames.h +++ b/cpp/src/Ice/PropertyNames.h @@ -1,7 +1,7 @@ // // Copyright (c) ZeroC, Inc. All rights reserved. // -// Generated by makeprops.py from file ./config/PropertyNames.xml, Thu Jul 2 14:55:02 2020 +// Generated by makeprops.py from file ./config/PropertyNames.xml, Fri Jan 29 15:05:58 2021 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -60,8 +60,6 @@ public: static const PropertyArray IceBridgeProps; static const PropertyArray IceGridAdminProps; static const PropertyArray IceGridProps; - static const PropertyArray IcePatch2Props; - static const PropertyArray IcePatch2ClientProps; static const PropertyArray IceSSLProps; static const PropertyArray IceStormAdminProps; static const PropertyArray IceBTProps; diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp index f6087267c81..23369aac08f 100644 --- a/cpp/src/IceGrid/Activator.cpp +++ b/cpp/src/IceGrid/Activator.cpp @@ -12,8 +12,6 @@ #include <IceGrid/Util.h> #include <IceGrid/ServerI.h> -#include <IcePatch2Lib/Util.h> - #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -375,7 +373,7 @@ Activator::activate(const string& name, throw invalid_argument("The server executable path is empty."); } - string pwd = IcePatch2Internal::simplify(pwdPath); + string pwd = simplify(pwdPath); #ifdef _WIN32 if(!IceUtilInternal::isAbsolutePath(path)) { diff --git a/cpp/src/IceGrid/AdminI.cpp b/cpp/src/IceGrid/AdminI.cpp index 061c5d131b7..3596852add6 100644 --- a/cpp/src/IceGrid/AdminI.cpp +++ b/cpp/src/IceGrid/AdminI.cpp @@ -100,50 +100,6 @@ private: string _node; }; -template<class AmdCB> -class AMDPatcherFeedbackAggregator : public PatcherFeedbackAggregator -{ -public: - - AMDPatcherFeedbackAggregator(const AmdCB& cb, - Ice::Identity id, - const TraceLevelsPtr& traceLevels, - const string& type, - const string& name, - int nodeCount) : - PatcherFeedbackAggregator(id, traceLevels, type, name, nodeCount), - _cb(cb) - { - } - -private: - - void - response() - { - _cb->ice_response(); - } - - void - exception(const Ice::Exception& ex) - { - _cb->ice_exception(ex); - } - - const AmdCB _cb; -}; - -template<typename AmdCB> PatcherFeedbackAggregatorPtr -static newPatcherFeedback(const AmdCB& cb, - Ice::Identity id, - const TraceLevelsPtr& traceLevels, - const string& type, - const string& name, - int nodeCount) -{ - return new AMDPatcherFeedbackAggregator<AmdCB>(cb, id, traceLevels, type, name, nodeCount); -} - } AdminI::AdminI(const DatabasePtr& database, const RegistryIPtr& registry, const AdminSessionIPtr& session) : @@ -227,64 +183,6 @@ AdminI::instantiateServer(const string& app, const string& node, const ServerIns _database->instantiateServer(app, node, desc, _session.get()); } -void -AdminI::patchApplication_async(const AMD_Admin_patchApplicationPtr& amdCB, - const string& name, - bool shutdown, - const Current& current) -{ - ApplicationHelper helper(current.adapter->getCommunicator(), _database->getApplicationInfo(name).descriptor); - DistributionDescriptor appDistrib; - vector<string> nodes; - helper.getDistributions(appDistrib, nodes); - - if(nodes.empty()) - { - amdCB->ice_response(); - return; - } - - Ice::Identity id; - id.category = current.id.category; - id.name = Ice::generateUUID(); - - PatcherFeedbackAggregatorPtr feedback = - newPatcherFeedback(amdCB, id, _traceLevels, "application", name, static_cast<int>(nodes.size())); - - for(vector<string>::const_iterator p = nodes.begin(); p != nodes.end(); ++p) - { - try - { - if(_traceLevels->patch > 0) - { - Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); - out << "started patching of application `" << name << "' on node `" << *p << "'"; - } - - NodeEntryPtr node = _database->getNode(*p); - Resolver resolve(node->getInfo(), _database->getCommunicator()); - DistributionDescriptor desc = resolve(appDistrib); - InternalDistributionDescriptorPtr intAppDistrib = new InternalDistributionDescriptor(desc.icepatch, - desc.directories); - node->getSession()->patch(feedback, name, "", intAppDistrib, shutdown); - } - catch(const NodeNotExistException&) - { - feedback->failed(*p, "node doesn't exist"); - } - catch(const NodeUnreachableException& e) - { - feedback->failed(*p, "node is unreachable: " + e.reason); - } - catch(const Ice::Exception& e) - { - ostringstream os; - os << e; - feedback->failed(*p, "node is unreachable:\n" + os.str()); - } - } -} - ApplicationInfo AdminI::getApplicationInfo(const string& name, const Current&) const { @@ -318,12 +216,6 @@ AdminI::getDefaultApplicationDescriptor(const Current& current) const warn << "default application descriptor:\nnode definitions are not allowed."; desc.nodes.clear(); } - if(!desc.distrib.icepatch.empty() || !desc.distrib.directories.empty()) - { - Ice::Warning warn(_traceLevels->logger); - warn << "default application descriptor:\ndistribution is not allowed."; - desc.distrib = DistributionDescriptor(); - } if(!desc.replicaGroups.empty()) { Ice::Warning warn(_traceLevels->logger); @@ -515,64 +407,6 @@ AdminI::stopServer_async(const AMD_Admin_stopServerPtr& amdCB, const string& id, } void -AdminI::patchServer_async(const AMD_Admin_patchServerPtr& amdCB, const string& id, bool shutdown, - const Current& current) -{ - ServerInfo info = _database->getServer(id)->getInfo(); - ApplicationInfo appInfo = _database->getApplicationInfo(info.application); - ApplicationHelper helper(current.adapter->getCommunicator(), appInfo.descriptor); - DistributionDescriptor appDistrib; - vector<string> nodes; - helper.getDistributions(appDistrib, nodes, id); - - if(appDistrib.icepatch.empty() && nodes.empty()) - { - amdCB->ice_response(); - return; - } - - assert(nodes.size() == 1); - - Ice::Identity identity; - identity.category = current.id.category; - identity.name = Ice::generateUUID(); - - PatcherFeedbackAggregatorPtr feedback = - newPatcherFeedback(amdCB, identity, _traceLevels, "server", id, static_cast<int>(nodes.size())); - - vector<string>::const_iterator p = nodes.begin(); - try - { - if(_traceLevels->patch > 0) - { - Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); - out << "started patching of server `" << id << "' on node `" << *p << "'"; - } - - NodeEntryPtr node = _database->getNode(*p); - Resolver resolve(node->getInfo(), _database->getCommunicator()); - DistributionDescriptor desc = resolve(appDistrib); - InternalDistributionDescriptorPtr intAppDistrib = new InternalDistributionDescriptor(desc.icepatch, - desc.directories); - node->getSession()->patch(feedback, info.application, id, intAppDistrib, shutdown); - } - catch(const NodeNotExistException&) - { - feedback->failed(*p, "node doesn't exist"); - } - catch(const NodeUnreachableException& e) - { - feedback->failed(*p, "node is unreachable: " + e.reason); - } - catch(const Ice::Exception& e) - { - ostringstream os; - os << e; - feedback->failed(*p, "node is unreachable:\n" + os.str()); - } -} - -void AdminI::sendSignal(const string& id, const string& signal, const Current&) { ServerProxyWrapper proxy(_database, id); diff --git a/cpp/src/IceGrid/AdminI.h b/cpp/src/IceGrid/AdminI.h index 4f37e4211de..6ae5e4cd74c 100644 --- a/cpp/src/IceGrid/AdminI.h +++ b/cpp/src/IceGrid/AdminI.h @@ -37,8 +37,6 @@ public: virtual void removeApplication(const std::string&, const Ice::Current&); virtual void instantiateServer(const std::string&, const std::string&, const ServerInstanceDescriptor&, const Ice::Current&); - virtual void patchApplication_async(const AMD_Admin_patchApplicationPtr&, const std::string&, bool, - const Ice::Current&); virtual ApplicationInfo getApplicationInfo(const ::std::string&, const Ice::Current&) const; virtual ApplicationDescriptor getDefaultApplicationDescriptor(const Ice::Current&) const; virtual Ice::StringSeq getAllApplicationNames(const Ice::Current&) const; @@ -50,7 +48,6 @@ public: virtual Ice::ObjectPrx getServerAdmin(const std::string&, const Ice::Current&) const; virtual void startServer_async(const AMD_Admin_startServerPtr&, const ::std::string&, const Ice::Current&); virtual void stopServer_async(const AMD_Admin_stopServerPtr&, const ::std::string&, const Ice::Current&); - virtual void patchServer_async(const AMD_Admin_patchServerPtr&, const ::std::string&, bool, const Ice::Current&); virtual void sendSignal(const ::std::string&, const ::std::string&, const Ice::Current&); virtual Ice::StringSeq getAllServerIds(const Ice::Current&) const; virtual void enableServer(const ::std::string&, bool, const Ice::Current&); diff --git a/cpp/src/IceGrid/DescriptorBuilder.cpp b/cpp/src/IceGrid/DescriptorBuilder.cpp index c6e2cbd4134..472af859692 100644 --- a/cpp/src/IceGrid/DescriptorBuilder.cpp +++ b/cpp/src/IceGrid/DescriptorBuilder.cpp @@ -402,18 +402,6 @@ ApplicationDescriptorBuilder::addPropertySet(const string& id, const PropertySet } } -void -ApplicationDescriptorBuilder::addDistribution(const XmlAttributesHelper& attrs) -{ - _descriptor.distrib.icepatch = attrs("icepatch", "${application}.IcePatch2/server"); -} - -void -ApplicationDescriptorBuilder::addDistributionDirectory(const string& directory) -{ - _descriptor.distrib.directories.push_back(directory); -} - bool ApplicationDescriptorBuilder::isOverride(const string& name) { @@ -837,7 +825,6 @@ ServerDescriptorBuilder::init(const ServerDescriptorPtr& desc, const XmlAttribut _descriptor->deactivationTimeout = attrs("deactivation-timeout", ""); _descriptor->pwd = attrs("pwd", ""); _descriptor->activation = attrs("activation", "manual"); - _descriptor->applicationDistrib = attrs.asBool("application-distrib", true); _descriptor->allocatable = attrs.asBool("allocatable", false); _descriptor->user = attrs("user", ""); _descriptor->iceVersion = attrs("ice-version", ""); @@ -879,18 +866,6 @@ ServerDescriptorBuilder::addServiceInstance(const ServiceInstanceDescriptor& /*d assert(false); } -void -ServerDescriptorBuilder::addDistribution(const XmlAttributesHelper& attrs) -{ - _descriptor->distrib.icepatch = attrs("icepatch", "${application}.IcePatch2/server"); -} - -void -ServerDescriptorBuilder::addDistributionDirectory(const string& directory) -{ - _descriptor->distrib.directories.push_back(directory); -} - IceBoxDescriptorBuilder::IceBoxDescriptorBuilder(const Ice::CommunicatorPtr& communicator, const XmlAttributesHelper& attrs) : ServerDescriptorBuilder(communicator) diff --git a/cpp/src/IceGrid/DescriptorBuilder.h b/cpp/src/IceGrid/DescriptorBuilder.h index dfc1fa705db..f58cf8e7a0e 100644 --- a/cpp/src/IceGrid/DescriptorBuilder.h +++ b/cpp/src/IceGrid/DescriptorBuilder.h @@ -115,9 +115,6 @@ public: void addServiceTemplate(const std::string&, const TemplateDescriptor&); void addPropertySet(const std::string&, const PropertySetDescriptor&); - void addDistribution(const XmlAttributesHelper&); - void addDistributionDirectory(const std::string&); - bool isOverride(const std::string&); const Ice::CommunicatorPtr& getCommunicator() const { return _communicator; } @@ -267,8 +264,6 @@ public: virtual void addEnv(const std::string&); virtual void addService(const ServiceDescriptorPtr&); virtual void addServiceInstance(const ServiceInstanceDescriptor&); - virtual void addDistribution(const XmlAttributesHelper&); - virtual void addDistributionDirectory(const std::string&); const ServerDescriptorPtr& getDescriptor() const { return _descriptor; } diff --git a/cpp/src/IceGrid/DescriptorHelper.cpp b/cpp/src/IceGrid/DescriptorHelper.cpp index c62bf1e622a..58ec1da1ec9 100644 --- a/cpp/src/IceGrid/DescriptorHelper.cpp +++ b/cpp/src/IceGrid/DescriptorHelper.cpp @@ -565,15 +565,6 @@ Resolver::operator()(const Ice::StringSeq& values, const string& name) const return result; } -DistributionDescriptor -Resolver::operator()(const DistributionDescriptor& desc) const -{ - DistributionDescriptor result; - result.icepatch = operator()(desc.icepatch, "IcePatch2 server proxy"); - result.directories = operator()(desc.directories, "distribution source directory"); - return result; -} - PropertyDescriptorSeq Resolver::operator()(const PropertyDescriptorSeq& properties, const string& name) const { @@ -1019,8 +1010,6 @@ Resolver::getReserved() reserved["node.datadir"] = ""; reserved["node.data"] = ""; reserved["session.id"] = ""; - reserved["application.distrib"] = "${node.data}/distrib/${application}"; - reserved["server.distrib"] = "${node.data}/servers/${server}/distrib"; reserved["server"] = ""; reserved["server.data"] = "${node.data}/servers/${server}/data"; reserved["service"] = ""; @@ -1523,11 +1512,6 @@ ServerHelper::operator==(const CommunicatorHelper& h) const return false; } - if(_desc->distrib != helper->_desc->distrib) - { - return false; - } - if(_desc->allocatable != helper->_desc->allocatable) { return false; @@ -1624,10 +1608,6 @@ ServerHelper::printImpl(const Ice::CommunicatorPtr& communicator, Output& out, c { out << nl << "user = `" << _desc->user << "'"; } - if(!_desc->applicationDistrib) - { - out << nl << "application distribution = `false'"; - } if(!_desc->options.empty()) { out << nl << "options = `" << toString(_desc->options) << "'"; @@ -1636,17 +1616,6 @@ ServerHelper::printImpl(const Ice::CommunicatorPtr& communicator, Output& out, c { out << nl << "envs = `" << toString(_desc->envs) << "'"; } - if(!_desc->distrib.icepatch.empty()) - { - out << nl << "distribution"; - out << sb; - out << nl << "proxy = `" << _desc->distrib.icepatch << "'"; - if(!_desc->distrib.directories.empty()) - { - out << nl << "directories = `" << toString(_desc->distrib.directories) << "'"; - } - out << eb; - } CommunicatorHelper::print(communicator, out); } @@ -1662,7 +1631,6 @@ ServerHelper::instantiateImpl(const ServerDescriptorPtr& instance, instance->iceVersion = resolve(_desc->iceVersion, "ice version"); instance->pwd = resolve(_desc->pwd, "working directory path"); instance->activation = resolve(_desc->activation, "activation"); - instance->applicationDistrib = _desc->applicationDistrib; instance->allocatable = _desc->allocatable; instance->user = resolve(_desc->user, "user"); if(!instance->activation.empty() && @@ -1677,7 +1645,6 @@ ServerHelper::instantiateImpl(const ServerDescriptorPtr& instance, instance->deactivationTimeout = resolve.asInt(_desc->deactivationTimeout, "deactivation timeout"); instance->options = resolve(_desc->options, "option"); instance->envs = resolve(_desc->envs, "environment variable"); - instance->distrib = resolve(_desc->distrib); instance->propertySet.properties.insert(instance->propertySet.properties.end(), props.begin(), props.end()); } @@ -2444,52 +2411,6 @@ NodeHelper::getServerInfos(const string& app, const string& uuid, int revision, } bool -NodeHelper::hasDistributions(const string& server) const -{ - assert(_instantiated); - - // - // Get the server distributions to patch. - // - if(server.empty()) - { - for(ServerInstanceHelperDict::const_iterator p = _serverInstances.begin(); p != _serverInstances.end(); ++p) - { - if(!p->second.getServerInstance()->distrib.icepatch.empty()) - { - return true; - } - } - for(ServerInstanceHelperDict::const_iterator p = _servers.begin(); p != _servers.end(); ++p) - { - if(!p->second.getServerInstance()->distrib.icepatch.empty()) - { - return true; - } - } - } - else - { - ServerInstanceHelperDict::const_iterator p = _serverInstances.find(server); - if(p == _serverInstances.end()) - { - p = _servers.find(server); - if(p == _servers.end()) - { - return false; - } - } - - if(!p->second.getServerInstance()->distrib.icepatch.empty()) - { - return true; - } - } - - return false; -} - -bool NodeHelper::hasServers() const { return !_serverInstances.empty() || !_servers.empty(); @@ -2673,7 +2594,6 @@ ApplicationHelper::ApplicationHelper(const Ice::CommunicatorPtr& communicator, _instance.serverTemplates = _def.serverTemplates; _instance.serviceTemplates = _def.serviceTemplates; _instance.description = resolve(_def.description, "description"); - _instance.distrib = resolve(_def.distrib); _instance.propertySets = resolve(_def.propertySets); for(ReplicaGroupDescriptorSeq::iterator r = _def.replicaGroups.begin(); r != _def.replicaGroups.end(); ++r) @@ -2806,11 +2726,6 @@ ApplicationHelper::diff(const ApplicationHelper& helper) const updt.propertySets = getDictUpdatedElts(helper._def.propertySets, _def.propertySets); updt.removePropertySets = getDictRemovedElts(helper._def.propertySets, _def.propertySets); - if(_def.distrib != helper._def.distrib) - { - updt.distrib = new BoxedDistributionDescriptor(_def.distrib); - } - GetReplicaGroupId rk; ReplicaGroupEq req; updt.replicaGroups = getSeqUpdatedEltsWithEq(helper._def.replicaGroups, _def.replicaGroups, rk, req); @@ -2856,7 +2771,6 @@ ApplicationHelper::update(const ApplicationUpdateDescriptor& updt) const def.name = _def.name; def.description = updt.description ? updt.description->value : _def.description; - def.distrib = updt.distrib ? updt.distrib->value : _def.distrib; def.replicaGroups = updateSeqElts(_def.replicaGroups, updt.replicaGroups, updt.removeReplicaGroups, rg); def.variables = updateDictElts(_def.variables, updt.variables, updt.removeVariables); def.propertySets = updateDictElts(_def.propertySets, updt.propertySets, updt.removePropertySets); @@ -3007,32 +2921,6 @@ ApplicationHelper::getServerInfos(const string& uuid, int revision) const } void -ApplicationHelper::getDistributions(DistributionDescriptor& distribution, - vector<string>& nodes, - const string& server) const -{ - assert(!_instance.name.empty()); - - distribution = _instance.distrib; - for(NodeHelperDict::const_iterator n = _nodes.begin(); n != _nodes.end(); ++n) - { - if(n->second.hasDistributions(server)) - { - nodes.push_back(n->first); - if(!server.empty()) - { - break; - } - } - else if(!_instance.distrib.icepatch.empty() && - ((server.empty() && n->second.hasServers()) || n->second.hasServer(server))) - { - nodes.push_back(n->first); - } - } -} - -void ApplicationHelper::print(Output& out, const ApplicationInfo& info) const { assert(!_instance.name.empty()); @@ -3080,17 +2968,6 @@ ApplicationHelper::print(Output& out, const ApplicationInfo& info) const out << eb; } } - if(!_instance.distrib.icepatch.empty()) - { - out << nl << "distribution"; - out << sb; - out << nl << "proxy = `" << _instance.distrib.icepatch << "'"; - if(!_instance.distrib.directories.empty()) - { - out << nl << "directories = `" << toString(_instance.distrib.directories) << "'"; - } - out << eb; - } if(!_instance.replicaGroups.empty()) { out << nl << "replica groups"; @@ -3180,12 +3057,6 @@ ApplicationHelper::printDiff(Output& out, const ApplicationHelper& helper) const } } { - if(_def.distrib != helper._def.distrib) - { - out << nl << "distribution updated"; - } - } - { PropertySetDescriptorDict updt = getDictUpdatedElts(helper._def.propertySets, _def.propertySets); Ice::StringSeq removed = getDictRemovedElts(helper._def.propertySets, _def.propertySets); if(!updt.empty() || !removed.empty()) diff --git a/cpp/src/IceGrid/DescriptorHelper.h b/cpp/src/IceGrid/DescriptorHelper.h index a358870c98c..4fa15ef3a5c 100644 --- a/cpp/src/IceGrid/DescriptorHelper.h +++ b/cpp/src/IceGrid/DescriptorHelper.h @@ -25,7 +25,6 @@ public: std::string operator()(const std::string&, const std::string& = std::string(), bool = true) const; Ice::StringSeq operator()(const Ice::StringSeq&, const std::string&) const; - DistributionDescriptor operator()(const DistributionDescriptor&) const; PropertyDescriptorSeq operator()(const PropertyDescriptorSeq&, const std::string& = std::string("property")) const; PropertySetDescriptorDict operator()(const PropertySetDescriptorDict&) const; ObjectDescriptorSeq operator()(const ObjectDescriptorSeq&, const std::string&, const std::string&) const; @@ -285,7 +284,6 @@ public: const NodeDescriptor& getDefinition() const; const NodeDescriptor& getInstance() const; void getServerInfos(const std::string&, const std::string&, int, std::map<std::string, ServerInfo>&) const; - bool hasDistributions(const std::string&) const; bool hasServers() const; bool hasServer(const std::string&) const; void print(IceUtilInternal::Output&) const; @@ -319,7 +317,6 @@ public: void getReplicaGroups(std::set<std::string>&, std::set<std::string>&) const; const ApplicationDescriptor& getDefinition() const; const ApplicationDescriptor& getInstance() const; - void getDistributions(DistributionDescriptor&, std::vector<std::string>&,const std::string& = std::string()) const; void print(IceUtilInternal::Output&, const ApplicationInfo&) const; void printDiff(IceUtilInternal::Output&, const ApplicationHelper&) const; diff --git a/cpp/src/IceGrid/DescriptorParser.cpp b/cpp/src/IceGrid/DescriptorParser.cpp index e7467acda1a..b86f8cbb775 100644 --- a/cpp/src/IceGrid/DescriptorParser.cpp +++ b/cpp/src/IceGrid/DescriptorParser.cpp @@ -4,7 +4,6 @@ #include <Ice/Ice.h> #include <IceXML/Parser.h> -#include <IcePatch2Lib/Util.h> #include <IceGrid/Admin.h> #include <IceGrid/DescriptorParser.h> #include <IceGrid/DescriptorBuilder.h> @@ -70,7 +69,6 @@ private: bool _inAdapter; bool _inReplicaGroup; bool _inDbEnv; - bool _inDistrib; }; } @@ -407,24 +405,6 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at } _currentCommunicator->addAllocatable(attributes); } - else if(name == "distrib") - { - if(!_currentApplication.get() || - ((_currentNode.get() || _currentTemplate.get()) && !_currentServer.get()) || - _currentServer.get() != _currentCommunicator) - { - error("the <distrib> element can only be a child of an <application>, <server> or <icebox> element"); - } - if(!_currentServer.get()) - { - _currentApplication->addDistribution(attributes); - } - else - { - _currentServer->addDistribution(attributes); - } - _inDistrib = true; - } else if(name == "dbenv") { if(!_currentCommunicator) @@ -450,7 +430,7 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at } _currentCommunicator->addDbEnvProperty(attributes); } - else if(name == "description" || name == "option" || name == "env" || name == "directory") + else if(name == "description" || name == "option" || name == "env") { // // Nothing to do. @@ -648,21 +628,6 @@ DescriptorHandler::endElement(const string& name, int line, int column) } _currentServer->addEnv(elementValue()); } - else if(name == "directory") - { - if(!_inDistrib) - { - error("the <directory> element can only be a child of a <distrib> element"); - } - if(!_currentServer.get()) - { - _currentApplication->addDistributionDirectory(elementValue()); - } - else - { - _currentServer->addDistributionDirectory(elementValue()); - } - } else if(name == "adapter") { _inAdapter = false; @@ -676,10 +641,6 @@ DescriptorHandler::endElement(const string& name, int line, int column) { _inDbEnv = false; } - else if(name == "distrib") - { - _inDistrib = false; - } } catch(const exception& ex) { @@ -857,7 +818,7 @@ DescriptorParser::parseDescriptor(const string& descriptor, const Ice::CommunicatorPtr& communicator, const IceGrid::AdminPrx& admin) { - string filename = IcePatch2Internal::simplify(descriptor); + string filename = simplify(descriptor); DescriptorHandler handler(filename, communicator); handler.setAdmin(admin); handler.setVariables(variables, targets); @@ -868,7 +829,7 @@ DescriptorParser::parseDescriptor(const string& descriptor, ApplicationDescriptor DescriptorParser::parseDescriptor(const string& descriptor, const Ice::CommunicatorPtr& communicator) { - string filename = IcePatch2Internal::simplify(descriptor); + string filename = simplify(descriptor); DescriptorHandler handler(filename, communicator); IceXML::Parser::parse(filename, handler); return handler.getApplicationDescriptor(); diff --git a/cpp/src/IceGrid/Grammar.cpp b/cpp/src/IceGrid/Grammar.cpp index 93a23d12f24..2e3a629ac00 100644 --- a/cpp/src/IceGrid/Grammar.cpp +++ b/cpp/src/IceGrid/Grammar.cpp @@ -1,21 +1,24 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 2.3. */ -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - + the Free Software Foundation; either version 2, or (at your option) + any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -26,7 +29,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +47,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.7" +#define YYBISON_VERSION "2.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -52,17 +55,103 @@ /* Pure parsers. */ #define YYPURE 1 -/* Push parsers. */ -#define YYPUSH 0 +/* Using locations. */ +#define YYLSP_NEEDED 0 -/* Pull parsers. */ -#define YYPULL 1 + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + ICE_GRID_HELP = 258, + ICE_GRID_EXIT = 259, + ICE_GRID_APPLICATION = 260, + ICE_GRID_NODE = 261, + ICE_GRID_REGISTRY = 262, + ICE_GRID_SERVER = 263, + ICE_GRID_ADAPTER = 264, + ICE_GRID_PING = 265, + ICE_GRID_LOAD = 266, + ICE_GRID_SOCKETS = 267, + ICE_GRID_ADD = 268, + ICE_GRID_REMOVE = 269, + ICE_GRID_LIST = 270, + ICE_GRID_SHUTDOWN = 271, + ICE_GRID_STRING = 272, + ICE_GRID_START = 273, + ICE_GRID_STOP = 274, + ICE_GRID_SIGNAL = 275, + ICE_GRID_STDOUT = 276, + ICE_GRID_STDERR = 277, + ICE_GRID_DESCRIBE = 278, + ICE_GRID_PROPERTIES = 279, + ICE_GRID_PROPERTY = 280, + ICE_GRID_STATE = 281, + ICE_GRID_PID = 282, + ICE_GRID_ENDPOINTS = 283, + ICE_GRID_ACTIVATION = 284, + ICE_GRID_OBJECT = 285, + ICE_GRID_FIND = 286, + ICE_GRID_SHOW = 287, + ICE_GRID_COPYING = 288, + ICE_GRID_WARRANTY = 289, + ICE_GRID_DIFF = 290, + ICE_GRID_UPDATE = 291, + ICE_GRID_INSTANTIATE = 292, + ICE_GRID_TEMPLATE = 293, + ICE_GRID_SERVICE = 294, + ICE_GRID_ENABLE = 295, + ICE_GRID_DISABLE = 296 + }; +#endif +/* Tokens. */ +#define ICE_GRID_HELP 258 +#define ICE_GRID_EXIT 259 +#define ICE_GRID_APPLICATION 260 +#define ICE_GRID_NODE 261 +#define ICE_GRID_REGISTRY 262 +#define ICE_GRID_SERVER 263 +#define ICE_GRID_ADAPTER 264 +#define ICE_GRID_PING 265 +#define ICE_GRID_LOAD 266 +#define ICE_GRID_SOCKETS 267 +#define ICE_GRID_ADD 268 +#define ICE_GRID_REMOVE 269 +#define ICE_GRID_LIST 270 +#define ICE_GRID_SHUTDOWN 271 +#define ICE_GRID_STRING 272 +#define ICE_GRID_START 273 +#define ICE_GRID_STOP 274 +#define ICE_GRID_SIGNAL 275 +#define ICE_GRID_STDOUT 276 +#define ICE_GRID_STDERR 277 +#define ICE_GRID_DESCRIBE 278 +#define ICE_GRID_PROPERTIES 279 +#define ICE_GRID_PROPERTY 280 +#define ICE_GRID_STATE 281 +#define ICE_GRID_PID 282 +#define ICE_GRID_ENDPOINTS 283 +#define ICE_GRID_ACTIVATION 284 +#define ICE_GRID_OBJECT 285 +#define ICE_GRID_FIND 286 +#define ICE_GRID_SHOW 287 +#define ICE_GRID_COPYING 288 +#define ICE_GRID_WARRANTY 289 +#define ICE_GRID_DIFF 290 +#define ICE_GRID_UPDATE 291 +#define ICE_GRID_INSTANTIATE 292 +#define ICE_GRID_TEMPLATE 293 +#define ICE_GRID_SERVICE 294 +#define ICE_GRID_ENABLE 295 +#define ICE_GRID_DISABLE 296 /* Copy the first part of user declarations. */ -/* Line 371 of yacc.c */ #line 1 "src/IceGrid/Grammar.y" @@ -110,16 +199,11 @@ yyerror(const char* s) } -/* Line 371 of yacc.c */ -#line 112 "src/IceGrid/Grammar.cpp" -# ifndef YY_NULL -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr -# else -# define YY_NULL 0 -# endif -# endif +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -129,96 +213,25 @@ yyerror(const char* s) # define YYERROR_VERBOSE 0 #endif -/* In a future release of Bison, this section will be replaced - by #include "Grammar.hpp". */ -#ifndef YY_YY_SRC_ICEGRID_GRAMMAR_HPP_INCLUDED -# define YY_YY_SRC_ICEGRID_GRAMMAR_HPP_INCLUDED -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 1 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ICE_GRID_HELP = 258, - ICE_GRID_EXIT = 259, - ICE_GRID_APPLICATION = 260, - ICE_GRID_NODE = 261, - ICE_GRID_REGISTRY = 262, - ICE_GRID_SERVER = 263, - ICE_GRID_ADAPTER = 264, - ICE_GRID_PING = 265, - ICE_GRID_LOAD = 266, - ICE_GRID_SOCKETS = 267, - ICE_GRID_ADD = 268, - ICE_GRID_REMOVE = 269, - ICE_GRID_LIST = 270, - ICE_GRID_SHUTDOWN = 271, - ICE_GRID_STRING = 272, - ICE_GRID_START = 273, - ICE_GRID_STOP = 274, - ICE_GRID_PATCH = 275, - ICE_GRID_SIGNAL = 276, - ICE_GRID_STDOUT = 277, - ICE_GRID_STDERR = 278, - ICE_GRID_DESCRIBE = 279, - ICE_GRID_PROPERTIES = 280, - ICE_GRID_PROPERTY = 281, - ICE_GRID_STATE = 282, - ICE_GRID_PID = 283, - ICE_GRID_ENDPOINTS = 284, - ICE_GRID_ACTIVATION = 285, - ICE_GRID_OBJECT = 286, - ICE_GRID_FIND = 287, - ICE_GRID_SHOW = 288, - ICE_GRID_COPYING = 289, - ICE_GRID_WARRANTY = 290, - ICE_GRID_DIFF = 291, - ICE_GRID_UPDATE = 292, - ICE_GRID_INSTANTIATE = 293, - ICE_GRID_TEMPLATE = 294, - ICE_GRID_SERVICE = 295, - ICE_GRID_ENABLE = 296, - ICE_GRID_DISABLE = 297 - }; +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 #endif - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - -#endif /* !YY_YY_SRC_ICEGRID_GRAMMAR_HPP_INCLUDED */ /* Copy the second part of user declarations. */ -/* Line 390 of yacc.c */ -#line 219 "src/IceGrid/Grammar.cpp" + +/* Line 216 of yacc.c. */ +#line 235 "src/IceGrid/Grammar.cpp" #ifdef short # undef short @@ -271,36 +284,36 @@ typedef short int yytype_int16; # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ -# define YY_(Msgid) Msgid +# define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YYUSE(e) ((void) (e)) #else -# define YYUSE(E) /* empty */ +# define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint -# define YYID(N) (N) +# define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int yyi) +YYID (int i) #else static int -YYID (yyi) - int yyi; +YYID (i) + int i; #endif { - return yyi; + return i; } #endif @@ -321,12 +334,11 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 +# ifndef _STDLIB_H +# define _STDLIB_H 1 # endif # endif # endif @@ -349,24 +361,24 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ +# if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 +# ifndef _STDLIB_H +# define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif @@ -382,9 +394,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; + yytype_int16 yyss; + YYSTYPE yyvs; + }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -395,19 +407,35 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ +# define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -415,43 +443,23 @@ union yyalloc #endif -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 2612 +#define YYLAST 2468 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 44 +#define YYNTOKENS 43 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 7 /* YYNRULES -- Number of rules. */ -#define YYNRULES 172 +#define YYNRULES 167 /* YYNRULES -- Number of states. */ -#define YYNSTATES 367 +#define YYNSTATES 356 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 297 +#define YYMAXUTOK 296 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -464,7 +472,7 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 43, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 42, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -488,7 +496,7 @@ static const yytype_uint8 yytranslate[] = 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42 + 35, 36, 37, 38, 39, 40, 41 }; #if YYDEBUG @@ -498,7 +506,7 @@ static const yytype_uint16 yyprhs[] = { 0, 0, 3, 5, 6, 10, 13, 14, 17, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, - 75, 80, 85, 90, 96, 102, 108, 114, 119, 125, + 75, 80, 86, 92, 98, 104, 109, 115, 121, 126, 131, 136, 141, 146, 151, 156, 161, 166, 171, 176, 181, 186, 191, 196, 201, 206, 211, 216, 221, 226, 231, 236, 241, 246, 251, 256, 261, 266, 271, 276, @@ -507,117 +515,113 @@ static const yytype_uint16 yyprhs[] = 381, 386, 391, 396, 401, 406, 411, 416, 421, 426, 431, 436, 441, 446, 451, 456, 461, 466, 471, 476, 481, 486, 491, 496, 501, 506, 511, 516, 521, 526, - 531, 536, 541, 546, 551, 556, 560, 564, 568, 573, - 579, 585, 592, 597, 601, 605, 610, 614, 618, 621, - 623, 626, 629, 633, 637, 638, 640, 642, 644, 646, - 648, 650, 652, 654, 656, 658, 660, 662, 664, 666, - 668, 670, 672, 674, 676, 678, 680, 682, 684, 686, - 688, 690, 692, 694, 696, 698, 700, 702, 704, 706, - 708, 710, 712 + 531, 536, 540, 544, 548, 553, 559, 565, 572, 577, + 581, 585, 590, 594, 598, 601, 603, 606, 609, 613, + 617, 618, 620, 622, 624, 626, 628, 630, 632, 634, + 636, 638, 640, 642, 644, 646, 648, 650, 652, 654, + 656, 658, 660, 662, 664, 666, 668, 670, 672, 674, + 676, 678, 680, 682, 684, 686, 688, 690 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { - 45, 0, -1, 46, -1, -1, 46, 47, 48, -1, - 47, 48, -1, -1, 3, 43, -1, 4, 43, -1, - 5, 13, 49, 43, -1, 5, 13, 3, 43, -1, - 5, 14, 49, 43, -1, 5, 14, 3, 43, -1, - 5, 36, 49, 43, -1, 5, 36, 3, 43, -1, - 5, 37, 49, 43, -1, 5, 37, 3, 43, -1, - 5, 24, 49, 43, -1, 5, 24, 3, 43, -1, - 5, 20, 49, 43, -1, 5, 20, 3, 43, -1, - 5, 15, 49, 43, -1, 5, 15, 3, 43, -1, - 8, 39, 24, 49, 43, -1, 8, 39, 24, 3, - 43, -1, 8, 39, 38, 49, 43, -1, 8, 39, - 38, 3, 43, -1, 8, 39, 3, 43, -1, 40, - 39, 24, 49, 43, -1, 40, 39, 24, 3, 43, - -1, 40, 39, 3, 43, -1, 6, 24, 49, 43, - -1, 6, 24, 3, 43, -1, 6, 10, 49, 43, - -1, 6, 10, 3, 43, -1, 6, 11, 49, 43, - -1, 6, 11, 3, 43, -1, 6, 12, 49, 43, - -1, 6, 12, 3, 43, -1, 6, 16, 49, 43, - -1, 6, 16, 3, 43, -1, 6, 15, 49, 43, - -1, 6, 15, 3, 43, -1, 6, 33, 49, 43, - -1, 6, 33, 3, 43, -1, 7, 24, 49, 43, - -1, 7, 24, 3, 43, -1, 7, 10, 49, 43, - -1, 7, 10, 3, 43, -1, 7, 16, 49, 43, - -1, 7, 16, 3, 43, -1, 7, 15, 49, 43, - -1, 7, 15, 3, 43, -1, 7, 33, 49, 43, - -1, 7, 33, 3, 43, -1, 8, 14, 49, 43, - -1, 8, 14, 3, 43, -1, 8, 24, 49, 43, - -1, 8, 24, 3, 43, -1, 8, 18, 49, 43, - -1, 8, 18, 3, 43, -1, 8, 19, 49, 43, - -1, 8, 19, 3, 43, -1, 8, 20, 49, 43, - -1, 8, 20, 3, 43, -1, 8, 21, 49, 43, - -1, 8, 21, 3, 43, -1, 8, 22, 49, 43, - -1, 8, 22, 3, 43, -1, 8, 23, 49, 43, - -1, 8, 23, 3, 43, -1, 8, 27, 49, 43, - -1, 8, 27, 3, 43, -1, 8, 28, 49, 43, - -1, 8, 28, 3, 43, -1, 8, 25, 49, 43, - -1, 8, 25, 3, 43, -1, 8, 26, 49, 43, - -1, 8, 26, 3, 43, -1, 8, 41, 49, 43, - -1, 8, 41, 3, 43, -1, 8, 42, 49, 43, - -1, 8, 42, 3, 43, -1, 8, 15, 49, 43, - -1, 8, 15, 3, 43, -1, 8, 33, 49, 43, - -1, 8, 33, 3, 43, -1, 40, 18, 49, 43, - -1, 40, 18, 3, 43, -1, 40, 19, 49, 43, - -1, 40, 19, 3, 43, -1, 40, 24, 49, 43, - -1, 40, 24, 3, 43, -1, 40, 25, 49, 43, - -1, 40, 25, 3, 43, -1, 40, 26, 49, 43, - -1, 40, 26, 3, 43, -1, 40, 15, 49, 43, - -1, 40, 15, 3, 43, -1, 9, 29, 49, 43, - -1, 9, 29, 3, 43, -1, 9, 14, 49, 43, - -1, 9, 14, 3, 43, -1, 9, 15, 49, 43, - -1, 9, 15, 3, 43, -1, 31, 13, 49, 43, - -1, 31, 13, 3, 43, -1, 31, 14, 49, 43, - -1, 31, 14, 3, 43, -1, 31, 32, 49, 43, - -1, 31, 32, 3, 43, -1, 31, 15, 49, 43, - -1, 31, 15, 3, 43, -1, 31, 24, 49, 43, - -1, 31, 24, 3, 43, -1, 33, 34, 43, -1, - 33, 35, 43, -1, 3, 50, 43, -1, 3, 50, - 50, 43, -1, 3, 50, 17, 49, 43, -1, 3, - 50, 50, 50, 43, -1, 3, 50, 50, 17, 49, - 43, -1, 3, 17, 49, 43, -1, 3, 1, 43, - -1, 50, 3, 43, -1, 50, 17, 1, 43, -1, - 50, 1, 43, -1, 17, 1, 43, -1, 1, 43, - -1, 43, -1, 17, 49, -1, 50, 49, -1, 17, - 3, 49, -1, 50, 3, 49, -1, -1, 4, -1, + 44, 0, -1, 45, -1, -1, 45, 46, 47, -1, + 46, 47, -1, -1, 3, 42, -1, 4, 42, -1, + 5, 13, 48, 42, -1, 5, 13, 3, 42, -1, + 5, 14, 48, 42, -1, 5, 14, 3, 42, -1, + 5, 35, 48, 42, -1, 5, 35, 3, 42, -1, + 5, 36, 48, 42, -1, 5, 36, 3, 42, -1, + 5, 23, 48, 42, -1, 5, 23, 3, 42, -1, + 5, 15, 48, 42, -1, 5, 15, 3, 42, -1, + 8, 38, 23, 48, 42, -1, 8, 38, 23, 3, + 42, -1, 8, 38, 37, 48, 42, -1, 8, 38, + 37, 3, 42, -1, 8, 38, 3, 42, -1, 39, + 38, 23, 48, 42, -1, 39, 38, 23, 3, 42, + -1, 39, 38, 3, 42, -1, 6, 23, 48, 42, + -1, 6, 23, 3, 42, -1, 6, 10, 48, 42, + -1, 6, 10, 3, 42, -1, 6, 11, 48, 42, + -1, 6, 11, 3, 42, -1, 6, 12, 48, 42, + -1, 6, 12, 3, 42, -1, 6, 16, 48, 42, + -1, 6, 16, 3, 42, -1, 6, 15, 48, 42, + -1, 6, 15, 3, 42, -1, 6, 32, 48, 42, + -1, 6, 32, 3, 42, -1, 7, 23, 48, 42, + -1, 7, 23, 3, 42, -1, 7, 10, 48, 42, + -1, 7, 10, 3, 42, -1, 7, 16, 48, 42, + -1, 7, 16, 3, 42, -1, 7, 15, 48, 42, + -1, 7, 15, 3, 42, -1, 7, 32, 48, 42, + -1, 7, 32, 3, 42, -1, 8, 14, 48, 42, + -1, 8, 14, 3, 42, -1, 8, 23, 48, 42, + -1, 8, 23, 3, 42, -1, 8, 18, 48, 42, + -1, 8, 18, 3, 42, -1, 8, 19, 48, 42, + -1, 8, 19, 3, 42, -1, 8, 20, 48, 42, + -1, 8, 20, 3, 42, -1, 8, 21, 48, 42, + -1, 8, 21, 3, 42, -1, 8, 22, 48, 42, + -1, 8, 22, 3, 42, -1, 8, 26, 48, 42, + -1, 8, 26, 3, 42, -1, 8, 27, 48, 42, + -1, 8, 27, 3, 42, -1, 8, 24, 48, 42, + -1, 8, 24, 3, 42, -1, 8, 25, 48, 42, + -1, 8, 25, 3, 42, -1, 8, 40, 48, 42, + -1, 8, 40, 3, 42, -1, 8, 41, 48, 42, + -1, 8, 41, 3, 42, -1, 8, 15, 48, 42, + -1, 8, 15, 3, 42, -1, 8, 32, 48, 42, + -1, 8, 32, 3, 42, -1, 39, 18, 48, 42, + -1, 39, 18, 3, 42, -1, 39, 19, 48, 42, + -1, 39, 19, 3, 42, -1, 39, 23, 48, 42, + -1, 39, 23, 3, 42, -1, 39, 24, 48, 42, + -1, 39, 24, 3, 42, -1, 39, 25, 48, 42, + -1, 39, 25, 3, 42, -1, 39, 15, 48, 42, + -1, 39, 15, 3, 42, -1, 9, 28, 48, 42, + -1, 9, 28, 3, 42, -1, 9, 14, 48, 42, + -1, 9, 14, 3, 42, -1, 9, 15, 48, 42, + -1, 9, 15, 3, 42, -1, 30, 13, 48, 42, + -1, 30, 13, 3, 42, -1, 30, 14, 48, 42, + -1, 30, 14, 3, 42, -1, 30, 31, 48, 42, + -1, 30, 31, 3, 42, -1, 30, 15, 48, 42, + -1, 30, 15, 3, 42, -1, 30, 23, 48, 42, + -1, 30, 23, 3, 42, -1, 32, 33, 42, -1, + 32, 34, 42, -1, 3, 49, 42, -1, 3, 49, + 49, 42, -1, 3, 49, 17, 48, 42, -1, 3, + 49, 49, 49, 42, -1, 3, 49, 49, 17, 48, + 42, -1, 3, 17, 48, 42, -1, 3, 1, 42, + -1, 49, 3, 42, -1, 49, 17, 1, 42, -1, + 49, 1, 42, -1, 17, 1, 42, -1, 1, 42, + -1, 42, -1, 17, 48, -1, 49, 48, -1, 17, + 3, 48, -1, 49, 3, 48, -1, -1, 4, -1, 5, -1, 6, -1, 7, -1, 8, -1, 9, -1, 10, -1, 11, -1, 12, -1, 13, -1, 14, -1, 15, -1, 16, -1, 18, -1, 19, -1, 20, -1, - 21, -1, 24, -1, 27, -1, 28, -1, 25, -1, - 26, -1, 29, -1, 30, -1, 31, -1, 32, -1, + 23, -1, 26, -1, 27, -1, 24, -1, 25, -1, + 28, -1, 29, -1, 30, -1, 31, -1, 32, -1, 33, -1, 34, -1, 35, -1, 36, -1, 37, -1, - 38, -1, 39, -1, 40, -1, 41, -1, 42, -1, - 23, -1, 22, -1 + 38, -1, 39, -1, 40, -1, 41, -1, 22, -1, + 21, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 98, 98, 102, 109, 112, 119, 127, 131, 135, - 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, - 179, 183, 187, 191, 195, 199, 203, 207, 211, 215, - 219, 223, 227, 231, 235, 239, 243, 247, 251, 255, - 259, 263, 267, 271, 275, 279, 283, 287, 291, 295, - 299, 303, 307, 311, 315, 319, 323, 327, 331, 335, - 339, 343, 347, 351, 355, 359, 363, 367, 371, 375, - 379, 383, 387, 391, 395, 399, 403, 407, 411, 415, - 419, 423, 427, 431, 435, 439, 443, 447, 451, 455, - 459, 463, 467, 471, 475, 479, 483, 487, 491, 495, - 499, 503, 507, 511, 515, 519, 523, 527, 531, 535, - 539, 543, 547, 551, 555, 559, 563, 567, 571, 582, - 586, 597, 608, 612, 616, 620, 626, 631, 636, 640, - 648, 653, 658, 664, 671, 679, 682, 685, 688, 691, - 694, 697, 700, 703, 706, 709, 712, 715, 718, 721, - 724, 727, 730, 733, 736, 739, 742, 745, 748, 751, - 754, 757, 760, 763, 766, 769, 772, 775, 778, 781, - 784, 787, 790 + 0, 100, 100, 104, 111, 114, 121, 129, 133, 137, + 141, 145, 149, 153, 157, 161, 165, 169, 173, 177, + 181, 185, 189, 193, 197, 201, 205, 209, 213, 217, + 221, 225, 229, 233, 237, 241, 245, 249, 253, 257, + 261, 265, 269, 273, 277, 281, 285, 289, 293, 297, + 301, 305, 309, 313, 317, 321, 325, 329, 333, 337, + 341, 345, 349, 353, 357, 361, 365, 369, 373, 377, + 381, 385, 389, 393, 397, 401, 405, 409, 413, 417, + 421, 425, 429, 433, 437, 441, 445, 449, 453, 457, + 461, 465, 469, 473, 477, 481, 485, 489, 493, 497, + 501, 505, 509, 513, 517, 521, 525, 529, 533, 537, + 541, 545, 549, 553, 557, 568, 572, 583, 594, 598, + 602, 606, 612, 617, 622, 626, 634, 639, 644, 650, + 657, 665, 668, 671, 674, 677, 680, 683, 686, 689, + 692, 695, 698, 701, 704, 707, 710, 713, 716, 719, + 722, 725, 728, 731, 734, 737, 740, 743, 746, 749, + 752, 755, 758, 761, 764, 767, 770, 773 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -627,15 +631,15 @@ static const char *const yytname[] = "ICE_GRID_SERVER", "ICE_GRID_ADAPTER", "ICE_GRID_PING", "ICE_GRID_LOAD", "ICE_GRID_SOCKETS", "ICE_GRID_ADD", "ICE_GRID_REMOVE", "ICE_GRID_LIST", "ICE_GRID_SHUTDOWN", "ICE_GRID_STRING", "ICE_GRID_START", - "ICE_GRID_STOP", "ICE_GRID_PATCH", "ICE_GRID_SIGNAL", "ICE_GRID_STDOUT", - "ICE_GRID_STDERR", "ICE_GRID_DESCRIBE", "ICE_GRID_PROPERTIES", - "ICE_GRID_PROPERTY", "ICE_GRID_STATE", "ICE_GRID_PID", - "ICE_GRID_ENDPOINTS", "ICE_GRID_ACTIVATION", "ICE_GRID_OBJECT", - "ICE_GRID_FIND", "ICE_GRID_SHOW", "ICE_GRID_COPYING", - "ICE_GRID_WARRANTY", "ICE_GRID_DIFF", "ICE_GRID_UPDATE", - "ICE_GRID_INSTANTIATE", "ICE_GRID_TEMPLATE", "ICE_GRID_SERVICE", - "ICE_GRID_ENABLE", "ICE_GRID_DISABLE", "';'", "$accept", "start", - "commands", "checkInterrupted", "command", "strings", "keyword", YY_NULL + "ICE_GRID_STOP", "ICE_GRID_SIGNAL", "ICE_GRID_STDOUT", "ICE_GRID_STDERR", + "ICE_GRID_DESCRIBE", "ICE_GRID_PROPERTIES", "ICE_GRID_PROPERTY", + "ICE_GRID_STATE", "ICE_GRID_PID", "ICE_GRID_ENDPOINTS", + "ICE_GRID_ACTIVATION", "ICE_GRID_OBJECT", "ICE_GRID_FIND", + "ICE_GRID_SHOW", "ICE_GRID_COPYING", "ICE_GRID_WARRANTY", + "ICE_GRID_DIFF", "ICE_GRID_UPDATE", "ICE_GRID_INSTANTIATE", + "ICE_GRID_TEMPLATE", "ICE_GRID_SERVICE", "ICE_GRID_ENABLE", + "ICE_GRID_DISABLE", "';'", "$accept", "start", "commands", + "checkInterrupted", "command", "strings", "keyword", 0 }; #endif @@ -648,31 +652,30 @@ static const yytype_uint16 yytoknum[] = 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 59 + 295, 296, 59 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 44, 45, 45, 46, 46, 47, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 49, 49, 49, 49, 49, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50 + 0, 43, 44, 44, 45, 45, 46, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 48, 48, 48, 48, + 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -680,7 +683,7 @@ static const yytype_uint8 yyr2[] = { 0, 2, 1, 0, 3, 2, 0, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 5, 5, 5, 5, 4, 5, 5, + 4, 5, 5, 5, 5, 4, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, @@ -689,604 +692,392 @@ static const yytype_uint8 yyr2[] = 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 3, 3, 3, 4, 5, - 5, 6, 4, 3, 3, 4, 3, 3, 2, 1, - 2, 2, 3, 3, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 4, 3, 3, 3, 4, 5, 5, 6, 4, 3, + 3, 4, 3, 3, 2, 1, 2, 2, 3, 3, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1 + 1, 1, 1, 1, 1, 1, 1, 1 }; -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { - 6, 0, 6, 0, 1, 0, 0, 0, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 147, 0, 148, 149, 150, 151, 172, 171, 152, 155, - 156, 153, 154, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 129, 5, 0, - 4, 128, 0, 135, 136, 137, 138, 139, 140, 134, - 159, 161, 168, 7, 0, 8, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 0, - 134, 134, 134, 134, 134, 0, 134, 134, 134, 134, - 134, 0, 0, 134, 134, 134, 134, 134, 134, 0, - 0, 0, 0, 123, 134, 0, 134, 134, 117, 0, + 6, 0, 6, 0, 1, 0, 0, 0, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 0, 144, 145, 146, 167, 166, 147, 150, 151, + 148, 149, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 125, 5, 0, 4, + 124, 0, 131, 132, 133, 134, 135, 136, 130, 154, + 156, 163, 7, 0, 8, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 0, 130, 130, 130, + 130, 130, 0, 130, 130, 130, 130, 130, 0, 0, + 130, 130, 130, 130, 130, 130, 0, 0, 0, 0, + 119, 130, 0, 130, 130, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 134, 134, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 115, 116, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 134, 126, 124, 0, 134, - 130, 122, 134, 131, 0, 134, 118, 0, 10, 9, - 12, 11, 22, 21, 20, 19, 18, 17, 14, 13, - 16, 15, 34, 33, 36, 35, 38, 37, 42, 41, - 40, 39, 32, 31, 44, 43, 48, 47, 52, 51, - 50, 49, 46, 45, 54, 53, 56, 55, 84, 83, - 60, 59, 62, 61, 64, 63, 66, 65, 68, 67, - 70, 69, 58, 57, 76, 75, 78, 77, 72, 71, - 74, 73, 86, 85, 27, 0, 0, 0, 0, 80, - 79, 82, 81, 102, 101, 104, 103, 100, 99, 106, - 105, 108, 107, 112, 111, 114, 113, 110, 109, 98, - 97, 88, 87, 90, 89, 92, 91, 94, 93, 96, - 95, 30, 0, 0, 125, 132, 133, 119, 0, 120, - 24, 23, 26, 25, 29, 28, 121 + 130, 130, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 123, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 111, 112, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 130, 122, + 120, 0, 130, 126, 118, 130, 127, 0, 130, 114, + 0, 10, 9, 12, 11, 20, 19, 18, 17, 14, + 13, 16, 15, 32, 31, 34, 33, 36, 35, 40, + 39, 38, 37, 30, 29, 42, 41, 46, 45, 50, + 49, 48, 47, 44, 43, 52, 51, 54, 53, 80, + 79, 58, 57, 60, 59, 62, 61, 64, 63, 66, + 65, 56, 55, 72, 71, 74, 73, 68, 67, 70, + 69, 82, 81, 25, 0, 0, 0, 0, 76, 75, + 78, 77, 98, 97, 100, 99, 96, 95, 102, 101, + 104, 103, 108, 107, 110, 109, 106, 105, 94, 93, + 84, 83, 86, 85, 88, 87, 90, 89, 92, 91, + 28, 0, 0, 121, 128, 129, 115, 0, 116, 22, + 21, 24, 23, 27, 26, 117 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { - -1, 1, 2, 3, 48, 125, 126 + -1, 1, 2, 3, 47, 122, 123 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -67 +#define YYPACT_NINF -66 static const yytype_int16 yypact[] = { - 39, 53, 56, 61, -67, 61, 20, 179, 69, 93, - 142, 2492, 123, 95, -67, -67, -67, -67, -67, -67, - -67, 117, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, 146, -67, 11, -67, -67, - -67, -67, -67, -67, 96, -67, -67, -67, -67, 122, - -67, -67, 76, -67, -67, -67, -67, -67, -67, 2459, - -67, -67, -67, -67, 219, -67, 260, 300, 340, 380, - 420, 460, 500, 540, 580, 620, 660, 700, 740, 780, - 820, 860, 900, 940, 980, 1020, 1060, 1100, 1140, 1180, - 1220, 1260, 1300, 1340, 1380, 1420, 1460, 1500, 1540, 102, - 1580, 1620, 1660, 1700, 1740, 84, 1780, 1820, 1860, 1900, - 1940, 85, 90, 1980, 2020, 2060, 2100, 2140, 2180, 30, - 91, 112, 135, -67, 2220, 120, 2260, 2459, -67, 2299, - 124, 125, 128, 129, 131, 134, 139, 2460, 2461, 2462, - 2463, 2466, 2467, 2468, 2469, 2470, 2471, 2472, 2474, 2475, - 2476, 2477, 2478, 2479, 2480, 2481, 2483, 2484, 2485, 2486, - 2487, 2488, 2489, 2490, 2491, 2493, 2494, 2495, 2496, 2497, - 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, - 2508, 2509, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, - 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2340, 2380, 2525, - 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, -67, - 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2544, - -67, -67, 2545, 2546, 2547, 2548, 2549, 2550, 2551, 2552, - 2553, 2554, 2555, 2556, 2557, 2420, -67, -67, 2558, 2459, - -67, -67, 2459, -67, 2559, 2459, -67, 2560, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, 2561, 2562, 2563, 2564, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, 2565, 2566, -67, -67, -67, -67, 2567, -67, - -67, -67, -67, -67, -67, -67, -67 + 31, 52, 54, 59, -66, 59, 19, 171, 64, 2345, + 2351, 100, 119, 103, -66, -66, -66, -66, -66, -66, + -66, 108, -66, -66, -66, -66, -66, -66, -66, -66, + -66, -66, -66, -66, 135, -66, 10, -66, -66, -66, + -66, -66, -66, 89, -66, -66, -66, -66, 102, -66, + -66, 78, -66, -66, -66, -66, -66, -66, 2316, -66, + -66, -66, -66, 210, -66, 250, 289, 328, 367, 406, + 445, 484, 523, 562, 601, 640, 679, 718, 757, 796, + 835, 874, 913, 952, 991, 1030, 1069, 1108, 1147, 1186, + 1225, 1264, 1303, 1342, 1381, 1420, 99, 1459, 1498, 1537, + 1576, 1615, 79, 1654, 1693, 1732, 1771, 1810, 82, 86, + 1849, 1888, 1927, 1966, 2005, 2044, 34, 87, 88, 134, + -66, 2083, 105, 2122, 2316, -66, 2160, 110, 111, 112, + 113, 114, 120, 122, 123, 126, 127, 129, 2322, 2323, + 2327, 2328, 2329, 2330, 2331, 2333, 2334, 2335, 2336, 2337, + 2340, 2342, 2343, 2344, 2346, 2347, 2348, 2349, 2350, 2352, + 2353, 2354, 2355, 2356, 2357, 2358, 2359, 2360, 2361, 2362, + 2363, 2364, 2365, 2366, 2367, 2368, 2369, 2370, 2371, 2372, + 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, + 2200, 2239, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 2390, + 2391, 2392, -66, 2393, 2394, 2395, 2396, 2397, 2398, 2399, + 2400, 2401, 2402, -66, -66, 2403, 2404, 2405, 2406, 2407, + 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2278, -66, + -66, 2416, 2316, -66, -66, 2316, -66, 2417, 2316, -66, + 2418, -66, -66, -66, -66, -66, -66, -66, -66, -66, + -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, + -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, + -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, + -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, + -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, + -66, -66, -66, -66, 2419, 2420, 2421, 2422, -66, -66, + -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, + -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, + -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, + -66, 2423, 2424, -66, -66, -66, -66, 2425, -66, -66, + -66, -66, -66, -66, -66, -66 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -67, -67, -67, 2609, 2607, -66, 52 + -66, -66, -66, 159, 2463, -65, 48 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -4 static const yytype_int16 yytable[] = { - 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, - 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, - 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, - 191, 193, 195, 234, 200, 202, 204, 206, 208, -3, - 211, 213, 215, 217, 219, 111, 112, 223, 225, 227, - 229, 231, 233, 4, 235, 49, -2, 49, 240, 64, - 243, 244, 6, 51, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 196, 66, 67, 68, 102, - 103, 113, 65, 69, 114, 115, 129, 70, 105, 123, - 116, 117, 118, 120, 104, 121, 197, 209, 220, 71, - 72, 316, 318, 221, 236, 119, 238, 85, 86, 122, - 198, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 73, 74, 75, 237, 98, 76, 77, 106, - 107, 108, 99, 241, 100, 101, 78, 248, 249, 353, - 109, 250, 251, 355, 252, 79, 356, 253, 110, 358, - 52, 247, 254, 53, 54, 55, 56, 57, 58, 14, - 15, 16, 17, 18, 19, 20, 59, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 60, 36, 61, 38, 39, 40, 41, 42, 43, 62, - 45, 46, 63, 53, 54, 55, 56, 57, 58, 14, - 15, 16, 17, 18, 19, 20, 127, 22, 23, 24, + 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, + 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, + 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, + 188, -3, 193, 195, 197, 199, 201, 227, 204, 206, + 208, 210, 212, 108, 109, 216, 218, 220, 222, 224, + 226, 48, 4, 48, -2, 63, 233, 228, 236, 237, + 6, 50, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 60, 36, 61, 38, 39, 40, 41, 42, 43, 62, - 45, 46, 128, 130, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 132, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 134, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 136, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 138, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 140, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 142, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 144, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 146, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 148, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 150, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 152, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 154, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 156, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 158, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 160, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 162, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 164, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 166, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 168, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 170, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 172, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 174, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 176, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 178, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 180, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 182, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 184, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 186, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 188, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 190, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 192, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 194, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 199, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 201, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 203, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 205, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 207, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 210, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 212, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 214, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 216, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 218, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 222, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 224, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 226, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 228, 53, 54, 55, 56, 57, 58, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 189, 117, 110, 118, 64, 111, 112, 102, + 78, 126, 113, 114, 115, 79, 80, 99, 100, 119, + 120, 202, 190, 81, 213, 305, 307, 116, 214, 229, + 230, 101, 82, 83, 84, 231, 191, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 234, 103, 104, + 105, 95, 241, 242, 243, 244, 245, 96, 106, 97, + 98, 5, 246, 342, 247, 248, 107, 344, 249, 250, + 345, 251, 51, 347, 240, 52, 53, 54, 55, 56, + 57, 14, 15, 16, 17, 18, 19, 20, 58, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 59, 35, 60, 37, 38, 39, 40, 41, 42, + 61, 44, 45, 62, 52, 53, 54, 55, 56, 57, 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 230, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, + 59, 35, 60, 37, 38, 39, 40, 41, 42, 61, + 44, 45, 125, 127, 52, 53, 54, 55, 56, 57, + 14, 15, 16, 17, 18, 19, 20, 121, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 232, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, + 59, 35, 60, 37, 38, 39, 40, 41, 42, 61, + 44, 45, 129, 52, 53, 54, 55, 56, 57, 14, + 15, 16, 17, 18, 19, 20, 121, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 59, + 35, 60, 37, 38, 39, 40, 41, 42, 61, 44, + 45, 131, 52, 53, 54, 55, 56, 57, 14, 15, + 16, 17, 18, 19, 20, 121, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 59, 35, + 60, 37, 38, 39, 40, 41, 42, 61, 44, 45, + 133, 52, 53, 54, 55, 56, 57, 14, 15, 16, + 17, 18, 19, 20, 121, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 59, 35, 60, + 37, 38, 39, 40, 41, 42, 61, 44, 45, 135, + 52, 53, 54, 55, 56, 57, 14, 15, 16, 17, + 18, 19, 20, 121, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 59, 35, 60, 37, + 38, 39, 40, 41, 42, 61, 44, 45, 137, 52, + 53, 54, 55, 56, 57, 14, 15, 16, 17, 18, + 19, 20, 121, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 59, 35, 60, 37, 38, + 39, 40, 41, 42, 61, 44, 45, 139, 52, 53, + 54, 55, 56, 57, 14, 15, 16, 17, 18, 19, + 20, 121, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 59, 35, 60, 37, 38, 39, + 40, 41, 42, 61, 44, 45, 141, 52, 53, 54, + 55, 56, 57, 14, 15, 16, 17, 18, 19, 20, + 121, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 59, 35, 60, 37, 38, 39, 40, + 41, 42, 61, 44, 45, 143, 52, 53, 54, 55, + 56, 57, 14, 15, 16, 17, 18, 19, 20, 121, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 59, 35, 60, 37, 38, 39, 40, 41, + 42, 61, 44, 45, 145, 52, 53, 54, 55, 56, + 57, 14, 15, 16, 17, 18, 19, 20, 121, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 59, 35, 60, 37, 38, 39, 40, 41, 42, + 61, 44, 45, 147, 52, 53, 54, 55, 56, 57, + 14, 15, 16, 17, 18, 19, 20, 121, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 239, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, + 59, 35, 60, 37, 38, 39, 40, 41, 42, 61, + 44, 45, 149, 52, 53, 54, 55, 56, 57, 14, + 15, 16, 17, 18, 19, 20, 121, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 59, + 35, 60, 37, 38, 39, 40, 41, 42, 61, 44, + 45, 151, 52, 53, 54, 55, 56, 57, 14, 15, + 16, 17, 18, 19, 20, 121, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 59, 35, + 60, 37, 38, 39, 40, 41, 42, 61, 44, 45, + 153, 52, 53, 54, 55, 56, 57, 14, 15, 16, + 17, 18, 19, 20, 121, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 59, 35, 60, + 37, 38, 39, 40, 41, 42, 61, 44, 45, 155, + 52, 53, 54, 55, 56, 57, 14, 15, 16, 17, + 18, 19, 20, 121, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 59, 35, 60, 37, + 38, 39, 40, 41, 42, 61, 44, 45, 157, 52, + 53, 54, 55, 56, 57, 14, 15, 16, 17, 18, + 19, 20, 121, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 59, 35, 60, 37, 38, + 39, 40, 41, 42, 61, 44, 45, 159, 52, 53, + 54, 55, 56, 57, 14, 15, 16, 17, 18, 19, + 20, 121, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 59, 35, 60, 37, 38, 39, + 40, 41, 42, 61, 44, 45, 161, 52, 53, 54, + 55, 56, 57, 14, 15, 16, 17, 18, 19, 20, + 121, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 59, 35, 60, 37, 38, 39, 40, + 41, 42, 61, 44, 45, 163, 52, 53, 54, 55, + 56, 57, 14, 15, 16, 17, 18, 19, 20, 121, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 59, 35, 60, 37, 38, 39, 40, 41, + 42, 61, 44, 45, 165, 52, 53, 54, 55, 56, + 57, 14, 15, 16, 17, 18, 19, 20, 121, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 59, 35, 60, 37, 38, 39, 40, 41, 42, + 61, 44, 45, 167, 52, 53, 54, 55, 56, 57, + 14, 15, 16, 17, 18, 19, 20, 121, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 242, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, + 59, 35, 60, 37, 38, 39, 40, 41, 42, 61, + 44, 45, 169, 52, 53, 54, 55, 56, 57, 14, + 15, 16, 17, 18, 19, 20, 121, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 59, + 35, 60, 37, 38, 39, 40, 41, 42, 61, 44, + 45, 171, 52, 53, 54, 55, 56, 57, 14, 15, + 16, 17, 18, 19, 20, 121, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 59, 35, + 60, 37, 38, 39, 40, 41, 42, 61, 44, 45, + 173, 52, 53, 54, 55, 56, 57, 14, 15, 16, + 17, 18, 19, 20, 121, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 59, 35, 60, + 37, 38, 39, 40, 41, 42, 61, 44, 45, 175, + 52, 53, 54, 55, 56, 57, 14, 15, 16, 17, + 18, 19, 20, 121, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 59, 35, 60, 37, + 38, 39, 40, 41, 42, 61, 44, 45, 177, 52, + 53, 54, 55, 56, 57, 14, 15, 16, 17, 18, + 19, 20, 121, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 59, 35, 60, 37, 38, + 39, 40, 41, 42, 61, 44, 45, 179, 52, 53, + 54, 55, 56, 57, 14, 15, 16, 17, 18, 19, + 20, 121, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 59, 35, 60, 37, 38, 39, + 40, 41, 42, 61, 44, 45, 181, 52, 53, 54, + 55, 56, 57, 14, 15, 16, 17, 18, 19, 20, + 121, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 59, 35, 60, 37, 38, 39, 40, + 41, 42, 61, 44, 45, 183, 52, 53, 54, 55, + 56, 57, 14, 15, 16, 17, 18, 19, 20, 121, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 59, 35, 60, 37, 38, 39, 40, 41, + 42, 61, 44, 45, 185, 52, 53, 54, 55, 56, + 57, 14, 15, 16, 17, 18, 19, 20, 121, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 59, 35, 60, 37, 38, 39, 40, 41, 42, + 61, 44, 45, 187, 52, 53, 54, 55, 56, 57, + 14, 15, 16, 17, 18, 19, 20, 121, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 53, 54, 55, 56, 57, 58, 14, - 15, 16, 17, 18, 19, 20, 245, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 60, 36, 61, 38, 39, 40, 41, 42, 43, 62, - 45, 46, 246, 315, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, + 59, 35, 60, 37, 38, 39, 40, 41, 42, 61, + 44, 45, 192, 52, 53, 54, 55, 56, 57, 14, + 15, 16, 17, 18, 19, 20, 121, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 59, + 35, 60, 37, 38, 39, 40, 41, 42, 61, 44, + 45, 194, 52, 53, 54, 55, 56, 57, 14, 15, + 16, 17, 18, 19, 20, 121, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 59, 35, + 60, 37, 38, 39, 40, 41, 42, 61, 44, 45, + 196, 52, 53, 54, 55, 56, 57, 14, 15, 16, + 17, 18, 19, 20, 121, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 59, 35, 60, + 37, 38, 39, 40, 41, 42, 61, 44, 45, 198, + 52, 53, 54, 55, 56, 57, 14, 15, 16, 17, + 18, 19, 20, 121, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 59, 35, 60, 37, + 38, 39, 40, 41, 42, 61, 44, 45, 200, 52, + 53, 54, 55, 56, 57, 14, 15, 16, 17, 18, + 19, 20, 121, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 59, 35, 60, 37, 38, + 39, 40, 41, 42, 61, 44, 45, 203, 52, 53, + 54, 55, 56, 57, 14, 15, 16, 17, 18, 19, + 20, 121, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 59, 35, 60, 37, 38, 39, + 40, 41, 42, 61, 44, 45, 205, 52, 53, 54, + 55, 56, 57, 14, 15, 16, 17, 18, 19, 20, + 121, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 59, 35, 60, 37, 38, 39, 40, + 41, 42, 61, 44, 45, 207, 52, 53, 54, 55, + 56, 57, 14, 15, 16, 17, 18, 19, 20, 121, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 59, 35, 60, 37, 38, 39, 40, 41, + 42, 61, 44, 45, 209, 52, 53, 54, 55, 56, + 57, 14, 15, 16, 17, 18, 19, 20, 121, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 59, 35, 60, 37, 38, 39, 40, 41, 42, + 61, 44, 45, 211, 52, 53, 54, 55, 56, 57, + 14, 15, 16, 17, 18, 19, 20, 121, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 317, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, + 59, 35, 60, 37, 38, 39, 40, 41, 42, 61, + 44, 45, 215, 52, 53, 54, 55, 56, 57, 14, + 15, 16, 17, 18, 19, 20, 121, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 59, + 35, 60, 37, 38, 39, 40, 41, 42, 61, 44, + 45, 217, 52, 53, 54, 55, 56, 57, 14, 15, + 16, 17, 18, 19, 20, 121, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 59, 35, + 60, 37, 38, 39, 40, 41, 42, 61, 44, 45, + 219, 52, 53, 54, 55, 56, 57, 14, 15, 16, + 17, 18, 19, 20, 121, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 59, 35, 60, + 37, 38, 39, 40, 41, 42, 61, 44, 45, 221, + 52, 53, 54, 55, 56, 57, 14, 15, 16, 17, + 18, 19, 20, 121, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 59, 35, 60, 37, + 38, 39, 40, 41, 42, 61, 44, 45, 223, 52, + 53, 54, 55, 56, 57, 14, 15, 16, 17, 18, + 19, 20, 121, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 59, 35, 60, 37, 38, + 39, 40, 41, 42, 61, 44, 45, 225, 52, 53, + 54, 55, 56, 57, 14, 15, 16, 17, 18, 19, + 20, 121, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 59, 35, 60, 37, 38, 39, + 40, 41, 42, 61, 44, 45, 232, 52, 53, 54, + 55, 56, 57, 14, 15, 16, 17, 18, 19, 20, + 121, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 59, 35, 60, 37, 38, 39, 40, + 41, 42, 61, 44, 45, 235, 52, 53, 54, 55, + 56, 57, 14, 15, 16, 17, 18, 19, 20, 121, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 59, 35, 60, 37, 38, 39, 40, 41, + 42, 61, 44, 45, 52, 53, 54, 55, 56, 57, + 14, 15, 16, 17, 18, 19, 20, 238, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 352, 53, 54, 55, 56, 57, 58, - 14, 15, 16, 17, 18, 19, 20, 124, 22, 23, + 59, 35, 60, 37, 38, 39, 40, 41, 42, 61, + 44, 45, 239, 304, 52, 53, 54, 55, 56, 57, + 14, 15, 16, 17, 18, 19, 20, 121, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 60, 36, 61, 38, 39, 40, 41, 42, 43, - 62, 45, 46, 53, 54, 55, 56, 57, 58, 14, - 15, 16, 17, 18, 19, 20, 124, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 60, 36, 61, 38, 39, 40, 41, 42, 43, 62, - 45, 46, 80, 255, 256, 257, 258, 81, 82, 259, - 260, 261, 262, 263, 264, 265, 83, 266, 267, 268, - 269, 270, 271, 272, 273, 84, 274, 275, 276, 277, - 278, 279, 280, 281, 282, 0, 283, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 319, 320, - 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, - 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, - 351, 354, 357, 359, 360, 361, 362, 363, 364, 365, - 366, 5, 50 + 59, 35, 60, 37, 38, 39, 40, 41, 42, 61, + 44, 45, 306, 52, 53, 54, 55, 56, 57, 14, + 15, 16, 17, 18, 19, 20, 121, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 59, + 35, 60, 37, 38, 39, 40, 41, 42, 61, 44, + 45, 341, 52, 53, 54, 55, 56, 57, 14, 15, + 16, 17, 18, 19, 20, 121, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 59, 35, + 60, 37, 38, 39, 40, 41, 42, 61, 44, 45, + 52, 53, 54, 55, 56, 57, 14, 15, 16, 17, + 18, 19, 20, 121, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 59, 35, 60, 37, + 38, 39, 40, 41, 42, 61, 44, 45, 65, 66, + 67, 71, 72, 73, 252, 253, 74, 75, 68, 254, + 255, 256, 257, 258, 76, 259, 260, 261, 262, 263, + 69, 70, 264, 77, 265, 266, 267, 0, 268, 269, + 270, 271, 272, 0, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 308, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 343, 346, + 348, 349, 350, 351, 352, 353, 354, 355, 49 }; -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-67))) - -#define yytable_value_is_error(Yytable_value) \ - YYID (0) - static const yytype_int16 yycheck[] = { - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 3, 100, 101, 102, 103, 104, 0, - 106, 107, 108, 109, 110, 34, 35, 113, 114, 115, - 116, 117, 118, 0, 24, 3, 0, 5, 124, 7, - 126, 127, 1, 43, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 3, 13, 14, 15, 14, - 15, 15, 43, 20, 18, 19, 64, 24, 1, 43, - 24, 25, 26, 1, 29, 3, 24, 43, 43, 36, - 37, 197, 198, 43, 43, 39, 1, 14, 15, 17, - 38, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 10, 11, 12, 43, 33, 15, 16, 13, - 14, 15, 39, 43, 41, 42, 24, 43, 43, 235, - 24, 43, 43, 239, 43, 33, 242, 43, 32, 245, - 1, 129, 43, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 4, 5, 6, 7, 8, 9, 10, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 0, 97, 98, 99, 100, 101, 3, 103, 104, + 105, 106, 107, 33, 34, 110, 111, 112, 113, 114, + 115, 3, 0, 5, 0, 7, 121, 23, 123, 124, + 1, 42, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, + 41, 42, 3, 1, 15, 3, 42, 18, 19, 1, + 10, 63, 23, 24, 25, 15, 16, 14, 15, 17, + 42, 42, 23, 23, 42, 190, 191, 38, 42, 42, + 42, 28, 32, 14, 15, 1, 37, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 42, 13, 14, + 15, 32, 42, 42, 42, 42, 42, 38, 23, 40, + 41, 2, 42, 228, 42, 42, 31, 232, 42, 42, + 235, 42, 1, 238, 126, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, @@ -1294,27 +1085,194 @@ static const yytype_int16 yycheck[] = 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, + 40, 41, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, + 40, 41, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, + 40, 41, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 4, 5, 6, 7, 8, 9, 10, + 40, 41, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 3, 4, 5, 6, 7, 8, 9, + 41, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, + 40, 41, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, @@ -1322,65 +1280,71 @@ static const yytype_int16 yycheck[] = 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 4, 5, 6, 7, 8, 9, 10, + 40, 41, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 10, 43, 43, 43, 43, 15, 16, 43, - 43, 43, 43, 43, 43, 43, 24, 43, 43, 43, - 43, 43, 43, 43, 43, 33, 43, 43, 43, 43, - 43, 43, 43, 43, 43, -1, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 2, 5 + 41, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 13, 14, + 15, 10, 11, 12, 42, 42, 15, 16, 23, 42, + 42, 42, 42, 42, 23, 42, 42, 42, 42, 42, + 35, 36, 42, 32, 42, 42, 42, -1, 42, 42, + 42, 42, 42, -1, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 5 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 45, 46, 47, 0, 47, 1, 3, 4, 5, + 0, 44, 45, 46, 0, 46, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 48, 50, - 48, 43, 1, 4, 5, 6, 7, 8, 9, 17, - 31, 33, 40, 43, 50, 43, 13, 14, 15, 20, - 24, 36, 37, 10, 11, 12, 15, 16, 24, 33, - 10, 15, 16, 24, 33, 14, 15, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 33, 39, - 41, 42, 14, 15, 29, 1, 13, 14, 15, 24, - 32, 34, 35, 15, 18, 19, 24, 25, 26, 39, - 1, 3, 17, 43, 17, 49, 50, 17, 43, 50, - 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, - 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, - 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, - 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, - 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, - 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, - 3, 49, 3, 49, 3, 49, 3, 24, 38, 3, - 49, 3, 49, 3, 49, 3, 49, 3, 49, 43, - 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, - 43, 43, 3, 49, 3, 49, 3, 49, 3, 49, - 3, 49, 3, 49, 3, 24, 43, 43, 1, 3, - 49, 43, 3, 49, 49, 17, 43, 50, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 3, 49, 3, 49, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 3, 49, 43, 49, 49, 43, 49, 43, - 43, 43, 43, 43, 43, 43, 43 + 36, 37, 38, 39, 40, 41, 42, 47, 49, 47, + 42, 1, 4, 5, 6, 7, 8, 9, 17, 30, + 32, 39, 42, 49, 42, 13, 14, 15, 23, 35, + 36, 10, 11, 12, 15, 16, 23, 32, 10, 15, + 16, 23, 32, 14, 15, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 32, 38, 40, 41, 14, + 15, 28, 1, 13, 14, 15, 23, 31, 33, 34, + 15, 18, 19, 23, 24, 25, 38, 1, 3, 17, + 42, 17, 48, 49, 17, 42, 49, 3, 48, 3, + 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, + 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, + 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, + 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, + 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, + 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, + 23, 37, 3, 48, 3, 48, 3, 48, 3, 48, + 3, 48, 42, 3, 48, 3, 48, 3, 48, 3, + 48, 3, 48, 42, 42, 3, 48, 3, 48, 3, + 48, 3, 48, 3, 48, 3, 48, 3, 23, 42, + 42, 1, 3, 48, 42, 3, 48, 48, 17, 42, + 49, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 3, 48, 3, 48, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 3, 48, 42, 48, 48, 42, 48, 42, 42, + 42, 42, 42, 42, 42, 42 }; #define yyerrok (yyerrstatus = 0) @@ -1395,50 +1359,78 @@ static const yytype_uint8 yystos[] = /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ + Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) -/* Error token number */ + #define YYTERROR 1 #define YYERRCODE 256 -/* This macro is provided for backward compatibility. */ +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + #ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ + #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, YYLEX_PARAM) #else @@ -1488,8 +1480,6 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) YYSTYPE const * const yyvaluep; #endif { - FILE *yyo = yyoutput; - YYUSE (yyo); if (!yyvaluep) return; # ifdef YYPRINT @@ -1501,7 +1491,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) switch (yytype) { default: - break; + break; } } @@ -1539,20 +1529,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } @@ -1586,11 +1573,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF (stderr, " $%d = ", yyi + 1); + fprintf (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - YYFPRINTF (stderr, "\n"); + fprintf (stderr, "\n"); } } @@ -1627,6 +1614,7 @@ int yydebug; # define YYMAXDEPTH 10000 #endif + #if YYERROR_VERBOSE @@ -1729,145 +1717,115 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) { - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULL; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } + int yyn = yypact[yystate]; - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } + if (yysize_overflow) + return YYSIZE_MAXIMUM; - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } } #endif /* YYERROR_VERBOSE */ + /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -1896,9 +1854,28 @@ yydestruct (yymsg, yytype, yyvaluep) { default: - break; + break; } } + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + @@ -1929,92 +1906,77 @@ yyparse () #endif #endif { -/* The lookahead symbol. */ + /* The look-ahead symbol. */ int yychar; +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -static YYSTYPE yyval_default; -# define YY_INITIAL_VALUE(Value) = Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ +/* Number of syntax errors so far. */ +int yynerrs; + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. - /* Number of syntax errors so far. */ - int yynerrs; + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - YYSIZE_T yystacksize; + YYSIZE_T yystacksize = YYINITDEPTH; - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + goto yysetstate; /*------------------------------------------------------------. @@ -2041,6 +2003,7 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; + /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -2048,6 +2011,7 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); yyss = yyss1; @@ -2070,8 +2034,9 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -2082,6 +2047,7 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; + YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -2091,9 +2057,6 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) - YYACCEPT; - goto yybackup; /*-----------. @@ -2102,16 +2065,16 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); yybackup: /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ + look-ahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to lookahead token. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ + /* Not known => get a look-ahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -2137,27 +2100,29 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yytable_value_is_error (yyn)) - goto yyerrlab; + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; yyn = -yyn; goto yyreduce; } + if (yyn == YYFINAL) + YYACCEPT; + /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the lookahead token. */ + /* Shift the look-ahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token. */ - yychar = YYEMPTY; + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; @@ -2194,932 +2159,787 @@ yyreduce: switch (yyn) { case 2: -/* Line 1792 of yacc.c */ -#line 99 "src/IceGrid/Grammar.y" +#line 101 "src/IceGrid/Grammar.y" { -} +;} break; case 3: -/* Line 1792 of yacc.c */ -#line 102 "src/IceGrid/Grammar.y" +#line 104 "src/IceGrid/Grammar.y" { -} +;} break; case 4: -/* Line 1792 of yacc.c */ -#line 110 "src/IceGrid/Grammar.y" +#line 112 "src/IceGrid/Grammar.y" { -} +;} break; case 5: -/* Line 1792 of yacc.c */ -#line 113 "src/IceGrid/Grammar.y" +#line 115 "src/IceGrid/Grammar.y" { -} +;} break; case 6: -/* Line 1792 of yacc.c */ -#line 119 "src/IceGrid/Grammar.y" +#line 121 "src/IceGrid/Grammar.y" { parser->checkInterrupted(); -} +;} break; case 7: -/* Line 1792 of yacc.c */ -#line 128 "src/IceGrid/Grammar.y" +#line 130 "src/IceGrid/Grammar.y" { parser->usage(); -} +;} break; case 8: -/* Line 1792 of yacc.c */ -#line 132 "src/IceGrid/Grammar.y" +#line 134 "src/IceGrid/Grammar.y" { return 0; -} +;} break; case 9: -/* Line 1792 of yacc.c */ -#line 136 "src/IceGrid/Grammar.y" +#line 138 "src/IceGrid/Grammar.y" { parser->addApplication((yyvsp[(3) - (4)])); -} +;} break; case 10: -/* Line 1792 of yacc.c */ -#line 140 "src/IceGrid/Grammar.y" +#line 142 "src/IceGrid/Grammar.y" { parser->usage("application", "add"); -} +;} break; case 11: -/* Line 1792 of yacc.c */ -#line 144 "src/IceGrid/Grammar.y" +#line 146 "src/IceGrid/Grammar.y" { parser->removeApplication((yyvsp[(3) - (4)])); -} +;} break; case 12: -/* Line 1792 of yacc.c */ -#line 148 "src/IceGrid/Grammar.y" +#line 150 "src/IceGrid/Grammar.y" { parser->usage("application", "remove"); -} +;} break; case 13: -/* Line 1792 of yacc.c */ -#line 152 "src/IceGrid/Grammar.y" +#line 154 "src/IceGrid/Grammar.y" { parser->diffApplication((yyvsp[(3) - (4)])); -} +;} break; case 14: -/* Line 1792 of yacc.c */ -#line 156 "src/IceGrid/Grammar.y" +#line 158 "src/IceGrid/Grammar.y" { parser->usage("application", "diff"); -} +;} break; case 15: -/* Line 1792 of yacc.c */ -#line 160 "src/IceGrid/Grammar.y" +#line 162 "src/IceGrid/Grammar.y" { parser->updateApplication((yyvsp[(3) - (4)])); -} +;} break; case 16: -/* Line 1792 of yacc.c */ -#line 164 "src/IceGrid/Grammar.y" +#line 166 "src/IceGrid/Grammar.y" { parser->usage("application", "update"); -} +;} break; case 17: -/* Line 1792 of yacc.c */ -#line 168 "src/IceGrid/Grammar.y" +#line 170 "src/IceGrid/Grammar.y" { parser->describeApplication((yyvsp[(3) - (4)])); -} +;} break; case 18: -/* Line 1792 of yacc.c */ -#line 172 "src/IceGrid/Grammar.y" +#line 174 "src/IceGrid/Grammar.y" { parser->usage("application", "describe"); -} +;} break; case 19: -/* Line 1792 of yacc.c */ -#line 176 "src/IceGrid/Grammar.y" - { - parser->patchApplication((yyvsp[(3) - (4)])); -} - break; - - case 20: -/* Line 1792 of yacc.c */ -#line 180 "src/IceGrid/Grammar.y" - { - parser->usage("application", "patch"); -} - break; - - case 21: -/* Line 1792 of yacc.c */ -#line 184 "src/IceGrid/Grammar.y" +#line 178 "src/IceGrid/Grammar.y" { parser->listAllApplications((yyvsp[(3) - (4)])); -} +;} break; - case 22: -/* Line 1792 of yacc.c */ -#line 188 "src/IceGrid/Grammar.y" + case 20: +#line 182 "src/IceGrid/Grammar.y" { parser->usage("application", "list"); -} +;} break; - case 23: -/* Line 1792 of yacc.c */ -#line 192 "src/IceGrid/Grammar.y" + case 21: +#line 186 "src/IceGrid/Grammar.y" { parser->describeServerTemplate((yyvsp[(4) - (5)])); -} +;} break; - case 24: -/* Line 1792 of yacc.c */ -#line 196 "src/IceGrid/Grammar.y" + case 22: +#line 190 "src/IceGrid/Grammar.y" { parser->usage("server template", "describe"); -} +;} break; - case 25: -/* Line 1792 of yacc.c */ -#line 200 "src/IceGrid/Grammar.y" + case 23: +#line 194 "src/IceGrid/Grammar.y" { parser->instantiateServerTemplate((yyvsp[(4) - (5)])); -} +;} break; - case 26: -/* Line 1792 of yacc.c */ -#line 204 "src/IceGrid/Grammar.y" + case 24: +#line 198 "src/IceGrid/Grammar.y" { parser->usage("server template", "instantiate"); -} +;} break; - case 27: -/* Line 1792 of yacc.c */ -#line 208 "src/IceGrid/Grammar.y" + case 25: +#line 202 "src/IceGrid/Grammar.y" { parser->usage("server template"); -} +;} break; - case 28: -/* Line 1792 of yacc.c */ -#line 212 "src/IceGrid/Grammar.y" + case 26: +#line 206 "src/IceGrid/Grammar.y" { parser->describeServiceTemplate((yyvsp[(4) - (5)])); -} +;} break; - case 29: -/* Line 1792 of yacc.c */ -#line 216 "src/IceGrid/Grammar.y" + case 27: +#line 210 "src/IceGrid/Grammar.y" { parser->usage("service template", "describe"); -} +;} break; - case 30: -/* Line 1792 of yacc.c */ -#line 220 "src/IceGrid/Grammar.y" + case 28: +#line 214 "src/IceGrid/Grammar.y" { parser->usage("service template"); -} +;} break; - case 31: -/* Line 1792 of yacc.c */ -#line 224 "src/IceGrid/Grammar.y" + case 29: +#line 218 "src/IceGrid/Grammar.y" { parser->describeNode((yyvsp[(3) - (4)])); -} +;} break; - case 32: -/* Line 1792 of yacc.c */ -#line 228 "src/IceGrid/Grammar.y" + case 30: +#line 222 "src/IceGrid/Grammar.y" { parser->usage("node", "describe"); -} +;} break; - case 33: -/* Line 1792 of yacc.c */ -#line 232 "src/IceGrid/Grammar.y" + case 31: +#line 226 "src/IceGrid/Grammar.y" { parser->pingNode((yyvsp[(3) - (4)])); -} +;} break; - case 34: -/* Line 1792 of yacc.c */ -#line 236 "src/IceGrid/Grammar.y" + case 32: +#line 230 "src/IceGrid/Grammar.y" { parser->usage("node", "ping"); -} +;} break; - case 35: -/* Line 1792 of yacc.c */ -#line 240 "src/IceGrid/Grammar.y" + case 33: +#line 234 "src/IceGrid/Grammar.y" { parser->printLoadNode((yyvsp[(3) - (4)])); -} +;} break; - case 36: -/* Line 1792 of yacc.c */ -#line 244 "src/IceGrid/Grammar.y" + case 34: +#line 238 "src/IceGrid/Grammar.y" { parser->usage("node", "load"); -} +;} break; - case 37: -/* Line 1792 of yacc.c */ -#line 248 "src/IceGrid/Grammar.y" + case 35: +#line 242 "src/IceGrid/Grammar.y" { parser->printNodeProcessorSockets((yyvsp[(3) - (4)])); -} +;} break; - case 38: -/* Line 1792 of yacc.c */ -#line 252 "src/IceGrid/Grammar.y" + case 36: +#line 246 "src/IceGrid/Grammar.y" { parser->usage("node", "sockets"); -} +;} break; - case 39: -/* Line 1792 of yacc.c */ -#line 256 "src/IceGrid/Grammar.y" + case 37: +#line 250 "src/IceGrid/Grammar.y" { parser->shutdownNode((yyvsp[(3) - (4)])); -} +;} break; - case 40: -/* Line 1792 of yacc.c */ -#line 260 "src/IceGrid/Grammar.y" + case 38: +#line 254 "src/IceGrid/Grammar.y" { parser->usage("node", "shutdown"); -} +;} break; - case 41: -/* Line 1792 of yacc.c */ -#line 264 "src/IceGrid/Grammar.y" + case 39: +#line 258 "src/IceGrid/Grammar.y" { parser->listAllNodes((yyvsp[(3) - (4)])); -} +;} break; - case 42: -/* Line 1792 of yacc.c */ -#line 268 "src/IceGrid/Grammar.y" + case 40: +#line 262 "src/IceGrid/Grammar.y" { parser->usage("node", "list"); -} +;} break; - case 43: -/* Line 1792 of yacc.c */ -#line 272 "src/IceGrid/Grammar.y" + case 41: +#line 266 "src/IceGrid/Grammar.y" { parser->show("node", (yyvsp[(3) - (4)])); -} +;} break; - case 44: -/* Line 1792 of yacc.c */ -#line 276 "src/IceGrid/Grammar.y" + case 42: +#line 270 "src/IceGrid/Grammar.y" { parser->usage("node", "show"); -} +;} break; - case 45: -/* Line 1792 of yacc.c */ -#line 280 "src/IceGrid/Grammar.y" + case 43: +#line 274 "src/IceGrid/Grammar.y" { parser->describeRegistry((yyvsp[(3) - (4)])); -} +;} break; - case 46: -/* Line 1792 of yacc.c */ -#line 284 "src/IceGrid/Grammar.y" + case 44: +#line 278 "src/IceGrid/Grammar.y" { parser->usage("registry", "describe"); -} +;} break; - case 47: -/* Line 1792 of yacc.c */ -#line 288 "src/IceGrid/Grammar.y" + case 45: +#line 282 "src/IceGrid/Grammar.y" { parser->pingRegistry((yyvsp[(3) - (4)])); -} +;} break; - case 48: -/* Line 1792 of yacc.c */ -#line 292 "src/IceGrid/Grammar.y" + case 46: +#line 286 "src/IceGrid/Grammar.y" { parser->usage("registry", "ping"); -} +;} break; - case 49: -/* Line 1792 of yacc.c */ -#line 296 "src/IceGrid/Grammar.y" + case 47: +#line 290 "src/IceGrid/Grammar.y" { parser->shutdownRegistry((yyvsp[(3) - (4)])); -} +;} break; - case 50: -/* Line 1792 of yacc.c */ -#line 300 "src/IceGrid/Grammar.y" + case 48: +#line 294 "src/IceGrid/Grammar.y" { parser->usage("registry", "shutdown"); -} +;} break; - case 51: -/* Line 1792 of yacc.c */ -#line 304 "src/IceGrid/Grammar.y" + case 49: +#line 298 "src/IceGrid/Grammar.y" { parser->listAllRegistries((yyvsp[(3) - (4)])); -} +;} break; - case 52: -/* Line 1792 of yacc.c */ -#line 308 "src/IceGrid/Grammar.y" + case 50: +#line 302 "src/IceGrid/Grammar.y" { parser->usage("registry", "list"); -} +;} break; - case 53: -/* Line 1792 of yacc.c */ -#line 312 "src/IceGrid/Grammar.y" + case 51: +#line 306 "src/IceGrid/Grammar.y" { parser->show("registry", (yyvsp[(3) - (4)])); -} +;} break; - case 54: -/* Line 1792 of yacc.c */ -#line 316 "src/IceGrid/Grammar.y" + case 52: +#line 310 "src/IceGrid/Grammar.y" { parser->usage("registry", "show"); -} +;} break; - case 55: -/* Line 1792 of yacc.c */ -#line 320 "src/IceGrid/Grammar.y" + case 53: +#line 314 "src/IceGrid/Grammar.y" { parser->removeServer((yyvsp[(3) - (4)])); -} +;} break; - case 56: -/* Line 1792 of yacc.c */ -#line 324 "src/IceGrid/Grammar.y" + case 54: +#line 318 "src/IceGrid/Grammar.y" { parser->usage("server", "remove"); -} +;} break; - case 57: -/* Line 1792 of yacc.c */ -#line 328 "src/IceGrid/Grammar.y" + case 55: +#line 322 "src/IceGrid/Grammar.y" { parser->describeServer((yyvsp[(3) - (4)])); -} +;} break; - case 58: -/* Line 1792 of yacc.c */ -#line 332 "src/IceGrid/Grammar.y" + case 56: +#line 326 "src/IceGrid/Grammar.y" { parser->usage("server", "describe"); -} +;} break; - case 59: -/* Line 1792 of yacc.c */ -#line 336 "src/IceGrid/Grammar.y" + case 57: +#line 330 "src/IceGrid/Grammar.y" { parser->startServer((yyvsp[(3) - (4)])); -} +;} break; - case 60: -/* Line 1792 of yacc.c */ -#line 340 "src/IceGrid/Grammar.y" + case 58: +#line 334 "src/IceGrid/Grammar.y" { parser->usage("server", "start"); -} +;} break; - case 61: -/* Line 1792 of yacc.c */ -#line 344 "src/IceGrid/Grammar.y" + case 59: +#line 338 "src/IceGrid/Grammar.y" { parser->stopServer((yyvsp[(3) - (4)])); -} +;} break; - case 62: -/* Line 1792 of yacc.c */ -#line 348 "src/IceGrid/Grammar.y" + case 60: +#line 342 "src/IceGrid/Grammar.y" { parser->usage("server", "stop"); -} - break; - - case 63: -/* Line 1792 of yacc.c */ -#line 352 "src/IceGrid/Grammar.y" - { - parser->patchServer((yyvsp[(3) - (4)])); -} - break; - - case 64: -/* Line 1792 of yacc.c */ -#line 356 "src/IceGrid/Grammar.y" - { - parser->usage("server", "patch"); -} +;} break; - case 65: -/* Line 1792 of yacc.c */ -#line 360 "src/IceGrid/Grammar.y" + case 61: +#line 346 "src/IceGrid/Grammar.y" { parser->signalServer((yyvsp[(3) - (4)])); -} +;} break; - case 66: -/* Line 1792 of yacc.c */ -#line 364 "src/IceGrid/Grammar.y" + case 62: +#line 350 "src/IceGrid/Grammar.y" { parser->usage("server", "signal"); -} +;} break; - case 67: -/* Line 1792 of yacc.c */ -#line 368 "src/IceGrid/Grammar.y" + case 63: +#line 354 "src/IceGrid/Grammar.y" { parser->writeMessage((yyvsp[(3) - (4)]), 1); -} +;} break; - case 68: -/* Line 1792 of yacc.c */ -#line 372 "src/IceGrid/Grammar.y" + case 64: +#line 358 "src/IceGrid/Grammar.y" { parser->usage("server", "stdout"); -} +;} break; - case 69: -/* Line 1792 of yacc.c */ -#line 376 "src/IceGrid/Grammar.y" + case 65: +#line 362 "src/IceGrid/Grammar.y" { parser->writeMessage((yyvsp[(3) - (4)]), 2); -} +;} break; - case 70: -/* Line 1792 of yacc.c */ -#line 380 "src/IceGrid/Grammar.y" + case 66: +#line 366 "src/IceGrid/Grammar.y" { parser->usage("server", "stderr"); -} +;} break; - case 71: -/* Line 1792 of yacc.c */ -#line 384 "src/IceGrid/Grammar.y" + case 67: +#line 370 "src/IceGrid/Grammar.y" { parser->stateServer((yyvsp[(3) - (4)])); -} +;} break; - case 72: -/* Line 1792 of yacc.c */ -#line 388 "src/IceGrid/Grammar.y" + case 68: +#line 374 "src/IceGrid/Grammar.y" { parser->usage("server", "start"); -} +;} break; - case 73: -/* Line 1792 of yacc.c */ -#line 392 "src/IceGrid/Grammar.y" + case 69: +#line 378 "src/IceGrid/Grammar.y" { parser->pidServer((yyvsp[(3) - (4)])); -} +;} break; - case 74: -/* Line 1792 of yacc.c */ -#line 396 "src/IceGrid/Grammar.y" + case 70: +#line 382 "src/IceGrid/Grammar.y" { parser->usage("server", "pid"); -} +;} break; - case 75: -/* Line 1792 of yacc.c */ -#line 400 "src/IceGrid/Grammar.y" + case 71: +#line 386 "src/IceGrid/Grammar.y" { parser->propertiesServer((yyvsp[(3) - (4)]), false); -} +;} break; - case 76: -/* Line 1792 of yacc.c */ -#line 404 "src/IceGrid/Grammar.y" + case 72: +#line 390 "src/IceGrid/Grammar.y" { parser->usage("server", "properties"); -} +;} break; - case 77: -/* Line 1792 of yacc.c */ -#line 408 "src/IceGrid/Grammar.y" + case 73: +#line 394 "src/IceGrid/Grammar.y" { parser->propertiesServer((yyvsp[(3) - (4)]), true); -} +;} break; - case 78: -/* Line 1792 of yacc.c */ -#line 412 "src/IceGrid/Grammar.y" + case 74: +#line 398 "src/IceGrid/Grammar.y" { parser->usage("server", "property"); -} +;} break; - case 79: -/* Line 1792 of yacc.c */ -#line 416 "src/IceGrid/Grammar.y" + case 75: +#line 402 "src/IceGrid/Grammar.y" { parser->enableServer((yyvsp[(3) - (4)]), true); -} +;} break; - case 80: -/* Line 1792 of yacc.c */ -#line 420 "src/IceGrid/Grammar.y" + case 76: +#line 406 "src/IceGrid/Grammar.y" { parser->usage("server", "enable"); -} +;} break; - case 81: -/* Line 1792 of yacc.c */ -#line 424 "src/IceGrid/Grammar.y" + case 77: +#line 410 "src/IceGrid/Grammar.y" { parser->enableServer((yyvsp[(3) - (4)]), false); -} +;} break; - case 82: -/* Line 1792 of yacc.c */ -#line 428 "src/IceGrid/Grammar.y" + case 78: +#line 414 "src/IceGrid/Grammar.y" { parser->usage("server", "disable"); -} +;} break; - case 83: -/* Line 1792 of yacc.c */ -#line 432 "src/IceGrid/Grammar.y" + case 79: +#line 418 "src/IceGrid/Grammar.y" { parser->listAllServers((yyvsp[(3) - (4)])); -} +;} break; - case 84: -/* Line 1792 of yacc.c */ -#line 436 "src/IceGrid/Grammar.y" + case 80: +#line 422 "src/IceGrid/Grammar.y" { parser->usage("server", "list"); -} +;} break; - case 85: -/* Line 1792 of yacc.c */ -#line 440 "src/IceGrid/Grammar.y" + case 81: +#line 426 "src/IceGrid/Grammar.y" { parser->show("server", (yyvsp[(3) - (4)])); -} +;} break; - case 86: -/* Line 1792 of yacc.c */ -#line 444 "src/IceGrid/Grammar.y" + case 82: +#line 430 "src/IceGrid/Grammar.y" { parser->usage("server", "show"); -} +;} break; - case 87: -/* Line 1792 of yacc.c */ -#line 448 "src/IceGrid/Grammar.y" + case 83: +#line 434 "src/IceGrid/Grammar.y" { parser->startService((yyvsp[(3) - (4)])); -} +;} break; - case 88: -/* Line 1792 of yacc.c */ -#line 452 "src/IceGrid/Grammar.y" + case 84: +#line 438 "src/IceGrid/Grammar.y" { parser->usage("service", "start"); -} +;} break; - case 89: -/* Line 1792 of yacc.c */ -#line 456 "src/IceGrid/Grammar.y" + case 85: +#line 442 "src/IceGrid/Grammar.y" { parser->stopService((yyvsp[(3) - (4)])); -} +;} break; - case 90: -/* Line 1792 of yacc.c */ -#line 460 "src/IceGrid/Grammar.y" + case 86: +#line 446 "src/IceGrid/Grammar.y" { parser->usage("service", "stop"); -} +;} break; - case 91: -/* Line 1792 of yacc.c */ -#line 464 "src/IceGrid/Grammar.y" + case 87: +#line 450 "src/IceGrid/Grammar.y" { parser->describeService((yyvsp[(3) - (4)])); -} +;} break; - case 92: -/* Line 1792 of yacc.c */ -#line 468 "src/IceGrid/Grammar.y" + case 88: +#line 454 "src/IceGrid/Grammar.y" { parser->usage("service", "describe"); -} +;} break; - case 93: -/* Line 1792 of yacc.c */ -#line 472 "src/IceGrid/Grammar.y" + case 89: +#line 458 "src/IceGrid/Grammar.y" { parser->propertiesService((yyvsp[(3) - (4)]), false); -} +;} break; - case 94: -/* Line 1792 of yacc.c */ -#line 476 "src/IceGrid/Grammar.y" + case 90: +#line 462 "src/IceGrid/Grammar.y" { parser->usage("service", "properties"); -} +;} break; - case 95: -/* Line 1792 of yacc.c */ -#line 480 "src/IceGrid/Grammar.y" + case 91: +#line 466 "src/IceGrid/Grammar.y" { parser->propertiesService((yyvsp[(3) - (4)]), true); -} +;} break; - case 96: -/* Line 1792 of yacc.c */ -#line 484 "src/IceGrid/Grammar.y" + case 92: +#line 470 "src/IceGrid/Grammar.y" { parser->usage("service", "property"); -} +;} break; - case 97: -/* Line 1792 of yacc.c */ -#line 488 "src/IceGrid/Grammar.y" + case 93: +#line 474 "src/IceGrid/Grammar.y" { parser->listServices((yyvsp[(3) - (4)])); -} +;} break; - case 98: -/* Line 1792 of yacc.c */ -#line 492 "src/IceGrid/Grammar.y" + case 94: +#line 478 "src/IceGrid/Grammar.y" { parser->usage("service", "list"); -} +;} break; - case 99: -/* Line 1792 of yacc.c */ -#line 496 "src/IceGrid/Grammar.y" + case 95: +#line 482 "src/IceGrid/Grammar.y" { parser->endpointsAdapter((yyvsp[(3) - (4)])); -} +;} break; - case 100: -/* Line 1792 of yacc.c */ -#line 500 "src/IceGrid/Grammar.y" + case 96: +#line 486 "src/IceGrid/Grammar.y" { parser->usage("adapter", "endpoints"); -} +;} break; - case 101: -/* Line 1792 of yacc.c */ -#line 504 "src/IceGrid/Grammar.y" + case 97: +#line 490 "src/IceGrid/Grammar.y" { parser->removeAdapter((yyvsp[(3) - (4)])); -} +;} break; - case 102: -/* Line 1792 of yacc.c */ -#line 508 "src/IceGrid/Grammar.y" + case 98: +#line 494 "src/IceGrid/Grammar.y" { parser->usage("adapter", "remove"); -} +;} break; - case 103: -/* Line 1792 of yacc.c */ -#line 512 "src/IceGrid/Grammar.y" + case 99: +#line 498 "src/IceGrid/Grammar.y" { parser->listAllAdapters((yyvsp[(3) - (4)])); -} +;} break; - case 104: -/* Line 1792 of yacc.c */ -#line 516 "src/IceGrid/Grammar.y" + case 100: +#line 502 "src/IceGrid/Grammar.y" { parser->usage("adapter", "list"); -} +;} break; - case 105: -/* Line 1792 of yacc.c */ -#line 520 "src/IceGrid/Grammar.y" + case 101: +#line 506 "src/IceGrid/Grammar.y" { parser->addObject((yyvsp[(3) - (4)])); -} +;} break; - case 106: -/* Line 1792 of yacc.c */ -#line 524 "src/IceGrid/Grammar.y" + case 102: +#line 510 "src/IceGrid/Grammar.y" { parser->usage("object", "add"); -} +;} break; - case 107: -/* Line 1792 of yacc.c */ -#line 528 "src/IceGrid/Grammar.y" + case 103: +#line 514 "src/IceGrid/Grammar.y" { parser->removeObject((yyvsp[(3) - (4)])); -} +;} break; - case 108: -/* Line 1792 of yacc.c */ -#line 532 "src/IceGrid/Grammar.y" + case 104: +#line 518 "src/IceGrid/Grammar.y" { parser->usage("object", "remove"); -} +;} break; - case 109: -/* Line 1792 of yacc.c */ -#line 536 "src/IceGrid/Grammar.y" + case 105: +#line 522 "src/IceGrid/Grammar.y" { parser->findObject((yyvsp[(3) - (4)])); -} +;} break; - case 110: -/* Line 1792 of yacc.c */ -#line 540 "src/IceGrid/Grammar.y" + case 106: +#line 526 "src/IceGrid/Grammar.y" { parser->usage("object", "find"); -} +;} break; - case 111: -/* Line 1792 of yacc.c */ -#line 544 "src/IceGrid/Grammar.y" + case 107: +#line 530 "src/IceGrid/Grammar.y" { parser->listObject((yyvsp[(3) - (4)])); -} +;} break; - case 112: -/* Line 1792 of yacc.c */ -#line 548 "src/IceGrid/Grammar.y" + case 108: +#line 534 "src/IceGrid/Grammar.y" { parser->usage("object", "list"); -} +;} break; - case 113: -/* Line 1792 of yacc.c */ -#line 552 "src/IceGrid/Grammar.y" + case 109: +#line 538 "src/IceGrid/Grammar.y" { parser->describeObject((yyvsp[(3) - (4)])); -} +;} break; - case 114: -/* Line 1792 of yacc.c */ -#line 556 "src/IceGrid/Grammar.y" + case 110: +#line 542 "src/IceGrid/Grammar.y" { parser->usage("object", "describe"); -} +;} break; - case 115: -/* Line 1792 of yacc.c */ -#line 560 "src/IceGrid/Grammar.y" + case 111: +#line 546 "src/IceGrid/Grammar.y" { parser->showCopying(); -} +;} break; - case 116: -/* Line 1792 of yacc.c */ -#line 564 "src/IceGrid/Grammar.y" + case 112: +#line 550 "src/IceGrid/Grammar.y" { parser->showWarranty(); -} +;} break; - case 117: -/* Line 1792 of yacc.c */ -#line 568 "src/IceGrid/Grammar.y" + case 113: +#line 554 "src/IceGrid/Grammar.y" { parser->usage((yyvsp[(2) - (3)]).front()); -} +;} break; - case 118: -/* Line 1792 of yacc.c */ -#line 572 "src/IceGrid/Grammar.y" + case 114: +#line 558 "src/IceGrid/Grammar.y" { if(((yyvsp[(2) - (4)]).front() == "server" || (yyvsp[(2) - (4)]).front() == "service") && (yyvsp[(3) - (4)]).front() == "template") { @@ -3129,20 +2949,18 @@ yyreduce: { parser->usage((yyvsp[(2) - (4)]).front(), (yyvsp[(3) - (4)]).front()); } -} +;} break; - case 119: -/* Line 1792 of yacc.c */ -#line 583 "src/IceGrid/Grammar.y" + case 115: +#line 569 "src/IceGrid/Grammar.y" { parser->usage((yyvsp[(2) - (5)]).front(), (yyvsp[(3) - (5)]).front()); -} +;} break; - case 120: -/* Line 1792 of yacc.c */ -#line 587 "src/IceGrid/Grammar.y" + case 116: +#line 573 "src/IceGrid/Grammar.y" { if(((yyvsp[(2) - (5)]).front() == "server" || (yyvsp[(2) - (5)]).front() == "service") && (yyvsp[(3) - (5)]).front() == "template") { @@ -3152,12 +2970,11 @@ yyreduce: { parser->usage((yyvsp[(2) - (5)]).front(), (yyvsp[(3) - (5)]).front()); } -} +;} break; - case 121: -/* Line 1792 of yacc.c */ -#line 598 "src/IceGrid/Grammar.y" + case 117: +#line 584 "src/IceGrid/Grammar.y" { if(((yyvsp[(2) - (6)]).front() == "server" || (yyvsp[(2) - (6)]).front() == "service") && (yyvsp[(3) - (6)]).front() == "template") { @@ -3167,404 +2984,336 @@ yyreduce: { parser->usage((yyvsp[(2) - (6)]).front(), (yyvsp[(3) - (6)]).front()); } -} +;} break; - case 122: -/* Line 1792 of yacc.c */ -#line 609 "src/IceGrid/Grammar.y" + case 118: +#line 595 "src/IceGrid/Grammar.y" { parser->usage((yyvsp[(2) - (4)]).front()); -} +;} break; - case 123: -/* Line 1792 of yacc.c */ -#line 613 "src/IceGrid/Grammar.y" + case 119: +#line 599 "src/IceGrid/Grammar.y" { parser->usage(); -} +;} break; - case 124: -/* Line 1792 of yacc.c */ -#line 617 "src/IceGrid/Grammar.y" + case 120: +#line 603 "src/IceGrid/Grammar.y" { parser->usage((yyvsp[(1) - (3)]).front()); -} +;} break; - case 125: -/* Line 1792 of yacc.c */ -#line 621 "src/IceGrid/Grammar.y" + case 121: +#line 607 "src/IceGrid/Grammar.y" { (yyvsp[(1) - (4)]).push_back((yyvsp[(2) - (4)]).front()); parser->invalidCommand((yyvsp[(1) - (4)])); yyerrok; -} +;} break; - case 126: -/* Line 1792 of yacc.c */ -#line 627 "src/IceGrid/Grammar.y" + case 122: +#line 613 "src/IceGrid/Grammar.y" { parser->invalidCommand((yyvsp[(1) - (3)])); yyerrok; -} +;} break; - case 127: -/* Line 1792 of yacc.c */ -#line 632 "src/IceGrid/Grammar.y" + case 123: +#line 618 "src/IceGrid/Grammar.y" { parser->invalidCommand((yyvsp[(1) - (3)])); yyerrok; -} +;} break; - case 128: -/* Line 1792 of yacc.c */ -#line 637 "src/IceGrid/Grammar.y" + case 124: +#line 623 "src/IceGrid/Grammar.y" { yyerrok; -} +;} break; - case 129: -/* Line 1792 of yacc.c */ -#line 641 "src/IceGrid/Grammar.y" + case 125: +#line 627 "src/IceGrid/Grammar.y" { -} +;} break; - case 130: -/* Line 1792 of yacc.c */ -#line 649 "src/IceGrid/Grammar.y" + case 126: +#line 635 "src/IceGrid/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).push_front((yyvsp[(1) - (2)]).front()); -} +;} break; - case 131: -/* Line 1792 of yacc.c */ -#line 654 "src/IceGrid/Grammar.y" + case 127: +#line 640 "src/IceGrid/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).push_front((yyvsp[(1) - (2)]).front()); -} +;} break; - case 132: -/* Line 1792 of yacc.c */ -#line 659 "src/IceGrid/Grammar.y" + case 128: +#line 645 "src/IceGrid/Grammar.y" { (yyval) = (yyvsp[(2) - (3)]); (yyval).push_front("help"); (yyval).push_front((yyvsp[(1) - (3)]).front()); -} +;} break; - case 133: -/* Line 1792 of yacc.c */ -#line 665 "src/IceGrid/Grammar.y" + case 129: +#line 651 "src/IceGrid/Grammar.y" { (yyval) = (yyvsp[(2) - (3)]); (yyval).push_front("help"); (yyval).push_front((yyvsp[(1) - (3)]).front()); -} +;} break; - case 134: -/* Line 1792 of yacc.c */ -#line 671 "src/IceGrid/Grammar.y" + case 130: +#line 657 "src/IceGrid/Grammar.y" { (yyval) = YYSTYPE(); -} +;} + break; + + case 131: +#line 666 "src/IceGrid/Grammar.y" + { +;} + break; + + case 132: +#line 669 "src/IceGrid/Grammar.y" + { +;} + break; + + case 133: +#line 672 "src/IceGrid/Grammar.y" + { +;} + break; + + case 134: +#line 675 "src/IceGrid/Grammar.y" + { +;} break; case 135: -/* Line 1792 of yacc.c */ -#line 680 "src/IceGrid/Grammar.y" +#line 678 "src/IceGrid/Grammar.y" { -} +;} break; case 136: -/* Line 1792 of yacc.c */ -#line 683 "src/IceGrid/Grammar.y" +#line 681 "src/IceGrid/Grammar.y" { -} +;} break; case 137: -/* Line 1792 of yacc.c */ -#line 686 "src/IceGrid/Grammar.y" +#line 684 "src/IceGrid/Grammar.y" { -} +;} break; case 138: -/* Line 1792 of yacc.c */ -#line 689 "src/IceGrid/Grammar.y" +#line 687 "src/IceGrid/Grammar.y" { -} +;} break; case 139: -/* Line 1792 of yacc.c */ -#line 692 "src/IceGrid/Grammar.y" +#line 690 "src/IceGrid/Grammar.y" { -} +;} break; case 140: -/* Line 1792 of yacc.c */ -#line 695 "src/IceGrid/Grammar.y" +#line 693 "src/IceGrid/Grammar.y" { -} +;} break; case 141: -/* Line 1792 of yacc.c */ -#line 698 "src/IceGrid/Grammar.y" +#line 696 "src/IceGrid/Grammar.y" { -} +;} break; case 142: -/* Line 1792 of yacc.c */ -#line 701 "src/IceGrid/Grammar.y" +#line 699 "src/IceGrid/Grammar.y" { -} +;} break; case 143: -/* Line 1792 of yacc.c */ -#line 704 "src/IceGrid/Grammar.y" +#line 702 "src/IceGrid/Grammar.y" { -} +;} break; case 144: -/* Line 1792 of yacc.c */ -#line 707 "src/IceGrid/Grammar.y" +#line 705 "src/IceGrid/Grammar.y" { -} +;} break; case 145: -/* Line 1792 of yacc.c */ -#line 710 "src/IceGrid/Grammar.y" +#line 708 "src/IceGrid/Grammar.y" { -} +;} break; case 146: -/* Line 1792 of yacc.c */ -#line 713 "src/IceGrid/Grammar.y" +#line 711 "src/IceGrid/Grammar.y" { -} +;} break; case 147: -/* Line 1792 of yacc.c */ -#line 716 "src/IceGrid/Grammar.y" +#line 714 "src/IceGrid/Grammar.y" { -} +;} break; case 148: -/* Line 1792 of yacc.c */ -#line 719 "src/IceGrid/Grammar.y" +#line 717 "src/IceGrid/Grammar.y" { -} +;} break; case 149: -/* Line 1792 of yacc.c */ -#line 722 "src/IceGrid/Grammar.y" +#line 720 "src/IceGrid/Grammar.y" { -} +;} break; case 150: -/* Line 1792 of yacc.c */ -#line 725 "src/IceGrid/Grammar.y" +#line 723 "src/IceGrid/Grammar.y" { -} +;} break; case 151: -/* Line 1792 of yacc.c */ -#line 728 "src/IceGrid/Grammar.y" +#line 726 "src/IceGrid/Grammar.y" { -} +;} break; case 152: -/* Line 1792 of yacc.c */ -#line 731 "src/IceGrid/Grammar.y" +#line 729 "src/IceGrid/Grammar.y" { -} +;} break; case 153: -/* Line 1792 of yacc.c */ -#line 734 "src/IceGrid/Grammar.y" +#line 732 "src/IceGrid/Grammar.y" { -} +;} break; case 154: -/* Line 1792 of yacc.c */ -#line 737 "src/IceGrid/Grammar.y" +#line 735 "src/IceGrid/Grammar.y" { -} +;} break; case 155: -/* Line 1792 of yacc.c */ -#line 740 "src/IceGrid/Grammar.y" +#line 738 "src/IceGrid/Grammar.y" { -} +;} break; case 156: -/* Line 1792 of yacc.c */ -#line 743 "src/IceGrid/Grammar.y" +#line 741 "src/IceGrid/Grammar.y" { -} +;} break; case 157: -/* Line 1792 of yacc.c */ -#line 746 "src/IceGrid/Grammar.y" +#line 744 "src/IceGrid/Grammar.y" { -} +;} break; case 158: -/* Line 1792 of yacc.c */ -#line 749 "src/IceGrid/Grammar.y" +#line 747 "src/IceGrid/Grammar.y" { -} +;} break; case 159: -/* Line 1792 of yacc.c */ -#line 752 "src/IceGrid/Grammar.y" +#line 750 "src/IceGrid/Grammar.y" { -} +;} break; case 160: -/* Line 1792 of yacc.c */ -#line 755 "src/IceGrid/Grammar.y" +#line 753 "src/IceGrid/Grammar.y" { -} +;} break; case 161: -/* Line 1792 of yacc.c */ -#line 758 "src/IceGrid/Grammar.y" +#line 756 "src/IceGrid/Grammar.y" { -} +;} break; case 162: -/* Line 1792 of yacc.c */ -#line 761 "src/IceGrid/Grammar.y" +#line 759 "src/IceGrid/Grammar.y" { -} +;} break; case 163: -/* Line 1792 of yacc.c */ -#line 764 "src/IceGrid/Grammar.y" +#line 762 "src/IceGrid/Grammar.y" { -} +;} break; case 164: -/* Line 1792 of yacc.c */ -#line 767 "src/IceGrid/Grammar.y" +#line 765 "src/IceGrid/Grammar.y" { -} +;} break; case 165: -/* Line 1792 of yacc.c */ -#line 770 "src/IceGrid/Grammar.y" +#line 768 "src/IceGrid/Grammar.y" { -} +;} break; case 166: -/* Line 1792 of yacc.c */ -#line 773 "src/IceGrid/Grammar.y" +#line 771 "src/IceGrid/Grammar.y" { -} +;} break; case 167: -/* Line 1792 of yacc.c */ -#line 776 "src/IceGrid/Grammar.y" - { -} - break; - - case 168: -/* Line 1792 of yacc.c */ -#line 779 "src/IceGrid/Grammar.y" - { -} - break; - - case 169: -/* Line 1792 of yacc.c */ -#line 782 "src/IceGrid/Grammar.y" - { -} - break; - - case 170: -/* Line 1792 of yacc.c */ -#line 785 "src/IceGrid/Grammar.y" - { -} - break; - - case 171: -/* Line 1792 of yacc.c */ -#line 788 "src/IceGrid/Grammar.y" - { -} - break; - - case 172: -/* Line 1792 of yacc.c */ -#line 791 "src/IceGrid/Grammar.y" +#line 774 "src/IceGrid/Grammar.y" { -} +;} break; -/* Line 1792 of yacc.c */ -#line 3552 "src/IceGrid/Grammar.cpp" +/* Line 1267 of yacc.c. */ +#line 3315 "src/IceGrid/Grammar.cpp" default: break; } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -3573,6 +3322,7 @@ yyreduce: *++yyvsp = yyval; + /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -3592,10 +3342,6 @@ yyreduce: | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -3603,36 +3349,37 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } } -# undef YYSYNTAX_ERROR #endif } @@ -3640,7 +3387,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an + /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -3657,7 +3404,7 @@ yyerrlab: } } - /* Else will try to reuse lookahead token after shifting the error + /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; @@ -3691,7 +3438,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) + if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -3714,9 +3461,10 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + if (yyn == YYFINAL) + YYACCEPT; + *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ @@ -3740,7 +3488,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined yyoverflow || YYERROR_VERBOSE +#ifndef yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -3751,14 +3499,9 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - } + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -3782,3 +3525,4 @@ yyreturn: } + diff --git a/cpp/src/IceGrid/Grammar.h b/cpp/src/IceGrid/Grammar.h index 9a3871b803c..fb0c3c72213 100644 --- a/cpp/src/IceGrid/Grammar.h +++ b/cpp/src/IceGrid/Grammar.h @@ -1,21 +1,24 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 2.3. */ -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - + the Free Software Foundation; either version 2, or (at your option) + any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -26,20 +29,10 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -#ifndef YY_YY_SRC_ICEGRID_GRAMMAR_HPP_INCLUDED -# define YY_YY_SRC_ICEGRID_GRAMMAR_HPP_INCLUDED -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 1 -#endif -#if YYDEBUG -extern int yydebug; -#endif - /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -63,53 +56,80 @@ extern int yydebug; ICE_GRID_STRING = 272, ICE_GRID_START = 273, ICE_GRID_STOP = 274, - ICE_GRID_PATCH = 275, - ICE_GRID_SIGNAL = 276, - ICE_GRID_STDOUT = 277, - ICE_GRID_STDERR = 278, - ICE_GRID_DESCRIBE = 279, - ICE_GRID_PROPERTIES = 280, - ICE_GRID_PROPERTY = 281, - ICE_GRID_STATE = 282, - ICE_GRID_PID = 283, - ICE_GRID_ENDPOINTS = 284, - ICE_GRID_ACTIVATION = 285, - ICE_GRID_OBJECT = 286, - ICE_GRID_FIND = 287, - ICE_GRID_SHOW = 288, - ICE_GRID_COPYING = 289, - ICE_GRID_WARRANTY = 290, - ICE_GRID_DIFF = 291, - ICE_GRID_UPDATE = 292, - ICE_GRID_INSTANTIATE = 293, - ICE_GRID_TEMPLATE = 294, - ICE_GRID_SERVICE = 295, - ICE_GRID_ENABLE = 296, - ICE_GRID_DISABLE = 297 + ICE_GRID_SIGNAL = 275, + ICE_GRID_STDOUT = 276, + ICE_GRID_STDERR = 277, + ICE_GRID_DESCRIBE = 278, + ICE_GRID_PROPERTIES = 279, + ICE_GRID_PROPERTY = 280, + ICE_GRID_STATE = 281, + ICE_GRID_PID = 282, + ICE_GRID_ENDPOINTS = 283, + ICE_GRID_ACTIVATION = 284, + ICE_GRID_OBJECT = 285, + ICE_GRID_FIND = 286, + ICE_GRID_SHOW = 287, + ICE_GRID_COPYING = 288, + ICE_GRID_WARRANTY = 289, + ICE_GRID_DIFF = 290, + ICE_GRID_UPDATE = 291, + ICE_GRID_INSTANTIATE = 292, + ICE_GRID_TEMPLATE = 293, + ICE_GRID_SERVICE = 294, + ICE_GRID_ENABLE = 295, + ICE_GRID_DISABLE = 296 }; #endif +/* Tokens. */ +#define ICE_GRID_HELP 258 +#define ICE_GRID_EXIT 259 +#define ICE_GRID_APPLICATION 260 +#define ICE_GRID_NODE 261 +#define ICE_GRID_REGISTRY 262 +#define ICE_GRID_SERVER 263 +#define ICE_GRID_ADAPTER 264 +#define ICE_GRID_PING 265 +#define ICE_GRID_LOAD 266 +#define ICE_GRID_SOCKETS 267 +#define ICE_GRID_ADD 268 +#define ICE_GRID_REMOVE 269 +#define ICE_GRID_LIST 270 +#define ICE_GRID_SHUTDOWN 271 +#define ICE_GRID_STRING 272 +#define ICE_GRID_START 273 +#define ICE_GRID_STOP 274 +#define ICE_GRID_SIGNAL 275 +#define ICE_GRID_STDOUT 276 +#define ICE_GRID_STDERR 277 +#define ICE_GRID_DESCRIBE 278 +#define ICE_GRID_PROPERTIES 279 +#define ICE_GRID_PROPERTY 280 +#define ICE_GRID_STATE 281 +#define ICE_GRID_PID 282 +#define ICE_GRID_ENDPOINTS 283 +#define ICE_GRID_ACTIVATION 284 +#define ICE_GRID_OBJECT 285 +#define ICE_GRID_FIND 286 +#define ICE_GRID_SHOW 287 +#define ICE_GRID_COPYING 288 +#define ICE_GRID_WARRANTY 289 +#define ICE_GRID_DIFF 290 +#define ICE_GRID_UPDATE 291 +#define ICE_GRID_INSTANTIATE 292 +#define ICE_GRID_TEMPLATE 293 +#define ICE_GRID_SERVICE 294 +#define ICE_GRID_ENABLE 295 +#define ICE_GRID_DISABLE 296 + + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ -#endif /* !YY_YY_SRC_ICEGRID_GRAMMAR_HPP_INCLUDED */ diff --git a/cpp/src/IceGrid/Grammar.y b/cpp/src/IceGrid/Grammar.y index ce7a88bca7f..4f9b20078e4 100644 --- a/cpp/src/IceGrid/Grammar.y +++ b/cpp/src/IceGrid/Grammar.y @@ -69,7 +69,6 @@ yyerror(const char* s) %token ICE_GRID_STRING %token ICE_GRID_START %token ICE_GRID_STOP -%token ICE_GRID_PATCH %token ICE_GRID_SIGNAL %token ICE_GRID_STDOUT %token ICE_GRID_STDERR @@ -175,14 +174,6 @@ command { parser->usage("application", "describe"); } -| ICE_GRID_APPLICATION ICE_GRID_PATCH strings ';' -{ - parser->patchApplication($3); -} -| ICE_GRID_APPLICATION ICE_GRID_PATCH ICE_GRID_HELP ';' -{ - parser->usage("application", "patch"); -} | ICE_GRID_APPLICATION ICE_GRID_LIST strings ';' { parser->listAllApplications($3); @@ -351,14 +342,6 @@ command { parser->usage("server", "stop"); } -| ICE_GRID_SERVER ICE_GRID_PATCH strings ';' -{ - parser->patchServer($3); -} -| ICE_GRID_SERVER ICE_GRID_PATCH ICE_GRID_HELP ';' -{ - parser->usage("server", "patch"); -} | ICE_GRID_SERVER ICE_GRID_SIGNAL strings ';' { parser->signalServer($3); @@ -724,9 +707,6 @@ keyword | ICE_GRID_STOP { } -| ICE_GRID_PATCH -{ -} | ICE_GRID_SIGNAL { } diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index 389f2fc8516..7d404da3fe5 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -19,7 +19,6 @@ #include <IceGrid/TraceLevels.h> #include <IceGrid/DescriptorParser.h> #include <IceGrid/Util.h> -#include <IcePatch2Lib/Util.h> #ifdef _WIN32 # include <direct.h> @@ -361,9 +360,8 @@ NodeService::startImpl(int argc, char* argv[], int& status) dataPath += "/"; } - IcePatch2Internal::createDirectory(dataPath + "servers"); - IcePatch2Internal::createDirectory(dataPath + "tmp"); - IcePatch2Internal::createDirectory(dataPath + "distrib"); + createDirectory(dataPath + "servers"); + createDirectory(dataPath + "tmp"); #ifdef _WIN32 // @@ -376,7 +374,6 @@ NodeService::startImpl(int argc, char* argv[], int& status) { setNoIndexingAttribute(dataPath + "servers"); setNoIndexingAttribute(dataPath + "tmp"); - setNoIndexingAttribute(dataPath + "distrib"); } catch(const FileException& ex) { diff --git a/cpp/src/IceGrid/Internal.ice b/cpp/src/IceGrid/Internal.ice index efa026034d3..dabf62015e4 100644 --- a/cpp/src/IceGrid/Internal.ice +++ b/cpp/src/IceGrid/Internal.ice @@ -42,6 +42,8 @@ class InternalAdapterDescriptor } sequence<InternalAdapterDescriptor> InternalAdapterDescriptorSeq; +// This class is no longer used. We keep it only for interop with IceGrid 3.7. +// class InternalDistributionDescriptor { /** The proxy of the IcePatch2 server. */ @@ -88,10 +90,10 @@ class InternalServerDescriptor /** The server deactivation timeout. */ string deactivationTimeout; - /** Specifies if the server depends on the application distrib. */ - bool applicationDistrib; + // Not used, always false. Kept only for interop with IceGrid 3.7. + bool applicationDistrib = false; - /** The distribution descriptor of this server. */ + // Not used, always nil. Kept only for interop with IceGrid 3.7. InternalDistributionDescriptor distrib; /** Specifies if a process object is registered. */ @@ -329,23 +331,6 @@ interface ReplicaObserver void replicaRemoved(InternalRegistry* replica); } -interface PatcherFeedback -{ - /** - * - * The patch completed successfully. - * - **/ - void finished(); - - /** - * - * The patch on the given node failed for the given reason. - * - **/ - void failed(string reason); -} - interface Node extends FileReader, ReplicaObserver { /** @@ -396,20 +381,6 @@ interface Node extends FileReader, ReplicaObserver /** * - * Patch application and server distributions. If some servers - * using a distribution directory to patch are active, this method - * will raise a PatchException unless shutdown is set to true. In - * which case the servers will be shutdown. - * - **/ - ["amd"] idempotent void patch(PatcherFeedback* feedback, - string application, - string server, - InternalDistributionDescriptor appDistrib, - bool shutdown); - - /** - * * Establish a session to the given replica, this method only * returns once the registration was attempted (unlike * replicaAdded below). diff --git a/cpp/src/IceGrid/Makefile.mk b/cpp/src/IceGrid/Makefile.mk index 6a173c0031f..1beaaeb8849 100644 --- a/cpp/src/IceGrid/Makefile.mk +++ b/cpp/src/IceGrid/Makefile.mk @@ -66,15 +66,15 @@ $(project)_targetdir := $(bindir) icegridnode_sources := $(addprefix $(currentdir)/,$(local_node_srcs) $(local_registry_srcs) IceGridNode.cpp) \ $(slicedir)/IceLocatorDiscovery/IceLocatorDiscovery.ice -icegridnode_dependencies := IceBox IceStormService IceStorm IceXML IceSSL IcePatch2 IceDB +icegridnode_dependencies := IceBox IceStormService IceStorm IceXML IceSSL IceDB icegridnode_cppflags := $(if $(lmdb_includedir),-I$(lmdb_includedir)) icegridregistry_sources := $(addprefix $(currentdir)/,$(local_registry_srcs) IceGridRegistry.cpp) \ $(slicedir)/IceLocatorDiscovery/IceLocatorDiscovery.ice -icegridregistry_dependencies := IceBox IceStormService IceStorm IceXML IceSSL IcePatch2 IceDB $(local_dependencies) +icegridregistry_dependencies := IceBox IceStormService IceStorm IceXML IceSSL IceDB $(local_dependencies) icegridregistry_cppflags := $(if $(lmdb_includedir),-I$(lmdb_includedir)) -icegridadmin_dependencies := IcePatch2 IceBox IceXML IceLocatorDiscovery +icegridadmin_dependencies := IceBox IceXML IceLocatorDiscovery icegridadmin_sources := $(addprefix $(currentdir)/,$(local_admin_srcs)) projects += $(project) diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp index 1407c998f1c..b727edb4966 100644 --- a/cpp/src/IceGrid/NodeCache.cpp +++ b/cpp/src/IceGrid/NodeCache.cpp @@ -923,13 +923,7 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const server->activation = info.descriptor->activation; server->activationTimeout = info.descriptor->activationTimeout; server->deactivationTimeout = info.descriptor->deactivationTimeout; - server->applicationDistrib = info.descriptor->applicationDistrib; server->services = Ice::StringSeq(); - if(!info.descriptor->distrib.icepatch.empty()) - { - server->distrib = new InternalDistributionDescriptor(info.descriptor->distrib.icepatch, - info.descriptor->distrib.directories); - } server->options = info.descriptor->options; server->envs = info.descriptor->envs; diff --git a/cpp/src/IceGrid/NodeI.cpp b/cpp/src/IceGrid/NodeI.cpp index 8017fa3bdd4..d098d71e83f 100644 --- a/cpp/src/IceGrid/NodeI.cpp +++ b/cpp/src/IceGrid/NodeI.cpp @@ -5,8 +5,6 @@ #include <IceUtil/Timer.h> #include <IceUtil/FileUtil.h> #include <Ice/Ice.h> -#include <IcePatch2Lib/Util.h> -#include <IcePatch2/ClientUtil.h> #include <IceGrid/NodeI.h> #include <IceGrid/Activator.h> #include <IceGrid/ServerI.h> @@ -16,174 +14,11 @@ #include <IceGrid/NodeSessionManager.h> using namespace std; -using namespace IcePatch2; -using namespace IcePatch2Internal; using namespace IceGrid; namespace { -class LogPatcherFeedback : public IcePatch2::PatcherFeedback -{ -public: - - LogPatcherFeedback(const TraceLevelsPtr& traceLevels, const string& dest) : - _traceLevels(traceLevels), - _startedPatch(false), - _lastProgress(0), - _dest(dest) - { - } - - void - setPatchingPath(const string& path) - { - _path = path; - _startedPatch = false; - _lastProgress = 0; - } - - virtual bool - noFileSummary(const string& reason) - { - if(_traceLevels->patch > 0) - { - Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); - out << _dest << ": can't load summary file (will perform a thorough patch):\n" << reason; - } - return true; - } - - virtual bool - checksumStart() - { - if(_traceLevels->patch > 0) - { - Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); - out << _dest << ": started checksum calculation"; - } - return true; - } - - virtual bool - checksumProgress(const string& path) - { - if(_traceLevels->patch > 2) - { - Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); - out << _dest << ": calculating checksum for " << getBasename(path); - } - return true; - } - - virtual bool - checksumEnd() - { - if(_traceLevels->patch > 0) - { - Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); - out << _dest << ": finished checksum calculation"; - } - return true; - } - - virtual bool - fileListStart() - { - if(_traceLevels->patch > 0) - { - Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); - out << _dest << ": getting list of file to patch"; - } - return true; - } - - virtual bool - fileListProgress(Ice::Int /*percent*/) - { - return true; - } - - virtual bool - fileListEnd() - { - if(_traceLevels->patch > 0) - { - Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); - out << _dest << ": getting list of file to patch completed"; - } - return true; - } - - virtual bool - patchStart(const string& /*path*/, Ice::Long /*size*/, Ice::Long totalProgress, Ice::Long totalSize) - { - if(_traceLevels->patch > 1 && totalSize > (1024 * 1024)) - { - int progress = static_cast<int>(static_cast<double>(totalProgress) / totalSize * 100.0); - progress /= 5; - progress *= 5; - if(progress != _lastProgress) - { - _lastProgress = progress; - Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); - out << _dest << ": downloaded " << progress << "% (" << totalProgress << '/' << totalSize << ')'; - if(!_path.empty()) - { - out << " of " << _path; - } - } - } - else if(_traceLevels->patch > 0) - { - if(!_startedPatch) - { - Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); - int roundedSize = static_cast<int>(static_cast<double>(totalSize) / 1024); - if(roundedSize == 0 && totalSize > 0) - { - roundedSize = 1; - } - out << _dest << ": downloading " << (_path.empty() ? string("") : (_path + " ")) << roundedSize - << "KB "; - _startedPatch = true; - } - } - - return true; - } - - virtual bool - patchProgress(Ice::Long /*progress*/, Ice::Long /*size*/, Ice::Long /*totalProgress*/, Ice::Long /*totalSize*/) - { - return true; - } - - virtual bool - patchEnd() - { - return true; - } - - void - finishPatch() - { - if(_traceLevels->patch > 0) - { - Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); - out << _dest << ": downloading completed"; - } - } - -private: - - const TraceLevelsPtr _traceLevels; - bool _startedPatch; - int _lastProgress; - string _path; - string _dest; -}; - class NodeUp : public NodeI::Update { public: @@ -468,202 +303,6 @@ NodeI::destroyServerWithoutRestart_async(const AMD_Node_destroyServerWithoutRest } void -NodeI::patch_async(const AMD_Node_patchPtr& amdCB, - const PatcherFeedbackPrx& feedback, - const string& application, - const string& server, - const InternalDistributionDescriptorPtr& appDistrib, - bool shutdown, - const Ice::Current&) -{ - amdCB->ice_response(); - - { - Lock sync(*this); - while(_patchInProgress.find(application) != _patchInProgress.end()) - { - wait(); - } - _patchInProgress.insert(application); - } - - set<ServerIPtr> servers; - bool patchApplication = !appDistrib->icepatch.empty(); - if(server.empty()) - { - // - // Patch all the servers from the application. - // - servers = getApplicationServers(application); - } - else - { - ServerIPtr svr; - try - { - svr = ServerIPtr::dynamicCast(_adapter->find(createServerIdentity(server))); - } - catch(const Ice::ObjectAdapterDeactivatedException&) - { - } - - if(svr) - { - if(appDistrib->icepatch.empty() || !svr->dependsOnApplicationDistrib()) - { - // - // Don't patch the application if the server doesn't - // depend on it. - // - patchApplication = false; - servers.insert(svr); - } - else - { - // - // If the server to patch depends on the application, - // we need to shutdown all the application servers - // that depend on the application. - // - servers = getApplicationServers(application); - } - } - } - - for(set<ServerIPtr>::iterator s = servers.begin(); s != servers.end();) - { - if(!appDistrib->icepatch.empty() && (*s)->dependsOnApplicationDistrib()) - { - ++s; - } - else if((*s)->getDistribution() && (server.empty() || server == (*s)->getId())) - { - ++s; - } - else - { - // - // Exclude servers which don't depend on the application distribution - // or don't have a distribution. - // - servers.erase(s++); - } - } - - string failure; - if(!servers.empty()) - { - try - { - vector<string> running; - for(set<ServerIPtr>::iterator s = servers.begin(); s != servers.end();) - { - try - { - if(!(*s)->startPatch(shutdown)) - { - running.push_back((*s)->getId()); - servers.erase(s++); - } - else - { - ++s; - } - } - catch(const Ice::ObjectNotExistException&) - { - servers.erase(s++); - } - } - - if(!running.empty()) - { - if(running.size() == 1) - { - throw runtime_error("server `" + toString(running) + "' is active"); - } - else - { - throw runtime_error("servers `" + toString(running, ", ") + "' are active"); - } - } - - for(set<ServerIPtr>::iterator s = servers.begin(); s != servers.end(); ++s) - { - (*s)->waitForPatch(); - } - - // - // Patch the application. - // - FileServerPrx icepatch; - if(patchApplication) - { - assert(!appDistrib->icepatch.empty()); - icepatch = FileServerPrx::checkedCast(_communicator->stringToProxy(appDistrib->icepatch)); - if(!icepatch) - { - throw runtime_error("proxy `" + appDistrib->icepatch + "' is not a file server."); - } - patch(icepatch, "distrib/" + application, appDistrib->directories); - } - - // - // Patch the server(s). - // - for(set<ServerIPtr>::iterator s = servers.begin(); s != servers.end(); ++s) - { - InternalDistributionDescriptorPtr dist = (*s)->getDistribution(); - if(dist && (server.empty() || (*s)->getId() == server)) - { - icepatch = FileServerPrx::checkedCast(_communicator->stringToProxy(dist->icepatch)); - if(!icepatch) - { - throw runtime_error("proxy `" + dist->icepatch + "' is not a file server."); - } - patch(icepatch, "servers/" + (*s)->getId() + "/distrib", dist->directories); - - if(!server.empty()) - { - break; // No need to continue. - } - } - } - } - catch(const exception& ex) - { - failure = ex.what(); - } - - for(set<ServerIPtr>::const_iterator s = servers.begin(); s != servers.end(); ++s) - { - (*s)->finishPatch(); - } - } - - { - Lock sync(*this); - _patchInProgress.erase(application); - notifyAll(); - } - - try - { - if(failure.empty()) - { - feedback->finished(); - } - else - { - feedback->failed(failure); - } - } - catch(const Ice::LocalException&) - { - } -} - -void NodeI::registerWithReplica(const InternalRegistryPrx& replica, const Ice::Current&) { _sessions.create(replica); @@ -1054,20 +693,6 @@ NodeI::removeServer(const ServerIPtr& server, const std::string& application) if(p->second.empty()) { _serversByApplication.erase(p); - - string appDir = _dataDir + "/distrib/" + application; - if(IceUtilInternal::directoryExists(appDir)) - { - try - { - IcePatch2Internal::removeRecursive(appDir); - } - catch(const exception& ex) - { - Ice::Warning out(_traceLevels->logger); - out << "removing application directory `" << appDir << "' failed:\n" << ex.what(); - } - } } } } @@ -1203,7 +828,6 @@ NodeI::canRemoveServerDirectory(const string& name) set<string> contents(c.begin(), c.end()); contents.erase("dbs"); contents.erase("config"); - contents.erase("distrib"); contents.erase("revision"); contents.erase("data"); Ice::StringSeq serviceDataDirs; @@ -1276,44 +900,6 @@ NodeI::canRemoveServerDirectory(const string& name) return true; } -void -NodeI::patch(const FileServerPrx& icepatch, const string& dest, const vector<string>& directories) -{ - IcePatch2::PatcherFeedbackPtr feedback = new LogPatcherFeedback(_traceLevels, dest); - IcePatch2Internal::createDirectory(_dataDir + "/" + dest); - PatcherPtr patcher = PatcherFactory::create(icepatch, feedback, _dataDir + "/" + dest, false, 100, 1); - bool aborted = !patcher->prepare(); - if(!aborted) - { - if(directories.empty()) - { - aborted = !patcher->patch(""); - dynamic_cast<LogPatcherFeedback*>(feedback.get())->finishPatch(); - } - else - { - for(vector<string>::const_iterator p = directories.begin(); p != directories.end(); ++p) - { - dynamic_cast<LogPatcherFeedback*>(feedback.get())->setPatchingPath(*p); - if(!patcher->patch(*p)) - { - aborted = true; - break; - } - dynamic_cast<LogPatcherFeedback*>(feedback.get())->finishPatch(); - } - } - } - if(!aborted) - { - patcher->finish(); - } - - // - // Update the files owner/group - // -} - set<ServerIPtr> NodeI::getApplicationServers(const string& application) const { diff --git a/cpp/src/IceGrid/NodeI.h b/cpp/src/IceGrid/NodeI.h index 5d3afb7f270..f01eda09c38 100644 --- a/cpp/src/IceGrid/NodeI.h +++ b/cpp/src/IceGrid/NodeI.h @@ -6,7 +6,6 @@ #define ICE_GRID_NODE_I_H #include <IceUtil/Timer.h> -#include <IcePatch2/FileServer.h> #include <IceGrid/Internal.h> #include <IceGrid/PlatformInfo.h> #include <IceGrid/UserAccountMapper.h> @@ -85,9 +84,6 @@ public: const std::string&, const Ice::Current&); - virtual void patch_async(const AMD_Node_patchPtr&, const PatcherFeedbackPrx&, const std::string&, - const std::string&, const InternalDistributionDescriptorPtr&, bool, const Ice::Current&); - virtual void registerWithReplica(const InternalRegistryPrx&, const Ice::Current&); virtual void replicaInit(const InternalRegistryPrxSeq&, const Ice::Current&); @@ -143,7 +139,6 @@ public: private: std::vector<ServerCommandPtr> checkConsistencyNoSync(const Ice::StringSeq&); - void patch(const IcePatch2::FileServerPrx&, const std::string&, const std::vector<std::string>&); std::set<ServerIPtr> getApplicationServers(const std::string&) const; std::string getFilePath(const std::string&) const; @@ -187,7 +182,6 @@ private: IceUtil::Mutex _serversLock; std::map<std::string, std::set<ServerIPtr> > _serversByApplication; - std::set<std::string> _patchInProgress; }; typedef IceUtil::Handle<NodeI> NodeIPtr; diff --git a/cpp/src/IceGrid/NodeSessionI.cpp b/cpp/src/IceGrid/NodeSessionI.cpp index 5f0a9d62b03..72e57e02a8c 100644 --- a/cpp/src/IceGrid/NodeSessionI.cpp +++ b/cpp/src/IceGrid/NodeSessionI.cpp @@ -11,121 +11,6 @@ using namespace std; using namespace IceGrid; -namespace IceGrid -{ - -class PatcherFeedbackI : public PatcherFeedback -{ -public: - - PatcherFeedbackI(const string& node, - const NodeSessionIPtr& session, - const Ice::Identity id, - const PatcherFeedbackAggregatorPtr& aggregator) : - _node(node), - _session(session), - _id(id), - _aggregator(aggregator) - { - } - - void finished(const Ice::Current&) - { - _aggregator->finished(_node); - _session->removeFeedback(this, _id); - } - - virtual void failed(const string& reason, const Ice::Current& = Ice::Current()) - { - _aggregator->failed(_node, reason); - _session->removeFeedback(this, _id); - } - -private: - - const std::string _node; - const NodeSessionIPtr _session; - const Ice::Identity _id; - const PatcherFeedbackAggregatorPtr _aggregator; -}; - -}; - -PatcherFeedbackAggregator::PatcherFeedbackAggregator(Ice::Identity id, - const TraceLevelsPtr& traceLevels, - const string& type, - const string& name, - int nodeCount) : - _id(id), - _traceLevels(traceLevels), - _type(type), - _name(name), - _count(nodeCount) -{ -} - -PatcherFeedbackAggregator::~PatcherFeedbackAggregator() -{ -} - -void -PatcherFeedbackAggregator::finished(const string& node) -{ - Lock sync(*this); - if(_successes.find(node) != _successes.end() || _failures.find(node) != _failures.end()) - { - return; - } - - if(_traceLevels->patch > 0) - { - Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); - out << "finished patching of " << _type << " `" << _name << "' on node `" << node << "'"; - } - - _successes.insert(node); - checkIfDone(); -} - -void -PatcherFeedbackAggregator::failed(const string& node, const string& failure) -{ - Lock sync(*this); - if(_successes.find(node) != _successes.end() || _failures.find(node) != _failures.end()) - { - return; - } - - if(_traceLevels->patch > 0) - { - Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); - out << "patching of " << _type << " `" << _name << "' on node `" << node <<"' failed:\n" << failure; - } - - _failures.insert(node); - _reasons.push_back("patch on node `" + node + "' failed:\n" + failure); - checkIfDone(); -} - -void -PatcherFeedbackAggregator::checkIfDone() -{ - if(static_cast<int>(_successes.size() + _failures.size()) == _count) - { - if(!_failures.empty()) - { - sort(_reasons.begin(), _reasons.end()); - PatchException ex; - ex.reasons = _reasons; - exception(ex); - } - else - { - response(); - } - } -} - NodeSessionI::NodeSessionI(const DatabasePtr& database, const NodePrx& node, const InternalNodeInfoPtr& info, @@ -291,38 +176,6 @@ NodeSessionI::shutdown() destroyImpl(true); } -void -NodeSessionI::patch(const PatcherFeedbackAggregatorPtr& aggregator, - const string& application, - const string& server, - const InternalDistributionDescriptorPtr& dist, - bool shutdown) -{ - Ice::Identity id; - id.category = _database->getInstanceName(); - id.name = Ice::generateUUID(); - - PatcherFeedbackPtr obj = new PatcherFeedbackI(_info->name, this, id, aggregator); - try - { - PatcherFeedbackPrx feedback = PatcherFeedbackPrx::uncheckedCast(_database->getInternalAdapter()->add(obj, id)); - _node->patch(feedback, application, server, dist, shutdown); - - Lock sync(*this); - if(_destroy) - { - throw NodeUnreachableException(_info->name, "node is down"); - } - _feedbacks.insert(obj); - } - catch(const Ice::LocalException& ex) - { - ostringstream os; - os << "node unreachable:\n" << ex; - obj->failed(os.str()); - } -} - const NodePrx& NodeSessionI::getNode() const { @@ -400,17 +253,6 @@ NodeSessionI::destroyImpl(bool shutdown) // _database->getNode(_info->name)->setSession(0); - // - // Clean up the patcher feedback servants (this will call back - // removeFeedback so we need to use a temporary set). - // - set<PatcherFeedbackPtr> feedbacks; - _feedbacks.swap(feedbacks); - for(set<PatcherFeedbackPtr>::const_iterator p = feedbacks.begin(); p != feedbacks.end(); ++p) - { - (*p)->failed("node is down"); - } - if(!shutdown) { try @@ -422,19 +264,3 @@ NodeSessionI::destroyImpl(bool shutdown) } } } - -void -NodeSessionI::removeFeedback(const PatcherFeedbackPtr& feedback, const Ice::Identity& id) -{ - try - { - _database->getInternalAdapter()->remove(id); - } - catch(const Ice::LocalException&) - { - } - { - Lock sync(*this); - _feedbacks.erase(feedback); - } -} diff --git a/cpp/src/IceGrid/NodeSessionI.h b/cpp/src/IceGrid/NodeSessionI.h index 637f0ceac2f..b3ee36155b5 100644 --- a/cpp/src/IceGrid/NodeSessionI.h +++ b/cpp/src/IceGrid/NodeSessionI.h @@ -17,36 +17,6 @@ typedef IceUtil::Handle<Database> DatabasePtr; class TraceLevels; typedef IceUtil::Handle<TraceLevels> TraceLevelsPtr; -class PatcherFeedbackAggregator : public IceUtil::Mutex, public IceUtil::Shared -{ -public: - - PatcherFeedbackAggregator(Ice::Identity, const TraceLevelsPtr&, const std::string&, const std::string&, int); - virtual ~PatcherFeedbackAggregator(); - - void finished(const std::string&); - void failed(const std::string&, const std::string&); - -protected: - - virtual void exception(const Ice::Exception&) = 0; - virtual void response() = 0; - -private: - - void checkIfDone(); - - const Ice::Identity _id; - const TraceLevelsPtr _traceLevels; - const std::string _type; - const std::string _name; - const int _count; - std::set<std::string> _successes; - std::set<std::string> _failures; - Ice::StringSeq _reasons; -}; -typedef IceUtil::Handle<PatcherFeedbackAggregator> PatcherFeedbackAggregatorPtr; - class NodeSessionI : public NodeSession, public IceUtil::Mutex { public: @@ -65,8 +35,6 @@ public: virtual IceUtil::Time timestamp() const; virtual void shutdown(); - void patch(const PatcherFeedbackAggregatorPtr&, const std::string&, const std::string&, - const InternalDistributionDescriptorPtr&, bool); const NodePrx& getNode() const; const InternalNodeInfoPtr& getInfo() const; @@ -74,7 +42,6 @@ public: NodeSessionPrx getProxy() const; bool isDestroyed() const; - void removeFeedback(const PatcherFeedbackPtr&, const Ice::Identity&); private: @@ -91,7 +58,6 @@ private: IceUtil::Time _timestamp; LoadInfo _load; bool _destroy; - std::set<PatcherFeedbackPtr> _feedbacks; }; typedef IceUtil::Handle<NodeSessionI> NodeSessionIPtr; diff --git a/cpp/src/IceGrid/Parser.cpp b/cpp/src/IceGrid/Parser.cpp index edcf11e4c69..736bd3ed421 100644 --- a/cpp/src/IceGrid/Parser.cpp +++ b/cpp/src/IceGrid/Parser.cpp @@ -36,7 +36,7 @@ namespace const char* _commandsHelp[][3] = { { "application", "add", -"application add [-n | --no-patch] DESC [TARGET ... ] [NAME=VALUE ... ]\n" +"application add DESC [TARGET ... ] [NAME=VALUE ... ]\n" " Add application described in DESC. If specified\n" " the optional targets TARGET will be deployed.\n" }, @@ -59,12 +59,6 @@ const char* _commandsHelp[][3] = { " --no-restart is specified, the update will fail if\n" " it is necessary to stop some servers.\n" }, -{ "application", "patch", -"application patch [-f | --force] NAME\n" -" Patch the given application data. If -f or --force is\n" -" specified, the servers depending on the data to patch\n" -" will be stopped if necessary.\n" -}, { "application", "list", "application list List all deployed applications.\n" }, @@ -154,9 +148,6 @@ const char* _commandsHelp[][3] = { { "server", "stop", "server stop ID Stop server ID.\n" }, -{ "server", "patch", -"server patch ID Patch server ID.\n" -}, { "server", "signal", "server signal ID SIGNAL Send SIGNAL (e.g. SIGTERM or 15) to server ID.\n" }, @@ -507,7 +498,6 @@ Parser::addApplication(const list<string>& origArgs) copyArgs.push_front("icegridadmin"); IceUtilInternal::Options opts; - opts.addOpt("n", "no-patch"); vector<string> args; try { @@ -555,21 +545,6 @@ Parser::addApplication(const list<string>& origArgs) // ApplicationDescriptor app = DescriptorParser::parseDescriptor(desc, targets, vars, _communicator, _admin); _admin->addApplication(app); - - if(!opts.isSet("no-patch")) - { - // - // Patch the application. - // - try - { - _admin->patchApplication(app.name, true); - } - catch(const PatchException& ex) - { - warning(patchFailed(ex.reasons)); - } - } } catch(const Ice::Exception& ex) { @@ -815,47 +790,6 @@ Parser::updateApplication(const list<string>& origArgs) } void -Parser::patchApplication(const list<string>& origArgs) -{ - list<string> copyArgs = origArgs; - copyArgs.push_front("icegridadmin"); - - IceUtilInternal::Options opts; - opts.addOpt("f", "force"); - vector<string> args; - try - { - for(list<string>::const_iterator p = copyArgs.begin(); p != copyArgs.end(); ++p) - { - args.push_back(*p); - } - args = opts.parse(args); - } - catch(const IceUtilInternal::BadOptException& e) - { - error(e.reason); - return; - } - - if(args.size() != 1) - { - invalidCommand("application patch", "requires exactly one argument"); - return; - } - - try - { - vector<string>::const_iterator p = args.begin(); - string name = *p++; - _admin->patchApplication(name, opts.isSet("force")); - } - catch(const Ice::Exception& ex) - { - exception(ex); - } -} - -void Parser::listAllApplications(const list<string>& args) { if(!args.empty()) @@ -1378,45 +1312,6 @@ Parser::stopServer(const list<string>& args) } void -Parser::patchServer(const list<string>& origArgs) -{ - list<string> copyArgs = origArgs; - copyArgs.push_front("icegridadmin"); - - IceUtilInternal::Options opts; - opts.addOpt("f", "force"); - vector<string> args; - try - { - for(list<string>::const_iterator p = copyArgs.begin(); p != copyArgs.end(); ++p) - { - args.push_back(*p); - } - args = opts.parse(args); - } - catch(const IceUtilInternal::BadOptException& e) - { - error(e.reason); - return; - } - - if(args.size() != 1) - { - invalidCommand("server patch", "requires exactly one argument"); - return; - } - - try - { - _admin->patchServer(args.front(), opts.isSet("force")); - } - catch(const Ice::Exception& ex) - { - exception(ex); - } -} - -void Parser::signalServer(const list<string>& args) { if(args.size() != 2) @@ -2722,53 +2617,6 @@ Parser::invalidCommand(const list<string>& s) } } -string -Parser::patchFailed(const Ice::StringSeq& reasons) -{ - if(reasons.size() == 1) - { - ostringstream s; - s << "the patch failed:\n" << reasons[0]; - return s.str(); - } - else - { - ostringstream os; - IceUtilInternal::Output out(os); - out.setIndent(2); - out << "the patch failed on some nodes:\n"; - for(Ice::StringSeq::const_iterator p = reasons.begin(); p != reasons.end(); ++p) - { - string reason = *p; - string::size_type beg = 0; - string::size_type end = reason.find_first_of("\n"); - if(end == string::npos) - { - end = reason.size(); - } - out << "- " << reason.substr(beg, end - beg); - out.inc(); - while(end < reason.size()) - { - beg = end + 1; - end = reason.find_first_of("\n", beg); - if(end == string::npos) - { - end = reason.size(); - } - out.newline(); - out << reason.substr(beg, end - beg); - } - out.dec(); - if(p + 1 != reasons.end()) - { - out.newline(); - } - } - return os.str(); - } -} - void Parser::error(const char* s) { @@ -2912,10 +2760,6 @@ Parser::exception(const Ice::Exception& pex) s << ex << ":\n" << ex.reason; error(s.str()); } - catch(const PatchException& ex) - { - error(patchFailed(ex.reasons)); - } catch(const BadSignalException& ex) { ostringstream s; diff --git a/cpp/src/IceGrid/Parser.h b/cpp/src/IceGrid/Parser.h index 1197b4f55a6..b28492f08e2 100644 --- a/cpp/src/IceGrid/Parser.h +++ b/cpp/src/IceGrid/Parser.h @@ -66,7 +66,6 @@ public: void describeApplication(const std::list<std::string>&); void diffApplication(const std::list<std::string>&); void updateApplication(const std::list<std::string>&); - void patchApplication(const std::list<std::string>&); void listAllApplications(const std::list<std::string>&); void describeServerTemplate(const std::list<std::string>&); @@ -88,7 +87,6 @@ public: void removeServer(const std::list<std::string>&); void startServer(const std::list<std::string>&); void stopServer(const std::list<std::string>&); - void patchServer(const std::list<std::string>&); void signalServer(const std::list<std::string>&); void writeMessage(const std::list<std::string>&, int fd); void describeServer(const std::list<std::string>&); @@ -136,7 +134,6 @@ public: void invalidCommand(const std::list<std::string>&); - std::string patchFailed(const Ice::StringSeq&); void error(const char*); void error(const std::string&); diff --git a/cpp/src/IceGrid/Scanner.cpp b/cpp/src/IceGrid/Scanner.cpp index d4bc68b5140..2c831ddb927 100644 --- a/cpp/src/IceGrid/Scanner.cpp +++ b/cpp/src/IceGrid/Scanner.cpp @@ -10,7 +10,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -48,6 +48,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -55,6 +56,7 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -85,8 +87,6 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#endif /* ! C99 */ - #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -334,7 +334,7 @@ void yyfree (void * ); /* Begin user sect3 */ -#define yywrap() 1 +#define yywrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; @@ -360,7 +360,7 @@ static void yy_fatal_error (yyconst char msg[] ); */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; @@ -526,7 +526,7 @@ std::string parseSingleQuotedString(); } #define YY_USER_INIT initScanner(); -#line 534 "src/IceGrid/Scanner.cpp" +#line 529 "src/IceGrid/Scanner.cpp" #define INITIAL 0 @@ -615,7 +615,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) +#define ECHO fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -626,7 +626,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -708,10 +708,10 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 81 "src/IceGrid/Scanner.l" +#line 76 "src/IceGrid/Scanner.l" -#line 719 "src/IceGrid/Scanner.cpp" +#line 714 "src/IceGrid/Scanner.cpp" if ( !(yy_init) ) { @@ -796,7 +796,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 83 "src/IceGrid/Scanner.l" +#line 78 "src/IceGrid/Scanner.l" { // C++-style comment int c; @@ -809,7 +809,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 93 "src/IceGrid/Scanner.l" +#line 88 "src/IceGrid/Scanner.l" { // C-style comment while(true) @@ -838,7 +838,7 @@ YY_RULE_SETUP case 3: /* rule 3 can match eol */ YY_RULE_SETUP -#line 118 "src/IceGrid/Scanner.l" +#line 113 "src/IceGrid/Scanner.l" { size_t len = strlen(yytext); for(size_t i = 0; i < len; ++i) @@ -853,14 +853,14 @@ YY_RULE_SETUP case 4: /* rule 4 can match eol */ YY_RULE_SETUP -#line 129 "src/IceGrid/Scanner.l" +#line 124 "src/IceGrid/Scanner.l" { return ';'; } YY_BREAK case 5: YY_RULE_SETUP -#line 133 "src/IceGrid/Scanner.l" +#line 128 "src/IceGrid/Scanner.l" { // "..."-type strings string s = parseDoubleQuotedString(); @@ -871,7 +871,7 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -#line 141 "src/IceGrid/Scanner.l" +#line 136 "src/IceGrid/Scanner.l" { // '...'-type strings string s; @@ -899,7 +899,7 @@ YY_RULE_SETUP YY_BREAK case 7: YY_RULE_SETUP -#line 166 "src/IceGrid/Scanner.l" +#line 161 "src/IceGrid/Scanner.l" { // Simple strings string s; @@ -938,10 +938,10 @@ YY_RULE_SETUP YY_BREAK case 8: YY_RULE_SETUP -#line 202 "src/IceGrid/Scanner.l" +#line 197 "src/IceGrid/Scanner.l" ECHO; YY_BREAK -#line 949 "src/IceGrid/Scanner.cpp" +#line 944 "src/IceGrid/Scanner.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1134,7 +1134,7 @@ static int yy_get_next_buffer (void) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); @@ -1267,7 +1267,7 @@ static int yy_get_next_buffer (void) yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 18); - return yy_is_jam ? 0 : yy_current_state; + return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) @@ -1355,7 +1355,7 @@ static int yy_get_next_buffer (void) case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) - return EOF; + return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -1695,8 +1695,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ @@ -1704,8 +1704,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len { YY_BUFFER_STATE b; char *buf; - yy_size_t n; - int i; + yy_size_t n, i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; @@ -1935,7 +1934,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 202 "src/IceGrid/Scanner.l" +#line 197 "src/IceGrid/Scanner.l" @@ -1965,7 +1964,6 @@ initScanner() keywordMap["pid"] = ICE_GRID_PID; keywordMap["endpoints"] = ICE_GRID_ENDPOINTS; keywordMap["start"] = ICE_GRID_START; - keywordMap["patch"] = ICE_GRID_PATCH; keywordMap["stop"] = ICE_GRID_STOP; keywordMap["signal"] = ICE_GRID_SIGNAL; keywordMap["stdout"] = ICE_GRID_STDOUT; diff --git a/cpp/src/IceGrid/Scanner.l b/cpp/src/IceGrid/Scanner.l index 1de7e5def65..c3287b086e0 100644 --- a/cpp/src/IceGrid/Scanner.l +++ b/cpp/src/IceGrid/Scanner.l @@ -222,7 +222,6 @@ initScanner() keywordMap["pid"] = ICE_GRID_PID; keywordMap["endpoints"] = ICE_GRID_ENDPOINTS; keywordMap["start"] = ICE_GRID_START; - keywordMap["patch"] = ICE_GRID_PATCH; keywordMap["stop"] = ICE_GRID_STOP; keywordMap["signal"] = ICE_GRID_SIGNAL; keywordMap["stdout"] = ICE_GRID_STDOUT; diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index 2f70ba75c07..8a2f6b36380 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -12,8 +12,6 @@ #include <IceGrid/Util.h> #include <IceGrid/ServerAdapterI.h> #include <IceGrid/DescriptorHelper.h> - -#include <IcePatch2Lib/Util.h> #include <IceUtil/FileUtil.h> #include <sys/types.h> @@ -120,7 +118,6 @@ descriptorUpdated(const InternalServerDescriptorPtr& lhs, const InternalServerDe lhs->activation != rhs->activation || lhs->activationTimeout != rhs->activationTimeout || lhs->deactivationTimeout != rhs->deactivationTimeout || - lhs->applicationDistrib != rhs->applicationDistrib || lhs->processRegistered != rhs->processRegistered || lhs->options != rhs->options || lhs->envs != rhs->envs || @@ -129,19 +126,6 @@ descriptorUpdated(const InternalServerDescriptorPtr& lhs, const InternalServerDe return true; } - if((!lhs->distrib && rhs->distrib) || (lhs->distrib && !rhs->distrib)) - { - return true; - } - else if(lhs->distrib && rhs->distrib) - { - if(lhs->distrib->icepatch != rhs->distrib->icepatch || - lhs->distrib->directories != rhs->distrib->directories) - { - return true; - } - } - if(lhs->adapters.size() != rhs->adapters.size()) { return true; @@ -633,57 +617,6 @@ DestroyCommand::clearDir() const return _clearDir; } -PatchCommand::PatchCommand(const ServerIPtr& server) : - ServerCommand(server), - _notified(false), - _destroyed(false) -{ -} - -bool -PatchCommand::canExecute(ServerI::InternalServerState state) -{ - return state == ServerI::Inactive; -} - -ServerI::InternalServerState -PatchCommand::nextState() -{ - return ServerI::Patching; -} - -void -PatchCommand::execute() -{ - Lock sync(*this); - _notified = true; - notifyAll(); -} - -bool -PatchCommand::waitForPatch() -{ - Lock sync(*this); - while(!_notified && !_destroyed) - { - wait(); - } - return _destroyed; -} - -void -PatchCommand::destroyed() -{ - Lock sync(*this); - _destroyed = true; - notifyAll(); -} - -void -PatchCommand::finished() -{ -} - StartCommand::StartCommand(const ServerIPtr& server, const IceUtil::TimerPtr& timer, int timeout) : TimedServerCommand(server, timer, timeout) { @@ -751,7 +684,7 @@ StopCommand::StopCommand(const ServerIPtr& server, const IceUtil::TimerPtr& time bool StopCommand::isStopped(ServerI::InternalServerState state) { - return state == ServerI::Inactive || state == ServerI::Patching || state == ServerI::Loading || + return state == ServerI::Inactive || state == ServerI::Loading || state >= ServerI::Destroying; } @@ -1100,20 +1033,6 @@ ServerI::getId() const return _id; } -InternalDistributionDescriptorPtr -ServerI::getDistribution() const -{ - Lock sync(*this); - return _desc ? _desc->distrib : InternalDistributionDescriptorPtr(); -} - -bool -ServerI::dependsOnApplicationDistrib() const -{ - Lock sync(*this); - return _desc ? _desc->applicationDistrib : false; -} - void ServerI::start(ServerActivation activation, const AMD_Server_startPtr& amdCB) { @@ -1406,72 +1325,6 @@ ServerI::destroy(const AMD_Node_destroyServerPtr& amdCB, const string& uuid, int return nextCommand(); } -bool -ServerI::startPatch(bool shutdown) -{ - ServerCommandPtr command; - { - Lock sync(*this); - checkDestroyed(); - if(!StopCommand::isStopped(_state)) - { - if(!shutdown) - { - return false; - } - else if(!_stop) - { - _stop = new StopCommand(this, _node->getTimer(), _deactivationTimeout); - } - } - if(!_patch) - { - _patch = new PatchCommand(this); - } - command = nextCommand(); - } - if(command) - { - command->execute(); - } - return true; -} - -bool -ServerI::waitForPatch() -{ - PatchCommandPtr patch; - { - Lock sync(*this); - if(!_patch) - { - return true; - } - patch = _patch; - } - return patch->waitForPatch(); -} - -void -ServerI::finishPatch() -{ -#ifndef _WIN32 - { - Lock sync(*this); - try - { - chownRecursive(_serverDir + "/distrib", _uid, _gid); - } - catch(const exception& ex) - { - Ice::Warning out(_node->getTraceLevels()->logger); - out << ex.what(); - } - } -#endif - setState(ServerI::Inactive); -} - void ServerI::adapterActivated(const string& id) { @@ -1869,7 +1722,7 @@ ServerI::destroy() { try { - IcePatch2Internal::removeRecursive(_serverDir); + removeRecursive(_serverDir); } catch(const exception& ex) { @@ -2000,7 +1853,6 @@ ServerI::shutdown() assert(!_destroy); assert(!_stop); assert(!_load); - assert(!_patch); assert(!_start); _timerTask = 0; } @@ -2029,7 +1881,7 @@ ServerI::update() // try { - IcePatch2Internal::removeRecursive(_serverDir); + removeRecursive(_serverDir); } catch(const exception&) { @@ -2235,7 +2087,7 @@ ServerI::updateImpl(const InternalServerDescriptorPtr& descriptor) // for(Ice::StringSeq::const_iterator p = _desc->logs.begin(); p != _desc->logs.end(); ++p) { - string path = IcePatch2Internal::simplify(*p); + string path = simplify(*p); if(IceUtilInternal::isAbsolutePath(path)) { _logs.push_back(path); @@ -2270,11 +2122,10 @@ ServerI::updateImpl(const InternalServerDescriptorPtr& descriptor) // // Create or update the server directories exists. // - IcePatch2Internal::createDirectory(_serverDir); - IcePatch2Internal::createDirectory(_serverDir + "/config"); - IcePatch2Internal::createDirectory(_serverDir + "/dbs"); - IcePatch2Internal::createDirectory(_serverDir + "/distrib"); - IcePatch2Internal::createDirectory(_serverDir + "/data"); + createDirectory(_serverDir); + createDirectory(_serverDir + "/config"); + createDirectory(_serverDir + "/dbs"); + createDirectory(_serverDir + "/data"); // // Create the configuration files, remove the old ones. @@ -2314,7 +2165,7 @@ ServerI::updateImpl(const InternalServerDescriptorPtr& descriptor) // // Remove old configuration files. // - Ice::StringSeq files = IcePatch2Internal::readDirectory(_serverDir + "/config"); + Ice::StringSeq files = readDirectory(_serverDir + "/config"); Ice::StringSeq toDel; set_difference(files.begin(), files.end(), knownFiles.begin(), knownFiles.end(), back_inserter(toDel)); for(Ice::StringSeq::const_iterator q = toDel.begin(); q != toDel.end(); ++q) @@ -2323,7 +2174,7 @@ ServerI::updateImpl(const InternalServerDescriptorPtr& descriptor) { try { - IcePatch2Internal::remove(_serverDir + "/config/" + *q); + remove(_serverDir + "/config/" + *q); } catch(const exception& ex) { @@ -2343,14 +2194,14 @@ ServerI::updateImpl(const InternalServerDescriptorPtr& descriptor) for(Ice::StringSeq::const_iterator q = _desc->services->begin(); q != _desc->services->end(); ++q) { knownDirs.push_back("data_" + *q); - IcePatch2Internal::createDirectory(_serverDir + "/data_" + *q); + createDirectory(_serverDir + "/data_" + *q); } sort(knownDirs.begin(), knownDirs.end()); // // Remove old directories // - Ice::StringSeq dirs = IcePatch2Internal::readDirectory(_serverDir); + Ice::StringSeq dirs = readDirectory(_serverDir); Ice::StringSeq svcDirs; for(Ice::StringSeq::const_iterator p = dirs.begin(); p != dirs.end(); ++p) { @@ -2365,7 +2216,7 @@ ServerI::updateImpl(const InternalServerDescriptorPtr& descriptor) { try { - IcePatch2Internal::removeRecursive(_serverDir + "/" + *p); + removeRecursive(_serverDir + "/" + *p); } catch(const exception& ex) { @@ -2386,7 +2237,7 @@ ServerI::updateImpl(const InternalServerDescriptorPtr& descriptor) knownDbEnvs.push_back((*q)->name); string dbEnvHome = _serverDir + "/dbs/" + (*q)->name; - IcePatch2Internal::createDirectory(dbEnvHome); + createDirectory(dbEnvHome); if(!(*q)->properties.empty()) { @@ -2419,14 +2270,14 @@ ServerI::updateImpl(const InternalServerDescriptorPtr& descriptor) // // Remove old database environments. // - Ice::StringSeq dbEnvs = IcePatch2Internal::readDirectory(_serverDir + "/dbs"); + Ice::StringSeq dbEnvs = readDirectory(_serverDir + "/dbs"); Ice::StringSeq toDel; set_difference(dbEnvs.begin(), dbEnvs.end(), knownDbEnvs.begin(), knownDbEnvs.end(), back_inserter(toDel)); for(Ice::StringSeq::const_iterator p = toDel.begin(); p != toDel.end(); ++p) { try { - IcePatch2Internal::removeRecursive(_serverDir + "/dbs/" + *p); + removeRecursive(_serverDir + "/dbs/" + *p); } catch(const exception& ex) { @@ -2764,10 +2615,6 @@ ServerI::nextCommand() { command = _load; } - else if(_patch && _patch->canExecute(_state)) - { - command = _patch; - } else if(_start && _start->canExecute(_state)) { command = _start; @@ -2789,9 +2636,6 @@ ServerI::setStateNoSync(InternalServerState st, const std::string& reason) { case Inactive: break; - case Patching: - assert(_patch && _patch->canExecute(_state)); - break; case Loading: assert(_load && _load->canExecute(_state)); break; @@ -2838,10 +2682,6 @@ ServerI::setStateNoSync(InternalServerState st, const std::string& reason) { _load = 0; } - if(previous == Patching) - { - _patch = 0; - } if(_stop) { _stop->finished(); @@ -2871,11 +2711,6 @@ ServerI::setStateNoSync(InternalServerState st, const std::string& reason) break; case Destroying: loadFailure = _destroy->loadFailure(); - if(_patch) - { - _patch->destroyed(); - _patch = 0; - } if(_load) { _load->failed(DeploymentException("The server is being destroyed.")); @@ -3005,7 +2840,7 @@ ServerI::setStateNoSync(InternalServerState st, const std::string& reason) } else if(_state == ServerI::Inactive) { - if(_node->getTraceLevels()->server > 2 || (previous != ServerI::Loading && previous != ServerI::Patching)) + if(_node->getTraceLevels()->server > 2 || (previous != ServerI::Loading)) { out << "changed server `" << _id << "' state to `Inactive'"; } @@ -3044,10 +2879,6 @@ ServerI::setStateNoSync(InternalServerState st, const std::string& reason) { out << "changed server `" << _id << "' state to `Loading'"; } - else if(_state == ServerI::Patching) - { - out << "changed server `" << _id << "' state to `Patching'"; - } } if(!reason.empty()) { @@ -3063,7 +2894,6 @@ ServerI::toServerState(InternalServerState st) const { case ServerI::Inactive: case ServerI::Activating: - case ServerI::Patching: case ServerI::Loading: return IceGrid::Inactive; case ServerI::WaitForActivation: @@ -3150,7 +2980,7 @@ ServerI::getFilePath(const string& filename) const } else if(!filename.empty() && filename[0] == '#') { - string path = IcePatch2Internal::simplify(filename.substr(1)); + string path = simplify(filename.substr(1)); if(!IceUtilInternal::isAbsolutePath(path)) { path = _node->getPlatformInfo().getCwd() + "/" + path; diff --git a/cpp/src/IceGrid/ServerI.h b/cpp/src/IceGrid/ServerI.h index 80c9fe9271a..a41fc9efd0d 100644 --- a/cpp/src/IceGrid/ServerI.h +++ b/cpp/src/IceGrid/ServerI.h @@ -30,8 +30,6 @@ class StopCommand; typedef IceUtil::Handle<StopCommand> StopCommandPtr; class StartCommand; typedef IceUtil::Handle<StartCommand> StartCommandPtr; -class PatchCommand; -typedef IceUtil::Handle<PatchCommand> PatchCommandPtr; class LoadCommand; typedef IceUtil::Handle<LoadCommand> LoadCommandPtr; @@ -46,7 +44,6 @@ public: enum InternalServerState { Loading, - Patching, Inactive, Activating, WaitForActivation, @@ -92,17 +89,12 @@ public: bool isAdapterActivatable(const std::string&) const; const std::string& getId() const; - InternalDistributionDescriptorPtr getDistribution() const; - bool dependsOnApplicationDistrib() const; void start(ServerActivation, const AMD_Server_startPtr& = AMD_Server_startPtr()); ServerCommandPtr load(const AMD_Node_loadServerPtr&, const InternalServerDescriptorPtr&, const std::string&, bool); bool checkUpdate(const InternalServerDescriptorPtr&, bool, const Ice::Current&); void checkRemove(bool, const Ice::Current&); ServerCommandPtr destroy(const AMD_Node_destroyServerPtr&, const std::string&, int, const std::string&, bool); - bool startPatch(bool); - bool waitForPatch(); - void finishPatch(); void adapterActivated(const std::string&); void adapterDeactivated(const std::string&); @@ -179,7 +171,6 @@ private: DestroyCommandPtr _destroy; StopCommandPtr _stop; LoadCommandPtr _load; - PatchCommandPtr _patch; StartCommandPtr _start; int _pid; @@ -285,26 +276,6 @@ private: std::vector<AMD_Server_startPtr> _startCB; }; -class PatchCommand : public ServerCommand, public IceUtil::Monitor<IceUtil::Mutex> -{ -public: - - PatchCommand(const ServerIPtr&); - - bool canExecute(ServerI::InternalServerState); - ServerI::InternalServerState nextState(); - void execute(); - - bool waitForPatch(); - void destroyed(); - void finished(); - -private: - - bool _notified; - bool _destroyed; -}; - class LoadCommand : public ServerCommand { public: diff --git a/cpp/src/IceGrid/TraceLevels.cpp b/cpp/src/IceGrid/TraceLevels.cpp index 4d776d822f1..530661196ac 100644 --- a/cpp/src/IceGrid/TraceLevels.cpp +++ b/cpp/src/IceGrid/TraceLevels.cpp @@ -26,8 +26,6 @@ TraceLevels::TraceLevels(const Ice::CommunicatorPtr& communicator, const string& objectCat("Object"), activator(0), activatorCat("Activator"), - patch(0), - patchCat("Patch"), locator(0), locatorCat("Locator"), session(0), @@ -47,7 +45,6 @@ TraceLevels::TraceLevels(const Ice::CommunicatorPtr& communicator, const string& const_cast<int&>(adapter) = properties->getPropertyAsInt(keyBase + adapterCat); const_cast<int&>(object) = properties->getPropertyAsInt(keyBase + objectCat); const_cast<int&>(activator) = properties->getPropertyAsInt(keyBase + activatorCat); - const_cast<int&>(patch) = properties->getPropertyAsInt(keyBase + patchCat); const_cast<int&>(locator) = properties->getPropertyAsInt(keyBase + locatorCat); const_cast<int&>(session) = properties->getPropertyAsInt(keyBase + sessionCat); const_cast<int&>(discovery) = properties->getPropertyAsInt(keyBase + discoveryCat); diff --git a/cpp/src/IceGrid/TraceLevels.h b/cpp/src/IceGrid/TraceLevels.h index 43a2bbf66c5..11e5a852355 100644 --- a/cpp/src/IceGrid/TraceLevels.h +++ b/cpp/src/IceGrid/TraceLevels.h @@ -43,9 +43,6 @@ public: const int activator; const char* activatorCat; - const int patch; - const char* patchCat; - const int locator; const char* locatorCat; diff --git a/cpp/src/IceGrid/Util.cpp b/cpp/src/IceGrid/Util.cpp index b77215d8de9..f9dfe622877 100644 --- a/cpp/src/IceGrid/Util.cpp +++ b/cpp/src/IceGrid/Util.cpp @@ -7,10 +7,52 @@ #include <IceGrid/Admin.h> #include <IceGrid/Internal.h> +#include <IceUtil/FileUtil.h> +#ifdef _WIN32 +# include <direct.h> +# include <io.h> +#else +# include <unistd.h> +# include <dirent.h> +#endif + using namespace std; using namespace Ice; using namespace IceGrid; +namespace +{ + +bool +isRoot(const string& pa) +{ + string path = simplify(pa); +#ifdef _WIN32 + return path == "/" || path.size() == 3 && IceUtilInternal::isAlpha(path[0]) && path[1] == ':' && + path[2] == '/'; +#else + return path == "/"; +#endif +} + +string +getDirname(const string& pa) +{ + const string path = simplify(pa); + + string::size_type pos = path.rfind('/'); + if(pos == string::npos) + { + return string(); + } + else + { + return path.substr(0, pos); + } +} + +} + string IceGrid::toString(const vector<string>& v, const string& sep) { @@ -324,3 +366,273 @@ IceGrid::getMMVersion(const string& o) return ver; } + +string +IceGrid::simplify(const string& path) +{ + string result = path; + + string::size_type pos; + +#ifdef _WIN32 + pos = 0; + if(result.find("\\\\") == 0) + { + pos = 2; + } + + for(; pos < result.size(); ++pos) + { + if(result[pos] == '\\') + { + result[pos] = '/'; + } + } +#endif + + pos = 0; + while((pos = result.find("//", pos)) != string::npos) + { + result.erase(pos, 1); + } + + pos = 0; + while((pos = result.find("/./", pos)) != string::npos) + { + result.erase(pos, 2); + } + + while(result.substr(0, 4) == "/../") + { + result.erase(0, 3); + } + + if(result.substr(0, 2) == "./") + { + result.erase(0, 2); + } + + if(result == "/." || + (result.size() == 4 && IceUtilInternal::isAlpha(result[0]) && result[1] == ':' && + result[2] == '/' && result[3] == '.')) + { + return result.substr(0, result.size() - 1); + } + + if(result.size() >= 2 && result.substr(result.size() - 2, 2) == "/.") + { + result.erase(result.size() - 2, 2); + } + + if(result == "/" || (result.size() == 3 && IceUtilInternal::isAlpha(result[0]) && result[1] == ':' && + result[2] == '/')) + { + return result; + } + + if(result.size() >= 1 && result[result.size() - 1] == '/') + { + result.erase(result.size() - 1); + } + + if(result == "/..") + { + result = "/"; + } + + return result; +} + +void +IceGrid::remove(const string& pa) +{ + const string path = simplify(pa); + + IceUtilInternal::structstat buf; + if(IceUtilInternal::stat(path, &buf) == -1) + { + throw runtime_error("cannot stat `" + path + "':\n" + IceUtilInternal::lastErrorToString()); + } + + if(S_ISDIR(buf.st_mode)) + { + if(IceUtilInternal::rmdir(path) == -1) + { + if(errno == EACCES) + { + assert(false); + } + throw runtime_error("cannot remove directory `" + path + "':\n" + IceUtilInternal::lastErrorToString()); + } + } + else + { + if(IceUtilInternal::remove(path) == -1) + { + throw runtime_error("cannot remove file `" + path + "':\n" + IceUtilInternal::lastErrorToString()); + } + } +} + +void +IceGrid::removeRecursive(const string& pa) +{ + const string path = simplify(pa); + + IceUtilInternal::structstat buf; + if(IceUtilInternal::stat(path, &buf) == -1) + { + throw runtime_error("cannot stat `" + path + "':\n" + IceUtilInternal::lastErrorToString()); + } + + if(S_ISDIR(buf.st_mode)) + { + StringSeq paths = readDirectory(path); + for(StringSeq::const_iterator p = paths.begin(); p != paths.end(); ++p) + { + removeRecursive(path + '/' + *p); + } + + if(!isRoot(path)) + { + if(IceUtilInternal::rmdir(path) == -1) + { + throw runtime_error("cannot remove directory `" + path + "':\n" + IceUtilInternal::lastErrorToString()); + } + } + } + else + { + if(IceUtilInternal::remove(path) == -1) + { + throw runtime_error("cannot remove file `" + path + "':\n" + IceUtilInternal::lastErrorToString()); + } + } +} + +StringSeq +IceGrid::readDirectory(const string& pa) +{ + const string path = simplify(pa); + +#ifdef _WIN32 + + // + // IceGrid doesn't support to use string converters, so don't need to use + // any string converter in stringToWstring or wstringToString conversions. + // + StringSeq result; + const wstring fs = IceUtil::stringToWstring(simplify(path + "/*")); + + struct _wfinddata_t data; + intptr_t h = _wfindfirst(fs.c_str(), &data); + if(h == -1) + { + throw runtime_error("cannot read directory `" + path + "':\n" + IceUtilInternal::lastErrorToString()); + } + + while(true) + { + string name = wstringToString(data.name); + assert(!name.empty()); + + if(name != ".." && name != ".") + { + result.push_back(name); + } + + if(_wfindnext(h, &data) == -1) + { + if(errno == ENOENT) + { + break; + } + string reason = "cannot read directory `" + path + "':\n" + IceUtilInternal::lastErrorToString(); + _findclose(h); + throw runtime_error(reason); + } + } + + _findclose(h); + + sort(result.begin(), result.end()); + return result; + +#else + + struct dirent **namelist; + int n = scandir(path.c_str(), &namelist, 0, alphasort); + + if(n < 0) + { + throw runtime_error("cannot read directory `" + path + "':\n" + IceUtilInternal::lastErrorToString()); + } + + StringSeq result; + assert(n >= 2); + result.reserve(static_cast<size_t>(n - 2)); + + for(int i = 0; i < n; ++i) + { + string name = namelist[i]->d_name; + assert(!name.empty()); + + free(namelist[i]); + + if(name != ".." && name != ".") + { + result.push_back(name); + } + } + + free(namelist); + return result; + +#endif +} + +void +IceGrid::createDirectory(const string& pa) +{ + const string path = simplify(pa); + + if(IceUtilInternal::mkdir(path, 0777) == -1) + { + if(errno != EEXIST) + { + throw runtime_error("cannot create directory `" + path + "':\n" + IceUtilInternal::lastErrorToString()); + } + } +} + +void +IceGrid::createDirectoryRecursive(const string& pa) +{ + const string path = simplify(pa); + + string dir = getDirname(path); + if(!dir.empty()) + { + createDirectoryRecursive(dir); + } + + if(!isRoot(path + "/")) + { + IceUtilInternal::structstat buf; + if(IceUtilInternal::stat(path, &buf) != -1) + { + if(S_ISDIR(buf.st_mode)) + { + return; + } + } + + if(IceUtilInternal::mkdir(path, 0777) == -1) + { + if(errno != EEXIST) + { + throw runtime_error("cannot create directory `" + path + "':\n" + IceUtilInternal::lastErrorToString()); + } + } + } +} diff --git a/cpp/src/IceGrid/Util.h b/cpp/src/IceGrid/Util.h index 8091e0738e7..6f5312102c4 100644 --- a/cpp/src/IceGrid/Util.h +++ b/cpp/src/IceGrid/Util.h @@ -38,6 +38,13 @@ void setupThreadPool(const Ice::PropertiesPtr&, const std::string&, int, int = 0 int getMMVersion(const std::string&); +std::string simplify(const std::string&); +void remove(const std::string&); +void removeRecursive(const std::string&); +Ice::StringSeq readDirectory(const std::string&); +void createDirectory(const std::string&); +void createDirectoryRecursive(const std::string&); + template<class Function> struct ForEachCommunicator : std::unary_function<CommunicatorDescriptorPtr&, void> { diff --git a/cpp/src/IcePatch2/Calc.cpp b/cpp/src/IcePatch2/Calc.cpp deleted file mode 100644 index 358f8631d6e..00000000000 --- a/cpp/src/IcePatch2/Calc.cpp +++ /dev/null @@ -1,315 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#include <IceUtil/Options.h> -#include <IceUtil/StringUtil.h> -#include <IceUtil/FileUtil.h> -#include <Ice/ConsoleUtil.h> -#include <IcePatch2Lib/Util.h> -#include <iterator> - -using namespace std; -using namespace Ice; -using namespace IceInternal; -using namespace IcePatch2; -using namespace IcePatch2Internal; - -struct FileInfoPathLess: public binary_function<const LargeFileInfo&, const LargeFileInfo&, bool> -{ - bool - operator()(const LargeFileInfo& lhs, const LargeFileInfo& rhs) - { - return lhs.path < rhs.path; - } -}; - -struct IFileInfoPathEqual: public binary_function<const LargeFileInfo&, const LargeFileInfo&, bool> -{ - bool - operator()(const LargeFileInfo& lhs, const LargeFileInfo& rhs) - { - if(lhs.path.size() != rhs.path.size()) - { - return false; - } - - for(string::size_type i = 0; i < lhs.path.size(); ++i) - { - if(::tolower(static_cast<unsigned char>(lhs.path[i])) != ::tolower(static_cast<unsigned char>(rhs.path[i]))) - { - return false; - } - } - - return true; - } -}; - -struct IFileInfoPathLess: public binary_function<const LargeFileInfo&, const LargeFileInfo&, bool> -{ - bool - operator()(const LargeFileInfo& lhs, const LargeFileInfo& rhs) - { - for(string::size_type i = 0; i < lhs.path.size() && i < rhs.path.size(); ++i) - { - if(::tolower(static_cast<unsigned char>(lhs.path[i])) < ::tolower(static_cast<unsigned char>(rhs.path[i]))) - { - return true; - } - else if(::tolower(static_cast<unsigned char>(lhs.path[i])) > - ::tolower(static_cast<unsigned char>(rhs.path[i]))) - { - return false; - } - } - return lhs.path.size() < rhs.path.size(); - } -}; - -class CalcCB : public GetFileInfoSeqCB -{ -public: - - virtual bool - remove(const string& path) - { - consoleOut << "removing: " << path << endl; - return true; - } - - virtual bool - checksum(const string& path) - { - consoleOut << "checksum: " << path << endl; - return true; - } - - virtual bool - compress(const string& path) - { - consoleOut << "compress: " << path << endl; - return true; - } -}; - -void -usage(const string& appName) -{ - consoleErr << "Usage: " << appName << " [options] DIR [FILES...]\n"; - consoleErr << - "Options:\n" - "-h, --help Show this message.\n" - "-v, --version Display the Ice version.\n" - "-z, --compress Always compress files.\n" - "-Z, --no-compress Never compress files.\n" - "-i, --case-insensitive Files must not differ in case only.\n" - "-V, --verbose Verbose mode.\n" - ; -} - -#ifdef _WIN32 - -int -wmain(int argc, wchar_t* argv[]) - -#else - -int -main(int argc, char* argv[]) - -#endif -{ - Ice::StringSeq originalArgs = Ice::argsToStringSeq(argc, argv); - assert(originalArgs.size() > 0); - const string appName = originalArgs[0]; - string dataDir; - StringSeq fileSeq; - int compress = 1; - bool verbose; - bool caseInsensitive; - - IceUtilInternal::Options opts; - opts.addOpt("h", "help"); - opts.addOpt("v", "version"); - opts.addOpt("z", "compress"); - opts.addOpt("Z", "no-compress"); - opts.addOpt("V", "verbose"); - opts.addOpt("i", "case-insensitive"); - - vector<string> args; - try - { - args = opts.parse(originalArgs); - } - catch(const IceUtilInternal::BadOptException& e) - { - consoleErr << e.reason << endl; - usage(appName); - return EXIT_FAILURE; - } - - if(opts.isSet("help")) - { - usage(appName); - return EXIT_SUCCESS; - } - if(opts.isSet("version")) - { - consoleOut << ICE_STRING_VERSION << endl; - return EXIT_SUCCESS; - } - bool doCompress = opts.isSet("compress"); - bool dontCompress = opts.isSet("no-compress"); - if(doCompress && dontCompress) - { - consoleErr << appName << ": only one of -z and -Z are mutually exclusive" << endl; - usage(appName); - return EXIT_FAILURE; - } - if(doCompress) - { - compress = 2; - } - else if(dontCompress) - { - compress = 0; - } - verbose = opts.isSet("verbose"); - caseInsensitive = opts.isSet("case-insensitive"); - - if(args.empty()) - { - consoleErr << appName << ": no data directory specified" << endl; - usage(appName); - return EXIT_FAILURE; - } - dataDir = simplify(args[0]); - - for(vector<string>::size_type i = 1; i < args.size(); ++i) - { - fileSeq.push_back(simplify(args[i])); - } - - try - { - string absDataDir = dataDir; - - string cwd; - if(IceUtilInternal::getcwd(cwd) != 0) - { - throw runtime_error("cannot get the current directory:\n" + IceUtilInternal::lastErrorToString()); - } - - if(!IceUtilInternal::isAbsolutePath(absDataDir)) - { - absDataDir = simplify(cwd + '/' + absDataDir); - } - - for(StringSeq::iterator p = fileSeq.begin(); p != fileSeq.end(); ++p) - { - if(!IceUtilInternal::isAbsolutePath(*p)) - { - *p = cwd + '/' + *p; - } - } - - // - // We must call simplify() here: under Cygwin, any path starting with - // a double slash simply doesn't work. But, if dataDir is "/", we end - // up with paths that start with "//" unless we call simplify(). - // - string absDataDirWithSlash = simplify(absDataDir + '/'); - - for(StringSeq::iterator p = fileSeq.begin(); p != fileSeq.end(); ++p) - { - if(p->compare(0, absDataDirWithSlash.size(), absDataDirWithSlash) != 0) - { - throw runtime_error("`" + *p + "' is not a path in `" + dataDir + "'"); - } - - p->erase(0, absDataDirWithSlash.size()); - } - - LargeFileInfoSeq infoSeq; - - if(fileSeq.empty()) - { - CalcCB calcCB; - if(!getFileInfoSeq(absDataDir, compress, verbose ? &calcCB : 0, infoSeq)) - { - return EXIT_FAILURE; - } - } - else - { - loadFileInfoSeq(absDataDir, infoSeq); - - for(StringSeq::iterator p = fileSeq.begin(); p != fileSeq.end(); ++p) - { - LargeFileInfoSeq partialInfoSeq; - - CalcCB calcCB; - if(!getFileInfoSeqSubDir(absDataDir, *p, compress, verbose ? &calcCB : 0, partialInfoSeq)) - { - return EXIT_FAILURE; - } - - LargeFileInfoSeq newInfoSeq; - newInfoSeq.reserve(infoSeq.size()); - - set_difference(infoSeq.begin(), - infoSeq.end(), - partialInfoSeq.begin(), - partialInfoSeq.end(), - back_inserter(newInfoSeq), - FileInfoPathLess()); - - infoSeq.swap(newInfoSeq); - - newInfoSeq.clear(); - newInfoSeq.reserve(infoSeq.size() + partialInfoSeq.size()); - - set_union(infoSeq.begin(), - infoSeq.end(), - partialInfoSeq.begin(), - partialInfoSeq.end(), - back_inserter(newInfoSeq), - FileInfoPathLess()); - - infoSeq.swap(newInfoSeq); - } - } - - if(caseInsensitive) - { - LargeFileInfoSeq newInfoSeq = infoSeq; - sort(newInfoSeq.begin(), newInfoSeq.end(), IFileInfoPathLess()); - string reason; - LargeFileInfoSeq::iterator p = newInfoSeq.begin(); - while((p = adjacent_find(p, newInfoSeq.end(), IFileInfoPathEqual())) != newInfoSeq.end()) - { - do - { - reason += '\n' + dataDir + '/' + p->path; - ++p; - } - while(p < newInfoSeq.end() && IFileInfoPathEqual()(*(p - 1), *p)); - } - - if(!reason.empty()) - { - throw runtime_error("duplicate files:" + reason); - } - } - - saveFileInfoSeq(absDataDir, infoSeq); - } - catch(const exception& ex) - { - consoleErr << appName << ": " << ex.what() << endl; - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; -} diff --git a/cpp/src/IcePatch2/Client.cpp b/cpp/src/IcePatch2/Client.cpp deleted file mode 100644 index dc9b1cbc838..00000000000 --- a/cpp/src/IcePatch2/Client.cpp +++ /dev/null @@ -1,383 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#include <IceUtil/Options.h> -#include <IceUtil/StringUtil.h> -#include <Ice/Ice.h> -#include <Ice/ConsoleUtil.h> -#include <IcePatch2Lib/Util.h> -#include <IcePatch2/ClientUtil.h> - -#ifdef _WIN32 -# include <conio.h> -#else -# include <fcntl.h> -# include <termios.h> -#endif - -using namespace std; -using namespace IceInternal; - -class TextPatcherFeedback : public IcePatch2::PatcherFeedback -{ -public: - - TextPatcherFeedback() : - _pressAnyKeyMessage(false) - { -#ifndef _WIN32 - tcgetattr(0, &_savedTerm); - _savedFlags = fcntl(0, F_GETFL); - _block = true; -#endif - } - - virtual ~TextPatcherFeedback() - { -#ifndef _WIN32 - tcsetattr(0, TCSANOW, &_savedTerm); - fcntl(0, F_SETFL, _savedFlags); -#endif - } - - virtual bool - noFileSummary(const string& reason) - { - consoleOut << "Cannot load file summary:\n" << reason << endl; - string answer; - do - { - consoleOut << "Do a thorough patch? (yes/no)" << endl; - cin >> answer; - answer = IceUtilInternal::toLower(answer); - if(answer == "no") - { - return false; - } - } - while(answer != "yes"); - return true; - } - - virtual bool - checksumStart() - { - if(!_pressAnyKeyMessage) - { - consoleOut << "[Press any key to abort]" << endl; - _pressAnyKeyMessage = true; - } - - return !keyPressed(); - } - - virtual bool - checksumProgress(const string& path) - { - consoleOut << "Calculating checksum for " << IcePatch2Internal::getBasename(path) << endl; - return !keyPressed(); - } - - virtual bool - checksumEnd() - { - return !keyPressed(); - } - - virtual bool - fileListStart() - { - if(!_pressAnyKeyMessage) - { - consoleOut << "[Press any key to abort]" << endl; - _pressAnyKeyMessage = true; - } - - _lastProgress = "0%"; - consoleOut << "Getting list of files to patch: " << _lastProgress << flush; - return !keyPressed(); - } - - virtual bool - fileListProgress(Ice::Int percent) - { - for(unsigned int i = 0; i < _lastProgress.size(); ++i) - { - consoleOut << '\b'; - } - ostringstream s; - s << percent << '%'; - _lastProgress = s.str(); - consoleOut << _lastProgress << flush; - return !keyPressed(); - } - - virtual bool - fileListEnd() - { - consoleOut << endl; - return !keyPressed(); - } - - virtual bool - patchStart(const string& path, Ice::Long size, Ice::Long totalProgress, Ice::Long totalSize) - { - if(!_pressAnyKeyMessage) - { - consoleOut << "[Press any key to abort]" << endl; - _pressAnyKeyMessage = true; - } - - ostringstream s; - s << "0/" << size << " (" << totalProgress << '/' << totalSize << ')'; - _lastProgress = s.str(); - consoleOut << IcePatch2Internal::getBasename(path) << ' ' << _lastProgress << flush; - return !keyPressed(); - } - - virtual bool - patchProgress(Ice::Long progress, Ice::Long size, Ice::Long totalProgress, Ice::Long totalSize) - { - for(unsigned int i = 0; i < _lastProgress.size(); ++i) - { - consoleOut << '\b'; - } - ostringstream s; - s << progress << '/' << size << " (" << totalProgress << '/' << totalSize << ')'; - _lastProgress = s.str(); - consoleOut << _lastProgress << flush; - return !keyPressed(); - } - - virtual bool - patchEnd() - { - consoleOut << endl; - return !keyPressed(); - } - -private: - -#ifdef _WIN32 - - bool - keyPressed() - { - bool pressed = false; - while(_kbhit()) - { - pressed = true; - _getch(); - } - if(pressed) - { - pressed = confirmAbort(); - } - return pressed; - } - -#else - - bool - keyPressed() - { - if(_block) - { - termios term; - memcpy(&term, &_savedTerm, sizeof(termios)); - term.c_lflag &= static_cast<tcflag_t>(~(ECHO | ICANON)); - term.c_cc[VTIME] = 0; - term.c_cc[VMIN] = 1; - tcsetattr(0, TCSANOW, &term); - - int flags = _savedFlags; - flags |= O_NONBLOCK; - fcntl(0, F_SETFL, flags); - - _block = false; - } - - bool pressed = false; - char c; - while(read(0, &c, 1) > 0) - { - pressed = true; - } - if(pressed) - { - pressed = confirmAbort(); - } - return pressed; - } - - termios _savedTerm; - int _savedFlags; - bool _block; - -#endif - - bool - confirmAbort() - { -#ifndef _WIN32 - if(!_block) - { - tcsetattr(0, TCSANOW, &_savedTerm); - fcntl(0, F_SETFL, _savedFlags); - _block = true; - } -#endif - string answer; - do - { - consoleOut << "\nConfirm abort? (Y/N)" << endl; - cin >> answer; - answer = IceUtilInternal::toLower(answer); - if(answer == "n") - { - return false; - } - } - while(answer != "y"); - return true; - } - - string _lastProgress; - bool _pressAnyKeyMessage; -}; - -int run(const Ice::StringSeq&); - -Ice::CommunicatorPtr communicator; - -void -destroyCommunicator(int) -{ - communicator->destroy(); -} - -int -#ifdef _WIN32 -wmain(int argc, wchar_t* argv[]) -#else -main(int argc, char* argv[]) -#endif -{ - int status = 0; - - try - { - Ice::CtrlCHandler ctrlCHandler; - Ice::CommunicatorHolder ich(argc, argv); - communicator = ich.communicator(); - - ctrlCHandler.setCallback(&destroyCommunicator); - - status = run(Ice::argsToStringSeq(argc, argv)); - } - catch(const std::exception& ex) - { - consoleErr << ex.what() << endl; - status = 1; - } - - return status; -} - -void -usage(const string& appName) -{ - string options = - "Options:\n" - "-h, --help Show this message.\n" - "-v, --version Display the Ice version.\n" - "-t, --thorough Recalculate all checksums."; - - consoleErr << "Usage: " << appName << " [options] [DIR]" << endl; - consoleErr << options << endl; -} - -int -run(const Ice::StringSeq& args) -{ - Ice::PropertiesPtr properties = communicator->getProperties(); - - IceUtilInternal::Options opts; - opts.addOpt("h", "help"); - opts.addOpt("v", "version"); - opts.addOpt("t", "thorough"); - - vector<string> props; - try - { - props = opts.parse(args); - } - catch(const IceUtilInternal::BadOptException& e) - { - consoleErr << e.reason << endl; - usage(args[0]); - return 1; - } - - if(opts.isSet("help")) - { - usage(args[0]); - return 0; - } - if(opts.isSet("version")) - { - consoleOut << ICE_STRING_VERSION << endl; - return 0; - } - if(opts.isSet("thorough")) - { - properties->setProperty("IcePatch2Client.Thorough", "1"); - } - - if(props.size() > 1) - { - consoleErr << args[0] << ": too many arguments" << endl; - usage(args[0]); - return 1; - } - if(props.size() == 1) - { - properties->setProperty("IcePatch2Client.Directory", IcePatch2Internal::simplify(props[0])); - } - - bool aborted = false; - - try - { - IcePatch2::PatcherFeedbackPtr feedback = new TextPatcherFeedback; - IcePatch2::PatcherPtr patcher = IcePatch2::PatcherFactory::create(communicator, feedback); - - aborted = !patcher->prepare(); - - if(!aborted) - { - aborted = !patcher->patch(""); - } - - if(!aborted) - { - patcher->finish(); - } - } - catch(const exception& ex) - { - consoleErr << args[0] << ": " << ex.what() << endl; - return 1; - } - - if(aborted) - { - consoleOut << "\n[Aborted]" << endl; - return 1; - } - else - { - return 0; - } -} diff --git a/cpp/src/IcePatch2/FileServerI.cpp b/cpp/src/IcePatch2/FileServerI.cpp deleted file mode 100644 index c1f57236027..00000000000 --- a/cpp/src/IcePatch2/FileServerI.cpp +++ /dev/null @@ -1,193 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#include <IceUtil/DisableWarnings.h> -#include <IceUtil/FileUtil.h> -#include <IceUtil/StringUtil.h> -#include <IcePatch2/FileServerI.h> - -#ifdef _WIN32 -# include <io.h> -#else -# include <unistd.h> -#endif - -using namespace std; -using namespace Ice; -using namespace IcePatch2; -using namespace IcePatch2Internal; - -IcePatch2::FileServerI::FileServerI(const std::string& dataDir, const LargeFileInfoSeq& infoSeq) : - _dataDir(dataDir), _tree0(FileTree0()) -{ - FileTree0& tree0 = const_cast<FileTree0&>(_tree0); - getFileTree0(infoSeq, tree0); -} - -FileInfoSeq -IcePatch2::FileServerI::getFileInfoSeq(Int node0, const Current& c) const -{ - LargeFileInfoSeq largeFiles = getLargeFileInfoSeq(node0, c); - FileInfoSeq files; - files.resize(largeFiles.size()); - transform(largeFiles.begin(), largeFiles.end(), files.begin(), toFileInfo); - return files; -} - -LargeFileInfoSeq -IcePatch2::FileServerI::getLargeFileInfoSeq(Int node0, const Current&) const -{ - if(node0 < 0 || node0 > 255) - { - throw PartitionOutOfRangeException(); - } - - return _tree0.nodes[static_cast<size_t>(node0)].files; -} - -ByteSeqSeq -IcePatch2::FileServerI::getChecksumSeq(const Current&) const -{ - ByteSeqSeq checksums(256); - - for(size_t node0 = 0; node0 < 256; ++node0) - { - checksums[node0] = _tree0.nodes[node0].checksum; - } - - return checksums; -} - -ByteSeq -IcePatch2::FileServerI::getChecksum(const Current&) const -{ - return _tree0.checksum; -} - -void -IcePatch2::FileServerI::getFileCompressed_async(const AMD_FileServer_getFileCompressedPtr& cb, - const string& pa, Int pos, Int num, const Current&) const -{ - try - { - vector<Byte> buffer; - getFileCompressedInternal(pa, pos, num, buffer, false); - if(buffer.empty()) - { - cb->ice_response(make_pair<const Byte*, const Byte*>(0, 0)); - } - else - { - cb->ice_response(make_pair<const Byte*, const Byte*>(&buffer[0], &buffer[0] + buffer.size())); - } - } - catch(const std::exception& ex) - { - cb->ice_exception(ex); - } -} - -void -IcePatch2::FileServerI::getLargeFileCompressed_async(const AMD_FileServer_getLargeFileCompressedPtr& cb, - const string& pa, Long pos, Int num, const Current&) const -{ - try - { - vector<Byte> buffer; - getFileCompressedInternal(pa, pos, num, buffer, true); - if(buffer.empty()) - { - cb->ice_response(make_pair<const Byte*, const Byte*>(0, 0)); - } - else - { - cb->ice_response(make_pair<const Byte*, const Byte*>(&buffer[0], &buffer[0] + buffer.size())); - } - - } - catch(const std::exception& ex) - { - cb->ice_exception(ex); - } -} - -void -IcePatch2::FileServerI::getFileCompressedInternal(const std::string& pa, Ice::Long pos, Ice::Int num, - vector<Byte>& buffer, bool largeFile) const -{ - if(IceUtilInternal::isAbsolutePath(pa)) - { - throw FileAccessException(string("illegal absolute path `") + pa + "'"); - } - - string path = simplify(pa); - - if(path == ".." || - path.find("/../") != string::npos || - (path.size() >= 3 && (path.substr(0, 3) == "../" || path.substr(path.size() - 3, 3) == "/.."))) - { - throw FileAccessException(string("illegal `..' component in path `") + path + "'"); - } - - if(num <= 0 || pos < 0) - { - return; - } - - string absolutePath = _dataDir + '/' + path + ".bz2"; - int fd = IceUtilInternal::open(absolutePath, O_RDONLY|O_BINARY); - if(fd == -1) - { - throw FileAccessException(string("cannot open `") + path + "' for reading: " + - IceUtilInternal::errorToString(errno)); - } - - if(!largeFile) - { - IceUtilInternal::structstat buf; - if(IceUtilInternal::stat(absolutePath, &buf) == -1) - { - throw FileAccessException(string("cannot stat `") + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - - if(buf.st_size > 0x7FFFFFFF) - { - ostringstream os; - os << "cannot encode size `" << buf.st_size << "' for file `" << path << "' as Ice::Int" << endl; - throw FileAccessException(os.str()); - } - } - - if( -#if defined(_MSC_VER) - _lseek(fd, static_cast<off_t>(pos), SEEK_SET) -#else - lseek(fd, static_cast<off_t>(pos), SEEK_SET) -#endif - != static_cast<off_t>(pos)) - { - IceUtilInternal::close(fd); - - ostringstream posStr; - posStr << pos; - - throw FileAccessException("cannot seek position " + posStr.str() + " in file `" + path + "': " + - IceUtilInternal::errorToString(errno)); - } - - buffer.resize(static_cast<size_t>(num)); -#ifdef _WIN32 - int r; - if((r = _read(fd, &buffer[0], static_cast<unsigned int>(num))) == -1) -#else - ssize_t r; - if((r = read(fd, &buffer[0], static_cast<size_t>(num))) == -1) -#endif - { - IceUtilInternal::close(fd); - throw FileAccessException("cannot read `" + path + "': " + IceUtilInternal::errorToString(errno)); - } - - IceUtilInternal::close(fd); -} diff --git a/cpp/src/IcePatch2/FileServerI.h b/cpp/src/IcePatch2/FileServerI.h deleted file mode 100644 index 311b72535a9..00000000000 --- a/cpp/src/IcePatch2/FileServerI.h +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#ifndef ICE_PATCH2_FILE_SERVER_I_H -#define ICE_PATCH2_FILE_SERVER_I_H - -#include <IcePatch2Lib/Util.h> -#include <IcePatch2/FileServer.h> - -namespace IcePatch2 -{ - -class FileServerI : public FileServer -{ -public: - - FileServerI(const std::string&, const LargeFileInfoSeq&); - - FileInfoSeq getFileInfoSeq(Ice::Int, const Ice::Current&) const; - - LargeFileInfoSeq - getLargeFileInfoSeq(Ice::Int, const Ice::Current&) const; - - ByteSeqSeq getChecksumSeq(const Ice::Current&) const; - - Ice::ByteSeq getChecksum(const Ice::Current&) const; - - void getFileCompressed_async(const AMD_FileServer_getFileCompressedPtr&, - const std::string&, - Ice::Int, - Ice::Int, - const Ice::Current&) const; - - void getLargeFileCompressed_async(const AMD_FileServer_getLargeFileCompressedPtr&, - const std::string&, - Ice::Long, - Ice::Int, - const Ice::Current&) const; - -private: - - void - getFileCompressedInternal(const std::string&, - Ice::Long, - Ice::Int, - std::vector<Ice::Byte>&, - bool) const; - - const std::string _dataDir; - const IcePatch2Internal::FileTree0 _tree0; -}; - -} - -#endif diff --git a/cpp/src/IcePatch2/IcePatch2Calc.rc b/cpp/src/IcePatch2/IcePatch2Calc.rc deleted file mode 100644 index 638dfd6522a..00000000000 --- a/cpp/src/IcePatch2/IcePatch2Calc.rc +++ /dev/null @@ -1,33 +0,0 @@ -#include<IceUtil/ResourceConfig.h> - -#define ICE_INTERNALNAME "icepatch2calc\0" -#define ICE_ORIGINALFILENAME "icepatch2calc.exe\0" - -VS_VERSION_INFO VERSIONINFO -FILEVERSION ICE_VERSION -PRODUCTVERSION ICE_VERSION -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_APP -FILESUBTYPE VFT2_UNKNOWN -FILEFLAGS VER_DEBUG -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", ICE_COMPANY_NAME - VALUE "FileDescription", "IcePatch2 Calc\0" - VALUE "FileVersion", ICE_STRING_VERSION - VALUE "InternalName", ICE_INTERNALNAME - VALUE "LegalCopyright", ICE_COPYRIGHT - VALUE "OriginalFilename", ICE_ORIGINALFILENAME - VALUE "ProductName", ICE_PRODUCT_NAME - VALUE "ProductVersion", ICE_STRING_VERSION - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END diff --git a/cpp/src/IcePatch2/IcePatch2Client.rc b/cpp/src/IcePatch2/IcePatch2Client.rc deleted file mode 100644 index a75a27dac0d..00000000000 --- a/cpp/src/IcePatch2/IcePatch2Client.rc +++ /dev/null @@ -1,33 +0,0 @@ -#include<IceUtil/ResourceConfig.h> - -#define ICE_INTERNALNAME "icepatch2client\0" -#define ICE_ORIGINALFILENAME "icepatch2client.exe\0" - -VS_VERSION_INFO VERSIONINFO -FILEVERSION ICE_VERSION -PRODUCTVERSION ICE_VERSION -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_APP -FILESUBTYPE VFT2_UNKNOWN -FILEFLAGS VER_DEBUG -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", ICE_COMPANY_NAME - VALUE "FileDescription", "IcePatch2 Client\0" - VALUE "FileVersion", ICE_STRING_VERSION - VALUE "InternalName", ICE_INTERNALNAME - VALUE "LegalCopyright", ICE_COPYRIGHT - VALUE "OriginalFilename", ICE_ORIGINALFILENAME - VALUE "ProductName", ICE_PRODUCT_NAME - VALUE "ProductVersion", ICE_STRING_VERSION - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END diff --git a/cpp/src/IcePatch2/IcePatch2Server.rc b/cpp/src/IcePatch2/IcePatch2Server.rc deleted file mode 100644 index 4af7f9949fe..00000000000 --- a/cpp/src/IcePatch2/IcePatch2Server.rc +++ /dev/null @@ -1,33 +0,0 @@ -#include<IceUtil/ResourceConfig.h> - -#define ICE_INTERNALNAME "icepatch2server\0" -#define ICE_ORIGINALFILENAME "icepatch2server.exe\0" - -VS_VERSION_INFO VERSIONINFO -FILEVERSION ICE_VERSION -PRODUCTVERSION ICE_VERSION -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_APP -FILESUBTYPE VFT2_UNKNOWN -FILEFLAGS VER_DEBUG -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", ICE_COMPANY_NAME - VALUE "FileDescription", "IcePatch2 Server\0" - VALUE "FileVersion", ICE_STRING_VERSION - VALUE "InternalName", ICE_INTERNALNAME - VALUE "LegalCopyright", ICE_COPYRIGHT - VALUE "OriginalFilename", ICE_ORIGINALFILENAME - VALUE "ProductName", ICE_PRODUCT_NAME - VALUE "ProductVersion", ICE_STRING_VERSION - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END diff --git a/cpp/src/IcePatch2/Makefile.mk b/cpp/src/IcePatch2/Makefile.mk deleted file mode 100644 index 64a7baa4814..00000000000 --- a/cpp/src/IcePatch2/Makefile.mk +++ /dev/null @@ -1,13 +0,0 @@ -# -# Copyright (c) ZeroC, Inc. All rights reserved. -# - -$(project)_programs := icepatch2server icepatch2client icepatch2calc -$(project)_dependencies := IcePatch2 Ice -$(project)_targetdir := $(bindir) - -icepatch2server_sources := $(addprefix $(currentdir)/,FileServerI.cpp Server.cpp) -icepatch2client_sources := $(addprefix $(currentdir)/,Client.cpp) -icepatch2calc_sources := $(addprefix $(currentdir)/,Calc.cpp) - -projects += $(project) diff --git a/cpp/src/IcePatch2/Server.cpp b/cpp/src/IcePatch2/Server.cpp deleted file mode 100644 index 90bfd079d3a..00000000000 --- a/cpp/src/IcePatch2/Server.cpp +++ /dev/null @@ -1,203 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#include <IceUtil/Options.h> -#include <IceUtil/StringUtil.h> -#include <IceUtil/FileUtil.h> -#include <IceUtil/DisableWarnings.h> -#include <Ice/Service.h> -#include <IcePatch2/FileServerI.h> -#include <IcePatch2Lib/Util.h> - -using namespace std; -using namespace Ice; -using namespace IcePatch2; -using namespace IcePatch2Internal; - -namespace IcePatch2 -{ - -class PatcherService : public Service -{ -public: - - PatcherService(); - -protected: - - virtual bool start(int, char*[], int&); - virtual bool stop(); - -private: - - void usage(const std::string&); -}; - -}; - -IcePatch2::PatcherService::PatcherService() -{ -} - -bool -IcePatch2::PatcherService::start(int argc, char* argv[], int& status) -{ - PropertiesPtr properties = communicator()->getProperties(); - - IceUtilInternal::Options opts; - opts.addOpt("h", "help"); - opts.addOpt("v", "version"); - - vector<string> args; - try - { - args = opts.parse(argc, const_cast<const char**>(argv)); - } - catch(const IceUtilInternal::BadOptException& e) - { - error(e.reason); - usage(argv[0]); - return false; - } - - if(opts.isSet("help")) - { - usage(argv[0]); - status = EXIT_SUCCESS; - return false; - } - if(opts.isSet("version")) - { - print(ICE_STRING_VERSION); - status = EXIT_SUCCESS; - return false; - } - - if(args.size() > 1) - { - error("too many arguments"); - usage(argv[0]); - return false; - } - if(args.size() == 1) - { - properties->setProperty("IcePatch2.Directory", simplify(args[0])); - } - - string dataDir = properties->getPropertyWithDefault("IcePatch2.Directory", "."); - if(dataDir.empty()) - { - error("no data directory specified"); - usage(argv[0]); - return false; - } - - LargeFileInfoSeq infoSeq; - - try - { - if(!IceUtilInternal::isAbsolutePath(dataDir)) - { - string cwd; - if(IceUtilInternal::getcwd(cwd) != 0) - { - throw runtime_error("cannot get the current directory:\n" + IceUtilInternal::lastErrorToString()); - } - - dataDir = cwd + '/' + dataDir; - } - - loadFileInfoSeq(dataDir, infoSeq); - } - catch(const exception& ex) - { - error(ex.what()); - return false; - } - - const string endpointsProperty = "IcePatch2.Endpoints"; - string endpoints = properties->getProperty(endpointsProperty); - if(endpoints.empty()) - { - error("property `" + endpointsProperty + "' is not set"); - return false; - } - ObjectAdapterPtr adapter = communicator()->createObjectAdapter("IcePatch2"); - - const string instanceNameProperty = "IcePatch2.InstanceName"; - string instanceName = properties->getPropertyWithDefault(instanceNameProperty, "IcePatch2"); - - Identity id; - id.category = instanceName; - id.name = "server"; - adapter->add(new FileServerI(dataDir, infoSeq), id); - - adapter->activate(); - - return true; -} - -bool -IcePatch2::PatcherService::stop() -{ - return true; -} - -void -IcePatch2::PatcherService::usage(const string& appName) -{ - string options = - "Options:\n" - "-h, --help Show this message.\n" - "-v, --version Display the Ice version."; -#ifndef _WIN32 - options.append( - "\n" - "\n" - "--daemon Run as a daemon.\n" - "--pidfile FILE Write process ID into FILE.\n" - "--noclose Do not close open file descriptors." - - // --nochdir is intentionally not shown here. (See the comment in main().) - ); -#endif - print("Usage: " + appName + " [options] [DIR]\n" + options); -} - -#ifdef _WIN32 - -int -wmain(int argc, wchar_t* argv[]) -{ - IcePatch2::PatcherService svc; - int status = EXIT_FAILURE; - status = svc.main(argc, argv); - return status; -} - -#else - -int -main(int argc, char* argv[]) -{ - IcePatch2::PatcherService svc; - int status = EXIT_FAILURE; - // - // For UNIX, force --nochdir option, so the service isn't started - // with / as the working directory. That way, if the data - // directory is specified as a relative path, we don't - // misinterpret that path. - // - StringSeq args; - args.push_back(argv[0]); - args.push_back("--nochdir"); - for(int i = 1; i < argc; ++i) - { - args.push_back(argv[i]); - } - status = svc.main(args); - return status; -} - -#endif diff --git a/cpp/src/IcePatch2/msbuild/icepatch2calc/icepatch2calc.vcxproj b/cpp/src/IcePatch2/msbuild/icepatch2calc/icepatch2calc.vcxproj deleted file mode 100644 index feb497ee082..00000000000 --- a/cpp/src/IcePatch2/msbuild/icepatch2calc/icepatch2calc.vcxproj +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{8BCB4793-C004-459D-9605-272470D53A40}</ProjectGuid> - <RootNamespace>IcePatch2</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <Import Project="$(MSBuildThisFileDirectory)\..\..\..\..\msbuild\ice.cpp98.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="Shared"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ItemGroup> - <ResourceCompile Include="..\..\IcePatch2Calc.rc" /> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\..\Calc.cpp" /> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> - <Import Project="$(MSBuildThisFileDirectory)..\..\..\..\msbuild\ice.sign.targets" /> -</Project>
\ No newline at end of file diff --git a/cpp/src/IcePatch2/msbuild/icepatch2calc/icepatch2calc.vcxproj.filters b/cpp/src/IcePatch2/msbuild/icepatch2calc/icepatch2calc.vcxproj.filters deleted file mode 100644 index 9995b384935..00000000000 --- a/cpp/src/IcePatch2/msbuild/icepatch2calc/icepatch2calc.vcxproj.filters +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Header Files"> - <UniqueIdentifier>{6eed4189-6d50-466e-9d1d-d6ba2a3fd2ed}</UniqueIdentifier> - <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions> - </Filter> - <Filter Include="Resource Files"> - <UniqueIdentifier>{6e753bfa-cd5e-49a9-9143-2dd791c88516}</UniqueIdentifier> - <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> - </Filter> - <Filter Include="Source Files"> - <UniqueIdentifier>{e749ed03-defe-4090-a3fb-b3f4de854404}</UniqueIdentifier> - <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> - </Filter> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="..\..\IcePatch2Calc.rc"> - <Filter>Resource Files</Filter> - </ResourceCompile> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\..\Calc.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/cpp/src/IcePatch2/msbuild/icepatch2client/icepatch2client.vcxproj b/cpp/src/IcePatch2/msbuild/icepatch2client/icepatch2client.vcxproj deleted file mode 100644 index 4dfc75def82..00000000000 --- a/cpp/src/IcePatch2/msbuild/icepatch2client/icepatch2client.vcxproj +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{43D54B43-526E-40CE-9945-81420C54A415}</ProjectGuid> - <RootNamespace>IcePatch2</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <Import Project="$(MSBuildThisFileDirectory)\..\..\..\..\msbuild\ice.cpp98.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="Shared"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ItemGroup> - <ClCompile Include="..\..\Client.cpp" /> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="..\..\IcePatch2Client.rc" /> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> - <Import Project="$(MSBuildThisFileDirectory)..\..\..\..\msbuild\ice.sign.targets" /> -</Project>
\ No newline at end of file diff --git a/cpp/src/IcePatch2/msbuild/icepatch2client/icepatch2client.vcxproj.filters b/cpp/src/IcePatch2/msbuild/icepatch2client/icepatch2client.vcxproj.filters deleted file mode 100644 index 50a3936b676..00000000000 --- a/cpp/src/IcePatch2/msbuild/icepatch2client/icepatch2client.vcxproj.filters +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Header Files"> - <UniqueIdentifier>{35e45c3f-0eec-4503-983e-2e847cd0c42e}</UniqueIdentifier> - <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions> - </Filter> - <Filter Include="Resource Files"> - <UniqueIdentifier>{ca886c48-a75b-42a4-a79a-b2d4bf6d92fe}</UniqueIdentifier> - <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> - </Filter> - <Filter Include="Source Files"> - <UniqueIdentifier>{eda84da9-e268-4a3e-9119-b80594167786}</UniqueIdentifier> - <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> - </Filter> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\..\Client.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="..\..\IcePatch2Client.rc"> - <Filter>Resource Files</Filter> - </ResourceCompile> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/cpp/src/IcePatch2/msbuild/icepatch2server/icepatch2server.vcxproj b/cpp/src/IcePatch2/msbuild/icepatch2server/icepatch2server.vcxproj deleted file mode 100644 index 4928da444f4..00000000000 --- a/cpp/src/IcePatch2/msbuild/icepatch2server/icepatch2server.vcxproj +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{7E1D6372-D417-4143-A7AF-BE3E77550238}</ProjectGuid> - <RootNamespace>IcePatch2</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <Import Project="$(MSBuildThisFileDirectory)\..\..\..\..\msbuild\ice.cpp98.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="Shared"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ItemGroup> - <ResourceCompile Include="..\..\IcePatch2Server.rc" /> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\..\FileServerI.cpp" /> - <ClCompile Include="..\..\Server.cpp" /> - </ItemGroup> - <ItemGroup> - <ClInclude Include="..\..\FileServerI.h" /> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> - <Import Project="$(MSBuildThisFileDirectory)..\..\..\..\msbuild\ice.sign.targets" /> -</Project>
\ No newline at end of file diff --git a/cpp/src/IcePatch2/msbuild/icepatch2server/icepatch2server.vcxproj.filters b/cpp/src/IcePatch2/msbuild/icepatch2server/icepatch2server.vcxproj.filters deleted file mode 100644 index 3d2a1ac3b26..00000000000 --- a/cpp/src/IcePatch2/msbuild/icepatch2server/icepatch2server.vcxproj.filters +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Resource Files"> - <UniqueIdentifier>{4d4a9ba4-db41-42cc-b76e-a4f382f1276b}</UniqueIdentifier> - <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> - </Filter> - <Filter Include="Header Files"> - <UniqueIdentifier>{69865254-0ecb-45a0-ad7e-aca377451e22}</UniqueIdentifier> - <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions> - </Filter> - <Filter Include="Source Files"> - <UniqueIdentifier>{131c5406-544b-4219-91b7-323ab3dd7866}</UniqueIdentifier> - <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> - </Filter> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="..\..\IcePatch2Server.rc"> - <Filter>Resource Files</Filter> - </ResourceCompile> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\..\FileServerI.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\..\Server.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - </ItemGroup> - <ItemGroup> - <ClInclude Include="..\..\FileServerI.h"> - <Filter>Header Files</Filter> - </ClInclude> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/cpp/src/IcePatch2Lib/ClientUtil.cpp b/cpp/src/IcePatch2Lib/ClientUtil.cpp deleted file mode 100644 index 134fd1c2888..00000000000 --- a/cpp/src/IcePatch2Lib/ClientUtil.cpp +++ /dev/null @@ -1,991 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#include <IceUtil/StringUtil.h> -#include <IceUtil/FileUtil.h> -#include <IcePatch2/ClientUtil.h> -#include <IcePatch2Lib/Util.h> -#include <list> -#include <iterator> - -using namespace std; -using namespace Ice; -using namespace IceUtil; -using namespace IcePatch2; -using namespace IcePatch2Internal; - -IcePatch2::Patcher::~Patcher() -{ - // Out of line to avoid weak vtable -} - -IcePatch2::PatcherFeedback::~PatcherFeedback() -{ - // Out of line to avoid weak vtable -} - -namespace -{ - -class Decompressor : public IceUtil::Thread, public IceUtil::Monitor<IceUtil::Mutex> -{ -public: - - Decompressor(const string&); - virtual ~Decompressor(); - - void destroy(); - void add(const LargeFileInfo&); - void exception() const; - void log(FILE* fp); - virtual void run(); - -private: - - const string _dataDir; - - string _exception; - list<LargeFileInfo> _files; - LargeFileInfoSeq _filesDone; - bool _destroy; -}; -typedef IceUtil::Handle<Decompressor> DecompressorPtr; - -class PatcherI : public Patcher -{ -public: - - PatcherI(const Ice::CommunicatorPtr&, const PatcherFeedbackPtr&); - PatcherI(const FileServerPrx&, const PatcherFeedbackPtr&, const std::string&, bool, Ice::Int, Ice::Int); - virtual ~PatcherI(); - - virtual bool prepare(); - virtual bool patch(const std::string&); - virtual void finish(); - -private: - - void init(const FileServerPrx&); - bool removeFiles(const LargeFileInfoSeq&); - bool updateFiles(const LargeFileInfoSeq&); - bool updateFilesInternal(const LargeFileInfoSeq&, const DecompressorPtr&); - bool updateFlags(const LargeFileInfoSeq&); - - const PatcherFeedbackPtr _feedback; - const std::string _dataDir; - const bool _thorough; - const Ice::Int _chunkSize; - const Ice::Int _remove; - const FileServerPrx _serverCompress; - const FileServerPrx _serverNoCompress; - - LargeFileInfoSeq _localFiles; - LargeFileInfoSeq _updateFiles; - LargeFileInfoSeq _updateFlags; - LargeFileInfoSeq _removeFiles; - - FILE* _log; - bool _useSmallFileAPI; -}; - -Decompressor::Decompressor(const string& dataDir) : - _dataDir(dataDir), - _destroy(false) -{ -} - -Decompressor::~Decompressor() -{ - assert(_destroy); -} - -void -Decompressor::destroy() -{ - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - _destroy = true; - notify(); -} - -void -Decompressor::add(const LargeFileInfo& info) -{ - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - if(!_exception.empty()) - { - throw runtime_error(_exception); - } - _files.push_back(info); - notify(); -} - -void -Decompressor::exception() const -{ - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - if(!_exception.empty()) - { - throw runtime_error(_exception); - } -} - -void -Decompressor::log(FILE* fp) -{ - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - - for(LargeFileInfoSeq::const_iterator p = _filesDone.begin(); p != _filesDone.end(); ++p) - { - if(fputc('+', fp) == EOF || !writeFileInfo(fp, *p)) - { - throw runtime_error("error writing log file:\n" + IceUtilInternal::lastErrorToString()); - } - } - - _filesDone.clear(); -} - -void -Decompressor::run() -{ - LargeFileInfo info; - - while(true) - { - { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - - if(!info.path.empty()) - { - _filesDone.push_back(info); - } - - while(!_destroy && _files.empty()) - { - wait(); - } - - if(!_files.empty()) - { - info = _files.front(); - _files.pop_front(); - } - else - { - return; - } - } - - try - { - decompressFile(_dataDir + '/' + info.path); - setFileFlags(_dataDir + '/' + info.path, info); - remove(_dataDir + '/' + info.path + ".bz2"); - } - catch(const std::exception& ex) - { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - _destroy = true; - _exception = ex.what(); - return; - } - } -} - -PatcherI::PatcherI(const CommunicatorPtr& communicator, const PatcherFeedbackPtr& feedback) : - _feedback(feedback), - _dataDir(communicator->getProperties()->getPropertyWithDefault("IcePatch2Client.Directory", ".")), - _thorough(communicator->getProperties()->getPropertyAsIntWithDefault("IcePatch2Client.Thorough", 0) > 0), - _chunkSize(communicator->getProperties()->getPropertyAsIntWithDefault("IcePatch2Client.ChunkSize", 100)), - _remove(communicator->getProperties()->getPropertyAsIntWithDefault("IcePatch2Client.Remove", 1)), - _log(0), - _useSmallFileAPI(false) -{ - const char* clientProxyProperty = "IcePatch2Client.Proxy"; - string clientProxy = communicator->getProperties()->getProperty(clientProxyProperty); - if(clientProxy.empty()) - { - throw runtime_error("property `IcePatch2Client.Proxy' is not set"); - } - - FileServerPrx server = FileServerPrx::checkedCast(communicator->stringToProxy(clientProxy)); - if(!server) - { - throw runtime_error("proxy `" + clientProxy + "' is not a file server."); - } - - init(server); -} - -PatcherI::PatcherI(const FileServerPrx& server, - const PatcherFeedbackPtr& feedback, - const string& dataDir, - bool thorough, - Ice::Int chunkSize, - Ice::Int remove) : - _feedback(feedback), - _dataDir(dataDir), - _thorough(thorough), - _chunkSize(chunkSize), - _remove(remove), - _useSmallFileAPI(false) -{ - init(server); -} - -PatcherI::~PatcherI() -{ - if(_log != 0) - { - fclose(_log); - _log = 0; - } -} - -class PatcherGetFileInfoSeqCB : public GetFileInfoSeqCB -{ -public: - - PatcherGetFileInfoSeqCB(const PatcherFeedbackPtr& feedback) : - _feedback(feedback) - { - } - - virtual bool - remove(const string&) - { - return true; - } - - virtual bool - checksum(const string& path) - { - return _feedback->checksumProgress(path); - } - - virtual bool compress(const string&) - { - assert(false); // Nothing must get compressed when we are patching. - return true; - } - -private: - - const PatcherFeedbackPtr _feedback; -}; - -bool -PatcherI::prepare() -{ - _localFiles.clear(); - - bool thorough = _thorough; - - if(!thorough) - { - try - { - loadFileInfoSeq(_dataDir, _localFiles); - } - catch(const exception& ex) - { - thorough = _feedback->noFileSummary(ex.what()); - if(!thorough) - { - return false; - } - } - } - - if(thorough) - { - if(!_feedback->checksumStart()) - { - return false; - } - - PatcherGetFileInfoSeqCB cb(_feedback); - if(!getFileInfoSeq(_dataDir, 0, &cb, _localFiles)) - { - return false; - } - - if(!_feedback->checksumEnd()) - { - return false; - } - - saveFileInfoSeq(_dataDir, _localFiles); - } - - FileTree0 tree0; - getFileTree0(_localFiles, tree0); - - if(tree0.checksum != _serverCompress->getChecksum()) - { - if(!_feedback->fileListStart()) - { - return false; - } - - ByteSeqSeq checksumSeq = _serverCompress->getChecksumSeq(); - if(checksumSeq.size() != 256) - { - throw runtime_error("server returned illegal value"); - } - - while(true) - { - AsyncResultPtr curCB; - AsyncResultPtr nxtCB; - try - { - for(size_t node0 = 0; node0 < 256; ++node0) - { - if(tree0.nodes[node0].checksum != checksumSeq[node0]) - { - if(!curCB) - { - assert(!nxtCB); - curCB = _useSmallFileAPI ? _serverCompress->begin_getFileInfoSeq(static_cast<Int>(node0)) : - _serverCompress->begin_getLargeFileInfoSeq(static_cast<Int>(node0)); - } - else - { - assert(nxtCB); - swap(nxtCB, curCB); - } - - size_t node0Nxt = node0; - - do - { - ++node0Nxt; - } - while(node0Nxt < 256 && tree0.nodes[node0Nxt].checksum == checksumSeq[node0Nxt]); - - if(node0Nxt < 256) - { - nxtCB = _useSmallFileAPI ? - _serverCompress->begin_getFileInfoSeq(static_cast<Int>(node0Nxt)) : - _serverCompress->begin_getLargeFileInfoSeq(static_cast<Int>(node0Nxt)); - } - - LargeFileInfoSeq files; - if(_useSmallFileAPI) - { - FileInfoSeq smallFiles = _serverCompress->end_getFileInfoSeq(curCB); - files.resize(smallFiles.size()); - transform(smallFiles.begin(), smallFiles.end(), files.begin(), toLargeFileInfo); - } - else - { - files = _serverCompress->end_getLargeFileInfoSeq(curCB); - } - - sort(files.begin(), files.end(), FileInfoLess()); - files.erase(unique(files.begin(), files.end(), FileInfoEqual()), files.end()); - - // - // Compute the set of files which were removed. - // - set_difference(tree0.nodes[node0].files.begin(), - tree0.nodes[node0].files.end(), - files.begin(), - files.end(), - back_inserter(_removeFiles), - FileInfoWithoutFlagsLess()); // NOTE: We ignore the flags here. - - // - // Compute the set of files which were updated (either the file contents, flags or both). - // - LargeFileInfoSeq updatedFiles; - updatedFiles.reserve(files.size()); - - set_difference(files.begin(), - files.end(), - tree0.nodes[node0].files.begin(), - tree0.nodes[node0].files.end(), - back_inserter(updatedFiles), - FileInfoLess()); - - // - // Compute the set of files whose contents was updated. - // - LargeFileInfoSeq contentsUpdatedFiles; - contentsUpdatedFiles.reserve(files.size()); - - set_difference(files.begin(), - files.end(), - tree0.nodes[node0].files.begin(), - tree0.nodes[node0].files.end(), - back_inserter(contentsUpdatedFiles), - FileInfoWithoutFlagsLess()); // NOTE: We ignore the flags here. - copy(contentsUpdatedFiles.begin(), contentsUpdatedFiles.end(), back_inserter(_updateFiles)); - - // - // Compute the set of files whose flags were updated. - // - set_difference(updatedFiles.begin(), - updatedFiles.end(), - contentsUpdatedFiles.begin(), - contentsUpdatedFiles.end(), - back_inserter(_updateFlags), - FileInfoLess()); - } - - if(!_feedback->fileListProgress(static_cast<Int>(node0 + 1) * 100 / 256)) - { - return false; - } - } - } - catch(const Ice::OperationNotExistException&) - { - if(!_useSmallFileAPI) - { - _useSmallFileAPI = true; - continue; - } - throw; - } - break; - } - - if(!_feedback->fileListEnd()) - { - return false; - } - } - - sort(_removeFiles.begin(), _removeFiles.end(), FileInfoLess()); - sort(_updateFiles.begin(), _updateFiles.end(), FileInfoLess()); - sort(_updateFlags.begin(), _updateFlags.end(), FileInfoLess()); - - string pathLog = simplify(_dataDir + '/' + logFile); - _log = IceUtilInternal::fopen(pathLog, "w"); - if(!_log) - { - throw runtime_error("cannot open `" + pathLog + "' for writing:\n" + IceUtilInternal::lastErrorToString()); - } - - return true; -} - -bool -PatcherI::patch(const string& d) -{ - string dir = simplify(d); - - if(dir.empty() || dir == ".") - { - if(!_removeFiles.empty()) - { - if(!removeFiles(_removeFiles)) - { - return false; - } - } - - if(!_updateFiles.empty()) - { - if(!updateFiles(_updateFiles)) - { - return false; - } - } - - if(!_updateFlags.empty()) - { - if(!updateFlags(_updateFlags)) - { - return false; - } - } - - return true; - } - else - { - string dirWithSlash = simplify(dir + '/'); - - LargeFileInfoSeq remove; - for(LargeFileInfoSeq::const_iterator p = _removeFiles.begin(); p != _removeFiles.end(); ++p) - { - if(p->path == dir) - { - remove.push_back(*p); - } - else if(p->path.compare(0, dirWithSlash.size(), dirWithSlash) == 0) - { - remove.push_back(*p); - } - } - - LargeFileInfoSeq update; - for(LargeFileInfoSeq::const_iterator p = _updateFiles.begin(); p != _updateFiles.end(); ++p) - { - if(p->path == dir) - { - update.push_back(*p); - } - else if(p->path.compare(0, dirWithSlash.size(), dirWithSlash) == 0) - { - update.push_back(*p); - } - } - - LargeFileInfoSeq updateFlag; - for(LargeFileInfoSeq::const_iterator p = _updateFlags.begin(); p != _updateFlags.end(); ++p) - { - if(p->path == dir) - { - updateFlag.push_back(*p); - } - else if(p->path.compare(0, dirWithSlash.size(), dirWithSlash) == 0) - { - updateFlag.push_back(*p); - } - } - - if(!remove.empty()) - { - if(!removeFiles(remove)) - { - return false; - } - } - - if(!update.empty()) - { - if(!updateFiles(update)) - { - return false; - } - } - - if(!updateFlag.empty()) - { - if(!updateFlags(updateFlag)) - { - return false; - } - } - - return true; - } -} - -void -PatcherI::finish() -{ - if(_log != 0) - { - fclose(_log); - _log = 0; - } - - saveFileInfoSeq(_dataDir, _localFiles); -} - -void -PatcherI::init(const FileServerPrx& server) -{ - if(_dataDir.empty()) - { - throw runtime_error("no data directory specified"); - } - - Ice::CommunicatorPtr communicator = server->ice_getCommunicator(); - - const_cast<string&>(_dataDir) = simplify(_dataDir); - - // - // Make sure that _chunkSize doesn't exceed MessageSizeMax, otherwise - // it won't work at all. - // - int sizeMax = communicator->getProperties()->getPropertyAsIntWithDefault("Ice.MessageSizeMax", 1024); - if(_chunkSize < 1) - { - const_cast<Int&>(_chunkSize) = 1; - } - else if(_chunkSize > sizeMax) - { - const_cast<Int&>(_chunkSize) = sizeMax; - } - if(_chunkSize == sizeMax) - { - const_cast<Int&>(_chunkSize) = _chunkSize * 1024 - 512; // Leave some headroom for protocol header. - } - else - { - const_cast<Int&>(_chunkSize) *= 1024; - } - - if(!IceUtilInternal::isAbsolutePath(_dataDir)) - { - string cwd; - if(IceUtilInternal::getcwd(cwd) != 0) - { - throw runtime_error("cannot get the current directory:\n" + IceUtilInternal::lastErrorToString()); - } - const_cast<string&>(_dataDir) = simplify(cwd + '/' + _dataDir); - } - - const_cast<FileServerPrx&>(_serverCompress) = FileServerPrx::uncheckedCast(server->ice_compress(true)); - const_cast<FileServerPrx&>(_serverNoCompress) = FileServerPrx::uncheckedCast(server->ice_compress(false)); -} - -bool -PatcherI::removeFiles(const LargeFileInfoSeq& files) -{ - if(_remove < 1) - { - return true; - } - - for(LargeFileInfoSeq::const_reverse_iterator p = files.rbegin(); p != files.rend(); ++p) - { - try - { - remove(_dataDir + '/' + p->path); - if(fputc('-', _log) == EOF || ! writeFileInfo(_log, *p)) - { - throw runtime_error("error writing log file:\n" + IceUtilInternal::lastErrorToString()); - } - } - catch(...) - { - if(_remove < 2) // We ignore errors if IcePatch2Client.Remove >= 2. - { - throw; - } - } - } - - LargeFileInfoSeq newLocalFiles; - newLocalFiles.reserve(_localFiles.size()); - - set_difference(_localFiles.begin(), - _localFiles.end(), - files.begin(), - files.end(), - back_inserter(newLocalFiles), - FileInfoLess()); - - _localFiles.swap(newLocalFiles); - - LargeFileInfoSeq newRemoveFiles; - - set_difference(_removeFiles.begin(), - _removeFiles.end(), - files.begin(), - files.end(), - back_inserter(newRemoveFiles), - FileInfoLess()); - - _removeFiles.swap(newRemoveFiles); - - return true; -} - -bool -PatcherI::updateFiles(const LargeFileInfoSeq& files) -{ - DecompressorPtr decompressor = new Decompressor(_dataDir); -#if defined(__hppa) - // - // The thread stack size is only 64KB only HP-UX and that's not - // enough for this thread. - // - decompressor->start(256 * 1024); // 256KB -#else - decompressor->start(); -#endif - bool result; - - try - { - result = updateFilesInternal(files, decompressor); - } - catch(...) - { - decompressor->destroy(); - decompressor->getThreadControl().join(); - decompressor->log(_log); - throw; - } - - decompressor->destroy(); - decompressor->getThreadControl().join(); - decompressor->log(_log); - decompressor->exception(); - - return result; -} - -bool -PatcherI::updateFilesInternal(const LargeFileInfoSeq& files, const DecompressorPtr& decompressor) -{ - Long total = 0; - Long updated = 0; - - for(LargeFileInfoSeq::const_iterator p = files.begin(); p != files.end(); ++p) - { - if(p->size > 0) // Regular, non-empty file? - { - total += p->size; - } - } - - AsyncResultPtr curCB; - AsyncResultPtr nxtCB; - - for(LargeFileInfoSeq::const_iterator p = files.begin(); p != files.end(); ++p) - { - if(p->size < 0) // Directory? - { - createDirectoryRecursive(_dataDir + '/' + p->path); - if(fputc('+', _log) == EOF || !writeFileInfo(_log, *p)) - { - throw runtime_error("error writing log file:\n" + IceUtilInternal::lastErrorToString()); - } - } - else // Regular file. - { - if(!_feedback->patchStart(p->path, p->size, updated, total)) - { - return false; - } - - if(p->size == 0) - { - string path = simplify(_dataDir + '/' + p->path); - FILE* fp = IceUtilInternal::fopen(path, "wb"); - if(fp == 0) - { - throw runtime_error("cannot open `" + path +"' for writing:\n" + IceUtilInternal::lastErrorToString()); - } - fclose(fp); - } - else - { - string pathBZ2 = simplify(_dataDir + '/' + p->path + ".bz2"); - - string dir = getDirname(pathBZ2); - if(!dir.empty()) - { - createDirectoryRecursive(dir); - } - - try - { - removeRecursive(pathBZ2); - } - catch(...) - { - } - - FILE* fileBZ2 = IceUtilInternal::fopen(pathBZ2, "wb"); - if(fileBZ2 == 0) - { - throw runtime_error("cannot open `" + pathBZ2 + "' for writing:\n" + IceUtilInternal::lastErrorToString()); - } - - try - { - Ice::Long pos = 0; - - while(pos < p->size) - { - if(!curCB) - { - assert(!nxtCB); - curCB = _useSmallFileAPI ? - _serverNoCompress->begin_getFileCompressed(p->path, static_cast<Ice::Int>(pos), _chunkSize) : - _serverNoCompress->begin_getLargeFileCompressed(p->path, pos, _chunkSize); - } - else - { - assert(nxtCB); - swap(nxtCB, curCB); - } - - if(pos + _chunkSize < p->size) - { - nxtCB = _useSmallFileAPI ? - _serverNoCompress->begin_getFileCompressed(p->path, static_cast<Ice::Int>(pos + _chunkSize), _chunkSize) : - _serverNoCompress->begin_getLargeFileCompressed(p->path, pos + _chunkSize, _chunkSize); - } - else - { - LargeFileInfoSeq::const_iterator q = p + 1; - - while(q != files.end() && q->size <= 0) - { - ++q; - } - - if(q != files.end()) - { - nxtCB = _useSmallFileAPI ? - _serverNoCompress->begin_getFileCompressed(q->path, 0, _chunkSize) : - _serverNoCompress->begin_getLargeFileCompressed(q->path, 0, _chunkSize); - } - } - - ByteSeq bytes; - - try - { - bytes = _useSmallFileAPI ? _serverNoCompress->end_getFileCompressed(curCB) : - _serverNoCompress->end_getLargeFileCompressed(curCB); - } - catch(const FileAccessException& ex) - { - throw runtime_error("error from IcePatch2 server for `" + p->path + "': " + ex.reason); - } - - if(bytes.empty()) - { - throw runtime_error("size mismatch for `" + p->path + "'"); - } - - if(fwrite(reinterpret_cast<char*>(&bytes[0]), bytes.size(), 1, fileBZ2) != 1) - { - throw runtime_error(": cannot write `" + pathBZ2 + "':\n" + IceUtilInternal::lastErrorToString()); - } - - // 'bytes' is always returned with size '_chunkSize'. When a file is smaller than '_chunkSize' - // or we are reading the last chunk of a file, 'bytes' will be larger than necessary. In this - // case we calculate the current position and updated size based on the known file size. - size_t size = (static_cast<size_t>(pos) + bytes.size()) > static_cast<size_t>(p->size) ? - static_cast<size_t>(p->size - pos) : bytes.size(); - - pos += size; - updated += size; - - if(!_feedback->patchProgress(pos, p->size, updated, total)) - { - fclose(fileBZ2); - return false; - } - } - } - catch(...) - { - fclose(fileBZ2); - throw; - } - - fclose(fileBZ2); - - decompressor->log(_log); - decompressor->add(*p); - } - - if(!_feedback->patchEnd()) - { - return false; - } - } - } - - LargeFileInfoSeq newLocalFiles; - newLocalFiles.reserve(_localFiles.size()); - - set_union(_localFiles.begin(), - _localFiles.end(), - files.begin(), - files.end(), - back_inserter(newLocalFiles), - FileInfoLess()); - - _localFiles.swap(newLocalFiles); - - LargeFileInfoSeq newUpdateFiles; - - set_difference(_updateFiles.begin(), - _updateFiles.end(), - files.begin(), - files.end(), - back_inserter(newUpdateFiles), - FileInfoLess()); - - _updateFiles.swap(newUpdateFiles); - - return true; -} - -bool -PatcherI::updateFlags(const LargeFileInfoSeq& files) -{ - for(LargeFileInfoSeq::const_iterator p = files.begin(); p != files.end(); ++p) - { - if(p->size >= 0) // Regular file? - { - setFileFlags(_dataDir + '/' + p->path, *p); - } - } - - // - // Remove the old files whose flags were updated from the set of - // local files. - // - LargeFileInfoSeq localFiles; - localFiles.reserve(_localFiles.size()); - set_difference(_localFiles.begin(), - _localFiles.end(), - files.begin(), - files.end(), - back_inserter(localFiles), - FileInfoWithoutFlagsLess()); // NOTE: We ignore the flags. - - // - // Add the new files to the set of local file. - // - _localFiles.clear(); - set_union(localFiles.begin(), - localFiles.end(), - files.begin(), - files.end(), - back_inserter(_localFiles), - FileInfoLess()); - - LargeFileInfoSeq newUpdateFlags; - - set_difference(_updateFlags.begin(), - _updateFlags.end(), - files.begin(), - files.end(), - back_inserter(newUpdateFlags), - FileInfoLess()); - - _updateFlags.swap(newUpdateFlags); - - return true; -} - -} - -PatcherPtr -PatcherFactory::create(const Ice::CommunicatorPtr& communicator, const PatcherFeedbackPtr& feedback) -{ - return new PatcherI(communicator, feedback); -} - -// -// Create a patcher with the given parameters. These parameters -// are equivalent to the configuration properties described above. -// -PatcherPtr -PatcherFactory::create(const FileServerPrx& server, - const PatcherFeedbackPtr& feedback, - const string& dataDir, - bool thorough, - Ice::Int chunkSize, - Ice::Int remove) -{ - return new PatcherI(server, feedback, dataDir, thorough, chunkSize, remove); -} diff --git a/cpp/src/IcePatch2Lib/IcePatch2.rc b/cpp/src/IcePatch2Lib/IcePatch2.rc deleted file mode 100644 index 763fa2dd0b5..00000000000 --- a/cpp/src/IcePatch2Lib/IcePatch2.rc +++ /dev/null @@ -1,33 +0,0 @@ -#include<IceUtil/ResourceConfig.h> - -#define ICE_INTERNALNAME ICE_LIBNAME("icepatch2") "\0" -#define ICE_ORIGINALFILENAME ICE_LIBNAME("icepatch2") ".dll\0" - -VS_VERSION_INFO VERSIONINFO -FILEVERSION ICE_VERSION -PRODUCTVERSION ICE_VERSION -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_DLL -FILESUBTYPE VFT2_UNKNOWN -FILEFLAGS VER_DEBUG -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", ICE_COMPANY_NAME - VALUE "FileDescription", "IcePatch2 Client Library\0" - VALUE "FileVersion", ICE_STRING_VERSION - VALUE "InternalName", ICE_INTERNALNAME - VALUE "LegalCopyright", ICE_COPYRIGHT - VALUE "OriginalFilename", ICE_ORIGINALFILENAME - VALUE "ProductName", ICE_PRODUCT_NAME - VALUE "ProductVersion", ICE_STRING_VERSION - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END diff --git a/cpp/src/IcePatch2Lib/Makefile.mk b/cpp/src/IcePatch2Lib/Makefile.mk deleted file mode 100644 index 5f2fb0e7448..00000000000 --- a/cpp/src/IcePatch2Lib/Makefile.mk +++ /dev/null @@ -1,13 +0,0 @@ -# -# Copyright (c) ZeroC, Inc. All rights reserved. -# - -$(project)_libraries := IcePatch2 - -IcePatch2_targetdir := $(libdir) -IcePatch2_dependencies := Ice -IcePatch2_libs := bz2 -IcePatch2_sliceflags := --include-dir IcePatch2 -IcePatch2_cppflags := $(nodeprecatedwarnings-cppflags) - -projects += $(project) diff --git a/cpp/src/IcePatch2Lib/Util.cpp b/cpp/src/IcePatch2Lib/Util.cpp deleted file mode 100644 index 6080dd44558..00000000000 --- a/cpp/src/IcePatch2Lib/Util.cpp +++ /dev/null @@ -1,1240 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -// -// We need to include io.h first to get the proper signature for -// _wfindfirst -// -#ifdef _WIN32 -# include <io.h> -#endif - -#include <IceUtil/IceUtil.h> -#include <IceUtil/StringUtil.h> -#include <IceUtil/FileUtil.h> -#include <Ice/SHA1.h> -#include <IceUtil/Exception.h> -#include <IcePatch2Lib/Util.h> -#include <IcePatch2/FileServer.h> -#include <bzlib.h> -#include <iomanip> - -#ifdef _WIN32 -# include <direct.h> -#else -# include <unistd.h> -# include <dirent.h> -#endif - -#include <iterator> - -// Ignore macOS OpenSSL deprecation warnings -#ifdef __APPLE__ -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif - -const char* IcePatch2Internal::checksumFile = "IcePatch2.sum"; -const char* IcePatch2Internal::logFile = "IcePatch2.log"; - -using namespace std; -using namespace Ice; -using namespace IcePatch2; -using namespace IcePatch2Internal; - -FileInfo -IcePatch2Internal::toFileInfo(const LargeFileInfo& largeInfo) -{ - if(largeInfo.size > 0x7FFFFFFF) - { - ostringstream os; - os << "cannot encode size `" << largeInfo.size << "' for file `" << largeInfo.path << "' as Ice::Int" << endl; - throw FileSizeRangeException(os.str()); - } - - FileInfo info; - info.path = largeInfo.path; - info.checksum = largeInfo.checksum; - info.size = static_cast<Ice::Int>(largeInfo.size), - info.executable = largeInfo.executable; - - return info; -} - -LargeFileInfo -IcePatch2Internal::toLargeFileInfo(const FileInfo& info) -{ - LargeFileInfo largeInfo; - largeInfo.path = info.path; - largeInfo.checksum = info.checksum; - largeInfo.size = info.size; - largeInfo.executable = info.executable; - return largeInfo; -} - -bool -IcePatch2Internal::writeFileInfo(FILE* fp, const LargeFileInfo& info) -{ - int rc = fprintf(fp, "%s\t%s\t" ICE_INT64_FORMAT "\t%d\n", - escapeString(info.path, "", IceUtilInternal::Compat).c_str(), - bytesToString(info.checksum).c_str(), - info.size, - static_cast<int>(info.executable)); - return rc > 0; -} - -bool -IcePatch2Internal::readFileInfo(FILE* fp, LargeFileInfo& info) -{ - string data; - char buf[BUFSIZ]; - while(fgets(buf, static_cast<int>(sizeof(buf)), fp) != 0) - { - data += buf; - - size_t len = strlen(buf); - if(buf[len - 1] == '\n') - { - break; - } - } - if(data.empty()) - { - return false; - } - - istringstream is(data); - - string s; - getline(is, s, '\t'); - try - { - info.path = IceUtilInternal::unescapeString(s, 0, s.size(), ""); - } - catch(const IceUtil::IllegalArgumentException& ex) - { - throw invalid_argument(ex.reason()); - } - - getline(is, s, '\t'); - info.checksum = stringToBytes(s); - - is >> info.size; - is >> info.executable; - - return true; -} - -string -IcePatch2Internal::bytesToString(const ByteSeq& bytes) -{ -/* - ostringstream s; - - for(ByteSeq::const_iterator p = bytes.begin(); p != bytes.end(); ++p) - { - s << setw(2) << setfill('0') << hex << static_cast<int>(*p); - } - - return s.str(); -*/ - - static const char* toHex = "0123456789abcdef"; - - string s; - s.resize(bytes.size() * 2); - - for(unsigned int i = 0; i < bytes.size(); ++i) - { - s[i * 2] = toHex[(bytes[i] >> 4) & 0xf]; - s[i * 2 + 1] = toHex[bytes[i] & 0xf]; - } - - return s; -} - -ByteSeq -IcePatch2Internal::stringToBytes(const string& str) -{ - ByteSeq bytes; - bytes.reserve((str.size() + 1) / 2); - - for(size_t i = 0; i + 1 < str.size(); i += 2) - { -/* - istringstream is(str.substr(i, 2)); - int byte; - is >> hex >> byte; -*/ - - int byte = 0; - - for(size_t j = 0; j < 2; ++j) - { - char c = str[i + j]; - - if(c >= '0' && c <= '9') - { - byte |= c - '0'; - } - else if(c >= 'a' && c <= 'f') - { - byte |= 10 + c - 'a'; - } - else if(c >= 'A' && c <= 'F') - { - byte |= 10 + c - 'A'; - } - - if(j == 0) - { - byte <<= 4; - } - } - - bytes.push_back(static_cast<Byte>(byte)); - } - - return bytes; -} - -string -IcePatch2Internal::simplify(const string& path) -{ - string result = path; - - string::size_type pos; - -#ifdef _WIN32 - pos = 0; - if(result.find("\\\\") == 0) - { - pos = 2; - } - - for(; pos < result.size(); ++pos) - { - if(result[pos] == '\\') - { - result[pos] = '/'; - } - } -#endif - - pos = 0; - while((pos = result.find("//", pos)) != string::npos) - { - result.erase(pos, 1); - } - - pos = 0; - while((pos = result.find("/./", pos)) != string::npos) - { - result.erase(pos, 2); - } - - while(result.substr(0, 4) == "/../") - { - result.erase(0, 3); - } - - if(result.substr(0, 2) == "./") - { - result.erase(0, 2); - } - - if(result == "/." || - (result.size() == 4 && IceUtilInternal::isAlpha(result[0]) && result[1] == ':' && - result[2] == '/' && result[3] == '.')) - { - return result.substr(0, result.size() - 1); - } - - if(result.size() >= 2 && result.substr(result.size() - 2, 2) == "/.") - { - result.erase(result.size() - 2, 2); - } - - if(result == "/" || (result.size() == 3 && IceUtilInternal::isAlpha(result[0]) && result[1] == ':' && - result[2] == '/')) - { - return result; - } - - if(result.size() >= 1 && result[result.size() - 1] == '/') - { - result.erase(result.size() - 1); - } - - if(result == "/..") - { - result = "/"; - } - - return result; -} - -bool -IcePatch2Internal::isRoot(const string& pa) -{ - string path = simplify(pa); -#ifdef _WIN32 - return path == "/" || path.size() == 3 && IceUtilInternal::isAlpha(path[0]) && path[1] == ':' && - path[2] == '/'; -#else - return path == "/"; -#endif -} - -string -IcePatch2Internal::getSuffix(const string& pa) -{ - const string path = simplify(pa); - - string::size_type dotPos = path.rfind('.'); - string::size_type slashPos = path.rfind('/'); - - if(dotPos == string::npos || (slashPos != string::npos && slashPos > dotPos)) - { - return string(); - } - - return path.substr(dotPos + 1); -} - -string -IcePatch2Internal::getWithoutSuffix(const string& pa) -{ - const string path = simplify(pa); - - string::size_type dotPos = path.rfind('.'); - string::size_type slashPos = path.rfind('/'); - - if(dotPos == string::npos || (slashPos != string::npos && slashPos > dotPos)) - { - return path; - } - - return path.substr(0, dotPos); -} - -bool -IcePatch2Internal::ignoreSuffix(const string& path) -{ - string suffix = getSuffix(path); - return suffix == "md5" // For legacy IcePatch. - || suffix == "tot" // For legacy IcePatch. - || suffix == "bz2" - || suffix == "bz2temp"; -} - -string -IcePatch2Internal::getBasename(const string& pa) -{ - const string path = simplify(pa); - - string::size_type pos = path.rfind('/'); - if(pos == string::npos) - { - return path; - } - else - { - return path.substr(pos + 1); - } -} - -string -IcePatch2Internal::getDirname(const string& pa) -{ - const string path = simplify(pa); - - string::size_type pos = path.rfind('/'); - if(pos == string::npos) - { - return string(); - } - else - { - return path.substr(0, pos); - } -} - -void -IcePatch2Internal::rename(const string& fromPa, const string& toPa) -{ - - const string fromPath = simplify(fromPa); - const string toPath = simplify(toPa); - - IceUtilInternal::remove(toPath); // We ignore errors, as the file we are renaming to might not exist. - if(IceUtilInternal::rename(fromPath, toPath) == -1) - { - throw runtime_error("cannot rename `" + fromPath + "' to `" + toPath + "': " + IceUtilInternal::lastErrorToString()); - } -} - -void -IcePatch2Internal::remove(const string& pa) -{ - const string path = simplify(pa); - - IceUtilInternal::structstat buf; - if(IceUtilInternal::stat(path, &buf) == -1) - { - throw runtime_error("cannot stat `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - - if(S_ISDIR(buf.st_mode)) - { - if(IceUtilInternal::rmdir(path) == -1) - { - if(errno == EACCES) - { - assert(false); - } - throw runtime_error("cannot remove directory `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - } - else - { - if(IceUtilInternal::remove(path) == -1) - { - throw runtime_error("cannot remove file `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - } -} - -void -IcePatch2Internal::removeRecursive(const string& pa) -{ - const string path = simplify(pa); - - IceUtilInternal::structstat buf; - if(IceUtilInternal::stat(path, &buf) == -1) - { - throw runtime_error("cannot stat `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - - if(S_ISDIR(buf.st_mode)) - { - StringSeq paths = readDirectory(path); - for(StringSeq::const_iterator p = paths.begin(); p != paths.end(); ++p) - { - removeRecursive(path + '/' + *p); - } - - if(!isRoot(path)) - { - if(IceUtilInternal::rmdir(path) == -1) - { - throw runtime_error("cannot remove directory `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - } - } - else - { - if(IceUtilInternal::remove(path) == -1) - { - throw runtime_error("cannot remove file `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - } -} - -StringSeq -IcePatch2Internal::readDirectory(const string& pa) -{ - const string path = simplify(pa); - -#ifdef _WIN32 - - // - // IcePatch2 doesn't support to use string converters, so don't need to use - // any string converter in stringToWstring or wstringToString conversions. - // - StringSeq result; - const wstring fs = IceUtil::stringToWstring(simplify(path + "/*")); - - struct _wfinddata_t data; - intptr_t h = _wfindfirst(fs.c_str(), &data); - if(h == -1) - { - throw runtime_error("cannot read directory `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - - while(true) - { - string name = wstringToString(data.name); - assert(!name.empty()); - - if(name != ".." && name != ".") - { - result.push_back(name); - } - - if(_wfindnext(h, &data) == -1) - { - if(errno == ENOENT) - { - break; - } - string reason = "cannot read directory `" + path + "':\n" + IceUtilInternal::lastErrorToString(); - _findclose(h); - throw runtime_error(reason); - } - } - - _findclose(h); - - sort(result.begin(), result.end()); - return result; - -#else - - struct dirent **namelist; - int n = scandir(path.c_str(), &namelist, 0, alphasort); - - if(n < 0) - { - throw runtime_error("cannot read directory `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - - StringSeq result; - assert(n >= 2); - result.reserve(static_cast<size_t>(n - 2)); - - for(int i = 0; i < n; ++i) - { - string name = namelist[i]->d_name; - assert(!name.empty()); - - free(namelist[i]); - - if(name != ".." && name != ".") - { - result.push_back(name); - } - } - - free(namelist); - return result; - -#endif -} - -void -IcePatch2Internal::createDirectory(const string& pa) -{ - const string path = simplify(pa); - - if(IceUtilInternal::mkdir(path, 0777) == -1) - { - if(errno != EEXIST) - { - throw runtime_error("cannot create directory `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - } -} - -void -IcePatch2Internal::createDirectoryRecursive(const string& pa) -{ - const string path = simplify(pa); - - string dir = getDirname(path); - if(!dir.empty()) - { - createDirectoryRecursive(dir); - } - - if(!isRoot(path + "/")) - { - IceUtilInternal::structstat buf; - if(IceUtilInternal::stat(path, &buf) != -1) - { - if(S_ISDIR(buf.st_mode)) - { - return; - } - } - - if(IceUtilInternal::mkdir(path, 0777) == -1) - { - if(errno != EEXIST) - { - throw runtime_error("cannot create directory `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - } - } -} - -void -IcePatch2Internal::compressBytesToFile(const string& pa, const ByteSeq& bytes, Int pos) -{ - const string path = simplify(pa); - - FILE* stdioFile = IceUtilInternal::fopen(path, "wb"); - if(!stdioFile) - { - throw runtime_error("cannot open `" + path + "' for writing:\n" + IceUtilInternal::lastErrorToString()); - } - - int bzError; - BZFILE* bzFile = BZ2_bzWriteOpen(&bzError, stdioFile, 5, 0, 0); - if(bzError != BZ_OK) - { - string reason = "BZ2_bzWriteOpen failed"; - if(bzError == BZ_IO_ERROR) - { - reason += ": " + IceUtilInternal::lastErrorToString(); - } - fclose(stdioFile); - throw runtime_error(reason); - } - - BZ2_bzWrite(&bzError, bzFile, const_cast<Byte*>(&bytes[static_cast<size_t>(pos)]), - static_cast<int>(bytes.size()) - pos); - if(bzError != BZ_OK) - { - string reason = "BZ2_bzWrite failed"; - if(bzError == BZ_IO_ERROR) - { - reason += ": " + IceUtilInternal::lastErrorToString(); - } - BZ2_bzWriteClose(&bzError, bzFile, 0, 0, 0); - fclose(stdioFile); - throw runtime_error(reason); - } - - BZ2_bzWriteClose(&bzError, bzFile, 0, 0, 0); - if(bzError != BZ_OK) - { - string reason = "BZ2_bzWriteClose failed"; - if(bzError == BZ_IO_ERROR) - { - reason += ": " + IceUtilInternal::lastErrorToString(); - } - fclose(stdioFile); - throw runtime_error(reason); - } - - fclose(stdioFile); -} - -void -IcePatch2Internal::decompressFile(const string& pa) -{ - const string path = simplify(pa); - const string pathBZ2 = path + ".bz2"; - - FILE* fp = 0; - FILE* stdioFileBZ2 = 0; - int bzError; - BZFILE* bzFile = 0; - - try - { - fp = IceUtilInternal::fopen(path, "wb"); - if(!fp) - { - throw runtime_error("cannot open `" + path + "' for writing:\n" + IceUtilInternal::lastErrorToString()); - } - - stdioFileBZ2 = IceUtilInternal::fopen(pathBZ2, "rb"); - if(!stdioFileBZ2) - { - throw runtime_error("cannot open `" + pathBZ2 + "' for reading:\n" + IceUtilInternal::lastErrorToString()); - } - - bzFile = BZ2_bzReadOpen(&bzError, stdioFileBZ2, 0, 0, 0, 0); - if(bzError != BZ_OK) - { - string reason = "BZ2_bzReadOpen failed"; - if(bzError == BZ_IO_ERROR) - { - reason += ": " + IceUtilInternal::lastErrorToString(); - } - throw runtime_error(reason); - } - - const Int numBZ2 = 64 * 1024; - Byte bytesBZ2[numBZ2]; - - while(bzError != BZ_STREAM_END) - { - int sz = BZ2_bzRead(&bzError, bzFile, bytesBZ2, numBZ2); - if(bzError != BZ_OK && bzError != BZ_STREAM_END) - { - string reason = "BZ2_bzRead failed"; - if(bzError == BZ_IO_ERROR) - { - reason += ": " + IceUtilInternal::lastErrorToString(); - } - throw runtime_error(reason); - } - - if(sz > 0) - { - long pos = ftell(stdioFileBZ2); - if(pos == -1) - { - throw runtime_error("cannot get read position for `" + pathBZ2 + "':\n" + IceUtilInternal::lastErrorToString()); - } - - if(fwrite(bytesBZ2, static_cast<size_t>(sz), 1, fp) != 1) - { - throw runtime_error("cannot write to `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - } - } - - BZ2_bzReadClose(&bzError, bzFile); - bzFile = 0; - if(bzError != BZ_OK) - { - string reason = "BZ2_bzReadClose failed"; - if(bzError == BZ_IO_ERROR) - { - reason += ": " + IceUtilInternal::lastErrorToString(); - } - throw runtime_error(reason); - } - } - catch(...) - { - if(bzFile != 0) - { - BZ2_bzReadClose(&bzError, bzFile); - } - if(stdioFileBZ2 != 0) - { - fclose(stdioFileBZ2); - } - if(fp != 0) - { - fclose(fp); - } - throw; - } - - fclose(stdioFileBZ2); - fclose(fp); -} - -#ifndef _WIN32 -void -IcePatch2Internal::setFileFlags(const string& pa, const LargeFileInfo& info) -{ - const string path = simplify(pa); - IceUtilInternal::structstat buf; - if(IceUtilInternal::stat(path, &buf) == -1) - { - throw runtime_error("cannot stat `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - chmod(path.c_str(), info.executable ? buf.st_mode | S_IXUSR : buf.st_mode & ~S_IXUSR); -} -#else // Windows doesn't support the executable flag -void -IcePatch2Internal::setFileFlags(const string&, const LargeFileInfo&) -{ -} -#endif - -namespace -{ - -static bool -getFileInfoSeqInternal(const string& basePath, const string& relPath, int compress, GetFileInfoSeqCB* cb, - LargeFileInfoSeq& infoSeq) -{ - if(relPath == checksumFile || relPath == logFile) - { - return true; - } - - const string path = simplify(basePath + '/' + relPath); - - if(ignoreSuffix(path)) - { - const string pathWithoutSuffix = getWithoutSuffix(path); - - if(ignoreSuffix(pathWithoutSuffix)) - { - if(cb && !cb->remove(relPath)) - { - return false; - } - - remove(path); // Removing file with suffix for another file that already has a suffix. - } - else - { - IceUtilInternal::structstat buf; - if(IceUtilInternal::stat(getWithoutSuffix(path), &buf) == -1) - { - if(errno == ENOENT) - { - if(cb && !cb->remove(relPath)) - { - return false; - } - - remove(path); // Removing orphaned file. - } - else - { - throw runtime_error("cannot stat `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - } - else if(buf.st_size == 0) - { - if(cb && !cb->remove(relPath)) - { - return false; - } - - remove(path); // Removing file with suffix for empty file. - } - } - } - else - { - - IceUtilInternal::structstat buf; - if(IceUtilInternal::stat(path, &buf) == -1) - { - throw runtime_error("cannot stat `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - - if(S_ISDIR(buf.st_mode)) - { - LargeFileInfo info; - info.path = relPath; - info.size = -1; - info.executable = false; - - ByteSeq bytes(relPath.size()); - copy(relPath.begin(), relPath.end(), bytes.begin()); - - ByteSeq bytesSHA(20); - if(!bytes.empty()) - { - IceInternal::sha1(reinterpret_cast<unsigned char*>(&bytes[0]), bytes.size(), bytesSHA); - } - else - { - fill(bytesSHA.begin(), bytesSHA.end(), Byte(0)); - } - info.checksum.swap(bytesSHA); - - infoSeq.push_back(info); - - StringSeq content = readDirectory(path); - for(StringSeq::const_iterator p = content.begin(); p != content.end() ; ++p) - { - if(!getFileInfoSeqInternal(basePath, simplify(relPath + '/' + *p), compress, cb, infoSeq)) - { - return false; - } - } - } - else if(S_ISREG(buf.st_mode)) - { - LargeFileInfo info; - info.path = relPath; - info.size = 0; -#ifdef _WIN32 - info.executable = false; // Windows doesn't support the executable flag -#else - info.executable = buf.st_mode & S_IXUSR; -#endif - - IceUtilInternal::structstat bufBZ2; - const string pathBZ2 = path + ".bz2"; - bool doCompress = false; - if(buf.st_size != 0 && compress > 0) - { - // - // compress == 0: Never compress. - // compress == 1: Compress if necessary. - // compress >= 2: Always compress. - // - if(compress >= 2 || IceUtilInternal::stat(pathBZ2, &bufBZ2) == -1 || buf.st_mtime >= bufBZ2.st_mtime) - { - if(cb && !cb->compress(relPath)) - { - return false; - } - - doCompress = true; - } - else - { - info.size = bufBZ2.st_size; - } - } - - if(cb && !cb->checksum(relPath)) - { - return false; - } - - ByteSeq bytesSHA; - - if(relPath.size() == 0 && buf.st_size == 0) - { - bytesSHA.resize(20); - fill(bytesSHA.begin(), bytesSHA.end(), Byte(0)); - } - else - { - IceInternal::SHA1 hasher; - if(relPath.size() != 0) - { - hasher.update(reinterpret_cast<const IceUtil::Byte*>(relPath.c_str()), relPath.size()); - } - - if(buf.st_size != 0) - { - int fd = IceUtilInternal::open(path.c_str(), O_BINARY|O_RDONLY); - if(fd == -1) - { - throw runtime_error("cannot open `" + path + "' for reading:\n" + IceUtilInternal::lastErrorToString()); - } - - const string pathBZ2Temp = path + ".bz2temp"; - FILE* stdioFile = 0; - int bzError = 0; - BZFILE* bzFile = 0; - if(doCompress) - { - stdioFile = IceUtilInternal::fopen(simplify(pathBZ2Temp), "wb"); - if(!stdioFile) - { - IceUtilInternal::close(fd); - throw runtime_error("cannot open `" + pathBZ2Temp + "' for writing:\n" + IceUtilInternal::lastErrorToString()); - } - - bzFile = BZ2_bzWriteOpen(&bzError, stdioFile, 5, 0, 0); - if(bzError != BZ_OK) - { - string reason = "BZ2_bzWriteOpen failed"; - if(bzError == BZ_IO_ERROR) - { - reason += ": " + IceUtilInternal::lastErrorToString(); - } - fclose(stdioFile); - IceUtilInternal::close(fd); - throw runtime_error(reason); - } - } - - size_t bytesLeft = static_cast<size_t>(buf.st_size); - while(bytesLeft > 0) - { - ByteSeq bytes(min(bytesLeft, static_cast<size_t>(1024 * 1024))); - if( -#if defined(_MSC_VER) - _read(fd, &bytes[0], static_cast<unsigned int>(bytes.size())) -#else - read(fd, &bytes[0], static_cast<unsigned int>(bytes.size())) -#endif - == -1) - { - if(doCompress) - { - fclose(stdioFile); - } - - IceUtilInternal::close(fd); - throw runtime_error("cannot read from `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - bytesLeft -= static_cast<unsigned int>(bytes.size()); - if(doCompress) - { - BZ2_bzWrite(&bzError, bzFile, const_cast<Byte*>(&bytes[0]), static_cast<int>(bytes.size())); - if(bzError != BZ_OK) - { - string reason = "BZ2_bzWrite failed"; - if(bzError == BZ_IO_ERROR) - { - reason += ": " + IceUtilInternal::lastErrorToString(); - } - BZ2_bzWriteClose(&bzError, bzFile, 0, 0, 0); - fclose(stdioFile); - IceUtilInternal::close(fd); - throw runtime_error(reason); - } - } - - hasher.update(reinterpret_cast<IceUtil::Byte*>(&bytes[0]), bytes.size()); - } - - IceUtilInternal::close(fd); - - if(doCompress) - { - BZ2_bzWriteClose(&bzError, bzFile, 0, 0, 0); - if(bzError != BZ_OK) - { - string reason = "BZ2_bzWriteClose failed"; - if(bzError == BZ_IO_ERROR) - { - reason += ": " + IceUtilInternal::lastErrorToString(); - } - fclose(stdioFile); - throw runtime_error(reason); - } - - fclose(stdioFile); - - rename(pathBZ2Temp, pathBZ2); - - if(IceUtilInternal::stat(pathBZ2, &bufBZ2) == -1) - { - throw runtime_error("cannot stat `" + pathBZ2 + "':\n" + IceUtilInternal::lastErrorToString()); - } - - info.size = bufBZ2.st_size; - } - } - hasher.finalize(bytesSHA); - } - - info.checksum.swap(bytesSHA); - - infoSeq.push_back(info); - } - } - - return true; -} - -} - -IcePatch2Internal::GetFileInfoSeqCB::~GetFileInfoSeqCB() -{ - // Out of line to avoid weak vtable -} - -bool -IcePatch2Internal::getFileInfoSeq(const string& basePath, int compress, GetFileInfoSeqCB* cb, - LargeFileInfoSeq& infoSeq) -{ - return getFileInfoSeqSubDir(basePath, ".", compress, cb, infoSeq); -} - -bool -IcePatch2Internal::getFileInfoSeqSubDir(const string& basePa, const string& relPa, int compress, GetFileInfoSeqCB* cb, - LargeFileInfoSeq& infoSeq) -{ - const string basePath = simplify(basePa); - const string relPath = simplify(relPa); - - if(!getFileInfoSeqInternal(basePath, relPath, compress, cb, infoSeq)) - { - return false; - } - - sort(infoSeq.begin(), infoSeq.end(), FileInfoLess()); - infoSeq.erase(unique(infoSeq.begin(), infoSeq.end(), FileInfoEqual()), infoSeq.end()); - - return true; -} - -void -IcePatch2Internal::saveFileInfoSeq(const string& pa, const LargeFileInfoSeq& infoSeq) -{ - { - const string path = simplify(pa + '/' + checksumFile); - FILE* fp = IceUtilInternal::fopen(path, "w"); - if(!fp) - { - throw runtime_error("cannot open `" + path + "' for writing:\n" + IceUtilInternal::lastErrorToString()); - } - try - { - for(LargeFileInfoSeq::const_iterator p = infoSeq.begin(); p != infoSeq.end(); ++p) - { - if(!writeFileInfo(fp, *p)) - { - throw runtime_error("error writing `" + path + "':\n" + IceUtilInternal::lastErrorToString()); - } - } - } - catch(...) - { - fclose(fp); - throw; - } - fclose(fp); - } - - { - const string pathLog = simplify(pa + '/' + logFile); - - try - { - remove(pathLog); - } - catch(...) - { - } - } -} - -void -IcePatch2Internal::loadFileInfoSeq(const string& pa, LargeFileInfoSeq& infoSeq) -{ - { - const string path = simplify(pa + '/' + checksumFile); - - FILE* fp = IceUtilInternal::fopen(path, "r"); - if(!fp) - { - throw runtime_error("cannot open `" + path + "' for reading:\n" + IceUtilInternal::lastErrorToString()); - } - - while(true) - { - LargeFileInfo info; - if(readFileInfo(fp, info)) - { - infoSeq.push_back(info); - } - else - { - break; - } - } - fclose(fp); - - sort(infoSeq.begin(), infoSeq.end(), FileInfoLess()); - infoSeq.erase(unique(infoSeq.begin(), infoSeq.end(), FileInfoEqual()), infoSeq.end()); - } - - { - const string pathLog = simplify(pa + '/' + logFile); - - FILE* fp = IceUtilInternal::fopen(pathLog, "r"); - if(fp != 0) - { - LargeFileInfoSeq remove; - LargeFileInfoSeq update; - - while(true) - { - int c = fgetc(fp); - if(c == EOF) - { - break; - } - - LargeFileInfo info; - if(!readFileInfo(fp, info)) - { - break; - } - - if(c == '-') - { - remove.push_back(info); - } - else if(c == '+') - { - update.push_back(info); - } - } - fclose(fp); - - sort(remove.begin(), remove.end(), FileInfoLess()); - remove.erase(unique(remove.begin(), remove.end(), FileInfoEqual()), remove.end()); - - sort(update.begin(), update.end(), FileInfoLess()); - update.erase(unique(update.begin(), update.end(), FileInfoEqual()), update.end()); - - LargeFileInfoSeq newInfoSeq; - newInfoSeq.reserve(infoSeq.size()); - - set_difference(infoSeq.begin(), - infoSeq.end(), - remove.begin(), - remove.end(), - back_inserter(newInfoSeq), - FileInfoLess()); - - infoSeq.swap(newInfoSeq); - - newInfoSeq.clear(); - newInfoSeq.reserve(infoSeq.size()); - - set_union(infoSeq.begin(), - infoSeq.end(), - update.begin(), - update.end(), - back_inserter(newInfoSeq), - FileInfoLess()); - - infoSeq.swap(newInfoSeq); - - saveFileInfoSeq(pa, infoSeq); - } - } -} - -void -IcePatch2Internal::getFileTree0(const LargeFileInfoSeq& infoSeq, FileTree0& tree0) -{ - tree0.nodes.resize(256); - tree0.checksum.resize(20); - - ByteSeq allChecksums0; - allChecksums0.resize(256 * 20); - ByteSeq::iterator c0 = allChecksums0.begin(); - - for(int i = 0; i < 256; ++i, c0 += 20) - { - FileTree1& tree1 = tree0.nodes[static_cast<size_t>(i)]; - - tree1.files.clear(); - tree1.checksum.resize(20); - - for(LargeFileInfoSeq::const_iterator p = infoSeq.begin(); p != infoSeq.end(); ++p) - { - if(i == static_cast<int>(p->checksum[0])) - { - tree1.files.push_back(*p); - } - } - - ByteSeq allChecksums1; - allChecksums1.resize(tree1.files.size() * 21); // 20 bytes for the checksum + 1 byte for the flag - ByteSeq::iterator c1 = allChecksums1.begin(); - - for(LargeFileInfoSeq::const_iterator p = tree1.files.begin(); p != tree1.files.end(); ++p, c1 += 21) - { - copy(p->checksum.begin(), p->checksum.end(), c1); - *(c1 + 20) = p->executable; - } - - if(!allChecksums1.empty()) - { - IceInternal::sha1(reinterpret_cast<unsigned char*>(&allChecksums1[0]), allChecksums1.size(), tree1.checksum); - } - else - { - fill(tree1.checksum.begin(), tree1.checksum.end(), Byte(0)); - } - - copy(tree1.checksum.begin(), tree1.checksum.end(), c0); - } - - if(!allChecksums0.empty()) - { - IceInternal::sha1(reinterpret_cast<unsigned char*>(&allChecksums0[0]), allChecksums0.size(), tree0.checksum); - } - else - { - fill(tree0.checksum.begin(), tree0.checksum.end(), Byte(0)); - } -} diff --git a/cpp/src/IcePatch2Lib/Util.h b/cpp/src/IcePatch2Lib/Util.h deleted file mode 100644 index 380510a36c2..00000000000 --- a/cpp/src/IcePatch2Lib/Util.h +++ /dev/null @@ -1,194 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#ifndef ICE_PATCH2_UTIL_H -#define ICE_PATCH2_UTIL_H - -#include <Ice/Ice.h> -#include <IcePatch2/FileInfo.h> -#include <stdio.h> - -namespace IcePatch2Internal -{ - -ICEPATCH2_API extern const char* checksumFile; -ICEPATCH2_API extern const char* logFile; - -ICEPATCH2_API std::string lastError(); - -ICEPATCH2_API std::string bytesToString(const Ice::ByteSeq&); -ICEPATCH2_API Ice::ByteSeq stringToBytes(const std::string&); - -ICEPATCH2_API std::string simplify(const std::string&); - -ICEPATCH2_API bool isRoot(const std::string&); - -ICEPATCH2_API std::string getSuffix(const std::string&); -ICEPATCH2_API std::string getWithoutSuffix(const std::string&); -ICEPATCH2_API bool ignoreSuffix(const std::string&); - -ICEPATCH2_API std::string getBasename(const std::string&); -ICEPATCH2_API std::string getDirname(const std::string&); - -ICEPATCH2_API void rename(const std::string&, const std::string&); - -ICEPATCH2_API void remove(const std::string&); -ICEPATCH2_API void removeRecursive(const std::string&); - -ICEPATCH2_API Ice::StringSeq readDirectory(const std::string&); - -ICEPATCH2_API void createDirectory(const std::string&); -ICEPATCH2_API void createDirectoryRecursive(const std::string&); - -ICEPATCH2_API void compressBytesToFile(const std::string&, const Ice::ByteSeq&, Ice::Int); -ICEPATCH2_API void decompressFile(const std::string&); - -ICEPATCH2_API void setFileFlags(const std::string&, const IcePatch2::LargeFileInfo&); - -struct FileInfoEqual : public std::binary_function<const IcePatch2::LargeFileInfo&, const IcePatch2::LargeFileInfo&, bool> -{ - bool - operator()(const IcePatch2::LargeFileInfo& lhs, const IcePatch2::LargeFileInfo& rhs) - { - if(lhs.path != rhs.path) - { - return false; - } - - // - // For the size portion of the comparison, we only distinquish - // between file (size >= 0) and directory (size == -1). We do - // not take the actual size into account, as it might be set - // to 0 if no compressed file is available. - // - Ice::Long lsz = lhs.size > 0 ? 0 : lhs.size; - Ice::Long rsz = rhs.size > 0 ? 0 : rhs.size; - if(lsz != rsz) - { - return false; - } - - if(lhs.executable != rhs.executable) - { - return false; - } - - return lhs.checksum == rhs.checksum; - } -}; - -struct FileInfoWithoutFlagsLess : public std::binary_function<const IcePatch2::LargeFileInfo&, const IcePatch2::LargeFileInfo&, bool> -{ - bool - operator()(const IcePatch2::LargeFileInfo& lhs, const IcePatch2::LargeFileInfo& rhs) - { - return compareWithoutFlags(lhs, rhs) < 0; - } - - int - compareWithoutFlags(const IcePatch2::LargeFileInfo& lhs, const IcePatch2::LargeFileInfo& rhs) - { - if(lhs.path < rhs.path) - { - return -1; - } - else if(rhs.path < lhs.path) - { - return 1; - } - - // - // For the size portion of the comparison, we only distinquish - // between file (size >= 0) and directory (size == -1). We do - // not take the actual size into account, as it might be set - // to 0 if no compressed file is available. - // - Ice::Long lsz = lhs.size > 0 ? 0 : lhs.size; - Ice::Long rsz = rhs.size > 0 ? 0 : rhs.size; - if(lsz < rsz) - { - return -1; - } - else if(rsz < lsz) - { - return 1; - } - - if(lhs.checksum < rhs.checksum) - { - return -1; - } - else if(rhs.checksum < lhs.checksum) - { - return 1; - } - - return 0; - } -}; - -struct FileInfoLess : public FileInfoWithoutFlagsLess -{ - bool - operator()(const IcePatch2::LargeFileInfo& lhs, const IcePatch2::LargeFileInfo& rhs) - { - int rc = compareWithoutFlags(lhs, rhs); - if(rc < 0) - { - return true; - } - else if(rc > 0) - { - return false; - } - - return lhs.executable < rhs.executable; - } -}; - -class ICEPATCH2_API GetFileInfoSeqCB -{ -public: - - virtual ~GetFileInfoSeqCB(); - - virtual bool remove(const std::string&) = 0; - virtual bool checksum(const std::string&) = 0; - virtual bool compress(const std::string&) = 0; -}; - -ICEPATCH2_API bool getFileInfoSeq(const std::string&, int, GetFileInfoSeqCB*, IcePatch2::LargeFileInfoSeq&); - -ICEPATCH2_API bool getFileInfoSeqSubDir(const std::string&, const std::string&, int, GetFileInfoSeqCB*, IcePatch2::LargeFileInfoSeq&); - -ICEPATCH2_API void saveFileInfoSeq(const std::string&, const IcePatch2::LargeFileInfoSeq&); - -ICEPATCH2_API void loadFileInfoSeq(const std::string&, IcePatch2::LargeFileInfoSeq&); - -ICEPATCH2_API bool readFileInfo(FILE*, IcePatch2::LargeFileInfo&); - -ICEPATCH2_API IcePatch2::FileInfo toFileInfo(const IcePatch2::LargeFileInfo&); -ICEPATCH2_API IcePatch2::LargeFileInfo toLargeFileInfo(const IcePatch2::FileInfo&); - -ICEPATCH2_API bool writeFileInfo(FILE*, const IcePatch2::LargeFileInfo&); - -struct FileTree1 -{ - IcePatch2::LargeFileInfoSeq files; - Ice::ByteSeq checksum; -}; - -typedef std::vector<FileTree1> FileTree1Seq; - -struct FileTree0 -{ - FileTree1Seq nodes; - Ice::ByteSeq checksum; -}; - -ICEPATCH2_API void getFileTree0(const IcePatch2::LargeFileInfoSeq&, FileTree0&); - -} - -#endif diff --git a/cpp/src/IcePatch2Lib/msbuild/icepatch2.vcxproj b/cpp/src/IcePatch2Lib/msbuild/icepatch2.vcxproj deleted file mode 100644 index 757260eb7ea..00000000000 --- a/cpp/src/IcePatch2Lib/msbuild/icepatch2.vcxproj +++ /dev/null @@ -1,236 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.6\build\zeroc.icebuilder.msbuild.props" Condition="Exists('..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.6\build\zeroc.icebuilder.msbuild.props')" /> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{994ADD25-20A0-4715-A3EC-9F86AFD481D0}</ProjectGuid> - <RootNamespace>IcePatch2</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup> - <DefaultPlatformToolset Condition="'$(VisualStudioVersion)' == '10.0' And '$(DefaultPlatformToolset)' == ''">v100</DefaultPlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <Import Project="$(MSBuildThisFileDirectory)\..\..\..\msbuild\ice.cpp98.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="Shared"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PreprocessorDefinitions>ICEPATCH2_API_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PreprocessorDefinitions>ICEPATCH2_API_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <PreprocessorDefinitions>ICEPATCH2_API_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <PreprocessorDefinitions>ICEPATCH2_API_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Label="IceBuilder"> - <SliceCompile> - <HeaderOutputDir>$(IceSrcRootDir)\include\generated\cpp98\$(Platform)\$(Configuration)\IcePatch2\</HeaderOutputDir> - <BaseDirectoryForGeneratedInclude>IcePatch2</BaseDirectoryForGeneratedInclude> - </SliceCompile> - </ItemDefinitionGroup> - <ItemGroup> - <SliceCompile Include="..\..\..\..\slice\IcePatch2\FileInfo.ice" /> - <SliceCompile Include="..\..\..\..\slice\IcePatch2\FileServer.ice" /> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\ClientUtil.cpp" /> - <ClCompile Include="..\Util.cpp" /> - <ClCompile Include="Win32\Debug\FileInfo.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileInfo.ice</SliceCompileSource> - </ClCompile> - <ClCompile Include="Win32\Debug\FileServer.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileServer.ice</SliceCompileSource> - </ClCompile> - <ClCompile Include="Win32\Release\FileInfo.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileInfo.ice</SliceCompileSource> - </ClCompile> - <ClCompile Include="Win32\Release\FileServer.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileServer.ice</SliceCompileSource> - </ClCompile> - <ClCompile Include="x64\Debug\FileInfo.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileInfo.ice</SliceCompileSource> - </ClCompile> - <ClCompile Include="x64\Debug\FileServer.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileServer.ice</SliceCompileSource> - </ClCompile> - <ClCompile Include="x64\Release\FileInfo.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileInfo.ice</SliceCompileSource> - </ClCompile> - <ClCompile Include="x64\Release\FileServer.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileServer.ice</SliceCompileSource> - </ClCompile> - </ItemGroup> - <ItemGroup> - <ClInclude Include="..\..\..\include\generated\cpp98\Win32\Debug\IcePatch2\FileInfo.h"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileInfo.ice</SliceCompileSource> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\Win32\Debug\IcePatch2\FileServer.h"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileServer.ice</SliceCompileSource> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\Win32\Release\IcePatch2\FileInfo.h"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileInfo.ice</SliceCompileSource> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\Win32\Release\IcePatch2\FileServer.h"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileServer.ice</SliceCompileSource> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\x64\Debug\IcePatch2\FileInfo.h"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileInfo.ice</SliceCompileSource> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\x64\Debug\IcePatch2\FileServer.h"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileServer.ice</SliceCompileSource> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\x64\Release\IcePatch2\FileInfo.h"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileInfo.ice</SliceCompileSource> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\x64\Release\IcePatch2\FileServer.h"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - <SliceCompileSource>..\..\..\..\slice\IcePatch2\FileServer.ice</SliceCompileSource> - </ClInclude> - <ClInclude Include="..\..\..\include\IcePatch2\ClientUtil.h" /> - <ClInclude Include="..\..\..\include\IcePatch2\Config.h" /> - <ClInclude Include="..\..\..\include\IcePatch2\IcePatch2.h" /> - <ClInclude Include="..\Util.h" /> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="..\IcePatch2.rc" /> - </ItemGroup> - <ItemGroup> - <None Include="packages.config" /> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - <Import Project="..\..\..\msbuild\packages\bzip2.v100.1.0.6.10\build\native\bzip2.v100.targets" Condition="Exists('..\..\..\msbuild\packages\bzip2.v100.1.0.6.10\build\native\bzip2.v100.targets')" /> - <Import Project="..\..\..\msbuild\packages\bzip2.v120.1.0.6.10\build\native\bzip2.v120.targets" Condition="Exists('..\..\..\msbuild\packages\bzip2.v120.1.0.6.10\build\native\bzip2.v120.targets')" /> - <Import Project="..\..\..\msbuild\packages\bzip2.v140.1.0.6.10\build\native\bzip2.v140.targets" Condition="Exists('..\..\..\msbuild\packages\bzip2.v140.1.0.6.10\build\native\bzip2.v140.targets')" /> - <Import Project="..\..\..\msbuild\packages\bzip2.v141.1.0.6.10\build\native\bzip2.v141.targets" Condition="Exists('..\..\..\msbuild\packages\bzip2.v141.1.0.6.10\build\native\bzip2.v141.targets')" /> - <Import Project="..\..\..\msbuild\packages\bzip2.v142.1.0.6.10\build\native\bzip2.v142.targets" Condition="Exists('..\..\..\msbuild\packages\bzip2.v142.1.0.6.10\build\native\bzip2.v142.targets')" /> - <Import Project="..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.6\build\zeroc.icebuilder.msbuild.targets" Condition="Exists('..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.6\build\zeroc.icebuilder.msbuild.targets')" /> - </ImportGroup> - <Import Project="$(MSBuildThisFileDirectory)..\..\..\msbuild\ice.sign.targets" /> - <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> - <PropertyGroup> - <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> - </PropertyGroup> - <Error Condition="!Exists('..\..\..\msbuild\packages\bzip2.v100.1.0.6.10\build\native\bzip2.v100.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\msbuild\packages\bzip2.v100.1.0.6.10\build\native\bzip2.v100.targets'))" /> - <Error Condition="!Exists('..\..\..\msbuild\packages\bzip2.v120.1.0.6.10\build\native\bzip2.v120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\msbuild\packages\bzip2.v120.1.0.6.10\build\native\bzip2.v120.targets'))" /> - <Error Condition="!Exists('..\..\..\msbuild\packages\bzip2.v140.1.0.6.10\build\native\bzip2.v140.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\msbuild\packages\bzip2.v140.1.0.6.10\build\native\bzip2.v140.targets'))" /> - <Error Condition="!Exists('..\..\..\msbuild\packages\bzip2.v141.1.0.6.10\build\native\bzip2.v141.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\msbuild\packages\bzip2.v141.1.0.6.10\build\native\bzip2.v141.targets'))" /> - <Error Condition="!Exists('..\..\..\msbuild\packages\bzip2.v142.1.0.6.10\build\native\bzip2.v142.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\msbuild\packages\bzip2.v142.1.0.6.10\build\native\bzip2.v142.targets'))" /> - <Error Condition="!Exists('..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.6\build\zeroc.icebuilder.msbuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.6\build\zeroc.icebuilder.msbuild.props'))" /> - <Error Condition="!Exists('..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.6\build\zeroc.icebuilder.msbuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\msbuild\packages\zeroc.icebuilder.msbuild.5.0.6\build\zeroc.icebuilder.msbuild.targets'))" /> - </Target> -</Project>
\ No newline at end of file diff --git a/cpp/src/IcePatch2Lib/msbuild/icepatch2.vcxproj.filters b/cpp/src/IcePatch2Lib/msbuild/icepatch2.vcxproj.filters deleted file mode 100644 index 64702f77cf6..00000000000 --- a/cpp/src/IcePatch2Lib/msbuild/icepatch2.vcxproj.filters +++ /dev/null @@ -1,143 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Header Files"> - <UniqueIdentifier>{d2712066-1923-447a-ad64-c80f747fb1ea}</UniqueIdentifier> - <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions> - </Filter> - <Filter Include="Resource Files"> - <UniqueIdentifier>{af5258c0-2b8d-40ab-be90-0b7b080169c2}</UniqueIdentifier> - <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> - </Filter> - <Filter Include="Slice Files"> - <UniqueIdentifier>{f59eb29a-8e4d-4f96-956f-912bb71723f5}</UniqueIdentifier> - <Extensions>ice</Extensions> - </Filter> - <Filter Include="Source Files"> - <UniqueIdentifier>{efca70d0-5c94-455a-b115-a1627cd37f1f}</UniqueIdentifier> - <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> - </Filter> - <Filter Include="Source Files\Win32"> - <UniqueIdentifier>{b2de4f44-f7bf-4d2b-8b1f-7a7eb14023b8}</UniqueIdentifier> - </Filter> - <Filter Include="Source Files\Win32\Debug"> - <UniqueIdentifier>{53019a64-4101-485f-9cbc-06003a1dbf05}</UniqueIdentifier> - </Filter> - <Filter Include="Header Files\Win32"> - <UniqueIdentifier>{9e5ee2e4-9fa9-4c5c-a39f-e25b5abadf9b}</UniqueIdentifier> - </Filter> - <Filter Include="Header Files\Win32\Debug"> - <UniqueIdentifier>{c6d023b5-a4f9-4400-acf3-492ab13e1559}</UniqueIdentifier> - </Filter> - <Filter Include="Source Files\x64"> - <UniqueIdentifier>{c290a809-84db-4a63-b1ab-d797afc58dbe}</UniqueIdentifier> - </Filter> - <Filter Include="Source Files\x64\Debug"> - <UniqueIdentifier>{28be0f87-bd50-4e44-b1ba-0e1ae0fca153}</UniqueIdentifier> - </Filter> - <Filter Include="Header Files\x64"> - <UniqueIdentifier>{69f748d0-0821-4b05-8824-22b83945880a}</UniqueIdentifier> - </Filter> - <Filter Include="Header Files\x64\Debug"> - <UniqueIdentifier>{859e3a89-2f71-4335-806c-3c306d75b0c8}</UniqueIdentifier> - </Filter> - <Filter Include="Source Files\Win32\Release"> - <UniqueIdentifier>{46937cff-2db3-4117-8063-dbe9fd345624}</UniqueIdentifier> - </Filter> - <Filter Include="Header Files\Win32\Release"> - <UniqueIdentifier>{d98eb1b4-139b-4c19-b728-3eb412a4b718}</UniqueIdentifier> - </Filter> - <Filter Include="Source Files\x64\Release"> - <UniqueIdentifier>{f630f65f-1553-46f9-b40b-c7a0731de52a}</UniqueIdentifier> - </Filter> - <Filter Include="Header Files\x64\Release"> - <UniqueIdentifier>{6a79f0b3-e47f-4f69-9431-d0d1fe23696e}</UniqueIdentifier> - </Filter> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\ClientUtil.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\Util.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="Win32\Debug\FileInfo.cpp"> - <Filter>Source Files\Win32\Debug</Filter> - </ClCompile> - <ClCompile Include="Win32\Debug\FileServer.cpp"> - <Filter>Source Files\Win32\Debug</Filter> - </ClCompile> - <ClCompile Include="x64\Debug\FileInfo.cpp"> - <Filter>Source Files\x64\Debug</Filter> - </ClCompile> - <ClCompile Include="x64\Debug\FileServer.cpp"> - <Filter>Source Files\x64\Debug</Filter> - </ClCompile> - <ClCompile Include="Win32\Release\FileInfo.cpp"> - <Filter>Source Files\Win32\Release</Filter> - </ClCompile> - <ClCompile Include="Win32\Release\FileServer.cpp"> - <Filter>Source Files\Win32\Release</Filter> - </ClCompile> - <ClCompile Include="x64\Release\FileInfo.cpp"> - <Filter>Source Files\x64\Release</Filter> - </ClCompile> - <ClCompile Include="x64\Release\FileServer.cpp"> - <Filter>Source Files\x64\Release</Filter> - </ClCompile> - </ItemGroup> - <ItemGroup> - <ClInclude Include="..\Util.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\Win32\Debug\IcePatch2\FileInfo.h"> - <Filter>Header Files\Win32\Debug</Filter> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\Win32\Debug\IcePatch2\FileServer.h"> - <Filter>Header Files\Win32\Debug</Filter> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\x64\Debug\IcePatch2\FileInfo.h"> - <Filter>Header Files\x64\Debug</Filter> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\x64\Debug\IcePatch2\FileServer.h"> - <Filter>Header Files\x64\Debug</Filter> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\Win32\Release\IcePatch2\FileInfo.h"> - <Filter>Header Files\Win32\Release</Filter> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\Win32\Release\IcePatch2\FileServer.h"> - <Filter>Header Files\Win32\Release</Filter> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\x64\Release\IcePatch2\FileInfo.h"> - <Filter>Header Files\x64\Release</Filter> - </ClInclude> - <ClInclude Include="..\..\..\include\generated\cpp98\x64\Release\IcePatch2\FileServer.h"> - <Filter>Header Files\x64\Release</Filter> - </ClInclude> - <ClInclude Include="..\..\..\include\IcePatch2\IcePatch2.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\include\IcePatch2\Config.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\include\IcePatch2\ClientUtil.h"> - <Filter>Header Files</Filter> - </ClInclude> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="..\IcePatch2.rc"> - <Filter>Resource Files</Filter> - </ResourceCompile> - </ItemGroup> - <ItemGroup> - <None Include="packages.config" /> - </ItemGroup> - <ItemGroup> - <SliceCompile Include="..\..\..\..\slice\IcePatch2\FileInfo.ice"> - <Filter>Slice Files</Filter> - </SliceCompile> - <SliceCompile Include="..\..\..\..\slice\IcePatch2\FileServer.ice"> - <Filter>Slice Files</Filter> - </SliceCompile> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/cpp/src/IcePatch2Lib/msbuild/packages.config b/cpp/src/IcePatch2Lib/msbuild/packages.config deleted file mode 100644 index c9b966edf28..00000000000 --- a/cpp/src/IcePatch2Lib/msbuild/packages.config +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="bzip2.v100" version="1.0.6.10" targetFramework="native" /> - <package id="bzip2.v120" version="1.0.6.10" targetFramework="native" /> - <package id="bzip2.v140" version="1.0.6.10" targetFramework="native" /> - <package id="bzip2.v141" version="1.0.6.10" targetFramework="native" /> - <package id="bzip2.v142" version="1.0.6.10" targetFramework="native" /> - <package id="zeroc.icebuilder.msbuild" version="5.0.6" targetFramework="native" /> -</packages>
\ No newline at end of file diff --git a/cpp/src/IceStorm/Makefile.mk b/cpp/src/IceStorm/Makefile.mk index 801093880b1..3604e7ffcdb 100644 --- a/cpp/src/IceStorm/Makefile.mk +++ b/cpp/src/IceStorm/Makefile.mk @@ -43,7 +43,7 @@ icestormadmin_sources := $(addprefix $(currentdir)/,Admin.cpp \ IceStormInternal.ice) icestormdb_targetdir := $(bindir) -icestormdb_dependencies := IcePatch2 IceDB +icestormdb_dependencies := IceDB icestormdb_cppflags := $(if $(lmdb_includedir),-I$(lmdb_includedir)) icestormdb_sources := $(addprefix $(currentdir)/,IceStormDB.cpp DBTypes.ice) |