summaryrefslogtreecommitdiff
path: root/transcode_data.h
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-15 15:42:30 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-15 15:42:30 (GMT)
commit6eb3843b178c5bca28a3c8d73b8af5f58de21e22 (patch)
tree43f2e7802ee8ffd52e4f27952d3fffbb3978db38 /transcode_data.h
parent69029b90fea8a6b7e5607ead5e2184da30db9e76 (diff)
* transcode_data.h (STR1_LENGTH): defined.
(makeSTR1LEN): defined. * tool/transcode-tblgen.rb: use makeSTR1LEN. generate STR1 for 4 to 259 bytes. * transcode.c (rb_transcoding): new field: output_index. (transcode_restartable0): use STR1_LENGTH. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode_data.h')
-rw-r--r--transcode_data.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/transcode_data.h b/transcode_data.h
index 5566e7b..497eb3c 100644
--- a/transcode_data.h
+++ b/transcode_data.h
@@ -34,10 +34,12 @@
#define FUNsi (PType 0x0D) /* function from start to info */
#define FUNio (PType 0x0E) /* function from info to output */
#define FUNso (PType 0x0F) /* function from start to output */
-#define STR1 (PType 0x11) /* string up to 255 bytes: 1byte length + content */
+#define STR1 (PType 0x11) /* string 4 <= len <= 259 bytes: 1byte length + content */
+#define STR1_LENGTH(byte_addr) (*(byte_addr) + 4)
#define STR1_BYTEINDEX(w) ((w) >> 6)
#define makeSTR1(bi) (((bi) << 6) | STR1)
+#define makeSTR1LEN(len) ((len)-4)
#define o1(b1) (PType((((unsigned char)(b1))<<8)|ONEbt))
#define o2(b1,b2) (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|TWObt))