summaryrefslogtreecommitdiff
path: root/pack.c
AgeCommit message (Collapse)Author
2010-03-11add comment.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-06useless lines removed.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-06* pack.c: fix the prototype of rb_big2ulong_pack.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-28* pack.c (pack_pack): use union to avoid pointer cast.akr
(pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-28* pack.c (pack_pack): generalized integer packer implemented.akr
(pack_unpack): generalized integer unpacker implemented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-27* pack.c (swap32): use __builtin_bswap32 on gcc 4.3.0 or later.akr
(swap64): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-27* pack.c: use integer types with explicit size.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-27* pack.c: check assuption on QUAD_SIZE and SIZEOF_LONG.akr
* 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
2010-02-26* pack.c: fix q and Q for big endian environments which have noakr
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
2010-02-26* pack.c (QUAD_SIZE): it should be always 8.akr
* 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
2010-02-26* pack.c (swap64): fix for VC6.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-26* pack.c (pack_pack, pack_unpack): suppressed warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-25rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-25* pack.c: consider DYNAMIC_ENDIAN. refactored.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-24remove a empty line.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-24remove a empty line.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-24* pack.c (swap64): don't redefine.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-24* pack.c (pack_unpack): don't use OFF32 for gcc 4.5.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-18* pack.c (pack_unpack): call PACK_ITEM_ADJUST for 'Q'.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-03fix typos.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-04* pack.c (NATINT_LEN, pack_pack): suppressed warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12* array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,nobu
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
2008-12-30* pack.c (pack_pack): replace all rb_Float() to rb_to_float().matz
[ruby-dev:37663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29* pack.c (pack_pack): template f should not accept non floatmatz
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
2008-12-23* pack.c (pack_pack): encoding of packed string only from 'm',matz
'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
2008-12-09* pack.c (pack_pck): fixed [ruby-dev:37295].yugui
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
2008-12-08* pack.c (pack_pack): fixed odd act of 'm*', 'M*', and 'P*'.yugui
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
2008-12-08* pack.c (pack_pack): fixed length for odd length string.nobu
[ruby-dev:37283] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-06* pack.c (pack_pack): 'u0' is not special differently from 'm0'.yugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-06* pack.c (pack_pack): set US-ASCII and CODERANGE_7BITnaruse
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
2008-12-04* pack.c (pack_pack): propagate taint status from format string tomatz
result string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-30* pack.c (pack_pack): templates a, A, Z should propagate encodingmatz
of original strings. templates b, B, h, H brings ASCII-8BIT to the result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29* pack.c (pack_pack): set encoding from packing string and UTF-8 fornobu
"U". [ruby-core:19590] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-25* pack.c (pack_pack, pack_unpack): 'm0' format (base64) complies withmame
RFC 4648. It adds no line feed when encoding, and raise ArgumentError if the encoded string contains non-alphabet (including CR and LF). * lib/base64.rb: added. This provides encoding/decoding method for Base64 in standard RFC 2045, Base64 in standard RFC 4648 and ``Base 64 Encoding with URL and Filename SafeAlphabet'' in RFC 4648. * test_pack.c, test/base64/test_base64.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05* include/ruby/ruby.h (DBL2NUM): renamed from DOUBLE2NUM.matz
a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp> in [ruby-dev:36102]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-04* pack.c (encodes): make buff fixed length to avoid SEGV byakr
ruby -e '["a"*10000000].pack("m1000000000")' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-31* pack.c (pack_unpack): upper half of hexdigits has never been used.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-30* pack.c (pack_unpack): reduced static variables.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-17* pack.c (pack_unpack): fix v and V with big endian.mame
[1].pack("V").unpack("V") was [4294967296]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-17* pack.c (pack_pack): fix i! with big endian. [1].pack("i!") wasmame
"\0\0\0\0". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08* array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,ko1
enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c, io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c, string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c, vm.c, gc.c: allocated memory objects by xmalloc (ruby_xmalloc) should be freed by xfree (ruby_xfree). * ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c, ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c, ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c, ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c, ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31* suppress warnings with -Wwrite-string.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-17* pack.c (pack_pack): check errno to detect error of ruby_strtoul.mame
* pack.c (pack_unpack): ditto. * test/ruby/test_pack.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22* enumerator.c (enumerator_each, enumerator_with_index): suppressnobu
warnings. * pack.c (pack_unpack): ditto. * process.c (rb_syswait): ditto. * re.c (rb_reg_prepare_enc, rb_reg_prepare_re, rb_reg_adjust_startpos): ditto. * regparse.c (onig_name_to_group_numbers): ditto. * missing/vsnprintf.c (BSD_vfprintf): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-02* util.c (ruby_strtoul): locale independent strtoul is implemented toakr
avoid "i".to_i(36) cause 0 under tr_TR locale. This is newly implemented, not a copy of missing/strtoul.c. * include/ruby/ruby.h (ruby_strtoul): declared. (STRTOUL): defined to use ruby_strtoul. * bignum.c, pack.c, ext/socket/socket.c: use STRTOUL. * configure.in (strtoul): don't check. * missing/strtoul.c: removed. * include/ruby/missing.h (strtoul): removed. * common.mk (strtoul.o): removed. * LEGAL (missing/strtoul.c): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24 * pack.c (pack_pack): use NUM2LONG instead of NUM2INT.usa
* numeric.c (fix_lshift, fix_aref): use SIZEOF_LONG instead of SIZEOF_VALUE. * bignum.c (big2ulong, rb_big_aref): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-20Thu Dec 20 17:15:15 2007 Martin Duerst <duerst@it.aoyama.ac.jp>duerst
* pack.c: Slight change to documentation ('character' -> 'byte (C char)'). [ruby-core:13126], see also [ruby-core:13998]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-11* pack.c (pack_pack): RDoc update. a patch from Gary Wrightmatz
<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
2007-12-01* include/ruby/intern.h (rb_uv_to_utf8): declared.akr
* re.c (rb_reg_preprocess): new function for dynamic regexp with \u{} such as Regexp.new("\\u{6666}"). (rb_reg_prepare_re): preprocess regexp for recompiling. (read_escaped_byte): new function. (unescape_escaped_nonascii): new function. (append_utf8): new function. (unescape_unicode_list): new function. (unescape_unicode_bmp): new function. (unescape_nonascii): new function. (rb_reg_initialize): preprocess regexp. * pack.c (rb_uv_to_utf8): renamed from uv_to_utf8. * parse.y (STR_NEW3): take func instead of has8 and hasmb. (parser_str_new): use default coderange mechanism except for regexp. (parser_tokadd_utf8): copy regexp source as-is. (parser_read_escape): UTF-8 stuff removed. (parser_tokadd_escape): has8bit and hasmb removed. (parser_tokadd_string): fix 8-bit single byte character with \u. (parser_parse_string): has8bit and hasmb removed. (parser_here_document): has8bit and hasmb removed. (parser_yylex): call parser_tokadd_utf8 instead of read_escape for UTF-8 character. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e