Bug #4695

documentation updates: Zlib is 100%

Added by Vincent Batts almost 3 years ago. Updated almost 3 years ago.

[ruby-core:<unknown>]
Status:Closed
Priority:Normal
Assignee:Eric Hodel
Category:doc
Target version:1.9.3
ruby -v:ruby 1.9.3dev (2011-05-14 trunk 31562) [i686-linux] Backport:

Description

per http://blog.segment7.net/2011/05/09/ruby-1-9-3-documentation-challenge

A bit of this is cleanup of existing documentation.
This patch includes the following bits.

module Zlib # is documented

# in file ext/zlib/zlib.c
VERSION = nil
# in file ext/zlib/zlib.c
ZLIBVERSION = nil
# in file ext/zlib/zlib.c
BINARY = nil
# in file ext/zlib/zlib.c
ASCII = nil
# in file ext/zlib/zlib.c
UNKNOWN = nil
# in file ext/zlib/zlib.c
NO
COMPRESSION = nil
# in file ext/zlib/zlib.c
BESTSPEED = nil
# in file ext/zlib/zlib.c
BEST
COMPRESSION = nil
# in file ext/zlib/zlib.c
DEFAULTCOMPRESSION = nil
# in file ext/zlib/zlib.c
FILTERED = nil
# in file ext/zlib/zlib.c
HUFFMAN
ONLY = nil
# in file ext/zlib/zlib.c
DEFAULTSTRATEGY = nil
# in file ext/zlib/zlib.c
MAX
WBITS = nil
# in file ext/zlib/zlib.c
DEFMEMLEVEL = nil
# in file ext/zlib/zlib.c
MAXMEMLEVEL = nil
# in file ext/zlib/zlib.c
NOFLUSH = nil
# in file ext/zlib/zlib.c
SYNC
FLUSH = nil
# in file ext/zlib/zlib.c
FULLFLUSH = nil
# in file ext/zlib/zlib.c
FINISH = nil
# in file ext/zlib/zlib.c
OS
CODE = nil
# in file ext/zlib/zlib.c
OSMSDOS = nil
# in file ext/zlib/zlib.c
OS
AMIGA = nil
# in file ext/zlib/zlib.c
OSVMS = nil
# in file ext/zlib/zlib.c
OS
UNIX = nil
# in file ext/zlib/zlib.c
OSATARI = nil
# in file ext/zlib/zlib.c
OS
OS2 = nil
# in file ext/zlib/zlib.c
OSMACOS = nil
# in file ext/zlib/zlib.c
OS
TOPS20 = nil
# in file ext/zlib/zlib.c
OSWIN32 = nil
# in file ext/zlib/zlib.c
OS
VMCMS = nil
# in file ext/zlib/zlib.c
OSZSYSTEM = nil
# in file ext/zlib/zlib.c
OS
CPM = nil
# in file ext/zlib/zlib.c
OSQDOS = nil
# in file ext/zlib/zlib.c
OS
RISCOS = nil
# in file ext/zlib/zlib.c
OS_UNKNOWN = nil
# in file ext/zlib/zlib.c
def adler32(*args); end

# in file ext/zlib/zlib.c
def crc32(*args); end

# in file ext/zlib/zlib.c
def crc_table(); end

# in file ext/zlib/zlib.c
def deflate(*args); end

# in file ext/zlib/zlib.c
def inflate(p1); end

# in file ext/zlib/zlib.c
def zlib_version(); end

end

in files:

ext/zlib/zlib.c

class Zlib::BufError
end

in files:

ext/zlib/zlib.c

class Zlib::DataError
end

in files:

ext/zlib/zlib.c

class Zlib::MemError
end

in files:

ext/zlib/zlib.c

class Zlib::NeedDict
end

in files:

ext/zlib/zlib.c

class Zlib::StreamEnd
end

in files:

ext/zlib/zlib.c

class Zlib::StreamError
end

in files:

ext/zlib/zlib.c

class Zlib::VersionError
end

class Zlib::GzipFile::Error # is documented

attr_reader :input # in file ext/zlib/zlib.c
# in file ext/zlib/zlib.c
def inspect(); end

end

class Zlib::GzipFile # is documented

# in file ext/zlib/zlib.c
def wrap(*args); end

# in file ext/zlib/zlib.c
def close(); end

# in file ext/zlib/zlib.c
def closed?(); end

# in file ext/zlib/zlib.c
def comment(); end

# in file ext/zlib/zlib.c
def crc(); end

# in file ext/zlib/zlib.c
def finish(); end

# in file ext/zlib/zlib.c
def level(); end

# in file ext/zlib/zlib.c
def mtime(); end

# in file ext/zlib/zlib.c
def orig_name(); end

# in file ext/zlib/zlib.c
def os_code(); end

# in file ext/zlib/zlib.c
def sync(); end

# in file ext/zlib/zlib.c
def sync=(p1); end

# in file ext/zlib/zlib.c
def to_io(); end

end

class Zlib::Deflate # is documented

# in file ext/zlib/zlib.c
def flush(*args); end

# in file ext/zlib/zlib.c
def initialize_copy(p1); end

# in file ext/zlib/zlib.c
def params(p1, p2); end

# in file ext/zlib/zlib.c
def set_dictionary(p1); end

end

class Zlib::GzipFile # is documented

# in file ext/zlib/zlib.c
def crc(); end

# in file ext/zlib/zlib.c
def sync=(p1); end

end

class Zlib::GzipFile::Error # is documented

# in file ext/zlib/zlib.c
def inspect(); end

end

class Zlib::GzipReader # is documented

# in file ext/zlib/zlib.c
def new(*args); end

# in file ext/zlib/zlib.c
def open(*args); end

# in file ext/zlib/zlib.c
def bytes(); end

# in file ext/zlib/zlib.c
def each(*args); end

# in file ext/zlib/zlib.c
def each_byte(); end

# in file ext/zlib/zlib.c
def each_line(*args); end

# in file ext/zlib/zlib.c
def eof(); end

# in file ext/zlib/zlib.c
def eof?(); end

# in file ext/zlib/zlib.c
def getc(); end

# in file ext/zlib/zlib.c
def lineno(); end

# in file ext/zlib/zlib.c
def lineno=(p1); end

# in file ext/zlib/zlib.c
def lines(*args); end

# in file ext/zlib/zlib.c
def pos(); end

# in file ext/zlib/zlib.c
def read(*args); end

# in file ext/zlib/zlib.c
def readchar(); end

# in file ext/zlib/zlib.c
def rewind(); end

# in file ext/zlib/zlib.c
def tell(); end

# in file ext/zlib/zlib.c
def ungetbyte(p1); end

# in file ext/zlib/zlib.c
def ungetc(p1); end

# in file ext/zlib/zlib.c
def unused(); end

end

class Zlib::GzipWriter # is documented

# in file ext/zlib/zlib.c
def new(*args); end

# in file ext/zlib/zlib.c
def open(*args); end

# in file ext/zlib/zlib.c
def flush(*args); end

# in file ext/zlib/zlib.c
def pos(); end

# in file ext/zlib/zlib.c
def tell(); end

# in file ext/zlib/zlib.c
def write(p1); end

end

class Zlib::Inflate # is documented

# in file ext/zlib/zlib.c
def inflate(p1); end

# in file ext/zlib/zlib.c
def new(*args); end

# in file ext/zlib/zlib.c
def inflate(p1); end

# in file ext/zlib/zlib.c
def set_dictionary(p1); end

# in file ext/zlib/zlib.c
def sync(p1); end

# in file ext/zlib/zlib.c
def sync_point?(); end

end

class Zlib::ZStream # is documented

# in file ext/zlib/zlib.c
def adler(); end

# in file ext/zlib/zlib.c
def avail_in(); end

# in file ext/zlib/zlib.c
def avail_out(); end

# in file ext/zlib/zlib.c
def avail_out=(p1); end

# in file ext/zlib/zlib.c
def close(); end

# in file ext/zlib/zlib.c
def closed?(); end

# in file ext/zlib/zlib.c
def data_type(); end

# in file ext/zlib/zlib.c
def end(); end

# in file ext/zlib/zlib.c
def ended?(); end

# in file ext/zlib/zlib.c
def finish(); end

# in file ext/zlib/zlib.c
def finished?(); end

# in file ext/zlib/zlib.c
def flushnextin(); end

# in file ext/zlib/zlib.c
def flushnextout(); end

# in file ext/zlib/zlib.c
def reset(); end

# in file ext/zlib/zlib.c
def stream_end?(); end

# in file ext/zlib/zlib.c
def total_in(); end

# in file ext/zlib/zlib.c
def total_out(); end

end

ruby_doc_updates-20110513-2043_vbatts.patch Magnifier (29.9 KB) Vincent Batts, 05/14/2011 03:17 PM

Associated revisions

Revision 31572
Added by Eric Hodel almost 3 years ago

  • ext/zlib/zlib.c: Improve documentation. Patch by Vincent Batts. [Ruby 1.9 - Bug #4695]

Revision 31726
Added by Eric Hodel almost 3 years ago

  • ext/zlib/zlib.c: Fix Document-method declarations. Improve Zlib::GzipFile's method catalog. [Ruby 1.9 - Bug #4695]

Revision 31876
Added by Eric Hodel almost 3 years ago

  • ext/zlib/zlib.c: Fix document-method declarations for setsync and setcomment. [Ruby 1.9 - Bug #4695]

History

#1 Updated by Tomoyuki Chikanaga almost 3 years ago

Hi,

That's a great works!
I've found a tiny typo. Please check this out.

@@ -232,7 +232,7 @@
+ * Integer representing a flush code. Either NOFLUSH,
+ * SYNC
FLUSH, FULLFLUSH, or FINISH. See zlib.h for details.
+ * Normally the parameter flush is set to Z
NO_FLUSH, which allows deflate to
-+ * decide how much data to accumualte before producing output, in order to
++ * decide how much data to accumulate before producing output, in order to
+ * maximize compression.
+ *
+ * == Description

#2 Updated by Benoit Daloze almost 3 years ago

Hi,

It's nice to see so much documentation !

I found another tiny typo:

@@ -463,7 +463,7 @@ index 03d4255..8fa835d 100644
+ * - #totalin
+ * - #total
out
+ *
-+ * (due to internal sturcture, documentation may appear under
++ * (due to internal structure, documentation may appear under
+ * Zlib::GzipReader or Zlib::GzipWriter )
*/

#3 Updated by Eric Hodel almost 3 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r31572.
Vincent, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • ext/zlib/zlib.c: Improve documentation. Patch by Vincent Batts. [Ruby 1.9 - Bug #4695]

#4 Updated by Eric Hodel almost 3 years ago

Applied with both typos fixed.

I also documented GZError#input which was set via gzfile_raise()

#5 Updated by Yusuke Endoh almost 3 years ago

  • Status changed from Closed to Open

Hello,

/*
- * ???
+ * Document-method: Zlib::GzipFile#set_lineno
+ *
+ * Specify line number of the last row read from this file.
*/

setlineno -> lineno=
set
mtime -> mtime=
setorigname -> orig_name=
...

#6 Updated by Eric Hodel almost 3 years ago

  • Status changed from Open to Closed

This issue was solved with changeset r31726.
Vincent, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • ext/zlib/zlib.c: Fix Document-method declarations. Improve Zlib::GzipFile's method catalog. [Ruby 1.9 - Bug #4695]

#7 Updated by Yusuke Endoh almost 3 years ago

  • Status changed from Closed to Open

And, setcomment, setsync :-)

#8 Updated by Eric Hodel almost 3 years ago

  • Status changed from Open to Closed

This issue was solved with changeset r31876.
Vincent, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • ext/zlib/zlib.c: Fix document-method declarations for setsync and setcomment. [Ruby 1.9 - Bug #4695]

Also available in: Atom PDF