The MinGW.org Installation Manager Tool
Revisão | e0f62b095b7955df74d16911e6f7789947eb5d4c (tree) |
---|---|
Hora | 2013-04-23 21:42:24 |
Autor | Keith Marshall <keithmarshall@user...> |
Commiter | Keith Marshall |
Select compressed data streaming filters for use by setup tool.
@@ -1,5 +1,14 @@ | ||
1 | 1 | 2013-04-23 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 2 | |
3 | + Select compressed data streaming filters for use by setup tool. | |
4 | + | |
5 | + * src/pkgstrm.cpp [IMPLEMENTATION_LEVEL != PACKAGE_BASE_COMPONENT]: | |
6 | + Exclude the implementations of all decompression filters, except... | |
7 | + (pkgXzArchiveStream): ...this, together with its requisite methods... | |
8 | + (pkgArchiveStream, pkgLzmaArchiveStream): ...from these. | |
9 | + | |
10 | +2013-04-23 Keith Marshall <keithmarshall@users.sourceforge.net> | |
11 | + | |
3 | 12 | Adapt internet download agent for use by setup tool. |
4 | 13 | |
5 | 14 | * src/pkgbase.h: More code rearrangement, exposing... |
@@ -4,7 +4,7 @@ | ||
4 | 4 | * $Id$ |
5 | 5 | * |
6 | 6 | * Written by Keith Marshall <keithmarshall@users.sourceforge.net> |
7 | - * Copyright (C) 2009, 2010, MinGW Project | |
7 | + * Copyright (C) 2009, 2010, 2013, MinGW.org Project | |
8 | 8 | * |
9 | 9 | * |
10 | 10 | * Implementation of the streaming data filters, which will be used |
@@ -32,6 +32,8 @@ | ||
32 | 32 | * arising from the use of this software. |
33 | 33 | * |
34 | 34 | */ |
35 | +#include "pkgimpl.h" | |
36 | + | |
35 | 37 | #include <unistd.h> |
36 | 38 | #include <fcntl.h> |
37 | 39 |
@@ -80,6 +82,8 @@ int pkgArchiveStream::GetRawData( int fd, uint8_t *buf, size_t max ) | ||
80 | 82 | return read( fd, buf, max ); |
81 | 83 | } |
82 | 84 | |
85 | +#if IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT | |
86 | + | |
83 | 87 | /***** |
84 | 88 | * |
85 | 89 | * Class Implementation: pkgRawArchiveStream |
@@ -185,6 +189,8 @@ int pkgBzipArchiveStream::Read( char *buf, size_t max ) | ||
185 | 189 | return BZ2_bzRead( &bzerror, stream, buf, max ); |
186 | 190 | } |
187 | 191 | |
192 | +#endif /* PACKAGE_BASE_COMPONENT */ | |
193 | + | |
188 | 194 | /***** |
189 | 195 | * |
190 | 196 | * Class Implementation: pkgLzmaArchiveStream |
@@ -222,6 +228,8 @@ void lzma_stream_initialise( lzma_stream *stream ) | ||
222 | 228 | stream->avail_in = 0; |
223 | 229 | } |
224 | 230 | |
231 | +#if IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT | |
232 | + | |
225 | 233 | pkgLzmaArchiveStream::pkgLzmaArchiveStream( const char *filename ) |
226 | 234 | { |
227 | 235 | /* The constructor must first open a file stream... |
@@ -318,6 +326,8 @@ int pkgLzmaArchiveStream::Read( char *buf, size_t max ) | ||
318 | 326 | return max - stream.avail_out; |
319 | 327 | } |
320 | 328 | |
329 | +#endif /* PACKAGE_BASE_COMPONENT */ | |
330 | + | |
321 | 331 | /***** |
322 | 332 | * |
323 | 333 | * Class Implementation: pkgXzArchiveStream |
@@ -441,6 +451,8 @@ int pkgXzArchiveStream::Read( char *buf, size_t max ) | ||
441 | 451 | return max - stream.avail_out; |
442 | 452 | } |
443 | 453 | |
454 | +#if IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT | |
455 | + | |
444 | 456 | /***** |
445 | 457 | * |
446 | 458 | * Auxiliary function: pkgOpenArchiveStream() |
@@ -503,4 +515,6 @@ extern "C" pkgArchiveStream* pkgOpenArchiveStream( const char* filename ) | ||
503 | 515 | return new pkgRawArchiveStream( filename ); |
504 | 516 | } |
505 | 517 | |
518 | +#endif /* PACKAGE_BASE_COMPONENT */ | |
519 | + | |
506 | 520 | /* $RCSfile$: end of file */ |