zeroc-ice 3.6b1 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (679) hide show
  1. checksums.yaml +4 -4
  2. data/{ext/ice/BZIP_LICENSE → BZIP2_LICENSE} +0 -0
  3. data/ICE_LICENSE +8 -14
  4. data/LICENSE +2 -1
  5. data/{ext/ice/MCPP_LICENSE → MCPP_LICENSE} +2 -9
  6. data/bin/slice2rb +1 -1
  7. data/ext/Communicator.cpp +1 -1
  8. data/ext/Communicator.h +1 -1
  9. data/ext/Config.h +1 -22
  10. data/ext/Connection.cpp +125 -13
  11. data/ext/Connection.h +1 -1
  12. data/ext/Endpoint.cpp +62 -3
  13. data/ext/Endpoint.h +1 -1
  14. data/ext/ImplicitContext.cpp +1 -1
  15. data/ext/ImplicitContext.h +1 -1
  16. data/ext/Init.cpp +8 -1
  17. data/ext/Logger.cpp +1 -1
  18. data/ext/Logger.h +1 -1
  19. data/ext/ObjectFactory.cpp +1 -1
  20. data/ext/ObjectFactory.h +1 -1
  21. data/ext/Operation.cpp +1 -1
  22. data/ext/Operation.h +1 -1
  23. data/ext/Properties.cpp +1 -1
  24. data/ext/Properties.h +1 -1
  25. data/ext/Proxy.cpp +1 -1
  26. data/ext/Proxy.h +1 -1
  27. data/ext/Slice.cpp +1 -1
  28. data/ext/Slice.h +1 -1
  29. data/ext/Types.cpp +65 -17
  30. data/ext/Types.h +4 -1
  31. data/ext/Util.cpp +49 -58
  32. data/ext/Util.h +1 -1
  33. data/ext/extconf.rb +17 -15
  34. data/ext/ice/cpp/include/Ice/ACMF.h +1 -1
  35. data/ext/ice/cpp/include/Ice/Application.h +1 -1
  36. data/ext/ice/cpp/include/Ice/AsyncResult.h +1 -1
  37. data/ext/ice/cpp/include/Ice/AsyncResultF.h +1 -1
  38. data/ext/ice/cpp/include/Ice/BasicStream.h +1 -1
  39. data/ext/ice/cpp/include/Ice/BatchRequestInterceptor.h +52 -0
  40. data/ext/ice/cpp/include/Ice/BatchRequestQueueF.h +25 -0
  41. data/ext/ice/cpp/include/Ice/Buffer.h +1 -1
  42. data/ext/ice/cpp/include/Ice/BuiltinSequences.h +12 -4
  43. data/ext/ice/cpp/include/Ice/Communicator.h +12 -4
  44. data/ext/ice/cpp/include/Ice/CommunicatorAsync.h +1 -1
  45. data/ext/ice/cpp/include/Ice/CommunicatorF.h +12 -4
  46. data/ext/ice/cpp/include/Ice/Config.h +13 -8
  47. data/ext/ice/cpp/include/Ice/Connection.h +41 -16
  48. data/ext/ice/cpp/include/Ice/ConnectionAsync.h +1 -1
  49. data/ext/ice/cpp/include/Ice/ConnectionF.h +12 -4
  50. data/ext/ice/cpp/include/Ice/ConnectionFactoryF.h +1 -1
  51. data/ext/ice/cpp/include/Ice/ConnectionIF.h +1 -1
  52. data/ext/ice/cpp/include/Ice/Current.h +12 -4
  53. data/ext/ice/cpp/include/Ice/DefaultObjectFactory.h +1 -1
  54. data/ext/ice/cpp/include/Ice/DeprecatedStringConverter.h +1 -1
  55. data/ext/ice/cpp/include/Ice/DispatchInterceptor.h +1 -1
  56. data/ext/ice/cpp/include/Ice/Dispatcher.h +1 -1
  57. data/ext/ice/cpp/include/Ice/DynamicLibrary.h +1 -1
  58. data/ext/ice/cpp/include/Ice/DynamicLibraryF.h +1 -1
  59. data/ext/ice/cpp/include/Ice/Endpoint.h +16 -6
  60. data/ext/ice/cpp/include/Ice/EndpointF.h +12 -4
  61. data/ext/ice/cpp/include/Ice/EndpointTypes.h +12 -4
  62. data/ext/ice/cpp/include/Ice/Exception.h +3 -3
  63. data/ext/ice/cpp/include/Ice/FacetMap.h +12 -4
  64. data/ext/ice/cpp/include/Ice/FactoryTable.h +1 -1
  65. data/ext/ice/cpp/include/Ice/FactoryTableInit.h +1 -1
  66. data/ext/ice/cpp/include/Ice/Format.h +1 -1
  67. data/ext/ice/cpp/include/Ice/Functional.h +1 -1
  68. data/ext/ice/cpp/include/Ice/GCObject.h +5 -1
  69. data/ext/ice/cpp/include/Ice/Handle.h +1 -1
  70. data/ext/ice/cpp/include/Ice/Ice.h +4 -3
  71. data/ext/ice/cpp/include/Ice/Identity.h +13 -5
  72. data/ext/ice/cpp/include/Ice/ImplicitContext.h +12 -4
  73. data/ext/ice/cpp/include/Ice/ImplicitContextF.h +12 -4
  74. data/ext/ice/cpp/include/Ice/Incoming.h +1 -1
  75. data/ext/ice/cpp/include/Ice/IncomingAsync.h +1 -1
  76. data/ext/ice/cpp/include/Ice/IncomingAsyncF.h +1 -1
  77. data/ext/ice/cpp/include/Ice/Initialize.h +4 -2
  78. data/ext/ice/cpp/include/Ice/InstanceF.h +1 -1
  79. data/ext/ice/cpp/include/Ice/Instrumentation.h +12 -4
  80. data/ext/ice/cpp/include/Ice/InstrumentationF.h +12 -4
  81. data/ext/ice/cpp/include/Ice/LocalException.h +12 -4
  82. data/ext/ice/cpp/include/Ice/LocalObject.h +1 -1
  83. data/ext/ice/cpp/include/Ice/LocalObjectF.h +1 -1
  84. data/ext/ice/cpp/include/Ice/Locator.h +137 -129
  85. data/ext/ice/cpp/include/Ice/LocatorF.h +12 -4
  86. data/ext/ice/cpp/include/Ice/Logger.h +12 -4
  87. data/ext/ice/cpp/include/Ice/LoggerF.h +12 -4
  88. data/ext/ice/cpp/include/Ice/LoggerUtil.h +1 -1
  89. data/ext/ice/cpp/include/Ice/Metrics.h +144 -136
  90. data/ext/ice/cpp/include/Ice/MetricsAdminI.h +1 -1
  91. data/ext/ice/cpp/include/Ice/MetricsFunctional.h +1 -1
  92. data/ext/ice/cpp/include/Ice/MetricsObserverI.h +35 -26
  93. data/ext/ice/cpp/include/Ice/NativePropertiesAdmin.h +1 -1
  94. data/ext/ice/cpp/include/Ice/Object.h +1 -1
  95. data/ext/ice/cpp/include/Ice/ObjectAdapter.h +12 -4
  96. data/ext/ice/cpp/include/Ice/ObjectAdapterF.h +12 -4
  97. data/ext/ice/cpp/include/Ice/ObjectAdapterFactoryF.h +1 -1
  98. data/ext/ice/cpp/include/Ice/ObjectF.h +1 -1
  99. data/ext/ice/cpp/include/Ice/ObjectFactory.h +12 -4
  100. data/ext/ice/cpp/include/Ice/ObjectFactoryF.h +12 -4
  101. data/ext/ice/cpp/include/Ice/ObjectFactoryManagerF.h +1 -1
  102. data/ext/ice/cpp/include/Ice/ObserverHelper.h +1 -1
  103. data/ext/ice/cpp/include/Ice/Outgoing.h +67 -39
  104. data/ext/ice/cpp/include/Ice/OutgoingAsync.h +31 -34
  105. data/ext/ice/cpp/include/Ice/OutgoingAsyncF.h +4 -4
  106. data/ext/ice/cpp/include/Ice/Plugin.h +12 -4
  107. data/ext/ice/cpp/include/Ice/PluginF.h +12 -4
  108. data/ext/ice/cpp/include/Ice/Process.h +36 -28
  109. data/ext/ice/cpp/include/Ice/ProcessF.h +12 -4
  110. data/ext/ice/cpp/include/Ice/Properties.h +12 -4
  111. data/ext/ice/cpp/include/Ice/PropertiesAdmin.h +86 -78
  112. data/ext/ice/cpp/include/Ice/PropertiesF.h +12 -4
  113. data/ext/ice/cpp/include/Ice/Protocol.h +1 -1
  114. data/ext/ice/cpp/include/Ice/Proxy.h +6 -2
  115. data/ext/ice/cpp/include/Ice/ProxyF.h +1 -1
  116. data/ext/ice/cpp/include/Ice/ProxyFactoryF.h +1 -1
  117. data/ext/ice/cpp/include/Ice/ProxyHandle.h +1 -1
  118. data/ext/ice/cpp/include/Ice/ReferenceF.h +1 -1
  119. data/ext/ice/cpp/include/Ice/RemoteLogger.h +137 -129
  120. data/ext/ice/cpp/include/Ice/RequestHandlerF.h +1 -1
  121. data/ext/ice/cpp/include/Ice/ResponseHandlerF.h +1 -1
  122. data/ext/ice/cpp/include/Ice/Router.h +37 -29
  123. data/ext/ice/cpp/include/Ice/RouterF.h +12 -4
  124. data/ext/ice/cpp/include/Ice/ServantLocator.h +12 -4
  125. data/ext/ice/cpp/include/Ice/ServantLocatorF.h +12 -4
  126. data/ext/ice/cpp/include/Ice/ServantManagerF.h +1 -1
  127. data/ext/ice/cpp/include/Ice/Service.h +1 -1
  128. data/ext/ice/cpp/include/Ice/SliceChecksumDict.h +12 -4
  129. data/ext/ice/cpp/include/Ice/SliceChecksums.h +1 -1
  130. data/ext/ice/cpp/include/Ice/SlicedData.h +1 -6
  131. data/ext/ice/cpp/include/Ice/SlicedDataF.h +1 -1
  132. data/ext/ice/cpp/include/Ice/Stream.h +3 -5
  133. data/ext/ice/cpp/include/Ice/StreamF.h +1 -1
  134. data/ext/ice/cpp/include/Ice/StreamHelpers.h +1 -1
  135. data/ext/ice/cpp/include/Ice/ThreadPoolF.h +1 -1
  136. data/ext/ice/cpp/include/Ice/UserExceptionFactory.h +1 -1
  137. data/ext/ice/cpp/include/Ice/Version.h +14 -6
  138. data/ext/ice/cpp/include/IceSSL/Config.h +19 -1
  139. data/ext/ice/cpp/include/IceSSL/ConnectionInfo.h +61 -7
  140. data/ext/ice/cpp/include/IceSSL/EndpointInfo.h +52 -5
  141. data/ext/ice/cpp/include/IceSSL/IceSSL.h +2 -2
  142. data/ext/ice/cpp/include/IceSSL/Plugin.h +32 -26
  143. data/ext/ice/cpp/include/IceUtil/AbstractMutex.h +1 -1
  144. data/ext/ice/cpp/include/IceUtil/Atomic.h +186 -0
  145. data/ext/ice/cpp/include/IceUtil/Cache.h +1 -1
  146. data/ext/ice/cpp/include/IceUtil/Cond.h +1 -1
  147. data/ext/ice/cpp/include/IceUtil/Config.h +31 -20
  148. data/ext/ice/cpp/include/IceUtil/CountDownLatch.h +1 -1
  149. data/ext/ice/cpp/include/IceUtil/CtrlCHandler.h +1 -1
  150. data/ext/ice/cpp/include/IceUtil/DisableWarnings.h +9 -2
  151. data/ext/ice/cpp/include/IceUtil/Exception.h +4 -3
  152. data/ext/ice/cpp/include/IceUtil/Functional.h +1 -1
  153. data/ext/ice/cpp/include/IceUtil/Handle.h +1 -1
  154. data/ext/ice/cpp/include/IceUtil/IceUtil.h +2 -2
  155. data/ext/ice/cpp/include/IceUtil/IconvStringConverter.h +1 -1
  156. data/ext/ice/cpp/include/IceUtil/InputUtil.h +1 -1
  157. data/ext/ice/cpp/include/IceUtil/Iterator.h +1 -1
  158. data/ext/ice/cpp/include/IceUtil/Lock.h +1 -1
  159. data/ext/ice/cpp/include/IceUtil/Monitor.h +1 -1
  160. data/ext/ice/cpp/include/IceUtil/Mutex.h +1 -1
  161. data/ext/ice/cpp/include/IceUtil/MutexProtocol.h +1 -1
  162. data/ext/ice/cpp/include/IceUtil/MutexPtrLock.h +1 -1
  163. data/ext/ice/cpp/include/IceUtil/MutexPtrTryLock.h +1 -1
  164. data/ext/ice/cpp/include/IceUtil/Optional.h +1 -1
  165. data/ext/ice/cpp/include/IceUtil/Options.h +1 -1
  166. data/ext/ice/cpp/include/IceUtil/OutputUtil.h +8 -11
  167. data/ext/ice/cpp/include/IceUtil/PopDisableWarnings.h +1 -1
  168. data/ext/ice/cpp/include/IceUtil/PushDisableWarnings.h +5 -1
  169. data/ext/ice/cpp/include/IceUtil/Random.h +1 -1
  170. data/ext/ice/cpp/include/IceUtil/RecMutex.h +1 -1
  171. data/ext/ice/cpp/include/IceUtil/SHA1.h +8 -26
  172. data/ext/ice/cpp/include/IceUtil/ScannerConfig.h +5 -5
  173. data/ext/ice/cpp/include/IceUtil/ScopedArray.h +1 -1
  174. data/ext/ice/cpp/include/IceUtil/Shared.h +3 -37
  175. data/ext/ice/cpp/include/IceUtil/StringUtil.h +1 -1
  176. data/ext/ice/cpp/include/IceUtil/Thread.h +1 -1
  177. data/ext/ice/cpp/include/IceUtil/ThreadException.h +1 -1
  178. data/ext/ice/cpp/include/IceUtil/Time.h +1 -1
  179. data/ext/ice/cpp/include/IceUtil/Timer.h +1 -1
  180. data/ext/ice/cpp/include/IceUtil/UUID.h +1 -1
  181. data/ext/ice/cpp/include/IceUtil/UndefSysMacros.h +1 -1
  182. data/ext/ice/cpp/include/IceUtil/UniquePtr.h +1 -1
  183. data/ext/ice/cpp/include/Slice/CPlusPlusUtil.h +7 -6
  184. data/ext/ice/cpp/include/Slice/Checksum.h +1 -1
  185. data/ext/ice/cpp/include/Slice/CsUtil.h +1 -1
  186. data/ext/ice/cpp/include/Slice/DotNetNames.h +1 -1
  187. data/ext/ice/cpp/include/Slice/FileTracker.h +1 -1
  188. data/ext/ice/cpp/include/Slice/JavaUtil.h +3 -1
  189. data/ext/ice/cpp/include/Slice/ObjCUtil.h +127 -0
  190. data/ext/ice/cpp/include/Slice/PHPUtil.h +1 -1
  191. data/ext/ice/cpp/include/Slice/Parser.h +18 -12
  192. data/ext/ice/cpp/include/Slice/Preprocessor.h +6 -4
  193. data/ext/ice/cpp/include/Slice/PythonUtil.h +1 -1
  194. data/ext/ice/cpp/include/Slice/RubyUtil.h +1 -1
  195. data/ext/ice/cpp/include/Slice/Util.h +20 -2
  196. data/ext/ice/cpp/src/Ice/ACM.cpp +1 -1
  197. data/ext/ice/cpp/src/Ice/ACM.h +1 -1
  198. data/ext/ice/cpp/src/Ice/Acceptor.cpp +1 -1
  199. data/ext/ice/cpp/src/Ice/Acceptor.h +1 -1
  200. data/ext/ice/cpp/src/Ice/AcceptorF.h +1 -1
  201. data/ext/ice/cpp/src/Ice/AsyncResult.cpp +1 -1
  202. data/ext/ice/cpp/src/Ice/Base64.cpp +1 -1
  203. data/ext/ice/cpp/src/Ice/Base64.h +1 -1
  204. data/ext/ice/cpp/src/Ice/BasicStream.cpp +7 -5
  205. data/ext/ice/cpp/src/Ice/BatchRequestQueue.cpp +227 -0
  206. data/ext/ice/cpp/src/Ice/BatchRequestQueue.h +59 -0
  207. data/ext/ice/cpp/src/Ice/Buffer.cpp +3 -3
  208. data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +10 -4
  209. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +82 -282
  210. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.h +8 -21
  211. data/ext/ice/cpp/src/Ice/Communicator.cpp +11 -5
  212. data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +10 -4
  213. data/ext/ice/cpp/src/Ice/CommunicatorI.cpp +6 -6
  214. data/ext/ice/cpp/src/Ice/CommunicatorI.h +1 -1
  215. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.cpp +42 -180
  216. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.h +10 -19
  217. data/ext/ice/cpp/src/Ice/ConnectRequestHandlerF.h +25 -0
  218. data/ext/ice/cpp/src/Ice/Connection.cpp +17 -11
  219. data/ext/ice/cpp/src/Ice/ConnectionF.cpp +10 -4
  220. data/ext/ice/cpp/src/Ice/ConnectionFactory.cpp +137 -51
  221. data/ext/ice/cpp/src/Ice/ConnectionFactory.h +18 -8
  222. data/ext/ice/cpp/src/Ice/ConnectionI.cpp +105 -391
  223. data/ext/ice/cpp/src/Ice/ConnectionI.h +25 -23
  224. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +5 -29
  225. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.h +3 -8
  226. data/ext/ice/cpp/src/Ice/Connector.cpp +1 -1
  227. data/ext/ice/cpp/src/Ice/Connector.h +1 -1
  228. data/ext/ice/cpp/src/Ice/ConnectorF.h +1 -1
  229. data/ext/ice/cpp/src/Ice/Current.cpp +10 -4
  230. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +1 -1
  231. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.h +1 -1
  232. data/ext/ice/cpp/src/Ice/DefaultsAndOverridesF.h +1 -1
  233. data/ext/ice/cpp/src/Ice/DeprecatedStringConverter.cpp +1 -1
  234. data/ext/ice/cpp/src/Ice/DispatchInterceptor.cpp +1 -1
  235. data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +1 -1
  236. data/ext/ice/cpp/src/Ice/Endpoint.cpp +17 -11
  237. data/ext/ice/cpp/src/Ice/EndpointF.cpp +10 -4
  238. data/ext/ice/cpp/src/Ice/EndpointFactory.cpp +19 -1
  239. data/ext/ice/cpp/src/Ice/EndpointFactory.h +13 -1
  240. data/ext/ice/cpp/src/Ice/EndpointFactoryF.h +1 -1
  241. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.cpp +1 -1
  242. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.h +1 -1
  243. data/ext/ice/cpp/src/Ice/EndpointFactoryManagerF.h +1 -1
  244. data/ext/ice/cpp/src/Ice/EndpointI.cpp +1 -1
  245. data/ext/ice/cpp/src/Ice/EndpointI.h +33 -1
  246. data/ext/ice/cpp/src/Ice/EndpointIF.h +1 -1
  247. data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +10 -4
  248. data/ext/ice/cpp/src/Ice/EventHandler.cpp +1 -1
  249. data/ext/ice/cpp/src/Ice/EventHandler.h +4 -1
  250. data/ext/ice/cpp/src/Ice/EventHandlerF.h +1 -1
  251. data/ext/ice/cpp/src/Ice/Exception.cpp +20 -11
  252. data/ext/ice/cpp/src/Ice/FacetMap.cpp +10 -4
  253. data/ext/ice/cpp/src/Ice/FactoryTable.cpp +1 -1
  254. data/ext/ice/cpp/src/Ice/FactoryTableInit.cpp +2 -2
  255. data/ext/ice/cpp/src/Ice/GCObject.cpp +1 -1
  256. data/ext/ice/cpp/src/Ice/HashUtil.h +1 -1
  257. data/ext/ice/cpp/src/Ice/HttpParser.cpp +27 -15
  258. data/ext/ice/cpp/src/Ice/HttpParser.h +4 -6
  259. data/ext/ice/cpp/src/Ice/IPEndpointI.cpp +7 -1
  260. data/ext/ice/cpp/src/Ice/IPEndpointI.h +2 -1
  261. data/ext/ice/cpp/src/Ice/IPEndpointIF.h +1 -1
  262. data/ext/ice/cpp/src/Ice/Identity.cpp +11 -5
  263. data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +11 -5
  264. data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +10 -4
  265. data/ext/ice/cpp/src/Ice/ImplicitContextI.cpp +1 -1
  266. data/ext/ice/cpp/src/Ice/ImplicitContextI.h +1 -1
  267. data/ext/ice/cpp/src/Ice/Incoming.cpp +22 -20
  268. data/ext/ice/cpp/src/Ice/IncomingAsync.cpp +1 -1
  269. data/ext/ice/cpp/src/Ice/IncomingRequest.h +1 -1
  270. data/ext/ice/cpp/src/Ice/Initialize.cpp +31 -5
  271. data/ext/ice/cpp/src/Ice/Instance.cpp +102 -59
  272. data/ext/ice/cpp/src/Ice/Instance.h +28 -2
  273. data/ext/ice/cpp/src/Ice/Instrumentation.cpp +20 -14
  274. data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +10 -4
  275. data/ext/ice/cpp/src/Ice/InstrumentationI.cpp +1 -1
  276. data/ext/ice/cpp/src/Ice/InstrumentationI.h +1 -1
  277. data/ext/ice/cpp/src/Ice/LocalException.cpp +10 -4
  278. data/ext/ice/cpp/src/Ice/LocalObject.cpp +1 -1
  279. data/ext/ice/cpp/src/Ice/Locator.cpp +83 -77
  280. data/ext/ice/cpp/src/Ice/LocatorF.cpp +10 -4
  281. data/ext/ice/cpp/src/Ice/LocatorInfo.cpp +77 -69
  282. data/ext/ice/cpp/src/Ice/LocatorInfo.h +1 -1
  283. data/ext/ice/cpp/src/Ice/LocatorInfoF.h +1 -1
  284. data/ext/ice/cpp/src/Ice/Logger.cpp +11 -5
  285. data/ext/ice/cpp/src/Ice/LoggerAdminI.cpp +1 -1
  286. data/ext/ice/cpp/src/Ice/LoggerAdminI.h +1 -1
  287. data/ext/ice/cpp/src/Ice/LoggerF.cpp +10 -4
  288. data/ext/ice/cpp/src/Ice/LoggerI.cpp +10 -8
  289. data/ext/ice/cpp/src/Ice/LoggerI.h +1 -1
  290. data/ext/ice/cpp/src/Ice/LoggerUtil.cpp +2 -2
  291. data/ext/ice/cpp/src/Ice/Metrics.cpp +122 -116
  292. data/ext/ice/cpp/src/Ice/MetricsAdminI.cpp +1 -1
  293. data/ext/ice/cpp/src/Ice/MetricsObserverI.cpp +1 -1
  294. data/ext/ice/cpp/src/Ice/Network.cpp +63 -19
  295. data/ext/ice/cpp/src/Ice/Network.h +10 -3
  296. data/ext/ice/cpp/src/Ice/NetworkF.h +1 -1
  297. data/ext/ice/cpp/src/Ice/NetworkProxy.cpp +1 -1
  298. data/ext/ice/cpp/src/Ice/NetworkProxy.h +1 -1
  299. data/ext/ice/cpp/src/Ice/NetworkProxyF.h +1 -1
  300. data/ext/ice/cpp/src/Ice/Object.cpp +1 -1
  301. data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +11 -5
  302. data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +10 -4
  303. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +9 -9
  304. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.h +2 -2
  305. data/ext/ice/cpp/src/Ice/ObjectAdapterI.cpp +3 -3
  306. data/ext/ice/cpp/src/Ice/ObjectAdapterI.h +5 -5
  307. data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +11 -5
  308. data/ext/ice/cpp/src/Ice/ObjectFactoryF.cpp +10 -4
  309. data/ext/ice/cpp/src/Ice/ObjectFactoryManager.cpp +9 -10
  310. data/ext/ice/cpp/src/Ice/ObjectFactoryManager.h +1 -1
  311. data/ext/ice/cpp/src/Ice/ObserverHelper.cpp +1 -1
  312. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.cpp +6 -5
  313. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.h +1 -1
  314. data/ext/ice/cpp/src/Ice/Outgoing.cpp +209 -254
  315. data/ext/ice/cpp/src/Ice/OutgoingAsync.cpp +120 -106
  316. data/ext/ice/cpp/src/Ice/Plugin.cpp +12 -6
  317. data/ext/ice/cpp/src/Ice/PluginF.cpp +10 -4
  318. data/ext/ice/cpp/src/Ice/PluginManagerI.cpp +21 -2
  319. data/ext/ice/cpp/src/Ice/Process.cpp +25 -19
  320. data/ext/ice/cpp/src/Ice/ProcessF.cpp +10 -4
  321. data/ext/ice/cpp/src/Ice/Properties.cpp +11 -5
  322. data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +39 -33
  323. data/ext/ice/cpp/src/Ice/PropertiesAdminI.cpp +1 -1
  324. data/ext/ice/cpp/src/Ice/PropertiesAdminI.h +1 -1
  325. data/ext/ice/cpp/src/Ice/PropertiesF.cpp +10 -4
  326. data/ext/ice/cpp/src/Ice/PropertiesI.cpp +1 -1
  327. data/ext/ice/cpp/src/Ice/PropertiesI.h +1 -1
  328. data/ext/ice/cpp/src/Ice/PropertyNames.cpp +12 -8
  329. data/ext/ice/cpp/src/Ice/PropertyNames.h +2 -2
  330. data/ext/ice/cpp/src/Ice/Protocol.cpp +7 -7
  331. data/ext/ice/cpp/src/Ice/ProtocolInstance.cpp +9 -6
  332. data/ext/ice/cpp/src/Ice/ProtocolInstance.h +25 -7
  333. data/ext/ice/cpp/src/Ice/ProtocolInstanceF.h +1 -1
  334. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +1 -1
  335. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.h +1 -1
  336. data/ext/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +1 -1
  337. data/ext/ice/cpp/src/Ice/Proxy.cpp +32 -13
  338. data/ext/ice/cpp/src/Ice/ProxyFactory.cpp +1 -1
  339. data/ext/ice/cpp/src/Ice/ProxyFactory.h +1 -1
  340. data/ext/ice/cpp/src/Ice/Reference.cpp +101 -86
  341. data/ext/ice/cpp/src/Ice/Reference.h +16 -9
  342. data/ext/ice/cpp/src/Ice/ReferenceFactory.cpp +1 -1
  343. data/ext/ice/cpp/src/Ice/ReferenceFactory.h +1 -1
  344. data/ext/ice/cpp/src/Ice/ReferenceFactoryF.h +1 -1
  345. data/ext/ice/cpp/src/Ice/RegisterPlugins.cpp +28 -0
  346. data/ext/ice/cpp/src/Ice/RegisterPlugins.h +25 -0
  347. data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +92 -86
  348. data/ext/ice/cpp/src/Ice/ReplyStatus.h +1 -1
  349. data/ext/ice/cpp/src/Ice/RequestHandler.cpp +1 -1
  350. data/ext/ice/cpp/src/Ice/RequestHandler.h +4 -8
  351. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.cpp +24 -16
  352. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.h +5 -4
  353. data/ext/ice/cpp/src/Ice/ResponseHandler.cpp +1 -1
  354. data/ext/ice/cpp/src/Ice/ResponseHandler.h +3 -3
  355. data/ext/ice/cpp/src/Ice/RetryQueue.cpp +16 -5
  356. data/ext/ice/cpp/src/Ice/RetryQueue.h +3 -2
  357. data/ext/ice/cpp/src/Ice/RetryQueueF.h +1 -1
  358. data/ext/ice/cpp/src/Ice/Router.cpp +27 -21
  359. data/ext/ice/cpp/src/Ice/RouterF.cpp +10 -4
  360. data/ext/ice/cpp/src/Ice/RouterInfo.cpp +1 -1
  361. data/ext/ice/cpp/src/Ice/RouterInfo.h +1 -1
  362. data/ext/ice/cpp/src/Ice/RouterInfoF.h +1 -1
  363. data/ext/ice/cpp/src/Ice/Selector.cpp +480 -1
  364. data/ext/ice/cpp/src/Ice/Selector.h +130 -1
  365. data/ext/ice/cpp/src/Ice/ServantLocator.cpp +11 -5
  366. data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +10 -4
  367. data/ext/ice/cpp/src/Ice/ServantManager.cpp +29 -23
  368. data/ext/ice/cpp/src/Ice/ServantManager.h +1 -1
  369. data/ext/ice/cpp/src/Ice/SharedContext.h +1 -1
  370. data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +10 -4
  371. data/ext/ice/cpp/src/Ice/SliceChecksums.cpp +1 -1
  372. data/ext/ice/cpp/src/Ice/SlicedData.cpp +1 -1
  373. data/ext/ice/cpp/src/Ice/Stream.cpp +1 -1
  374. data/ext/ice/cpp/src/Ice/StreamI.cpp +1 -1
  375. data/ext/ice/cpp/src/Ice/StreamI.h +1 -1
  376. data/ext/ice/cpp/src/Ice/StreamSocket.cpp +30 -22
  377. data/ext/ice/cpp/src/Ice/StreamSocket.h +7 -4
  378. data/ext/ice/cpp/src/Ice/StringConverterPlugin.cpp +1 -1
  379. data/ext/ice/cpp/src/Ice/SysLoggerI.cpp +1 -1
  380. data/ext/ice/cpp/src/Ice/SysLoggerI.h +1 -1
  381. data/ext/ice/cpp/src/Ice/TcpAcceptor.cpp +8 -8
  382. data/ext/ice/cpp/src/Ice/TcpAcceptor.h +1 -1
  383. data/ext/ice/cpp/src/Ice/TcpConnector.cpp +1 -1
  384. data/ext/ice/cpp/src/Ice/TcpConnector.h +1 -1
  385. data/ext/ice/cpp/src/Ice/TcpEndpointI.cpp +21 -38
  386. data/ext/ice/cpp/src/Ice/TcpEndpointI.h +5 -6
  387. data/ext/ice/cpp/src/Ice/TcpTransceiver.cpp +29 -4
  388. data/ext/ice/cpp/src/Ice/TcpTransceiver.h +7 -2
  389. data/ext/ice/cpp/src/Ice/ThreadPool.cpp +2 -2
  390. data/ext/ice/cpp/src/Ice/ThreadPool.h +1 -1
  391. data/ext/ice/cpp/src/Ice/TraceLevels.cpp +2 -2
  392. data/ext/ice/cpp/src/Ice/TraceLevels.h +1 -1
  393. data/ext/ice/cpp/src/Ice/TraceLevelsF.h +1 -1
  394. data/ext/ice/cpp/src/Ice/TraceUtil.cpp +16 -7
  395. data/ext/ice/cpp/src/Ice/TraceUtil.h +1 -1
  396. data/ext/ice/cpp/src/Ice/Transceiver.cpp +1 -1
  397. data/ext/ice/cpp/src/Ice/Transceiver.h +2 -1
  398. data/ext/ice/cpp/src/Ice/TransceiverF.h +1 -1
  399. data/ext/ice/cpp/src/Ice/UdpConnector.cpp +1 -1
  400. data/ext/ice/cpp/src/Ice/UdpConnector.h +1 -1
  401. data/ext/ice/cpp/src/Ice/UdpEndpointI.cpp +13 -39
  402. data/ext/ice/cpp/src/Ice/UdpEndpointI.h +2 -5
  403. data/ext/ice/cpp/src/Ice/UdpTransceiver.cpp +46 -10
  404. data/ext/ice/cpp/src/Ice/UdpTransceiver.h +3 -2
  405. data/ext/ice/cpp/src/Ice/Version.cpp +12 -6
  406. data/ext/ice/cpp/src/Ice/WSAcceptor.cpp +1 -1
  407. data/ext/ice/cpp/src/Ice/WSAcceptor.h +1 -1
  408. data/ext/ice/cpp/src/Ice/WSConnector.cpp +1 -1
  409. data/ext/ice/cpp/src/Ice/WSConnector.h +1 -1
  410. data/ext/ice/cpp/src/Ice/WSEndpoint.cpp +6 -38
  411. data/ext/ice/cpp/src/Ice/WSEndpoint.h +12 -1
  412. data/ext/ice/cpp/src/Ice/WSTransceiver.cpp +31 -35
  413. data/ext/ice/cpp/src/Ice/WSTransceiver.h +13 -1
  414. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +66 -60
  415. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +106 -100
  416. data/ext/ice/cpp/src/IceDiscovery/LocatorI.cpp +1 -1
  417. data/ext/ice/cpp/src/IceDiscovery/LocatorI.h +1 -1
  418. data/ext/ice/cpp/src/IceDiscovery/LookupI.cpp +76 -36
  419. data/ext/ice/cpp/src/IceDiscovery/LookupI.h +1 -1
  420. data/ext/ice/cpp/src/IceDiscovery/PluginI.cpp +19 -6
  421. data/ext/ice/cpp/src/IceDiscovery/PluginI.h +1 -1
  422. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.cpp +452 -0
  423. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.h +732 -0
  424. data/ext/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +520 -0
  425. data/ext/ice/cpp/src/IceLocatorDiscovery/PluginI.h +36 -0
  426. data/ext/ice/cpp/src/IceSSL/AcceptorI.cpp +8 -8
  427. data/ext/ice/cpp/src/IceSSL/AcceptorI.h +1 -1
  428. data/ext/ice/cpp/src/IceSSL/Certificate.cpp +49 -47
  429. data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +13 -5
  430. data/ext/ice/cpp/src/IceSSL/ConnectorI.cpp +1 -1
  431. data/ext/ice/cpp/src/IceSSL/ConnectorI.h +1 -1
  432. data/ext/ice/cpp/src/IceSSL/EndpointI.cpp +10 -38
  433. data/ext/ice/cpp/src/IceSSL/EndpointI.h +4 -3
  434. data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +13 -5
  435. data/ext/ice/cpp/src/IceSSL/Instance.cpp +2 -2
  436. data/ext/ice/cpp/src/IceSSL/Instance.h +1 -1
  437. data/ext/ice/cpp/src/IceSSL/InstanceF.h +1 -1
  438. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +107 -111
  439. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +130 -47
  440. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +11 -3
  441. data/ext/ice/cpp/src/IceSSL/PluginI.cpp +8 -14
  442. data/ext/ice/cpp/src/IceSSL/PluginI.h +1 -1
  443. data/ext/ice/cpp/src/IceSSL/RFC2253.cpp +1 -1
  444. data/ext/ice/cpp/src/IceSSL/RFC2253.h +1 -1
  445. data/ext/ice/cpp/src/IceSSL/SChannelEngine.cpp +238 -156
  446. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +93 -66
  447. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.h +7 -3
  448. data/ext/ice/cpp/src/IceSSL/SSLEngine.cpp +2 -2
  449. data/ext/ice/cpp/src/IceSSL/SSLEngine.h +32 -35
  450. data/ext/ice/cpp/src/IceSSL/SSLEngineF.h +1 -1
  451. data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +244 -360
  452. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +59 -29
  453. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +8 -4
  454. data/ext/ice/cpp/src/IceSSL/TrustManager.cpp +1 -1
  455. data/ext/ice/cpp/src/IceSSL/TrustManager.h +1 -1
  456. data/ext/ice/cpp/src/IceSSL/TrustManagerF.h +1 -1
  457. data/ext/ice/cpp/src/IceSSL/Util.cpp +427 -620
  458. data/ext/ice/cpp/src/IceSSL/Util.h +72 -15
  459. data/ext/ice/cpp/src/IceUtil/ArgVector.cpp +1 -1
  460. data/ext/ice/cpp/src/IceUtil/ArgVector.h +1 -1
  461. data/ext/ice/cpp/src/IceUtil/Cond.cpp +1 -1
  462. data/ext/ice/cpp/src/IceUtil/ConvertUTF.cpp +1 -1
  463. data/ext/ice/cpp/src/IceUtil/ConvertUTF.h +1 -1
  464. data/ext/ice/cpp/src/IceUtil/CountDownLatch.cpp +1 -1
  465. data/ext/ice/cpp/src/IceUtil/CtrlCHandler.cpp +1 -1
  466. data/ext/ice/cpp/src/IceUtil/Exception.cpp +105 -96
  467. data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +2 -1
  468. data/ext/ice/cpp/src/IceUtil/FileUtil.h +9 -1
  469. data/ext/ice/cpp/src/IceUtil/InputUtil.cpp +1 -1
  470. data/ext/ice/cpp/src/IceUtil/MutexProtocol.cpp +1 -1
  471. data/ext/ice/cpp/src/IceUtil/Options.cpp +1 -1
  472. data/ext/ice/cpp/src/IceUtil/OutputUtil.cpp +12 -25
  473. data/ext/ice/cpp/src/IceUtil/Random.cpp +1 -1
  474. data/ext/ice/cpp/src/IceUtil/RecMutex.cpp +1 -1
  475. data/ext/ice/cpp/src/IceUtil/SHA1.cpp +72 -10
  476. data/ext/ice/cpp/src/IceUtil/Shared.cpp +3 -132
  477. data/ext/ice/cpp/src/IceUtil/StopWatch.h +1 -1
  478. data/ext/ice/cpp/src/IceUtil/StringConverter.cpp +1 -1
  479. data/ext/ice/cpp/src/IceUtil/StringUtil.cpp +1 -1
  480. data/ext/ice/cpp/src/IceUtil/Thread.cpp +16 -1
  481. data/ext/ice/cpp/src/IceUtil/ThreadException.cpp +1 -1
  482. data/ext/ice/cpp/src/IceUtil/Time.cpp +1 -1
  483. data/ext/ice/cpp/src/IceUtil/Timer.cpp +1 -1
  484. data/ext/ice/cpp/src/IceUtil/UUID.cpp +1 -1
  485. data/ext/ice/cpp/src/IceUtil/Unicode.cpp +1 -1
  486. data/ext/ice/cpp/src/IceUtil/Unicode.h +1 -1
  487. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.cpp +62 -55
  488. data/ext/ice/cpp/src/Slice/Checksum.cpp +1 -1
  489. data/ext/ice/cpp/src/Slice/CsUtil.cpp +8 -29
  490. data/ext/ice/cpp/src/Slice/DotNetNames.cpp +1 -1
  491. data/ext/ice/cpp/src/Slice/FileTracker.cpp +1 -1
  492. data/ext/ice/cpp/src/Slice/Grammar.cpp +1 -1
  493. data/ext/ice/cpp/src/Slice/GrammarUtil.h +1 -1
  494. data/ext/ice/cpp/src/Slice/JavaUtil.cpp +145 -172
  495. data/ext/ice/cpp/src/Slice/MD5.cpp +1 -1
  496. data/ext/ice/cpp/src/Slice/MD5.h +1 -1
  497. data/ext/ice/cpp/src/Slice/ObjCUtil.cpp +1310 -0
  498. data/ext/ice/cpp/src/Slice/PHPUtil.cpp +1 -1
  499. data/ext/ice/cpp/src/Slice/Parser.cpp +65 -187
  500. data/ext/ice/cpp/src/Slice/Preprocessor.cpp +61 -9
  501. data/ext/ice/cpp/src/Slice/Python.cpp +36 -3
  502. data/ext/ice/cpp/src/Slice/PythonUtil.cpp +10 -10
  503. data/ext/ice/cpp/src/Slice/Ruby.cpp +34 -3
  504. data/ext/ice/cpp/src/Slice/RubyUtil.cpp +8 -7
  505. data/ext/ice/cpp/src/Slice/Scanner.cpp +1 -1
  506. data/ext/ice/cpp/src/Slice/Util.cpp +137 -30
  507. data/ext/ice/mcpp/LICENSE +29 -0
  508. data/ext/ice/mcpp/Makefile +60 -0
  509. data/ext/ice/mcpp/Makefile.mak +46 -0
  510. data/ext/ice/mcpp/README.md +30 -0
  511. data/ext/ice/mcpp/config.h +89 -0
  512. data/ext/ice/mcpp/configed.H +1 -146
  513. data/ext/ice/mcpp/directive.c +115 -410
  514. data/ext/ice/mcpp/eval.c +38 -377
  515. data/ext/ice/mcpp/expand.c +155 -852
  516. data/ext/ice/mcpp/internal.H +10 -44
  517. data/ext/ice/mcpp/main.c +6 -345
  518. data/ext/ice/mcpp/mbchar.c +17 -654
  519. data/ext/ice/mcpp/mcpp.gyp +62 -0
  520. data/ext/ice/mcpp/support.c +116 -943
  521. data/ext/ice/mcpp/system.H +0 -23
  522. data/ext/ice/mcpp/system.c +81 -2321
  523. data/ice.gemspec +3 -4
  524. data/lib/Glacier2.rb +1 -1
  525. data/lib/Glacier2/Metrics.rb +2 -2
  526. data/lib/Glacier2/PermissionsVerifier.rb +2 -2
  527. data/lib/Glacier2/PermissionsVerifierF.rb +2 -2
  528. data/lib/Glacier2/Router.rb +2 -2
  529. data/lib/Glacier2/RouterF.rb +2 -2
  530. data/lib/Glacier2/SSLInfo.rb +2 -2
  531. data/lib/Glacier2/Session.rb +2 -2
  532. data/lib/Ice.rb +1 -1
  533. data/lib/Ice/BuiltinSequences.rb +2 -2
  534. data/lib/Ice/Communicator.rb +2 -2
  535. data/lib/Ice/CommunicatorF.rb +2 -2
  536. data/lib/Ice/Connection.rb +26 -14
  537. data/lib/Ice/ConnectionF.rb +2 -2
  538. data/lib/Ice/Current.rb +2 -2
  539. data/lib/Ice/Endpoint.rb +4 -2
  540. data/lib/Ice/EndpointF.rb +2 -2
  541. data/lib/Ice/EndpointTypes.rb +2 -2
  542. data/lib/Ice/FacetMap.rb +2 -2
  543. data/lib/Ice/Identity.rb +2 -2
  544. data/lib/Ice/ImplicitContext.rb +2 -2
  545. data/lib/Ice/ImplicitContextF.rb +2 -2
  546. data/lib/Ice/Instrumentation.rb +2 -2
  547. data/lib/Ice/InstrumentationF.rb +2 -2
  548. data/lib/Ice/LocalException.rb +2 -2
  549. data/lib/Ice/Locator.rb +2 -2
  550. data/lib/Ice/LocatorF.rb +2 -2
  551. data/lib/Ice/Logger.rb +2 -2
  552. data/lib/Ice/LoggerF.rb +2 -2
  553. data/lib/Ice/Metrics.rb +2 -2
  554. data/lib/Ice/ObjectAdapterF.rb +2 -2
  555. data/lib/Ice/ObjectFactory.rb +2 -2
  556. data/lib/Ice/ObjectFactoryF.rb +2 -2
  557. data/lib/Ice/Plugin.rb +2 -2
  558. data/lib/Ice/PluginF.rb +2 -2
  559. data/lib/Ice/Process.rb +2 -2
  560. data/lib/Ice/ProcessF.rb +2 -2
  561. data/lib/Ice/Properties.rb +2 -2
  562. data/lib/Ice/PropertiesAdmin.rb +2 -2
  563. data/lib/Ice/PropertiesF.rb +2 -2
  564. data/lib/Ice/Router.rb +2 -2
  565. data/lib/Ice/RouterF.rb +2 -2
  566. data/lib/Ice/SliceChecksumDict.rb +2 -2
  567. data/lib/Ice/Version.rb +2 -2
  568. data/lib/IceBox.rb +1 -1
  569. data/lib/IceBox/IceBox.rb +2 -2
  570. data/lib/IceGrid.rb +1 -1
  571. data/lib/IceGrid/Admin.rb +2 -2
  572. data/lib/IceGrid/Descriptor.rb +2 -2
  573. data/lib/IceGrid/Exception.rb +2 -2
  574. data/lib/IceGrid/FileParser.rb +2 -2
  575. data/lib/IceGrid/Locator.rb +2 -2
  576. data/lib/IceGrid/Observer.rb +2 -2
  577. data/lib/IceGrid/Query.rb +2 -2
  578. data/lib/IceGrid/Registry.rb +2 -2
  579. data/lib/IceGrid/Session.rb +2 -2
  580. data/lib/IceGrid/UserAccountMapper.rb +2 -2
  581. data/lib/IcePatch2.rb +1 -1
  582. data/lib/IcePatch2/FileInfo.rb +52 -2
  583. data/lib/IcePatch2/FileServer.rb +33 -4
  584. data/lib/IceStorm.rb +1 -1
  585. data/lib/IceStorm/IceStorm.rb +2 -2
  586. data/lib/IceStorm/Metrics.rb +2 -2
  587. data/slice/Freeze/BackgroundSaveEvictor.ice +2 -2
  588. data/slice/Freeze/CatalogData.ice +2 -2
  589. data/slice/Freeze/Connection.ice +2 -2
  590. data/slice/Freeze/ConnectionF.ice +2 -2
  591. data/slice/Freeze/DB.ice +2 -2
  592. data/slice/Freeze/Evictor.ice +2 -2
  593. data/slice/Freeze/EvictorF.ice +2 -2
  594. data/slice/Freeze/EvictorStorage.ice +2 -2
  595. data/slice/Freeze/Exception.ice +2 -2
  596. data/slice/Freeze/Transaction.ice +2 -2
  597. data/slice/Freeze/TransactionalEvictor.ice +2 -2
  598. data/slice/Glacier2/Metrics.ice +7 -6
  599. data/slice/Glacier2/PermissionsVerifier.ice +4 -3
  600. data/slice/Glacier2/PermissionsVerifierF.ice +3 -2
  601. data/slice/Glacier2/Router.ice +4 -3
  602. data/slice/Glacier2/RouterF.ice +3 -2
  603. data/slice/Glacier2/SSLInfo.ice +3 -2
  604. data/slice/Glacier2/Session.ice +12 -11
  605. data/slice/Ice/BuiltinSequences.ice +4 -3
  606. data/slice/Ice/Communicator.ice +22 -25
  607. data/slice/Ice/CommunicatorF.ice +3 -2
  608. data/slice/Ice/Connection.ice +39 -11
  609. data/slice/Ice/ConnectionF.ice +3 -2
  610. data/slice/Ice/Current.ice +4 -3
  611. data/slice/Ice/Endpoint.ice +11 -3
  612. data/slice/Ice/EndpointF.ice +3 -2
  613. data/slice/Ice/EndpointTypes.ice +3 -2
  614. data/slice/Ice/FacetMap.ice +3 -2
  615. data/slice/Ice/Identity.ice +3 -2
  616. data/slice/Ice/ImplicitContext.ice +3 -2
  617. data/slice/Ice/ImplicitContextF.ice +3 -2
  618. data/slice/Ice/Instrumentation.ice +4 -2
  619. data/slice/Ice/InstrumentationF.ice +4 -2
  620. data/slice/Ice/LocalException.ice +29 -10
  621. data/slice/Ice/Locator.ice +5 -3
  622. data/slice/Ice/LocatorF.ice +3 -2
  623. data/slice/Ice/Logger.ice +3 -2
  624. data/slice/Ice/LoggerF.ice +3 -2
  625. data/slice/Ice/Metrics.ice +15 -14
  626. data/slice/Ice/ObjectAdapter.ice +5 -4
  627. data/slice/Ice/ObjectAdapterF.ice +3 -2
  628. data/slice/Ice/ObjectFactory.ice +3 -2
  629. data/slice/Ice/ObjectFactoryF.ice +3 -2
  630. data/slice/Ice/Plugin.ice +3 -2
  631. data/slice/Ice/PluginF.ice +3 -2
  632. data/slice/Ice/Process.ice +3 -2
  633. data/slice/Ice/ProcessF.ice +3 -2
  634. data/slice/Ice/Properties.ice +3 -2
  635. data/slice/Ice/PropertiesAdmin.ice +3 -2
  636. data/slice/Ice/PropertiesF.ice +3 -2
  637. data/slice/Ice/RemoteLogger.ice +3 -2
  638. data/slice/Ice/Router.ice +3 -2
  639. data/slice/Ice/RouterF.ice +3 -2
  640. data/slice/Ice/ServantLocator.ice +3 -2
  641. data/slice/Ice/ServantLocatorF.ice +3 -2
  642. data/slice/Ice/SliceChecksumDict.ice +3 -2
  643. data/slice/Ice/Version.ice +3 -2
  644. data/slice/IceBox/IceBox.ice +2 -2
  645. data/slice/IceDiscovery/IceDiscovery.ice +2 -2
  646. data/slice/IceGrid/Admin.ice +49 -48
  647. data/slice/IceGrid/Descriptor.ice +3 -2
  648. data/slice/IceGrid/Exception.ice +6 -5
  649. data/slice/IceGrid/FileParser.ice +4 -3
  650. data/slice/IceGrid/Locator.ice +4 -3
  651. data/slice/IceGrid/Observer.ice +28 -27
  652. data/slice/IceGrid/PluginFacade.ice +3 -2
  653. data/slice/IceGrid/Query.ice +3 -2
  654. data/slice/IceGrid/Registry.ice +4 -3
  655. data/slice/IceGrid/Session.ice +9 -8
  656. data/slice/IceGrid/UserAccountMapper.ice +4 -3
  657. data/slice/{IceGrid/Discovery.ice → IceLocatorDiscovery/IceLocatorDiscovery.ice} +12 -14
  658. data/slice/IcePatch2/FileInfo.ice +31 -2
  659. data/slice/IcePatch2/FileServer.ice +63 -5
  660. data/slice/IceSSL/ConnectionInfo.ice +17 -2
  661. data/slice/IceSSL/EndpointInfo.ice +21 -3
  662. data/slice/IceStorm/IceStorm.ice +3 -2
  663. data/slice/IceStorm/Metrics.ice +4 -3
  664. metadata +27 -23
  665. data/ext/ice/cpp/include/Ice/Makefile +0 -26
  666. data/ext/ice/cpp/include/IceSSL/Makefile +0 -26
  667. data/ext/ice/cpp/include/IceUtil/Makefile +0 -26
  668. data/ext/ice/cpp/include/Slice/Makefile +0 -26
  669. data/ext/ice/cpp/src/Ice/Application.cpp +0 -760
  670. data/ext/ice/cpp/src/Ice/EventLoggerMsg.h +0 -53
  671. data/ext/ice/cpp/src/Ice/Makefile +0 -190
  672. data/ext/ice/cpp/src/Ice/Service.cpp +0 -1897
  673. data/ext/ice/cpp/src/IceDiscovery/Makefile +0 -61
  674. data/ext/ice/cpp/src/IceSSL/Makefile +0 -82
  675. data/ext/ice/cpp/src/IceUtil/Makefile +0 -68
  676. data/ext/ice/cpp/src/Slice/Makefile +0 -65
  677. data/ext/ice/mcpp/config.h.Darwin +0 -227
  678. data/ext/ice/mcpp/config.h.Linux +0 -227
  679. data/ext/ice/mcpp/config.h.MINGW +0 -7
@@ -34,12 +34,8 @@
34
34
  * The macro expansion routines are placed here.
35
35
  */
36
36
 
37
- #if PREPROCESSED
38
- #include "mcpp.H"
39
- #else
40
37
  #include "system.H"
41
38
  #include "internal.H"
42
- #endif
43
39
 
44
40
  #define ARG_ERROR (-255)
45
41
  #define CERROR 1
@@ -58,17 +54,10 @@ typedef struct magic_seq { /* Data of a sequence inserted between tokens */
58
54
  } MAGIC_SEQ;
59
55
 
60
56
  static int compat_mode;
61
- /* Expand recursive macro more than Standard (for compatibility with GNUC) */
62
- #if COMPILER == GNUC
63
- static int ansi; /* __STRICT_ANSI__ flag */
64
- #endif
65
57
 
66
58
  static char * expand_std( DEFBUF * defp, char * out, char * out_end
67
59
  , LINE_COL line_col, int * pragma_op);
68
60
  /* Expand a macro completely (for Standard modes) */
69
- static char * expand_prestd( DEFBUF * defp, char * out, char * out_end
70
- , LINE_COL line_col, int * pragma_op);
71
- /* Expand a macro completely (for pre-Standard modes) */
72
61
  static DEFBUF * is_macro_call( DEFBUF * defp, char ** cp, char ** endf
73
62
  , MAGIC_SEQ * mgc_seq); /* Is this really a macro call ? */
74
63
  static int collect_args( const DEFBUF * defp, char ** arglist, int m_num);
@@ -97,20 +86,14 @@ static const char * const unterm_macro
97
86
  = "Unterminated macro call \"%s\""; /* _E_ */
98
87
  static const char * const narg_error
99
88
  = "%s than necessary %ld argument(s) in macro call \"%s\""; /* _E_ _W1_ */
100
- static const char * const only_name
101
- = "Macro \"%s\" needs arguments"; /* _W8_ */
102
89
 
103
90
  void expand_init(
104
- int compat, /* "Compatible" to GNUC expansion of recursive macro*/
105
- int strict_ansi /* __STRICT_ANSI__ flag for GNUC */
91
+ int compat /* "Compatible" to GNUC expansion of recursive macro*/
106
92
  )
107
93
  /* Set expand_macro() function */
108
94
  {
109
- expand_macro = standard ? expand_std : expand_prestd;
95
+ expand_macro = expand_std;
110
96
  compat_mode = compat;
111
- #if COMPILER == GNUC
112
- ansi = strict_ansi;
113
- #endif
114
97
  }
115
98
 
116
99
  DEFBUF * is_macro(
@@ -146,12 +129,10 @@ static DEFBUF * is_macro_call(
146
129
  c = squeeze_ws( cp, endf, mgc_seq); /* See the next char. */
147
130
  if (c == CHAR_EOF) /* End of file */
148
131
  unget_string( "\n", NULL); /* Restore skipped '\n' */
149
- else if (! standard || c != RT_END)
132
+ else if (c != RT_END)
150
133
  /* Still in the file and rescan boundary ? */
151
134
  unget_ch(); /* To see it again */
152
135
  if (c != '(') { /* Only the name of function-like macro */
153
- if (! standard && warn_level & 8)
154
- cwarn( only_name, defp->name, 0L, NULL);
155
136
  return NULL;
156
137
  }
157
138
  }
@@ -235,8 +216,6 @@ static int print_macro_inf( int c, char ** cpp, char ** opp);
235
216
  static char * print_macro_arg( char *out, MACRO_INF * m_inf, int argn
236
217
  , int real_arg, int start);
237
218
  /* Embed macro arg inf into comments*/
238
- static char * chk_magic_balance( char * buf, char * buf_end, int move
239
- , int diag); /* Check imbalance of magics */
240
219
  static char * replace( DEFBUF * defp, char * out, char * out_end
241
220
  , const DEFBUF * outer, FILEINFO * rt_file, LINE_COL line_col
242
221
  , int in_src_n);
@@ -251,7 +230,7 @@ static int prescan( const DEFBUF * defp, const char ** arglist
251
230
  static char * catenate( const DEFBUF * defp, const char ** arglist
252
231
  , char * out, char * out_end, char ** token_p);
253
232
  /* Catenate tokens */
254
- static const char * remove_magics( const char * argp, int from_last);
233
+ static char * remove_magics( const char * argp, int from_last);
255
234
  /* Remove pair of magic characters */
256
235
  #if DEBUG_MACRO_ANN
257
236
  static void chk_symmetry( char * start_id, char * end_id, size_t len);
@@ -296,7 +275,7 @@ static char * expand_std(
296
275
  macro_line = src_line; /* Line number for diag */
297
276
  macro_name = defp->name;
298
277
  rescan_level = 0;
299
- trace_macro = (mcpp_mode == STD) && (mcpp_debug & MACRO_CALL)
278
+ trace_macro = (mcpp_debug & MACRO_CALL)
300
279
  && ! in_directive;
301
280
  if (trace_macro) {
302
281
  max_mac_num = INIT_MAC_INF;
@@ -330,40 +309,36 @@ static char * expand_std(
330
309
  while ((c = *cp++) != EOS) {
331
310
  if (c == DEF_MAGIC)
332
311
  continue; /* Skip DEF_MAGIC */
333
- if (mcpp_mode == STD) {
334
- if (c == IN_SRC) { /* Skip IN_SRC */
335
- if (trace_macro)
336
- cp += 2; /* Skip also the number (coded in 2 bytes) */
337
- continue;
338
- } else if (c == TOK_SEP) {
339
- /* Remove redundant token separator */
340
- if ((char_type[ c1 & UCHARMAX] & HSP)
341
- || (char_type[ *cp & UCHARMAX] & HSP)
342
- || in_include || option_flags.lang_asm
343
- || (*cp == MAC_INF && *(cp + 1) == MAC_CALL_END)
344
- || (!option_flags.v && c1 == MAC_CALL_END)
345
- || (option_flags.v
346
- && *(cp - MAC_E_LEN_V - 1) == MAC_INF
347
- && *(cp - MAC_E_LEN_V) == MAC_CALL_END))
348
- continue;
349
- /* Skip separator just after ' ', '\t' */
350
- /* and just after MAC_CALL_END. */
351
- /* Also skip this in lang_asm mode, #include */
352
- /* Skip just before another TOK_SEP, ' ', '\t' */
353
- /* Skip just before MAC_INF,MAC_CALL_END seq too*/
354
- else
355
- c = ' '; /* Else convert to ' ' */
356
- } else if (trace_macro && (c == MAC_INF)) {
357
- /* Embed macro expansion informations into comments */
358
- c = *cp++;
359
- c1 = print_macro_inf( c, &cp, &out_p);
360
- if (out_end <= out_p) {
361
- cerror( macbuf_overflow, macro_name, 0, out);
362
- macro_line = MACRO_ERROR;
363
- goto exp_end;
364
- }
312
+
313
+ if (c == IN_SRC) { /* Skip IN_SRC */
314
+ if (trace_macro)
315
+ cp += 2; /* Skip also the number (coded in 2 bytes) */
316
+ continue;
317
+ } else if (c == TOK_SEP) {
318
+ /* Remove redundant token separator */
319
+ if ((char_type[ c1 & UCHARMAX] & HSP)
320
+ || (char_type[ *cp & UCHARMAX] & HSP)
321
+ || in_include
322
+ || (*cp == MAC_INF && *(cp + 1) == MAC_CALL_END)
323
+ || (c1 == MAC_CALL_END))
365
324
  continue;
325
+ /* Skip separator just after ' ', '\t' */
326
+ /* and just after MAC_CALL_END. */
327
+ /* Also skip this in lang_asm mode, #include */
328
+ /* Skip just before another TOK_SEP, ' ', '\t' */
329
+ /* Skip just before MAC_INF,MAC_CALL_END seq too*/
330
+ else
331
+ c = ' '; /* Else convert to ' ' */
332
+ } else if (trace_macro && (c == MAC_INF)) {
333
+ /* Embed macro expansion informations into comments */
334
+ c = *cp++;
335
+ c1 = print_macro_inf( c, &cp, &out_p);
336
+ if (out_end <= out_p) {
337
+ cerror( macbuf_overflow, macro_name, 0, out);
338
+ macro_line = MACRO_ERROR;
339
+ goto exp_end;
366
340
  }
341
+ continue;
367
342
  }
368
343
  *out_p++ = c1 = c;
369
344
  }
@@ -409,8 +384,7 @@ static int print_macro_inf(
409
384
  if (*((*opp) - 1) == '/' && *((*opp) - 2) != '*')
410
385
  /* Immediately preceding token is '/' (not '*' and '/') */
411
386
  *((*opp)++) = ' ';
412
- /* Insert a space to separate with following '/' and '*' */
413
- if (option_flags.v || c == MAC_CALL_START || c == MAC_ARG_START) {
387
+ if (c == MAC_CALL_START || c == MAC_ARG_START) {
414
388
  num = ((*(*cpp)++ & UCHARMAX) - 1) * UCHARMAX;
415
389
  num += (*(*cpp)++ & UCHARMAX) - 1;
416
390
  m_inf = & mac_inf[ num]; /* Saved information */
@@ -436,19 +410,9 @@ static int print_macro_inf(
436
410
  *opp = print_macro_arg( *opp, m_inf, i, FALSE, TRUE);
437
411
  break;
438
412
  case MAC_CALL_END : /* End of a macro expansion */
439
- if (option_flags.v) { /* Verbose mode */
440
- *opp += sprintf( *opp, "/*%s>*/", m_inf->defp->name);
441
- break;
442
- }
443
413
  /* Else fall through */
444
414
  case MAC_ARG_END : /* End of an argument */
445
- if (option_flags.v) {
446
- i = (*(*cpp)++ & UCHARMAX) - 1;
447
- /* Output verbose infs symmetrical to start of the arg infs */
448
- *opp = print_macro_arg( *opp, m_inf, i, FALSE, FALSE);
449
- } else {
450
- *opp = stpcpy( *opp, "/*>*/");
451
- }
415
+ *opp = stpcpy( *opp, "/*>*/");
452
416
  break;
453
417
  }
454
418
 
@@ -483,163 +447,7 @@ static char * print_macro_arg(
483
447
 
484
448
  return out;
485
449
  }
486
-
487
- static char * chk_magic_balance(
488
- char * buf, /* Sequence to check */
489
- char * buf_end, /* End of the sequence */
490
- int move, /* Move a straying magic ? */
491
- int diag /* Output a diagnostic? */
492
- )
493
- /*
494
- * Check imbalance of macro information magics and warn it.
495
- * get_an_arg() calls this routine setting 'move' argument on, hence a stray
496
- * magic is moved to an edge if found.
497
- * This routine does not do token parsing. Yet it will do fine practically.
498
- */
499
- {
500
- #define MAX_NEST_MAGICS 255
501
- char mac_id[ MAX_NEST_MAGICS][ MAC_E_LEN_V - 2];
502
- char arg_id[ MAX_NEST_MAGICS][ ARG_E_LEN_V - 2];
503
- char * mac_loc[ MAX_NEST_MAGICS];
504
- char * arg_loc[ MAX_NEST_MAGICS];
505
- char * mesg = "%s %ld %s-closing-comment(s) in tracing macro";
506
- int mac, arg;
507
- int mac_s_n, mac_e_n, arg_s_n, arg_e_n;
508
- char * buf_p = buf; /* Save 'buf' for debugging purpose */
509
-
510
- mac = arg = 0;
511
-
512
- while (buf_p < buf_end) {
513
- if (*buf_p++ != MAC_INF)
514
- continue;
515
- switch (*buf_p++) {
516
- case MAC_CALL_START :
517
- if (option_flags.v) {
518
- mac_loc[ mac] = buf_p - 2;
519
- memcpy( mac_id[ mac], buf_p, MAC_S_LEN - 2);
520
- }
521
- mac++;
522
- buf_p += MAC_S_LEN - 2;
523
- break;
524
- case MAC_ARG_START :
525
- if (option_flags.v) {
526
- arg_loc[ arg] = buf_p - 2;
527
- memcpy( arg_id[ arg], buf_p, ARG_S_LEN - 2);
528
- }
529
- arg++;
530
- buf_p += ARG_S_LEN - 2;
531
- break;
532
- case MAC_ARG_END :
533
- arg--;
534
- if (option_flags.v) {
535
- if (arg < 0) { /* Perhaps moved magic */
536
- if (diag)
537
- cwarn( mesg, "Redundant", (long) -arg, "argument");
538
- } else if (memcmp( arg_id[ arg], buf_p, ARG_E_LEN_V - 2) != 0)
539
- {
540
- char * to_be_edge = NULL;
541
- char * cur_edge;
542
-
543
- if (arg >= 1 && memcmp( arg_id[ 0], buf_p, ARG_E_LEN_V - 2)
544
- == 0) {
545
- to_be_edge = arg_loc[ arg];
546
- /* To be moved to top */
547
- cur_edge = arg_loc[ 0]; /* Current top */
548
- } else if (arg == 0) {
549
- char arg_end_magic[ 2] = { MAC_INF, MAC_ARG_END};
550
- cur_edge = buf_end - ARG_E_LEN_V;
551
- /* Search the last magic */
552
- /* Sequence from get_an_arg() is always */
553
- /* surrounded by starting of an arg magic */
554
- /* and its corresponding closing magic. */
555
- while (buf_p + (ARG_E_LEN_V - 2) <= cur_edge
556
- && memcmp( cur_edge, arg_end_magic, 2) != 0)
557
- cur_edge--;
558
- if (buf_p + (ARG_E_LEN_V - 2) <= cur_edge
559
- && memcmp( arg_id[ 0], cur_edge + 2
560
- , ARG_E_LEN_V - 2) == 0) {
561
- to_be_edge = buf_p - 2; /* To be moved to end */
562
- }
563
- }
564
- if (to_be_edge) { /* Appropriate place found */
565
- if (diag) {
566
- mac_s_n = ((to_be_edge[ 2] & UCHARMAX) - 1)
567
- * UCHARMAX;
568
- mac_s_n += (to_be_edge[ 3] & UCHARMAX) - 1;
569
- arg_s_n = (to_be_edge[ 4] & UCHARMAX) - 1;
570
- mcpp_fprintf( ERR,
571
- "Stray arg inf of macro: %d:%d at line:%d\n"
572
- , mac_s_n, arg_s_n, src_line);
573
- }
574
- if (move) {
575
- /* Move a stray magic to outside of sequences */
576
- char magic[ ARG_E_LEN_V];
577
- size_t len = ARG_E_LEN_V;
578
- memcpy( magic, cur_edge, len);
579
- /* Save current edge */
580
- if (to_be_edge == arg_loc[ arg])
581
- /* Shift followings to cur_edge */
582
- memmove( cur_edge, cur_edge + len
583
- , to_be_edge - cur_edge);
584
- else /* Shift precedents to cur_edge */
585
- memmove( to_be_edge + len, to_be_edge
586
- , cur_edge - to_be_edge);
587
- memcpy( to_be_edge, magic, len);
588
- /* Restore old 'cur_edge' into old 'to_be_edge' */
589
- }
590
- } else { /* Serious imbalance, just warn */
591
- char * arg_p = arg_id[ arg];
592
- arg_s_n = ((arg_p[ 0] & UCHARMAX) - 1) * UCHARMAX;
593
- arg_s_n += (arg_p[ 1] & UCHARMAX) - 1;
594
- arg_e_n = ((buf_p[ 0] & UCHARMAX) - 1) * UCHARMAX;
595
- arg_e_n += (buf_p[ 1] & UCHARMAX) - 1;
596
- mcpp_fprintf( ERR,
597
- "Asymmetry of arg inf found: start %d, end %d at line:%d\n"
598
- , arg_s_n, arg_e_n, src_line);
599
- }
600
- }
601
- buf_p += ARG_E_LEN_V - 2;
602
- }
603
- break;
604
- case MAC_CALL_END :
605
- mac--;
606
- if (option_flags.v) {
607
- if (mac < 0) {
608
- if (diag)
609
- cwarn( mesg, "Redundant", (long) -mac, "macro");
610
- } else if (memcmp( mac_id[ mac], buf_p, MAC_E_LEN_V - 2) != 0)
611
- {
612
- char * mac_p = mac_id[ mac];
613
- mac_s_n = ((mac_p[ 0] & UCHARMAX) - 1) * UCHARMAX;
614
- mac_s_n += (mac_p[ 1] & UCHARMAX) - 1;
615
- mac_e_n = ((buf_p[ 0] & UCHARMAX) - 1) * UCHARMAX;
616
- mac_e_n += (buf_p[ 1] & UCHARMAX) - 1;
617
- mcpp_fprintf( ERR,
618
- "Asymmetry of macro inf found: start %d, end %d at line:%d\n"
619
- , mac_s_n, mac_e_n, src_line);
620
- }
621
- buf_p += MAC_E_LEN_V - 2;
622
- }
623
- break;
624
- default : /* Not a MAC_INF sequence */
625
- break; /* Continue */
626
- }
627
- }
628
-
629
- if (diag && (warn_level & 1)) {
630
- if (mac > 0)
631
- cwarn( mesg, "Lacking", (long) mac, "macro");
632
- if (arg > 0)
633
- cwarn( mesg, "Lacking", (long) arg, "argument");
634
- if ((mac || arg) && (mcpp_debug & EXPAND))
635
- mcpp_fputs(
636
- "Imbalance of magics occurred (perhaps a moved magic), see <expand_std exit> and diagnostics.\n"
637
- , DBG);
638
- }
639
-
640
- return buf;
641
- }
642
-
450
+
643
451
  static char * replace(
644
452
  DEFBUF * defp, /* Macro to be replaced */
645
453
  char * out, /* Output Buffer */
@@ -710,7 +518,8 @@ static char * replace(
710
518
  } else {
711
519
  m_inf->locs.start_col = m_inf->locs.start_line = 0L;
712
520
  }
713
- m_inf->args = m_inf->loc_args = NULL; /* Default args */
521
+ m_inf->args = NULL;
522
+ m_inf->loc_args = NULL; /* Default args */
714
523
  for (num = 1, recurs = 0; num < m_num; num++)
715
524
  if (mac_inf[ num].defp == defp)
716
525
  recurs++; /* Recursively nested macro */
@@ -721,21 +530,17 @@ static char * replace(
721
530
 
722
531
  if (nargs < DEF_NOARGS_DYNAMIC) { /* __FILE__, __LINE__ */
723
532
  defp = def_special( defp); /* These are redefined dynamically */
724
- if (mcpp_mode == STD) {
725
533
  /* Wrap repl-text with token separators to prevent token merging */
726
- *cur_out++ = TOK_SEP;
727
- cur_out = stpcpy( cur_out, defp->repl);
728
- *cur_out++ = TOK_SEP;
729
- *cur_out = EOS;
730
- } else {
731
- cur_out = stpcpy( cur_out, defp->repl);
732
- }
534
+ *cur_out++ = TOK_SEP;
535
+ cur_out = stpcpy( cur_out, defp->repl);
536
+ *cur_out++ = TOK_SEP;
537
+ *cur_out = EOS;
733
538
  if (enable_trace_macro) {
734
539
  m_inf->defp = defp; /* Redefined dynamically*/
735
540
  cur_out = close_macro_inf( cur_out, m_num, in_src_n);
736
541
  }
737
542
  return cur_out;
738
- } else if (nargs == DEF_NOARGS_PREDEF_OLD && standard
543
+ } else if (nargs == DEF_NOARGS_PREDEF_OLD
739
544
  && (warn_level & 1)) { /* Some macros on GCC */
740
545
  cwarn( "Old style predefined macro \"%s\" is used", /* _W2_ */
741
546
  defp->name, 0L, NULL);
@@ -756,7 +561,7 @@ static char * replace(
756
561
  m_inf->args = arglist[ 0];
757
562
  m_inf->num_args = num_args; /* Number of actual args*/
758
563
  }
759
- if (mcpp_mode == STD && outer && rt_file != infile) {
564
+ if (outer && rt_file != infile) {
760
565
  /* Has read over replacement-text */
761
566
  if (compat_mode) {
762
567
  enable_repl( outer, FALSE); /* Enable re-expansion */
@@ -838,29 +643,17 @@ static char * replace(
838
643
  cur_out = out_p = out;
839
644
  while ((c = *cur_out++) != EOS) {
840
645
  if (c == MAC_INF) {
841
- if (! option_flags.v) {
842
- switch (*cur_out) {
843
- case MAC_ARG_START :
844
- cur_out++;
845
- /* Fall through */
846
- case MAC_CALL_START :
847
- cur_out++;
848
- cur_out++;
849
- /* Fall through */
850
- default:
851
- cur_out++;
852
- break;
853
- }
854
- } else {
855
- switch (*cur_out) {
856
- case MAC_ARG_START :
857
- case MAC_ARG_END :
858
- cur_out++;
859
- /* Fall through */
860
- default:
861
- cur_out += 3;
862
- break;
863
- }
646
+ switch (*cur_out) {
647
+ case MAC_ARG_START :
648
+ cur_out++;
649
+ /* Fall through */
650
+ case MAC_CALL_START :
651
+ cur_out++;
652
+ cur_out++;
653
+ /* Fall through */
654
+ default:
655
+ cur_out++;
656
+ break;
864
657
  }
865
658
  } else {
866
659
  *out_p++ = c;
@@ -889,10 +682,6 @@ static char * close_macro_inf(
889
682
  m_inf = & mac_inf[ m_num];
890
683
  *out_p++ = MAC_INF; /* Magic for end of macro expansion */
891
684
  *out_p++ = MAC_CALL_END;
892
- if (option_flags.v) {
893
- *out_p++ = (m_num / UCHARMAX) + 1;
894
- *out_p++ = (m_num % UCHARMAX) + 1;
895
- }
896
685
  *out_p = EOS;
897
686
  get_ch(); /* Clear the garbage */
898
687
  unget_ch();
@@ -988,16 +777,12 @@ static int prescan(
988
777
  * inserted here and there.
989
778
  */
990
779
 
991
- if (mcpp_mode == POST_STD) {
992
- file = unget_string( defp->repl, defp->name);
993
- } else {
994
- *out++ = TOK_SEP; /* Wrap replacement */
995
- workp = work_buf; /* text with token */
996
- workp = stpcpy( workp, defp->repl); /* separators to */
997
- *workp++ = TOK_SEP; /* prevent unintended*/
998
- *workp = EOS; /* token merging. */
999
- file = unget_string( work_buf, defp->name);
1000
- }
780
+ *out++ = TOK_SEP; /* Wrap replacement */
781
+ workp = work_buf; /* text with token */
782
+ workp = stpcpy( workp, defp->repl); /* separators to */
783
+ *workp++ = TOK_SEP; /* prevent unintended*/
784
+ *workp = EOS; /* token merging. */
785
+ file = unget_string( work_buf, defp->name);
1001
786
 
1002
787
  while (c = get_ch(), file == infile) { /* To the end of repl */
1003
788
 
@@ -1026,10 +811,6 @@ static int prescan(
1026
811
  out -= len;
1027
812
  *out = EOS; /* Remove DEF_MAGIC, IN_SRC */
1028
813
  }
1029
- #if COMPILER == GNUC
1030
- if (*prev_token == ',')
1031
- break; /* ', ##' sequence (peculiar to GCC) */
1032
- #endif
1033
814
  if (horiz_space == out - 1) {
1034
815
  *--out = EOS; /* Remove trailing white space */
1035
816
  horiz_space = NULL;
@@ -1080,7 +861,6 @@ static char * catenate(
1080
861
  * other characters.
1081
862
  */
1082
863
  {
1083
- FILEINFO * file;
1084
864
  char * prev_prev_token = NULL;
1085
865
  const char * invalid_token
1086
866
  = "Not a valid preprocessing token \"%s\""; /* _E_ _W2_ */
@@ -1096,34 +876,25 @@ static char * catenate(
1096
876
  out = prev_token; /* To overwrite */
1097
877
  if (trace_macro)
1098
878
  argp = remove_magics( argp, TRUE); /* Remove pair of magics */
1099
- if ((mcpp_mode == POST_STD && *argp == EOS)
1100
- || (mcpp_mode == STD && *argp == RT_END)) {
879
+ if (argp == (char*)RT_END) {
1101
880
  *out = EOS; /* An empty argument */
1102
881
  } else {
1103
- if (mcpp_mode == POST_STD) {
1104
- file = unget_string( argp, NULL);
1105
- while (c = get_ch(), file == infile) {
1106
- prev_token = out; /* Remember the last token */
1107
- scan_token( c, &out, out_end);
1108
- } /* Copy actual argument without expansion */
1109
- unget_ch();
1110
- } else {
1111
- unget_string( argp, NULL);
1112
- if (trace_macro)
1113
- free( (char *) argp);
1114
- /* malloc()ed in remove_magics() */
1115
- while ((c = get_ch()) != RT_END) {
1116
- prev_prev_token = prev_token;
1117
- prev_token = out; /* Remember the last token */
1118
- scan_token( c, &out, out_end);
1119
- } /* Copy actual argument without expansion */
1120
- if (*prev_token == TOK_SEP) {
1121
- out = prev_token;
1122
- prev_token = prev_prev_token; /* Skip separator */
1123
- }
882
+
883
+ unget_string( argp, NULL);
884
+ if (trace_macro)
885
+ free( (char *) argp);
886
+ /* malloc()ed in remove_magics() */
887
+ while ((c = get_ch()) != RT_END) {
888
+ prev_prev_token = prev_token;
889
+ prev_token = out; /* Remember the last token */
890
+ scan_token( c, &out, out_end);
891
+ } /* Copy actual argument without expansion */
892
+ if (*prev_token == TOK_SEP) {
893
+ out = prev_token;
894
+ prev_token = prev_prev_token; /* Skip separator */
1124
895
  }
1125
896
  if (*prev_token == DEF_MAGIC
1126
- || (mcpp_mode == STD && *prev_token == IN_SRC)) {
897
+ || (*prev_token == IN_SRC)) {
1127
898
  size_t len = 1;
1128
899
  if (trace_macro && *prev_token == IN_SRC)
1129
900
  len = IN_SRC_LEN;
@@ -1148,8 +919,7 @@ static char * catenate(
1148
919
  argp = arglist[ c]; /* Actual argument */
1149
920
  if (trace_macro)
1150
921
  argp = remove_magics( argp, FALSE); /* Remove pair of magics */
1151
- if ((mcpp_mode == POST_STD && *argp == EOS)
1152
- || (mcpp_mode == STD && *argp == RT_END)) {
922
+ if (*argp == RT_END) {
1153
923
  *out = EOS; /* An empty argument */
1154
924
  } else {
1155
925
  unget_string( argp, NULL);
@@ -1193,47 +963,30 @@ static char * catenate(
1193
963
  scan_token( c, (workp = work_buf, &workp), work_end);
1194
964
  infile->fp = NULL;
1195
965
  if (*infile->bptr != EOS) { /* More than a token */
1196
- if (option_flags.lang_asm) { /* Assembler source */
1197
- if (warn_level & 2)
1198
- diag_macro( CWARN, invalid_token, prev_token, 0L, NULL
1199
- , defp, NULL);
1200
- } else {
1201
- diag_macro( CERROR, invalid_token, prev_token, 0L, NULL, defp
1202
- , NULL);
1203
- }
966
+ diag_macro( CERROR, invalid_token, prev_token, 0L, NULL, defp
967
+ , NULL);
1204
968
  infile->bptr += strlen( infile->bptr);
1205
969
  }
1206
970
  get_ch(); /* To the parent "file" */
1207
971
  unget_ch();
1208
972
  }
1209
973
 
1210
- if (mcpp_mode == STD && ! option_flags.lang_asm) {
1211
- *out++ = TOK_SEP; /* Prevent token merging*/
1212
- *out = EOS;
1213
- }
974
+ *out++ = TOK_SEP; /* Prevent token merging*/
975
+ *out = EOS;
1214
976
  if (in_arg) { /* There are more tokens after the generated one */
1215
- if (mcpp_mode == POST_STD) {
1216
- file = infile;
1217
- while (c = get_ch(), file == infile) {
1218
- prev_token = out; /* Remember the last token */
1219
- scan_token( c, &out, out_end);
1220
- } /* Copy rest of argument without expansion */
1221
- unget_ch();
1222
- } else {
1223
- while ((c = get_ch()) != RT_END) {
1224
- if (c == TOK_SEP)
1225
- continue; /* Skip separator */
1226
- prev_token = out; /* Remember the last token */
1227
- scan_token( c, &out, out_end);
1228
- } /* Copy rest of argument without expansion */
1229
- }
977
+ while ((c = get_ch()) != RT_END) {
978
+ if (c == TOK_SEP)
979
+ continue; /* Skip separator */
980
+ prev_token = out; /* Remember the last token */
981
+ scan_token( c, &out, out_end);
982
+ } /* Copy rest of argument without expansion */
1230
983
  }
1231
984
  *token_p = prev_token; /* Report back the last token */
1232
985
 
1233
986
  return out;
1234
987
  }
1235
988
 
1236
- static const char * remove_magics(
989
+ static char * remove_magics(
1237
990
  const char * argp, /* The argument list */
1238
991
  int from_last /* token is the last or first? */
1239
992
  )
@@ -1330,19 +1083,6 @@ static const char * remove_magics(
1330
1083
  arg_id[ arg_n++][ ARG_E_LEN_V - 1] = FALSE;
1331
1084
  break;
1332
1085
  }
1333
- if (option_flags.v) {
1334
- switch (c) {
1335
- case MAC_CALL_END :
1336
- mac_id[ mac_n - 1][ 1] = *ap++ = get_ch();
1337
- mac_id[ mac_n - 1][ 2] = *ap++ = get_ch();
1338
- break;
1339
- case MAC_ARG_END :
1340
- arg_id[ arg_n - 1][ 1] = *ap++ = get_ch();
1341
- arg_id[ arg_n - 1][ 2] = *ap++ = get_ch();
1342
- arg_id[ arg_n - 1][ 3] = *ap++ = get_ch();
1343
- break;
1344
- }
1345
- }
1346
1086
  mgc_index[ ind++] = c; /* Index to mac_id[] and arg_id[] */
1347
1087
  continue;
1348
1088
  } else if (char_type[ c & UCHARMAX] & HSP) {
@@ -1393,11 +1133,6 @@ static const char * remove_magics(
1393
1133
  nest_e--;
1394
1134
  /* Search after the token */
1395
1135
  if (token < mac_loc[ mac_e] && nest_e == nest_s - 1) {
1396
- #if DEBUG_MACRO_ANN
1397
- if (option_flags.v)
1398
- chk_symmetry( mac_id[ mac_s], mac_id[ mac_e]
1399
- , MAC_E_LEN - 2);
1400
- #endif
1401
1136
  mac_id[ mac_e][ MAC_S_LEN - 1] = TRUE;
1402
1137
  /* To be removed */
1403
1138
  break; /* Done for this mac_s */
@@ -1430,11 +1165,6 @@ static const char * remove_magics(
1430
1165
  } else {
1431
1166
  nest_e--;
1432
1167
  if (token < arg_loc[ arg_e] && nest_e == nest_s - 1) {
1433
- #if DEBUG_MACRO_ANN
1434
- if (option_flags.v)
1435
- chk_symmetry( arg_id[ arg_s], arg_id[ arg_e]
1436
- , ARG_E_LEN_V - 2);
1437
- #endif
1438
1168
  arg_id[ arg_e][ ARG_S_LEN - 1] = TRUE;
1439
1169
  break;
1440
1170
  }
@@ -1474,7 +1204,7 @@ static const char * remove_magics(
1474
1204
  mark = MAC_S_LEN - 1;
1475
1205
  break;
1476
1206
  case MAC_CALL_END :
1477
- len = option_flags.v ? MAC_E_LEN_V : MAC_E_LEN;
1207
+ len = MAC_E_LEN;
1478
1208
  mark = MAC_E_LEN_V - 1;
1479
1209
  break;
1480
1210
  case MAC_ARG_START :
@@ -1482,7 +1212,7 @@ static const char * remove_magics(
1482
1212
  mark = ARG_S_LEN - 1;
1483
1213
  break;
1484
1214
  case MAC_ARG_END :
1485
- len = option_flags.v ? ARG_E_LEN_V : ARG_E_LEN;
1215
+ len = ARG_E_LEN;
1486
1216
  mark = ARG_E_LEN_V - 1;
1487
1217
  break;
1488
1218
  }
@@ -1559,15 +1289,13 @@ static char * stringize(
1559
1289
  * Make a string literal from an argument.
1560
1290
  */
1561
1291
  {
1562
- char arg_end_inf[ 8][ ARG_E_LEN_V - 1];
1563
- /* Verbose information of macro arguments */
1564
- FILEINFO * file;
1292
+
1565
1293
  int stray_bsl = FALSE; /* '\\' not in literal */
1566
1294
  char * out_p = out;
1567
1295
  int token_type;
1568
1296
  int num_arg_magic = 0;
1569
1297
  size_t len;
1570
- size_t arg_e_len = option_flags.v ? ARG_E_LEN_V : ARG_E_LEN;
1298
+ size_t arg_e_len = ARG_E_LEN;
1571
1299
  int c;
1572
1300
 
1573
1301
  if (trace_macro) {
@@ -1585,7 +1313,6 @@ static char * stringize(
1585
1313
  }
1586
1314
  }
1587
1315
 
1588
- file = unget_string( argp, NULL);
1589
1316
  len = strlen( infile->buffer); /* Sequence ends with RT_END */
1590
1317
  if (trace_macro) { /* Remove suffixed argument closing magics */
1591
1318
  /* There are 0 or more argument closing magic sequences and */
@@ -1598,12 +1325,6 @@ static char * stringize(
1598
1325
  || *(infile->buffer + len - 2) == TOK_SEP))) {
1599
1326
  if (*(infile->buffer + len - arg_e_len - 1) == MAC_INF
1600
1327
  && *(infile->buffer + len - arg_e_len) == MAC_ARG_END) {
1601
- if (option_flags.v) {
1602
- memcpy( arg_end_inf[ nmagic]
1603
- , infile->buffer + len - arg_e_len + 1
1604
- , arg_e_len - 2);
1605
- arg_end_inf[ nmagic][ arg_e_len - 2] = EOS;
1606
- }
1607
1328
  nmagic++;
1608
1329
  len -= arg_e_len;
1609
1330
  *(infile->buffer + len - 1) = RT_END;
@@ -1625,8 +1346,7 @@ static char * stringize(
1625
1346
  }
1626
1347
  *out_p++ = '"'; /* Starting quote */
1627
1348
 
1628
- while ((c = get_ch()), ((mcpp_mode == POST_STD && file == infile)
1629
- || (mcpp_mode == STD && c != RT_END))) {
1349
+ while ((c = get_ch()), (c != RT_END)) {
1630
1350
  if (c == ' ' || c == '\t') {
1631
1351
  *out_p++ = c;
1632
1352
  continue;
@@ -1650,17 +1370,6 @@ static char * stringize(
1650
1370
  get_ch();
1651
1371
  break;
1652
1372
  }
1653
- if (option_flags.v) {
1654
- switch (c) {
1655
- case MAC_ARG_END :
1656
- get_ch();
1657
- /* Fall through */
1658
- case MAC_CALL_END :
1659
- get_ch();
1660
- get_ch();
1661
- break;
1662
- }
1663
- }
1664
1373
  continue;
1665
1374
  }
1666
1375
  token_type = scan_token( c, (workp = work_buf, &workp), work_end);
@@ -1679,11 +1388,6 @@ static char * stringize(
1679
1388
  } else if (c == '"') {
1680
1389
  *out_p++ = '\\'; /* Insert '\\' */
1681
1390
  } else if (c == '\\') {
1682
- #if OK_UCN
1683
- if (mcpp_mode == POST_STD || ! stdc3
1684
- || (*workp != 'u' && *workp != 'U'))
1685
- /* Not UCN */
1686
- #endif
1687
1391
  *out_p++ = '\\';
1688
1392
  }
1689
1393
  *out_p++ = c;
@@ -1696,15 +1400,11 @@ static char * stringize(
1696
1400
  }
1697
1401
  }
1698
1402
 
1699
- if (mcpp_mode == POST_STD)
1700
- unget_ch();
1701
1403
  *out_p++ = '"'; /* Closing quote */
1702
1404
  if (trace_macro) {
1703
1405
  while (num_arg_magic--) {
1704
1406
  *out_p++ = MAC_INF; /* Restore removed magic*/
1705
1407
  *out_p++ = MAC_ARG_END;
1706
- if (option_flags.v)
1707
- out_p = stpcpy( out_p, arg_end_inf[ num_arg_magic]);
1708
1408
  }
1709
1409
  }
1710
1410
  *out_p = EOS;
@@ -1747,12 +1447,7 @@ static char * substitute(
1747
1447
  * the formal parameters in the replacement list.
1748
1448
  */
1749
1449
  {
1750
- char * out_start = out;
1751
- const char * arg;
1752
1450
  int c;
1753
- int gvar_arg; /* gvar_arg'th argument is GCC variable argument */
1754
-
1755
- gvar_arg = (defp->nargs & GVA_ARGS) ? (defp->nargs & ~AVA_ARGS) : 0;
1756
1451
  *out = EOS; /* Ensure to termanate */
1757
1452
 
1758
1453
  while ((c = *in++) != EOS) {
@@ -1762,45 +1457,6 @@ static char * substitute(
1762
1457
  mcpp_fprintf( DBG, " (expanding arg[%d])", c);
1763
1458
  dump_string( NULL, arglist[ c - 1]);
1764
1459
  }
1765
- #if COMPILER == GNUC || COMPILER == MSC
1766
- arg = arglist[ c - 1];
1767
- if (trace_macro) {
1768
- if (*arg == MAC_INF) {
1769
- if (*++arg == MAC_ARG_START)
1770
- arg += ARG_S_LEN - 1; /* Next to magic chars */
1771
- }
1772
- }
1773
- #if COMPILER == GNUC
1774
- if (c == gvar_arg && *arg == RT_END && ! ansi) {
1775
- /*
1776
- * GCC variadic macro and its variable argument is absent.
1777
- * Note that in its "strict-ansi" mode GCC does not remove
1778
- * ',', nevertheless it ignores '##' (inconsistent
1779
- * behavior). Though GCC2 changes behavior depending the
1780
- * ',' is preceded by space or not, we only count on the
1781
- * "strict-ansi" flag.
1782
- */
1783
- #else
1784
- if ((defp->nargs & VA_ARGS) && c == (defp->nargs & ~VA_ARGS)
1785
- && *arg == RT_END && mcpp_mode == STD) {
1786
- /* Visual C 2005 also removes ',' immediately preceding */
1787
- /* absent variable arguments. It does not use '##' though. */
1788
- #endif
1789
- char * tmp;
1790
- tmp = out - 1;
1791
- while (char_type[ *tmp & UCHARMAX] & HSP)
1792
- tmp--;
1793
- if (*tmp == ',') {
1794
- out = tmp; /* Remove the immediately preceding ',' */
1795
- if (warn_level & 1) {
1796
- *out = EOS;
1797
- diag_macro( CWARN,
1798
- "Removed ',' preceding the absent variable argument: %s" /* _W1_ */
1799
- , out_start, 0L, NULL, defp, NULL);
1800
- }
1801
- }
1802
- } else
1803
- #endif
1804
1460
  if ((out = rescan( NULL, arglist[ c - 1], out, out_end))
1805
1461
  == NULL) { /* Replace completely */
1806
1462
  return NULL; /* Error */
@@ -1841,10 +1497,6 @@ static char * rescan(
1841
1497
  int c; /* First character of token */
1842
1498
  int token_type;
1843
1499
  char * mac_arg_start = NULL;
1844
- #if COMPILER == GNUC
1845
- int within_defined = FALSE;
1846
- int within_defined_arg_depth = 0;
1847
- #endif
1848
1500
 
1849
1501
  if (mcpp_debug & EXPAND) {
1850
1502
  mcpp_fprintf( DBG, "rescan_level--%d (%s) "
@@ -1853,11 +1505,9 @@ static char * rescan(
1853
1505
  }
1854
1506
  if (! disable_repl( outer)) /* Don't re-replace replacing macro */
1855
1507
  return NULL; /* Too deeply nested macro call */
1856
- if (mcpp_mode == STD) {
1857
- get_ch(); /* Clear empty "file"s */
1858
- unget_ch(); /* for diagnostic */
1859
- cur_cp = infile->bptr; /* Remember current location */
1860
- }
1508
+ get_ch(); /* Clear empty "file"s */
1509
+ unget_ch(); /* for diagnostic */
1510
+ cur_cp = infile->bptr; /* Remember current location */
1861
1511
  file = unget_string( in, outer ? outer->name : NULL);
1862
1512
  /* Stack input on a "file" */
1863
1513
 
@@ -1887,41 +1537,14 @@ static char * rescan(
1887
1537
  *out_p++ = get_ch();
1888
1538
  break;
1889
1539
  case MAC_ARG_END :
1890
- if (! option_flags.v)
1891
- break;
1892
- else
1893
- *out_p++ = get_ch();
1894
- /* Fall through */
1540
+ break;
1895
1541
  case MAC_CALL_END :
1896
- if (option_flags.v) {
1897
- *out_p++ = get_ch();
1898
- *out_p++ = get_ch();
1899
- }
1900
1542
  break;
1901
1543
  } /* Pass these characters as they are */
1902
1544
  continue;
1903
1545
  }
1904
1546
  token_type = scan_token( c, (tp = out_p, &out_p), out_end);
1905
- #if COMPILER == GNUC
1906
- if (mcpp_mode == STD) {
1907
- /* Pass stuff within defined() as they are, if in_directive */
1908
- if ((within_defined || within_defined_arg_depth)) {
1909
- if (c == '(') {
1910
- within_defined_arg_depth++;
1911
- within_defined = FALSE;
1912
- } else if (within_defined_arg_depth && c == ')') {
1913
- within_defined_arg_depth--;
1914
- } /* Else should be a name (possibly macro) */
1915
- continue;
1916
- } else if (token_type == NAM && in_directive
1917
- && str_eq(identifier, "defined")) {
1918
- within_defined = TRUE;
1919
- /* 'defined' token in directive line */
1920
- continue;
1921
- }
1922
- }
1923
- #endif
1924
- if (mcpp_mode == STD && c == IN_SRC)
1547
+ if (c == IN_SRC)
1925
1548
  len = trace_macro ? IN_SRC_LEN : 1;
1926
1549
  if (token_type == NAM && c != DEF_MAGIC
1927
1550
  && (inner = look_id( tp + len)) != NULL) { /* A macro name */
@@ -1933,11 +1556,9 @@ static char * rescan(
1933
1556
  memset( &mgc_seq, 0, sizeof (MAGIC_SEQ));
1934
1557
  if (is_macro_call( inner, &out_p, &endf
1935
1558
  , trace_macro ? &mgc_seq : NULL)
1936
- && ((mcpp_mode == POST_STD && is_able_repl( inner))
1937
- || (mcpp_mode == STD
1938
- && (((is_able = is_able_repl( inner)) == YES)
1559
+ && ((((is_able = is_able_repl( inner)) == YES)
1939
1560
  || (is_able == READ_OVER
1940
- && (c == IN_SRC || compat_mode)))))) {
1561
+ && (c == IN_SRC || compat_mode))))) {
1941
1562
  /* Really a macro call */
1942
1563
  LINE_COL in_src_line_col = { 0L, 0};
1943
1564
  int in_src_n = 0;
@@ -1955,8 +1576,7 @@ static char * rescan(
1955
1576
  /* name and '('. This is a nuisance. */
1956
1577
  char * mgc_cleared;
1957
1578
  size_t seq_len;
1958
- size_t arg_elen = option_flags.v ? ARG_E_LEN_V
1959
- : ARG_E_LEN;
1579
+ size_t arg_elen = ARG_E_LEN;
1960
1580
  if ((tp - ARG_S_LEN) == mac_arg_start
1961
1581
  && *mgc_seq.magic_start == MAC_INF
1962
1582
  && *(mgc_seq.magic_start + 1) == MAC_ARG_END) {
@@ -1993,9 +1613,9 @@ static char * rescan(
1993
1613
  *out_p = EOS;
1994
1614
  }
1995
1615
  if ((is_able = is_able_repl( inner)) == NO
1996
- || (mcpp_mode == STD && is_able == READ_OVER
1616
+ || (is_able == READ_OVER
1997
1617
  && c != IN_SRC && ! compat_mode)) {
1998
- if (mcpp_mode == POST_STD || c != IN_SRC)
1618
+ if (c != IN_SRC)
1999
1619
  memmove( tp + 1, tp, (size_t) (out_p++ - tp));
2000
1620
  *tp = DEF_MAGIC; /* Mark not to replace */
2001
1621
  } /* Else not a macro call*/
@@ -2012,25 +1632,21 @@ static char * rescan(
2012
1632
 
2013
1633
  if (out_p) {
2014
1634
  *out_p = EOS;
2015
- if (mcpp_mode == STD) {
2016
1635
  if (c != RT_END) {
2017
- unget_ch();
2018
- if (outer != NULL) { /* outer isn't a macro in argument */
2019
- if (infile && infile->bptr != cur_cp
2020
- /* Have overrun replacement list*/
2021
- && !(tp && *tp == DEF_MAGIC)
2022
- /* Macro is enabled */
2023
- && ((!compat_mode && (warn_level & 1))
2024
- || (compat_mode && (warn_level & 8)))) {
2025
- diag_macro( CWARN,
1636
+ unget_ch();
1637
+ if (outer != NULL) { /* outer isn't a macro in argument */
1638
+ if (infile && infile->bptr != cur_cp
1639
+ /* Have overrun replacement list*/
1640
+ && !(tp && *tp == DEF_MAGIC)
1641
+ /* Macro is enabled */
1642
+ && ((!compat_mode && (warn_level & 1))
1643
+ || (compat_mode && (warn_level & 8)))) {
1644
+ diag_macro( CWARN,
2026
1645
  "Replacement text \"%s\" of macro %.0ld\"%s\" involved subsequent text" /* _W1_ */
2027
- , in, 0L, outer->name, outer, inner);
2028
- }
1646
+ , in, 0L, outer->name, outer, inner);
2029
1647
  }
2030
- } /* Else remove RT_END */
2031
- } else {
2032
- unget_ch();
2033
- }
1648
+ }
1649
+ } /* Else remove RT_END */
2034
1650
  }
2035
1651
  enable_repl( outer, TRUE); /* Enable macro for later text */
2036
1652
  if (mcpp_debug & EXPAND) {
@@ -2119,271 +1735,6 @@ static char * insert_to_bptr(
2119
1735
  return infile->buffer;
2120
1736
  }
2121
1737
 
2122
- /*
2123
- * M a c r o E x p a n s i o n i n P R E - S T A N D A R D M o d e
2124
- */
2125
-
2126
- #include "setjmp.h"
2127
-
2128
- static jmp_buf jump;
2129
-
2130
- static char * arglist_pre[ NMACPARS]; /* Pointers to args */
2131
-
2132
- static int rescan_pre( int c, char * mp, char * mac_end);
2133
- /* Replace a macro repeatedly */
2134
- static int replace_pre( DEFBUF * defp);
2135
- /* Replace a macro once */
2136
- static void substitute_pre( DEFBUF * defp);
2137
- /* Substitute parms with args */
2138
-
2139
- static char * expand_prestd(
2140
- DEFBUF * defp, /* Macro definition */
2141
- char * out, /* Output buffer */
2142
- char * out_end, /* End of output buffer */
2143
- LINE_COL line_col, /* Location of macro (not used in prestd) */
2144
- int * pragma_op /* Flag of _Pragma (not used in prestd) */
2145
- )
2146
- /*
2147
- * Expand a macro call completely, write the results to the specified buffer
2148
- * and return the advanced pointer.
2149
- */
2150
- {
2151
- char macrobuf[ NMACWORK + IDMAX]; /* Buffer for rescan_pre() */
2152
- char * mac_end = &macrobuf[ NMACWORK]; /* End of macrobuf[] */
2153
- char * out_p; /* Pointer into out[] */
2154
- char * mp = macrobuf; /* Pointer into macrobuf*/
2155
- int len; /* Length of a token */
2156
- int token_type; /* Type of token */
2157
- int c;
2158
-
2159
- macro_line = src_line; /* Line number for diag.*/
2160
- unget_string( identifier, identifier); /* To re-read */
2161
- macro_name = defp->name;
2162
- rescan_level = 0;
2163
- if (setjmp( jump) == 1) {
2164
- skip_macro();
2165
- mp = macrobuf;
2166
- *mp = EOS;
2167
- macro_line = MACRO_ERROR;
2168
- goto err_end;
2169
- }
2170
-
2171
- while ((c = get_ch()) != CHAR_EOF && infile->fp == NULL) {
2172
- /* While the input stream is a macro */
2173
- while (c == ' ' || c == '\t') { /* Output the spaces */
2174
- *mp++ = c;
2175
- c = get_ch();
2176
- if (infile == NULL || infile->fp != NULL)
2177
- goto exp_end;
2178
- }
2179
- token_type = rescan_pre( c, mp, mac_end); /* Scan token */
2180
- /* and expand. Result of expansion is written at mp. */
2181
-
2182
- switch (token_type) {
2183
- case STR: /* String literal */
2184
- case CHR: /* Character constant */
2185
- case NUM: /* Number token */
2186
- case OPE: /* Operator or punct. */
2187
- case NAM: /* Identifier */
2188
- len = strlen( mp);
2189
- mp += len;
2190
- break;
2191
- case SEP: /* Special character */
2192
- switch( *mp) {
2193
- case COM_SEP:
2194
- if (mcpp_mode == OLD_PREP)
2195
- break; /* Zero-length comment is removed now */
2196
- /* Else fall through */
2197
- default: /* Who knows ? */
2198
- mp++; /* Copy the character */
2199
- break;
2200
- }
2201
- break;
2202
- case NO_TOKEN: break; /* End of file */
2203
- default: /* Unkown token char. */
2204
- mp++; /* Copy the character */
2205
- break;
2206
- }
2207
-
2208
- if (mac_end <= mp) {
2209
- *mp = EOS;
2210
- cerror( macbuf_overflow, macro_name, 0L, macrobuf);
2211
- longjmp( jump, 1);
2212
- }
2213
- if (mcpp_debug & GETC) {
2214
- *mp = EOS;
2215
- dump_string( "macrobuf", macrobuf);
2216
- }
2217
- }
2218
-
2219
- exp_end:
2220
- unget_ch();
2221
- while (macrobuf < mp && (*(mp - 1) == ' ' || *(mp - 1) == '\t'))
2222
- mp--; /* Remove trailing blank */
2223
- macro_line = 0;
2224
- *mp = EOS;
2225
- if (mp - macrobuf > out_end - out) {
2226
- cerror( macbuf_overflow, macro_name, 0L, macrobuf);
2227
- macro_line = MACRO_ERROR;
2228
- }
2229
- err_end:
2230
- out_p = stpcpy( out, macrobuf);
2231
- if (mcpp_debug & EXPAND) {
2232
- dump_string( "expand_prestd exit", out);
2233
- }
2234
- macro_name = NULL;
2235
- clear_exp_mac();
2236
- *pragma_op = FALSE;
2237
- return out_p;
2238
- }
2239
-
2240
- static int rescan_pre(
2241
- int c, /* First character of token */
2242
- char * mp, /* Output buffer */
2243
- char * mac_end /* End of output buffer */
2244
- )
2245
- /*
2246
- * If the token is a macro name, replace the macro repeatedly until the first
2247
- * token becomes a non-macro and return the type of token after expansion.
2248
- */
2249
- {
2250
- int token_type; /* Type of token */
2251
- char * cp = mp; /* Value of mp should not be changed */
2252
- DEFBUF * defp;
2253
- FILEINFO * file;
2254
-
2255
- while ((token_type = scan_token( c, &cp, mac_end)) == NAM
2256
- && (defp = look_id( identifier)) != NULL) { /* Macro */
2257
- if (replace_pre( defp) == FALSE)
2258
- break; /* Macro name with no argument */
2259
- file = infile;
2260
- c = get_ch();
2261
- if (file != infile) { /* Replaced to 0 token */
2262
- unget_ch();
2263
- token_type = NO_TOKEN;
2264
- break;
2265
- }
2266
- cp = mp; /* Overwrite on the macro call */
2267
- } /* The macro call is replaced */
2268
- return token_type;
2269
- }
2270
-
2271
- static int replace_pre(
2272
- DEFBUF * defp /* Definition of the macro */
2273
- )
2274
- /*
2275
- * Replace a macro one level. Called from expand_prestd() (via rescan_pre())
2276
- * when an identifier is found in the macro table. It calls collect_args()
2277
- * to parse actual arguments, checking for the correct number. It then
2278
- * creates a "file" containing single line containing the replacement text
2279
- * with the actual arguments inserted appropriately. This is "pushed back"
2280
- * onto the input stream. (When get_ch() routine runs off the end of the macro
2281
- * line, it will dismiss the macro itself.)
2282
- */
2283
- {
2284
- int arg_len;
2285
- int c;
2286
-
2287
- if (mcpp_debug & EXPAND) {
2288
- dump_a_def( "replace_pre entry", defp, FALSE, TRUE, fp_debug);
2289
- dump_unget( "replace_pre entry");
2290
- }
2291
- if (++rescan_level >= PRESTD_RESCAN_LIMIT) {
2292
- diag_macro( CERROR
2293
- , "Recursive macro definition of \"%s\"" /* _E_ */
2294
- , defp->name, 0L, NULL, defp, NULL);
2295
- longjmp( jump, 1);
2296
- }
2297
-
2298
- /*
2299
- * Here's a macro to replace.
2300
- */
2301
- switch (defp->nargs) {
2302
- case DEF_NOARGS: /* No argument just stuffs */
2303
- case DEF_NOARGS_PREDEF_OLD: /* Compiler-specific predef without '_' */
2304
- case DEF_NOARGS_PREDEF: /* Compiler-specific predef */
2305
- break;
2306
- default: /* defp->nargs >= 0 */
2307
- c = squeeze_ws( NULL, NULL, NULL); /* Look for and skip '('*/
2308
- if (c != '(') { /* Macro name without following '(' */
2309
- unget_ch();
2310
- if (warn_level & 8)
2311
- diag_macro( CWARN, only_name, defp->name, 0L, NULL, defp, NULL);
2312
- return FALSE;
2313
- } else {
2314
- arglist_pre[ 0] = xmalloc( (size_t) (NMACWORK + IDMAX * 2));
2315
- arg_len = collect_args( defp, arglist_pre, 0);
2316
- /* Collect arguments */
2317
- if (arg_len == ARG_ERROR) { /* End of input */
2318
- free( arglist_pre[ 0]);
2319
- longjmp( jump, 1);
2320
- }
2321
- }
2322
- break;
2323
- }
2324
-
2325
- if (defp->nargs > 0)
2326
- substitute_pre( defp); /* Do actual arguments */
2327
- else
2328
- unget_string( defp->repl, defp->name);
2329
-
2330
- if (mcpp_debug & EXPAND)
2331
- dump_unget( "replace_pre exit");
2332
- if (defp->nargs >= 0)
2333
- free( arglist_pre[ 0]);
2334
- return TRUE;
2335
- }
2336
-
2337
- static void substitute_pre(
2338
- DEFBUF * defp /* Current macro being replaced */
2339
- )
2340
- /*
2341
- * Stuff the macro body, substituting formal parameters with actual arguments.
2342
- */
2343
- {
2344
- int c; /* Current character */
2345
- FILEINFO * file; /* Funny #include */
2346
- char * out_end; /* -> output buffer end */
2347
- char * in_p; /* -> replacement text */
2348
- char * out_p; /* -> macro output buff */
2349
-
2350
- file = get_file( defp->name, NULL, NULL, (size_t) (NMACWORK + 1), FALSE);
2351
- /* file == infile */
2352
- in_p = defp->repl; /* -> macro replacement */
2353
- out_p = file->buffer; /* -> output buffer */
2354
- out_end = file->buffer + NMACWORK; /* -> buffer end */
2355
-
2356
- while ((c = *in_p++) != EOS) {
2357
- if (c == MAC_PARM) {
2358
- c = (*in_p++ & UCHARMAX) - 1; /* Parm number */
2359
- /*
2360
- * Substitute formal parameter with actual argument.
2361
- */
2362
- if (out_end <= (out_p + strlen( arglist_pre[ c])))
2363
- goto nospace;
2364
- out_p = stpcpy( out_p, arglist_pre[ c]);
2365
- } else {
2366
- *out_p++ = c;
2367
- }
2368
- if (out_end <= out_p)
2369
- goto nospace;
2370
- }
2371
-
2372
- *out_p = EOS;
2373
- file->buffer = xrealloc( file->buffer, strlen( file->buffer) + 1);
2374
- file->bptr = file->buffer; /* Truncate buffer */
2375
- if (mcpp_debug & EXPAND)
2376
- dump_string( "substitute_pre macroline", file->buffer);
2377
- return;
2378
-
2379
- nospace:
2380
- *out_p = EOS;
2381
- diag_macro( CERROR, macbuf_overflow, defp->name, 0L, file->buffer, defp
2382
- , NULL);
2383
- longjmp( jump, 1);
2384
- }
2385
-
2386
-
2387
1738
  /*
2388
1739
  * C O M M O N R O U T I N E S
2389
1740
  * f o r S T A N D A R D a n d p r e - S T A N D A R D M o d e s
@@ -2436,19 +1787,17 @@ static int collect_args(
2436
1787
  seq_end = seq + NMACWORK/2;
2437
1788
  seq = stpcpy( seq, name);
2438
1789
  *seq++ = '(';
2439
- if (mcpp_mode == STD) {
2440
- /*
2441
- * in_getarg is set TRUE while getting macro arguments, for the sake
2442
- * of diagnostic's convenience. in_getarg is used only in STD mode.
2443
- */
2444
- in_getarg = TRUE;
2445
- if (trace_macro && m_num) {
2446
- /* #pragma MCPP debug macro_call, and the macro is on source */
2447
- mac_inf[ m_num].loc_args = loc = locs
2448
- = (LOCATION *) xmalloc( (sizeof (LOCATION)) * UCHARMAX);
2449
- memset( loc, 0, (sizeof (LOCATION)) * UCHARMAX);
2450
- /* 0-clear for default values, including empty argument */
2451
- }
1790
+ /*
1791
+ * in_getarg is set TRUE while getting macro arguments, for the sake
1792
+ * of diagnostic's convenience. in_getarg is used only in STD mode.
1793
+ */
1794
+ in_getarg = TRUE;
1795
+ if (trace_macro && m_num) {
1796
+ /* #pragma MCPP debug macro_call, and the macro is on source */
1797
+ mac_inf[ m_num].loc_args = loc = locs
1798
+ = (LOCATION *) xmalloc( (sizeof (LOCATION)) * UCHARMAX);
1799
+ memset( loc, 0, (sizeof (LOCATION)) * UCHARMAX);
1800
+ /* 0-clear for default values, including empty argument */
2452
1801
  }
2453
1802
 
2454
1803
  while (1) {
@@ -2474,13 +1823,12 @@ static int collect_args(
2474
1823
  loc++; /* Advance pointer to infs */
2475
1824
  if (warn_level & 2)
2476
1825
  diag_macro( CWARN, empty_arg, sequence, 0L, NULL, defp, NULL);
2477
- if (standard && var_arg && nargs == args - 1) {
1826
+ if (var_arg && nargs == args - 1) {
2478
1827
  /* Variable arguments begin with an empty argument */
2479
1828
  c = get_an_arg( c, &argp, arg_end, &seq, 1, nargs, &loc
2480
1829
  , m_num, (trace_macro && m_num) ? &mgc_prefix : NULL);
2481
1830
  } else {
2482
- if (mcpp_mode == STD)
2483
- *argp++ = RT_END;
1831
+ *argp++ = RT_END;
2484
1832
  *argp++ = EOS;
2485
1833
  }
2486
1834
  if (++nargs == args)
@@ -2530,25 +1878,22 @@ static int collect_args(
2530
1878
  if (warn_level & 2)
2531
1879
  diag_macro( CWARN, empty_arg, sequence, 0L, NULL, defp, NULL);
2532
1880
  } else if (nargs != args) { /* Wrong number of arguments*/
2533
- if (mcpp_mode != OLD_PREP || (warn_level & 1)) {
2534
- if ((standard && var_arg && (nargs == args - 1))
2535
- /* Absence of variable arguments */
2536
- || (mcpp_mode == OLD_PREP)) {
2537
- if (warn_level & 1)
2538
- diag_macro( CWARN, narg_error, nargs < args ? "Less"
2539
- : "More", (long) args, sequence, defp, NULL);
2540
- } else {
2541
- diag_macro( CERROR, narg_error, nargs < args ? "Less" : "More"
2542
- , (long) args, sequence, defp, NULL);
2543
- }
1881
+ if ((var_arg && (nargs == args - 1))
1882
+ /* Absence of variable arguments */
1883
+ ) {
1884
+ if (warn_level & 1)
1885
+ diag_macro( CWARN, narg_error, nargs < args ? "Less"
1886
+ : "More", (long) args, sequence, defp, NULL);
1887
+ } else {
1888
+ diag_macro( CERROR, narg_error, nargs < args ? "Less" : "More"
1889
+ , (long) args, sequence, defp, NULL);
2544
1890
  }
2545
1891
  }
2546
1892
  if (args < nargs) {
2547
1893
  argp = valid_argp; /* Truncate excess arguments*/
2548
1894
  } else {
2549
1895
  for (c = nargs; c < args; c++) {
2550
- if (mcpp_mode == STD)
2551
- *argp++ = RT_END; /* For rescan() */
1896
+ *argp++ = RT_END; /* For rescan() */
2552
1897
  *argp++ = EOS; /* Missing arguments */
2553
1898
  }
2554
1899
  if (c == 0)
@@ -2573,8 +1918,7 @@ static int collect_args(
2573
1918
  dump_unget( "collect_args exit");
2574
1919
  }
2575
1920
  arg_ret:
2576
- if (mcpp_mode == STD)
2577
- in_getarg = FALSE;
1921
+ in_getarg = FALSE;
2578
1922
  /* Return number of found arguments for function-like macro at most */
2579
1923
  /* defp->nargs, or return defp->nargs for object-like macro. */
2580
1924
  return defp->nargs <= DEF_NOARGS ? defp->nargs : nargs;
@@ -2689,23 +2033,15 @@ static int get_an_arg(
2689
2033
  *argp++ = get_ch();
2690
2034
  break;
2691
2035
  case MAC_ARG_END :
2692
- if (! option_flags.v)
2693
- break;
2694
- else
2695
- *argp++ = get_ch();
2696
- /* Fall through */
2036
+ break;
2697
2037
  case MAC_CALL_END :
2698
- if (option_flags.v) {
2699
- *argp++ = get_ch();
2700
- *argp++ = get_ch();
2701
- }
2702
2038
  break;
2703
2039
  }
2704
2040
  break;
2705
2041
  case CHAR_EOF : /* Unexpected EOF */
2706
2042
  return 0;
2707
2043
  default : /* Any token */
2708
- if (mcpp_mode == STD && token_type == NAM
2044
+ if (token_type == NAM
2709
2045
  && c != IN_SRC && c != DEF_MAGIC && infile->fp) {
2710
2046
  len = trace_arg ? IN_SRC_LEN : 1;
2711
2047
  memmove( prevp + len, prevp, (size_t) (argp - prevp));
@@ -2771,28 +2107,18 @@ static int get_an_arg(
2771
2107
  argp--; /* Remove the punctuator*/
2772
2108
  if (mgc_seq.space)
2773
2109
  --argp; /* Remove trailing space */
2774
- if (mcpp_mode == STD) {
2775
- if (trace_macro && m_num) {
2776
- if (trace_arg) { /* Location of end of an arg */
2777
- get_src_location( & e_line_col);
2778
- (*locp)->end_line = e_line_col.line;
2779
- (*locp)->end_col = e_line_col.col;
2780
- }
2781
- (*locp)++; /* Advance pointer even if !trace_arg */
2782
- *argp++ = MAC_INF;
2783
- *argp++ = MAC_ARG_END;
2784
- if (option_flags.v) {
2785
- *argp++ = (m_num / UCHARMAX) + 1;
2786
- *argp++ = (m_num % UCHARMAX) + 1;
2787
- *argp++ = nargs + 1;
2788
- *argp = EOS;
2789
- *argpp = chk_magic_balance( *argpp, argp, TRUE, FALSE);
2790
- /* Check a stray magic caused by abnormal macro */
2791
- /* and move it to an edge if found. */
2792
- }
2110
+
2111
+ if (trace_macro && m_num) {
2112
+ if (trace_arg) { /* Location of end of an arg */
2113
+ get_src_location( & e_line_col);
2114
+ (*locp)->end_line = e_line_col.line;
2115
+ (*locp)->end_col = e_line_col.col;
2793
2116
  }
2794
- *argp++ = RT_END; /* For rescan() */
2117
+ (*locp)++; /* Advance pointer even if !trace_arg */
2118
+ *argp++ = MAC_INF;
2119
+ *argp++ = MAC_ARG_END;
2795
2120
  }
2121
+ *argp++ = RT_END; /* For rescan() */
2796
2122
  *argp++ = EOS; /* Terminate an argument*/
2797
2123
  *argpp = argp;
2798
2124
  return c;
@@ -2822,13 +2148,9 @@ static int squeeze_ws(
2822
2148
  int space = 0;
2823
2149
  int tsep = 0;
2824
2150
  FILEINFO * file = infile;
2825
- FILE * fp = infile->fp;
2826
2151
  int end_of_file = (out && endf) ? FALSE : TRUE;
2827
2152
 
2828
- while (((char_type[ c = get_ch()] & SPA) && (! standard
2829
- || (mcpp_mode == POST_STD && file == infile)
2830
- || (mcpp_mode == STD
2831
- && ((macro_line != 0 && macro_line != MACRO_ERROR)
2153
+ while (((char_type[ c = get_ch()] & SPA) && ((((macro_line != 0 && macro_line != MACRO_ERROR)
2832
2154
  || file == infile))))
2833
2155
  || c == MAC_INF) {
2834
2156
  if (! end_of_file && file != infile) { /* Infile has been read over*/
@@ -2843,8 +2165,7 @@ static int squeeze_ws(
2843
2165
  wrong_line = TRUE;
2844
2166
  break;
2845
2167
  case TOK_SEP:
2846
- if (mcpp_mode == STD)
2847
- tsep++;
2168
+ tsep++;
2848
2169
  continue; /* Skip COM_SEP in OLD_PREP mode */
2849
2170
  case MAC_INF : /* Copy magics as they are, or skip */
2850
2171
  if (mgc_seq && ! mgc_seq->magic_start)
@@ -2870,23 +2191,8 @@ static int squeeze_ws(
2870
2191
  *(*out)++ = c;
2871
2192
  break;
2872
2193
  case MAC_ARG_END :
2873
- if (! option_flags.v) {
2874
- break;
2875
- } else {
2876
- c = get_ch();
2877
- if (out)
2878
- *(*out)++ = c;
2879
- /* Fall through */
2880
- }
2194
+ break;
2881
2195
  case MAC_CALL_END :
2882
- if (option_flags.v) {
2883
- c = get_ch();
2884
- if (out)
2885
- *(*out)++ = c;
2886
- c = get_ch();
2887
- if (out)
2888
- *(*out)++ = c;
2889
- }
2890
2196
  break;
2891
2197
  }
2892
2198
  if (mgc_seq) /* Remember end of last magic seq */
@@ -2908,10 +2214,7 @@ static int squeeze_ws(
2908
2214
  *(*out)++ = TOK_SEP;
2909
2215
  **out = EOS;
2910
2216
  }
2911
- if (mcpp_mode == POST_STD && file != infile) {
2912
- unget_ch(); /* Arguments cannot cross "file"s */
2913
- c = fp ? CHAR_EOF : RT_END; /* EOF is diagnosed by at_eof() */
2914
- } else if (mcpp_mode == STD && macro_line == MACRO_ERROR
2217
+ if (macro_line == MACRO_ERROR
2915
2218
  && file != infile) { /* EOF */
2916
2219
  unget_ch(); /* diagnosed by at_eof() or only */
2917
2220
  c = CHAR_EOF; /* name of a function-like macro. */