mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@28458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
abcff642ef
commit
2c9b64444d
1 changed files with 126 additions and 124 deletions
46
pack.c
46
pack.c
|
@ -306,7 +306,8 @@ static int uv_to_utf8 _((char*,unsigned 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>.
|
||||
|
@ -321,7 +322,7 @@ static int uv_to_utf8 _((char*,unsigned 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)
|
||||
|
@ -332,13 +333,13 @@ static int uv_to_utf8 _((char*,unsigned 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
|
||||
|
@ -350,7 +351,7 @@ static int uv_to_utf8 _((char*,unsigned 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
|
||||
|
@ -360,7 +361,7 @@ static int uv_to_utf8 _((char*,unsigned 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 int uv_to_utf8 _((char*,unsigned long));
|
|||
*
|
||||
* Misc. | |
|
||||
* Directive | | Meaning
|
||||
* ------------------------------------------------------------------------
|
||||
* ---------------------------------------------------------------------------
|
||||
* @ | --- | moves to absolute position
|
||||
* X | --- | back up a byte
|
||||
* x | --- | null byte
|
||||
|
@ -1187,7 +1188,8 @@ infected_str_new(ptr, len, 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>.
|
||||
|
@ -1206,7 +1208,7 @@ infected_str_new(ptr, len, 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)
|
||||
|
@ -1217,13 +1219,13 @@ infected_str_new(ptr, len, 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
|
||||
|
@ -1235,7 +1237,7 @@ infected_str_new(ptr, len, 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
|
||||
|
@ -1245,7 +1247,7 @@ infected_str_new(ptr, len, 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
|
||||
|
@ -1261,7 +1263,7 @@ infected_str_new(ptr, len, str)
|
|||
*
|
||||
* Misc. | |
|
||||
* Directive | Returns | Meaning
|
||||
* --------------------------------------------------------------
|
||||
* -----------------------------------------------------------------
|
||||
* @ | --- | skip to the offset given by the length argument
|
||||
* X | --- | skip backward one byte
|
||||
* x | --- | skip forward one byte
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue