home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / rbemx144.zip / ruby-1.4.4 / sample / rename.rb < prev    next >
Text File  |  1999-08-13  |  12KB  |  298 lines

  1. #! /usr/local/bin/ruby -p
  2. gsub!(/\bary_aref\b/,"rb_ary_aref")
  3. gsub!(/\bary_assoc\b/,"rb_ary_assoc")
  4. gsub!(/\bary_concat\b/,"rb_ary_concat")
  5. gsub!(/\bary_delete\b/,"rb_ary_delete")
  6. gsub!(/\bary_delete_at\b/,"rb_ary_delete_at")
  7. gsub!(/\bary_each\b/,"rb_ary_each")
  8. gsub!(/\bary_entry\b/,"rb_ary_entry")
  9. gsub!(/\bary_freeze\b/,"rb_ary_freeze")
  10. gsub!(/\bary_includes\b/,"rb_ary_includes")
  11. gsub!(/\bary_join\b/,"rb_ary_join")
  12. gsub!(/\bary_new([234])?\b/,"rb_ary_new\\1")
  13. gsub!(/\bary_plus\b/,"rb_ary_plus")
  14. gsub!(/\bary_pop\b/,"rb_ary_pop")
  15. gsub!(/\bary_push\b/,"rb_ary_push")
  16. gsub!(/\bary_rassoc\b/,"rb_ary_rassoc")
  17. gsub!(/\bary_reverse\b/,"rb_ary_reverse")
  18. gsub!(/\bary_shift\b/,"rb_ary_shift")
  19. gsub!(/\bary_sort\b/,"rb_ary_sort")
  20. gsub!(/\bary_store\b/,"rb_ary_store")
  21. gsub!(/\bary_to_s\b/,"rb_ary_to_s")
  22. gsub!(/\bary_unshift\b/,"rb_ary_unshift")
  23. gsub!(/\bassoc_new\b/,"rb_assoc_new")
  24. gsub!(/\bcArray\b/,"rb_cArray")
  25. gsub!(/\bmemclear\b/,"rb_mem_clear")
  26. gsub!(/\bbig2dbl\b/,"rb_big2dbl")
  27. gsub!(/\bbig2long\b/,"rb_big2long")
  28. gsub!(/\bbig2str\b/,"rb_big2str")
  29. gsub!(/\bbig2ulong\b/,"rb_big2ulong")
  30. gsub!(/\bbig_2comp\b/,"rb_big_2comp")
  31. gsub!(/\bbig_and\b/,"rb_big_and")
  32. gsub!(/\bbig_clone\b/,"rb_big_clone")
  33. gsub!(/\bbig_lshift\b/,"rb_big_lshift")
  34. gsub!(/\bbig_minus\b/,"rb_big_minus")
  35. gsub!(/\bbig_mul\b/,"rb_big_mul")
  36. gsub!(/\bbig_norm\b/,"rb_big_norm")
  37. gsub!(/\bbig_or\b/,"rb_big_or")
  38. gsub!(/\bbig_plus\b/,"rb_big_plus")
  39. gsub!(/\bbig_pow\b/,"rb_big_pow")
  40. gsub!(/\bbig_rand\b/,"rb_big_rand")
  41. gsub!(/\bbig_xor\b/,"rb_big_xor")
  42. gsub!(/\bcBignum\b/,"rb_cBignum")
  43. gsub!(/\bdbl2big\b/,"rb_dbl2big")
  44. gsub!(/\bint2big\b/,"rb_int2big")
  45. gsub!(/\bint2inum\b/,"rb_int2inum")
  46. gsub!(/\bstr2inum\b/,"rb_str2inum")
  47. gsub!(/\buint2big\b/,"rb_uint2big")
  48. gsub!(/\buint2inum\b/,"rb_uint2inum")
  49. gsub!(/\bclass_instance_methods\b/,"rb_class_instance_methods")
  50. gsub!(/\bclass_new\b/,"rb_class_new")
  51. gsub!(/\bclass_private_instance_methods\b/,"rb_class_private_instance_methods")
  52. gsub!(/\bclass_protected_instance_methods\b/,"rb_class_protected_instance_methods")
  53. gsub!(/\bmod_ancestors\b/,"rb_mod_ancestors")
  54. gsub!(/\bmod_included_modules\b/,"rb_mod_included_modules")
  55. gsub!(/\bmodule_new\b/,"rb_module_new")
  56. gsub!(/\bobj_singleton_methods\b/,"rb_obj_singleton_methods")
  57. gsub!(/\bsingleton_class\b/,"rb_singleton_class")
  58. gsub!(/\bmComparable\b/,"rb_mComparable")
  59. gsub!(/\bcDir\b/,"rb_cDir")
  60. gsub!(/\benum_length\b/,"rb_enum_length")
  61. gsub!(/\bmEnumerable\b/,"rb_mEnumerable")
  62. gsub!(/\bBug\b/,"rb_bug")
  63. gsub!(/\brb_check_type\b/,"rb_check_type")
  64. gsub!(/\beArgError\b/,"rb_eArgError")
  65. gsub!(/\beException\b/,"rb_eException")
  66. gsub!(/\beFatal\b/,"rb_eFatal")
  67. gsub!(/\beIndexError\b/,"rb_eIndexError")
  68. gsub!(/\beInterrupt\b/,"rb_eInterrupt")
  69. gsub!(/\beLoadError\b/,"rb_eLoadError")
  70. gsub!(/\beNameError\b/,"rb_eNameError")
  71. gsub!(/\beNotImpError\b/,"rb_eNotImpError")
  72. gsub!(/\beRuntimeError\b/,"rb_eRuntimeError")
  73. gsub!(/\beSecurityError\b/,"rb_eSecurityError")
  74. gsub!(/\beStandardError\b/,"rb_eStandardError")
  75. gsub!(/\beSyntaxError\b/,"rb_eSyntaxError")
  76. gsub!(/\beSystemCallError\b/,"rb_eSystemCallError")
  77. gsub!(/\beSystemExit\b/,"rb_eSystemExit")
  78. gsub!(/\beTypeError\b/,"rb_eTypeError")
  79. gsub!(/\bexc_new([23]?)\b/,"rb_exc_new\\1")
  80. gsub!(/\bFatal\b/,"rb_fatal")
  81. gsub!(/\bLoadError\b/,"rb_loaderror")
  82. gsub!(/\bmErrno\b/,"rb_mErrno")
  83. gsub!(/\bRaise\b/,"rb_raise")
  84. gsub!(/\bWarn(ing)?\b/,"rb_warn\\1")
  85. gsub!(/\bnerrs\b/,"ruby_nerrs")
  86. gsub!(/\bcProc\b/,"rb_cProc")
  87. gsub!(/\bcThread\b/,"rb_cThread")
  88. gsub!(/\brb_check_safe_str\b/,"rb_check_safe_str")
  89. gsub!(/\bclass_new_instance\b/,"rb_class_new_instance")
  90. gsub!(/\bdyna_var_asgn\b/,"rb_dvar_asgn")
  91. gsub!(/\bdyna_var_defined\b/,"rb_dvar_defined")
  92. gsub!(/\bdyna_var_push\b/,"rb_dvar_push")
  93. gsub!(/\bdyna_var_ref\b/,"rb_dvar_ref")
  94. gsub!(/\bf_lambda\b/,"rb_f_lambda")
  95. gsub!(/\bf_load\b/,";xxx_need_modify;rb_load")
  96. gsub!(/\bf_require\b/,"rb_f_require")
  97. gsub!(/\bgc_mark_threads\b/,"rb_gc_mark_threads")
  98. gsub!(/\biterator_p\b/,"rb_iterator_p")
  99. gsub!(/\bobj_call_init\b/,"rb_obj_call_init")
  100. gsub!(/\brb_set_end_proc\b/,"rb_set_end_proc")
  101. gsub!(/\brb_set_safe_level\b/,"rb_set_safe_level")
  102. gsub!(/\bthread_alone\b/,"rb_thread_alone")
  103. gsub!(/\bthread_create\b/,"rb_thread_create")
  104. gsub!(/\bthread_critical\b/,"rb_thread_critical")
  105. gsub!(/\bthread_fd_writable\b/,"rb_thread_fd_writable")
  106. gsub!(/\bthread_interrupt\b/,"rb_thread_interrupt")
  107. gsub!(/\bthread_schedule\b/,"rb_thread_schedule")
  108. gsub!(/\bthread_select\b/,"rb_thread_select")
  109. gsub!(/\bthread_sleep\b/,"rb_thread_sleep")
  110. gsub!(/\bthread_sleep_forever\b/,"rb_thread_sleep_forever")
  111. gsub!(/\bthread_trap_eval\b/,"rb_thread_trap_eval")
  112. gsub!(/\bthread_wait_fd\b/,"rb_thread_wait_fd")
  113. gsub!(/\bthread_wait_for\b/,"rb_thread_wait_for")
  114. gsub!(/\bthe_class\b/,"ruby_class")
  115. gsub!(/\bthe_dyna_vars\b/,"ruby_dyna_vars")
  116. gsub!(/\bthe_frame\b/,"ruby_frame")
  117. gsub!(/\bthe_init\b/,"ruby_init")
  118. gsub!(/\bthe_scope\b/,"ruby_scope")
  119. gsub!(/\bcFile\b/,"rb_cFile")
  120. gsub!(/\bfile_open\b/,"rb_file_open")
  121. gsub!(/\bfile_s_expand_path\b/,"rb_file_s_expand_path")
  122. gsub!(/\bmFileTest\b/,"rb_mFileTest")
  123. gsub!(/\bdata_object_alloc\b/,"rb_data_object_alloc")
  124. gsub!(/\bgc_call_finalizer_at_exit\b/,"rb_gc_call_finalizer_at_exit")
  125. gsub!(/\bgc_force_recycle\b/,"rb_gc_force_recycle")
  126. gsub!(/\bgc_gc\b/,"rb_gc")
  127. gsub!(/\bgc_mark\b/,"rb_gc_mark")
  128. gsub!(/\bgc_stack_start\b/,"rb_gc_stack_start")
  129. gsub!(/\bmGC\b/,"rb_mGC")
  130. gsub!(/\bcHash\b/,"rb_cHash")
  131. gsub!(/\benv_path_tainted\b/,"rb_env_path_tainted")
  132. gsub!(/\bhash_aref\b/,"rb_hash_aref")
  133. gsub!(/\bhash_aset\b/,"rb_hash_aset")
  134. gsub!(/\bhash_freeze\b/,"rb_hash_freeze")
  135. gsub!(/\bhash_new\b/,"rb_hash_new")
  136. gsub!(/\bcIO\b/,"rb_cIO")
  137. gsub!(/\beEOFError\b/,"rb_eEOFError")
  138. gsub!(/\beIOError\b/,"rb_eIOError")
  139. gsub!(/\beof_error\b/,"rb_eof_error")
  140. gsub!(/\bf_gets\b/,"rb_f_gets")
  141. gsub!(/\bio_binmode\b/,"rb_io_binmode")
  142. gsub!(/\bio_check_closed\b/,"rb_io_check_closed")
  143. gsub!(/\bio_readable\b/,"rb_io_check_readable")
  144. gsub!(/\bio_writable\b/,"rb_io_check_writable")
  145. gsub!(/\bio_close\b/,"rb_io_close")
  146. gsub!(/\bio_fptr_finalize\b/,"rb_io_fptr_finalize")
  147. gsub!(/\bio_getc\b/,"rb_io_getc")
  148. gsub!(/\bio_gets\b/,"rb_io_gets")
  149. gsub!(/\bio_gets_method\b/,"rb_io_gets_method")
  150. gsub!(/\bio_mode_flags\b/,"rb_io_mode_flags")
  151. gsub!(/\bio_reopen\b/,"rb_io_reopen")
  152. gsub!(/\bio_unbuffered\b/,"rb_io_unbuffered")
  153. gsub!(/\bio_ungetc\b/,"rb_io_ungetc")
  154. gsub!(/\bio_write\b/,"rb_io_write")
  155. gsub!(/\bRS_default\b/,"ruby_default_rs")
  156. gsub!(/\bOFS\b/,"ruby_output_fs")
  157. gsub!(/\bORS\b/,"ruby_output_rs")
  158. gsub!(/\bFS\b/,"ruby_fs")
  159. gsub!(/\bRS\b/,"ruby_rs")
  160. gsub!(/\bmMath\b/,"rb_mMath")
  161. gsub!(/\bcFixnum\b/,"rb_cFixnum")
  162. gsub!(/\bcFloat\b/,"rb_cFloat")
  163. gsub!(/\bcInteger\b/,"rb_cInteger")
  164. gsub!(/\bcNumeric\b/,"rb_cNumeric")
  165. gsub!(/\beZeroDiv\b/,"rb_eZeroDiv")
  166. gsub!(/\bfix2int\b/,"rb_fix2int")
  167. gsub!(/\bfix2str\b/,"rb_fix2str")
  168. gsub!(/\bfix_upto\b/,"rb_fix_upto")
  169. gsub!(/\bfloat_new\b/,"rb_float_new")
  170. gsub!(/\bnum2fix\b/,"rb_num2fix")
  171. gsub!(/\bnum2int\b/,"rb_num2int")
  172. gsub!(/\bnum2long\b/,"rb_num2long")
  173. gsub!(/\bnum2ulong\b/,"rb_num2ulong")
  174. gsub!(/\bnum_coerce_bin\b/,"rb_num_coerce_bin")
  175. gsub!(/\bnum_zerodiv\b/,"rb_num_zerodiv")
  176. gsub!(/\bany_to_s\b/,"rb_any_to_s")
  177. gsub!(/\bcClass\b/,"rb_cClass")
  178. gsub!(/\bcData\b/,"rb_cData")
  179. gsub!(/\bcFalseClass\b/,"rb_cFalseClass")
  180. gsub!(/\bcModule\b/,"rb_cModule")
  181. gsub!(/\bcNilClass\b/,"rb_cNilClass")
  182. gsub!(/\bcObject\b/,"rb_cObject")
  183. gsub!(/\bcTrueClass\b/,"rb_cTrueClass")
  184. gsub!(/\bmKernel\b/,"rb_mKernel")
  185. gsub!(/\bnum2dbl\b/,"rb_num2dbl")
  186. gsub!(/\bobj_alloc\b/,"rb_obj_alloc")
  187. gsub!(/\bobj_equal\b/,"rb_obj_equal")
  188. gsub!(/\bobj_is_instance_of\b/,"rb_obj_is_instance_of")
  189. gsub!(/\bobj_is_kind_of\b/,"rb_obj_is_kind_of")
  190. gsub!(/\bstr2cstr\b/,"rb_str2cstr")
  191. gsub!(/\bTopSelf\b/,"rb_top_self")
  192. gsub!(/\bbackref_get\b/,"rb_backref_get")
  193. gsub!(/\bbackref_set\b/,"rb_backref_set")
  194. gsub!(/\bcompile_file\b/,"rb_compile_file")
  195. gsub!(/\bcompile_string\b/,"rb_compile_string")
  196. gsub!(/\bid_attrset\b/,"rb_id_attrset")
  197. gsub!(/\bis_const_id\b/,"rb_is_const_id")
  198. gsub!(/\bis_instance_id\b/,"rb_is_instance_id")
  199. gsub!(/\blastline_get\b/,"rb_lastline_get")
  200. gsub!(/\blastline_set\b/,"rb_lastline_set")
  201. gsub!(/\bnode_newnode\b/,"rb_node_newnode")
  202. gsub!(/\byyappend_print\b/,"rb_parser_append_print")
  203. gsub!(/\byywhile_loop\b/,"rb_parser_while_loop")
  204. gsub!(/\brb_reserved_word\b/,"rb_reserved_word")
  205. gsub!(/\bsourcefile\b/,"ruby_sourcefile")
  206. gsub!(/\bsourceline\b/,"ruby_sourceline")
  207. gsub!(/\bmProcess\b/,"rb_mProcess")
  208. gsub!(/\bcRange\b/,"rb_cRange")
  209. gsub!(/\brange_beg_end\b/,"rb_range_beg_end")
  210. gsub!(/\brange_new\b/,"rb_range_new")
  211. gsub!(/\bcRegexp\b/,"rb_cRegexp")
  212. gsub!(/\bignorecase\b/,"rb_ignorecase")
  213. gsub!(/\breg_free\b/,"rb_reg_free")
  214. gsub!(/\breg_last_match\b/,"rb_reg_last_match")
  215. gsub!(/\breg_match\b/,"rb_reg_match")
  216. gsub!(/\breg_new\b/,"rb_reg_new")
  217. gsub!(/\breg_nth_defined\b/,"rb_reg_nth_defined")
  218. gsub!(/\breg_nth_match\b/,"rb_reg_nth_match")
  219. gsub!(/\breg_options\b/,"rb_reg_options")
  220. gsub!(/\breg_prepare_re\b/,"rb_reg_prepare_re")
  221. gsub!(/\breg_regcomp\b/,"rb_reg_regcomp")
  222. gsub!(/\breg_regsub\b/,"rb_reg_regsub")
  223. gsub!(/\breg_search\b/,"rb_reg_search")
  224. gsub!(/\bstr_cicmp\b/,"rb_str_cicmp")
  225. gsub!(/\bf_kill\b/,"rb_f_kill")
  226. gsub!(/\bgc_mark_trap_list\b/,"rb_gc_mark_trap_list")
  227. gsub!(/\bprohibit_interrupt\b/,"rb_prohibit_interrupt")
  228. gsub!(/\btrap_exec\b/,"rb_trap_exec")
  229. gsub!(/\btrap_exit\b/,"rb_trap_exit")
  230. gsub!(/\btrap_immediate\b/,"rb_trap_immediate")
  231. gsub!(/\btrap_pending\b/,"rb_trap_pending")
  232. gsub!(/\btrap_restore_mask\b/,"rb_trap_restore_mask")
  233. gsub!(/\bposix_signal\b/,"ruby_posix_signal")
  234. gsub!(/\bf_sprintf\b/,"rb_f_sprintf")
  235. gsub!(/\bcString\b/,"rb_cString")
  236. gsub!(/\bobj_as_string\b/,"rb_obj_as_string")
  237. gsub!(/\bstr_cat\b/,"rb_str_cat")
  238. gsub!(/\bstr_cmp\b/,"rb_str_cmp")
  239. gsub!(/\bstr_concat\b/,"rb_str_concat")
  240. gsub!(/\bstr_dup\b/,"rb_str_dup")
  241. gsub!(/\bstr_dup_frozen\b/,"rb_str_dup_frozen")
  242. gsub!(/\bstr_freeze\b/,"rb_str_freeze")
  243. gsub!(/\bstr_hash\b/,"rb_str_hash")
  244. gsub!(/\bstr_inspect\b/,"rb_str_inspect")
  245. gsub!(/\bstr_modify\b/,"rb_str_modify")
  246. gsub!(/\bstr_new([234]?)\b/,"rb_str_new\\1")
  247. gsub!(/\bstr_plus\b/,"rb_str_plus")
  248. gsub!(/\bstr_resize\b/,"rb_str_resize")
  249. gsub!(/\bstr_split\b/,"rb_str_split")
  250. gsub!(/\bstr_substr\b/,"rb_str_substr")
  251. gsub!(/\bstr_taint\b/,"rb_obj_taint")
  252. gsub!(/\bstr_tainted\b/,"rb_obj_tainted")
  253. gsub!(/\bstr_times\b/,"rb_str_times")
  254. gsub!(/\bstr_to_str\b/,"rb_str_to_str")
  255. gsub!(/\bstr_upto\b/,"rb_str_upto")
  256. gsub!(/\bcStruct\b/,"rb_cStruct")
  257. gsub!(/\bstruct_alloc\b/,"rb_struct_alloc")
  258. gsub!(/\bstruct_aref\b/,"rb_struct_aref")
  259. gsub!(/\bstruct_aset\b/,"rb_struct_aset")
  260. gsub!(/\bstruct_define\b/,"rb_struct_define")
  261. gsub!(/\bstruct_getmember\b/,"rb_struct_getmember")
  262. gsub!(/\bstruct_new\b/,"rb_struct_new")
  263. gsub!(/\bcTime\b/,"rb_cTime")
  264. gsub!(/\btime_new\b/,"rb_time_new")
  265. gsub!(/\btime_timeval\b/,"rb_time_timeval")
  266. gsub!(/\bscan_hex\b/,"ruby_scan_hex")
  267. gsub!(/\bscan_oct\b/,"ruby_scan_oct")
  268. gsub!(/\bconst_defined\b/,"rb_const_defined")
  269. gsub!(/\bconst_defined_at\b/,"rb_const_defined_at")
  270. gsub!(/\bconst_get\b/,"rb_const_get")
  271. gsub!(/\bconst_get_at\b/,"rb_const_get_at")
  272. gsub!(/\bconst_set\b/,"rb_const_set")
  273. gsub!(/\bf_autoload\b/,"rb_f_autoload")
  274. gsub!(/\bf_global_variables\b/,"rb_f_global_variables")
  275. gsub!(/\bf_trace_var\b/,"rb_f_trace_var")
  276. gsub!(/\bf_untrace_var\b/,"rb_f_untrace_var")
  277. gsub!(/\bmod_const_at\b/,"rb_mod_const_at")
  278. gsub!(/\bmod_const_of\b/,"rb_mod_const_of")
  279. gsub!(/\bmod_constants\b/,"rb_mod_constants")
  280. gsub!(/\bmod_name\b/,"rb_mod_name")
  281. gsub!(/\bmod_remove_const\b/,"rb_mod_remove_const")
  282. gsub!(/\bobj_instance_variables\b/,"rb_obj_instance_variables")
  283. gsub!(/\bobj_remove_instance_variable\b/,"rb_obj_remove_instance_variable")
  284. gsub!(/\bshow_copyright\b/,"ruby_show_copyright")
  285. gsub!(/\bshow_version\b/,"ruby_show_version")
  286. gsub!(/\bdebug\b/,"ruby_debug")
  287. gsub!(/\bverbose\b/,"ruby_verbose")
  288. gsub!(/\bFail\(/,"rb_raise(rb_eRuntimeError, ")
  289. gsub!(/\bArgError\(/,"rb_raise(rb_eArgError, ")
  290. gsub!(/\bTypeError\(/,"rb_raise(rb_eTypeError, ")
  291. gsub!(/\bNameError\(/,"rb_raise(rb_eNameError, ")
  292. gsub!(/\bIndexError\(/,"rb_raise(rb_eIndexError, ")
  293. gsub!(/\bError\b/,"rb_compile_error")
  294. gsub!(/\bErrorAppend\b/,"rb_compile_error_append")
  295. gsub!(/\bTRUE\b/,"Qtrue")
  296. gsub!(/\bFALSE\b/,"Qfalse")
  297. gsub!(/\berrinfo\b/,"ruby_errinfo")
  298.