* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-09-07 09:13:16 +00:00
parent 6bf5c34cf2
commit c0bec2fae1
5 changed files with 52 additions and 51 deletions

View file

@ -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;