Commit Graph

250 Commits

Author SHA1 Message Date
Steven Watanabe
d0648da422 Make symmetric_filter compile with wchar_t. Fixes #3279.
[SVN r63006]
2010-06-15 22:24:24 +00:00
Steven Watanabe
854cb321a9 Make aggregate_filter work with wide characters. Fixes #3851.
[SVN r62994]
2010-06-15 19:54:45 +00:00
Steven Watanabe
900c436fee Fix infinite loop in symmetric_filter_test
[SVN r62966]
2010-06-15 04:16:11 +00:00
Steven Watanabe
b37e8fc658 Make sure that the bzip2 filters can be closed even if no input has been read. Fixes #3348.
[SVN r62962]
2010-06-15 01:22:50 +00:00
Steven Watanabe
43c8489154 Make sure that compressing an empty string works.
[SVN r62960]
2010-06-15 01:02:06 +00:00
Steven Watanabe
fd81a28296 Rejigger file_descriptors handling of std::ios_base::openmode to match std::fstream. In particular, truncate existing files, if std::ios_base::trunc is passed. Refs #3323.
[SVN r62934]
2010-06-14 15:56:00 +00:00
Steven Watanabe
7803ec6b9d Add BOOST_IOSTREAMS_DECL to file_descriptor_source and file_descriptor_sink. Fixes #4335.
[SVN r62811]
2010-06-11 18:55:31 +00:00
Daniel James
bb51391533 Only support the templated constructor for types with an
'external_string_type' member. Refs #4135.

Using SFINAE, I might add a workaround for compilers that don't support
it, although I'm not sure if there are any that Iostreams supports.

[SVN r61497]
2010-04-22 22:51:24 +00:00
Daniel James
1b96b8e33f Fix some inspect errors.
[SVN r61057]
2010-04-05 07:24:27 +00:00
Daniel James
1fec8e513a Explicitly qualify call to equal for compilers which find it ambiguous.
[SVN r60984]
2010-03-31 21:42:32 +00:00
Daniel James
5177aa8a83 ptrdiff_t is in std. Refs #2505.
[SVN r60582]
2010-03-14 18:04:30 +00:00
Daniel James
317f6f07ea In position_to_offset, only cast to stream_offset after calculating _Myoff. Refs #3969.
Thanks to Garth Sylvester-Bradley.

[SVN r60581]
2010-03-14 18:00:45 +00:00
Daniel James
5c0f4cc2f5 Gzip filter shouldn't require its source to be peekable. Refs #3723.
In a recent version, the gzip filter stopped working for array sources,
this is because it started to require them to be peekable, which they
aren't and can't be because the peek interface modifies the source,
which for an array source is immutable.

Looking at the implementation, gzip decompressor has an internal class
to emulate a peekable source, which calls the putback member on the
original source if it runs out of space (requiring the source to be
peekable). It shouldn't really need to do that so I changed it to throw
an exception instead.

If it does need to do that, we could change it to store the character
that was put back at the beginning of the string instead.

[SVN r60415]
2010-03-10 07:29:44 +00:00
Daniel James
67e832cb3b Fix error checks after calling SetFilePointer. Refs #3953
Thanks to Eg. Especially for writing a test.

[SVN r60281]
2010-03-07 09:34:45 +00:00
Daniel James
b429d69932 Fix write_device_impl<ostream_tag>
And enchance the newline tests so that they test it.
Refs #3839

[SVN r60228]
2010-03-06 15:17:38 +00:00
Daniel James
ee8183446f Change the macro setup for restrict_test and slice_test.
Because of the way restrict_test and slice_test were including the
header file they were testing, bjam was missing the dependency on that
files and sometimes, when changing the headers, the test wouldn't get
run.  This fixes that.

[SVN r58224]
2009-12-07 19:36:18 +00:00
Troy D. Straszheim
a45b99ee22 rm cmake from trunk. I'm not entirely sure this is necessary to satisfy the inspect script, but I'm not taking any chances, and it is easy to put back
[SVN r56942]
2009-10-17 02:07:38 +00:00
Beman Dawes
7eb5702836 iostreams: fix for LWG issue 811, which it causing GCC 4.4.x errors
[SVN r56666]
2009-10-09 12:16:38 +00:00
Beman Dawes
3918269904 Quiet GCC warnings
[SVN r56022]
2009-09-04 22:20:40 +00:00
Troy D. Straszheim
83d827478e Copyrights on CMakeLists.txt to keep them from clogging up the inspect
reports.  This is essentially the same commit as r55095 on the release
branch.



[SVN r55159]
2009-07-26 00:49:56 +00:00
Jeremiah Willcock
4baa4e2d18 Fixed most tab and min/max issues from trunk inspection report
[SVN r53141]
2009-05-20 19:19:00 +00:00
Vladimir Prus
4ba99d5ff9 Remove forcing of static runtime on msvc.
[SVN r52374]
2009-04-13 21:39:33 +00:00
Michael A. Jackson
3943ddbd10 Updating CMake files to latest trunk. Added dependency information for regression tests and a few new macros for internal use.
[SVN r49627]
2008-11-07 17:02:56 +00:00
Michael A. Jackson
d9b4ac9da4 Continuing merge of CMake build system files into trunk with the encouragement of Doug Gregor
[SVN r49510]
2008-11-01 13:15:41 +00:00
Jonathan Turkanis
35e2fe3964 removed functions relating to file timestamps (addresses #2154)
[SVN r47866]
2008-07-29 14:06:01 +00:00
Jonathan Turkanis
cc4ea77f19 changes to wide-character path and file timestampt support for POSIX and MinGW
[SVN r46737]
2008-06-26 18:40:23 +00:00
Jonathan Turkanis
6aa3785713 applied changes from Jorge Lodos (with modifications)
[SVN r46692]
2008-06-25 18:23:59 +00:00
Jonathan Turkanis
e5f1ed2f13 added support for archives with multiple members; added tests for metadata and for multiple members (fixes #1896)
[SVN r46001]
2008-05-31 22:53:58 +00:00
Jonathan Turkanis
680a5e6abc fixed tests for grep_filter::count() by passing a reference wrapper instead of a copy to io::compose
[SVN r45841]
2008-05-27 23:26:16 +00:00
Jonathan Turkanis
4c96a2557d added grep_filter and tests (issue #1627); line_filter needed modification to be usable as a base for grep_filter; the commented out tests for grep_filter::count() are incorrect, because they query the original filter rather than the copy used for i/o; I have verified independently that count() works, and will fix the test later
[SVN r45833]
2008-05-27 20:18:02 +00:00
Jonathan Turkanis
29af23da89 made tee work with input streams (fixes #791)
[SVN r45752]
2008-05-25 22:03:22 +00:00
Marshall Clow
553eefe79e Replaced all occurrences of non-ASCII copyright symbol with '(c)' for people using non-ASCII code pages
[SVN r43992]
2008-04-02 01:42:32 +00:00
Jonathan Turkanis
8005d60743 updated to test close() on filtering streambufs
[SVN r43395]
2008-02-23 06:07:59 +00:00
Jonathan Turkanis
34ee5bdaa6 merged changes from iostreams_dev, revisions 43243-43298: overhaul of category_of and close(): stringstream is now dual_seekable; standard file streams and string streams are closable; public Boost.Iostreams streams and streambufs are closable; close() pops filtering streams and streambufs
[SVN r43299]
2008-02-18 05:48:13 +00:00
Jonathan Turkanis
5344f24a11 switched from <wchar.h> to <cwchar>, for stdcxx (which is conforming in this case)
[SVN r43243]
2008-02-13 19:42:10 +00:00
Jonathan Turkanis
f7b7dcd1af merged changes from iostreams_dev, revisions 43059-43238: better debug output for mapped file; fixed large_file_test.cpp under UNICODE on Windows
[SVN r43240]
2008-02-13 05:47:44 +00:00
Jonathan Turkanis
ecbd2bd5e8 merged changes from iostreams_dev, revisions 42962-43059: updated copyright notices
[SVN r43061]
2008-02-02 22:10:46 +00:00
Jonathan Turkanis
2ffbb03e07 merged changes from iostreams_dev, revisions 42947-42962: fixed tickets 1003, 1139, 1140, 1149
[SVN r42970]
2008-01-25 17:56:25 +00:00
Jonathan Turkanis
8aa731d9d4 merged changes from iostreams_dev, revisions 42825-42947
[SVN r42948]
2008-01-24 06:50:32 +00:00
Jonathan Turkanis
f05fc1b347 overhaul of dual_use filters: close() is now called just once; suppressed Borland/Dinkumware warnings in mapped_file.hpp
[SVN r42778]
2008-01-14 20:47:17 +00:00
Jonathan Turkanis
3cbc8c29eb removed intel-darwin sepcific code, since it didn't work
[SVN r42707]
2008-01-12 20:20:35 +00:00
Jonathan Turkanis
42d8be6eb4 another attempt to fix linking for compression tests on intel-darwin
[SVN r42684]
2008-01-11 19:12:22 +00:00
Jonathan Turkanis
3f1b2a1580 force static runtime-link for intel-darwin
[SVN r42672]
2008-01-11 01:35:46 +00:00
Jonathan Turkanis
bfa2424fb9 merged changes from branches/iostreams_dev, revisions 42645=42660; fix for Intel-darwin; removed dependence of file_descriptor_test and mapped_file_test on library boost_iostreams
[SVN r42670]
2008-01-11 00:02:36 +00:00
Jonathan Turkanis
975356158b merged changes from branches/iostreams_dev, revisions 42602-42624: adding missing included to fix #1550; fix for positioning on IBM; fix for file_descriptor on POSIX; restructed the version range for the Borland workaround in large_file_test.cpp
[SVN r42625]
2008-01-08 22:25:01 +00:00
Jonathan Turkanis
0c21da55d2 removed unneeded headers, one of which (restrict.hpp) causes failures on IBM Visual Age
[SVN r42602]
2008-01-08 04:20:38 +00:00
Jonathan Turkanis
bc7dcedcbd merged changes from branches/iostreams_dev, revisions 42565-42595:
- Simplified implementation with the help to the C-runtime function _get_osfhandle so that on Windows only a single HANDLE is stored and the POSIX-style implementation is never needed; added the handle_type on POSIX systems (typedef for int) and a function returning the underlying handle as an instance of handle_type
- fixed the bug described in ticket Ticket #1551 (stream_buffer::seekpos ignores openmode parameter)
- fixed test/operation_sequence_test.cpp file description

[SVN r42596]
2008-01-07 23:13:26 +00:00
Jonathan Turkanis
3e02e11442 merged changes from branches/iostreams_dev, revisions 42544-42544
- added "slice" as an alias for "restrict", for platforms on which "restrict" is a keyword
- attempted to configure file_descriptor for __IBMCPP__
- added better error output to stream_offset_64bit_test.cpp

[SVN r42565]
2008-01-07 05:20:32 +00:00
Jonathan Turkanis
f735f49547 copy.hpp:
fix for Visual Age: std::min was passed arguments of different types; replaced std:: min with conditional

detail/streambuf/indirect_streambuf.hpp: 

    removed trailing comma in enum definition

test/combine_test.cpp:
test/symmetric_filter_test.cpp:
test/compose_test.cpp:
test/close_test.cpp:
test/invert_test.cpp:
test/tee_test.cpp:
test/restrict_test.cpp:
test/Jamfile.v2:

    moved tests for close() into the test files for various adapters

[SVN r42544]
2008-01-06 18:32:05 +00:00
Jonathan Turkanis
9ea25a989b merged changes from iostreams_dev, revisions 42441-42469; added 'std::' for Intel on Linux/Darwin; added STDCXX workaround for codecvt; fixed docs for invert.hpp
[SVN r42471]
2008-01-05 04:51:49 +00:00
Jonathan Turkanis
9cc19290e6 changes from iostreams_dev not merged by svnmerge for some reason; better error reporting for file_offset_64bit_test.cpp; added 'std::' all over the place for Intel on Linux and Darwin; commented out stream_state_test.cpp because it seems to be a test for the standard library, and it is not clear that the standard requires that the test pass
[SVN r42440]
2008-01-03 19:10:48 +00:00
Jonathan Turkanis
ce094a70ca ported changes to large_file_test.cpp from branches/iostreams_dev revisions 42376-42380:
- added optimization for win32 (excpet Borland 5.8.2) using mapped files
    - replaced SetFilePointerEx with SetFilePointer
    - replaced BOOST_CHECK_MESSAGE with BOOST_REQUIRE_MESSAGE in test for file existence
    - changed file attributes passed to CreateFile; previous flags were the result of a haphazard attempt to speed up execution
    - added docs


[SVN r42381]
2007-12-30 22:35:46 +00:00
Jonathan Turkanis
9dccd2482b ported changes from branches/iostreams_dev revisions 42343-42356
[SVN r42357]
2007-12-30 04:19:38 +00:00
Jonathan Turkanis
1753faf9e0 ported changes from branches/iostreams_dev revisions 42306-42342: reworking of low-level file access to address #824, plus rigorous tests for large seeks
[SVN r42343]
2007-12-29 19:50:22 +00:00
K. Noel Belcourt
e94024b747 Add missing iostreams files from iostreams_dev branch.
Re-enable these two tests.



[SVN r42311]
2007-12-27 00:37:52 +00:00
K. Noel Belcourt
91708aa511 Comment out these two tests
[ test-iostreams stream_offset_32bit_test.cpp ]
[ test-iostreams stream_offset_64bit_test.cpp ]

since, apparently, these source files didn't get 
added.



[SVN r42310]
2007-12-26 22:48:28 +00:00
Jonathan Turkanis
8c65fa7d15 ported changes from branches/iostreams_dev revisions 42265-42306
[SVN r42307]
2007-12-26 05:45:15 +00:00
Jonathan Turkanis
49ba093a28 ported changes from branches/iostreams_dev revisions 42144-42265
[SVN r42266]
2007-12-24 00:27:12 +00:00
Jonathan Turkanis
4f85a131de I. Changed signature and specification of boost::iostreams::close(),
and made corresponding changes throughout the iostreams library.
   New spec is:
   
   template<typename T>
   void close(T& t);

     Convenience function for closing a device; calls close(t, in) and 
     close(t, out).

   template<typename T>
   void close(T& t, openmode which);

   template<typename T, typename Sink>
   void close(T& t, Sink& snk, openmode which);

     These two functions should only be called by the library implementation
     or by advanced users. The openmode parameter must always equal in or 
     out, never in | out.

     There are three cases:

     1. If T is not closable and which == out, calls boost::iostreams::flush

     2. If T operates on a single sequence, and is NOT a dual-use filter:

        a. If which == in and the mode of T is convertible to input but
           not to output, calls t.close() (or t.close(snk))

        b. If which == out and the mode of T is not convertible to input or
           is convertible to input and to output, calls t.close() 
           (or t.close(snk))

        The effect of a. and b. is that for any T in this category, 
        close() is called exactly once.

     3. If T operates on two sequences or is a dual-use filter, calls
        t.close(which) (or t.close(snk, which))

     If multiple operations that might throw must be called in the course
     of closing a filter or device, all of the operations are attempted
     and the first exception thrown by any of the operations is rethrown

  The new test close_test.cpp contains 95 checks verifying that the operation
  behaves as sepcified.

  This affects the following files:

    chain.hpp
    close.hpp
    code_converter.hpp
    combine.hpp
    compose.hpp
    copy.hpp
    detail/adapter/basic_adapter.hpp [removed]
    detail/adapter/device_adapter.hpp [new]
    detail/adapter/direct_adapter.hpp
    detail/adapter/filter_adapter.hpp [new]
    detail/adapter/mode_adapter.hpp
    detail/broken_overload_resolution/stream_buffer.hpp
    detail/closer.hpp [removed]
    detail/config/limits.hpp
    detail/execute.hpp [new]
    detail/functional.hpp [new]
    detail/streambuf/direct_streambuf.hpp
    detail/streambuf/indirect_streambuf.hpp
    detail/streambuf/linked_streambuf.hpp
    detail/vc6/close.hpp
    device/null.hpp
    filter/aggregate.hpp
    filter/bzip2.hpp
    filter/gzip.hpp
    filter/line.hpp
    filter/newline.hpp
    filter/symmetric.hpp
    filter/test.hpp
    invert.hpp
    restrict.hpp
    tee.hpp
    example/finite_state_filter.hpp
    test/Jamfile.v2
    test/close_test.cpp [new]
    test/code_converter_test.cpp
    test/execute_test.cpp [new]
    test/operation_sequence_test.cpp [new]

II. When exceptions are caught and ignored, we now use catch (...)
    uniformly instead of catch (std::exception&). This affects the 
    following files:

    stream_buffer.hpp
    src/mapped_file.cpp

III. Unnecessary dependence on Boost.Range has been eliminated. This
     affects the following files:

    detail/is_iterator_range.hpp
    detail/resolve.hpp
    traits.hpp
    test/Jamfile.v2
    test/filtering_stream_test.cpp
    test/offset_test.cpp
    test/seek_test.hpp
    test/seekable_filter_test.cpp
    test/sequence_test.cpp [new]
    test/wide_stream_test.cpp

IV. There are several fixes to the documentation. This affects the
    following files:

    doc/classes/symmetric_filter.html
    doc/guide/concepts.html
    doc/guide/modes.html
    doc/tutorial/container_device.html [serious error in algorithm]
    doc/tutorial/dictionary_filters.html [unused member variable]
    doc/tutorial/multichar_filters.html

V. Other changes include:

    stream.hpp [missing include directive]
    example/container_device.hpp [serious error in algorithm]
    example/container_device_example.cpp [outdated naming]
    example/container_sink_example.cpp [outdated naming]
    example/container_source_example.cpp [outdated naming]
    example/dictionary_filter.hpp [unused member variable]
    test/compose_test.cpp [added comments]
    test/example_test.cpp [reformatted]

[SVN r42047]
2007-12-14 19:30:07 +00:00
Vladimir Prus
000213c327 Remove V1 Jamfiles
[SVN r38516]
2007-08-08 19:02:26 +00:00
John Maddock
3f66947198 Added Kim Barrett's patches that merge the changes from 1.33.1 into cvs HEAD.
[SVN r37788]
2007-05-26 12:42:44 +00:00
Vladimir Prus
f0b005fa29 Do not use peek at source files, link to the library.
[SVN r37409]
2007-04-10 06:02:10 +00:00
Andreas Huber
5f19054216 Fixed license & copyright issues.
[SVN r36505]
2006-12-24 09:14:17 +00:00
Vladimir Prus
3d82d1a4e1 When parts of iostream lib are directly compiled into tests, without
any DLL created, we should not set BOOST_IOSTREAMS_DYN_LIB.


[SVN r36192]
2006-11-28 08:12:02 +00:00
Vladimir Prus
de8f315f3b Allow building of shared versions of some Boost.Test libraries.
Adjust tests to use always use static linking to Boost.Test, since
linking to the shared version requires test changes.

Patch from Juergen Hunold.


[SVN r35989]
2006-11-10 19:09:56 +00:00
John Maddock
4718f83c38 Added dll-export options.
[SVN r35647]
2006-10-17 12:52:11 +00:00
Vladimir Prus
e3d36e5735 Don't run compression tests when compression is not available. This
avoids false failures.


[SVN r33423]
2006-03-21 17:17:44 +00:00
Vladimir Prus
c2b853b970 Update Jamfile.v2
[SVN r32488]
2006-01-31 16:31:59 +00:00
Vladimir Prus
2326f0bb79 Update Jamfile.v2
[SVN r32487]
2006-01-31 16:28:07 +00:00
Dave Abrahams
73c36ee9ea Added missing import
[SVN r31391]
2005-10-19 18:14:58 +00:00
Jonathan Turkanis
44372b3d3b added tests for modified component access
[SVN r30656]
2005-08-24 23:39:02 +00:00
Jonathan Turkanis
b298e318e0 initial committment
[SVN r30655]
2005-08-24 23:38:03 +00:00
Jonathan Turkanis
1b7c3b4b21 removed debugging message
[SVN r30192]
2005-07-21 12:30:41 +00:00
Jonathan Turkanis
a8709e3555 renamed streambuf_facade, stream_facade and several filters
[SVN r30128]
2005-07-15 23:55:05 +00:00
Jonathan Turkanis
b6bafe7775 fixed whitespace
[SVN r30091]
2005-07-15 04:35:22 +00:00
Jonathan Turkanis
115f3d05d8 fixed size of 'large file'
[SVN r29914]
2005-07-07 02:48:34 +00:00
John Maddock
ec8f567b96 Change Jamfile to <runtime-link>
[SVN r29738]
2005-06-22 17:03:13 +00:00
Jonathan Turkanis
1b1a424a3e putback_test.hpp
[SVN r29689]
2005-06-19 20:47:37 +00:00
Jonathan Turkanis
8839a98d76 renamed toolset msvc-stlport --> vc-6_5-stlport
[SVN r29499]
2005-06-09 20:28:52 +00:00
Jonathan Turkanis
25b2d1c62f restored Codecvt template arg in test1; misc changes
[SVN r29434]
2005-06-05 08:18:38 +00:00
Jonathan Turkanis
ac8fea8327 removed source file_descriptor.cpp from code_converter_test.cpp
[SVN r29414]
2005-06-03 18:49:02 +00:00
Jonathan Turkanis
541c971f0f made includion of file_descriptor.cpp conditional on BOOST_XXX_NO_LIB
[SVN r29413]
2005-06-03 18:45:04 +00:00
Jonathan Turkanis
14170545a9 como workaround
[SVN r29412]
2005-06-03 18:32:15 +00:00
Jonathan Turkanis
08fd580038 RogueWave workaround
[SVN r29409]
2005-06-03 17:06:01 +00:00
Rene Rivera
f02ce12a57 system_failure.hpp; Fix syntax on #if check.
Jamfile; Add std::locale-support to finate_state_filter_test as it uses locales.


[SVN r29406]
2005-06-03 15:33:21 +00:00
Rene Rivera
6ecc9ef627 Don't use absolute paths for Jamfile imports. Other minor TAB, etc cleanups.
[SVN r29379]
2005-06-02 16:17:06 +00:00
Jonathan Turkanis
7be3a3d269 made includion of sompression tests conditional
[SVN r29356]
2005-06-01 23:44:25 +00:00
Jonathan Turkanis
004738dce1 removed second template arg to finite_state_filter
[SVN r29353]
2005-06-01 19:26:54 +00:00
Victor A. Wagner Jr.
88343953fd Changed - \r\r\n to \r\n so it works on VC-8_0
Deleted - apparently some trailing spaces


[SVN r29305]
2005-05-30 19:59:42 +00:00
Jonathan Turkanis
70e37cf520 ?
[SVN r29297]
2005-05-30 07:54:32 +00:00
Jonathan Turkanis
7eebbf9ccf replaced >= max with > max
[SVN r29296]
2005-05-30 07:52:39 +00:00
Jonathan Turkanis
331bdd80e6 switched from array_source to string_source
[SVN r29295]
2005-05-30 07:51:45 +00:00
Jonathan Turkanis
c592608662 renamed size --> new_file_size
[SVN r29294]
2005-05-30 07:50:11 +00:00
Jonathan Turkanis
0fce82ef4e added error directive for locale support
[SVN r29293]
2005-05-30 07:43:58 +00:00
Jonathan Turkanis
9e27a1d1bd RougeWave fix
[SVN r29292]
2005-05-30 07:42:56 +00:00
Jonathan Turkanis
254d733b04 Tru64 fix
[SVN r29275]
2005-05-30 00:53:14 +00:00
Jonathan Turkanis
c90045afe8 renamed restrict_test.cppoffset_test.cpp
[SVN r29227]
2005-05-26 09:23:46 +00:00
Jonathan Turkanis
b2388a01cf renamed inverse_test.cpp
[SVN r29226]
2005-05-26 09:23:19 +00:00
Jonathan Turkanis
e7737837cb added compose_test.cpp; renamed reverse_test.cpp and offset_test.cpp
[SVN r29225]
2005-05-26 09:22:32 +00:00
Jonathan Turkanis
8dbaaa8f4c added container_device tests
[SVN r29224]
2005-05-26 09:20:21 +00:00