This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

setup streams work..


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

streams.patch

archive.cc

archive.h

archive_tar_file.cc

compress_gz.h

compress.h

compress_bz.cc

compress_bz.h

compress_gz.cc

compress.cc

io_stream_file.h

io_stream.cc

io_stream.h

io_stream_cygfile.cc

io_stream_cygfile.h

io_stream_file.cc


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]