aboutsummaryrefslogtreecommitdiffstats
path: root/pack.c
Commit message (Collapse)AuthorAgeFilesLines
* * pack.c (pack_unpack): the resulted string of unpack('M') must havenaruse2011-01-141-1/+1
| | | | | | ASCII-8BIT encoding (and ENC_CODERANGE_VALID). [ruby-core:34482] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (swapf): compilation condition simplified.akr2011-01-081-23/+13
| | | | | | | (swapd): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (swapd): remove duplicated code.akr2011-01-081-21/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c: parenthesize macro arguments.akr2010-12-201-36/+36
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (PACK_ITEM_ADJUST): return nil not result array and yieldnobu2010-11-151-1/+1
| | | | | | values if block is given. [ruby-core:33193] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r29527. [ruby-dev:42419]naruse2010-10-181-19/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): Add native size option ! to q and Q.naruse2010-10-181-11/+15
| | | | | | | | [ruby-dev:42375] * pack.c (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): refine the document. [ruby-dev:42397]akr2010-10-181-30/+26
| | | | | | | (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): simplify comparison of explicit_endiannaruse2010-10-151-2/+2
| | | | | | | | as pointed by nobu. * pack.c (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): fix more than one modifiers appear in thenaruse2010-10-151-2/+2
| | | | | | | | format string. [ruby-core:32793] * pack.c (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add missing i, I description.naruse2010-10-151-8/+40
| | | | | | And desribe each combination of a directive and modifiers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): support endian modifiers: < and >.naruse2010-10-141-22/+73
| | | | | | | | [ruby-dev:42376] Feature #3491 * pack.c (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2010-08-091-36/+36
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/{intern,io}.h: add missing prototypes.nobu2010-07-221-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2010-06-281-126/+128
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * removed trailing spaces.nobu2010-05-291-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: Documentation: change => in call-seq to ->.marcandre2010-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2010-05-111-31/+31
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_unpack): add a missing break.akr2010-05-101-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add comment.akr2010-03-111-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* useless lines removed.akr2010-03-061-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c: fix the prototype of rb_big2ulong_pack.akr2010-03-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): use union to avoid pointer cast.akr2010-02-281-54/+87
| | | | | | | (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): generalized integer packer implemented.akr2010-02-281-47/+57
| | | | | | | (pack_unpack): generalized integer unpacker implemented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (swap32): use __builtin_bswap32 on gcc 4.3.0 or later.akr2010-02-271-1/+12
| | | | | | | (swap64): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c: use integer types with explicit size.akr2010-02-271-106/+77
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c: check assuption on QUAD_SIZE and SIZEOF_LONG.akr2010-02-271-0/+6
| | | | | | | * bignum.c: check assuption on SIZEOF_LONG and SIZEOF_BDIGITS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c: fix q and Q for big endian environments which have noakr2010-02-261-23/+42
| | | | | | | | | | | | | | | | 8 bytes integer type. (pack_pack): use rb_big_pack. (pack_unpack): use rb_big_unpack. * include/ruby/intern.h (rb_big_pack): declared. (rb_big_unpack): ditto. * bignum.c (rb_big_pack): new function. (rb_big_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (QUAD_SIZE): it should be always 8.akr2010-02-261-5/+1
| | | | | | | | * bignum.c (rb_quad_pack): use LONG_LONG version only if SIZEOF_LONG_LONG == QUAD_SIZE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (swap64): fix for VC6.nobu2010-02-261-16/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack, pack_unpack): suppressed warnings.nobu2010-02-261-11/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2010-02-251-163/+124
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c: consider DYNAMIC_ENDIAN. refactored.akr2010-02-251-437/+355
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove a empty line.akr2010-02-241-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove a empty line.akr2010-02-241-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (swap64): don't redefine.akr2010-02-241-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_unpack): don't use OFF32 for gcc 4.5.akr2010-02-241-126/+249
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_unpack): call PACK_ITEM_ADJUST for 'Q'.akr2010-02-181-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos.akr2009-11-031-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (NATINT_LEN, pack_pack): suppressed warnings.nobu2009-10-041-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,nobu2009-03-121-34/+34
| | | | | | | | | | numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c, transcode_data.h, util.c, variable.c, vm_dump.c, include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c: suppress VC type warnings. [ruby-core:22726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): replace all rb_Float() to rb_to_float().matz2008-12-301-5/+5
| | | | | | [ruby-dev:37663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): template f should not accept non floatmatz2008-12-291-1/+1
| | | | | | | | values. [ruby-dev:37656] * object.c (rb_to_float): new function to type check floats. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): encoding of packed string only from 'm',matz2008-12-231-17/+25
| | | | | | | | | 'M', and 'u' should be US-ASCII. [ruby-dev:37284] * pack.c (pack_pack): encoding of packed string only from 'U' should be UTF-8. also upgrade US-ASCII strings to UTF-8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pck): fixed [ruby-dev:37295].yugui2008-12-091-2/+4
| | | | | | | Array#pack always has returned an US-ASCII string when the given format ended with 'u', 'M' or 'm'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): fixed odd act of 'm*', 'M*', and 'P*'.yugui2008-12-081-1/+3
| | | | | | | | just ignores '*' in these cases. [ruby-dev:37289] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): fixed length for odd length string.nobu2008-12-081-2/+2
| | | | | | | [ruby-dev:37283] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): 'u0' is not special differently from 'm0'.yugui2008-12-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): set US-ASCII and CODERANGE_7BITnaruse2008-12-061-0/+4
| | | | | | | | | when quoted-printable ('M') and base64 ('m'). [ruby-dev:37284] * pack.c (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): propagate taint status from format string tomatz2008-12-041-0/+1
| | | | | | result string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e