1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* enc/trans/japanese.c (rb_to_Windows_31J): to 'Windows-31J'.

* common.mk: add rules for transdb.h.

* transcode.c (init_transcoder_table): use transdb.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2008-01-29 10:05:39 +00:00
parent f3ed7fa233
commit 74b254e833
4 changed files with 24 additions and 31 deletions

View file

@ -1,3 +1,11 @@
Tue Jan 29 19:03:16 2008 NARUSE, Yui <naruse@ruby-lang.org>
* enc/trans/japanese.c (rb_to_Windows_31J): to 'Windows-31J'.
* common.mk: add rules for transdb.h.
* transcode.c (init_transcoder_table): use transdb.h.
Tue Jan 29 18:05:48 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* encoding.c (encdb_{replicate,alias,dummy,declare}): define only if

View file

@ -100,7 +100,7 @@ BOOTSTRAPRUBY = $(BASERUBY)
VCS = svn
all: $(MKFILES) $(PREP) encdb $(RBCONFIG) $(LIBRUBY) encs
all: $(MKFILES) $(PREP) encdb transdb $(RBCONFIG) $(LIBRUBY) encs
@$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS)
prog: $(PROGRAM) $(WPROGRAM)
@ -433,10 +433,7 @@ dmyencoding.$(OBJEXT): {$(VPATH)}dmyencoding.c \
{$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}missing.h \
{$(VPATH)}intern.h {$(VPATH)}st.h {$(VPATH)}encoding.h \
{$(VPATH)}oniguruma.h {$(VPATH)}regenc.h
encoding.$(OBJEXT): {$(VPATH)}encoding.c {$(VPATH)}ruby.h \
{$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}missing.h \
{$(VPATH)}intern.h {$(VPATH)}st.h {$(VPATH)}encoding.h \
{$(VPATH)}oniguruma.h {$(VPATH)}regenc.h {$(VPATH)}encdb.h
encoding.$(OBJEXT): dmyencoding.$(OBJEXT) {$(VPATH)}encdb.h
enum.$(OBJEXT): {$(VPATH)}enum.c {$(VPATH)}ruby.h {$(VPATH)}config.h \
{$(VPATH)}defines.h {$(VPATH)}missing.h {$(VPATH)}intern.h \
{$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}util.h
@ -584,10 +581,11 @@ thread.$(OBJEXT): {$(VPATH)}thread.c {$(VPATH)}eval_intern.h \
{$(VPATH)}debug.h {$(VPATH)}vm_opts.h {$(VPATH)}id.h \
{$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}dln.h {$(VPATH)}vm.h \
{$(VPATH)}gc.h {$(VPATH)}thread_$(THREAD_MODEL).c
transcode.$(OBJEXT): {$(VPATH)}transcode.c {$(VPATH)}ruby.h \
dmytranscode.$(OBJEXT): {$(VPATH)}transcode.c {$(VPATH)}ruby.h \
{$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}missing.h \
{$(VPATH)}intern.h {$(VPATH)}st.h {$(VPATH)}encoding.h \
{$(VPATH)}oniguruma.h {$(VPATH)}transcode_data.h
transcode.$(OBJEXT): dmytranscode.$(OBJEXT) {$(VPATH)}transdb.h
cont.$(OBJEXT): {$(VPATH)}cont.c {$(VPATH)}ruby.h {$(VPATH)}config.h \
{$(VPATH)}defines.h {$(VPATH)}missing.h {$(VPATH)}intern.h \
{$(VPATH)}st.h {$(VPATH)}vm_core.h {$(VPATH)}signal.h {$(VPATH)}node.h \
@ -704,7 +702,7 @@ vm.inc: $(srcdir)/template/vm.inc.tmpl
srcs: {$(VPATH)}parse.c {$(VPATH)}lex.c $(srcdir)/ext/ripper/ripper.c
incs: $(INSNS) {$(VPATH)}node_name.inc {$(VPATH)}encdb.h $(srcdir)/revision.h
incs: $(INSNS) {$(VPATH)}node_name.inc {$(VPATH)}encdb.h {$(VPATH)}transdb.h $(srcdir)/revision.h
node_name.inc: {$(VPATH)}node.h
$(BASERUBY) -n $(srcdir)/tool/node_name.rb $? > $@
@ -716,6 +714,13 @@ encdb:
encdb.h:
$(MINIRUBY) $(srcdir)/enc/make_encdb.rb $(srcdir)/enc $@
transdb:
$(MINIRUBY) $(srcdir)/enc/trans/make_transdb.rb $(srcdir)/enc/trans transdb.h.new
$(IFCHANGE) "transdb.h" "transdb.h.new"
transdb.h:
$(MINIRUBY) $(srcdir)/enc/trans/make_transdb.rb $(srcdir)/enc/trans $@
miniprelude.c: $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb
$(BASERUBY) -I$(srcdir) $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $@

View file

@ -13364,7 +13364,7 @@ rb_to_SHIFT_JIS = {
};
static const rb_transcoder
rb_to_Windows_31J = {
"UTF-8", "Windows_31J", &to_SHIFT_JIS, 2, 1,
"UTF-8", "Windows-31J", &to_SHIFT_JIS, 2, 1,
NULL, NULL,
};

View file

@ -85,29 +85,9 @@ rb_declare_transcoder(const char *enc1, const char *enc2, const char *lib)
static void
init_transcoder_table(void)
{
rb_declare_transcoder("US-ASCII", "UTF-8", "single_byte");
rb_declare_transcoder("ASCII-8BIT", "UTF-8", "single_byte");
rb_declare_transcoder("ISO-8859-1", "UTF-8", "single_byte");
rb_declare_transcoder("ISO-8859-2", "UTF-8", "single_byte");
rb_declare_transcoder("ISO-8859-3", "UTF-8", "single_byte");
rb_declare_transcoder("ISO-8859-4", "UTF-8", "single_byte");
rb_declare_transcoder("ISO-8859-5", "UTF-8", "single_byte");
rb_declare_transcoder("ISO-8859-6", "UTF-8", "single_byte");
rb_declare_transcoder("ISO-8859-7", "UTF-8", "single_byte");
rb_declare_transcoder("ISO-8859-8", "UTF-8", "single_byte");
rb_declare_transcoder("ISO-8859-9", "UTF-8", "single_byte");
rb_declare_transcoder("ISO-8859-10", "UTF-8", "single_byte");
rb_declare_transcoder("ISO-8859-11", "UTF-8", "single_byte");
rb_declare_transcoder("ISO-8859-13", "UTF-8", "single_byte");
rb_declare_transcoder("ISO-8859-14", "UTF-8", "single_byte");
rb_declare_transcoder("ISO-8859-15", "UTF-8", "single_byte");
rb_declare_transcoder("SHIFT_JIS", "UTF-8", "japanese");
rb_declare_transcoder("EUC-JP", "UTF-8", "japanese");
rb_declare_transcoder("ISO-2022-JP", "UTF-8", "japanese");
rb_declare_transcoder("UTF-16BE", "UTF-8", "utf_16_32");
rb_declare_transcoder("UTF-16LE", "UTF-8", "utf_16_32");
rb_declare_transcoder("UTF-32BE", "UTF-8", "utf_16_32");
rb_declare_transcoder("UTF-32LE", "UTF-8", "utf_16_32");
#ifndef NO_TRANSDB_H
#include "transdb.h"
#endif
}
#define encoding_equal(enc1, enc2) (STRCASECMP(enc1, enc2) == 0)