summaryrefslogtreecommitdiff
path: root/include/ruby/encoding.h
AgeCommit message (Collapse)Author
2008-08-24* include/ruby/encoding.h (rb_econv_substr_append): renamed fromakr
rb_econv_string. (rb_econv_str_convert): declared. (rb_econv_substr_convert): declared. (rb_econv_str_append): declared. * io.c (io_fwrite): use rb_econv_str_convert instead of rb_econv_string. * transcode.c (rb_econv_substr_append): renamed from rb_econv_string. (rb_econv_str_append): new function. (rb_econv_substr_convert): ditto. (rb_econv_str_convert): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24* include/ruby/encoding.h (rb_econv_open_exc): declared.akr
* transcode.c (rb_eNoConverter): new exception. (rb_econv_open_exc): new function. (transcode_loop): use rb_econv_open_exc. * io.c (make_writeconv): use rb_econv_open_exc. (make_readconv): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-23* include/ruby/encoding.h (ECONV_INVALID_MASK): defined.akr
(ECONV_INVALID_IGNORE): defined. (ECONV_INVALID_REPLACE): defined. (ECONV_UNDEF_MASK): defined. (ECONV_UNDEF_IGNORE): defined. (ECONV_UNDEF_REPLACE): defined. * transcode.c (INVALID_IGNORE): removed. (INVALID_REPLACE): removed. (UNDEF_IGNORE): removed. (UNDEF_REPLACE): removed. (rb_econv_convert0): renamed from rb_econv_convert. (rb_econv_convert): defined to call rb_econv_convert0 with replace/ignore behavior moved from transcode_loop. (transcode_loop): replace/ignore behavior removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-22* include/ruby/io.h (FMODE_TEXTMODE): defined.akr
* include/ruby/encoding.h (rb_econv_t): new field: flags. (rb_econv_binmode): declared. * io.c (io_unread): text mode hack removed. (NEED_NEWLINE_DECODER): defined. (NEED_NEWLINE_ENCODER): defined. (NEED_READCONV): defined. (NEED_WRITECONV): defined. (TEXTMODE_NEWLINE_ENCODER): defined for windows. (make_writeconv): setup converter with TEXTMODE_NEWLINE_ENCODER for text mode. (io_fwrite): use NEED_WRITECONV. character code conversion is disabled if fptr->writeconv_stateless is nil. (make_readconv): setup converter with ECONV_UNIVERSAL_NEWLINE_DECODER for text mode. (read_all): use NEED_READCONV. (appendline): use NEED_READCONV. (rb_io_getline_1): use NEED_READCONV. (io_getc): use NEED_READCONV. (rb_io_ungetc): use NEED_READCONV. (rb_io_binmode): OS-level text mode test removed. call rb_econv_binmode. (rb_io_binmode_m): call rb_io_binmode_m with write_io as well. (rb_io_flags_mode): return mode string including "t". (rb_io_mode_flags): detect "t" for text mode. (rb_sysopen): always specify O_BINARY. * transcode.c (rb_econv_open_by_transcoder_entries): initialize flags. (rb_econv_open): if source and destination encoding is both empty string, open newline converter. last_tc will be NULL in this case. (rb_econv_encoding_to_insert_output): last_tc may be NULL now. (rb_econv_string): ditto. (output_replacement_character): ditto. (transcode_loop): ditto. (econv_init): ditto. (econv_inspect): ditto. (rb_econv_binmode): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-18* include/ruby/io.h (rb_io_t): new fields: writeconv,akr
writeconv_stateless and writeconv_initialized. (MakeOpenFile): initialize them. * include/ruby/encoding.h (rb_econv_stateless_encoding): declared. (rb_econv_string): declared. * io.c (make_writeconv): new function. (io_fwrite): use econv. (make_readconv): fix error message. (finish_writeconv): new function. (fptr_finalize): call finish_writeconv. (clear_writeconv): new function. (clear_codeconv): new function to call both clear_readconv and clear_writeconv. (rb_io_fptr_finalize): call clear_codeconv instead of clear_readconv. (mode_enc): ditto. (io_set_encoding): ditto. (argf_next_argv): ditto. (io_encoding_set): ditto. * gc.c (gc_mark_children): mark writeconv_stateless in T_FILE. * transcode.c (stateless_encoding_i): new function. (rb_econv_stateless_encoding): ditto. (rb_econv_string): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-17* include/ruby/encoding.h (rb_econv_putbackable): declared.akr
(rb_econv_putback): ditto. * transcode.c (rb_econv_putbackable): implemented. (rb_econv_putback): ditto. * io.c (io_getc): put back bytes if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-16* include/ruby/encoding.h (rb_econv_check_error): declared.akr
* transcode.c (make_econv_exception): new function. (transcode_loop): use make_econv_exception. (rb_econv_check_error): defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-16* include/ruby/encoding.h (rb_econv_elem_t): fields removed: from andakr
to. (rb_econv_t): new fields: source_encoding_name and destination_encoding_name. * transcode.c (rb_econv_open_by_transcoder_entries): initialize the new fields. (rb_econv_open): set up the new fields. (econv_inspect): use the new fields. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-16* include/ruby/encoding.h (rb_econv_t): add fields: in_buf_start,akr
in_data_start, in_data_end, in_buf_end and last_trans_index. (rb_econv_output): removed. (rb_econv_insert_output): declared. (rb_econv_encoding_to_insert_output): declared. * enc/trans/newline.trans (rb_universal_newline): stateful_type changed. * transcode.c (transcode_restartable0): initialize inchar_start, tc->recognized_len and next_table at beginning of the loop. (rb_econv_open_by_transcoder_entries): initialize new fields. (rb_econv_open): setup last_trans_index. (trans_sweep): last out_buf_start can be non-NULL now. (rb_econv_convert): check last out_buf_start and in_buf_start at first. (rb_econv_output_with_destination_encoding): removed. (econv_just_convert): removed. (rb_econv_output): removed. (econv_primitive_output): method removed. (rb_econv_encoding_to_insert_output): new function. (allocate_converted_string): new function. (rb_econv_insert_output): new function. (econv_primitive_insert_output): new method. (output_replacement_character): use rb_econv_insert_output. unused arguments removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-15* include/ruby/encoding.h (rb_econv_output): add str_encodingakr
argument. * transcode.c (get_replacement_character): add repl_enc_ptr argument. (rb_econv_output_with_destination_encoding): renamed from rb_econv_output and make it static. (rb_econv_output): convert str and call rb_econv_output_with_destination_encoding. (output_replacement_character): follow above interface change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-15* include/ruby/encoding.h (rb_econv_t): add error_tc in last_error.akr
* transcode.c (rb_econv_convert): fill error_tc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-15* include/ruby/encoding.h (rb_econv_t): new field: last_error.akr
* transcode.c (rb_trans_conv): new argument: result_position_ptr. (rb_econv_convert): fill last_error. (econv_result_to_symbol): extracted from econv_primitive_convert. (econv_primitive_errinfo): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-14* include/ruby/encoding.h (rb_econv_output): declared.akr
* transcode_data.h (rb_transcoder): add resetsize_func field. * enc/trans/iso2022.trans (iso2022jp_reset_sequence_size): defined. (rb_EUC_JP_to_ISO_2022_JP): provede resetsize_func. * tool/transcode-tblgen.rb: set NULL for resetsize_func. * transcode.c (rb_econv_output): new function for inserting output. (output_replacement_character): use rb_econv_output. (transcode_loop): check return value of output_replacement_character. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-14* include/ruby/encoding.h (ECONV_UNIVERSAL_NEWLINE_DECODER): defined.akr
(ECONV_CRLF_NEWLINE_ENCODER): ditto. (ECONV_CR_NEWLINE_ENCODER): ditto. (ECONV_PARTIAL_INPUT): ditto. (ECONV_OUTPUT_FOLLOWED_BY_INPUT): ditto. * transcode.c: use ECONV_* defined as above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-14* include/ruby/encoding.h (rb_econv_result_t): moved fromakr
transcode_data.h. (rb_econv_elem_t): ditto. (rb_econv_t): ditto. source_encoding and destination_encoding field is added. (rb_econv_open): declared. (rb_econv_convert): ditto. (rb_econv_close): ditto. * transcode.c (rb_econv_open_by_transcoder_entries): initialize source_encoding and destination_encoding field as NULL. (rb_econv_open): make it external linkage. (rb_econv_close): ditto. (rb_econv_convert): ditto. renamed from rb_econv_conv. (make_encoding): new function. (econv_init): use make_encoding and store rb_encoding* in rb_econv_t. (econv_source_encoding): new method Encoding::Converter#source_encoding. (econv_destination_encoding): new method Encoding::Converter#destination_encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-14* include/ruby/encoding.h (rb_enc_ispunct): added.nobu
* common.mk (COMMONOBJS), inits.c (rb_call_inits): id.c is now included from parse.c. * id.c (Init_id), id.h (ruby_method_ids): added IDs used by VM. * parse.y (global_symbols): added rooms for VM IDs. * parse.y (rb_intern3, rb_id2str): single puctuation symbol is now same as char code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-04* include/ruby/oniguruma.h (OnigEncoding): removed auxiliary_data.nobu
* include/ruby/encoding.h (ENC_DUMMY_P): moved dummy encoding flag to rb_encoding from Encoding instance. * encoding.c (rb_encoding_list): list of Encoding instances. * encoding.c (struct rb_encoding_entry): moved base encoding from instance variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29* encoding.c (rb_utf8_encindex): defined.naruse
* include/ruby/encoding.h (rb_utf8_encindex): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-16* encoding.c (rb_filesystem_encoding): defined.naruse
* include/ruby/encoding.h (rb_filesystem_encoding): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10* include/ruby/encoding.h: not to use varargs.h since requiring C89.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20* encoding.c, include/ruby/encoding.hnaruse
(rb_enc_associate, rb_enc_associate_index): returns obj. [ruby-dev:34778] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20* encoding.c (rb_ascii8bit_encoding): use ENCINDEX_ASCII.naruse
* encoding.c, include/ruby/encoding.h (rb_ascii8bit_encindex): added. * encoding.c (rb_locale_encoding): use rb_usascii_encoding(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20* transcode.c, include/ruby/encodng.h (rb_str_transcode):naruse
C API of encoding conversion for Ruby object. VALUE rb_str_transcode(VALUE str, VALUE to). * transcode.c (str_encode, str_encode_bang): rename from rb_tr_transcode or rb_str_transcode_bang. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19* regparse.c (PINC): use optimized enclen() instead ofmatz
ONIGENC_MBC_ENC_LEN(). * regparse.c (PFETCH): ditto. * regparse.c (PFETCH): small optimization. * regexec.c (slow_search): single byte encoding optimization. * regenc.h (enclen): avoid calling function when encoding's min_len == max_len. * re.c (rb_reg_regsub): rb_enc_ascget() optimization for single byte encoding. * re.c (rb_reg_search): avoid allocating new re_registers if we already have MatchData. * re.c (match_init_copy): avoid unnecessary onig_region_free() before onig_region_copy. * encoding.c (rb_enc_get_index): remove implicit enc_capable check each time. * encoding.c (rb_enc_set_index): ditto. * encoding.c (enc_compatible_p): small refactoring. * include/ruby/encoding.h (rb_enc_dummy_p): inline rb_enc_dummy_p() and export related code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-17* re.c (rb_memsearch_ss): simple shift search.naruse
* re.c (rb_memsearch_qs): quick search. * re.c (rb_memsearch_qs_utf8): quick search for UTF-8 string. * re.c (rb_memsearch_qs_utf8_hash): hash functions for above. * re.c (rb_memsearch): use above functions. * string.c (rb_str_index): give enc to rb_memsearch. * include/ruby/intern.h (rb_memsearch): move to encoding.h. * include/ruby/encoding.h (rb_memsearch): move from intern.h. * common.mk (PREP): add dependency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-28* include/ruby/encoding.h (rb_str_coderange_scan_restartable): addednobu
prototype. * string.c (rb_str_coderange_scan_restartable, rb_str_times): removed unsed variables. * string.c (rb_enc_str_copy): unused now. may be used in future? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-21* include/ruby/encoding.h (rb_enc_asciicompat): dummy encoding is notnaruse
ascii compatible. [ruby-dev:33878] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-17* encoding.c (ENC_CODERANGE_AND): fix broken case. [ruby-dev:33826]naruse
* string.c (rb_str_times): fix broken case. [ruby-dev:33826] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-17* encoding.c (ENC_CODERANGE_AND): added.naruse
* string.c (rb_str_plus, srb_str_times): keep coderange. * parse.y (STR_NEW0) use rb_usascii_str_new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27* include/ruby/oniguruma.h: precise mbclen API redesigned to avoidakr
inline functions. (onigenc_mbclen_charfound): removed. (onigenc_mbclen_needmore): removed. (onigenc_mbclen_recover): removed. (ONIGENC_MBCLEN_CHARFOUND): removed. (ONIGENC_MBCLEN_CHARFOUND_P): defined. (ONIGENC_MBCLEN_CHARFOUND_LEN): defined. (ONIGENC_MBCLEN_INVALID): removed. (ONIGENC_MBCLEN_INVALID_P): defined. (ONIGENC_MBCLEN_NEEDMORE): removed. (ONIGENC_MBCLEN_NEEDMORE_P): defined. (ONIGENC_MBCLEN_NEEDMORE_LEN): defined. (ONIGENC_MBC_ENC_LEN): use onigenc_mbclen_approximate. * regenc.c (onigenc_mbclen_approximate): defined. * include/ruby/encoding.h (MBCLEN_CHARFOUND): removed. (MBCLEN_INVALID): removed. (MBCLEN_NEEDMORE): removed. (MBCLEN_CHARFOUND_P): defined. (MBCLEN_INVALID_P): defined. (MBCLEN_NEEDMORE_P): defined. (MBCLEN_CHARFOUND_LEN): defined. (MBCLEN_NEEDMORE_LEN): defined. * encoding.c: use new API. * re.c: ditto. * string.c: ditto. * parse.y: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26* include/ruby/encoding.h (rb_usascii_encindex): added prototype.nobu
* include/ruby/intern.h (rb_usascii_str_new, rb_usascii_str_new2): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24* include/ruby/encoding.h (rb_enc_is_newline): parenthesized arguments.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-23* string.c (rb_str_each_line): use memchr(3) for faster newlinematz
search. * io.c (appendline): remove unused arguments * io.c (rb_io_getline_fast): make much simpler (and faster). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-23* encoding.{c, h} (rb_usascii_encoding): added.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-21* parse.y (rb_intern3): do not call rb_enc_mbclen() if *m ismatz
ASCII. [ruby-talk:287225] * string.c (rb_str_each_line): use rb_enc_is_newline() to gain performance if the record separator ($/) is not modified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-16* file.c (sys_fail2): get rid of unlimited alloca.nobu
* io.c (mode_enc, pipe_open, rb_io_s_popen): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07* include/ruby/oniguruma.h (OnigEncodingType): new memberakr
ruby_encoding_index to avoid linear search in rb_enc_to_index. * include/ruby/encoding.h (rb_enc_to_index): macro defined to use ruby_encoding_index. * encoding.c (rb_enc_to_index): removed. (enc_register_at): initialize ruby_encoding_index member. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07* encoding.c (rb_enc_internal_get_index): extracted fromakr
rb_enc_get_index. (rb_enc_internal_set_index): extracted from rb_enc_associate_index * include/ruby/encoding.h (ENCODING_SET): work over ENCODING_INLINE_MAX. (ENCODING_GET): ditto. (ENCODING_IS_ASCII8BIT): defined. (ENCODING_CODERANGE_SET): defined. * re.c (rb_reg_fixed_encoding_p): use ENCODING_IS_ASCII8BIT. * string.c (rb_enc_str_buf_cat): use ENCODING_IS_ASCII8BIT. * parse.y (reg_fragment_setenc_gen): use ENCODING_IS_ASCII8BIT. * marshal.c (has_ivars): use ENCODING_IS_ASCII8BIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* include/ruby/encoding.h (rb_enc_str_buf_cat): declared.akr
* string.c (coderange_scan): extracted from rb_enc_str_coderange. (rb_enc_str_coderange): use coderange_scan. (rb_str_shared_replace): copy encoding and coderange. (rb_enc_str_buf_cat): new function for linear complexity string accumulation with encoding. (rb_str_sub_bang): don't conflict substituted part and replacement. (str_gsub): use rb_enc_str_buf_cat. (rb_str_clear): clear coderange. * re.c (rb_reg_regsub): use rb_enc_str_buf_cat. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-04* include/ruby/intern.h, re.c (rb_reg_new): keep interface same asnobu
1.8. [ruby-core:14583] * include/ruby/intern.h, re.c (rb_reg_new_str): renamed, and defines HAVE_RB_REG_NEW_STR macro to tell if it is available. * include/ruby/encoding.h (rb_enc_reg_new): added. * insns.def (toregexp), marshal.c (r_object0): use rb_reg_new_str(). * re.c (rb_reg_regcomp, rb_reg_s_union): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-03* encoding.c (rb_isalnum): defined.akr
(rb_isalpha): ditto. (rb_isblank): ditto. (rb_iscntrl): ditto. (rb_isdigit): ditto. (rb_isgraph): ditto. (rb_islower): ditto. (rb_isprint): ditto. (rb_ispunct): ditto. (rb_isspace): ditto. (rb_isupper): ditto. (rb_isxdigit): ditto. (rb_tolower): ditto. (rb_toupper): ditto. * include/ruby/ruby.h: don't include include/ruby/encoding.h. (rb_isascii): defined. (rb_isalnum): declared. (rb_isalpha): ditto. (rb_isblank): ditto. (rb_iscntrl): ditto. (rb_isdigit): ditto. (rb_isgraph): ditto. (rb_islower): ditto. (rb_isprint): ditto. (rb_ispunct): ditto. (rb_isspace): ditto. (rb_isupper): ditto. (rb_isxdigit): ditto. (rb_tolower): ditto. (rb_toupper): ditto. (ISASCII): simplified. (ISPRINT): ditto. (ISSPACE): ditto. (ISUPPER): ditto. (ISLOWER): ditto. (ISALNUM): ditto. (ISALPHA): ditto. (ISDIGIT): ditto. (ISXDIGIT): ditto. (TOUPPER): ditto. (TOLOWER): ditto. * include/ruby/encoding.h (rb_isascii): removed. (rb_isalnum): ditto. (rb_isalpha): ditto. (rb_isblank): ditto. (rb_iscntrl): ditto. (rb_isdigit): ditto. (rb_isgraph): ditto. (rb_islower): ditto. (rb_isprint): ditto. (rb_ispunct): ditto. (rb_isspace): ditto. (rb_isupper): ditto. (rb_isxdigit): ditto. (rb_tolower): ditto. (rb_toupper): ditto. * common.mk: dependency updated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-03* include/ruby/encoding.h (rb_isascii): simplified.akr
(rb_isalnum): call onigenc_ascii_is_code_ctype without indirect call. (rb_isalpha): ditto. (rb_isblank): ditto. (rb_iscntrl): ditto. (rb_isdigit): ditto. (rb_isgraph): ditto. (rb_islower): ditto. (rb_isprint): ditto. (rb_ispunct): ditto. (rb_isspace): ditto. (rb_isupper): ditto. (rb_isxdigit): ditto. * include/ruby/oniguruma.h (onigenc_ascii_is_code_ctype): declaration moved from regenc.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-01* include/ruby/encoding.h (rb_isascii): defined.akr
(rb_isalnum): ditto. (rb_isalpha): ditto. (rb_isblank): ditto. (rb_iscntrl): ditto. (rb_isdigit): ditto. (rb_isgraph): ditto. (rb_islower): ditto. (rb_isprint): ditto. (rb_ispunct): ditto. (rb_isspace): ditto. (rb_isupper): ditto. (rb_isxdigit): ditto. (rb_tolower): ditto. (rb_toupper): ditto. * include/ruby/st.h (st_strcasecmp): declared. (st_strncasecmp): ditto. * st.c (type_strcasehash): use st_strcasecmp instead of strcasecmp. (st_strcasecmp): defined. (st_strncasecmp): ditto. * include/ruby/ruby.h: include include/ruby/encoding.h. (ISASCII): use rb_isascii. (ISPRINT): use rb_isprint. (ISSPACE): use rb_isspace. (ISUPPER): use rb_isupper. (ISLOWER): use rb_islower. (ISALNUM): use rb_isalnum. (ISALPHA): use rb_isalpha. (ISDIGIT): use rb_isdigit. (ISXDIGIT): use rb_isxdigit. (TOUPPER): defined. (TOLOWER): ditto. (STRCASECMP): ditto. (STRNCASECMP): ditto. * dir.c, encoding.c, file.c, hash.c, process.c, ruby.c, time.c, transcode.c, ext/readline/readline.c: use locale insensitive functions. [ruby-core:14662] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-30* include/ruby/encoding.h (rb_enc_sprintf, rb_enc_vsprintf): prototyped.nobu
* sprintf.c (rb_enc_sprintf, rb_enc_vsprintf): new functions to format arguments with encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28* ext/strscan/strscan.c (str_new): new function for allocate an stringakr
with encoding propagation. (extract_range): use str_new. (extract_beg_len): ditto. (strscan_peek): ditto. (strscan_rest): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28* encoding.c (rb_locale_encoding): defined.akr
* include/ruby/encoding.h (rb_locale_encoding): declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-27* encoding.c (rb_enc_codelen): show codepoint in error message.akr
* include/ruby/encoding.h (rb_enc_codelen): comment it returns positive integer. * string.c (rb_str_concat): rb_enc_codelen doesn't return 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* encoding.h (rb_enc_mbc_to_codepoint): wrapper fornobu
ONIGENC_MBC_TO_CODE(). * string.c (rb_str_succ): deal with invalid sequence as binary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* include/ruby/encoding.h (rb_enc_left_char_head): new utility macro.matz
* include/ruby/encoding.h (rb_enc_right_char_head): ditto. * io.c (appendline): does multibyte RS search in the function. * io.c (prepare_getline_args): RS may be nil. * io.c (rb_io_getc): should process character based on external encoding, when transcoding required. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e