summaryrefslogtreecommitdiff
path: root/transcode.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-07 09:13:16 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-07 09:13:16 +0000
commitc0bec2fae1d6adf77c853457942217e89ea85bcf (patch)
tree2af692a42271c5d32cfa8bc09b9b1fbea6a0b172 /transcode.c
parent6bf5c34cf20002491423ca69dc3b0d037afaaefd (diff)
* 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
Diffstat (limited to 'transcode.c')
-rw-r--r--transcode.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/transcode.c b/transcode.c
index 1fdd27d7de..9d1d2a9b97 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;