gettext 1.10.0 → 1.90.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (327) hide show
  1. data/ChangeLog +156 -2
  2. data/NEWS +28 -0
  3. data/README +128 -138
  4. data/Rakefile +83 -43
  5. data/data/locale/es/LC_MESSAGES/rails.mo +0 -0
  6. data/data/locale/hu/LC_MESSAGES/rails.mo +0 -0
  7. data/data/locale/hu/LC_MESSAGES/rgettext.mo +0 -0
  8. data/data/locale/ua/LC_MESSAGES/rails.mo +0 -0
  9. data/data/locale/ua/LC_MESSAGES/rgettext.mo +0 -0
  10. data/doc/classes/ActiveRecord/Base.html +360 -0
  11. data/doc/classes/ActiveRecord/ConnectionAdapters/Column.html +182 -0
  12. data/doc/classes/ActiveRecord/Migration.html +118 -0
  13. data/doc/classes/GetText.html +1790 -0
  14. data/doc/classes/GetText/ActiveRecordParser.html +236 -0
  15. data/doc/classes/GetText/Container.html +119 -0
  16. data/doc/classes/GetText/ErbContainer.html +223 -0
  17. data/doc/classes/GetText/ErbParser.html +156 -0
  18. data/doc/classes/GetText/GladeParser.html +133 -0
  19. data/doc/classes/GetText/NoboundTextDomainError.html +119 -0
  20. data/doc/classes/GetText/PoParser.html +169 -0
  21. data/doc/classes/GetText/Rails.html +293 -0
  22. data/doc/classes/GetText/RubyParser.html +123 -0
  23. data/doc/classes/GetText/TextDomain.html +572 -0
  24. data/doc/classes/GetText/TextDomainManager.html +443 -0
  25. data/doc/classes/Iconv.html +257 -0
  26. data/doc/classes/Iconv/Failure.html +105 -0
  27. data/doc/classes/Iconv/IllegalSequence.html +118 -0
  28. data/doc/classes/Iconv/InvalidCharacter.html +118 -0
  29. data/doc/classes/Iconv/InvalidEncoding.html +118 -0
  30. data/doc/classes/Locale.html +839 -0
  31. data/doc/classes/Locale/Object.html +799 -0
  32. data/doc/classes/Locale/SystemBase.html +271 -0
  33. data/doc/classes/Locale/SystemCGI.html +312 -0
  34. data/doc/classes/Locale/SystemJRuby.html +112 -0
  35. data/doc/classes/Locale/SystemPosix.html +113 -0
  36. data/doc/classes/Locale/SystemWin32.html +182 -0
  37. data/doc/classes/MOFile.html +678 -0
  38. data/doc/classes/MOFile/InvalidFormat.html +111 -0
  39. data/doc/classes/Module.html +158 -0
  40. data/doc/classes/String.html +225 -0
  41. data/doc/created.rid +1 -0
  42. data/doc/files/ChangeLog.html +2355 -0
  43. data/doc/files/README.html +510 -0
  44. data/doc/files/lib/gettext/active_record_rb.html +110 -0
  45. data/doc/files/lib/gettext/cgi_rb.html +110 -0
  46. data/doc/files/lib/gettext/container_rb.html +108 -0
  47. data/doc/files/lib/gettext/erb_rb.html +109 -0
  48. data/doc/files/lib/gettext/iconv_rb.html +109 -0
  49. data/doc/files/lib/gettext/mo_rb.html +108 -0
  50. data/doc/files/lib/gettext/parser/active_record_rb.html +119 -0
  51. data/doc/files/lib/gettext/parser/erb_rb.html +109 -0
  52. data/doc/files/lib/gettext/parser/glade_rb.html +109 -0
  53. data/doc/files/lib/gettext/parser/ruby_rb.html +110 -0
  54. data/doc/files/lib/gettext/poparser_rb.html +108 -0
  55. data/doc/files/lib/gettext/rails_compat_rb.html +108 -0
  56. data/doc/files/lib/gettext/rails_rb.html +112 -0
  57. data/doc/files/lib/gettext/rgettext_rb.html +110 -0
  58. data/doc/files/lib/gettext/rmsgfmt_rb.html +112 -0
  59. data/doc/files/lib/gettext/rmsgmerge_rb.html +112 -0
  60. data/doc/files/lib/gettext/string_rb.html +101 -0
  61. data/doc/files/lib/gettext/textdomain_rb.html +109 -0
  62. data/doc/files/lib/gettext/textdomainmanager_rb.html +109 -0
  63. data/doc/files/lib/gettext/utils_rb.html +111 -0
  64. data/doc/files/lib/gettext/version_rb.html +101 -0
  65. data/doc/files/lib/gettext_rb.html +113 -0
  66. data/doc/files/lib/locale/base_rb.html +101 -0
  67. data/doc/files/lib/locale/cgi_rb.html +108 -0
  68. data/doc/files/lib/locale/jruby_rb.html +110 -0
  69. data/doc/files/lib/locale/object_rb.html +101 -0
  70. data/doc/files/lib/locale/posix_rb.html +108 -0
  71. data/doc/files/lib/locale/win32_rb.html +110 -0
  72. data/doc/files/lib/locale/win32_table_rb.html +101 -0
  73. data/doc/files/lib/locale_rb.html +111 -0
  74. data/doc/fr_class_index.html +57 -0
  75. data/doc/fr_file_index.html +58 -0
  76. data/doc/fr_method_index.html +155 -0
  77. data/doc/index.html +24 -0
  78. data/doc/rdoc-style.css +208 -0
  79. data/lib/gettext.rb +102 -50
  80. data/lib/gettext/cgi.rb +2 -27
  81. data/lib/gettext/iconv.rb +76 -62
  82. data/lib/gettext/mo.rb +3 -3
  83. data/lib/gettext/parser/erb.rb +2 -2
  84. data/lib/gettext/rails.rb +69 -48
  85. data/lib/gettext/rgettext.rb +2 -2
  86. data/lib/gettext/rmsgmerge.rb +2 -2
  87. data/lib/gettext/string.rb +9 -5
  88. data/lib/gettext/textdomain.rb +3 -3
  89. data/lib/gettext/textdomainmanager.rb +5 -5
  90. data/lib/gettext/utils.rb +4 -3
  91. data/lib/gettext/version.rb +1 -1
  92. data/lib/{gettext/locale.rb → locale.rb} +11 -58
  93. data/lib/locale/base.rb +60 -0
  94. data/lib/{gettext/locale_cgi.rb → locale/cgi.rb} +30 -28
  95. data/lib/locale/jruby.rb +36 -0
  96. data/lib/{gettext/locale_object.rb → locale/object.rb} +78 -24
  97. data/lib/locale/posix.rb +22 -0
  98. data/lib/locale/win32.rb +48 -0
  99. data/lib/{gettext/locale_table_win32.rb → locale/win32_table.rb} +3 -2
  100. data/po/es/rails.po +1 -2
  101. data/po/hu/rails.po +139 -0
  102. data/po/hu/rgettext.po +126 -0
  103. data/po/ja/rails.po +5 -5
  104. data/po/ua/rails.po +150 -0
  105. data/po/ua/rgettext.po +132 -0
  106. data/pre-setup.rb +2 -4
  107. data/samples/cgi/cookie.cgi +1 -0
  108. data/samples/cgi/helloerb1.cgi +6 -3
  109. data/samples/cgi/helloerb2.cgi +6 -3
  110. data/samples/cgi/http.rb +3 -7
  111. data/samples/cgi/index.cgi +2 -1
  112. data/samples/cgi/locale/hu/LC_MESSAGES/helloerb1.mo +0 -0
  113. data/samples/cgi/locale/hu/LC_MESSAGES/helloerb2.mo +0 -0
  114. data/samples/cgi/locale/hu/LC_MESSAGES/hellolib.mo +0 -0
  115. data/samples/cgi/locale/hu/LC_MESSAGES/main.mo +0 -0
  116. data/samples/cgi/locale/ua/LC_MESSAGES/helloerb1.mo +0 -0
  117. data/samples/cgi/locale/ua/LC_MESSAGES/helloerb2.mo +0 -0
  118. data/samples/cgi/locale/ua/LC_MESSAGES/hellolib.mo +0 -0
  119. data/samples/cgi/locale/ua/LC_MESSAGES/main.mo +0 -0
  120. data/samples/cgi/po/hu/helloerb1.po +59 -0
  121. data/samples/cgi/po/hu/helloerb2.po +51 -0
  122. data/samples/cgi/po/hu/hellolib.po +23 -0
  123. data/samples/cgi/po/hu/main.po +82 -0
  124. data/samples/cgi/po/ua/helloerb1.po +62 -0
  125. data/samples/cgi/po/ua/helloerb2.po +54 -0
  126. data/samples/cgi/po/ua/hellolib.po +26 -0
  127. data/samples/cgi/po/ua/main.po +84 -0
  128. data/samples/locale/hu/LC_MESSAGES/hello.mo +0 -0
  129. data/samples/locale/hu/LC_MESSAGES/hello2.mo +0 -0
  130. data/samples/locale/hu/LC_MESSAGES/hello_noop.mo +0 -0
  131. data/samples/locale/hu/LC_MESSAGES/hello_plural.mo +0 -0
  132. data/samples/locale/hu/LC_MESSAGES/helloglade2.mo +0 -0
  133. data/samples/locale/hu/LC_MESSAGES/hellogtk.mo +0 -0
  134. data/samples/locale/hu/LC_MESSAGES/hellotk.mo +0 -0
  135. data/samples/locale/ua/LC_MESSAGES/hello.mo +0 -0
  136. data/samples/locale/ua/LC_MESSAGES/hello2.mo +0 -0
  137. data/samples/locale/ua/LC_MESSAGES/hello_noop.mo +0 -0
  138. data/samples/locale/ua/LC_MESSAGES/hello_plural.mo +0 -0
  139. data/samples/locale/ua/LC_MESSAGES/helloglade2.mo +0 -0
  140. data/samples/locale/ua/LC_MESSAGES/hellogtk.mo +0 -0
  141. data/samples/locale/ua/LC_MESSAGES/hellotk.mo +0 -0
  142. data/samples/po/hu/hello.po +22 -0
  143. data/samples/po/hu/hello2.po +30 -0
  144. data/samples/po/hu/hello_noop.po +26 -0
  145. data/samples/po/hu/hello_plural.po +25 -0
  146. data/samples/po/hu/helloglade2.po +31 -0
  147. data/samples/po/hu/hellogtk.po +22 -0
  148. data/samples/po/hu/hellotk.po +23 -0
  149. data/samples/po/ua/hello.po +22 -0
  150. data/samples/po/ua/hello2.po +30 -0
  151. data/samples/po/ua/hello_noop.po +26 -0
  152. data/samples/po/ua/hello_plural.po +29 -0
  153. data/samples/po/ua/helloglade2.po +34 -0
  154. data/samples/po/ua/hellogtk.po +22 -0
  155. data/samples/po/ua/hellotk.po +26 -0
  156. data/samples/rails/README +15 -31
  157. data/samples/rails/Rakefile +1 -1
  158. data/samples/rails/app/controllers/application.rb +11 -4
  159. data/samples/rails/app/controllers/articles_controller.rb +96 -0
  160. data/samples/rails/app/helpers/application_helper.rb +1 -1
  161. data/samples/rails/app/helpers/{blog_helper.rb → articles_helper.rb} +6 -7
  162. data/samples/rails/app/views/articles/edit.html.erb +18 -0
  163. data/samples/rails/app/views/articles/index.html.erb +17 -0
  164. data/samples/rails/app/views/articles/new.html.erb +16 -0
  165. data/samples/rails/app/views/articles/show.html.erb +6 -0
  166. data/samples/rails/app/views/layouts/articles.html.erb +26 -0
  167. data/samples/rails/config/boot.rb +104 -13
  168. data/samples/rails/config/database.yml +24 -21
  169. data/samples/rails/config/environment.rb +35 -30
  170. data/samples/rails/config/environments/development.rb +5 -6
  171. data/samples/rails/config/environments/production.rb +2 -3
  172. data/samples/rails/config/environments/test.rb +5 -2
  173. data/samples/rails/config/initializers/inflections.rb +10 -0
  174. data/samples/rails/config/initializers/mime_types.rb +5 -0
  175. data/samples/rails/config/routes.rb +30 -11
  176. data/samples/rails/db/migrate/001_create_articles.rb +14 -0
  177. data/samples/rails/db/schema.rb +16 -5
  178. data/samples/rails/lib/tasks/gettext.rake +2 -2
  179. data/samples/rails/locale/bs/LC_MESSAGES/blog.mo +0 -0
  180. data/samples/rails/locale/ca/LC_MESSAGES/blog.mo +0 -0
  181. data/samples/rails/locale/cs/LC_MESSAGES/blog.mo +0 -0
  182. data/samples/rails/locale/de/LC_MESSAGES/blog.mo +0 -0
  183. data/samples/rails/locale/el/LC_MESSAGES/blog.mo +0 -0
  184. data/samples/rails/locale/en/LC_MESSAGES/blog.mo +0 -0
  185. data/samples/rails/locale/eo/LC_MESSAGES/blog.mo +0 -0
  186. data/samples/rails/locale/es/LC_MESSAGES/blog.mo +0 -0
  187. data/samples/rails/locale/fr/LC_MESSAGES/blog.mo +0 -0
  188. data/samples/rails/locale/hr/LC_MESSAGES/blog.mo +0 -0
  189. data/samples/rails/locale/hu/LC_MESSAGES/blog.mo +0 -0
  190. data/samples/rails/locale/it/LC_MESSAGES/blog.mo +0 -0
  191. data/samples/rails/locale/ja/LC_MESSAGES/blog.mo +0 -0
  192. data/samples/rails/locale/ko/LC_MESSAGES/blog.mo +0 -0
  193. data/samples/rails/locale/nb/LC_MESSAGES/blog.mo +0 -0
  194. data/samples/rails/locale/nl/LC_MESSAGES/blog.mo +0 -0
  195. data/samples/rails/locale/pt_BR/LC_MESSAGES/blog.mo +0 -0
  196. data/samples/rails/locale/ru/LC_MESSAGES/blog.mo +0 -0
  197. data/samples/rails/locale/ua/LC_MESSAGES/blog.mo +0 -0
  198. data/samples/rails/locale/vi/LC_MESSAGES/blog.mo +0 -0
  199. data/samples/rails/locale/zh/LC_MESSAGES/blog.mo +0 -0
  200. data/samples/rails/locale/zh_TW/LC_MESSAGES/blog.mo +0 -0
  201. data/samples/rails/po/blog.pot +24 -24
  202. data/samples/rails/po/bs/blog.po +29 -29
  203. data/samples/rails/po/ca/blog.po +27 -27
  204. data/samples/rails/po/cs/blog.po +27 -27
  205. data/samples/rails/po/de/blog.po +27 -27
  206. data/samples/rails/po/el/blog.po +27 -27
  207. data/samples/rails/po/en/blog.po +24 -24
  208. data/samples/rails/po/eo/blog.po +27 -27
  209. data/samples/rails/po/es/blog.po +27 -27
  210. data/samples/rails/po/fr/blog.po +27 -27
  211. data/samples/rails/po/hr/blog.po +29 -29
  212. data/samples/rails/po/hu/blog.po +105 -0
  213. data/samples/rails/po/it/blog.po +27 -27
  214. data/samples/rails/po/ja/blog.po +27 -27
  215. data/samples/rails/po/ko/blog.po +27 -27
  216. data/samples/rails/po/nb/blog.po +26 -27
  217. data/samples/rails/po/nl/blog.po +27 -27
  218. data/samples/rails/po/pt_BR/blog.po +27 -27
  219. data/samples/rails/po/ru/blog.po +27 -27
  220. data/samples/rails/po/ua/blog.po +108 -0
  221. data/samples/rails/po/vi/blog.po +26 -31
  222. data/samples/rails/po/zh/blog.po +27 -27
  223. data/samples/rails/po/zh_TW/blog.po +27 -27
  224. data/samples/rails/public/404.html +27 -5
  225. data/samples/rails/public/422.html +30 -0
  226. data/samples/rails/public/500.html +27 -5
  227. data/samples/rails/public/index.html +6 -6
  228. data/samples/rails/public/javascripts/application.js +2 -0
  229. data/samples/rails/public/javascripts/controls.js +532 -319
  230. data/samples/rails/public/javascripts/dragdrop.js +521 -133
  231. data/samples/rails/public/javascripts/effects.js +708 -442
  232. data/samples/rails/public/javascripts/prototype.js +3393 -953
  233. data/samples/rails/public/stylesheets/blog.css +4 -0
  234. data/samples/rails/public/stylesheets/scaffold.css +5 -5
  235. data/samples/rails/test/functional/articles_controller_test.rb +51 -0
  236. data/samples/rails/test/test_helper.rb +31 -19
  237. data/samples/rails/test/unit/article_test.rb +2 -9
  238. data/samples/rails/vendor/plugins/gettext/init.rb +5 -3
  239. data/samples/rails/vendor/plugins/gettext/lib/gettext_plugin.rb +9 -10
  240. data/samples/rails/vendor/plugins/gettext/locale/eo/LC_MESSAGES/gettext_plugin.mo +0 -0
  241. data/samples/rails/vendor/plugins/gettext/locale/hu/LC_MESSAGES/gettext_plugin.mo +0 -0
  242. data/samples/rails/vendor/plugins/gettext/locale/ua/LC_MESSAGES/gettext_plugin.mo +0 -0
  243. data/samples/rails/vendor/plugins/gettext/po/eo/gettext_plugin.po +28 -0
  244. data/samples/rails/vendor/plugins/gettext/po/hu/gettext_plugin.po +27 -0
  245. data/samples/rails/vendor/plugins/gettext/po/ua/gettext_plugin.po +30 -0
  246. data/test/Rakefile +2 -1
  247. data/test/benchmark.rb +28 -0
  248. data/test/fixtures/topic.rb +15 -0
  249. data/test/rails/Rakefile +2 -1
  250. data/test/rails/app/controllers/articles_controller.rb +1 -1
  251. data/test/rails/app/controllers/users_controller.rb +10 -0
  252. data/test/rails/app/models/user.rb +2 -1
  253. data/test/rails/app/views/articles/{_form.rhtml → _form.html.erb} +0 -0
  254. data/test/rails/app/views/articles/active_form_error.html.erb +1 -0
  255. data/test/rails/app/views/articles/change_title_error_messages_for.html.erb +21 -0
  256. data/test/rails/app/views/articles/{edit.rhtml → edit.html.erb} +0 -0
  257. data/test/rails/app/views/articles/{list.rhtml → list.html.erb} +0 -3
  258. data/test/rails/app/views/articles/{list_fr.rhtml → list_fr.html.erb} +0 -0
  259. data/test/rails/app/views/articles/{multi_error_messages_for.rhtml → multi_error_messages_for.html.erb} +0 -0
  260. data/test/rails/app/views/articles/{new.rhtml → new.html.erb} +0 -0
  261. data/test/rails/app/views/articles/{show.rhtml → show.html.erb} +0 -0
  262. data/test/rails/app/views/layouts/{application.rhtml → application.html.erb} +0 -0
  263. data/test/rails/app/views/layouts/{mailer.rhtml → mailer.html.erb} +0 -0
  264. data/test/rails/app/views/layouts/users.html.erb +13 -0
  265. data/test/rails/app/views/users/custom_error_message.html.erb +13 -0
  266. data/test/rails/app/views/users/custom_error_message_fr.html.erb +13 -0
  267. data/test/rails/config/environment.rb +6 -1
  268. data/test/rails/config/environments/development.rb +0 -3
  269. data/test/rails/db/schema.rb +17 -10
  270. data/test/rails/locale/ja/LC_MESSAGES/rails_test.mo +0 -0
  271. data/test/rails/log/development.log +136 -29
  272. data/test/rails/log/test.log +2002 -128
  273. data/test/rails/po/ja/rails_test.po +68 -61
  274. data/test/rails/po/rails_test.pot +57 -55
  275. data/test/rails/test/fixtures/users.yml +5 -0
  276. data/test/rails/test/functional/articles_controller_test.rb +6 -1
  277. data/test/rails/test/functional/users_controller_test.rb +65 -0
  278. data/test/rails/test/result/en/custom_error_message.html +83 -0
  279. data/test/rails/test/result/en/custom_error_message_with_plural.html +83 -0
  280. data/test/rails/test/result/en/list.html +0 -3
  281. data/test/rails/test/result/en/multi_error_messages_for.html +1 -1
  282. data/test/rails/test/result/fr/custom_error_message.html +83 -0
  283. data/test/rails/test/result/fr/custom_error_message_with_plural.html +83 -0
  284. data/test/rails/test/result/ja/custom_error_message.html +83 -0
  285. data/test/rails/test/result/ja/custom_error_message_with_plural.html +83 -0
  286. data/test/rails/test/result/ja/list.html +0 -3
  287. data/test/rails/test/result/ja/multi_error_messages_for.html +1 -1
  288. data/test/test.sh +5 -7
  289. data/test/{gettext_test_active_record.rb → test_active_record.rb} +20 -10
  290. data/test/{gettext_test_cgi.rb → test_cgi.rb} +0 -0
  291. data/test/{gettext_test.rb → test_gettext.rb} +91 -9
  292. data/test/test_java.sh +12 -0
  293. data/test/{gettext_test_locale.rb → test_locale.rb} +3 -8
  294. data/test/{gettext_test_multi_textdomain.rb → test_multi_textdomain.rb} +2 -2
  295. data/test/{gettext_test_parser.rb → test_parser.rb} +77 -77
  296. data/test/{gettext_test_rails.rb → test_rails.rb} +0 -0
  297. data/test/{gettext_test_rails_caching.rb → test_rails_caching.rb} +16 -2
  298. data/test/{gettext_test_string.rb → test_string.rb} +1 -0
  299. data/test/{test_rubyparser_N.rb → testlib/N_.rb} +0 -0
  300. data/test/testlib/erb.rhtml +15 -0
  301. data/test/testlib/erb.rxml +16 -0
  302. data/test/{test_rubyparser.rb → testlib/gettext.rb} +0 -0
  303. data/test/testlib/gladeparser.glade +183 -0
  304. data/test/{test_rubyparser_n_.rb → testlib/ngettext.rb} +0 -0
  305. data/test/{test_nsgettext.rb → testlib/nsgettext.rb} +0 -0
  306. data/test/{test_sgettext.rb → testlib/sgettext.rb} +0 -0
  307. data/test/{testlib1.rb → testlib/testlib1.rb} +0 -0
  308. data/test/{testlib2.rb → testlib/testlib2.rb} +1 -1
  309. data/test/{testlib3.rb → testlib/testlib3.rb} +0 -0
  310. data/test/{testlib4.rb → testlib/testlib4.rb} +1 -1
  311. data/test/{testlib5.rb → testlib/testlib5.rb} +0 -0
  312. data/test/{testlib6.rb → testlib/testlib6.rb} +0 -0
  313. metadata +1374 -1171
  314. data/ext/gettext/extconf.rb +0 -20
  315. data/ext/gettext/locale_system.c +0 -83
  316. data/lib/gettext/locale_posix.rb +0 -82
  317. data/lib/gettext/locale_win32.rb +0 -82
  318. data/samples/cgi/ruby.bat +0 -4
  319. data/samples/rails/app/controllers/blog_controller.rb +0 -58
  320. data/samples/rails/app/views/blog/_form.rhtml +0 -25
  321. data/samples/rails/app/views/blog/edit.rhtml +0 -22
  322. data/samples/rails/app/views/blog/list.rhtml +0 -29
  323. data/samples/rails/app/views/blog/new.rhtml +0 -21
  324. data/samples/rails/app/views/blog/show.rhtml +0 -18
  325. data/samples/rails/app/views/layouts/blog.rhtml +0 -36
  326. data/samples/rails/test/functional/blog_controller_test.rb +0 -98
  327. data/test/gettext_runner.rb +0 -22
@@ -0,0 +1,112 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Locale::SystemJRuby</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Locale::SystemJRuby</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/locale/jruby_rb.html">
59
+ lib/locale/jruby.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+ <div id="description">
76
+ <p>
77
+ <a href="SystemJRuby.html">Locale::SystemJRuby</a> module for JRuby This is
78
+ a low-level class. Application shouldn&#8216;t use this directly.
79
+ </p>
80
+
81
+ </div>
82
+
83
+
84
+ </div>
85
+
86
+
87
+ </div>
88
+
89
+
90
+ <!-- if includes -->
91
+
92
+ <div id="section">
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ <!-- if method_list -->
102
+
103
+
104
+ </div>
105
+
106
+
107
+ <div id="validator-badges">
108
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
109
+ </div>
110
+
111
+ </body>
112
+ </html>
@@ -0,0 +1,113 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Locale::SystemPosix</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Locale::SystemPosix</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/locale/posix_rb.html">
59
+ lib/locale/posix.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+ <div id="description">
76
+ <p>
77
+ <a href="SystemPosix.html">Locale::SystemPosix</a> module for Posix OS
78
+ (Unix) This is a low-level class. Application shouldn&#8216;t use this
79
+ directly.
80
+ </p>
81
+
82
+ </div>
83
+
84
+
85
+ </div>
86
+
87
+
88
+ </div>
89
+
90
+
91
+ <!-- if includes -->
92
+
93
+ <div id="section">
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+ <!-- if method_list -->
103
+
104
+
105
+ </div>
106
+
107
+
108
+ <div id="validator-badges">
109
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
110
+ </div>
111
+
112
+ </body>
113
+ </html>
@@ -0,0 +1,182 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Locale::SystemWin32</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Locale::SystemWin32</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/locale/win32_table_rb.html">
59
+ lib/locale/win32_table.rb
60
+ </a>
61
+ <br />
62
+ <a href="../../files/lib/locale/win32_rb.html">
63
+ lib/locale/win32.rb
64
+ </a>
65
+ <br />
66
+ </td>
67
+ </tr>
68
+
69
+ </table>
70
+ </div>
71
+ <!-- banner header -->
72
+
73
+ <div id="bodyContent">
74
+
75
+
76
+
77
+ <div id="contextContent">
78
+
79
+ <div id="description">
80
+ <p>
81
+ <a href="SystemWin32.html">Locale::SystemWin32</a> module for win32. This
82
+ is a low-level class. Application shouldn&#8216;t use this directly.
83
+ </p>
84
+
85
+ </div>
86
+
87
+
88
+ </div>
89
+
90
+ <div id="method-list">
91
+ <h3 class="section-bar">Methods</h3>
92
+
93
+ <div class="name-list">
94
+ <a href="#M000100">get_charset</a>&nbsp;&nbsp;
95
+ </div>
96
+ </div>
97
+
98
+ </div>
99
+
100
+
101
+ <!-- if includes -->
102
+
103
+ <div id="section">
104
+
105
+
106
+ <div id="constants-list">
107
+ <h3 class="section-bar">Constants</h3>
108
+
109
+ <div class="name-list">
110
+ <table summary="Constants">
111
+ <tr class="top-aligned-row context-row">
112
+ <td class="context-item-name">LocaleTable</td>
113
+ <td>=</td>
114
+ <td class="context-item-value">[ [0x0000, &quot;en&quot;, &quot;CP1252&quot;], [0x007f, &quot;invariant&quot;, &quot;CP1252&quot;], [0x0400, &quot;invalid&quot;, &quot;CP1252&quot;], [0x0800, &quot;system&quot;, &quot;CP1252&quot;], [0x0436, &quot;af-ZA&quot;, &quot;CP1252&quot;], [0x041c, &quot;sq-AL&quot;, &quot;CP1252&quot;], [0x0484, &quot;gsw-FR&quot;, &quot;CP1252&quot;], [0x045e, &quot;am-ET&quot;, &quot;UNICODE&quot;], [0x0401, &quot;ar-SA&quot;, &quot;CP1256&quot;], [0x0801, &quot;ar-IQ&quot;, &quot;CP1256&quot;], [0x0c01, &quot;ar-EG&quot;, &quot;CP1256&quot;], [0x1001, &quot;ar-LY&quot;, &quot;CP1256&quot;], [0x1401, &quot;ar-DZ&quot;, &quot;CP1256&quot;], [0x1801, &quot;ar-MA&quot;, &quot;CP1256&quot;], [0x1c01, &quot;ar-TN&quot;, &quot;CP1256&quot;], [0x2001, &quot;ar-OM&quot;, &quot;CP1256&quot;], [0x2401, &quot;ar-YE&quot;, &quot;CP1256&quot;], [0x2801, &quot;ar-SY&quot;, &quot;CP1256&quot;], [0x2c01, &quot;ar-JO&quot;, &quot;CP1256&quot;], [0x3001, &quot;ar-LB&quot;, &quot;CP1256&quot;], [0x3401, &quot;ar-KW&quot;, &quot;CP1256&quot;], [0x3801, &quot;ar-AE&quot;, &quot;CP1256&quot;], [0x3c01, &quot;ar-BH&quot;, &quot;CP1256&quot;], [0x4001, &quot;ar-QA&quot;, &quot;CP1256&quot;], [0x042b, &quot;hy-AM&quot;, &quot;UNICODE&quot;], [0x044d, &quot;as-IN&quot;, &quot;UNICODE&quot;], [0x042c, &quot;az-AZ-Latn&quot;, &quot;CP1254&quot;], [0x082c, &quot;az-AZ-Cyrl&quot;, &quot;CP1251&quot;], [0x046d, &quot;ba-RU&quot;, &quot;UNICODE&quot;], [0x042d, &quot;eu-ES&quot;, &quot;CP1252&quot;], [0x0423, &quot;be-BY&quot;, &quot;CP1251&quot;], [0x0445, &quot;bn-IN&quot;, &quot;UNICODE&quot;], [0x201a, &quot;bs-BA-Cyrl&quot;, &quot;CP1251&quot;], [0x141a, &quot;bs-BA-Latn&quot;, &quot;CP1250&quot;], [0x047e, &quot;br-FR&quot;, &quot;CP1251&quot;], [0x0402, &quot;bg-BG&quot;, &quot;CP1251&quot;], [0x0455, &quot;my-MM&quot;, &quot;UNICODE&quot;], [0x0403, &quot;ca-ES&quot;, &quot;CP1252&quot;], [0x0004, &quot;zh-CHS&quot;, &quot;CP936&quot;], [0x0404, &quot;zh-TW&quot;, &quot;CP950&quot;], [0x0804, &quot;zh-CN&quot;, &quot;CP936&quot;], [0x0c04, &quot;zh-HK&quot;, &quot;CP950&quot;], [0x1004, &quot;zh-SG&quot;, &quot;CP936&quot;], [0x1404, &quot;zh-MO&quot;, &quot;CP950&quot;], [0x7c04, &quot;zh-CHT&quot;, &quot;CP950&quot;], [0x0483, &quot;co-FR&quot;, &quot;CP1252&quot;], [0x041a, &quot;hr-HR&quot;, &quot;CP1250&quot;], [0x101a, &quot;hr-BA&quot;, &quot;CP1250&quot;], [0x0405, &quot;cs-CZ&quot;, &quot;CP1250&quot;], [0x0406, &quot;da-DK&quot;, &quot;CP1252&quot;], [0x048c, &quot;gbz-AF&quot;, &quot;CP1256&quot;], [0x0465, &quot;dv-MV&quot;, &quot;UNICODE&quot;], [0x0413, &quot;nl-NL&quot;, &quot;CP1252&quot;], [0x0813, &quot;nl-BE&quot;, &quot;CP1252&quot;], [0x0409, &quot;en-US&quot;, &quot;CP1252&quot;], [0x0809, &quot;en-GB&quot;, &quot;CP1252&quot;], [0x0c09, &quot;en-AU&quot;, &quot;CP1252&quot;], [0x1009, &quot;en-CA&quot;, &quot;CP1252&quot;], [0x1409, &quot;en-NZ&quot;, &quot;CP1252&quot;], [0x1809, &quot;en-IE&quot;, &quot;CP1252&quot;], [0x1c09, &quot;en-ZA&quot;, &quot;CP1252&quot;], [0x2009, &quot;en-JA&quot;, &quot;CP1252&quot;], [0x2409, &quot;en-CB&quot;, &quot;CP1252&quot;], [0x2809, &quot;en-BZ&quot;, &quot;CP1252&quot;], [0x2c09, &quot;en-TT&quot;, &quot;CP1252&quot;], [0x3009, &quot;en-ZW&quot;, &quot;CP1252&quot;], [0x3409, &quot;en-PH&quot;, &quot;CP1252&quot;], [0x4009, &quot;en-IN&quot;, &quot;CP1252&quot;], [0x4409, &quot;en-MY&quot;, &quot;CP1252&quot;], [0x4809, &quot;en-SG&quot;, &quot;CP1252&quot;], [0x0425, &quot;et-EE&quot;, &quot;CP1257&quot;], [0x0438, &quot;fo-FO&quot;, &quot;CP1252&quot;], [0x464, &quot;fil-PH&quot;, &quot;CP1252&quot;], [0x040b, &quot;fi-FI&quot;, &quot;CP1252&quot;], [0x040c, &quot;fr-FR&quot;, &quot;CP1252&quot;], [0x080c, &quot;fr-BE&quot;, &quot;CP1252&quot;], [0x0c0c, &quot;fr-CA&quot;, &quot;CP1252&quot;], [0x100c, &quot;fr-CH&quot;, &quot;CP1252&quot;], [0x140c, &quot;fr-LU&quot;, &quot;CP1252&quot;], [0x180c, &quot;fr-MC&quot;, &quot;CP1252&quot;], [0x0462, &quot;fy-NL&quot;, &quot;CP1252&quot;], [0x0456, &quot;gl-ES&quot;, &quot;CP1252&quot;], [0x0437, &quot;ka-GE&quot;, &quot;UNICODE&quot;], [0x0407, &quot;de-DE&quot;, &quot;CP1252&quot;], [0x0807, &quot;de-CH&quot;, &quot;CP1252&quot;], [0x0c07, &quot;de-AT&quot;, &quot;CP1252&quot;], [0x1007, &quot;de-LU&quot;, &quot;CP1252&quot;], [0x1407, &quot;de-LI&quot;, &quot;CP1252&quot;], [0x0408, &quot;el-GR&quot;, &quot;CP1253&quot;], [0x046f, &quot;kl-GL&quot;, &quot;CP1252&quot;], [0x0447, &quot;gu-IN&quot;, &quot;UNICODE&quot;], [0x0468, &quot;ha-NG-Latn&quot;, &quot;CP1252&quot;], [0x040d, &quot;he-IL&quot;, &quot;CP1255&quot;], [0x0439, &quot;hi-IN&quot;, &quot;UNICODE&quot;], [0x040e, &quot;hu-HU&quot;, &quot;CP1250&quot;], [0x040f, &quot;is-IS&quot;, &quot;CP1252&quot;], [0x0421, &quot;id-ID&quot;, &quot;CP1252&quot;], [0x045d, &quot;iu-CA-Cans&quot;, &quot;UNICODE&quot;], [0x085d, &quot;iu-CA-Latn&quot;, &quot;CP1252&quot;], [0x083c, &quot;ga-IE&quot;, &quot;CP1252&quot;], [0x0434, &quot;xh-ZA&quot;, &quot;CP1252&quot;], [0x0435, &quot;zu-ZA&quot;, &quot;CP1252&quot;], [0x0410, &quot;it-IT&quot;, &quot;CP1252&quot;], [0x0810, &quot;it-CH&quot;, &quot;CP1252&quot;], [0x0411, &quot;ja-JP&quot;, &quot;CP932&quot;], [0x044b, &quot;kn-IN&quot;, &quot;UNICODE&quot;], [0x043f, &quot;kk-KZ&quot;, &quot;CP1251&quot;], [0x0453, &quot;kh-KH&quot;, &quot;UNICODE&quot;], [0x0486, &quot;qut-GT&quot;, &quot;CP1252&quot;], [0x0487, &quot;rw-RW&quot;, &quot;CP1252&quot;], [0x0457, &quot;kok-IN&quot;, &quot;UNICODE&quot;], [0x0412, &quot;ko-KR&quot;, &quot;CP949&quot;], [0x0812, &quot;ko-KR@win95&quot;, &quot;CP949&quot;], [0x0440, &quot;ky-KG&quot;, &quot;CP1251&quot;], [0x0454, &quot;lo-LA&quot;, &quot;UNICODE&quot;], [0x0426, &quot;lv-LV&quot;, &quot;CP1257&quot;], [0x0427, &quot;lt-LT&quot;, &quot;CP1257&quot;], [0x0827, &quot;lt-LT@win98&quot;, &quot;CP1257&quot;], [0x082e, &quot;wee-DE&quot;, &quot;CP1252&quot;], [0x046e, &quot;lb-LU&quot;, &quot;CP1252&quot;], [0x042f, &quot;mk-MK&quot;, &quot;CP1251&quot;], [0x043e, &quot;ms-MY&quot;, &quot;CP1252&quot;], [0x083e, &quot;ms-BN&quot;, &quot;CP1252&quot;], [0x044c, &quot;ml-IN&quot;, &quot;UNICODE&quot;], [0x043a, &quot;mt-MT&quot;, &quot;CP1252&quot;], [0x0481, &quot;mi-NZ&quot;, &quot;CP1252&quot;], [0x047a, &quot;arn-CL&quot;, &quot;CP1252&quot;], [0x044e, &quot;mr-IN&quot;, &quot;UNICODE&quot;], [0x047c, &quot;moh-CA&quot;, &quot;CP1252&quot;], [0x0450, &quot;mn-MN&quot;, &quot;CP1251&quot;], [0x0850, &quot;mn-CN&quot;, &quot;UNICODE&quot;], [0x0461, &quot;ne-NP&quot;, &quot;UNICODE&quot;], [0x0414, &quot;nb-NO&quot;, &quot;CP1252&quot;], [0x0814, &quot;nn-NO&quot;, &quot;CP1252&quot;], [0x0482, &quot;oc-FR&quot;, &quot;CP1252&quot;], [0x0448, &quot;or-IN&quot;, &quot;UNICODE&quot;], [0x0463, &quot;ps-AF&quot;, &quot;UNICODE&quot;], [0x0429, &quot;fa-IR&quot;, &quot;CP1256&quot;], [0x0415, &quot;pl-PL&quot;, &quot;CP1250&quot;], [0x0416, &quot;pt-BR&quot;, &quot;CP1252&quot;], [0x0816, &quot;pt-PT&quot;, &quot;CP1252&quot;], [0x0446, &quot;pa-IN&quot;, &quot;UNICODE&quot;], [0x046b, &quot;quz-BO&quot;, &quot;CP1252&quot;], [0x086b, &quot;quz-EC&quot;, &quot;CP1252&quot;], [0x0c6b, &quot;quz-PE&quot;, &quot;CP1252&quot;], [0x0418, &quot;ro-RO&quot;, &quot;CP1250&quot;], [0x0417, &quot;rm-CH&quot;, &quot;CP1252&quot;], [0x0419, &quot;ru-RU&quot;, &quot;CP1251&quot;], [0x243b, &quot;smn-FI&quot;, &quot;CP1252&quot;], [0x103b, &quot;smj-NO&quot;, &quot;CP1252&quot;], [0x143b, &quot;smj-SE&quot;, &quot;CP1252&quot;], [0x043b, &quot;se-NO&quot;, &quot;CP1252&quot;], [0x083b, &quot;se-SE&quot;, &quot;CP1252&quot;], [0x0c3b, &quot;se-FI&quot;, &quot;CP1252&quot;], [0x203b, &quot;sms-FI&quot;, &quot;CP1252&quot;], [0x183b, &quot;sma-NO&quot;, &quot;CP1252&quot;], [0x1c3b, &quot;sma-SE&quot;, &quot;CP1252&quot;], [0x044f, &quot;sa-IN&quot;, &quot;UNICODE&quot;], [0x0c1a, &quot;sr-SP-Cyrl&quot;, &quot;CP1251&quot;], [0x1c1a, &quot;sr-BA-Cyrl&quot;, &quot;CP1251&quot;], [0x081a, &quot;sr-SP-Latn&quot;, &quot;CP1250&quot;], [0x181a, &quot;sr-BA-Latn&quot;, &quot;CP1250&quot;], [0x046c, &quot;ns-ZA&quot;, &quot;CP1252&quot;], [0x0432, &quot;tn-ZA&quot;, &quot;CP1252&quot;], [0x045b, &quot;si-LK&quot;, &quot;UNICODE&quot;], [0x041b, &quot;sk-SK&quot;, &quot;CP1250&quot;], [0x0424, &quot;sl-SI&quot;, &quot;CP1250&quot;], [0x040a, &quot;es-ES-ts&quot;, &quot;CP1252&quot;], [0x080a, &quot;es-MX&quot;, &quot;CP1252&quot;], [0x0c0a, &quot;es-ES&quot;, &quot;CP1252&quot;], [0x100a, &quot;es-GT&quot;, &quot;CP1252&quot;], [0x140a, &quot;es-CR&quot;, &quot;CP1252&quot;], [0x180a, &quot;es-PA&quot;, &quot;CP1252&quot;], [0x1c0a, &quot;es-DO&quot;, &quot;CP1252&quot;], [0x200a, &quot;es-VE&quot;, &quot;CP1252&quot;], [0x240a, &quot;es-CO&quot;, &quot;CP1252&quot;], [0x280a, &quot;es-PE&quot;, &quot;CP1252&quot;], [0x2c0a, &quot;es-AR&quot;, &quot;CP1252&quot;], [0x300a, &quot;es-EC&quot;, &quot;CP1252&quot;], [0x340a, &quot;es-CL&quot;, &quot;CP1252&quot;], [0x380a, &quot;es-UY&quot;, &quot;CP1252&quot;], [0x3c0a, &quot;es-PY&quot;, &quot;CP1252&quot;], [0x400a, &quot;es-BO&quot;, &quot;CP1252&quot;], [0x440a, &quot;es-SV&quot;, &quot;CP1252&quot;], [0x480a, &quot;es-HN&quot;, &quot;CP1252&quot;], [0x4c0a, &quot;es-NI&quot;, &quot;CP1252&quot;], [0x500a, &quot;es-PR&quot;, &quot;CP1252&quot;], [0x540a, &quot;es-US&quot;, &quot;CP1252&quot;], [0x0430, &quot;sutu&quot;, &quot;UNICODE&quot;], [0x0441, &quot;sw-KE&quot;, &quot;CP1252&quot;], [0x041d, &quot;sv-SE&quot;, &quot;CP1252&quot;], [0x081d, &quot;sv-FI&quot;, &quot;CP1252&quot;], [0x045a, &quot;syr-SY&quot;, &quot;UNICODE&quot;], [0x0428, &quot;tg-TJ-Cyrl&quot;, &quot;CP1251&quot;], [0x085f, &quot;ber-DZ&quot;, &quot;CP1252&quot;], [0x0449, &quot;ta-IN&quot;, &quot;UNICODE&quot;], [0x0444, &quot;tt-RU&quot;, &quot;CP1251&quot;], [0x044a, &quot;te-IN&quot;, &quot;UNICODE&quot;], [0x041e, &quot;th-TH&quot;, &quot;CP874&quot;], [0x0451, &quot;bo-CN&quot;, &quot;UNICODE&quot;], [0x0851, &quot;bo-BT&quot;, &quot;UNICODE&quot;], [0x041f, &quot;tr-TR&quot;, &quot;CP1254&quot;], [0x0442, &quot;tk-TM&quot;, &quot;CP1251&quot;], [0x0480, &quot;ug-CN&quot;, &quot;CP1256&quot;], [0x0422, &quot;uk-UA&quot;, &quot;CP1251&quot;], [0x042e, &quot;wen-DE&quot;, &quot;CP1252&quot;], [0x0420, &quot;ur-PK&quot;, &quot;CP1256&quot;], [0x0820, &quot;tr-IN&quot;, &quot;CP1256&quot;], [0x0443, &quot;uz-UZ-Latn&quot;, &quot;CP1254&quot;], [0x0843, &quot;uz-UZ-Cyrl&quot;, &quot;CP1251&quot;], [0x042a, &quot;vi-VN&quot;, &quot;CP1252&quot;], [0x0452, &quot;cy-GB&quot;, &quot;CP1252&quot;], [0x0488, &quot;wo-SN&quot;, &quot;CP1252&quot;], [0x0485, &quot;sah-RU&quot;, &quot;CP1251&quot;], [0x0478, &quot;ii-CN&quot;, &quot;UNICODE&quot;], [0x046a, &quot;yo-NG&quot;, &quot;UNICODE&quot;], ]</td>
115
+ <td width="3em">&nbsp;</td>
116
+ <td class="context-item-desc">
117
+ LangID, locale name, code page
118
+
119
+ </td>
120
+ </tr>
121
+ </table>
122
+ </div>
123
+ </div>
124
+
125
+
126
+
127
+
128
+
129
+
130
+ <!-- if method_list -->
131
+ <div id="methods">
132
+ <h3 class="section-bar">Public Instance methods</h3>
133
+
134
+ <div id="method-M000100" class="method-detail">
135
+ <a name="M000100"></a>
136
+
137
+ <div class="method-heading">
138
+ <a href="#M000100" class="method-signature">
139
+ <span class="method-name">get_charset</span><span class="method-args">(locale)</span>
140
+ </a>
141
+ </div>
142
+
143
+ <div class="method-description">
144
+ <p>
145
+ Gets the Win32 charset of the locale.
146
+ </p>
147
+ <ul>
148
+ <li>locale: <a href="Object.html">Locale::Object</a>
149
+
150
+ </li>
151
+ <li>Returns the charset of the locale
152
+
153
+ </li>
154
+ </ul>
155
+ <p><a class="source-toggle" href="#"
156
+ onclick="toggleCode('M000100-source');return false;">[Source]</a></p>
157
+ <div class="method-source-code" id="M000100-source">
158
+ <pre>
159
+ <span class="ruby-comment cmt"># File lib/locale/win32.rb, line 30</span>
160
+ 30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_charset</span>(<span class="ruby-identifier">locale</span>)
161
+ 31: <span class="ruby-identifier">loc</span> = <span class="ruby-constant">LocaleTable</span>.<span class="ruby-identifier">find</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">v</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">locale</span>.<span class="ruby-identifier">to_win</span>}
162
+ 32: <span class="ruby-identifier">loc</span> = <span class="ruby-constant">LocaleTable</span>.<span class="ruby-identifier">find</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">v</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">=~</span> <span class="ruby-node">/^#{locale.language}-/</span>} <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">loc</span>
163
+ 33: <span class="ruby-identifier">loc</span> <span class="ruby-value">? </span><span class="ruby-identifier">loc</span>[<span class="ruby-value">2</span>] <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;CP1252&quot;</span>
164
+ 34: <span class="ruby-keyword kw">end</span>
165
+ </pre>
166
+ </div>
167
+ </div>
168
+ </div>
169
+
170
+
171
+ </div>
172
+
173
+
174
+ </div>
175
+
176
+
177
+ <div id="validator-badges">
178
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
179
+ </div>
180
+
181
+ </body>
182
+ </html>
@@ -0,0 +1,678 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: MOFile</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">MOFile</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/gettext/mo_rb.html">
59
+ lib/gettext/mo.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Hash
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000011">hash_string</a>&nbsp;&nbsp;
90
+ <a href="#M000007">load</a>&nbsp;&nbsp;
91
+ <a href="#M000013">load_from_file</a>&nbsp;&nbsp;
92
+ <a href="#M000008">load_from_stream</a>&nbsp;&nbsp;
93
+ <a href="#M000005">new</a>&nbsp;&nbsp;
94
+ <a href="#M000010">next_prime</a>&nbsp;&nbsp;
95
+ <a href="#M000004">open</a>&nbsp;&nbsp;
96
+ <a href="#M000009">prime?</a>&nbsp;&nbsp;
97
+ <a href="#M000014">save_to_file</a>&nbsp;&nbsp;
98
+ <a href="#M000012">save_to_stream</a>&nbsp;&nbsp;
99
+ <a href="#M000015">set_comment</a>&nbsp;&nbsp;
100
+ <a href="#M000006">update!</a>&nbsp;&nbsp;
101
+ </div>
102
+ </div>
103
+
104
+ </div>
105
+
106
+
107
+ <!-- if includes -->
108
+
109
+ <div id="section">
110
+
111
+ <div id="class-list">
112
+ <h3 class="section-bar">Classes and Modules</h3>
113
+
114
+ Class <a href="MOFile/InvalidFormat.html" class="link">MOFile::InvalidFormat</a><br />
115
+
116
+ </div>
117
+
118
+ <div id="constants-list">
119
+ <h3 class="section-bar">Constants</h3>
120
+
121
+ <div class="name-list">
122
+ <table summary="Constants">
123
+ <tr class="top-aligned-row context-row">
124
+ <td class="context-item-name">Header</td>
125
+ <td>=</td>
126
+ <td class="context-item-value">Struct.new(:magic, :revision, :nstrings, :orig_table_offset, :translated_table_offset, :hash_table_size, :hash_table_offset)</td>
127
+ </tr>
128
+ <tr class="top-aligned-row context-row">
129
+ <td class="context-item-name">MAGIC_BIG_ENDIAN</td>
130
+ <td>=</td>
131
+ <td class="context-item-value">&quot;\x95\x04\x12\xde&quot;</td>
132
+ </tr>
133
+ <tr class="top-aligned-row context-row">
134
+ <td class="context-item-name">MAGIC_LITTLE_ENDIAN</td>
135
+ <td>=</td>
136
+ <td class="context-item-value">&quot;\xde\x12\x04\x95&quot;</td>
137
+ </tr>
138
+ <tr class="top-aligned-row context-row">
139
+ <td class="context-item-name">HASHWORDBITS</td>
140
+ <td>=</td>
141
+ <td class="context-item-value">32</td>
142
+ <td width="3em">&nbsp;</td>
143
+ <td class="context-item-desc">
144
+ From gettext-0.12.1/gettext-runtime/intl/hash-string.h Defines the so
145
+ called `hashpjw&#8217; function by P.J. Weinberger [see Aho/Sethi/Ullman,
146
+ COMPILERS: Principles, Techniques and Tools, 1986, 1987 Bell Telephone
147
+ Laboratories, Inc.]
148
+
149
+ </td>
150
+ </tr>
151
+ </table>
152
+ </div>
153
+ </div>
154
+
155
+
156
+
157
+ <div id="attribute-list">
158
+ <h3 class="section-bar">Attributes</h3>
159
+
160
+ <div class="name-list">
161
+ <table>
162
+ <tr class="top-aligned-row context-row">
163
+ <td class="context-item-name">charset</td>
164
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
165
+ <td class="context-item-desc"></td>
166
+ </tr>
167
+ <tr class="top-aligned-row context-row">
168
+ <td class="context-item-name">filename</td>
169
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
170
+ <td class="context-item-desc"></td>
171
+ </tr>
172
+ <tr class="top-aligned-row context-row">
173
+ <td class="context-item-name">last_modified</td>
174
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
175
+ <td class="context-item-desc"></td>
176
+ </tr>
177
+ <tr class="top-aligned-row context-row">
178
+ <td class="context-item-name">little_endian</td>
179
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
180
+ <td class="context-item-desc"></td>
181
+ </tr>
182
+ <tr class="top-aligned-row context-row">
183
+ <td class="context-item-name">nplurals</td>
184
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
185
+ <td class="context-item-desc"></td>
186
+ </tr>
187
+ <tr class="top-aligned-row context-row">
188
+ <td class="context-item-name">path</td>
189
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
190
+ <td class="context-item-desc"></td>
191
+ </tr>
192
+ <tr class="top-aligned-row context-row">
193
+ <td class="context-item-name">plural</td>
194
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
195
+ <td class="context-item-desc"></td>
196
+ </tr>
197
+ </table>
198
+ </div>
199
+ </div>
200
+
201
+
202
+
203
+ <!-- if method_list -->
204
+ <div id="methods">
205
+ <h3 class="section-bar">Public Class methods</h3>
206
+
207
+ <div id="method-M000005" class="method-detail">
208
+ <a name="M000005"></a>
209
+
210
+ <div class="method-heading">
211
+ <a href="#M000005" class="method-signature">
212
+ <span class="method-name">new</span><span class="method-args">(output_charset = nil)</span>
213
+ </a>
214
+ </div>
215
+
216
+ <div class="method-description">
217
+ <p><a class="source-toggle" href="#"
218
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
219
+ <div class="method-source-code" id="M000005-source">
220
+ <pre>
221
+ <span class="ruby-comment cmt"># File lib/gettext/mo.rb, line 41</span>
222
+ 41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">output_charset</span> = <span class="ruby-keyword kw">nil</span>)
223
+ 42: <span class="ruby-ivar">@filename</span> = <span class="ruby-keyword kw">nil</span>
224
+ 43: <span class="ruby-ivar">@last_modified</span> = <span class="ruby-keyword kw">nil</span>
225
+ 44: <span class="ruby-ivar">@little_endian</span> = <span class="ruby-keyword kw">true</span>
226
+ 45: <span class="ruby-ivar">@output_charset</span> = <span class="ruby-identifier">output_charset</span>
227
+ 46: <span class="ruby-keyword kw">super</span>()
228
+ 47: <span class="ruby-keyword kw">end</span>
229
+ </pre>
230
+ </div>
231
+ </div>
232
+ </div>
233
+
234
+ <div id="method-M000004" class="method-detail">
235
+ <a name="M000004"></a>
236
+
237
+ <div class="method-heading">
238
+ <a href="#M000004" class="method-signature">
239
+ <span class="method-name">open</span><span class="method-args">(arg = nil, output_charset = nil)</span>
240
+ </a>
241
+ </div>
242
+
243
+ <div class="method-description">
244
+ <p><a class="source-toggle" href="#"
245
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
246
+ <div class="method-source-code" id="M000004-source">
247
+ <pre>
248
+ <span class="ruby-comment cmt"># File lib/gettext/mo.rb, line 36</span>
249
+ 36: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">arg</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">output_charset</span> = <span class="ruby-keyword kw">nil</span>)
250
+ 37: <span class="ruby-identifier">result</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">output_charset</span>)
251
+ 38: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">arg</span>)
252
+ 39: <span class="ruby-keyword kw">end</span>
253
+ </pre>
254
+ </div>
255
+ </div>
256
+ </div>
257
+
258
+ <h3 class="section-bar">Public Instance methods</h3>
259
+
260
+ <div id="method-M000011" class="method-detail">
261
+ <a name="M000011"></a>
262
+
263
+ <div class="method-heading">
264
+ <a href="#M000011" class="method-signature">
265
+ <span class="method-name">hash_string</span><span class="method-args">(str)</span>
266
+ </a>
267
+ </div>
268
+
269
+ <div class="method-description">
270
+ <p><a class="source-toggle" href="#"
271
+ onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
272
+ <div class="method-source-code" id="M000011-source">
273
+ <pre>
274
+ <span class="ruby-comment cmt"># File lib/gettext/mo.rb, line 170</span>
275
+ 170: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash_string</span>(<span class="ruby-identifier">str</span>)
276
+ 171: <span class="ruby-identifier">hval</span> = <span class="ruby-value">0</span>
277
+ 172: <span class="ruby-identifier">i</span> = <span class="ruby-value">0</span>
278
+ 173: <span class="ruby-identifier">str</span>.<span class="ruby-identifier">each_byte</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span>
279
+ 174: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">b</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'\0'</span>
280
+ 175: <span class="ruby-identifier">hval</span> <span class="ruby-operator">&lt;&lt;=</span> <span class="ruby-value">4</span>
281
+ 176: <span class="ruby-identifier">hval</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">to_i</span>
282
+ 177: <span class="ruby-identifier">g</span> = <span class="ruby-identifier">hval</span> <span class="ruby-operator">&amp;</span> (<span class="ruby-value">0xf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-constant">HASHWORDBITS</span> <span class="ruby-operator">-</span> <span class="ruby-value">4</span>))
283
+ 178: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">g</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>)
284
+ 179: <span class="ruby-identifier">hval</span> <span class="ruby-operator">^=</span> <span class="ruby-identifier">g</span> <span class="ruby-operator">&gt;&gt;</span> (<span class="ruby-constant">HASHWORDBITS</span> <span class="ruby-operator">-</span> <span class="ruby-value">8</span>)
285
+ 180: <span class="ruby-identifier">hval</span> <span class="ruby-operator">^=</span> <span class="ruby-identifier">g</span>
286
+ 181: <span class="ruby-keyword kw">end</span>
287
+ 182: <span class="ruby-keyword kw">end</span>
288
+ 183: <span class="ruby-identifier">hval</span>
289
+ 184: <span class="ruby-keyword kw">end</span>
290
+ </pre>
291
+ </div>
292
+ </div>
293
+ </div>
294
+
295
+ <div id="method-M000007" class="method-detail">
296
+ <a name="M000007"></a>
297
+
298
+ <div class="method-heading">
299
+ <a href="#M000007" class="method-signature">
300
+ <span class="method-name">load</span><span class="method-args">(arg)</span>
301
+ </a>
302
+ </div>
303
+
304
+ <div class="method-description">
305
+ <p><a class="source-toggle" href="#"
306
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
307
+ <div class="method-source-code" id="M000007-source">
308
+ <pre>
309
+ <span class="ruby-comment cmt"># File lib/gettext/mo.rb, line 60</span>
310
+ 60: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load</span>(<span class="ruby-identifier">arg</span>)
311
+ 61: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">arg</span>
312
+ 62: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">String</span>
313
+ 63: <span class="ruby-keyword kw">begin</span>
314
+ 64: <span class="ruby-identifier">st</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">stat</span>(<span class="ruby-identifier">arg</span>)
315
+ 65: <span class="ruby-ivar">@last_modified</span> = [<span class="ruby-identifier">st</span>.<span class="ruby-identifier">ctime</span>, <span class="ruby-identifier">st</span>.<span class="ruby-identifier">mtime</span>]
316
+ 66: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span>
317
+ 67: <span class="ruby-keyword kw">end</span>
318
+ 68: <span class="ruby-identifier">load_from_file</span>(<span class="ruby-identifier">arg</span>)
319
+ 69: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">IO</span>
320
+ 70: <span class="ruby-identifier">load_from_stream</span>(<span class="ruby-identifier">arg</span>)
321
+ 71: <span class="ruby-keyword kw">end</span>
322
+ 72: <span class="ruby-ivar">@filename</span> = <span class="ruby-identifier">arg</span>
323
+ 73: <span class="ruby-keyword kw">self</span>
324
+ 74: <span class="ruby-keyword kw">end</span>
325
+ </pre>
326
+ </div>
327
+ </div>
328
+ </div>
329
+
330
+ <div id="method-M000013" class="method-detail">
331
+ <a name="M000013"></a>
332
+
333
+ <div class="method-heading">
334
+ <a href="#M000013" class="method-signature">
335
+ <span class="method-name">load_from_file</span><span class="method-args">(filename)</span>
336
+ </a>
337
+ </div>
338
+
339
+ <div class="method-description">
340
+ <p><a class="source-toggle" href="#"
341
+ onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
342
+ <div class="method-source-code" id="M000013-source">
343
+ <pre>
344
+ <span class="ruby-comment cmt"># File lib/gettext/mo.rb, line 253</span>
345
+ 253: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_from_file</span>(<span class="ruby-identifier">filename</span>)
346
+ 254: <span class="ruby-ivar">@filename</span> = <span class="ruby-identifier">filename</span>
347
+ 255: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">'rb'</span>){<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">load_from_stream</span>(<span class="ruby-identifier">f</span>)}
348
+ 256: <span class="ruby-keyword kw">end</span>
349
+ </pre>
350
+ </div>
351
+ </div>
352
+ </div>
353
+
354
+ <div id="method-M000008" class="method-detail">
355
+ <a name="M000008"></a>
356
+
357
+ <div class="method-heading">
358
+ <a href="#M000008" class="method-signature">
359
+ <span class="method-name">load_from_stream</span><span class="method-args">(io)</span>
360
+ </a>
361
+ </div>
362
+
363
+ <div class="method-description">
364
+ <p><a class="source-toggle" href="#"
365
+ onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
366
+ <div class="method-source-code" id="M000008-source">
367
+ <pre>
368
+ <span class="ruby-comment cmt"># File lib/gettext/mo.rb, line 76</span>
369
+ 76: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_from_stream</span>(<span class="ruby-identifier">io</span>)
370
+ 77: <span class="ruby-identifier">magic</span> = <span class="ruby-identifier">io</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">4</span>)
371
+ 78: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">magic</span>
372
+ 79: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">MAGIC_BIG_ENDIAN</span>
373
+ 80: <span class="ruby-ivar">@little_endian</span> = <span class="ruby-keyword kw">false</span>
374
+ 81: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">MAGIC_LITTLE_ENDIAN</span>
375
+ 82: <span class="ruby-ivar">@little_endian</span> = <span class="ruby-keyword kw">true</span>
376
+ 83: <span class="ruby-keyword kw">else</span>
377
+ 84: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidFormat</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">&quot;Unknown signature %s&quot;</span>, <span class="ruby-identifier">magic</span>.<span class="ruby-identifier">dump</span>))
378
+ 85: <span class="ruby-keyword kw">end</span>
379
+ 86:
380
+ 87: <span class="ruby-identifier">header</span> = <span class="ruby-constant">Header</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">magic</span>, <span class="ruby-operator">*</span>(<span class="ruby-identifier">io</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">4</span> <span class="ruby-operator">*</span> <span class="ruby-value">6</span>).<span class="ruby-identifier">unpack</span>(<span class="ruby-ivar">@little_endian</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'V6'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'N6'</span>)))
381
+ 88: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidFormat</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">&quot;file format revision %d isn't supported&quot;</span>, <span class="ruby-identifier">header</span>.<span class="ruby-identifier">revision</span>)) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">header</span>.<span class="ruby-identifier">revision</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
382
+ 89:
383
+ 90: <span class="ruby-identifier">io</span>.<span class="ruby-identifier">pos</span> = <span class="ruby-identifier">header</span>.<span class="ruby-identifier">orig_table_offset</span>
384
+ 91: <span class="ruby-identifier">orig_table_data</span> = <span class="ruby-identifier">io</span>.<span class="ruby-identifier">read</span>((<span class="ruby-value">4</span> <span class="ruby-operator">*</span> <span class="ruby-value">2</span>) <span class="ruby-operator">*</span> <span class="ruby-identifier">header</span>.<span class="ruby-identifier">nstrings</span>).<span class="ruby-identifier">unpack</span>(<span class="ruby-ivar">@little_endian</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'V*'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'N*'</span>)
385
+ 92:
386
+ 93: <span class="ruby-identifier">io</span>.<span class="ruby-identifier">pos</span> = <span class="ruby-identifier">header</span>.<span class="ruby-identifier">translated_table_offset</span>
387
+ 94: <span class="ruby-identifier">trans_table_data</span> = <span class="ruby-identifier">io</span>.<span class="ruby-identifier">read</span>((<span class="ruby-value">4</span> <span class="ruby-operator">*</span> <span class="ruby-value">2</span>) <span class="ruby-operator">*</span> <span class="ruby-identifier">header</span>.<span class="ruby-identifier">nstrings</span>).<span class="ruby-identifier">unpack</span>(<span class="ruby-ivar">@little_endian</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'V*'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'N*'</span>)
388
+ 95:
389
+ 96: <span class="ruby-identifier">original_strings</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">header</span>.<span class="ruby-identifier">nstrings</span>)
390
+ 97: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">in</span> <span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">header</span>.<span class="ruby-identifier">nstrings</span>
391
+ 98: <span class="ruby-identifier">io</span>.<span class="ruby-identifier">pos</span> = <span class="ruby-identifier">orig_table_data</span>[<span class="ruby-identifier">i</span> <span class="ruby-operator">*</span> <span class="ruby-value">2</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>]
392
+ 99: <span class="ruby-identifier">original_strings</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">io</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">orig_table_data</span>[<span class="ruby-identifier">i</span> <span class="ruby-operator">*</span> <span class="ruby-value">2</span> <span class="ruby-operator">+</span> <span class="ruby-value">0</span>])
393
+ 100: <span class="ruby-keyword kw">end</span>
394
+ 101:
395
+ 102: <span class="ruby-identifier">clear</span>
396
+ 103: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">in</span> <span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">header</span>.<span class="ruby-identifier">nstrings</span>
397
+ 104: <span class="ruby-identifier">io</span>.<span class="ruby-identifier">pos</span> = <span class="ruby-identifier">trans_table_data</span>[<span class="ruby-identifier">i</span> <span class="ruby-operator">*</span> <span class="ruby-value">2</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>]
398
+ 105: <span class="ruby-identifier">str</span> = <span class="ruby-identifier">io</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">trans_table_data</span>[<span class="ruby-identifier">i</span> <span class="ruby-operator">*</span> <span class="ruby-value">2</span> <span class="ruby-operator">+</span> <span class="ruby-value">0</span>])
399
+ 106:
400
+ 107: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span> <span class="ruby-identifier">original_strings</span>[<span class="ruby-identifier">i</span>]) <span class="ruby-operator">||</span> <span class="ruby-identifier">original_strings</span>[<span class="ruby-identifier">i</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&quot;</span>
401
+ 108: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">str</span>
402
+ 109: <span class="ruby-ivar">@charset</span> = <span class="ruby-keyword kw">nil</span>
403
+ 110: <span class="ruby-ivar">@nplurals</span> = <span class="ruby-keyword kw">nil</span>
404
+ 111: <span class="ruby-ivar">@plural</span> = <span class="ruby-keyword kw">nil</span>
405
+ 112: <span class="ruby-identifier">str</span>.<span class="ruby-identifier">each_line</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
406
+ 113: <span class="ruby-keyword kw">if</span> <span class="ruby-regexp re">/^Content-Type:/i</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">line</span> <span class="ruby-keyword kw">and</span> <span class="ruby-regexp re">/charset=((?:\w|-)+)/i</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">line</span>
407
+ 114: <span class="ruby-ivar">@charset</span> = <span class="ruby-identifier">$1</span>
408
+ 115: <span class="ruby-keyword kw">elsif</span> <span class="ruby-regexp re">/^Plural-Forms:\s*nplurals\s*\=\s*(\d*);\s*plural\s*\=\s*([^;]*)\n?/</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">line</span>
409
+ 116: <span class="ruby-ivar">@nplurals</span> = <span class="ruby-identifier">$1</span>
410
+ 117: <span class="ruby-ivar">@plural</span> = <span class="ruby-identifier">$2</span>
411
+ 118: <span class="ruby-keyword kw">end</span>
412
+ 119: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@charset</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@nplurals</span>
413
+ 120: }
414
+ 121: <span class="ruby-ivar">@nplurals</span> = <span class="ruby-value str">&quot;1&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@nplurals</span>
415
+ 122: <span class="ruby-ivar">@plural</span> = <span class="ruby-value str">&quot;0&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@plural</span>
416
+ 123: <span class="ruby-keyword kw">end</span>
417
+ 124: <span class="ruby-keyword kw">else</span>
418
+ 125: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@output_charset</span>
419
+ 126: <span class="ruby-keyword kw">begin</span>
420
+ 127: <span class="ruby-identifier">str</span> = <span class="ruby-constant">Iconv</span>.<span class="ruby-identifier">conv</span>(<span class="ruby-ivar">@output_charset</span>, <span class="ruby-ivar">@charset</span>, <span class="ruby-identifier">str</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@charset</span>
421
+ 128: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Iconv</span><span class="ruby-operator">::</span><span class="ruby-constant">Failure</span>
422
+ 129: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
423
+ 130: <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">print</span> <span class="ruby-value str">&quot;@charset = &quot;</span>, <span class="ruby-ivar">@charset</span>, <span class="ruby-value str">&quot;\n&quot;</span>
424
+ 131: <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">print</span> <span class="ruby-value str">&quot;@output_charset = &quot;</span>, <span class="ruby-ivar">@output_charset</span>, <span class="ruby-value str">&quot;\n&quot;</span>
425
+ 132: <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">print</span> <span class="ruby-value str">&quot;msgid = &quot;</span>, <span class="ruby-identifier">original_strings</span>[<span class="ruby-identifier">i</span>], <span class="ruby-value str">&quot;\n&quot;</span>
426
+ 133: <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">print</span> <span class="ruby-value str">&quot;msgstr = &quot;</span>, <span class="ruby-identifier">str</span>, <span class="ruby-value str">&quot;\n&quot;</span>
427
+ 134: <span class="ruby-keyword kw">end</span>
428
+ 135: <span class="ruby-keyword kw">end</span>
429
+ 136: <span class="ruby-keyword kw">end</span>
430
+ 137: <span class="ruby-keyword kw">end</span>
431
+ 138: <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">original_strings</span>[<span class="ruby-identifier">i</span>]] = <span class="ruby-identifier">str</span>
432
+ 139: <span class="ruby-keyword kw">end</span>
433
+ 140: <span class="ruby-keyword kw">self</span>
434
+ 141: <span class="ruby-keyword kw">end</span>
435
+ </pre>
436
+ </div>
437
+ </div>
438
+ </div>
439
+
440
+ <div id="method-M000010" class="method-detail">
441
+ <a name="M000010"></a>
442
+
443
+ <div class="method-heading">
444
+ <a href="#M000010" class="method-signature">
445
+ <span class="method-name">next_prime</span><span class="method-args">(seed)</span>
446
+ </a>
447
+ </div>
448
+
449
+ <div class="method-description">
450
+ <p>
451
+ From gettext-0.12.1/gettext-tools/lib/hash.c
452
+ </p>
453
+ <p><a class="source-toggle" href="#"
454
+ onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
455
+ <div class="method-source-code" id="M000010-source">
456
+ <pre>
457
+ <span class="ruby-comment cmt"># File lib/gettext/mo.rb, line 157</span>
458
+ 157: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">next_prime</span>(<span class="ruby-identifier">seed</span>)
459
+ 158: <span class="ruby-identifier">seed</span> <span class="ruby-operator">|=</span> <span class="ruby-value">1</span>
460
+ 159: <span class="ruby-keyword kw">while</span> (<span class="ruby-operator">!</span> <span class="ruby-identifier">prime?</span>(<span class="ruby-identifier">seed</span>))
461
+ 160: <span class="ruby-identifier">seed</span> <span class="ruby-operator">+=</span> <span class="ruby-value">2</span>
462
+ 161: <span class="ruby-keyword kw">end</span>
463
+ 162: <span class="ruby-identifier">seed</span>
464
+ 163: <span class="ruby-keyword kw">end</span>
465
+ </pre>
466
+ </div>
467
+ </div>
468
+ </div>
469
+
470
+ <div id="method-M000009" class="method-detail">
471
+ <a name="M000009"></a>
472
+
473
+ <div class="method-heading">
474
+ <a href="#M000009" class="method-signature">
475
+ <span class="method-name">prime?</span><span class="method-args">(candidate)</span>
476
+ </a>
477
+ </div>
478
+
479
+ <div class="method-description">
480
+ <p>
481
+ From gettext-0.12.1/gettext-tools/lib/hash.c
482
+ </p>
483
+ <p><a class="source-toggle" href="#"
484
+ onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
485
+ <div class="method-source-code" id="M000009-source">
486
+ <pre>
487
+ <span class="ruby-comment cmt"># File lib/gettext/mo.rb, line 144</span>
488
+ 144: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prime?</span>(<span class="ruby-identifier">candidate</span>)
489
+ 145: <span class="ruby-identifier">divn</span> = <span class="ruby-value">3</span>
490
+ 146: <span class="ruby-identifier">sq</span> = <span class="ruby-identifier">divn</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">divn</span>
491
+ 147:
492
+ 148: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">sq</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">candidate</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">candidate</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">divn</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>)
493
+ 149: <span class="ruby-identifier">divn</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
494
+ 150: <span class="ruby-identifier">sq</span> <span class="ruby-operator">+=</span> <span class="ruby-value">4</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">divn</span>
495
+ 151: <span class="ruby-identifier">divn</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
496
+ 152: <span class="ruby-keyword kw">end</span>
497
+ 153: <span class="ruby-identifier">candidate</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">divn</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
498
+ 154: <span class="ruby-keyword kw">end</span>
499
+ </pre>
500
+ </div>
501
+ </div>
502
+ </div>
503
+
504
+ <div id="method-M000014" class="method-detail">
505
+ <a name="M000014"></a>
506
+
507
+ <div class="method-heading">
508
+ <a href="#M000014" class="method-signature">
509
+ <span class="method-name">save_to_file</span><span class="method-args">(filename)</span>
510
+ </a>
511
+ </div>
512
+
513
+ <div class="method-description">
514
+ <p><a class="source-toggle" href="#"
515
+ onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
516
+ <div class="method-source-code" id="M000014-source">
517
+ <pre>
518
+ <span class="ruby-comment cmt"># File lib/gettext/mo.rb, line 258</span>
519
+ 258: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save_to_file</span>(<span class="ruby-identifier">filename</span>)
520
+ 259: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">'wb'</span>){<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">save_to_stream</span>(<span class="ruby-identifier">f</span>)}
521
+ 260: <span class="ruby-keyword kw">end</span>
522
+ </pre>
523
+ </div>
524
+ </div>
525
+ </div>
526
+
527
+ <div id="method-M000012" class="method-detail">
528
+ <a name="M000012"></a>
529
+
530
+ <div class="method-heading">
531
+ <a href="#M000012" class="method-signature">
532
+ <span class="method-name">save_to_stream</span><span class="method-args">(io)</span>
533
+ </a>
534
+ </div>
535
+
536
+ <div class="method-description">
537
+ <p><a class="source-toggle" href="#"
538
+ onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
539
+ <div class="method-source-code" id="M000012-source">
540
+ <pre>
541
+ <span class="ruby-comment cmt"># File lib/gettext/mo.rb, line 186</span>
542
+ 186: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save_to_stream</span>(<span class="ruby-identifier">io</span>)
543
+ 187: <span class="ruby-comment cmt">#Save data as little endian format.</span>
544
+ 188: <span class="ruby-identifier">header_size</span> = <span class="ruby-value">4</span> <span class="ruby-operator">*</span> <span class="ruby-value">7</span>
545
+ 189: <span class="ruby-identifier">table_size</span> = <span class="ruby-value">4</span> <span class="ruby-operator">*</span> <span class="ruby-value">2</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">size</span>
546
+ 190:
547
+ 191: <span class="ruby-identifier">hash_table_size</span> = <span class="ruby-identifier">next_prime</span>((<span class="ruby-identifier">size</span> <span class="ruby-operator">*</span> <span class="ruby-value">4</span>) <span class="ruby-operator">/</span> <span class="ruby-value">3</span>)
548
+ 192: <span class="ruby-identifier">hash_table_size</span> = <span class="ruby-value">3</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash_table_size</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-value">2</span>
549
+ 193: <span class="ruby-identifier">header</span> = <span class="ruby-constant">Header</span>.<span class="ruby-identifier">new</span>(
550
+ 194: <span class="ruby-constant">MAGIC_LITTLE_ENDIAN</span>, <span class="ruby-comment cmt"># magic</span>
551
+ 195: <span class="ruby-value">0</span>, <span class="ruby-comment cmt"># revision</span>
552
+ 196: <span class="ruby-identifier">size</span>, <span class="ruby-comment cmt"># nstrings</span>
553
+ 197: <span class="ruby-identifier">header_size</span>, <span class="ruby-comment cmt"># orig_table_offset</span>
554
+ 198: <span class="ruby-identifier">header_size</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">table_size</span>, <span class="ruby-comment cmt"># translated_table_offset</span>
555
+ 199: <span class="ruby-identifier">hash_table_size</span>, <span class="ruby-comment cmt"># hash_table_size</span>
556
+ 200: <span class="ruby-identifier">header_size</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">table_size</span> <span class="ruby-operator">*</span> <span class="ruby-value">2</span> <span class="ruby-comment cmt"># hash_table_offset</span>
557
+ 201: )
558
+ 202: <span class="ruby-identifier">io</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">header</span>.<span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'a4V*'</span>))
559
+ 203:
560
+ 204: <span class="ruby-identifier">ary</span> = <span class="ruby-identifier">to_a</span>
561
+ 205: <span class="ruby-identifier">ary</span>.<span class="ruby-identifier">sort!</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">b</span>[<span class="ruby-value">0</span>]} <span class="ruby-comment cmt"># sort by original string</span>
562
+ 206:
563
+ 207: <span class="ruby-identifier">pos</span> = <span class="ruby-identifier">header</span>.<span class="ruby-identifier">hash_table_size</span> <span class="ruby-operator">*</span> <span class="ruby-value">4</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">header</span>.<span class="ruby-identifier">hash_table_offset</span>
564
+ 208:
565
+ 209: <span class="ruby-identifier">orig_table_data</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>()
566
+ 210: <span class="ruby-identifier">ary</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">item</span>, <span class="ruby-identifier">_</span><span class="ruby-operator">|</span>
567
+ 211: <span class="ruby-identifier">orig_table_data</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">item</span>.<span class="ruby-identifier">size</span>)
568
+ 212: <span class="ruby-identifier">orig_table_data</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">pos</span>)
569
+ 213: <span class="ruby-identifier">pos</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">item</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span> <span class="ruby-comment cmt"># +1 is &lt;NUL&gt;</span>
570
+ 214: }
571
+ 215: <span class="ruby-identifier">io</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">orig_table_data</span>.<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'V*'</span>))
572
+ 216:
573
+ 217: <span class="ruby-identifier">trans_table_data</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>()
574
+ 218: <span class="ruby-identifier">ary</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">_</span>, <span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
575
+ 219: <span class="ruby-identifier">trans_table_data</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">item</span>.<span class="ruby-identifier">size</span>)
576
+ 220: <span class="ruby-identifier">trans_table_data</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">pos</span>)
577
+ 221: <span class="ruby-identifier">pos</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">item</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span> <span class="ruby-comment cmt"># +1 is &lt;NUL&gt;</span>
578
+ 222: }
579
+ 223: <span class="ruby-identifier">io</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">trans_table_data</span>.<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'V*'</span>))
580
+ 224:
581
+ 225: <span class="ruby-identifier">hash_tab</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">hash_table_size</span>)
582
+ 226: <span class="ruby-identifier">j</span> = <span class="ruby-value">0</span>
583
+ 227: <span class="ruby-identifier">ary</span>[<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">size</span>].<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">_</span><span class="ruby-operator">|</span>
584
+ 228: <span class="ruby-identifier">hash_val</span> = <span class="ruby-identifier">hash_string</span>(<span class="ruby-identifier">key</span>)
585
+ 229: <span class="ruby-identifier">idx</span> = <span class="ruby-identifier">hash_val</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">hash_table_size</span>
586
+ 230: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash_tab</span>[<span class="ruby-identifier">idx</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
587
+ 231: <span class="ruby-identifier">incr</span> = <span class="ruby-value">1</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">hash_val</span> <span class="ruby-operator">%</span> (<span class="ruby-identifier">hash_table_size</span> <span class="ruby-operator">-</span> <span class="ruby-value">2</span>))
588
+ 232: <span class="ruby-keyword kw">begin</span>
589
+ 233: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">idx</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-identifier">hash_table_size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">incr</span>)
590
+ 234: <span class="ruby-identifier">idx</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">hash_table_size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">incr</span>
591
+ 235: <span class="ruby-keyword kw">else</span>
592
+ 236: <span class="ruby-identifier">idx</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">incr</span>
593
+ 237: <span class="ruby-keyword kw">end</span>
594
+ 238: <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">until</span> (<span class="ruby-identifier">hash_tab</span>[<span class="ruby-identifier">idx</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>)
595
+ 239: <span class="ruby-keyword kw">end</span>
596
+ 240: <span class="ruby-identifier">hash_tab</span>[<span class="ruby-identifier">idx</span>] = <span class="ruby-identifier">j</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
597
+ 241: <span class="ruby-identifier">j</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
598
+ 242: }
599
+ 243: <span class="ruby-identifier">hash_tab</span>.<span class="ruby-identifier">collect!</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">i</span> <span class="ruby-value">? </span><span class="ruby-identifier">i</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>}
600
+ 244:
601
+ 245: <span class="ruby-identifier">io</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">hash_tab</span>.<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'V*'</span>))
602
+ 246:
603
+ 247: <span class="ruby-identifier">ary</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">item</span>, <span class="ruby-identifier">_</span><span class="ruby-operator">|</span> <span class="ruby-identifier">io</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">item</span>); <span class="ruby-identifier">io</span>.<span class="ruby-identifier">write</span>(<span class="ruby-value str">&quot;\0&quot;</span>) }
604
+ 248: <span class="ruby-identifier">ary</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">_</span>, <span class="ruby-identifier">item</span><span class="ruby-operator">|</span> <span class="ruby-identifier">io</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">item</span>); <span class="ruby-identifier">io</span>.<span class="ruby-identifier">write</span>(<span class="ruby-value str">&quot;\0&quot;</span>) }
605
+ 249:
606
+ 250: <span class="ruby-keyword kw">self</span>
607
+ 251: <span class="ruby-keyword kw">end</span>
608
+ </pre>
609
+ </div>
610
+ </div>
611
+ </div>
612
+
613
+ <div id="method-M000015" class="method-detail">
614
+ <a name="M000015"></a>
615
+
616
+ <div class="method-heading">
617
+ <a href="#M000015" class="method-signature">
618
+ <span class="method-name">set_comment</span><span class="method-args">(msgid_or_sym, comment)</span>
619
+ </a>
620
+ </div>
621
+
622
+ <div class="method-description">
623
+ <p><a class="source-toggle" href="#"
624
+ onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
625
+ <div class="method-source-code" id="M000015-source">
626
+ <pre>
627
+ <span class="ruby-comment cmt"># File lib/gettext/mo.rb, line 262</span>
628
+ 262: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_comment</span>(<span class="ruby-identifier">msgid_or_sym</span>, <span class="ruby-identifier">comment</span>)
629
+ 263: <span class="ruby-comment cmt">#Do nothing</span>
630
+ 264: <span class="ruby-keyword kw">end</span>
631
+ </pre>
632
+ </div>
633
+ </div>
634
+ </div>
635
+
636
+ <div id="method-M000006" class="method-detail">
637
+ <a name="M000006"></a>
638
+
639
+ <div class="method-heading">
640
+ <a href="#M000006" class="method-signature">
641
+ <span class="method-name">update!</span><span class="method-args">()</span>
642
+ </a>
643
+ </div>
644
+
645
+ <div class="method-description">
646
+ <p><a class="source-toggle" href="#"
647
+ onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
648
+ <div class="method-source-code" id="M000006-source">
649
+ <pre>
650
+ <span class="ruby-comment cmt"># File lib/gettext/mo.rb, line 49</span>
651
+ 49: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update!</span>
652
+ 50: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">FileTest</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-ivar">@filename</span>)
653
+ 51: <span class="ruby-identifier">st</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">stat</span>(<span class="ruby-ivar">@filename</span>)
654
+ 52: <span class="ruby-identifier">load</span>(<span class="ruby-ivar">@filename</span>) <span class="ruby-keyword kw">unless</span> (<span class="ruby-ivar">@last_modified</span> <span class="ruby-operator">==</span> [<span class="ruby-identifier">st</span>.<span class="ruby-identifier">ctime</span>, <span class="ruby-identifier">st</span>.<span class="ruby-identifier">mtime</span>])
655
+ 53: <span class="ruby-keyword kw">else</span>
656
+ 54: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{@filename} was lost.&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
657
+ 55: <span class="ruby-identifier">clear</span>
658
+ 56: <span class="ruby-keyword kw">end</span>
659
+ 57: <span class="ruby-keyword kw">self</span>
660
+ 58: <span class="ruby-keyword kw">end</span>
661
+ </pre>
662
+ </div>
663
+ </div>
664
+ </div>
665
+
666
+
667
+ </div>
668
+
669
+
670
+ </div>
671
+
672
+
673
+ <div id="validator-badges">
674
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
675
+ </div>
676
+
677
+ </body>
678
+ </html>