diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-11 14:05:34 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-11 14:05:34 +0000 |
commit | 65a30eb3e75823eee745ba9709f99f548a4cc9ef (patch) | |
tree | 3e72b36dc8b44a23ab3989c8b37abb2d886970c7 | |
parent | 646f27b8220ead3cb68cfd8f6e9870d203c430e4 (diff) |
* pack.c (pack_pack): RDoc update. a patch from Gary Wright
<radar2002 AT gmail.com>. [ruby-core:13998]
* pack.c (pack_unpack): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | pack.c | 13 |
2 files changed, 14 insertions, 6 deletions
@@ -1,3 +1,10 @@ +Tue Dec 11 23:04:17 2007 Yukihiro Matsumoto <matz@ruby-lang.org> + + * pack.c (pack_pack): RDoc update. a patch from Gary Wright + <radar2002 AT gmail.com>. [ruby-core:13998] + + * pack.c (pack_unpack): ditto. + Tue Dec 11 16:37:47 2007 Tanaka Akira <akr@fsij.org> * encoding.c (rb_enc_ascget): renamed from rb_enc_get_ascii. @@ -395,8 +395,8 @@ static unsigned long utf8_to_uv(const char*,long*); * Directive Meaning * --------------------------------------------------------------- * @ | Moves to absolute position - * A | ASCII string (space padded, count is width) - * a | ASCII string (null padded, count is width) + * A | arbitrary binary string (space padded, count is width) + * a | arbitrary binary string (null padded, count is width) * B | Bit string (descending bit order) * b | Bit string (ascending bit order) * C | Unsigned char @@ -519,8 +519,8 @@ pack_pack(VALUE ary, VALUE fmt) switch (type) { case 'a': /* arbitrary binary string (null padded) */ - case 'A': /* ASCII string (space padded) */ - case 'Z': /* null terminated ASCII string */ + case 'A': /* arbitrary binary string (ASCII space padded) */ + case 'Z': /* null terminated string */ if (plen >= len) { rb_str_buf_cat(res, ptr, len); if (p[-1] == '*' && type == 'Z') @@ -1176,9 +1176,10 @@ infected_str_new(const char *ptr, long len, VALUE str) * * Format | Returns | Function * -------+---------+----------------------------------------- - * A | String | with trailing nulls and spaces removed + * A | String | arbitrary binary string with trailing + * | | nulls and ASCII spaces removed * -------+---------+----------------------------------------- - * a | String | string + * a | String | arbitrary binary string * -------+---------+----------------------------------------- * B | String | extract bits from each character (msb first) * -------+---------+----------------------------------------- |