aboutsummaryrefslogtreecommitdiffstats
path: root/ext/zlib
Commit message (Collapse)AuthorAgeFilesLines
* * ext/zlib/zlib.c (rb_gzreader_initialize): revert a part of r33937.usa2011-12-051-8/+0
| | | | | | | | | | | 1st, to change the mode of an IO is very sensitive problem, so the maintainer of this library should judge it. 2nd, usually Zlib::GzReader.new is not called directly. #initialize is called via .open, and in the method the I/O is opened in binary mode, so there is no problem without changing the mode in #initialize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Introduce NEED_READCONV and NEED_WRITECONV to replace universal newline ↵luislavena2011-12-041-0/+8
| | | | | | | | | decorator Use CRLF only when required to improve file reading and writing under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (gzfile_read_header): Ensure that each section ofnahi2011-08-231-0/+6
| | | | | | | | | gzip header is readable to avoid SEGV. * test/zlib/test_zlib.rb (test_corrupted_header): Test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (gzfile_wrap): Document encoding options.drbrain2011-08-091-14/+27
| | | | | | | | * ext/zlib/zlib.c (rb_gzwriter_s_open): ditto * ext/zlib/zlib.c (rb_gzreader_s_open): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c: Fix document-method declarations for set_sync anddrbrain2011-05-311-2/+2
| | | | | | | set_comment. [Ruby 1.9 - Bug #4695] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c: Fix Document-method declarations. Improvedrbrain2011-05-251-14/+12
| | | | | | | Zlib::GzipFile's method catalog. [Ruby 1.9 - Bug #4695] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2011-05-151-15/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c: Improve documentation. Patch by Vincent Batts.drbrain2011-05-141-36/+469
| | | | | | | [Ruby 1.9 - Bug #4695] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c: parenthesize macro arguments.akr2011-04-031-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (gzfile_reader_get_unused): no need to dupnobu2011-02-031-3/+1
| | | | | | before rb_str_resurrect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* e ext/zlib/zlib.c (gzfile_reader_get_unused): use rb_str_resurrectnaruse2011-02-031-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (gzfile_reader_get_unused): use rb_str_new_sharednaruse2011-02-031-1/+1
| | | | | | because gz->z.input is hidden string. [ruby-core:35057] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c: parenthesize macro arguments.akr2011-01-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* The cast must use uint32_t. [ruby-core:34481]naruse2011-01-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (gzfile_check_footer): ISIZE (Input SIZE) innaruse2011-01-141-1/+1
| | | | | | | gzip's header is the size of uncompressed input data modulo 2^32. [ruby-core:34481] http://www.ietf.org/rfc/rfc1952.txt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c: take care of platforms where long is biggernobu2011-01-011-42/+75
| | | | | | | than int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (sizeof): zlib.h mistakenly assumes the resultnobu2010-12-311-0/+1
| | | | | | | of sizeof to be int, not size_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (Init_zlib): Add Zlib.defale and Zlib.inflate.naruse2010-12-271-4/+10
| | | | | | [ruby-dev:42833] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update rdoc of zlib.naruse2010-12-271-3/+9
| | | | | | Add description about gzip(1) compatible output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (gzreader_gets): support optional lengthnobu2010-12-251-15/+87
| | | | | | parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (gzfile_read, gzfile_readpartial): length shouldnobu2010-12-251-10/+10
| | | | | | be long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (gzfile_s_open): should close the IO if some errorusa2010-12-141-9/+44
| | | | | | | occurs in initilizing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_scan_args): Add support for optional keywordknu2010-09-101-5/+1
| | | | | | | | | | | | | | | | | | | | argument hash. * README.EXT, README.EXT.ja: Update documentation accordingly. * dir.c (dir_initialize): Make use of the new rb_scan_args() feature. * io.c (rb_io_s_popen, rb_scan_open_args, rb_io_initialize) (rb_io_s_pipe, open_key_args, io_s_foreach, io_s_readlines) (rb_io_s_read, rb_io_set_encoding): Ditto. * transcode.c (str_transcode, econv_args) (econv_primitive_convert): Ditto. * ext/zlib/zlib.c (rb_gzreader_initialize): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* .cvsignore: have not been used already. [Bug #3468]nobu2010-08-071-4/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/{intern,io}.h: add missing prototypes.nobu2010-07-221-5/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (gzfile_raise): add invalid header tonobu2010-07-071-4/+35
| | | | | | | exceptions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (zstream_append_input2): add RB_GC_GUARD.mame2010-05-291-0/+1
| | | | | | This caused failure when test/csv is executed with GC.stress = true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/**/*.[ch]: removed trailing spaces.nobu2010-04-221-7/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (rb_deflate_params): update buf_filled count becausemame2010-04-201-1/+5
| | | | | | | deflateParams writes to out buffer. And, revert r18029 because the flush was not needed now and emits garbage. [ruby-dev:40802] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (zstream_expand_buffer_into): remove compare different ↵takano322010-03-011-3/+3
| | | | | | type values warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (zlib_mem_alloc): suppress valgrind warnings.akr2010-02-151-1/+20
| | | | | | | http://www.zlib.net/zlib_faq.html#faq36 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (rb_gzfile_s_wrap): add rdoc. [Bug #2656]naruse2010-01-261-2/+4
| | | | | | patched by Hugh Sasse [ruby-core:27692] [ruby-core:27852] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (rb_gzfile_s_wrap): add rdoc.naruse2010-01-262-920/+8
| | | | | | | | patched by Hugh Sasse [ruby-core:27692] * ext/zlib/doc/zlib.rd: removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/{extconf.rb, zlib.c): crc32_combine and adler32_combine isusa2010-01-192-0/+11
| | | | | | | supported on Zlib 1.2.2.1, so check them for old zlib. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c: added Zlib.crc32_combine and Zlib.adler32_combinetenderlove2010-01-191-0/+32
| | | | | | * test/zlib/test_zlib.rb: corresponding tests [ruby-core:27551] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (rb_zlib_adler32): fix typo.mame2009-11-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c (VpMidRound): remove warnings.naruse2009-10-161-3/+3
| | | | | | | | | | | | | | | | | | | | patch from Charlie Savage. [ruby-core:22869] * ext/digest/bubblebabble/bubblebabble.c (bubblebabble_str_new): ditto. * ext/digest/digest.c (hexencode_str_new): ditto. * ext/iconv/iconv.c (iconv_convert): ditto. * ext/socket/socket.c (inspect_sockaddr): ditto. * ext/socket/raddrinfo.c (sockaddr_obj): ditto. * ext/syck/emitter.c (syck_emitter_write): ditto. * ext/syck/emitter.c (syck_emitter_flush): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (gzfile_read_all): use gzfile_newstr;naruse2009-08-291-1/+1
| | | | | | set and convert its encoding. [ruby-dev:38304] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (Zlib::GzipFile#path): New method.knu2009-04-222-1/+37
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (zstream_run): suppress a warning. a patch fromnobu2009-03-011-1/+1
| | | | | | | Charlie Savage at [ruby-core:22607]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (zstream_run): previous change didn't resolve theusa2009-01-281-1/+4
| | | | | | | | problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (zstream_run): desperately guard the variable.usa2009-01-281-1/+1
| | | | | | | | [ruby-core:20576] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (Init_zlib): defines readbyte instead redefiningnobu2008-11-021-2/+3
| | | | | | | readchar. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_conv_enc_opts): new function to convert withmatz2008-10-221-24/+81
| | | | | | | | | | | | | | | specifying ecflags and ecopts. * ext/zlib/zlib.c (gzfile_newstr): specify ecflags and ecopts for conversion using above function. * ext/zlib/zlib.c (gzfile_newstr): use own rb_econv_t for dummy encoding to handling stateful encoding (e.g. iso-2022-jp). [ruby-dev:36857] * ext/zlib/zlib.c (gzfile_getc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (rb_gzreader_ungetc): should be able to ungetmatz2008-10-211-1/+4
| | | | | | | | | | | Fixnum. * ext/stringio/stringio.c (strio_ungetc): should convert unget string. * ext/stringio/stringio.c (strio_ungetbyte): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_write): should convert writingmatz2008-10-211-1/+2
| | | | | | | | | | | string to the encoding of the buffer. * hash.c (rb_any_hash): typo fixed. * ext/zlib/zlib.c (rb_gzwriter_write): oops, IO string conversion need to be done by to_s. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (rb_gzwriter_write): conversion should be donematz2008-10-211-3/+8
| | | | | | | | | | | | using to_str, not to_s. * ext/zlib/zlib.c (rb_gzwriter_write): need proper conversion according to gz encoding. * ext/zlib/zlib.c (rb_gzreader_ungetc): convert string encoding before unget. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c: remove obsolete prototype macros.matz2008-10-211-176/+309
| | | | | | | | | | | | | | | | | | | | * ext/zlib/zlib.c (struct gzfile): add encoding field to gzfile structure. * ext/zlib/zlib.c (rb_gzreader_getc): now works on characters. * ext/zlib/zlib.c (rb_gzreader_getbyte): new method to retrieve single byte. * ext/zlib/zlib.c (rb_gzreader_readbyte): ditto. * ext/zlib/zlib.c (rb_gzreader_each_byte): renamed from each_char * ext/zlib/zlib.c (rb_gzreader_ungetc): allow unget strings. * ext/zlib/zlib.c (rb_gzreader_ungetbyte): renamed from ungetc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (Init_zlib): add getbyte as an alias to getc.matz2008-10-201-0/+1
| | | | | | [ruby-dev:36801] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_file_open_str): declared.akr2008-09-041-1/+1
| | | | | | | | | | | * io.c (rb_file_open_str): defined. * ext/zlib/zlib.c (gzfile_s_open): use rb_file_open_str instead of rb_file_open. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e