gccxml_gem 0.9-x86-cygwin

Sign up to get free protection for your applications and to get access to all the features.
Files changed (241) hide show
  1. data/Rakefile +75 -0
  2. data/bin/gccxml.exe +0 -0
  3. data/bin/gccxml_cc1plus.exe +0 -0
  4. data/gccxml.rb +50 -0
  5. data/share/doc/gccxml-0.9/Copyright.txt +55 -0
  6. data/share/doc/gccxml-0.9/gccxml.html +168 -0
  7. data/share/doc/gccxml-0.9/gccxml.txt +293 -0
  8. data/share/gccxml-0.9/Borland/5.5/Wrappers/algorithm +7 -0
  9. data/share/gccxml-0.9/Borland/5.5/Wrappers/algorithm.h +7 -0
  10. data/share/gccxml-0.9/Borland/5.5/Wrappers/bitset +7 -0
  11. data/share/gccxml-0.9/Borland/5.5/Wrappers/bitset.h +7 -0
  12. data/share/gccxml-0.9/Borland/5.5/Wrappers/cctype +1 -0
  13. data/share/gccxml-0.9/Borland/5.5/Wrappers/cfloat +1 -0
  14. data/share/gccxml-0.9/Borland/5.5/Wrappers/climits +1 -0
  15. data/share/gccxml-0.9/Borland/5.5/Wrappers/cmath +1 -0
  16. data/share/gccxml-0.9/Borland/5.5/Wrappers/complex +7 -0
  17. data/share/gccxml-0.9/Borland/5.5/Wrappers/complex.h +7 -0
  18. data/share/gccxml-0.9/Borland/5.5/Wrappers/cstddef +1 -0
  19. data/share/gccxml-0.9/Borland/5.5/Wrappers/cstdio +1 -0
  20. data/share/gccxml-0.9/Borland/5.5/Wrappers/cstdlib +1 -0
  21. data/share/gccxml-0.9/Borland/5.5/Wrappers/cstring +7 -0
  22. data/share/gccxml-0.9/Borland/5.5/Wrappers/cstring.h +7 -0
  23. data/share/gccxml-0.9/Borland/5.5/Wrappers/ctime +1 -0
  24. data/share/gccxml-0.9/Borland/5.5/Wrappers/cwchar +1 -0
  25. data/share/gccxml-0.9/Borland/5.5/Wrappers/cwctype +1 -0
  26. data/share/gccxml-0.9/Borland/5.5/Wrappers/deque +7 -0
  27. data/share/gccxml-0.9/Borland/5.5/Wrappers/deque.h +7 -0
  28. data/share/gccxml-0.9/Borland/5.5/Wrappers/exception +7 -0
  29. data/share/gccxml-0.9/Borland/5.5/Wrappers/exception.h +7 -0
  30. data/share/gccxml-0.9/Borland/5.5/Wrappers/fstream +7 -0
  31. data/share/gccxml-0.9/Borland/5.5/Wrappers/fstream.h +7 -0
  32. data/share/gccxml-0.9/Borland/5.5/Wrappers/function +7 -0
  33. data/share/gccxml-0.9/Borland/5.5/Wrappers/function.h +7 -0
  34. data/share/gccxml-0.9/Borland/5.5/Wrappers/functional +7 -0
  35. data/share/gccxml-0.9/Borland/5.5/Wrappers/gccxml_typeinfo.h +146 -0
  36. data/share/gccxml-0.9/Borland/5.5/Wrappers/iomanip +7 -0
  37. data/share/gccxml-0.9/Borland/5.5/Wrappers/iomanip.h +7 -0
  38. data/share/gccxml-0.9/Borland/5.5/Wrappers/ios +7 -0
  39. data/share/gccxml-0.9/Borland/5.5/Wrappers/ios.h +7 -0
  40. data/share/gccxml-0.9/Borland/5.5/Wrappers/iosfwd +7 -0
  41. data/share/gccxml-0.9/Borland/5.5/Wrappers/iosfwd.h +7 -0
  42. data/share/gccxml-0.9/Borland/5.5/Wrappers/iostream +7 -0
  43. data/share/gccxml-0.9/Borland/5.5/Wrappers/iostream.h +7 -0
  44. data/share/gccxml-0.9/Borland/5.5/Wrappers/istream +7 -0
  45. data/share/gccxml-0.9/Borland/5.5/Wrappers/istream.h +7 -0
  46. data/share/gccxml-0.9/Borland/5.5/Wrappers/iterator +7 -0
  47. data/share/gccxml-0.9/Borland/5.5/Wrappers/iterator.h +7 -0
  48. data/share/gccxml-0.9/Borland/5.5/Wrappers/limits +7 -0
  49. data/share/gccxml-0.9/Borland/5.5/Wrappers/limits.h +7 -0
  50. data/share/gccxml-0.9/Borland/5.5/Wrappers/list +7 -0
  51. data/share/gccxml-0.9/Borland/5.5/Wrappers/list.h +7 -0
  52. data/share/gccxml-0.9/Borland/5.5/Wrappers/locale +7 -0
  53. data/share/gccxml-0.9/Borland/5.5/Wrappers/locale.h +7 -0
  54. data/share/gccxml-0.9/Borland/5.5/Wrappers/map +7 -0
  55. data/share/gccxml-0.9/Borland/5.5/Wrappers/map.h +7 -0
  56. data/share/gccxml-0.9/Borland/5.5/Wrappers/memory +7 -0
  57. data/share/gccxml-0.9/Borland/5.5/Wrappers/memory.h +7 -0
  58. data/share/gccxml-0.9/Borland/5.5/Wrappers/new +7 -0
  59. data/share/gccxml-0.9/Borland/5.5/Wrappers/new.h +7 -0
  60. data/share/gccxml-0.9/Borland/5.5/Wrappers/numeric +7 -0
  61. data/share/gccxml-0.9/Borland/5.5/Wrappers/numeric.h +7 -0
  62. data/share/gccxml-0.9/Borland/5.5/Wrappers/ostream +7 -0
  63. data/share/gccxml-0.9/Borland/5.5/Wrappers/ostream.h +7 -0
  64. data/share/gccxml-0.9/Borland/5.5/Wrappers/queue +7 -0
  65. data/share/gccxml-0.9/Borland/5.5/Wrappers/queue.h +7 -0
  66. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/codecvt +1 -0
  67. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/collate +1 -0
  68. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/ctype +1 -0
  69. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/iosbase +1 -0
  70. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/iotraits +1 -0
  71. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/iterator +1 -0
  72. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/lochelp +1 -0
  73. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/locimpl +1 -0
  74. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/locvector +1 -0
  75. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/messages +1 -0
  76. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/money +1 -0
  77. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/numbrw +1 -0
  78. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/numeral +1 -0
  79. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/rwdispatch.h +1 -0
  80. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/rwlocale +1 -0
  81. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/rwstderr_macros.h +64 -0
  82. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/string_ref +1 -0
  83. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/time +1 -0
  84. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/traits +1 -0
  85. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/tree +1 -0
  86. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/usefacet +1 -0
  87. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/valimp +1 -0
  88. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/vendor +1 -0
  89. data/share/gccxml-0.9/Borland/5.5/Wrappers/set +7 -0
  90. data/share/gccxml-0.9/Borland/5.5/Wrappers/set.h +7 -0
  91. data/share/gccxml-0.9/Borland/5.5/Wrappers/sstream +7 -0
  92. data/share/gccxml-0.9/Borland/5.5/Wrappers/sstream.h +7 -0
  93. data/share/gccxml-0.9/Borland/5.5/Wrappers/stack +7 -0
  94. data/share/gccxml-0.9/Borland/5.5/Wrappers/stack.h +7 -0
  95. data/share/gccxml-0.9/Borland/5.5/Wrappers/stdexcept +7 -0
  96. data/share/gccxml-0.9/Borland/5.5/Wrappers/stdexcept.h +7 -0
  97. data/share/gccxml-0.9/Borland/5.5/Wrappers/streambuf +7 -0
  98. data/share/gccxml-0.9/Borland/5.5/Wrappers/streambuf.h +7 -0
  99. data/share/gccxml-0.9/Borland/5.5/Wrappers/string +7 -0
  100. data/share/gccxml-0.9/Borland/5.5/Wrappers/string.h +7 -0
  101. data/share/gccxml-0.9/Borland/5.5/Wrappers/strstream +7 -0
  102. data/share/gccxml-0.9/Borland/5.5/Wrappers/strstream.h +7 -0
  103. data/share/gccxml-0.9/Borland/5.5/Wrappers/typeinfo +7 -0
  104. data/share/gccxml-0.9/Borland/5.5/Wrappers/typeinfo.h +7 -0
  105. data/share/gccxml-0.9/Borland/5.5/Wrappers/utility +7 -0
  106. data/share/gccxml-0.9/Borland/5.5/Wrappers/utility.h +7 -0
  107. data/share/gccxml-0.9/Borland/5.5/Wrappers/valarray +7 -0
  108. data/share/gccxml-0.9/Borland/5.5/Wrappers/valarray.h +7 -0
  109. data/share/gccxml-0.9/Borland/5.5/Wrappers/vector +7 -0
  110. data/share/gccxml-0.9/Borland/5.5/Wrappers/vector.h +7 -0
  111. data/share/gccxml-0.9/Borland/5.5/except.h +154 -0
  112. data/share/gccxml-0.9/Borland/5.5/gccxml_fstream.h +431 -0
  113. data/share/gccxml-0.9/Borland/5.5/gccxml_new.h +166 -0
  114. data/share/gccxml-0.9/Borland/5.5/gccxml_valarray.h +786 -0
  115. data/share/gccxml-0.9/Borland/5.5/gccxml_vector.h +1457 -0
  116. data/share/gccxml-0.9/Borland/5.5/io.h +352 -0
  117. data/share/gccxml-0.9/Borland/5.5/oaidl.h +7006 -0
  118. data/share/gccxml-0.9/Borland/5.5/propidl.h +1477 -0
  119. data/share/gccxml-0.9/Borland/5.5/rw/locimpl.h +477 -0
  120. data/share/gccxml-0.9/Borland/5.5/rw/rwlocale.h +619 -0
  121. data/share/gccxml-0.9/Borland/5.5/stdarg.h +55 -0
  122. data/share/gccxml-0.9/Borland/5.5/valarray.cc +2883 -0
  123. data/share/gccxml-0.9/GCC/2.95/algorithm +76 -0
  124. data/share/gccxml-0.9/GCC/2.95/bitset +17 -0
  125. data/share/gccxml-0.9/GCC/2.95/cctype +24 -0
  126. data/share/gccxml-0.9/GCC/2.95/clocale +14 -0
  127. data/share/gccxml-0.9/GCC/2.95/cmath +33 -0
  128. data/share/gccxml-0.9/GCC/2.95/complex +38 -0
  129. data/share/gccxml-0.9/GCC/2.95/csetjmp +13 -0
  130. data/share/gccxml-0.9/GCC/2.95/csignal +14 -0
  131. data/share/gccxml-0.9/GCC/2.95/cstdarg +12 -0
  132. data/share/gccxml-0.9/GCC/2.95/cstddef +13 -0
  133. data/share/gccxml-0.9/GCC/2.95/cstdio +55 -0
  134. data/share/gccxml-0.9/GCC/2.95/cstdlib +66 -0
  135. data/share/gccxml-0.9/GCC/2.95/cstring +34 -0
  136. data/share/gccxml-0.9/GCC/2.95/ctime +24 -0
  137. data/share/gccxml-0.9/GCC/2.95/cwchar +65 -0
  138. data/share/gccxml-0.9/GCC/2.95/cwctype +31 -0
  139. data/share/gccxml-0.9/GCC/2.95/deque +19 -0
  140. data/share/gccxml-0.9/GCC/2.95/exception +20 -0
  141. data/share/gccxml-0.9/GCC/2.95/fstream +23 -0
  142. data/share/gccxml-0.9/GCC/2.95/functional +64 -0
  143. data/share/gccxml-0.9/GCC/2.95/gccxml_bitset +1066 -0
  144. data/share/gccxml-0.9/GCC/2.95/iomanip +20 -0
  145. data/share/gccxml-0.9/GCC/2.95/iosfwd +20 -0
  146. data/share/gccxml-0.9/GCC/2.95/iostream +27 -0
  147. data/share/gccxml-0.9/GCC/2.95/iterator +39 -0
  148. data/share/gccxml-0.9/GCC/2.95/list +19 -0
  149. data/share/gccxml-0.9/GCC/2.95/map +20 -0
  150. data/share/gccxml-0.9/GCC/2.95/memory +21 -0
  151. data/share/gccxml-0.9/GCC/2.95/new +13 -0
  152. data/share/gccxml-0.9/GCC/2.95/numeric +15 -0
  153. data/share/gccxml-0.9/GCC/2.95/pthread.h +16 -0
  154. data/share/gccxml-0.9/GCC/2.95/queue +20 -0
  155. data/share/gccxml-0.9/GCC/2.95/set +20 -0
  156. data/share/gccxml-0.9/GCC/2.95/sstream +24 -0
  157. data/share/gccxml-0.9/GCC/2.95/stack +19 -0
  158. data/share/gccxml-0.9/GCC/2.95/std/bastring.cc +524 -0
  159. data/share/gccxml-0.9/GCC/2.95/std/complext.h +397 -0
  160. data/share/gccxml-0.9/GCC/2.95/std/dcomplex.h +92 -0
  161. data/share/gccxml-0.9/GCC/2.95/std/fcomplex.h +88 -0
  162. data/share/gccxml-0.9/GCC/2.95/std/gslice_array.h +170 -0
  163. data/share/gccxml-0.9/GCC/2.95/std/indirect_array.h +157 -0
  164. data/share/gccxml-0.9/GCC/2.95/std/ldcomplex.h +96 -0
  165. data/share/gccxml-0.9/GCC/2.95/std/mask_array.h +154 -0
  166. data/share/gccxml-0.9/GCC/2.95/std/slice_array.h +156 -0
  167. data/share/gccxml-0.9/GCC/2.95/std/std_valarray.h +728 -0
  168. data/share/gccxml-0.9/GCC/2.95/std/straits.h +162 -0
  169. data/share/gccxml-0.9/GCC/2.95/std/valarray_meta.h +1035 -0
  170. data/share/gccxml-0.9/GCC/2.95/stdexcept +17 -0
  171. data/share/gccxml-0.9/GCC/2.95/stl_alloc.h +1057 -0
  172. data/share/gccxml-0.9/GCC/2.95/stl_bvector.h +836 -0
  173. data/share/gccxml-0.9/GCC/2.95/stl_deque.h +1699 -0
  174. data/share/gccxml-0.9/GCC/2.95/stl_list.h +843 -0
  175. data/share/gccxml-0.9/GCC/2.95/stl_tree.h +1331 -0
  176. data/share/gccxml-0.9/GCC/2.95/stl_vector.h +828 -0
  177. data/share/gccxml-0.9/GCC/2.95/string +26 -0
  178. data/share/gccxml-0.9/GCC/2.95/strstream +23 -0
  179. data/share/gccxml-0.9/GCC/2.95/typeinfo +11 -0
  180. data/share/gccxml-0.9/GCC/2.95/utility +25 -0
  181. data/share/gccxml-0.9/GCC/2.95/valarray +52 -0
  182. data/share/gccxml-0.9/GCC/2.95/vector +19 -0
  183. data/share/gccxml-0.9/GCC/2.96/sstream +305 -0
  184. data/share/gccxml-0.9/GCC/3.0/pthread.h +16 -0
  185. data/share/gccxml-0.9/GCC/3.1/pthread.h +16 -0
  186. data/share/gccxml-0.9/GCC/3.2/bits/fstream.tcc +500 -0
  187. data/share/gccxml-0.9/GCC/3.2/bits/istream.tcc +1207 -0
  188. data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.h +1810 -0
  189. data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.tcc +2397 -0
  190. data/share/gccxml-0.9/GCC/3.2/bits/messages_members.h +108 -0
  191. data/share/gccxml-0.9/GCC/3.2/bits/ostream.tcc +713 -0
  192. data/share/gccxml-0.9/GCC/3.2/bits/sstream.tcc +241 -0
  193. data/share/gccxml-0.9/GCC/3.2/bits/stl_deque.h +1682 -0
  194. data/share/gccxml-0.9/GCC/3.2/bits/stl_list.h +989 -0
  195. data/share/gccxml-0.9/GCC/3.2/bits/stl_tree.h +1462 -0
  196. data/share/gccxml-0.9/GCC/3.2/bits/stl_vector.h +1085 -0
  197. data/share/gccxml-0.9/GCC/3.2/bits/valarray_meta.h +1063 -0
  198. data/share/gccxml-0.9/GCC/3.2/fstream +579 -0
  199. data/share/gccxml-0.9/GCC/3.2/pthread.h +16 -0
  200. data/share/gccxml-0.9/GCC/3.2/sstream +384 -0
  201. data/share/gccxml-0.9/GCC/3.3/bits/fstream.tcc +530 -0
  202. data/share/gccxml-0.9/GCC/3.3/bits/list.tcc +378 -0
  203. data/share/gccxml-0.9/GCC/3.3/bits/locale_facets.h +2050 -0
  204. data/share/gccxml-0.9/GCC/3.3/bits/messages_members.h +108 -0
  205. data/share/gccxml-0.9/GCC/3.3/bits/sstream.tcc +243 -0
  206. data/share/gccxml-0.9/GCC/3.3/bits/stl_deque.h +1603 -0
  207. data/share/gccxml-0.9/GCC/3.3/bits/stl_list.h +1167 -0
  208. data/share/gccxml-0.9/GCC/3.3/bits/stl_tree.h +1462 -0
  209. data/share/gccxml-0.9/GCC/3.3/bits/stl_vector.h +992 -0
  210. data/share/gccxml-0.9/GCC/3.3/bits/valarray_meta.h +1135 -0
  211. data/share/gccxml-0.9/GCC/3.3/fstream +842 -0
  212. data/share/gccxml-0.9/GCC/3.3/gccxml_builtins.h +22 -0
  213. data/share/gccxml-0.9/GCC/3.3/sstream +638 -0
  214. data/share/gccxml-0.9/GCC/3.4/gccxml_builtins.h +91 -0
  215. data/share/gccxml-0.9/GCC/4.0/gccxml_builtins.h +128 -0
  216. data/share/gccxml-0.9/GCC/4.1/bits/gthr-default.h +618 -0
  217. data/share/gccxml-0.9/GCC/4.1/gccxml_builtins.h +131 -0
  218. data/share/gccxml-0.9/GCC/4.2/gccxml_builtins.h +131 -0
  219. data/share/gccxml-0.9/GCC/find_flags +105 -0
  220. data/share/gccxml-0.9/Intel/find_flags +56 -0
  221. data/share/gccxml-0.9/Intel/pthread.h +16 -0
  222. data/share/gccxml-0.9/MIPSpro/7.3/exception +9 -0
  223. data/share/gccxml-0.9/MIPSpro/7.3/gccxml_mpro_internals.h +21 -0
  224. data/share/gccxml-0.9/MIPSpro/7.3/iomanip +161 -0
  225. data/share/gccxml-0.9/MIPSpro/7.3/ostream +9 -0
  226. data/share/gccxml-0.9/MIPSpro/7.3/stddef.h +9 -0
  227. data/share/gccxml-0.9/MIPSpro/7.3/stl_config.h +9 -0
  228. data/share/gccxml-0.9/MIPSpro/7.3/stl_locale.h +17 -0
  229. data/share/gccxml-0.9/MIPSpro/7.3/stl_monetary.h +14 -0
  230. data/share/gccxml-0.9/MIPSpro/7.3/stl_numeric_facets.h +13 -0
  231. data/share/gccxml-0.9/MIPSpro/7.3/stl_threads.h +11 -0
  232. data/share/gccxml-0.9/MIPSpro/7.3/string +18 -0
  233. data/share/gccxml-0.9/MIPSpro/find_flags +137 -0
  234. data/share/gccxml-0.9/Sun/5.8/adaptation.patch +168 -0
  235. data/share/gccxml-0.9/Sun/README +8 -0
  236. data/share/gccxml-0.9/Sun/adapt_headers.sh +24 -0
  237. data/share/gccxml-0.9/Sun/find_flags +69 -0
  238. data/share/gccxml-0.9/gccxml_config +2 -0
  239. data/share/gccxml-0.9/gccxml_find_flags +93 -0
  240. data/share/man/man1/gccxml.1 +246 -0
  241. metadata +324 -0
@@ -0,0 +1,477 @@
1
+ #ifndef __LOCIMPL_H
2
+ #define __LOCIMPL_H
3
+ #pragma option push -b -a8 -pc -Vx- -Ve- -w-inl -w-aus -w-sig
4
+ // -*- C++ -*-
5
+ /***************************************************************************
6
+ *
7
+ * rw/locimpl - Declarations for the Standard Library locale private
8
+ * implementation classes.
9
+ *
10
+ ***************************************************************************
11
+ *
12
+ * Copyright (c) 1994-1999 Rogue Wave Software, Inc. All Rights Reserved.
13
+ *
14
+ * This computer software is owned by Rogue Wave Software, Inc. and is
15
+ * protected by U.S. copyright laws and other laws and by international
16
+ * treaties. This computer software is furnished by Rogue Wave Software,
17
+ * Inc. pursuant to a written license agreement and may be used, copied,
18
+ * transmitted, and stored only in accordance with the terms of such
19
+ * license and with the inclusion of the above copyright notice. This
20
+ * computer software or any other copies thereof may not be provided or
21
+ * otherwise made available to any other person.
22
+ *
23
+ * U.S. Government Restricted Rights. This computer software is provided
24
+ * with Restricted Rights. Use, duplication, or disclosure by the
25
+ * Government is subject to restrictions as set forth in subparagraph (c)
26
+ * (1) (ii) of The Rights in Technical Data and Computer Software clause
27
+ * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of the
28
+ * Commercial Computer Software � Restricted Rights at 48 CFR 52.227-19,
29
+ * as applicable. Manufacturer is Rogue Wave Software, Inc., 5500
30
+ * Flatiron Parkway, Boulder, Colorado 80301 USA.
31
+ *
32
+ **************************************************************************/
33
+
34
+ #ifndef __STD_RW_LOCIMPL__
35
+ #define __STD_RW_LOCIMPL__
36
+
37
+ #include <stdcomp.h>
38
+
39
+ // Macro for declaring all the has_facet and use_facet functions to be friends.
40
+
41
+ #ifndef _RWSTD_NO_FRIEND_TEMPLATES
42
+ #ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
43
+ #define _RWSTD_FRIEND_USE_HAS_FACET \
44
+ template <class Facet> friend \
45
+ inline const Facet& std::use_facet (const locale&); \
46
+ template <class Facet> friend \
47
+ inline bool std::has_facet (const locale&) _RWSTD_THROW_SPEC_NULL;
48
+ #else
49
+ #define _RWSTD_FRIEND_USE_HAS_FACET \
50
+ template <class Facet> friend \
51
+ inline const Facet& use_facet (const locale&,Facet*); \
52
+ template <class Facet> friend \
53
+ inline bool has_facet (const locale&,Facet*) _RWSTD_THROW_SPEC_NULL;
54
+ #endif // _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
55
+ #else
56
+ #define _RWSTD_FRIEND_USE_HAS_FACET public:
57
+ #endif
58
+
59
+ #ifndef _RWSTD_NO_NAMESPACE
60
+ namespace __rwstd {
61
+ using std::use_facet;
62
+ using std::locale;
63
+ #endif
64
+
65
+ // Implementation class template -- timepunct<charT>
66
+ //
67
+ // A facet such as this should have been included in the standard. We just
68
+ // declare it here; the definition occurs below, after locale::facet has been
69
+ // defined.
70
+
71
+ template <class charT> class timepunct;
72
+
73
+ #if defined(__TURBOC__) && 0
74
+
75
+ // Instantiations that go in the library:
76
+
77
+ template class _RWSTDExport timepunct<char>;
78
+ #ifndef _RWSTD_NO_WIDE_CHAR
79
+ template class _RWSTDExport timepunct<wchar_t>;
80
+ #endif
81
+
82
+ #endif // __TURBOC__
83
+
84
+ // Implementation forward declarations:
85
+
86
+ class _RWSTDExport locale_imp;
87
+ class _RWSTDExport facet_imp;
88
+
89
+ class _RWSTDExport digit_map_base;
90
+ template <class charT> class _RWSTDExportTemplate digit_map;
91
+ template <class charT> class _RWSTDExportTemplate keyword_def;
92
+ template <class charT> class _RWSTDExportTemplate keyword_map;
93
+ template <class charT> class _RWSTDExportTemplate keyword_cracker;
94
+
95
+ class _RWSTDExport digit_reader_base;
96
+ template <class charT> class digit_reader_base_1;
97
+ template <class charT,class InputIterator>
98
+ class _RWSTDExportTemplate digit_reader;
99
+
100
+ class _RWSTDExport digit_writer_base;
101
+ template <class charT>
102
+ class _RWSTDExportTemplate digit_writer_base_1;
103
+ template <class charT,class OutputIterator>
104
+ class _RWSTDExportTemplate digit_writer;
105
+
106
+ // ------------------------------------
107
+ // Implementation class -- ref_counted.
108
+ // ------------------------------------
109
+
110
+ // Common base class for reference-counted classes. Currently used only by
111
+ // locale_imp and facet_imp, but could be used more generally.
112
+
113
+ class _RWSTDExport ref_counted {
114
+ friend class _RW_STD::locale;
115
+
116
+ size_t __ref_count;
117
+ #ifdef _RWSTD_MULTI_THREAD
118
+ _RWSTDMutex __mutex;
119
+ #endif
120
+
121
+ protected:
122
+ ref_counted (size_t initial_refs):
123
+ __ref_count(initial_refs) { }
124
+
125
+ // Ensure derived class destructors are always virtual.
126
+ virtual ~ref_counted (void);
127
+
128
+ // Does protected access make these accessible to friends of derived classes?
129
+ // We're about to find out ...
130
+
131
+ static void add_reference (ref_counted *ob) {
132
+ STDGUARD(ob->__mutex);
133
+ ++ob->__ref_count;
134
+ }
135
+
136
+ static void remove_reference (ref_counted *ob) {
137
+ size_t refs;
138
+ {
139
+ STDGUARD(ob->__mutex);
140
+ refs=--ob->__ref_count;
141
+ }
142
+ if (!refs)
143
+ delete ob;
144
+ }
145
+
146
+ static void add_possible_reference (ref_counted *ob) {
147
+ if (ob)
148
+ add_reference(ob);
149
+ }
150
+
151
+ static void remove_possible_reference (ref_counted *ob) {
152
+ if (ob)
153
+ remove_reference(ob);
154
+ }
155
+ };
156
+
157
+ // We would prefer to define locale::id and locale::facet entirely as nested
158
+ // classes of locale, but current compilers have problems with out-of-line
159
+ // definition of members of such classes, so we have to derive most of their
160
+ // behavior from unnested implementation classes:
161
+
162
+ // --------------------------------------
163
+ // Implementation class -- locale_id_imp.
164
+ // --------------------------------------
165
+
166
+ class _RWSTDExport locale_id_imp {
167
+ protected:
168
+ _MUTABLE size_t __id_value;
169
+ static size_t __last_used_id;
170
+
171
+ locale_id_imp() : __id_value(0) {;}
172
+
173
+ #ifdef _RWSTD_MULTI_THREAD
174
+ static _RWSTDMutex __mutex;
175
+ #endif
176
+
177
+ void __initid () const;
178
+ };
179
+
180
+ // ----------------------------------
181
+ // Implementation class -- facet_imp.
182
+ // ----------------------------------
183
+
184
+ class _RWSTDExport facet_imp: public ref_counted
185
+ {
186
+ _RWSTD_FRIEND_USE_HAS_FACET
187
+ friend class locale_imp;
188
+ friend class _RW_STD::locale;
189
+ public:
190
+ enum {
191
+ __facet_cat = 0,
192
+ __ok_implicit = 0,
193
+ __initdone = 1
194
+ };
195
+
196
+ private:
197
+ int __flags;
198
+ int __category; // Should be same type as locale::category
199
+
200
+ protected:
201
+ facet_imp (size_t refs, int cat=0):
202
+ ref_counted(refs), __flags(0), __category(cat) { }
203
+
204
+ // __initfacet() is called by locale::__install the first time a facet is
205
+ // installed in its first locale. Some facets override it to set up private
206
+ // data that depends on return values of virtual do_xxx functions that can't
207
+ // be called yet in a constructor.
208
+ virtual void __initfacet (const locale*) { }
209
+ };
210
+
211
+ #ifndef _RWSTD_NO_NAMESPACE
212
+ }
213
+ #endif
214
+
215
+ #include <rw/locvector>
216
+
217
+ #ifndef _RWSTD_NO_NAMESPACE
218
+ namespace __rwstd {
219
+ #endif
220
+
221
+ // -----------------------------------
222
+ // Implementation class -- locale_imp.
223
+ // -----------------------------------
224
+
225
+ class _RWSTDExport locale_imp: public ref_counted
226
+ {
227
+ _RWSTD_FRIEND_USE_HAS_FACET
228
+ friend class _RW_STD::locale;
229
+
230
+ // Same type as locale::category ...
231
+ typedef int locale_category;
232
+ locale_vector<_RW_STD::string> names_;
233
+ locale_vector<facet_imp*> vec_;
234
+
235
+ locale_category native_cats_;
236
+ locale_category named_cats_;
237
+ _RW_STD::string big_name_;
238
+ bool named_;
239
+
240
+ locale_imp (size_t sz=36, size_t refs=0);
241
+ locale_imp (const locale_imp&,size_t refs);
242
+ ~locale_imp ();
243
+
244
+ public:
245
+ inline facet_imp *get_facet (size_t i) const
246
+ { return i<vec_.size()? vec_[i] : NULL; }
247
+
248
+ private:
249
+ const char *category_name (locale_category) const;
250
+
251
+ // Map C library LC_xxx constants into facet categories.
252
+ static locale_category map_category (locale_category);
253
+
254
+ // Parse a locale name into category names.
255
+ static bool parse_name (locale_vector<_RW_STD::string>&,const char*);
256
+
257
+ // Clean up name if necessary
258
+ static _RW_STD::string clean_name(_RW_STD::string s)
259
+ {
260
+ #ifdef __BORLANDC__
261
+ return _RW_STD::string(s,s.find('=')+1);
262
+ #else
263
+ return s;
264
+ #endif // __BORLANDC__
265
+ }
266
+
267
+ // Combine category names to create a locale name.
268
+ static bool build_name (_RW_STD::string&,const locale_vector<_RW_STD::string>&);
269
+ };
270
+
271
+ // ---------------------------------------
272
+ // Implementation class -- digit_map_base.
273
+ // ---------------------------------------
274
+
275
+ // A place to stash some static constants, so that each instantiation of the
276
+ // derived class rwstd::digit_map does not have to have a separate copy.
277
+
278
+ struct _RWSTDExport digit_map_base {
279
+ enum { zero, minus, plus, X, x, E, e };
280
+ static const char punct_chars[7]; // "0-+XxEe"
281
+ static const char digit_chars[22]; // "0123456789ABCDEFabcdef"
282
+ static const char char_values[22]; // Corresponding values in range 0-15
283
+ };
284
+
285
+ // --------------------------------------------------
286
+ // Implementation class template -- digit_map<charT>.
287
+ // --------------------------------------------------
288
+
289
+ // Maps digits into their corresponding numeric values, and caches widened
290
+ // equivalents of some number-related punctuation characters that don't depend
291
+ // on the numpunct facet. A private instance of this class is hidden in
292
+ // ctype<charT> for use by numeric conversion facets. A call to init must
293
+ // precede the first call to eval if is_inited() is false. Eval returns 0-15
294
+ // if argument is a valid digit, a negative value otherwise.
295
+ //
296
+ // Specialized for char for performance. The specialization assumes digits
297
+ // fit into the char code-set in an ASCII-like manner ('0'..'9' contiguous,
298
+ // 'A'..'F' contiguous, 'a'..'f' contiguous, '0' < 'A' < 'a').
299
+
300
+ _RWSTD_TEMPLATE
301
+ class _RWSTDExportTemplate digit_map<char>:
302
+ public digit_map_base
303
+ {
304
+ public:
305
+ typedef char char_type;
306
+
307
+ bool is_inited (void) const { return true; }
308
+ const char *get_punct (void) const { return punct_chars; }
309
+ inline int eval (char c) const;
310
+ static inline const digit_map<char>&
311
+ get_digit_map (const _RW_STD::ctype<char>&);
312
+ };
313
+
314
+ // Inline members of digit_map<char>:
315
+ //
316
+ // (Note that the definition of get_digit_map is in <rw/ctype> because it
317
+ // has to come after the definition of ctype<char>.)
318
+
319
+ inline int digit_map<char>::eval (char c) const {
320
+ int num=c;
321
+ if ((num-='0')>9) {
322
+ if (((num-=('A'-'0'))>5 && (num-=('a'-'A'))>5) || (num+=10)<10)
323
+ num=-1;
324
+ }
325
+ return num;
326
+ }
327
+
328
+ template <class charT>
329
+ class _RWSTDExportTemplate digit_map:
330
+ public digit_map_base
331
+ {
332
+ bool inited;
333
+ charT punct_array[7];
334
+ charT digit_array[22];
335
+ char value_array[22];
336
+ public:
337
+ typedef charT char_type;
338
+
339
+ digit_map (void): inited(false) { }
340
+ bool is_inited (void) const { return inited; }
341
+ void init (const _RW_STD::ctype<charT>& ct);
342
+ const charT *get_punct (void) const { return punct_array; }
343
+ int eval (charT) const;
344
+
345
+ // Can-opener for getting the digit_map out of a ctype. (Works because of
346
+ // the friend declaration in ctype_helper<charT> below.)
347
+ static inline const digit_map<charT>&
348
+ get_digit_map (const _RW_STD::ctype<charT>& ct)
349
+ {
350
+ if (!ct.__digit_map.inited)
351
+ (_RWSTD_CONST_CAST(digit_map<char_type>&,ct.__digit_map))
352
+ .init(ct);
353
+ return ct.__digit_map;
354
+ }
355
+ };
356
+
357
+ // ----------------------------------------------------
358
+ // Implementation class template -- keyword_def<charT>.
359
+ // ----------------------------------------------------
360
+
361
+ // Helper class used in parsing keywords from input (such as true/false in
362
+ // num_get, month and day names in time_get, etc).
363
+
364
+ template <class charT>
365
+ class _RWSTDExportTemplate keyword_def {
366
+ public:
367
+ const charT *s;
368
+ int v;
369
+ };
370
+
371
+ // ----------------------------------------------------
372
+ // Implementation class template -- keyword_map<charT>.
373
+ // ----------------------------------------------------
374
+
375
+ // Defines a set of keywords to be recognized on input and to be written to
376
+ // output. Private instances are hidden in numpunct (for true/false) and
377
+ // rwstd::timepunct (for month and weekday names).
378
+
379
+ template <class charT>
380
+ class _RWSTDExportTemplate keyword_map {
381
+ public:
382
+ int num_defs_;
383
+ const keyword_def<charT> *defs_;
384
+ };
385
+
386
+ // ---------------------------------------------------
387
+ // Implementation class template -- punct_data<charT>.
388
+ // ---------------------------------------------------
389
+
390
+ // Common base class for rwstd::numpunct_data and rwstd::moneypunct_data.
391
+
392
+ template <class charT>
393
+ class _RWSTDExportTemplate punct_data {
394
+ friend class digit_reader_base_1<charT>;
395
+ friend class digit_writer_base_1<charT>;
396
+ public:
397
+ typedef _RW_STD::basic_string<charT,_RW_STD::char_traits<charT>,_RW_STD::allocator<charT> > string_type;
398
+ protected:
399
+ charT dp_, ts_;
400
+ _RW_STD::string gr_;
401
+ };
402
+
403
+ // ------------------------------------------------------
404
+ // Implementation function templates -- create_xxx_facet.
405
+ // ------------------------------------------------------
406
+
407
+ // The facet_maker<Facet>::maker_func functions described above delegate the
408
+ // actual construction of facets to three inline function templates named
409
+ // create_xxx_facet, where xxx is 'classic' or 'native' or 'named'. The
410
+ // default (template) versions of these functions construct facets as follows:
411
+ //
412
+ // classic -- default constructor for the facet with only the refs argument.
413
+ // native -- calls create_named_facet with a name of "".
414
+ // named -- calls create_classic_facet, ignoring the passed name.
415
+ //
416
+ // This default behavior is overridden (specialized) for certain facet types.
417
+ // In particular, create_named_facet is specialized for all facet types that
418
+ // have a derived _byname version, to construct that version with the passed
419
+ // name (see <rw/rwlocale>) and create_native_facet is specialized for all
420
+ // facet types whose "native" behavior (as determined by the vendor) differs
421
+ // from the byname facet with a name of "" (see <rw/vendor>).
422
+
423
+ template <class Facet>
424
+ inline Facet* _RWSTDExportTemplate create_named_facet
425
+ (Facet*,const char*,size_t refs);
426
+
427
+ template <class Facet>
428
+ inline Facet* _RWSTDExportTemplate create_native_facet (Facet*);
429
+
430
+ template <class Facet>
431
+ inline Facet* _RWSTDExportTemplate create_classic_facet (Facet*)
432
+ {
433
+ return new Facet(1);
434
+ }
435
+
436
+ // ----------------------------------------------------
437
+ // Implementation class template -- facet_maker<Facet>.
438
+ // ----------------------------------------------------
439
+
440
+ // When use_facet (inline) finds that a locale does not contain an explicit
441
+ // facet of the requested type, it calls locale::__make_explicit (non-template)
442
+ // to create or find the facet in a cache, and install it in the locale. As a
443
+ // parameter to __make_explicit, use_facet passes a call-back function which
444
+ // __make_explicit can call to construct a facet of the requested type if
445
+ // needed. The call-back functions are obtained by instantiating the following
446
+ // helper class template:
447
+
448
+ template <class Facet>
449
+ class _RWSTDExportTemplate facet_maker {
450
+ public:
451
+ static facet_imp *maker_func (int t, const char* name, size_t refs)
452
+ {
453
+ if (t==0)
454
+ return create_classic_facet ((Facet*)0);
455
+ else if (t==1)
456
+ return create_native_facet ((Facet*)0);
457
+ else
458
+ return create_named_facet ((Facet*)0,name,refs);
459
+ }
460
+ };
461
+
462
+ // Typedef for the above facet_maker functions, for use in the declaration
463
+ // of locale::__make_explicit.
464
+
465
+ typedef facet_imp *facet_maker_func (int,const char*,size_t);
466
+
467
+ #ifndef _RWSTD_NO_NAMESPACE
468
+ } // namespace __rwstd
469
+ #endif
470
+
471
+ #ifdef _RWSTD_COMPILE_INSTANTIATE
472
+ #include <rw/locimpl.cc>
473
+ #endif
474
+
475
+ #endif // __STD_RW_LOCIMPL__
476
+ #pragma option pop
477
+ #endif /* __LOCIMPL_H */