summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* * transcode_data.h (rb_transcoding): remove stateful field.akr2008-09-038-62/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add state field. (TRANSCODING_STATE): defined. (rb_transcoder): add fields: state_size, state_init_func, state_fini_func. change rb_transcoding* argument to void*. * transcode.c (transcode_restartable0): use TRANSCODING_STATE for first arguments of transcoder functions. (rb_transcoding_open_by_transcoder): initialize state field. (rb_transcoding_close): finalize state field. * tool/transcode-tblgen.rb: provide state size/init/fini. * enc/trans/newline.trans (universal_newline_init): defined. (fun_so_universal_newline): take void* as a state pointer. (rb_universal_newline): provide state size/init/fini. (rb_crlf_newline): ditto. (rb_cr_newline): ditto. * enc/trans/iso2022.trans (iso2022jp_init): defined. (fun_si_iso2022jp_to_eucjp): take void* as a state pointer. (fun_so_iso2022jp_to_eucjp): ditto. (fun_so_eucjp_to_iso2022jp): ditto. (iso2022jp_reset_sequence_size): ditto. (finish_eucjp_to_iso2022jp): ditto. (rb_ISO_2022_JP_to_EUC_JP): provide state size/init/fini. (rb_EUC_JP_to_ISO_2022_JP): ditto. * enc/trans/utf_16_32.trans (fun_so_from_utf_16be): take void* as a state pointer. (fun_so_to_utf_16be): ditto. (fun_so_from_utf_16le): ditto. (fun_so_to_utf_16le): ditto. (fun_so_from_utf_32be): ditto. (fun_so_to_utf_32be): ditto. (fun_so_from_utf_32le): ditto. (fun_so_to_utf_32le): ditto. (rb_from_UTF_16BE): provide state size/init/fini. (rb_to_UTF_16BE): ditto. (rb_from_UTF_16LE): ditto. (rb_to_UTF_16LE): ditto. (rb_from_UTF_32BE): ditto. (rb_to_UTF_32BE): ditto. (rb_from_UTF_32LE): ditto. (rb_to_UTF_32LE): ditto. * enc/trans/japanese.trans (fun_so_eucjp2sjis): take void* as a state pointer. (fun_so_sjis2eucjp): ditto. (rb_eucjp2sjis): provide state size/init/fini. (rb_sjis2eucjp): provide state size/init/fini. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/mathn.rb (Integer): moved into prime.rb.yugui2008-09-036-95/+618
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Prime): ditto. * lib/prime.rb (Integer): moved from mathn.rb. (Integer.each_prime): added. (Integer#prime?): added. (Prime): moved from mathn.rb. Its implmentation was rewritten. see [ruby-dev:35863]. And patched by Keiju ISHITSUKA <keiju@ishitsuka.com>, see [ruby-dev:36128]. (Prime.new): obsolete. (Prime.instance): added. (Prime.each): added. (Prime.int_from_prime_division): added. (Prime.prime_division): added. (Prime.prime?): added. Patch by TOYOFUKU Chikanobu <nobu_toyofuku at nifty.com> in [ruby-dev:36067]. (Prime.cache): removed. (Prime.primes): removed. (Prime.primes_so_far): removed. (Prime#int_from_prime_division): added. (Prime#prime_division): added. (Prime#prime?): added. (Prime#primes): removed. (Prime#primes_so_far): removed. (Prime::PseudoPrmeGenerator): added. (Prime::EratosthenesGenerator): added. (Prime::TrialDivisionGenerator): added. (Prime::Generator23): added. (Prime::TrialDivision): added. Extracted from the previous implementation of Prime by Keiju ISHITSUKA. (Prime::EratosthenesSieve): added. * lib/.document (prime.rb): added * lib/README (prime.rb): added * test/test_prime.rb: added. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/scanf.rb: fixed bug involving matching literal '['dblack2008-09-033-1/+14
| | | | | | | | * test/scanf/test_scanf.rb: added test for scanf.rb fix git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h (WORDINDEX_SHIFT_BITS): defined.akr2008-09-034-3/+16
| | | | | | | | | | | | | (WORDINDEX2INFO): defined. (INFO2WORDINDEX): defined. * tool/transcode-tblgen.rb: use WORDINDEX2INFO. * transcode.c: use INFO2WORDINDEX. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * golf_prelude.rb: suppress warning when goruby -v.kazu2008-09-032-2/+8
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refactor last change.akr2008-09-031-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (BL_MIN_BYTE): defined.akr2008-09-032-5/+17
| | | | | | | | | | | | (BL_MAX_BYTE): defined. (BL_OFFSET): defined. (BL_ACTION): defined. (transcode_restartable0): use BL_MIN_BYTE, BL_MAX_BYTE and BL_ACTION. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (BYTE_ADDR): defined.akr2008-09-032-4/+12
| | | | | | | | | (WORD_ADDR): ditto. (BL_BASE): use BYTE_ADDR and WORD_ADDR. (BL_INFO): use WORD_ADDR. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h (rb_transcoder): new field: byte_array_length andakr2008-09-033-1/+14
| | | | | | | | | | | word_array_length. * tool/transcode-tblgen.rb (transcode_generated_code): generate byte_array_length and word_array_length. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/transcode-tblgen.rb (ArrayCode): new class.akr2008-09-032-37/+46
| | | | | | | | | | | (ActionMap#gen_array_code): moved to ArrayCode. (ActionMap#numelt_array_code): ditto. (ActionMap#array_code_insert_at_last): ditto. (TRANSCODE_GENERATED_BYTES_CODE): use ArrayCode. (TRANSCODE_GENERATED_WORDS_CODE): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/japanese.trans: new file.akr2008-09-034-0/+172
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/transcode-tblgen.rb (ActionMap#gen_array_code): extracted fromakr2008-09-032-30/+38
| | | | | | | | | generate_lookup_node. (ActionMap#numelt_array_code): ditto. (ActionMap#array_code_insert_at_last): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_encoding_name): defined.akr2008-09-032-1/+8
| | | | | | | | (parser_tokadd_mbchar): show encoding in the message of "invalid multibyte char" error. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_method_missing): C99.usa2008-09-032-1/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_thread.rb: fix test.ko12008-09-032-1/+6
| | | | | | | | [ruby-dev:35960] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/make_transdb.rb: check $(srcdir)/enc/trans beforenaruse2008-09-032-2/+10
| | | | | | | | enc/trans. * enc/trans/make_transdb.rb: keep names_t. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/signal.h: removed.ko12008-09-0318-219/+79
| | | | | | | | | | | | | | | * common.mk, class.c, eval.c, eval_intern.h, file.c, gc.c, hash.c, io.c, process.c, signal.c: vm_core.h: ditto. Some unused external global variables are also removed. (rb_prohibit_interrupt, rb_trap_immediate, rb_trap_pending, rb_thread_critical) * ext/openssl/ossl_ssl.c, ext/openssl/ossl_x509store.c, ext/readline/readline.c, ext/socket/depend, ext/socket/socket.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add svn:ignore entries.knu2008-09-030-0/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2008-09-03svn2008-09-021-3/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_method_missing): copy arguments to allocatedmame2008-09-022-2/+8
| | | | | | | memory from machine stack. [ruby-dev:36064] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h (base_element): removed.akr2008-09-024-18/+31
| | | | | | | | | | | | | | | | | | (BYTE_LOOKUP): removed. (BYTE_LOOKUP_BASE): don't cast. (BYTE_LOOKUP_INFO): ditto. (PType): unsigned int, instead of uintptr_t. (rb_transcoding): change type of next_field, conv_tree_start and word_array. * tool/transcode-tblgen.rb: generate word_array as array of unsigned int. * transcode.c (transcode_restartable0): follow the above type change. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/transcode-tblgen.rb: add prefix for byte_array and word_array.akr2008-09-022-3/+12
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/make_transdb.rb: check foo.c only if foo.trans exists.akr2008-09-022-2/+19
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/make_transdb.rb: error message improved.akr2008-09-022-4/+9
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert last commit.akr2008-09-022-9/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/make_transdb.rb: error message improved.akr2008-09-022-4/+9
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/utf_16_32.trans (from_UTF_8): rename from to_UTF_16BEusa2008-09-022-15/+20
| | | | | | | | because it was not collect. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/emacs_mule.c (svn:executable): dropped executable bit.yugui2008-09-023-0/+6
| | | | | | | | * enc/make_encdb.rb (svn:executable): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: fixed ML reference of r15966.nobu2008-09-021-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/Makefile.sub (COMPILERFLAG): new compiler flag to compileusa2008-09-022-1/+9
| | | | | | | | enc/trans/japanese*.c. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/japanese_euc.trans: splitted from japanese.trans to avoidakr2008-09-023-25/+42
| | | | | | | | | | compiler limitation. reported by usa. * enc/trans/japanese_sjis.trans: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/Makefile.sub (miniruby): new target.usa2008-09-022-1/+7
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (struct load_arg): data is now st_table.nobu2008-09-022-17/+37
| | | | | | | | | | | * marshal.c (mark_load_arg): marks data and compat_tbl. * marshal.c (r_object0): no need to check if reentered. * marshal.c (marshal_load): make the wrapper with mark_load_arg. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* properties.nobu2008-09-020-0/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (gettimeofday): easier calculation. use the definitionusa2008-09-022-1/+6
| | | | | | | | of the Gregorian calender. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk (distclean-golf): moved golf_prelude.c here fromyugui2008-09-022-1/+10
| | | | | | | | distclean-local. (GOLFPRELUDE): added. (distclean-local): moved golf_prelude.c into distclean-golf. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (gettimeofday): calc tv_sec and tv_usec from systemusa2008-09-022-6/+23
| | | | | | | | time by myself. [ruby-dev:36084] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h (o3): prevent sign extension on 64bit environment.akr2008-09-012-2/+7
| | | | | | | (o4): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/transcode-tblgen.rb: comment removed in generated code.akr2008-09-012-1/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/transcode-tblgen.rb: define TRANSCODE_TABLE_INFO in generatedakr2008-09-015-15/+29
| | | | | | | | | | | | | | code. use it in rb_transcoder. * enc/trans/newline.trans: use TRANSCODE_TABLE_INFO. * enc/trans/iso2022.trans: ditto. * enc/trans/utf_16_32.trans: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/transcode-tblgen.rb: record infos and BYTE_LOOKUPs as index ofakr2008-09-014-6/+18
| | | | | | | | | | | | | | word_array to avoid relocation. * transcode.c (transcode_restartable0): add word_array to get infos and BYTE_LOOKUPs. * transcode_data.h (BYTE_LOOKUP_INFO): change return type to uintptr_t. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/transcode-tblgen.rb: don't need to cast offsets array.akr2008-09-012-1/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/transcode-tblgen.rb: record offsets array as index ofakr2008-09-017-4/+40
| | | | | | | | | | | | | | | | | | | | | byte_array to avoid relocation. * transcode.c (transcode_restartable0): add byte_array to get offsets array. * transcode_data.h (BYTE_LOOKUP_BASE): change return type to uintptr_t. (rb_transcoder): add fields: byte_array, word_array and word_size. * enc/trans/newline.trans: follow rb_transcoder change. * enc/trans/iso2022.trans: ditto. * enc/trans/utf_16_32.trans: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/transcode-tblgen.rb: make infos arrays and BYTE_LOOKUPs intoakr2008-09-012-16/+33
| | | | | | | single array. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk (clean-golf): added.yugui2008-09-012-4/+17
| | | | | | | | | | (distclean-golf): added. (realclean-golf): added. (clean): added clean-golf. (distclean): added distclean-golf. (realclean): added realclean-golf. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk (realclean-local): added newline.c.yugui2008-09-012-1/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2008-09-02svn2008-09-011-3/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h (BYTE_LOOKUP): change to uintptr_t array.akr2008-09-017-37/+54
| | | | | | | | | | | | | | | | | | | | | (BYTE_LOOKUP_BASE): follow the type change. (BYTE_LOOKUP_INFO): ditto. (PType): ditto. (rb_transcoding): ditto. * tool/transcode-tblgen.rb: follow the type change. * transcode.c: ditto. * enc/trans/newline.trans: ditto. * enc/trans/iso2022.trans: ditto. * enc/trans/utf_16_32.trans: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h (BYTE_LOOKUP_BASE): abstract accessor forakr2008-09-013-3/+15
| | | | | | | | | | | | BYTE_LOOKUP. (BYTE_LOOKUP_INFO): ditto. * transcode.c (transcode_restartable0): use BYTE_LOOKUP_BASE and BYTE_LOOKUP_INFO. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/transcode-tblgen.rb: gather infos arrays and BYTE_LOOKUPs.akr2008-09-012-18/+21
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e