setup streams work..

Robert Collins robert.collins@itdomain.com.au
Sat Nov 10 23:09:00 GMT 2001


Cross-posted for review...

Ok, I've now got file magic fairly complete.

The NIO and bz classes still need refactoring and expanding.

There's a still a chunk of code to be migrated over to the io_streams
class.

Is there any objection to this being checked into HEAD (with a little
more tidyup, but I won't bother having that reviewed :})?

Overview of changes:
* File magic detection for bz2, gz and tar file types. (I.e. you can
install from a local .tar file, as well as a local .tar.gz - once one
line in choose.cc is changed).
* io_stream hierarchy based on the classes Warren came up with, with my
single uniting class at the top.
* tar logic is stream based, not fd based, so can install directly from
http/ftp(once nio is refactored).
* Compiler warnings pushed up and all warnings bar autoload.c and the
bison system files addressed.

The file magic code here is federated across each - to overload an MS
term - class class. I.e. archive.cc knows about all archive types,
compress.cc knows all compression formats.

There's plenty more in this project I'm working on, but with the
successful install of lynx.tar.gz via a setup with this code in it, I
feel that the class hierarchy is shown to meet our needs. It's probably
able to be tweaked - for instance some instantion helper calls for the
io_stream class perhaps belong in a lower level between io_stream and
io_stream_ file|cygfile|http|ftp...

So given that the class layout works, and somethings are already
becoming easier to do, I plan to commit this to HEAD.

Any objections?

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: archive.cc
Type: text/x-c
Size: 4897 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: archive.h
Type: text/x-c++
Size: 2917 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: archive_tar_file.cc
Type: text/x-c
Size: 2595 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compress.cc
Type: text/x-c
Size: 2459 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compress.h
Type: text/x-c++
Size: 1843 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compress_bz.cc
Type: text/x-c
Size: 1677 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compress_bz.h
Type: text/x-c++
Size: 1668 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compress_gz.cc
Type: text/x-c
Size: 13788 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compress_gz.h
Type: text/x-c++
Size: 2371 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io_stream.cc
Type: text/x-c
Size: 4778 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io_stream.h
Type: text/x-c++
Size: 4237 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io_stream_cygfile.cc
Type: text/x-c
Size: 4447 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io_stream_cygfile.h
Type: text/x-c++
Size: 1616 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0012.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io_stream_file.cc
Type: text/x-c
Size: 3461 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0013.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io_stream_file.h
Type: text/x-c++
Size: 1468 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0014.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: streams.patch
Type: text/x-diff
Size: 150277 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011110/c28f1907/attachment-0015.bin>


More information about the Cygwin-patches mailing list