1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

update doc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-06-28 13:05:07 +00:00
parent d9d650ecfd
commit 82f7a98236

46
pack.c
View file

@ -305,7 +305,8 @@ static unsigned long utf8_to_uv(const char*,long*);
* elements to convert. If the count is an asterisk
* (``<code>*</code>''), all remaining array elements will be
* converted. Any of the directives ``<code>sSiIlL</code>'' may be
* followed by an underscore (``<code>_</code>'') to use the underlying
* followed by an underscore (``<code>_</code>'') or
* exclamation mark (``<code>!</code>'') to use the underlying
* platform's native size for the specified type; otherwise, they use a
* platform-independent size. Spaces are ignored in the template
* string. See also <code>String#unpack</code>.
@ -320,7 +321,7 @@ static unsigned long utf8_to_uv(const char*,long*);
*
* Integer | Array |
* Directive | Element | Meaning
* ------------------------------------------------------------------------
* ---------------------------------------------------------------------------
* C | Integer | 8-bit unsigned integer (unsigned char)
* S | Integer | 16-bit unsigned integer, native endian (uint16_t)
* L | Integer | 32-bit unsigned integer, native endian (uint32_t)
@ -331,13 +332,13 @@ static unsigned long utf8_to_uv(const char*,long*);
* l | Integer | 32-bit signed integer, native endian (int32_t)
* q | Integer | 64-bit signed integer, native endian (int64_t)
* | |
* S_ | Integer | unsigned short, native endian
* I, I_ | Integer | unsigned int, native endian
* L_ | Integer | unsigned long, native endian
* S_, S! | Integer | unsigned short, native endian
* I, I_, I! | Integer | unsigned int, native endian
* L_, L! | Integer | unsigned long, native endian
* | |
* s_ | Integer | signed short, native endian
* i, i_ | Integer | signed int, native endian
* l_ | Integer | signed long, native endian
* s_, s! | Integer | signed short, native endian
* i, i_, i! | Integer | signed int, native endian
* l_, l! | Integer | signed long, native endian
* | |
* n | Integer | 16-bit unsigned integer, network (big-endian) byte order
* N | Integer | 32-bit unsigned integer, network (big-endian) byte order
@ -349,7 +350,7 @@ static unsigned long utf8_to_uv(const char*,long*);
*
* Float | |
* Directive | | Meaning
* ------------------------------------------------------------------------
* ---------------------------------------------------------------------------
* D, d | Float | double-precision float, native format
* F, f | Float | single-precision float, native format
* E | Float | double-precision float, little-endian byte order
@ -359,7 +360,7 @@ static unsigned long utf8_to_uv(const char*,long*);
*
* String | |
* Directive | | Meaning
* ------------------------------------------------------------------------
* ---------------------------------------------------------------------------
* A | String | arbitrary binary string (space padded, count is width)
* a | String | arbitrary binary string (null padded, count is width)
* Z | String | same as ``a'', except that null is added with *
@ -376,7 +377,7 @@ static unsigned long utf8_to_uv(const char*,long*);
*
* Misc. | |
* Directive | | Meaning
* ------------------------------------------------------------------------
* ---------------------------------------------------------------------------
* @ | --- | moves to absolute position
* X | --- | back up a byte
* x | --- | null byte
@ -1213,7 +1214,8 @@ infected_str_new(const char *ptr, long len, VALUE str)
* by a number, indicating the number of times to repeat with this
* directive. An asterisk (``<code>*</code>'') will use up all
* remaining elements. The directives <code>sSiIlL</code> may each be
* followed by an underscore (``<code>_</code>'') to use the underlying
* followed by an underscore (``<code>_</code>'') or
* exclamation mark (``<code>!</code>'') to use the underlying
* platform's native size for the specified type; otherwise, it uses a
* platform-independent consistent size. Spaces are ignored in the
* format string. See also <code>Array#pack</code>.
@ -1232,7 +1234,7 @@ infected_str_new(const char *ptr, long len, VALUE str)
*
* Integer | |
* Directive | Returns | Meaning
* --------------------------------------------------------------
* -----------------------------------------------------------------
* C | Integer | 8-bit unsigned integer (unsigned char)
* S | Integer | 16-bit unsigned integer, native endian (uint16_t)
* L | Integer | 32-bit unsigned integer, native endian (uint32_t)
@ -1243,13 +1245,13 @@ infected_str_new(const char *ptr, long len, VALUE str)
* l | Integer | 32-bit signed integer, native endian (int32_t)
* q | Integer | 64-bit signed integer, native endian (int64_t)
* | |
* S_ | Integer | unsigned short, native endian
* I, I_ | Integer | unsigned int, native endian
* L_ | Integer | unsigned long, native endian
* S_, S! | Integer | unsigned short, native endian
* I, I_, I! | Integer | unsigned int, native endian
* L_, L! | Integer | unsigned long, native endian
* | |
* s_ | Integer | signed short, native endian
* i, i_ | Integer | signed int, native endian
* l_ | Integer | signed long, native endian
* s_, s! | Integer | signed short, native endian
* i, i_, i! | Integer | signed int, native endian
* l_, l! | Integer | signed long, native endian
* | |
* n | Integer | 16-bit unsigned integer, network (big-endian) byte order
* N | Integer | 32-bit unsigned integer, network (big-endian) byte order
@ -1261,7 +1263,7 @@ infected_str_new(const char *ptr, long len, VALUE str)
*
* Float | |
* Directive | Returns | Meaning
* --------------------------------------------------------------
* -----------------------------------------------------------------
* D, d | Float | double-precision float, native format
* F, f | Float | single-precision float, native format
* E | Float | double-precision float, little-endian byte order
@ -1271,7 +1273,7 @@ infected_str_new(const char *ptr, long len, VALUE str)
*
* String | |
* Directive | Returns | Meaning
* --------------------------------------------------------------
* -----------------------------------------------------------------
* A | String | arbitrary binary string (remove trailing nulls and ASCII spaces)
* a | String | arbitrary binary string
* Z | String | null-terminated string
@ -1288,7 +1290,7 @@ infected_str_new(const char *ptr, long len, VALUE str)
*
* Misc. | |
* Directive | Returns | Meaning
* --------------------------------------------------------------
* -----------------------------------------------------------------
* @ | --- | skip to the offset given by the length argument
* X | --- | skip backward one byte
* x | --- | skip forward one byte