From 3396afc0b9206012f7db32aa2b463b7600212c4f Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 7 Sep 2008 09:13:16 +0000 Subject: * transcode_data.h (STR1): defined for a string up to 255 bytes. (STR1_BYTEINDEX): defined. (makeSTR1): defined. * tool/transcode-tblgen.rb: generate STR1. * transcode.c (transcode_restartable0): interpret STR1. * enc/trans/escape.trans (fun_so_escape_xml_chref): removed. STR1 is used instead. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- transcode.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'transcode.c') diff --git a/transcode.c b/transcode.c index 1fdd27d7d..9d1d2a9b9 100644 --- a/transcode.c +++ b/transcode.c @@ -534,6 +534,7 @@ transcode_restartable0(const unsigned char **in_pos, unsigned char **out_pos, case 25: goto resume_label25; case 26: goto resume_label26; case 27: goto resume_label27; + case 28: goto resume_label28; } while (1) { @@ -602,6 +603,13 @@ transcode_restartable0(const unsigned char **in_pos, unsigned char **out_pos, SUSPEND_OBUF(18); *out_p++ = getBT2(next_info); SUSPEND_OBUF(19); *out_p++ = getBT3(next_info); continue; + case STR1: + next_byte = 0; /* index */ + while (next_byte < BYTE_ADDR(STR1_BYTEINDEX(next_info))[0]) { + SUSPEND_OBUF(28); *out_p++ = BYTE_ADDR(STR1_BYTEINDEX(next_info))[1+next_byte]; + next_byte++; + } + continue; case FUNii: next_info = (VALUE)(*tr->func_ii)(TRANSCODING_STATE(tc), next_info); goto follow_info; -- cgit