diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-27 08:27:19 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-27 08:27:19 +0000 |
commit | efd7504d44078af85a2ca6c632c18569bc562928 (patch) | |
tree | fe9690afd89caee8c38db7cc1ec466ffd17d296a /transcode.c | |
parent | fd640aec82f65134d589d9603d0ed669e90ebb60 (diff) | |
download | ruby-efd7504d44078af85a2ca6c632c18569bc562928.tar.gz |
* parse.y, transcode_data.h, transcode.c: change "illegal" to
"invalid" in a context which doesn' t against a law.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode.c')
-rw-r--r-- | transcode.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/transcode.c b/transcode.c index ec05629347..259d27ad19 100644 --- a/transcode.c +++ b/transcode.c @@ -183,14 +183,14 @@ transcode_loop(char **in_pos, char **out_pos, if (in_p >= in_stop) { /* todo: deal with the case of backtracking */ /* todo: deal with incomplete input (streaming) */ - goto illegal; + goto invalid; } next_byte = (unsigned char)*in_p++; if (from_utf8) { if ((next_byte&0xC0) == 0x80) next_byte -= 0x80; else - goto illegal; + goto invalid; } next_table = next_table->info[next_offset]; goto follow_byte; @@ -211,18 +211,18 @@ transcode_loop(char **in_pos, char **out_pos, *out_p++ = getBT2(next_info); *out_p++ = getBT3(next_info); continue; - case ILLEGAL: - goto illegal; + case INVALID: + goto invalid; case UNDEF: /* todo: add code for alternative behaviors */ - rb_raise(rb_eRuntimeError /*@@@change exception*/, "conversion undefined for byte sequence (maybe illegal byte sequence)"); + rb_raise(rb_eRuntimeError /*@@@change exception*/, "conversion undefined for byte sequence (maybe invalid byte sequence)"); continue; } continue; - illegal: - /* deal with illegal byte sequence */ + invalid: + /* deal with invalid byte sequence */ /* todo: add code for alternative behaviors */ - rb_raise(rb_eRuntimeError /*change exception*/, "illegal byte sequence"); + rb_raise(rb_eRuntimeError /*change exception*/, "invalid byte sequence"); continue; } /* cleanup */ |