zeroc-ice 3.6b1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ICE_LICENSE +54 -0
- data/LICENSE +339 -0
- data/bin/slice2rb +17 -0
- data/ext/Communicator.cpp +596 -0
- data/ext/Communicator.h +25 -0
- data/ext/Config.h +111 -0
- data/ext/Connection.cpp +381 -0
- data/ext/Connection.h +26 -0
- data/ext/Endpoint.cpp +311 -0
- data/ext/Endpoint.h +27 -0
- data/ext/ImplicitContext.cpp +152 -0
- data/ext/ImplicitContext.h +25 -0
- data/ext/Init.cpp +52 -0
- data/ext/Logger.cpp +151 -0
- data/ext/Logger.h +28 -0
- data/ext/ObjectFactory.cpp +140 -0
- data/ext/ObjectFactory.h +50 -0
- data/ext/Operation.cpp +676 -0
- data/ext/Operation.h +36 -0
- data/ext/Properties.cpp +369 -0
- data/ext/Properties.h +25 -0
- data/ext/Proxy.cpp +1354 -0
- data/ext/Proxy.h +27 -0
- data/ext/Slice.cpp +223 -0
- data/ext/Slice.h +22 -0
- data/ext/Types.cpp +3160 -0
- data/ext/Types.h +545 -0
- data/ext/Util.cpp +792 -0
- data/ext/Util.h +511 -0
- data/ext/extconf.rb +118 -0
- data/ext/ice/BZIP_LICENSE +42 -0
- data/ext/ice/MCPP_LICENSE +36 -0
- data/ext/ice/bzip2/blocksort.c +1094 -0
- data/ext/ice/bzip2/bzlib.c +1572 -0
- data/ext/ice/bzip2/bzlib.h +282 -0
- data/ext/ice/bzip2/bzlib_private.h +509 -0
- data/ext/ice/bzip2/compress.c +672 -0
- data/ext/ice/bzip2/crctable.c +104 -0
- data/ext/ice/bzip2/decompress.c +646 -0
- data/ext/ice/bzip2/huffman.c +205 -0
- data/ext/ice/bzip2/randtable.c +84 -0
- data/ext/ice/cpp/include/Ice/ACMF.h +30 -0
- data/ext/ice/cpp/include/Ice/Application.h +156 -0
- data/ext/ice/cpp/include/Ice/AsyncResult.h +363 -0
- data/ext/ice/cpp/include/Ice/AsyncResultF.h +26 -0
- data/ext/ice/cpp/include/Ice/BasicStream.h +1315 -0
- data/ext/ice/cpp/include/Ice/Buffer.h +159 -0
- data/ext/ice/cpp/include/Ice/BuiltinSequences.h +74 -0
- data/ext/ice/cpp/include/Ice/Communicator.h +194 -0
- data/ext/ice/cpp/include/Ice/CommunicatorAsync.h +115 -0
- data/ext/ice/cpp/include/Ice/CommunicatorF.h +60 -0
- data/ext/ice/cpp/include/Ice/Config.h +97 -0
- data/ext/ice/cpp/include/Ice/Connection.h +495 -0
- data/ext/ice/cpp/include/Ice/ConnectionAsync.h +115 -0
- data/ext/ice/cpp/include/Ice/ConnectionF.h +72 -0
- data/ext/ice/cpp/include/Ice/ConnectionFactoryF.h +30 -0
- data/ext/ice/cpp/include/Ice/ConnectionIF.h +37 -0
- data/ext/ice/cpp/include/Ice/Current.h +94 -0
- data/ext/ice/cpp/include/Ice/DefaultObjectFactory.h +48 -0
- data/ext/ice/cpp/include/Ice/DeprecatedStringConverter.h +62 -0
- data/ext/ice/cpp/include/Ice/DispatchInterceptor.h +33 -0
- data/ext/ice/cpp/include/Ice/Dispatcher.h +51 -0
- data/ext/ice/cpp/include/Ice/DynamicLibrary.h +105 -0
- data/ext/ice/cpp/include/Ice/DynamicLibraryF.h +29 -0
- data/ext/ice/cpp/include/Ice/Endpoint.h +350 -0
- data/ext/ice/cpp/include/Ice/EndpointF.h +97 -0
- data/ext/ice/cpp/include/Ice/EndpointTypes.h +74 -0
- data/ext/ice/cpp/include/Ice/Exception.h +114 -0
- data/ext/ice/cpp/include/Ice/FacetMap.h +56 -0
- data/ext/ice/cpp/include/Ice/FactoryTable.h +69 -0
- data/ext/ice/cpp/include/Ice/FactoryTableInit.h +87 -0
- data/ext/ice/cpp/include/Ice/Format.h +39 -0
- data/ext/ice/cpp/include/Ice/Functional.h +138 -0
- data/ext/ice/cpp/include/Ice/GCObject.h +73 -0
- data/ext/ice/cpp/include/Ice/Handle.h +192 -0
- data/ext/ice/cpp/include/Ice/Ice.h +54 -0
- data/ext/ice/cpp/include/Ice/Identity.h +160 -0
- data/ext/ice/cpp/include/Ice/ImplicitContext.h +96 -0
- data/ext/ice/cpp/include/Ice/ImplicitContextF.h +60 -0
- data/ext/ice/cpp/include/Ice/Incoming.h +131 -0
- data/ext/ice/cpp/include/Ice/IncomingAsync.h +108 -0
- data/ext/ice/cpp/include/Ice/IncomingAsyncF.h +35 -0
- data/ext/ice/cpp/include/Ice/Initialize.h +141 -0
- data/ext/ice/cpp/include/Ice/InstanceF.h +26 -0
- data/ext/ice/cpp/include/Ice/Instrumentation.h +377 -0
- data/ext/ice/cpp/include/Ice/InstrumentationF.h +71 -0
- data/ext/ice/cpp/include/Ice/LocalException.h +1022 -0
- data/ext/ice/cpp/include/Ice/LocalObject.h +36 -0
- data/ext/ice/cpp/include/Ice/LocalObjectF.h +26 -0
- data/ext/ice/cpp/include/Ice/Locator.h +2191 -0
- data/ext/ice/cpp/include/Ice/LocatorF.h +89 -0
- data/ext/ice/cpp/include/Ice/Logger.h +94 -0
- data/ext/ice/cpp/include/Ice/LoggerF.h +60 -0
- data/ext/ice/cpp/include/Ice/LoggerUtil.h +153 -0
- data/ext/ice/cpp/include/Ice/Makefile +26 -0
- data/ext/ice/cpp/include/Ice/Metrics.h +2989 -0
- data/ext/ice/cpp/include/Ice/MetricsAdminI.h +662 -0
- data/ext/ice/cpp/include/Ice/MetricsFunctional.h +144 -0
- data/ext/ice/cpp/include/Ice/MetricsObserverI.h +576 -0
- data/ext/ice/cpp/include/Ice/NativePropertiesAdmin.h +55 -0
- data/ext/ice/cpp/include/Ice/Object.h +165 -0
- data/ext/ice/cpp/include/Ice/ObjectAdapter.h +162 -0
- data/ext/ice/cpp/include/Ice/ObjectAdapterF.h +60 -0
- data/ext/ice/cpp/include/Ice/ObjectAdapterFactoryF.h +26 -0
- data/ext/ice/cpp/include/Ice/ObjectF.h +26 -0
- data/ext/ice/cpp/include/Ice/ObjectFactory.h +86 -0
- data/ext/ice/cpp/include/Ice/ObjectFactoryF.h +60 -0
- data/ext/ice/cpp/include/Ice/ObjectFactoryManagerF.h +26 -0
- data/ext/ice/cpp/include/Ice/ObserverHelper.h +177 -0
- data/ext/ice/cpp/include/Ice/Outgoing.h +197 -0
- data/ext/ice/cpp/include/Ice/OutgoingAsync.h +264 -0
- data/ext/ice/cpp/include/Ice/OutgoingAsyncF.h +38 -0
- data/ext/ice/cpp/include/Ice/Plugin.h +121 -0
- data/ext/ice/cpp/include/Ice/PluginF.h +66 -0
- data/ext/ice/cpp/include/Ice/Process.h +568 -0
- data/ext/ice/cpp/include/Ice/ProcessF.h +77 -0
- data/ext/ice/cpp/include/Ice/Properties.h +130 -0
- data/ext/ice/cpp/include/Ice/PropertiesAdmin.h +824 -0
- data/ext/ice/cpp/include/Ice/PropertiesF.h +83 -0
- data/ext/ice/cpp/include/Ice/Protocol.h +242 -0
- data/ext/ice/cpp/include/Ice/Proxy.h +2448 -0
- data/ext/ice/cpp/include/Ice/ProxyF.h +78 -0
- data/ext/ice/cpp/include/Ice/ProxyFactoryF.h +26 -0
- data/ext/ice/cpp/include/Ice/ProxyHandle.h +330 -0
- data/ext/ice/cpp/include/Ice/ReferenceF.h +34 -0
- data/ext/ice/cpp/include/Ice/RemoteLogger.h +1496 -0
- data/ext/ice/cpp/include/Ice/RequestHandlerF.h +29 -0
- data/ext/ice/cpp/include/Ice/ResponseHandlerF.h +25 -0
- data/ext/ice/cpp/include/Ice/Router.h +1155 -0
- data/ext/ice/cpp/include/Ice/RouterF.h +77 -0
- data/ext/ice/cpp/include/Ice/ServantLocator.h +90 -0
- data/ext/ice/cpp/include/Ice/ServantLocatorF.h +60 -0
- data/ext/ice/cpp/include/Ice/ServantManagerF.h +26 -0
- data/ext/ice/cpp/include/Ice/Service.h +260 -0
- data/ext/ice/cpp/include/Ice/SliceChecksumDict.h +56 -0
- data/ext/ice/cpp/include/Ice/SliceChecksums.h +34 -0
- data/ext/ice/cpp/include/Ice/SlicedData.h +103 -0
- data/ext/ice/cpp/include/Ice/SlicedDataF.h +34 -0
- data/ext/ice/cpp/include/Ice/Stream.h +449 -0
- data/ext/ice/cpp/include/Ice/StreamF.h +30 -0
- data/ext/ice/cpp/include/Ice/StreamHelpers.h +877 -0
- data/ext/ice/cpp/include/Ice/ThreadPoolF.h +28 -0
- data/ext/ice/cpp/include/Ice/UserExceptionFactory.h +56 -0
- data/ext/ice/cpp/include/Ice/Version.h +254 -0
- data/ext/ice/cpp/include/IceSSL/Config.h +23 -0
- data/ext/ice/cpp/include/IceSSL/ConnectionInfo.h +119 -0
- data/ext/ice/cpp/include/IceSSL/EndpointInfo.h +101 -0
- data/ext/ice/cpp/include/IceSSL/IceSSL.h +22 -0
- data/ext/ice/cpp/include/IceSSL/Makefile +26 -0
- data/ext/ice/cpp/include/IceSSL/Plugin.h +558 -0
- data/ext/ice/cpp/include/IceUtil/AbstractMutex.h +119 -0
- data/ext/ice/cpp/include/IceUtil/Cache.h +362 -0
- data/ext/ice/cpp/include/IceUtil/Cond.h +323 -0
- data/ext/ice/cpp/include/IceUtil/Config.h +234 -0
- data/ext/ice/cpp/include/IceUtil/CountDownLatch.h +50 -0
- data/ext/ice/cpp/include/IceUtil/CtrlCHandler.h +70 -0
- data/ext/ice/cpp/include/IceUtil/DisableWarnings.h +45 -0
- data/ext/ice/cpp/include/IceUtil/Exception.h +184 -0
- data/ext/ice/cpp/include/IceUtil/Functional.h +389 -0
- data/ext/ice/cpp/include/IceUtil/Handle.h +266 -0
- data/ext/ice/cpp/include/IceUtil/IceUtil.h +51 -0
- data/ext/ice/cpp/include/IceUtil/IconvStringConverter.h +302 -0
- data/ext/ice/cpp/include/IceUtil/InputUtil.h +47 -0
- data/ext/ice/cpp/include/IceUtil/Iterator.h +36 -0
- data/ext/ice/cpp/include/IceUtil/Lock.h +135 -0
- data/ext/ice/cpp/include/IceUtil/Makefile +26 -0
- data/ext/ice/cpp/include/IceUtil/Monitor.h +249 -0
- data/ext/ice/cpp/include/IceUtil/Mutex.h +357 -0
- data/ext/ice/cpp/include/IceUtil/MutexProtocol.h +28 -0
- data/ext/ice/cpp/include/IceUtil/MutexPtrLock.h +83 -0
- data/ext/ice/cpp/include/IceUtil/MutexPtrTryLock.h +82 -0
- data/ext/ice/cpp/include/IceUtil/Optional.h +322 -0
- data/ext/ice/cpp/include/IceUtil/Options.h +141 -0
- data/ext/ice/cpp/include/IceUtil/OutputUtil.h +362 -0
- data/ext/ice/cpp/include/IceUtil/PopDisableWarnings.h +19 -0
- data/ext/ice/cpp/include/IceUtil/PushDisableWarnings.h +26 -0
- data/ext/ice/cpp/include/IceUtil/Random.h +24 -0
- data/ext/ice/cpp/include/IceUtil/RecMutex.h +113 -0
- data/ext/ice/cpp/include/IceUtil/SHA1.h +65 -0
- data/ext/ice/cpp/include/IceUtil/ScannerConfig.h +44 -0
- data/ext/ice/cpp/include/IceUtil/ScopedArray.h +97 -0
- data/ext/ice/cpp/include/IceUtil/Shared.h +168 -0
- data/ext/ice/cpp/include/IceUtil/StringConverter.h +175 -0
- data/ext/ice/cpp/include/IceUtil/StringUtil.h +91 -0
- data/ext/ice/cpp/include/IceUtil/Thread.h +181 -0
- data/ext/ice/cpp/include/IceUtil/ThreadException.h +108 -0
- data/ext/ice/cpp/include/IceUtil/Time.h +209 -0
- data/ext/ice/cpp/include/IceUtil/Timer.h +143 -0
- data/ext/ice/cpp/include/IceUtil/UUID.h +22 -0
- data/ext/ice/cpp/include/IceUtil/UndefSysMacros.h +42 -0
- data/ext/ice/cpp/include/IceUtil/UniquePtr.h +101 -0
- data/ext/ice/cpp/include/Slice/CPlusPlusUtil.h +64 -0
- data/ext/ice/cpp/include/Slice/Checksum.h +26 -0
- data/ext/ice/cpp/include/Slice/CsUtil.h +92 -0
- data/ext/ice/cpp/include/Slice/DotNetNames.h +34 -0
- data/ext/ice/cpp/include/Slice/FileTracker.h +71 -0
- data/ext/ice/cpp/include/Slice/JavaUtil.h +277 -0
- data/ext/ice/cpp/include/Slice/Makefile +26 -0
- data/ext/ice/cpp/include/Slice/PHPUtil.h +50 -0
- data/ext/ice/cpp/include/Slice/Parser.h +1116 -0
- data/ext/ice/cpp/include/Slice/Preprocessor.h +68 -0
- data/ext/ice/cpp/include/Slice/PythonUtil.h +64 -0
- data/ext/ice/cpp/include/Slice/RubyUtil.h +54 -0
- data/ext/ice/cpp/include/Slice/Util.h +33 -0
- data/ext/ice/cpp/src/Ice/ACM.cpp +343 -0
- data/ext/ice/cpp/src/Ice/ACM.h +117 -0
- data/ext/ice/cpp/src/Ice/Acceptor.cpp +16 -0
- data/ext/ice/cpp/src/Ice/Acceptor.h +41 -0
- data/ext/ice/cpp/src/Ice/AcceptorF.h +30 -0
- data/ext/ice/cpp/src/Ice/Application.cpp +760 -0
- data/ext/ice/cpp/src/Ice/AsyncResult.cpp +599 -0
- data/ext/ice/cpp/src/Ice/Base64.cpp +269 -0
- data/ext/ice/cpp/src/Ice/Base64.h +36 -0
- data/ext/ice/cpp/src/Ice/BasicStream.cpp +3393 -0
- data/ext/ice/cpp/src/Ice/Buffer.cpp +98 -0
- data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +34 -0
- data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +718 -0
- data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.h +106 -0
- data/ext/ice/cpp/src/Ice/Communicator.cpp +45 -0
- data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/CommunicatorI.cpp +386 -0
- data/ext/ice/cpp/src/Ice/CommunicatorI.h +112 -0
- data/ext/ice/cpp/src/Ice/ConnectRequestHandler.cpp +546 -0
- data/ext/ice/cpp/src/Ice/ConnectRequestHandler.h +97 -0
- data/ext/ice/cpp/src/Ice/Connection.cpp +58 -0
- data/ext/ice/cpp/src/Ice/ConnectionF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/ConnectionFactory.cpp +1639 -0
- data/ext/ice/cpp/src/Ice/ConnectionFactory.h +236 -0
- data/ext/ice/cpp/src/Ice/ConnectionI.cpp +3876 -0
- data/ext/ice/cpp/src/Ice/ConnectionI.h +364 -0
- data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +115 -0
- data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.h +50 -0
- data/ext/ice/cpp/src/Ice/Connector.cpp +16 -0
- data/ext/ice/cpp/src/Ice/Connector.h +36 -0
- data/ext/ice/cpp/src/Ice/ConnectorF.h +26 -0
- data/ext/ice/cpp/src/Ice/Current.cpp +38 -0
- data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +168 -0
- data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.h +57 -0
- data/ext/ice/cpp/src/Ice/DefaultsAndOverridesF.h +26 -0
- data/ext/ice/cpp/src/Ice/DeprecatedStringConverter.cpp +60 -0
- data/ext/ice/cpp/src/Ice/DispatchInterceptor.cpp +49 -0
- data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +281 -0
- data/ext/ice/cpp/src/Ice/Endpoint.cpp +53 -0
- data/ext/ice/cpp/src/Ice/EndpointF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/EndpointFactory.cpp +25 -0
- data/ext/ice/cpp/src/Ice/EndpointFactory.h +44 -0
- data/ext/ice/cpp/src/Ice/EndpointFactoryF.h +26 -0
- data/ext/ice/cpp/src/Ice/EndpointFactoryManager.cpp +208 -0
- data/ext/ice/cpp/src/Ice/EndpointFactoryManager.h +46 -0
- data/ext/ice/cpp/src/Ice/EndpointFactoryManagerF.h +26 -0
- data/ext/ice/cpp/src/Ice/EndpointI.cpp +87 -0
- data/ext/ice/cpp/src/Ice/EndpointI.h +165 -0
- data/ext/ice/cpp/src/Ice/EndpointIF.h +41 -0
- data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +38 -0
- data/ext/ice/cpp/src/Ice/EventHandler.cpp +35 -0
- data/ext/ice/cpp/src/Ice/EventHandler.h +78 -0
- data/ext/ice/cpp/src/Ice/EventHandlerF.h +26 -0
- data/ext/ice/cpp/src/Ice/EventLoggerMsg.h +53 -0
- data/ext/ice/cpp/src/Ice/Exception.cpp +832 -0
- data/ext/ice/cpp/src/Ice/FacetMap.cpp +34 -0
- data/ext/ice/cpp/src/Ice/FactoryTable.cpp +158 -0
- data/ext/ice/cpp/src/Ice/FactoryTableInit.cpp +95 -0
- data/ext/ice/cpp/src/Ice/GCObject.cpp +444 -0
- data/ext/ice/cpp/src/Ice/HashUtil.h +59 -0
- data/ext/ice/cpp/src/Ice/HttpParser.cpp +680 -0
- data/ext/ice/cpp/src/Ice/HttpParser.h +124 -0
- data/ext/ice/cpp/src/Ice/IPEndpointI.cpp +733 -0
- data/ext/ice/cpp/src/Ice/IPEndpointI.h +157 -0
- data/ext/ice/cpp/src/Ice/IPEndpointIF.h +29 -0
- data/ext/ice/cpp/src/Ice/Identity.cpp +42 -0
- data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +41 -0
- data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/ImplicitContextI.cpp +639 -0
- data/ext/ice/cpp/src/Ice/ImplicitContextI.h +51 -0
- data/ext/ice/cpp/src/Ice/Incoming.cpp +757 -0
- data/ext/ice/cpp/src/Ice/IncomingAsync.cpp +340 -0
- data/ext/ice/cpp/src/Ice/IncomingRequest.h +37 -0
- data/ext/ice/cpp/src/Ice/Initialize.cpp +401 -0
- data/ext/ice/cpp/src/Ice/Instance.cpp +1928 -0
- data/ext/ice/cpp/src/Ice/Instance.h +198 -0
- data/ext/ice/cpp/src/Ice/Instrumentation.cpp +68 -0
- data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +43 -0
- data/ext/ice/cpp/src/Ice/InstrumentationI.cpp +1083 -0
- data/ext/ice/cpp/src/Ice/InstrumentationI.h +262 -0
- data/ext/ice/cpp/src/Ice/LocalException.cpp +2091 -0
- data/ext/ice/cpp/src/Ice/LocalObject.cpp +29 -0
- data/ext/ice/cpp/src/Ice/Locator.cpp +1946 -0
- data/ext/ice/cpp/src/Ice/LocatorF.cpp +39 -0
- data/ext/ice/cpp/src/Ice/LocatorInfo.cpp +917 -0
- data/ext/ice/cpp/src/Ice/LocatorInfo.h +193 -0
- data/ext/ice/cpp/src/Ice/LocatorInfoF.h +34 -0
- data/ext/ice/cpp/src/Ice/Logger.cpp +40 -0
- data/ext/ice/cpp/src/Ice/LoggerAdminI.cpp +862 -0
- data/ext/ice/cpp/src/Ice/LoggerAdminI.h +46 -0
- data/ext/ice/cpp/src/Ice/LoggerF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/LoggerI.cpp +199 -0
- data/ext/ice/cpp/src/Ice/LoggerI.h +57 -0
- data/ext/ice/cpp/src/Ice/LoggerUtil.cpp +107 -0
- data/ext/ice/cpp/src/Ice/Makefile +190 -0
- data/ext/ice/cpp/src/Ice/Metrics.cpp +2159 -0
- data/ext/ice/cpp/src/Ice/MetricsAdminI.cpp +669 -0
- data/ext/ice/cpp/src/Ice/MetricsObserverI.cpp +14 -0
- data/ext/ice/cpp/src/Ice/Network.cpp +2694 -0
- data/ext/ice/cpp/src/Ice/Network.h +291 -0
- data/ext/ice/cpp/src/Ice/NetworkF.h +28 -0
- data/ext/ice/cpp/src/Ice/NetworkProxy.cpp +325 -0
- data/ext/ice/cpp/src/Ice/NetworkProxy.h +74 -0
- data/ext/ice/cpp/src/Ice/NetworkProxyF.h +26 -0
- data/ext/ice/cpp/src/Ice/Object.cpp +440 -0
- data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +41 -0
- data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +241 -0
- data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.h +52 -0
- data/ext/ice/cpp/src/Ice/ObjectAdapterI.cpp +1498 -0
- data/ext/ice/cpp/src/Ice/ObjectAdapterI.h +155 -0
- data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +41 -0
- data/ext/ice/cpp/src/Ice/ObjectFactoryF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/ObjectFactoryManager.cpp +140 -0
- data/ext/ice/cpp/src/Ice/ObjectFactoryManager.h +43 -0
- data/ext/ice/cpp/src/Ice/ObserverHelper.cpp +84 -0
- data/ext/ice/cpp/src/Ice/OpaqueEndpointI.cpp +407 -0
- data/ext/ice/cpp/src/Ice/OpaqueEndpointI.h +70 -0
- data/ext/ice/cpp/src/Ice/Outgoing.cpp +737 -0
- data/ext/ice/cpp/src/Ice/OutgoingAsync.cpp +874 -0
- data/ext/ice/cpp/src/Ice/Plugin.cpp +43 -0
- data/ext/ice/cpp/src/Ice/PluginF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/PluginManagerI.cpp +503 -0
- data/ext/ice/cpp/src/Ice/PluginManagerI.h +67 -0
- data/ext/ice/cpp/src/Ice/Process.cpp +299 -0
- data/ext/ice/cpp/src/Ice/ProcessF.cpp +39 -0
- data/ext/ice/cpp/src/Ice/Properties.cpp +45 -0
- data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +555 -0
- data/ext/ice/cpp/src/Ice/PropertiesAdminI.cpp +207 -0
- data/ext/ice/cpp/src/Ice/PropertiesAdminI.h +45 -0
- data/ext/ice/cpp/src/Ice/PropertiesF.cpp +39 -0
- data/ext/ice/cpp/src/Ice/PropertiesI.cpp +759 -0
- data/ext/ice/cpp/src/Ice/PropertiesI.h +78 -0
- data/ext/ice/cpp/src/Ice/PropertyNames.cpp +1293 -0
- data/ext/ice/cpp/src/Ice/PropertyNames.h +81 -0
- data/ext/ice/cpp/src/Ice/Protocol.cpp +137 -0
- data/ext/ice/cpp/src/Ice/ProtocolInstance.cpp +98 -0
- data/ext/ice/cpp/src/Ice/ProtocolInstance.h +91 -0
- data/ext/ice/cpp/src/Ice/ProtocolInstanceF.h +26 -0
- data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +51 -0
- data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.h +67 -0
- data/ext/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +26 -0
- data/ext/ice/cpp/src/Ice/Proxy.cpp +1810 -0
- data/ext/ice/cpp/src/Ice/ProxyFactory.cpp +305 -0
- data/ext/ice/cpp/src/Ice/ProxyFactory.h +57 -0
- data/ext/ice/cpp/src/Ice/Reference.cpp +1947 -0
- data/ext/ice/cpp/src/Ice/Reference.h +305 -0
- data/ext/ice/cpp/src/Ice/ReferenceFactory.cpp +937 -0
- data/ext/ice/cpp/src/Ice/ReferenceFactory.h +81 -0
- data/ext/ice/cpp/src/Ice/ReferenceFactoryF.h +24 -0
- data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +958 -0
- data/ext/ice/cpp/src/Ice/ReplyStatus.h +29 -0
- data/ext/ice/cpp/src/Ice/RequestHandler.cpp +40 -0
- data/ext/ice/cpp/src/Ice/RequestHandler.h +90 -0
- data/ext/ice/cpp/src/Ice/RequestHandlerFactory.cpp +70 -0
- data/ext/ice/cpp/src/Ice/RequestHandlerFactory.h +41 -0
- data/ext/ice/cpp/src/Ice/ResponseHandler.cpp +20 -0
- data/ext/ice/cpp/src/Ice/ResponseHandler.h +39 -0
- data/ext/ice/cpp/src/Ice/RetryQueue.cpp +154 -0
- data/ext/ice/cpp/src/Ice/RetryQueue.h +69 -0
- data/ext/ice/cpp/src/Ice/RetryQueueF.h +24 -0
- data/ext/ice/cpp/src/Ice/Router.cpp +849 -0
- data/ext/ice/cpp/src/Ice/RouterF.cpp +39 -0
- data/ext/ice/cpp/src/Ice/RouterInfo.cpp +381 -0
- data/ext/ice/cpp/src/Ice/RouterInfo.h +148 -0
- data/ext/ice/cpp/src/Ice/RouterInfoF.h +30 -0
- data/ext/ice/cpp/src/Ice/Selector.cpp +926 -0
- data/ext/ice/cpp/src/Ice/Selector.h +231 -0
- data/ext/ice/cpp/src/Ice/ServantLocator.cpp +41 -0
- data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/ServantManager.cpp +495 -0
- data/ext/ice/cpp/src/Ice/ServantManager.h +74 -0
- data/ext/ice/cpp/src/Ice/Service.cpp +1897 -0
- data/ext/ice/cpp/src/Ice/SharedContext.h +51 -0
- data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +34 -0
- data/ext/ice/cpp/src/Ice/SliceChecksums.cpp +80 -0
- data/ext/ice/cpp/src/Ice/SlicedData.cpp +80 -0
- data/ext/ice/cpp/src/Ice/Stream.cpp +53 -0
- data/ext/ice/cpp/src/Ice/StreamI.cpp +832 -0
- data/ext/ice/cpp/src/Ice/StreamI.h +198 -0
- data/ext/ice/cpp/src/Ice/StreamSocket.cpp +521 -0
- data/ext/ice/cpp/src/Ice/StreamSocket.h +85 -0
- data/ext/ice/cpp/src/Ice/StringConverterPlugin.cpp +145 -0
- data/ext/ice/cpp/src/Ice/SysLoggerI.cpp +167 -0
- data/ext/ice/cpp/src/Ice/SysLoggerI.h +43 -0
- data/ext/ice/cpp/src/Ice/TcpAcceptor.cpp +235 -0
- data/ext/ice/cpp/src/Ice/TcpAcceptor.h +67 -0
- data/ext/ice/cpp/src/Ice/TcpConnector.cpp +133 -0
- data/ext/ice/cpp/src/Ice/TcpConnector.h +51 -0
- data/ext/ice/cpp/src/Ice/TcpEndpointI.cpp +397 -0
- data/ext/ice/cpp/src/Ice/TcpEndpointI.h +93 -0
- data/ext/ice/cpp/src/Ice/TcpTransceiver.cpp +127 -0
- data/ext/ice/cpp/src/Ice/TcpTransceiver.h +61 -0
- data/ext/ice/cpp/src/Ice/ThreadPool.cpp +1357 -0
- data/ext/ice/cpp/src/Ice/ThreadPool.h +399 -0
- data/ext/ice/cpp/src/Ice/TraceLevels.cpp +43 -0
- data/ext/ice/cpp/src/Ice/TraceLevels.h +50 -0
- data/ext/ice/cpp/src/Ice/TraceLevelsF.h +26 -0
- data/ext/ice/cpp/src/Ice/TraceUtil.cpp +452 -0
- data/ext/ice/cpp/src/Ice/TraceUtil.h +28 -0
- data/ext/ice/cpp/src/Ice/Transceiver.cpp +24 -0
- data/ext/ice/cpp/src/Ice/Transceiver.h +52 -0
- data/ext/ice/cpp/src/Ice/TransceiverF.h +38 -0
- data/ext/ice/cpp/src/Ice/UdpConnector.cpp +144 -0
- data/ext/ice/cpp/src/Ice/UdpConnector.h +51 -0
- data/ext/ice/cpp/src/Ice/UdpEndpointI.cpp +483 -0
- data/ext/ice/cpp/src/Ice/UdpEndpointI.h +95 -0
- data/ext/ice/cpp/src/Ice/UdpTransceiver.cpp +1156 -0
- data/ext/ice/cpp/src/Ice/UdpTransceiver.h +123 -0
- data/ext/ice/cpp/src/Ice/Version.cpp +46 -0
- data/ext/ice/cpp/src/Ice/WSAcceptor.cpp +103 -0
- data/ext/ice/cpp/src/Ice/WSAcceptor.h +61 -0
- data/ext/ice/cpp/src/Ice/WSConnector.cpp +113 -0
- data/ext/ice/cpp/src/Ice/WSConnector.h +51 -0
- data/ext/ice/cpp/src/Ice/WSEndpoint.cpp +441 -0
- data/ext/ice/cpp/src/Ice/WSEndpoint.h +97 -0
- data/ext/ice/cpp/src/Ice/WSTransceiver.cpp +1728 -0
- data/ext/ice/cpp/src/Ice/WSTransceiver.h +149 -0
- data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +594 -0
- data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +1035 -0
- data/ext/ice/cpp/src/IceDiscovery/LocatorI.cpp +208 -0
- data/ext/ice/cpp/src/IceDiscovery/LocatorI.h +78 -0
- data/ext/ice/cpp/src/IceDiscovery/LookupI.cpp +308 -0
- data/ext/ice/cpp/src/IceDiscovery/LookupI.h +183 -0
- data/ext/ice/cpp/src/IceDiscovery/Makefile +61 -0
- data/ext/ice/cpp/src/IceDiscovery/PluginI.cpp +148 -0
- data/ext/ice/cpp/src/IceDiscovery/PluginI.h +39 -0
- data/ext/ice/cpp/src/IceSSL/AcceptorI.cpp +258 -0
- data/ext/ice/cpp/src/IceSSL/AcceptorI.h +66 -0
- data/ext/ice/cpp/src/IceSSL/Certificate.cpp +1334 -0
- data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +42 -0
- data/ext/ice/cpp/src/IceSSL/ConnectorI.cpp +151 -0
- data/ext/ice/cpp/src/IceSSL/ConnectorI.h +56 -0
- data/ext/ice/cpp/src/IceSSL/EndpointI.cpp +397 -0
- data/ext/ice/cpp/src/IceSSL/EndpointI.h +96 -0
- data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +41 -0
- data/ext/ice/cpp/src/IceSSL/Instance.cpp +38 -0
- data/ext/ice/cpp/src/IceSSL/Instance.h +42 -0
- data/ext/ice/cpp/src/IceSSL/InstanceF.h +34 -0
- data/ext/ice/cpp/src/IceSSL/Makefile +82 -0
- data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +1001 -0
- data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +607 -0
- data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +75 -0
- data/ext/ice/cpp/src/IceSSL/PluginI.cpp +102 -0
- data/ext/ice/cpp/src/IceSSL/PluginI.h +56 -0
- data/ext/ice/cpp/src/IceSSL/RFC2253.cpp +541 -0
- data/ext/ice/cpp/src/IceSSL/RFC2253.h +67 -0
- data/ext/ice/cpp/src/IceSSL/SChannelEngine.cpp +729 -0
- data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +1062 -0
- data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.h +130 -0
- data/ext/ice/cpp/src/IceSSL/SSLEngine.cpp +291 -0
- data/ext/ice/cpp/src/IceSSL/SSLEngine.h +264 -0
- data/ext/ice/cpp/src/IceSSL/SSLEngineF.h +41 -0
- data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +1514 -0
- data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +609 -0
- data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +91 -0
- data/ext/ice/cpp/src/IceSSL/TrustManager.cpp +246 -0
- data/ext/ice/cpp/src/IceSSL/TrustManager.h +51 -0
- data/ext/ice/cpp/src/IceSSL/TrustManagerF.h +26 -0
- data/ext/ice/cpp/src/IceSSL/Util.cpp +1423 -0
- data/ext/ice/cpp/src/IceSSL/Util.h +136 -0
- data/ext/ice/cpp/src/IceUtil/ArgVector.cpp +65 -0
- data/ext/ice/cpp/src/IceUtil/ArgVector.h +41 -0
- data/ext/ice/cpp/src/IceUtil/Cond.cpp +386 -0
- data/ext/ice/cpp/src/IceUtil/ConvertUTF.cpp +477 -0
- data/ext/ice/cpp/src/IceUtil/ConvertUTF.h +144 -0
- data/ext/ice/cpp/src/IceUtil/CountDownLatch.cpp +184 -0
- data/ext/ice/cpp/src/IceUtil/CtrlCHandler.cpp +273 -0
- data/ext/ice/cpp/src/IceUtil/Exception.cpp +782 -0
- data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +532 -0
- data/ext/ice/cpp/src/IceUtil/FileUtil.h +159 -0
- data/ext/ice/cpp/src/IceUtil/InputUtil.cpp +41 -0
- data/ext/ice/cpp/src/IceUtil/Makefile +68 -0
- data/ext/ice/cpp/src/IceUtil/MutexProtocol.cpp +24 -0
- data/ext/ice/cpp/src/IceUtil/Options.cpp +1049 -0
- data/ext/ice/cpp/src/IceUtil/OutputUtil.cpp +591 -0
- data/ext/ice/cpp/src/IceUtil/Random.cpp +185 -0
- data/ext/ice/cpp/src/IceUtil/RecMutex.cpp +257 -0
- data/ext/ice/cpp/src/IceUtil/SHA1.cpp +126 -0
- data/ext/ice/cpp/src/IceUtil/Shared.cpp +200 -0
- data/ext/ice/cpp/src/IceUtil/StopWatch.h +54 -0
- data/ext/ice/cpp/src/IceUtil/StringConverter.cpp +450 -0
- data/ext/ice/cpp/src/IceUtil/StringUtil.cpp +842 -0
- data/ext/ice/cpp/src/IceUtil/Thread.cpp +809 -0
- data/ext/ice/cpp/src/IceUtil/ThreadException.cpp +172 -0
- data/ext/ice/cpp/src/IceUtil/Time.cpp +306 -0
- data/ext/ice/cpp/src/IceUtil/Timer.cpp +251 -0
- data/ext/ice/cpp/src/IceUtil/UUID.cpp +174 -0
- data/ext/ice/cpp/src/IceUtil/Unicode.cpp +131 -0
- data/ext/ice/cpp/src/IceUtil/Unicode.h +49 -0
- data/ext/ice/cpp/src/Slice/CPlusPlusUtil.cpp +1139 -0
- data/ext/ice/cpp/src/Slice/Checksum.cpp +452 -0
- data/ext/ice/cpp/src/Slice/CsUtil.cpp +2650 -0
- data/ext/ice/cpp/src/Slice/DotNetNames.cpp +146 -0
- data/ext/ice/cpp/src/Slice/FileTracker.cpp +203 -0
- data/ext/ice/cpp/src/Slice/Grammar.cpp +4755 -0
- data/ext/ice/cpp/src/Slice/Grammar.h +98 -0
- data/ext/ice/cpp/src/Slice/GrammarUtil.h +234 -0
- data/ext/ice/cpp/src/Slice/JavaUtil.cpp +4376 -0
- data/ext/ice/cpp/src/Slice/MD5.cpp +57 -0
- data/ext/ice/cpp/src/Slice/MD5.h +44 -0
- data/ext/ice/cpp/src/Slice/MD5I.cpp +385 -0
- data/ext/ice/cpp/src/Slice/MD5I.h +91 -0
- data/ext/ice/cpp/src/Slice/Makefile +65 -0
- data/ext/ice/cpp/src/Slice/PHPUtil.cpp +156 -0
- data/ext/ice/cpp/src/Slice/Parser.cpp +6386 -0
- data/ext/ice/cpp/src/Slice/Preprocessor.cpp +686 -0
- data/ext/ice/cpp/src/Slice/Python.cpp +675 -0
- data/ext/ice/cpp/src/Slice/PythonUtil.cpp +2614 -0
- data/ext/ice/cpp/src/Slice/Ruby.cpp +317 -0
- data/ext/ice/cpp/src/Slice/RubyUtil.cpp +1774 -0
- data/ext/ice/cpp/src/Slice/Scanner.cpp +2426 -0
- data/ext/ice/cpp/src/Slice/Util.cpp +325 -0
- data/ext/ice/mcpp/config.h.Darwin +227 -0
- data/ext/ice/mcpp/config.h.Linux +227 -0
- data/ext/ice/mcpp/config.h.MINGW +7 -0
- data/ext/ice/mcpp/configed.H +382 -0
- data/ext/ice/mcpp/directive.c +1699 -0
- data/ext/ice/mcpp/eval.c +1673 -0
- data/ext/ice/mcpp/expand.c +2980 -0
- data/ext/ice/mcpp/internal.H +564 -0
- data/ext/ice/mcpp/main.c +1131 -0
- data/ext/ice/mcpp/mbchar.c +869 -0
- data/ext/ice/mcpp/mcpp_lib.h +31 -0
- data/ext/ice/mcpp/mcpp_out.h +13 -0
- data/ext/ice/mcpp/support.c +2811 -0
- data/ext/ice/mcpp/system.H +396 -0
- data/ext/ice/mcpp/system.c +4940 -0
- data/ice.gemspec +41 -0
- data/lib/Glacier2.rb +12 -0
- data/lib/Glacier2/Metrics.rb +99 -0
- data/lib/Glacier2/PermissionsVerifier.rb +168 -0
- data/lib/Glacier2/PermissionsVerifierF.rb +34 -0
- data/lib/Glacier2/Router.rb +141 -0
- data/lib/Glacier2/RouterF.rb +29 -0
- data/lib/Glacier2/SSLInfo.rb +79 -0
- data/lib/Glacier2/Session.rb +470 -0
- data/lib/Ice.rb +659 -0
- data/lib/Ice/BuiltinSequences.rb +64 -0
- data/lib/Ice/Communicator.rb +93 -0
- data/lib/Ice/CommunicatorF.rb +28 -0
- data/lib/Ice/Connection.rb +414 -0
- data/lib/Ice/ConnectionF.rb +36 -0
- data/lib/Ice/Current.rb +152 -0
- data/lib/Ice/Endpoint.rb +265 -0
- data/lib/Ice/EndpointF.rb +52 -0
- data/lib/Ice/EndpointTypes.rb +77 -0
- data/lib/Ice/FacetMap.rb +28 -0
- data/lib/Ice/Identity.rb +70 -0
- data/lib/Ice/ImplicitContext.rb +59 -0
- data/lib/Ice/ImplicitContextF.rb +28 -0
- data/lib/Ice/Instrumentation.rb +425 -0
- data/lib/Ice/InstrumentationF.rb +35 -0
- data/lib/Ice/LocalException.rb +1081 -0
- data/lib/Ice/Locator.rb +314 -0
- data/lib/Ice/LocatorF.rb +34 -0
- data/lib/Ice/Logger.rb +57 -0
- data/lib/Ice/LoggerF.rb +28 -0
- data/lib/Ice/Metrics.rb +696 -0
- data/lib/Ice/ObjectAdapterF.rb +28 -0
- data/lib/Ice/ObjectFactory.rb +53 -0
- data/lib/Ice/ObjectFactoryF.rb +28 -0
- data/lib/Ice/Plugin.rb +87 -0
- data/lib/Ice/PluginF.rb +32 -0
- data/lib/Ice/Process.rb +93 -0
- data/lib/Ice/ProcessF.rb +29 -0
- data/lib/Ice/Properties.rb +65 -0
- data/lib/Ice/PropertiesAdmin.rb +104 -0
- data/lib/Ice/PropertiesF.rb +33 -0
- data/lib/Ice/Router.rb +163 -0
- data/lib/Ice/RouterF.rb +29 -0
- data/lib/Ice/SliceChecksumDict.rb +28 -0
- data/lib/Ice/Version.rb +100 -0
- data/lib/IceBox.rb +10 -0
- data/lib/IceBox/IceBox.rb +272 -0
- data/lib/IceGrid.rb +17 -0
- data/lib/IceGrid/Admin.rb +1076 -0
- data/lib/IceGrid/Descriptor.rb +1505 -0
- data/lib/IceGrid/Exception.rb +401 -0
- data/lib/IceGrid/FileParser.rb +105 -0
- data/lib/IceGrid/Locator.rb +105 -0
- data/lib/IceGrid/Observer.rb +571 -0
- data/lib/IceGrid/Query.rb +168 -0
- data/lib/IceGrid/Registry.rb +120 -0
- data/lib/IceGrid/Session.rb +114 -0
- data/lib/IceGrid/UserAccountMapper.rb +101 -0
- data/lib/IcePatch2.rb +10 -0
- data/lib/IcePatch2/FileInfo.rb +75 -0
- data/lib/IcePatch2/FileServer.rb +141 -0
- data/lib/IceStorm.rb +11 -0
- data/lib/IceStorm/IceStorm.rb +463 -0
- data/lib/IceStorm/Metrics.rb +155 -0
- data/slice/Freeze/BackgroundSaveEvictor.ice +111 -0
- data/slice/Freeze/CatalogData.ice +49 -0
- data/slice/Freeze/Connection.ice +111 -0
- data/slice/Freeze/ConnectionF.ice +20 -0
- data/slice/Freeze/DB.ice +37 -0
- data/slice/Freeze/Evictor.ice +339 -0
- data/slice/Freeze/EvictorF.ice +22 -0
- data/slice/Freeze/EvictorStorage.ice +72 -0
- data/slice/Freeze/Exception.ice +100 -0
- data/slice/Freeze/Transaction.ice +57 -0
- data/slice/Freeze/TransactionalEvictor.ice +50 -0
- data/slice/Glacier2/Metrics.ice +77 -0
- data/slice/Glacier2/PermissionsVerifier.ice +105 -0
- data/slice/Glacier2/PermissionsVerifierF.ice +21 -0
- data/slice/Glacier2/Router.ice +178 -0
- data/slice/Glacier2/RouterF.ice +20 -0
- data/slice/Glacier2/SSLInfo.ice +50 -0
- data/slice/Glacier2/Session.ice +273 -0
- data/slice/Ice/BuiltinSequences.ice +48 -0
- data/slice/Ice/Communicator.ice +567 -0
- data/slice/Ice/CommunicatorF.ice +20 -0
- data/slice/Ice/Connection.ice +323 -0
- data/slice/Ice/ConnectionF.ice +22 -0
- data/slice/Ice/Current.ice +160 -0
- data/slice/Ice/Endpoint.ice +227 -0
- data/slice/Ice/EndpointF.ice +32 -0
- data/slice/Ice/EndpointTypes.ice +38 -0
- data/slice/Ice/FacetMap.ice +25 -0
- data/slice/Ice/Identity.ice +59 -0
- data/slice/Ice/ImplicitContext.ice +109 -0
- data/slice/Ice/ImplicitContextF.ice +20 -0
- data/slice/Ice/Instrumentation.ice +499 -0
- data/slice/Ice/InstrumentationF.ice +26 -0
- data/slice/Ice/LocalException.ice +1015 -0
- data/slice/Ice/Locator.ice +227 -0
- data/slice/Ice/LocatorF.ice +21 -0
- data/slice/Ice/Logger.ice +86 -0
- data/slice/Ice/LoggerF.ice +20 -0
- data/slice/Ice/Metrics.ice +422 -0
- data/slice/Ice/ObjectAdapter.ice +673 -0
- data/slice/Ice/ObjectAdapterF.ice +20 -0
- data/slice/Ice/ObjectFactory.ice +60 -0
- data/slice/Ice/ObjectFactoryF.ice +20 -0
- data/slice/Ice/Plugin.ice +117 -0
- data/slice/Ice/PluginF.ice +21 -0
- data/slice/Ice/Process.ice +54 -0
- data/slice/Ice/ProcessF.ice +20 -0
- data/slice/Ice/Properties.ice +228 -0
- data/slice/Ice/PropertiesAdmin.ice +75 -0
- data/slice/Ice/PropertiesF.ice +21 -0
- data/slice/Ice/RemoteLogger.ice +232 -0
- data/slice/Ice/Router.ice +83 -0
- data/slice/Ice/RouterF.ice +20 -0
- data/slice/Ice/ServantLocator.ice +117 -0
- data/slice/Ice/ServantLocatorF.ice +20 -0
- data/slice/Ice/SliceChecksumDict.ice +25 -0
- data/slice/Ice/Version.ice +39 -0
- data/slice/IceBox/IceBox.ice +194 -0
- data/slice/IceDiscovery/IceDiscovery.ice +32 -0
- data/slice/IceGrid/Admin.ice +1578 -0
- data/slice/IceGrid/Descriptor.ice +1079 -0
- data/slice/IceGrid/Discovery.ice +73 -0
- data/slice/IceGrid/Exception.ice +383 -0
- data/slice/IceGrid/FileParser.ice +61 -0
- data/slice/IceGrid/Locator.ice +56 -0
- data/slice/IceGrid/Observer.ice +394 -0
- data/slice/IceGrid/PluginFacade.ice +316 -0
- data/slice/IceGrid/Query.ice +130 -0
- data/slice/IceGrid/Registry.ice +138 -0
- data/slice/IceGrid/Session.ice +124 -0
- data/slice/IceGrid/UserAccountMapper.ice +58 -0
- data/slice/IcePatch2/FileInfo.ice +49 -0
- data/slice/IcePatch2/FileServer.ice +129 -0
- data/slice/IceSSL/ConnectionInfo.ice +34 -0
- data/slice/IceSSL/EndpointInfo.ice +41 -0
- data/slice/IceStorm/IceStorm.ice +405 -0
- data/slice/IceStorm/Metrics.ice +71 -0
- metadata +737 -0
data/ext/ice/mcpp/main.c
ADDED
@@ -0,0 +1,1131 @@
|
|
1
|
+
/*-
|
2
|
+
* Copyright (c) 1998, 2002-2008 Kiyoshi Matsui <kmatsui@t3.rim.or.jp>
|
3
|
+
* All rights reserved.
|
4
|
+
*
|
5
|
+
* Some parts of this code are derived from the public domain software
|
6
|
+
* DECUS cpp (1984,1985) written by Martin Minow.
|
7
|
+
*
|
8
|
+
* Redistribution and use in source and binary forms, with or without
|
9
|
+
* modification, are permitted provided that the following conditions
|
10
|
+
* are met:
|
11
|
+
* 1. Redistributions of source code must retain the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer.
|
13
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
14
|
+
* notice, this list of conditions and the following disclaimer in the
|
15
|
+
* documentation and/or other materials provided with the distribution.
|
16
|
+
*
|
17
|
+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
|
18
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
19
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
20
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
|
21
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
22
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
23
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
24
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
25
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
26
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
27
|
+
* SUCH DAMAGE.
|
28
|
+
*/
|
29
|
+
|
30
|
+
/*
|
31
|
+
* M A I N . C
|
32
|
+
* M C P P M a i n P r o g r a m
|
33
|
+
*
|
34
|
+
* The main routine and it's supplementary routines are placed here.
|
35
|
+
* The post-preprocessing routines are also placed here.
|
36
|
+
*/
|
37
|
+
|
38
|
+
#if PREPROCESSED /* Use "pre-preprocessed" header */
|
39
|
+
#include "mcpp.H"
|
40
|
+
#else
|
41
|
+
#include "system.H"
|
42
|
+
#include "internal.H"
|
43
|
+
#endif
|
44
|
+
|
45
|
+
/* Function pointer to expand_macro() functions. */
|
46
|
+
char * (*expand_macro)( DEFBUF * defp, char * out, char * out_end
|
47
|
+
, LINE_COL line_col, int * pragma_op);
|
48
|
+
|
49
|
+
/* The boolean flags specified by the execution options. */
|
50
|
+
struct option_flags_ option_flags = {
|
51
|
+
FALSE, /* c: -C (keep comments) */
|
52
|
+
FALSE, /* k: -k (keep horizontal white spaces) */
|
53
|
+
FALSE, /* z: -z (no output of included files) */
|
54
|
+
FALSE, /* p: -P (no #line output) */
|
55
|
+
FALSE, /* q: -Q (output diagnosis to mcpp.err) */
|
56
|
+
FALSE, /* v: -v (verbose, affects macro notification) */
|
57
|
+
TRIGRAPHS_INIT, /* trig: -3 (toggle trigraphs) */
|
58
|
+
DIGRAPHS_INIT, /* dig: -2 (toggle digraphs recognition) */
|
59
|
+
/*
|
60
|
+
* lang_asm allows the following non-standard features.
|
61
|
+
* 1. #non-directive.
|
62
|
+
* 2. <newline> in a string-literal.
|
63
|
+
* 3. invalid pp-token generated by ## operator.
|
64
|
+
* lang_asm is not available in POST_STD mode.
|
65
|
+
* When COMPILER == GNUC, -x assembler-with-cpp or -lang-asm options
|
66
|
+
* are used instead of -a.
|
67
|
+
*/
|
68
|
+
FALSE, /* lang_asm: -a (assembler source) */
|
69
|
+
FALSE /* no_source_line: -j (no source line in diag) */
|
70
|
+
};
|
71
|
+
|
72
|
+
int mcpp_mode = STD; /* Mode of preprocessing */
|
73
|
+
|
74
|
+
long cplus_val = 0L; /* Value of __cplusplus for C++ */
|
75
|
+
long stdc_ver = 0L; /* Value of __STDC_VERSION__ */
|
76
|
+
int stdc_val = 0; /* Value of __STDC__ */
|
77
|
+
int stdc2; /* cplus_val || stdc_ver >= 199901L */
|
78
|
+
int stdc3; /* cplus_val >= 199901L || stdc_ver >= 199901L.
|
79
|
+
(cplus_val >= 199901L) specifies compatible mode to C99 (extended
|
80
|
+
feature of this preprocessor) */
|
81
|
+
int standard = TRUE; /* TRUE, if mcpp_mode is STD or POST_STD */
|
82
|
+
int std_line_prefix = STD_LINE_PREFIX;
|
83
|
+
/* Output line and file information in C source style */
|
84
|
+
|
85
|
+
/*
|
86
|
+
* Commonly used global variables:
|
87
|
+
* src_line is the current input line number.
|
88
|
+
* wrong_line is set in many places when the actual output line is out of
|
89
|
+
* sync with the numbering, e.g, when expanding a macro with an
|
90
|
+
* embedded newline.
|
91
|
+
* identifier holds the last identifier scanned (which might be a candidate
|
92
|
+
* for macro expansion).
|
93
|
+
* errors is the running mcpp error counter.
|
94
|
+
* infile is the head of a linked list of input files (extended by
|
95
|
+
* #include and macros being expanded). 'infile' always points
|
96
|
+
* to the current file/macro. 'infile->parent' to the includer,
|
97
|
+
* etc. 'infile->fp' is NULL if this input stream is not a file.
|
98
|
+
* inc_dirp Directory of #includer with trailing PATH_DELIM. This points
|
99
|
+
* to one of incdir[] or to the current directory (represented as
|
100
|
+
* "". This should not be NULL.
|
101
|
+
*/
|
102
|
+
long src_line; /* Current line number */
|
103
|
+
int wrong_line; /* Force #line to compiler */
|
104
|
+
int newlines; /* Count of blank lines */
|
105
|
+
int errors = 0; /* Cpp error counter */
|
106
|
+
int warn_level = -1; /* Level of warning (have to initialize)*/
|
107
|
+
FILEINFO * infile = NULL; /* Current input file */
|
108
|
+
int include_nest = 0; /* Nesting level of #include */
|
109
|
+
const char * null = ""; /* "" string for convenience */
|
110
|
+
const char ** inc_dirp; /* Directory of #includer */
|
111
|
+
const char * cur_fname; /* Current source file name */
|
112
|
+
/* cur_fname is not rewritten by #line directive */
|
113
|
+
char * cur_fullname;
|
114
|
+
/* Full path of current source file (i.e. infile->full_fname) */
|
115
|
+
int no_source_line; /* Do not output line in diag. */
|
116
|
+
char identifier[ IDMAX + IDMAX/8]; /* Current identifier */
|
117
|
+
int mcpp_debug = 0; /* != 0 if debugging now */
|
118
|
+
|
119
|
+
/*
|
120
|
+
* in_directive is set TRUE while a directive line is scanned by directive().
|
121
|
+
* It modifies the behavior of squeeze_ws() in expand.c so that newline is
|
122
|
+
* not skipped even if getting macro arguments.
|
123
|
+
*/
|
124
|
+
int in_directive = FALSE; /* TRUE scanning directive line */
|
125
|
+
int in_define = FALSE; /* TRUE scanning #define line */
|
126
|
+
int in_getarg = FALSE; /* TRUE collecting macro arguments */
|
127
|
+
int in_include = FALSE; /* TRUE scanning #include line */
|
128
|
+
int in_if = FALSE; /* TRUE scanning #if and in non-skipped expr. */
|
129
|
+
long in_asm = 0L; /* Starting line of #asm - #endasm block*/
|
130
|
+
|
131
|
+
/*
|
132
|
+
* macro_line is set to the line number of start of a macro call while
|
133
|
+
* expanding the macro, else set to 0. Line number is remembered for
|
134
|
+
* diagnostics of unterminated macro call. On unterminated macro call
|
135
|
+
* macro_line is set to MACRO_ERROR.
|
136
|
+
*/
|
137
|
+
long macro_line = 0L;
|
138
|
+
/*
|
139
|
+
* macro_name is the currently expanding macro.
|
140
|
+
*/
|
141
|
+
char * macro_name;
|
142
|
+
|
143
|
+
/*
|
144
|
+
* openum is the return value of scan_op() in support.c.
|
145
|
+
*/
|
146
|
+
int openum;
|
147
|
+
|
148
|
+
/*
|
149
|
+
* mkdep means to output source file dependency line, specified by -M*
|
150
|
+
* option. The OR of the following values is used.
|
151
|
+
* MD_MKDEP (1) : Output dependency line.
|
152
|
+
* MD_SYSHEADER(2) : Print also system headers or headers with
|
153
|
+
* absolute path not only user headers.
|
154
|
+
* MD_FILE (4) : Output to the file named *.d instead of fp_out.
|
155
|
+
* Normal output is done to fp_out as usual.
|
156
|
+
*/
|
157
|
+
int mkdep = 0;
|
158
|
+
|
159
|
+
/*
|
160
|
+
* If option_flags.z is TRUE, no_output is incremented when a file is
|
161
|
+
* #included, and decremented when the file is finished.
|
162
|
+
* If no_output is larger than 0, processed files are not output, meanwhile
|
163
|
+
* the macros in the files are defined.
|
164
|
+
* If mkdep != 0 && (mkdep & MD_FILE) == 0, no_output is set to 1 initially.
|
165
|
+
*/
|
166
|
+
int no_output = 0;
|
167
|
+
|
168
|
+
/*
|
169
|
+
* keep_comments is set TRUE by the -C option. If TRUE, comments are written
|
170
|
+
* directly to the output stream. option_flags.c contains the permanent state
|
171
|
+
* of the -C option. keep_comments is always falsified when compilation is
|
172
|
+
* supressed by a false #if or when no_output is TRUE.
|
173
|
+
*/
|
174
|
+
int keep_comments = 0; /* Write out comments flag */
|
175
|
+
|
176
|
+
/*
|
177
|
+
* keep_spaces is set to TRUE by the -k option. If TRUE, spaces and tabs in
|
178
|
+
* an input line are written out to the output line without squeezing to one
|
179
|
+
* space. option_flags.k contains the permanent state of the -k option.
|
180
|
+
* keep_spaces is falsified when compilation is suppressed by a false #if.
|
181
|
+
*/
|
182
|
+
int keep_spaces = 0; /* Keep white spaces of line*/
|
183
|
+
|
184
|
+
/*
|
185
|
+
* ifstack[] holds information about nested #if's. It is always accessed via
|
186
|
+
* ifptr->stat. The information is as follows:
|
187
|
+
* WAS_COMPILING state of compiling flag at outer level.
|
188
|
+
* ELSE_SEEN set TRUE when #else seen to prevent 2nd #else.
|
189
|
+
* TRUE_SEEN set TRUE when #if or #elif succeeds
|
190
|
+
* ifstack[0].stat holds the compiling flag. It is WAS_COMPILING if compila-
|
191
|
+
* tion is currently enabled. Note that this must be initialized to
|
192
|
+
* WAS_COMPILING.
|
193
|
+
*/
|
194
|
+
IFINFO ifstack[ BLK_NEST + 1] = { {WAS_COMPILING, 0L, 0L}, };
|
195
|
+
/* Note: '+1' is necessary for the initial state. */
|
196
|
+
IFINFO * ifptr = ifstack; /* -> current ifstack[] */
|
197
|
+
|
198
|
+
/*
|
199
|
+
* In POST_STD mode, insert_sep is set to INSERT_SEP when :
|
200
|
+
* 1. the next get_ch() shall insert a token separator.
|
201
|
+
* 2. unget_ch() has been called when insert_sep == INSERTED_SEP.
|
202
|
+
* set to INSERTED_SEP when :
|
203
|
+
* get_ch() has been called when insert_sep == INSERT_SEP.
|
204
|
+
* set to NO_SEP when :
|
205
|
+
* get_ch() has been called when insert_sep == INSERTED_SEP.
|
206
|
+
*/
|
207
|
+
int insert_sep = NO_SEP;
|
208
|
+
|
209
|
+
/* File pointers for input and output. */
|
210
|
+
FILE * fp_in; /* Input stream to preprocess */
|
211
|
+
FILE * fp_out; /* Output stream preprocessed */
|
212
|
+
FILE * fp_err; /* Diagnostics stream */
|
213
|
+
FILE * fp_debug; /* Debugging information stream */
|
214
|
+
|
215
|
+
/* Variables on multi-byte character encodings. */
|
216
|
+
int mbchar = MBCHAR; /* Encoding of multi-byte char */
|
217
|
+
int mbchk; /* Character type of possible multi-byte char */
|
218
|
+
int bsl_in_mbchar; /* 2nd byte of mbchar possibly has '\\' */
|
219
|
+
int bsl_need_escape; /* '\\' in MBCHAR should be escaped */
|
220
|
+
/* Function pointer to mb_read_*() functions. */
|
221
|
+
size_t (*mb_read)( int c1, char ** in_pp, char ** out_pp);
|
222
|
+
|
223
|
+
jmp_buf error_exit; /* Exit on fatal error */
|
224
|
+
|
225
|
+
/*
|
226
|
+
* Translation limits specified by C90, C99 or C++.
|
227
|
+
*/
|
228
|
+
struct std_limits_ std_limits = {
|
229
|
+
/* The following three are temporarily set for do_options() */
|
230
|
+
NBUFF, /* Least maximum of string length */
|
231
|
+
IDMAX, /* Least maximum of identifier length */
|
232
|
+
NMACPARS, /* Least maximum of number of macro params */
|
233
|
+
};
|
234
|
+
|
235
|
+
/*
|
236
|
+
* work_buf[] and workp are used to store one piece of text as a temporary
|
237
|
+
* buffer.
|
238
|
+
* To initialize storage, set workp = work_buf. Note that the work buffer is
|
239
|
+
* used by several subroutines -- be sure that your data won't be overwritten.
|
240
|
+
* work_buf[] is used for:
|
241
|
+
* 1. macro expansion (def_special(), prescan(), catenate(),
|
242
|
+
* stringize()).
|
243
|
+
* 2. processing directive line (directive.c, eval.c, get_unexpandable(),
|
244
|
+
* do_pragma() and its subroutines).
|
245
|
+
* 3. processing _Pragma() operator (do_pragma_op()).
|
246
|
+
* 4. miscellaneous (init_gcc_macro(), curfile()).
|
247
|
+
*/
|
248
|
+
char work_buf[ NWORK + IDMAX]; /* Work buffer */
|
249
|
+
char * workp; /* Pointer into work_buf[] */
|
250
|
+
char * const work_end = & work_buf[ NWORK];
|
251
|
+
/* End of buffer of work_buf[] */
|
252
|
+
|
253
|
+
/*
|
254
|
+
* src_col is the current input column number, but is rarely used.
|
255
|
+
* It is used to put spaces after #line line in keep_spaces mode
|
256
|
+
* on some special cases.
|
257
|
+
*/
|
258
|
+
static int src_col = 0; /* Column number of source line */
|
259
|
+
|
260
|
+
#define MBCHAR_IS_ESCAPE_FREE (SJIS_IS_ESCAPE_FREE && \
|
261
|
+
BIGFIVE_IS_ESCAPE_FREE && ISO2022_JP_IS_ESCAPE_FREE)
|
262
|
+
|
263
|
+
#if MCPP_LIB
|
264
|
+
static void init_main( void);
|
265
|
+
/* Initialize static variables */
|
266
|
+
#endif
|
267
|
+
static void init_defines( void);
|
268
|
+
/* Predefine macros */
|
269
|
+
static void mcpp_main( void);
|
270
|
+
/* Main loop to process input lines */
|
271
|
+
static void do_pragma_op( void);
|
272
|
+
/* Execute the _Pragma() operator */
|
273
|
+
static void put_seq( char * begin, char * seq);
|
274
|
+
/* Put out the failed sequence */
|
275
|
+
static char * de_stringize( char * in, char * out);
|
276
|
+
/* "De-stringize" for _Pragma() op. */
|
277
|
+
static void putout( char * out);
|
278
|
+
/* May concatenate adjacent string */
|
279
|
+
#if COMPILER != GNUC && COMPILER != MSC
|
280
|
+
static void devide_line( char * out);
|
281
|
+
/* Devide long line for compiler */
|
282
|
+
#endif
|
283
|
+
static void put_a_line( char * out);
|
284
|
+
/* Put out the processed line */
|
285
|
+
#if ! HAVE_DIGRAPHS || ! MBCHAR_IS_ESCAPE_FREE
|
286
|
+
static int post_preproc( char * out);
|
287
|
+
/* Post-preprocess for older comps */
|
288
|
+
#if ! HAVE_DIGRAPHS
|
289
|
+
static char * conv_a_digraph( char * cp);
|
290
|
+
/* Convert a digraph in place */
|
291
|
+
#endif
|
292
|
+
#if ! MBCHAR_IS_ESCAPE_FREE
|
293
|
+
static char * esc_mbchar( char * str, char * str_end);
|
294
|
+
/* Double \ as 2nd byte of SJIS */
|
295
|
+
#endif
|
296
|
+
#endif
|
297
|
+
|
298
|
+
|
299
|
+
#if MCPP_LIB
|
300
|
+
static void init_main( void)
|
301
|
+
/* Initialize global variables on re-entering. */
|
302
|
+
{
|
303
|
+
mcpp_mode = STD;
|
304
|
+
cplus_val = stdc_ver = 0L;
|
305
|
+
stdc_val = 0;
|
306
|
+
standard = TRUE;
|
307
|
+
std_line_prefix = STD_LINE_PREFIX;
|
308
|
+
errors = src_col = 0;
|
309
|
+
warn_level = -1;
|
310
|
+
infile = NULL;
|
311
|
+
in_directive = in_define = in_getarg = in_include = in_if = FALSE;
|
312
|
+
src_line = macro_line = in_asm = 0L;
|
313
|
+
mcpp_debug = mkdep = no_output = keep_comments = keep_spaces = 0;
|
314
|
+
include_nest = 0;
|
315
|
+
insert_sep = NO_SEP;
|
316
|
+
mbchar = MBCHAR;
|
317
|
+
ifptr = ifstack;
|
318
|
+
ifstack[0].stat = WAS_COMPILING;
|
319
|
+
ifstack[0].ifline = ifstack[0].elseline = 0L;
|
320
|
+
std_limits.str_len = NBUFF;
|
321
|
+
std_limits.id_len = IDMAX;
|
322
|
+
std_limits.n_mac_pars = NMACPARS;
|
323
|
+
option_flags.c = option_flags.k = option_flags.z = option_flags.p
|
324
|
+
= option_flags.q = option_flags.v = option_flags.lang_asm
|
325
|
+
= option_flags.no_source_line = option_flags.dollar_in_name
|
326
|
+
= FALSE;
|
327
|
+
option_flags.trig = TRIGRAPHS_INIT;
|
328
|
+
option_flags.dig = DIGRAPHS_INIT;
|
329
|
+
sh_file = NULL;
|
330
|
+
sh_line = 0;
|
331
|
+
}
|
332
|
+
|
333
|
+
int mcpp_lib_main
|
334
|
+
#else
|
335
|
+
int main
|
336
|
+
#endif
|
337
|
+
(
|
338
|
+
int argc,
|
339
|
+
char ** argv
|
340
|
+
)
|
341
|
+
{
|
342
|
+
char * in_file = NULL;
|
343
|
+
char * out_file = NULL;
|
344
|
+
char * stdin_name = "<stdin>";
|
345
|
+
|
346
|
+
if (setjmp( error_exit) == -1) {
|
347
|
+
errors++;
|
348
|
+
goto fatal_error_exit;
|
349
|
+
}
|
350
|
+
|
351
|
+
#if MCPP_LIB
|
352
|
+
/* Initialize global and static variables. */
|
353
|
+
init_main();
|
354
|
+
init_directive();
|
355
|
+
init_eval();
|
356
|
+
init_support();
|
357
|
+
init_system();
|
358
|
+
#endif
|
359
|
+
|
360
|
+
fp_in = stdin;
|
361
|
+
fp_out = stdout;
|
362
|
+
fp_err = stderr;
|
363
|
+
fp_debug = stdout;
|
364
|
+
/*
|
365
|
+
* Debugging information is output to stdout in order to
|
366
|
+
* synchronize with preprocessed output.
|
367
|
+
*/
|
368
|
+
|
369
|
+
inc_dirp = &null; /* Initialize to current (null) directory */
|
370
|
+
cur_fname = cur_fullname = "(predefined)"; /* For predefined macros */
|
371
|
+
init_defines(); /* Predefine macros */
|
372
|
+
mb_init(); /* Should be initialized prior to get options */
|
373
|
+
do_options( argc, argv, &in_file, &out_file); /* Command line options */
|
374
|
+
|
375
|
+
/* Open input file, "-" means stdin. */
|
376
|
+
if (in_file != NULL && ! str_eq( in_file, "-")) {
|
377
|
+
if ((fp_in = fopen( in_file, "r")) == NULL) {
|
378
|
+
mcpp_fprintf( ERR, "Can't open input file \"%s\".\n", in_file);
|
379
|
+
errors++;
|
380
|
+
#if MCPP_LIB
|
381
|
+
goto fatal_error_exit;
|
382
|
+
#else
|
383
|
+
return( IO_ERROR);
|
384
|
+
#endif
|
385
|
+
}
|
386
|
+
} else {
|
387
|
+
in_file = stdin_name;
|
388
|
+
}
|
389
|
+
/* Open output file, "-" means stdout. */
|
390
|
+
if (out_file != NULL && ! str_eq( out_file, "-")) {
|
391
|
+
if ((fp_out = fopen( out_file, "w")) == NULL) {
|
392
|
+
mcpp_fprintf( ERR, "Can't open output file \"%s\".\n", out_file);
|
393
|
+
errors++;
|
394
|
+
#if MCPP_LIB
|
395
|
+
goto fatal_error_exit;
|
396
|
+
#else
|
397
|
+
return( IO_ERROR);
|
398
|
+
#endif
|
399
|
+
}
|
400
|
+
fp_debug = fp_out;
|
401
|
+
}
|
402
|
+
if (option_flags.q) { /* Redirect diagnostics */
|
403
|
+
if ((fp_err = fopen( "mcpp.err", "a")) == NULL) {
|
404
|
+
errors++;
|
405
|
+
mcpp_fprintf( OUT, "Can't open \"mcpp.err\"\n");
|
406
|
+
#if MCPP_LIB
|
407
|
+
goto fatal_error_exit;
|
408
|
+
#else
|
409
|
+
return( IO_ERROR);
|
410
|
+
#endif
|
411
|
+
}
|
412
|
+
}
|
413
|
+
init_sys_macro(); /* Initialize system-specific macros */
|
414
|
+
add_file( fp_in, NULL, in_file, in_file, FALSE);
|
415
|
+
/* "open" main input file */
|
416
|
+
infile->dirp = inc_dirp;
|
417
|
+
infile->sys_header = FALSE;
|
418
|
+
cur_fullname = in_file;
|
419
|
+
if (mkdep && str_eq( infile->real_fname, stdin_name) == FALSE)
|
420
|
+
put_depend( in_file); /* Putout target file name */
|
421
|
+
at_start(); /* Do the pre-main commands */
|
422
|
+
|
423
|
+
mcpp_main(); /* Process main file */
|
424
|
+
|
425
|
+
if (mkdep)
|
426
|
+
put_depend( NULL); /* Append '\n' to dependency line */
|
427
|
+
at_end(); /* Do the final commands */
|
428
|
+
|
429
|
+
fatal_error_exit:
|
430
|
+
#if MCPP_LIB
|
431
|
+
/* Free malloced memory */
|
432
|
+
if (mcpp_debug & MACRO_CALL) {
|
433
|
+
if (in_file != stdin_name)
|
434
|
+
free( in_file);
|
435
|
+
}
|
436
|
+
clear_filelist();
|
437
|
+
clear_symtable();
|
438
|
+
#endif
|
439
|
+
|
440
|
+
if (fp_in != stdin)
|
441
|
+
fclose( fp_in);
|
442
|
+
if (fp_out != stdout)
|
443
|
+
fclose( fp_out);
|
444
|
+
if (fp_err != stderr)
|
445
|
+
fclose( fp_err);
|
446
|
+
|
447
|
+
if (mcpp_debug & MEMORY)
|
448
|
+
print_heap();
|
449
|
+
if (errors > 0 && option_flags.no_source_line == FALSE) {
|
450
|
+
mcpp_fprintf( ERR, "%d error%s in preprocessor.\n",
|
451
|
+
errors, (errors == 1) ? "" : "s");
|
452
|
+
return IO_ERROR;
|
453
|
+
}
|
454
|
+
return IO_SUCCESS; /* No errors */
|
455
|
+
}
|
456
|
+
|
457
|
+
/*
|
458
|
+
* This is the table used to predefine target machine, operating system and
|
459
|
+
* compiler designators. It may need hacking for specific circumstances.
|
460
|
+
* The -N option supresses these definitions.
|
461
|
+
*/
|
462
|
+
typedef struct pre_set {
|
463
|
+
const char * name;
|
464
|
+
const char * val;
|
465
|
+
} PRESET;
|
466
|
+
|
467
|
+
static PRESET preset[] = {
|
468
|
+
|
469
|
+
#ifdef SYSTEM_OLD
|
470
|
+
{ SYSTEM_OLD, "1"},
|
471
|
+
#endif
|
472
|
+
#ifdef SYSTEM_SP_OLD
|
473
|
+
{ SYSTEM_SP_OLD, "1"},
|
474
|
+
#endif
|
475
|
+
#ifdef COMPILER_OLD
|
476
|
+
{ COMPILER_OLD, "1"},
|
477
|
+
#endif
|
478
|
+
#ifdef COMPILER_SP_OLD
|
479
|
+
{ COMPILER_SP_OLD, "1"},
|
480
|
+
#endif
|
481
|
+
|
482
|
+
{ NULL, NULL}, /* End of macros beginning with alphabet */
|
483
|
+
|
484
|
+
#ifdef SYSTEM_STD
|
485
|
+
{ SYSTEM_STD, "1"},
|
486
|
+
#endif
|
487
|
+
#ifdef SYSTEM_STD1
|
488
|
+
{ SYSTEM_STD1, "1"},
|
489
|
+
#endif
|
490
|
+
#ifdef SYSTEM_STD2
|
491
|
+
{ SYSTEM_STD2, "1"},
|
492
|
+
#endif
|
493
|
+
|
494
|
+
#ifdef SYSTEM_EXT
|
495
|
+
{ SYSTEM_EXT, SYSTEM_EXT_VAL},
|
496
|
+
#endif
|
497
|
+
#ifdef SYSTEM_EXT2
|
498
|
+
{ SYSTEM_EXT2, SYSTEM_EXT2_VAL},
|
499
|
+
#endif
|
500
|
+
#ifdef SYSTEM_SP_STD
|
501
|
+
{ SYSTEM_SP_STD, SYSTEM_SP_STD_VAL},
|
502
|
+
#endif
|
503
|
+
#ifdef COMPILER_STD
|
504
|
+
{ COMPILER_STD, COMPILER_STD_VAL},
|
505
|
+
#endif
|
506
|
+
#ifdef COMPILER_STD1
|
507
|
+
{ COMPILER_STD1, COMPILER_STD1_VAL},
|
508
|
+
#endif
|
509
|
+
#ifdef COMPILER_STD2
|
510
|
+
{ COMPILER_STD2, COMPILER_STD2_VAL},
|
511
|
+
#endif
|
512
|
+
#ifdef COMPILER_EXT
|
513
|
+
{ COMPILER_EXT, COMPILER_EXT_VAL},
|
514
|
+
#endif
|
515
|
+
#ifdef COMPILER_EXT2
|
516
|
+
{ COMPILER_EXT2, COMPILER_EXT2_VAL},
|
517
|
+
#endif
|
518
|
+
#ifdef COMPILER_SP_STD
|
519
|
+
{ COMPILER_SP_STD, COMPILER_SP_STD_VAL},
|
520
|
+
#endif
|
521
|
+
#ifdef COMPILER_SP1
|
522
|
+
{ COMPILER_SP1, COMPILER_SP1_VAL},
|
523
|
+
#endif
|
524
|
+
#ifdef COMPILER_SP2
|
525
|
+
{ COMPILER_SP2, COMPILER_SP2_VAL},
|
526
|
+
#endif
|
527
|
+
#ifdef COMPILER_SP3
|
528
|
+
{ COMPILER_SP3, COMPILER_SP3_VAL},
|
529
|
+
#endif
|
530
|
+
#ifdef COMPILER_CPLUS
|
531
|
+
{ COMPILER_CPLUS, COMPILER_CPLUS_VAL},
|
532
|
+
#endif
|
533
|
+
{ NULL, NULL}, /* End of macros with value of any integer */
|
534
|
+
};
|
535
|
+
|
536
|
+
static void init_defines( void)
|
537
|
+
/*
|
538
|
+
* Initialize the built-in #define's.
|
539
|
+
* Called only on cpp startup prior to do_options().
|
540
|
+
*
|
541
|
+
* Note: the built-in static definitions are removed by the -N option.
|
542
|
+
*/
|
543
|
+
{
|
544
|
+
int n = sizeof preset / sizeof (PRESET);
|
545
|
+
int nargs;
|
546
|
+
PRESET * pp;
|
547
|
+
|
548
|
+
/* Predefine the built-in symbols. */
|
549
|
+
nargs = DEF_NOARGS_PREDEF_OLD;
|
550
|
+
for (pp = preset; pp < preset + n; pp++) {
|
551
|
+
if (pp->name && *(pp->name))
|
552
|
+
look_and_install( pp->name, nargs, null, pp->val);
|
553
|
+
else if (! pp->name)
|
554
|
+
nargs = DEF_NOARGS_PREDEF;
|
555
|
+
}
|
556
|
+
|
557
|
+
look_and_install( "__MCPP", DEF_NOARGS_PREDEF, null, "2");
|
558
|
+
/* MCPP V.2.x */
|
559
|
+
/* This macro is predefined and is not undefined by -N option, */
|
560
|
+
/* yet can be undefined by -U or #undef. */
|
561
|
+
}
|
562
|
+
|
563
|
+
void un_predefine(
|
564
|
+
int clearall /* TRUE for -N option */
|
565
|
+
)
|
566
|
+
/*
|
567
|
+
* Remove predefined symbols from the symbol table.
|
568
|
+
*/
|
569
|
+
{
|
570
|
+
PRESET * pp;
|
571
|
+
DEFBUF * defp;
|
572
|
+
int n = sizeof preset / sizeof (PRESET);
|
573
|
+
|
574
|
+
for (pp = preset; pp < preset + n; pp++) {
|
575
|
+
if (pp->name) {
|
576
|
+
if (*(pp->name) && (defp = look_id( pp->name)) != NULL
|
577
|
+
&& defp->nargs >= DEF_NOARGS_PREDEF)
|
578
|
+
undefine( pp->name);
|
579
|
+
} else if (clearall == FALSE) { /* -S<n> option */
|
580
|
+
break;
|
581
|
+
}
|
582
|
+
}
|
583
|
+
}
|
584
|
+
|
585
|
+
/*
|
586
|
+
* output[] and out_ptr are used for:
|
587
|
+
* buffer to store preprocessed line (this line is put out or handed to
|
588
|
+
* post_preproc() via putout() in some cases)
|
589
|
+
*/
|
590
|
+
static char output[ NMACWORK]; /* Buffer for preprocessed line */
|
591
|
+
static char * const out_end = & output[ NWORK - 2];
|
592
|
+
/* Limit of output line for other than GCC and VC */
|
593
|
+
static char * const out_wend = & output[ NMACWORK - 2];
|
594
|
+
/* Buffer end of output line */
|
595
|
+
static char * out_ptr; /* Current pointer into output[]*/
|
596
|
+
|
597
|
+
static void mcpp_main( void)
|
598
|
+
/*
|
599
|
+
* Main process for mcpp -- copies tokens from the current input stream
|
600
|
+
* (main file or included file) to the output file.
|
601
|
+
*/
|
602
|
+
{
|
603
|
+
int c; /* Current character */
|
604
|
+
char * wp; /* Temporary pointer */
|
605
|
+
DEFBUF * defp; /* Macro definition */
|
606
|
+
int line_top; /* Is in the line top, possibly spaces */
|
607
|
+
LINE_COL line_col; /* Location of macro call in source */
|
608
|
+
|
609
|
+
keep_comments = option_flags.c && !no_output;
|
610
|
+
keep_spaces = option_flags.k; /* Will be turned off if !compiling */
|
611
|
+
line_col.col = line_col.line = 0L;
|
612
|
+
|
613
|
+
/*
|
614
|
+
* This loop is started "from the top" at the beginning of each line.
|
615
|
+
* 'wrong_line' is set TRUE in many places if it is necessary to write
|
616
|
+
* a #line record. (But we don't write them when expanding macros.)
|
617
|
+
*
|
618
|
+
* 'newlines' variable counts the number of blank lines that have been
|
619
|
+
* skipped over. These are then either output via #line records or
|
620
|
+
* by outputting explicit blank lines.
|
621
|
+
* 'newlines' will be cleared on end of an included file by get_ch().
|
622
|
+
*/
|
623
|
+
while (1) { /* For the whole input */
|
624
|
+
newlines = 0; /* Count empty lines */
|
625
|
+
|
626
|
+
while (1) { /* For each line, ... */
|
627
|
+
out_ptr = output; /* Top of the line buf */
|
628
|
+
c = get_ch();
|
629
|
+
if (src_col)
|
630
|
+
break; /* There is a residual tokens on the line */
|
631
|
+
while (char_type[ c] & HSP) { /* ' ' or '\t' */
|
632
|
+
if (c != COM_SEP)
|
633
|
+
*out_ptr++ = c; /* Retain line top white spaces */
|
634
|
+
/* Else skip 0-length comment */
|
635
|
+
c = get_ch();
|
636
|
+
}
|
637
|
+
if (c == '#') { /* Is 1st non-space '#' */
|
638
|
+
directive(); /* Do a #directive */
|
639
|
+
} else if (mcpp_mode == STD && option_flags.dig && c == '%') {
|
640
|
+
/* In POST_STD digraphs are already converted */
|
641
|
+
if (get_ch() == ':') { /* '%:' i.e. '#' */
|
642
|
+
directive(); /* Do a #directive */
|
643
|
+
} else {
|
644
|
+
unget_ch();
|
645
|
+
if (! compiling) {
|
646
|
+
skip_nl();
|
647
|
+
newlines++;
|
648
|
+
} else {
|
649
|
+
break;
|
650
|
+
}
|
651
|
+
}
|
652
|
+
} else if (c == CHAR_EOF) { /* End of input */
|
653
|
+
break;
|
654
|
+
} else if (! compiling) { /* #ifdef false? */
|
655
|
+
skip_nl(); /* Skip to newline */
|
656
|
+
newlines++; /* Count it, too. */
|
657
|
+
} else if (in_asm && ! no_output) { /* In #asm block */
|
658
|
+
put_asm(); /* Put out as it is */
|
659
|
+
} else if (c == '\n') { /* Blank line */
|
660
|
+
if (keep_comments)
|
661
|
+
mcpp_fputc( '\n', OUT); /* May flush comments */
|
662
|
+
else
|
663
|
+
newlines++; /* Wait for a token */
|
664
|
+
} else {
|
665
|
+
break; /* Actual token */
|
666
|
+
}
|
667
|
+
}
|
668
|
+
|
669
|
+
if (c == CHAR_EOF) /* Exit process at */
|
670
|
+
break; /* end of input */
|
671
|
+
|
672
|
+
/*
|
673
|
+
* If the loop didn't terminate because of end of file, we
|
674
|
+
* know there is a token to compile. First, clean up after
|
675
|
+
* absorbing newlines. newlines has the number we skipped.
|
676
|
+
*/
|
677
|
+
if (no_output) {
|
678
|
+
wrong_line = FALSE;
|
679
|
+
} else {
|
680
|
+
if (wrong_line || newlines > 10) {
|
681
|
+
sharp( NULL, 0); /* Output # line number */
|
682
|
+
if (keep_spaces && src_col) {
|
683
|
+
while (src_col--) /* Adjust columns */
|
684
|
+
mcpp_fputc( ' ', OUT);
|
685
|
+
src_col = 0;
|
686
|
+
}
|
687
|
+
} else { /* If just a few, stuff */
|
688
|
+
while (newlines-- > 0) /* them out ourselves */
|
689
|
+
mcpp_fputc('\n', OUT);
|
690
|
+
}
|
691
|
+
}
|
692
|
+
|
693
|
+
/*
|
694
|
+
* Process each token on this line.
|
695
|
+
*/
|
696
|
+
line_top = TRUE;
|
697
|
+
while (c != '\n' && c != CHAR_EOF) { /* For the whole line */
|
698
|
+
/*
|
699
|
+
* has_pragma is set to TRUE so as to execute _Pragma() operator
|
700
|
+
* when the psuedo macro _Pragma() is found.
|
701
|
+
*/
|
702
|
+
int has_pragma;
|
703
|
+
|
704
|
+
if ((mcpp_debug & MACRO_CALL) && ! in_directive) {
|
705
|
+
line_col.line = src_line; /* Location in source */
|
706
|
+
line_col.col = infile->bptr - infile->buffer - 1;
|
707
|
+
}
|
708
|
+
if (scan_token( c, (wp = out_ptr, &wp), out_wend) == NAM
|
709
|
+
&& (defp = is_macro( &wp)) != NULL) { /* A macro */
|
710
|
+
wp = expand_macro( defp, out_ptr, out_wend, line_col
|
711
|
+
, & has_pragma); /* Expand it completely */
|
712
|
+
if (line_top) { /* The first token is a macro */
|
713
|
+
char * tp = out_ptr;
|
714
|
+
while (char_type[ *tp & UCHARMAX] & HSP)
|
715
|
+
tp++; /* Remove excessive spaces */
|
716
|
+
memmove( out_ptr, tp, strlen( tp) + 1);
|
717
|
+
wp -= (tp - out_ptr);
|
718
|
+
}
|
719
|
+
if (has_pragma) { /* Found _Pramga() */
|
720
|
+
do_pragma_op(); /* Do _Pragma() operator*/
|
721
|
+
out_ptr = output; /* Do the rest of line */
|
722
|
+
wrong_line = TRUE; /* Line-num out of sync */
|
723
|
+
} else {
|
724
|
+
out_ptr = wp;
|
725
|
+
}
|
726
|
+
if (keep_spaces && wrong_line && infile
|
727
|
+
&& *(infile->bptr) != '\n' && *(infile->bptr) != EOS) {
|
728
|
+
src_col = infile->bptr - infile->buffer;
|
729
|
+
/* Remember the current colums */
|
730
|
+
break; /* Do sharp() now */
|
731
|
+
}
|
732
|
+
} else { /* Not a macro call */
|
733
|
+
out_ptr = wp; /* Advance the place */
|
734
|
+
if (wrong_line) /* is_macro() swallowed */
|
735
|
+
break; /* the newline */
|
736
|
+
}
|
737
|
+
while (char_type[ c = get_ch()] & HSP) { /* Horizontal space */
|
738
|
+
if (c != COM_SEP) /* Skip 0-length comment*/
|
739
|
+
*out_ptr++ = c;
|
740
|
+
}
|
741
|
+
line_top = FALSE; /* Read over some token */
|
742
|
+
} /* Loop for line */
|
743
|
+
|
744
|
+
putout( output); /* Output the line */
|
745
|
+
} /* Continue until EOF */
|
746
|
+
}
|
747
|
+
|
748
|
+
static void do_pragma_op( void)
|
749
|
+
/*
|
750
|
+
* Execute the _Pragma() operator contained in an expanded macro.
|
751
|
+
* Note: _Pragma() operator is also implemented as a special macro. Therefore
|
752
|
+
* it is always searched as a macro.
|
753
|
+
* There might be more than one _Pragma() in a expanded macro and those may be
|
754
|
+
* surrounded by other token sequences.
|
755
|
+
* Since all the macros have been expanded completely, any name identical to
|
756
|
+
* macro should not be re-expanded.
|
757
|
+
* However, a macro in the string argument of _Pragma() may be expanded by
|
758
|
+
* do_pragma() after de_stringize(), if EXPAND_PRAGMA == TRUE.
|
759
|
+
*/
|
760
|
+
{
|
761
|
+
FILEINFO * file;
|
762
|
+
DEFBUF * defp;
|
763
|
+
int prev = output < out_ptr; /* There is a previous sequence */
|
764
|
+
int token_type;
|
765
|
+
char * cp1, * cp2;
|
766
|
+
int c;
|
767
|
+
|
768
|
+
file = unget_string( out_ptr, NULL);
|
769
|
+
while (c = get_ch(), file == infile) {
|
770
|
+
if (char_type[ c] & HSP) {
|
771
|
+
*out_ptr++ = c;
|
772
|
+
continue;
|
773
|
+
}
|
774
|
+
if (scan_token( c, (cp1 = out_ptr, &cp1), out_wend)
|
775
|
+
== NAM && (defp = is_macro( &cp1)) != NULL
|
776
|
+
&& defp->nargs == DEF_PRAGMA) { /* _Pragma() operator */
|
777
|
+
if (prev) {
|
778
|
+
putout( output); /* Putout the previous sequence */
|
779
|
+
cp1 = stpcpy( output, "pragma "); /* From top of buffer */
|
780
|
+
}
|
781
|
+
/* is_macro() already read over possible spaces after _Pragma */
|
782
|
+
*cp1++ = get_ch(); /* '(' */
|
783
|
+
while (char_type[ c = get_ch()] & HSP)
|
784
|
+
*cp1++ = c;
|
785
|
+
if (((token_type = scan_token( c, (cp2 = cp1, &cp1), out_wend))
|
786
|
+
!= STR && token_type != WSTR)) {
|
787
|
+
/* Not a string literal */
|
788
|
+
put_seq( output, cp1);
|
789
|
+
return;
|
790
|
+
}
|
791
|
+
workp = de_stringize( cp2, work_buf);
|
792
|
+
while (char_type[ c = get_ch()] & HSP)
|
793
|
+
*cp1++ = c;
|
794
|
+
if (c != ')') { /* More than a string literal */
|
795
|
+
unget_ch();
|
796
|
+
put_seq( output, cp1);
|
797
|
+
return;
|
798
|
+
}
|
799
|
+
strcpy( workp, "\n"); /* Terminate with <newline> */
|
800
|
+
unget_string( work_buf, NULL);
|
801
|
+
do_pragma(); /* Do the #pragma "line" */
|
802
|
+
infile->bptr += strlen( infile->bptr); /* Clear sequence */
|
803
|
+
cp1 = out_ptr = output; /* From the top of buffer */
|
804
|
+
prev = FALSE;
|
805
|
+
} else { /* Not pragma sequence */
|
806
|
+
out_ptr = cp1;
|
807
|
+
prev = TRUE;
|
808
|
+
}
|
809
|
+
}
|
810
|
+
unget_ch();
|
811
|
+
if (prev)
|
812
|
+
putout( output);
|
813
|
+
}
|
814
|
+
|
815
|
+
static void put_seq(
|
816
|
+
char * begin, /* Sequence already in buffer */
|
817
|
+
char * seq /* Sequence to be read */
|
818
|
+
)
|
819
|
+
/*
|
820
|
+
* Put out the failed sequence as it is.
|
821
|
+
*/
|
822
|
+
{
|
823
|
+
FILEINFO * file = infile;
|
824
|
+
int c;
|
825
|
+
|
826
|
+
cerror( "Operand of _Pragma() is not a string literal" /* _E_ */
|
827
|
+
, NULL, 0L, NULL);
|
828
|
+
while (c = get_ch(), file == infile)
|
829
|
+
*seq++ = c;
|
830
|
+
unget_ch();
|
831
|
+
out_ptr = seq;
|
832
|
+
putout( begin);
|
833
|
+
}
|
834
|
+
|
835
|
+
static char * de_stringize(
|
836
|
+
char * in, /* Null terminated string literal */
|
837
|
+
char * out /* Output buffer */
|
838
|
+
)
|
839
|
+
/*
|
840
|
+
* Make token sequence from a string literal for _Pragma() operator.
|
841
|
+
*/
|
842
|
+
{
|
843
|
+
char * in_p;
|
844
|
+
int c1, c;
|
845
|
+
|
846
|
+
in_p = in;
|
847
|
+
if (*in_p == 'L')
|
848
|
+
in_p++; /* Skip 'L' prefix */
|
849
|
+
while ((c = *++in_p) != EOS) {
|
850
|
+
if (c == '\\' && ((c1 = *(in_p + 1), c1 == '\\') || c1 == '"'))
|
851
|
+
c = *++in_p; /* "De-escape" escape sequence */
|
852
|
+
*out++ = c;
|
853
|
+
}
|
854
|
+
*--out = EOS; /* Remove the closing '"' */
|
855
|
+
return out;
|
856
|
+
}
|
857
|
+
|
858
|
+
static void putout(
|
859
|
+
char * out /* Output line (line-end is always 'out_ptr') */
|
860
|
+
)
|
861
|
+
/*
|
862
|
+
* Put out a line with or without "post-preprocessing".
|
863
|
+
*/
|
864
|
+
{
|
865
|
+
size_t len;
|
866
|
+
|
867
|
+
*out_ptr++ = '\n'; /* Put out a newline */
|
868
|
+
*out_ptr = EOS;
|
869
|
+
|
870
|
+
#if ! MBCHAR_IS_ESCAPE_FREE
|
871
|
+
post_preproc( out);
|
872
|
+
#elif ! HAVE_DIGRAPHS
|
873
|
+
if (mcpp_mode == STD && option_flag.dig)
|
874
|
+
post_preproc( out);
|
875
|
+
#endif
|
876
|
+
/* Else no post-preprocess */
|
877
|
+
#if COMPILER != GNUC && COMPILER != MSC
|
878
|
+
/* GCC and Visual C can accept very long line */
|
879
|
+
len = strlen( out);
|
880
|
+
if (len > NWORK - 1)
|
881
|
+
devide_line( out); /* Devide a too long line */
|
882
|
+
else
|
883
|
+
#endif
|
884
|
+
put_a_line( out);
|
885
|
+
}
|
886
|
+
|
887
|
+
#if COMPILER != GNUC && COMPILER != MSC
|
888
|
+
|
889
|
+
static void devide_line(
|
890
|
+
char * out /* 'out' is 'output' in actual */
|
891
|
+
)
|
892
|
+
/*
|
893
|
+
* Devide a too long line into output lines shorter than NWORK.
|
894
|
+
* This routine is called from putout().
|
895
|
+
*/
|
896
|
+
{
|
897
|
+
FILEINFO * file;
|
898
|
+
char * save;
|
899
|
+
char * wp;
|
900
|
+
int c;
|
901
|
+
|
902
|
+
file = unget_string( out, NULL); /* To re-read the line */
|
903
|
+
wp = out_ptr = out;
|
904
|
+
|
905
|
+
while ((c = get_ch()), file == infile) {
|
906
|
+
if (char_type[ c] & HSP) {
|
907
|
+
if (keep_spaces || out == out_ptr
|
908
|
+
|| (char_type[ *(out_ptr - 1) & UCHARMAX] & HSP)) {
|
909
|
+
*out_ptr++ = c;
|
910
|
+
wp++;
|
911
|
+
}
|
912
|
+
continue;
|
913
|
+
}
|
914
|
+
scan_token( c, &wp, out_wend); /* Read a token */
|
915
|
+
if (NWORK-2 < wp - out_ptr) { /* Too long a token */
|
916
|
+
cfatal( "Too long token %s", out_ptr, 0L, NULL); /* _F_ */
|
917
|
+
} else if (out_end <= wp) { /* Too long line */
|
918
|
+
if (mcpp_debug & MACRO_CALL) { /* -K option */
|
919
|
+
/* Other than GCC or Visual C */
|
920
|
+
/* scan_token() scans a comment as sequence of some */
|
921
|
+
/* tokens such as '/', '*', ..., '*', '/', since it */
|
922
|
+
/* does not expect comment. */
|
923
|
+
save = out_ptr;
|
924
|
+
while ((save = strrchr( save, '/')) != NULL) {
|
925
|
+
if (*(save - 1) == '*') { /* '*' '/' sequence */
|
926
|
+
out_ptr = save + 1; /* Devide at the end*/
|
927
|
+
break; /* of a comment*/
|
928
|
+
}
|
929
|
+
}
|
930
|
+
}
|
931
|
+
save = save_string( out_ptr); /* Save the token */
|
932
|
+
*out_ptr++ = '\n'; /* Append newline */
|
933
|
+
*out_ptr = EOS;
|
934
|
+
put_a_line( out); /* Putout the former tokens */
|
935
|
+
wp = out_ptr = stpcpy( out, save); /* Restore the token */
|
936
|
+
free( save);
|
937
|
+
} else { /* Still in size */
|
938
|
+
out_ptr = wp; /* Advance the pointer */
|
939
|
+
}
|
940
|
+
}
|
941
|
+
|
942
|
+
unget_ch(); /* Push back the source character */
|
943
|
+
put_a_line( out); /* Putout the last tokens */
|
944
|
+
sharp( NULL, 0); /* Correct line number */
|
945
|
+
}
|
946
|
+
|
947
|
+
#endif
|
948
|
+
|
949
|
+
static void put_a_line(
|
950
|
+
char * out
|
951
|
+
)
|
952
|
+
/*
|
953
|
+
* Finally put out the preprocessed line.
|
954
|
+
*/
|
955
|
+
{
|
956
|
+
size_t len;
|
957
|
+
char * out_p;
|
958
|
+
char * tp;
|
959
|
+
|
960
|
+
if (no_output)
|
961
|
+
return;
|
962
|
+
len = strlen( out);
|
963
|
+
tp = out_p = out + len - 2; /* Just before '\n' */
|
964
|
+
while (char_type[ *out_p & UCHARMAX] & SPA)
|
965
|
+
out_p--; /* Remove trailing white spaces */
|
966
|
+
if (out_p < tp) {
|
967
|
+
*++out_p = '\n';
|
968
|
+
*++out_p = EOS;
|
969
|
+
}
|
970
|
+
if (mcpp_fputs( out, OUT) == EOF)
|
971
|
+
cfatal( "File write error", NULL, 0L, NULL); /* _F_ */
|
972
|
+
}
|
973
|
+
|
974
|
+
|
975
|
+
/*
|
976
|
+
* Routines to P O S T - P R E P R O C E S S
|
977
|
+
*
|
978
|
+
* 1998/08 created kmatsui (revised 1998/09, 2004/02, 2006/07)
|
979
|
+
* Supplementary phase for the older compiler-propers.
|
980
|
+
* 1. Convert digraphs to usual tokens.
|
981
|
+
* 2. Double '\\' of the second byte of multi-byte characters.
|
982
|
+
* These conversions are done selectively according to the macros defined
|
983
|
+
* in system.H.
|
984
|
+
* 1. Digraphs are converted if ! HAVE_DIGRAPHS and digraph recoginition
|
985
|
+
* is enabled by DIGRAPHS_INIT and/or -2 option on execution.
|
986
|
+
* 2. '\\' of the second byte of SJIS (BIGFIVE or ISO2022_JP) is doubled
|
987
|
+
* if bsl_need_escape == TRUE.
|
988
|
+
*/
|
989
|
+
|
990
|
+
#if HAVE_DIGRAPHS && MBCHAR_IS_ESCAPE_FREE
|
991
|
+
/* No post_preproc() */
|
992
|
+
#else
|
993
|
+
|
994
|
+
static int post_preproc(
|
995
|
+
char * out
|
996
|
+
)
|
997
|
+
/*
|
998
|
+
* Convert digraphs and double '\\' of the second byte of SJIS (BIGFIVE or
|
999
|
+
* ISO2022_JP).
|
1000
|
+
* Note: Output of -K option embeds macro informations into comments.
|
1001
|
+
* scan_token() does not recognize comment and parses it as '/', '*', etc.
|
1002
|
+
*/
|
1003
|
+
{
|
1004
|
+
#if ! HAVE_DIGRAPHS
|
1005
|
+
int di_count = 0;
|
1006
|
+
#endif
|
1007
|
+
int token_type;
|
1008
|
+
int c;
|
1009
|
+
char * str;
|
1010
|
+
char * cp = out;
|
1011
|
+
|
1012
|
+
unget_string( out, NULL);
|
1013
|
+
while ((c = get_ch()) != '\n') { /* Not to read over to next line */
|
1014
|
+
if (char_type[ c] & HSP) {
|
1015
|
+
*cp++ = c;
|
1016
|
+
continue;
|
1017
|
+
}
|
1018
|
+
str = cp;
|
1019
|
+
token_type = scan_token( c, &cp, out_wend);
|
1020
|
+
switch (token_type) {
|
1021
|
+
#if ! MBCHAR_IS_ESCAPE_FREE
|
1022
|
+
case WSTR :
|
1023
|
+
case WCHR :
|
1024
|
+
str++; /* Skip prefix 'L' */
|
1025
|
+
/* Fall through */
|
1026
|
+
case STR :
|
1027
|
+
case CHR :
|
1028
|
+
if (bsl_need_escape)
|
1029
|
+
cp = esc_mbchar( str, cp);
|
1030
|
+
break;
|
1031
|
+
#endif /* ! MBCHAR_IS_ESCAPE_FREE */
|
1032
|
+
#if ! HAVE_DIGRAPHS
|
1033
|
+
case OPE :
|
1034
|
+
if (mcpp_mode == STD && (openum & OP_DIGRAPH)) {
|
1035
|
+
cp = conv_a_digraph( cp); /* Convert a digraph */
|
1036
|
+
di_count++;
|
1037
|
+
}
|
1038
|
+
break;
|
1039
|
+
#endif
|
1040
|
+
}
|
1041
|
+
}
|
1042
|
+
*cp++ = '\n';
|
1043
|
+
*cp = EOS;
|
1044
|
+
#if ! HAVE_DIGRAPHS
|
1045
|
+
if (mcpp_mode == STD && di_count && (warn_level & 16))
|
1046
|
+
cwarn( "%.0s%ld digraph(s) converted" /* _W16_ */
|
1047
|
+
, NULL, (long) di_count, NULL);
|
1048
|
+
#endif
|
1049
|
+
return 0;
|
1050
|
+
}
|
1051
|
+
|
1052
|
+
#endif /* ! HAVE_DIGRAPHS || ! MBCHAR_IS_ESCAPE_FREE */
|
1053
|
+
|
1054
|
+
#if ! HAVE_DIGRAPHS
|
1055
|
+
static char * conv_a_digraph(
|
1056
|
+
char * cp /* The end of the digraph token */
|
1057
|
+
)
|
1058
|
+
/*
|
1059
|
+
* Convert a digraph to usual token in place.
|
1060
|
+
* This routine is never called in POST_STD mode.
|
1061
|
+
*/
|
1062
|
+
{
|
1063
|
+
cp -= 2;
|
1064
|
+
switch (openum) {
|
1065
|
+
case OP_LBRACE_D :
|
1066
|
+
*cp++ = '{';
|
1067
|
+
break;
|
1068
|
+
case OP_RBRACE_D :
|
1069
|
+
*cp++ = '}';
|
1070
|
+
break;
|
1071
|
+
case OP_LBRCK_D :
|
1072
|
+
*cp++ = '[';
|
1073
|
+
break;
|
1074
|
+
case OP_RBRCK_D :
|
1075
|
+
*cp++ = ']';
|
1076
|
+
break;
|
1077
|
+
case OP_SHARP_D : /* Error of source */
|
1078
|
+
*cp++ = '#';
|
1079
|
+
break;
|
1080
|
+
case OP_DSHARP_D : /* Error of source */
|
1081
|
+
cp -= 2;
|
1082
|
+
*cp++ = '#';
|
1083
|
+
*cp++ = '#';
|
1084
|
+
break;
|
1085
|
+
}
|
1086
|
+
return cp;
|
1087
|
+
}
|
1088
|
+
#endif /* ! HAVE_DIGRAPHS */
|
1089
|
+
|
1090
|
+
#if ! MBCHAR_IS_ESCAPE_FREE
|
1091
|
+
static char * esc_mbchar(
|
1092
|
+
char * str, /* String literal or character constant without 'L' */
|
1093
|
+
char * str_end /* The end of the token */
|
1094
|
+
)
|
1095
|
+
/*
|
1096
|
+
* Insert \ before the byte of 0x5c('\\') of the SJIS, BIGFIVE or ISO2022_JP
|
1097
|
+
* multi-byte character code in string literal or character constant.
|
1098
|
+
* Insert \ also before the byte of 0x22('"') and 0x27('\'') of ISO2022_JP.
|
1099
|
+
* esc_mbchar() does in-place insertion.
|
1100
|
+
*/
|
1101
|
+
{
|
1102
|
+
char * cp;
|
1103
|
+
int delim;
|
1104
|
+
int c;
|
1105
|
+
|
1106
|
+
if (! bsl_need_escape)
|
1107
|
+
return str_end;
|
1108
|
+
if ((delim = *str++) == 'L')
|
1109
|
+
delim = *str++; /* The quote character */
|
1110
|
+
while ((c = *str++ & UCHARMAX) != delim) {
|
1111
|
+
if (char_type[ c] & mbchk) { /* MBCHAR */
|
1112
|
+
cp = str;
|
1113
|
+
mb_read( c, &str, (workp = work_buf, &workp));
|
1114
|
+
while (cp++ < str) {
|
1115
|
+
c = *(cp - 1);
|
1116
|
+
if (c == '\\' || c == '"' || c == '\'') {
|
1117
|
+
/* Insert \ before 0x5c, 0x22, 0x27 */
|
1118
|
+
memmove( cp, cp - 1, (size_t) (str_end - cp) + 2);
|
1119
|
+
*(cp++ - 1) = '\\';
|
1120
|
+
str++;
|
1121
|
+
str_end++;
|
1122
|
+
}
|
1123
|
+
}
|
1124
|
+
} else if (c == '\\' && ! (char_type[ *str & UCHARMAX] & mbchk)) {
|
1125
|
+
str++; /* Escape sequence */
|
1126
|
+
}
|
1127
|
+
}
|
1128
|
+
return str_end;
|
1129
|
+
}
|
1130
|
+
#endif /* ! MBCHAR_IS_ESCAPE_FREE */
|
1131
|
+
|