summaryrefslogtreecommitdiff
path: root/enc
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-20 08:07:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-20 08:07:56 +0000
commitdc4d4b3923cbb832f69abdc0df6d9ee0ea38cae1 ()
treefcfaf15c7c5843954940f34a66abee4e68901b89 /enc
parentbe137f3601610491d4265a4f9c87bf52fef28d66 (diff)
* common.mk (enc.mk): depends on rbconfig.rb.
* regenc.h (OnigEncodingDefine): external encoding definition macro. * enc/Makefile.in: fix for linking. * enc/depend, enc/make_encmake.rb: fix for Windows. * enc/{ascii,euc_jp,sjis,utf8,iso_8859_{1..16}}.c: renamed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--enc/Makefile.in12
-rw-r--r--enc/ascii.c2
-rw-r--r--enc/depend27
-rw-r--r--enc/euc_jp.c2
-rw-r--r--enc/iso_8859_1.c2
-rw-r--r--enc/iso_8859_10.c2
-rw-r--r--enc/iso_8859_11.c2
-rw-r--r--enc/iso_8859_13.c2
-rw-r--r--enc/iso_8859_14.c2
-rw-r--r--enc/iso_8859_15.c2
-rw-r--r--enc/iso_8859_16.c2
-rw-r--r--enc/iso_8859_2.c2
-rw-r--r--enc/iso_8859_3.c2
-rw-r--r--enc/iso_8859_4.c2
-rw-r--r--enc/iso_8859_5.c2
-rw-r--r--enc/iso_8859_6.c2
-rw-r--r--enc/iso_8859_7.c2
-rw-r--r--enc/iso_8859_8.c2
-rw-r--r--enc/iso_8859_9.c2
-rw-r--r--enc/make_encmake.rb4
-rw-r--r--enc/sjis.c2
-rw-r--r--enc/utf8.c2
22 files changed, 56 insertions, 25 deletions
@@ -1,4 +1,6 @@
srcdir = @srcdir@
top_srcdir = $(srcdir:/enc=)
arch = @arch@
EXTOUT = @EXTOUT@
@@ -12,16 +14,22 @@ BUILTIN_ENCS = ascii.c \
euc_jp.c sjis.c \
unicode.c utf8.c
empty =
CC = @CC@
OUTFLAG = @OUTFLAG@$(empty)
CFLAGS = @CFLAGS@ @ARCH_FLAG@
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(top_srcdir)
DEFS = @DEFS@
-CPPFLAGS = @CPPFLAGS@
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
-LIBS = @LIBS@ $(EXTLIBS)
LDSHARED = @LDSHARED@
DLDFLAGS = @DLDFLAGS@ $(EXTLDFLAGS) @ARCH_FLAG@
@@ -38,7 +38,7 @@ ascii_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
return FALSE;
}
-OnigEncodingType OnigEncodingASCII = {
onigenc_single_byte_mbc_enc_len,
"ASCII-8BIT",/* name */
1, /* max byte length */
@@ -3,23 +3,43 @@
! encs = encs.sort_by {|e| e.split(/(\d+)/).map {|n| Integer(n) rescue n}}
VPATH = <% %w[$(arch_hdrdir)/ruby $(hdrdir)/ruby $(top_srcdir) $(srcdir)].join(CONFIG["PATH_SEPARATOR"]) %>
ENCOBJS = <%encs.map {|e|"#{e}.$(OBJEXT)"}.join(" \\\n\t ")%><%"\n" if encs.size>1%>
ENCSOS = <%encs.map {|e|"$(ENCSODIR)/#{e}.$(DLEXT)"}.join(" \\\n\t ")%>
all: $(ENCSOS)
-.c.$(OBJEXT):
<%COMPILE_C%>
! unless encs.empty?
$(ENCOBJS): regenc.h oniguruma.h config.h defines.h
! end
! encs.each do |e|
-$(ENCSODIR)/<%e%>.$(DLEXT): <%e%>.$(OBJEXT)
- <%LINK_SO.gsub(/\n/, "\n\t")%>
! end
! encs.each do |e|
<%e%>.$(OBJEXT): <%e%>.c
@@ -27,6 +47,7 @@ $(ENCSODIR)/<%e%>.$(DLEXT): <%e%>.$(OBJEXT)
clean:
$(RM) $(ENCSOS)
$(RM) $(ENCOBJS)
distclean: clean
@@ -341,7 +341,7 @@ get_ctype_code_range(int ctype, OnigCodePoint* sb_out,
}
-OnigEncodingType OnigEncodingEUC_JP = {
mbc_enc_len,
"EUC-JP", /* name */
3, /* max enc length */
@@ -254,7 +254,7 @@ is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
return FALSE;
}
-OnigEncodingType OnigEncodingISO_8859_1 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-1", /* name */
1, /* max enc length */
@@ -224,7 +224,7 @@ iso_8859_10_get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-OnigEncodingType OnigEncodingISO_8859_10 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-10", /* name */
1, /* max enc length */
@@ -76,7 +76,7 @@ iso_8859_11_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding e
return FALSE;
}
-OnigEncodingType OnigEncodingISO_8859_11 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-11", /* name */
1, /* max enc length */
@@ -213,7 +213,7 @@ iso_8859_13_get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-OnigEncodingType OnigEncodingISO_8859_13 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-13", /* name */
1, /* max enc length */
@@ -225,7 +225,7 @@ iso_8859_14_get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-OnigEncodingType OnigEncodingISO_8859_14 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-14", /* name */
1, /* max enc length */
@@ -219,7 +219,7 @@ iso_8859_15_get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-OnigEncodingType OnigEncodingISO_8859_15 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-15", /* name */
1, /* max enc length */
@@ -222,7 +222,7 @@ iso_8859_16_get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-OnigEncodingType OnigEncodingISO_8859_16 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-16", /* name */
1, /* max enc length */
@@ -219,7 +219,7 @@ is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
return FALSE;
}
-OnigEncodingType OnigEncodingISO_8859_2 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-2", /* name */
1, /* max enc length */
@@ -219,7 +219,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-OnigEncodingType OnigEncodingISO_8859_3 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-3", /* name */
1, /* max enc length */
@@ -221,7 +221,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-OnigEncodingType OnigEncodingISO_8859_4 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-4", /* name */
1, /* max enc length */
@@ -209,7 +209,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-OnigEncodingType OnigEncodingISO_8859_5 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-5", /* name */
1, /* max enc length */
@@ -76,7 +76,7 @@ is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
return FALSE;
}
-OnigEncodingType OnigEncodingISO_8859_6 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-6", /* name */
1, /* max enc length */
@@ -206,7 +206,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
}
-OnigEncodingType OnigEncodingISO_8859_7 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-7", /* name */
1, /* max enc length */
@@ -76,7 +76,7 @@ iso_8859_8_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding en
return FALSE;
}
-OnigEncodingType OnigEncodingISO_8859_8 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-8", /* name */
1, /* max enc length */
@@ -213,7 +213,7 @@ iso_8859_9_get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-OnigEncodingType OnigEncodingISO_8859_9 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-9", /* name */
1, /* max enc length */
@@ -14,11 +14,13 @@ else
BUILTIN_ENCS = []
end
mkin = File.read(File.join($srcdir, "Makefile.in"))
mkin.gsub!(/@(#{CONFIG.keys.join('|')})@/) {CONFIG[$1]}
if File.exist?(depend = File.join($srcdir, "depend"))
tmp = ''
- eval(serb(File.read(depend), 'tmp'))
mkin << "\n#### depend ####\n\n" << depend_rules(tmp).join
end
open(ARGV[0], 'wb') {|f|
@@ -351,7 +351,7 @@ get_ctype_code_range(int ctype, OnigCodePoint* sb_out,
}
}
-OnigEncodingType OnigEncodingSJIS = {
mbc_enc_len,
"Shift_JIS", /* name */
2, /* max byte length */
@@ -486,7 +486,7 @@ utf8_get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-OnigEncodingType OnigEncodingUTF8 = {
utf8_mbc_enc_len,
"UTF-8", /* name */
6, /* max byte length */