536 Commits

Author SHA1 Message Date
Vladimir Prus
881c3b4e3a Fix typo.
[SVN r32174]
2005-12-28 07:28:45 +00:00
Vladimir Prus
e17d52165f Minor editorial changes.
[SVN r32135]
2005-12-22 09:39:11 +00:00
Vladimir Prus
6e7b140c98 Fix asserts in format_paragraph on VC 8.0 -- the reverse iterator was
incorrectly used. Generally clean up the code.


[SVN r32133]
2005-12-22 09:29:14 +00:00
Vladimir Prus
4cde608b3e Fix type in reference to 'check_first_occurrence'.
[SVN r31993]
2005-12-12 06:20:47 +00:00
Hartmut Kaiser
7bc84f1b39 Fixed a Windows build problem.
[SVN r31793]
2005-11-27 23:58:05 +00:00
Vladimir Prus
3400019810 Cast argument to isspace to 'unsigned char'. Otherwise, if base char
type is signed, and a specific value is 8-bit and so negative,
we get implicit char->int conversion that does sign-extending. However,
the 'isspace' function requires that the value be either representable in
'unsigned char', or be EOF.


[SVN r31765]
2005-11-24 09:25:38 +00:00
Vladimir Prus
e1d38380f4 Allow to query the type of options:
- add new class typed_value_base, with "value_type" method
- derived typed_value from typed_value_base

Idea from Giuseppe Vacanti.


[SVN r31752]
2005-11-23 09:14:02 +00:00
Vladimir Prus
f2e43384fb Note that positional options must be still registered.
[SVN r31740]
2005-11-22 12:43:23 +00:00
Vladimir Prus
78f209eb0b Add test for unregisted options on the command_line_parser level.
[SVN r31614]
2005-11-10 08:15:44 +00:00
Vladimir Prus
e7e1550269 Add 'extra_style_parser' method to basic_command_line_parser. Previously
this functionality was not available to use user due to private
derivation from detail::cmdline.


[SVN r31491]
2005-10-27 09:42:13 +00:00
Vladimir Prus
a00a6c9d19 Really make unregistered options to work.
- Add forwarding method allow_unregistered to the basic_command_line parser
  class.
- Add new 'collect_unrecognized' function
- Add new field 'original_tokens' to the basic_option class


[SVN r31490]
2005-10-27 09:20:16 +00:00
John Maddock
84cc0d2972 Large patch from Ulrich Eckhardt to fix support for EVC++ 4.
[SVN r30670]
2005-08-25 16:27:28 +00:00
Dave Abrahams
d43c947002 Fix broken link
[SVN r30559]
2005-08-12 19:49:30 +00:00
Douglas Gregor
e6e1ef29db Fixup uses of max
[SVN r30059]
2005-07-13 16:32:41 +00:00
Markus Schöpflin
78c3d90280 Fixed previous checkin.
[SVN r29621]
2005-06-16 13:23:17 +00:00
Markus Schöpflin
2f17c3b9b9 Added workaround for Tru64/CXX, getline() is not defined in <string> when
compiling in strict ansi mode. This is a bug in the string header file.


[SVN r29617]
2005-06-16 12:49:32 +00:00
Vladimir Prus
a78a1f0d76 Unroll 'make parse_command_line' const-correct patch, because it causes too
much troubles. Basically, consider;

    char* cmdline3_[1] = {};

    template<class charT>
    void func(const charT* const argv[]) {}

    int main()
    {
        func(cmdline3_);
        char** p = cmdline3_;
        func(p);
    }

EDG compilers can't deduce template argument in the first call. See
http://thread.gmane.org/gmane.comp.lib.boost.devel/125396 for details.
Some other compilers (borland, vc 7.0) see to be have this issue too.


[SVN r29615]
2005-06-16 10:44:23 +00:00
Vladimir Prus
5af27a78e7 Use boost::throw_exception instead just throw_exception. Otherwise, borland
"forgets" to generate code for the function call.


[SVN r29614]
2005-06-16 10:29:49 +00:00
Vladimir Prus
de511c601a Make install target explicit. Otherwise top-level Jamfile will try to
install both results of 'boost_program_options' and of the install target,
resulting in duplicate target error.


[SVN r29604]
2005-06-16 07:51:56 +00:00
Vladimir Prus
f88e0a9572 Attempt to fix VC7 parse error.
[SVN r29400]
2005-06-03 10:38:24 +00:00
Vladimir Prus
1fec99d686 Fix library target naming.
Patch from Jurgen Hunold.


[SVN r29246]
2005-05-27 15:15:05 +00:00
John Maddock
da4baad235 Added qualifier to cmdline type to fix Borland failures.
[SVN r28987]
2005-05-17 11:44:44 +00:00
Rene Rivera
0c1332a0d3 Some compilers don't support, or make it hard to use, source relative includes. So avoid them.
[SVN r28920]
2005-05-15 06:32:18 +00:00
Markus Schöpflin
4fab784453 Fixed failure for 64 bit platforms.
[SVN r28860]
2005-05-13 11:48:09 +00:00
Vladimir Prus
274cd2e682 Fix ambiguity between 'std::detail' and 'program_options::detail' on cw.
[SVN r28692]
2005-05-06 08:13:32 +00:00
Vladimir Prus
b5bc8b4fcb Add test for unregisted options.
[SVN r28691]
2005-05-06 08:12:27 +00:00
Vladimir Prus
6b57600a81 Finally make 'allow_unregistered' method of cmdline work.
[SVN r28689]
2005-05-06 07:48:45 +00:00
Vladimir Prus
9a149beb76 Fix 'unknown option' error for two successive calls to 'store'.
The bug triggered if
- we store two parsed_option object into variables_map
- the options descriptions associated with those parsed_option objects
  are different
- an option present in first parser_option object is not declared in
  second options_description.

The problem was that on the second 'store' call we went over all
stored options, trying to get their description from the *second*
options description object.

Thanks to Hartmut Kaiser for the bug report.


[SVN r28685]
2005-05-06 06:40:39 +00:00
Hartmut Kaiser
dc9097c3d0 Make the True64 compiler happy.
[SVN r28663]
2005-05-05 16:50:41 +00:00
Vladimir Prus
d4748e8153 Fix a regression -- the if the 'style' argument to parse_command_line
function was zero, it was interpreted as no style is suppored. Previously,
it was interpreted as default_styles. Also, remove 'style' argument from
'cmdline' constructors.


[SVN r28500]
2005-04-27 07:02:39 +00:00
Vladimir Prus
efc9712f70 Check for invalid options in vector<option> returned by extra style
parser or additional parser.


[SVN r28468]
2005-04-25 09:06:44 +00:00
Vladimir Prus
239deeb456 Fix positional options.
[SVN r28467]
2005-04-25 06:39:34 +00:00
Rene Rivera
2476e5b265 Fix use of *DYN_LIB=1 defines.
Add dist-lib target to put results in a convenient place.


[SVN r28461]
2005-04-24 17:17:09 +00:00
Rene Rivera
f5bba0a918 Add missing define to make the code export symbols when creating a DLL.
[SVN r28440]
2005-04-23 16:37:48 +00:00
Vladimir Prus
94d186836e Derive basic_command_line_parser from cmdline.
Eliminate 'common_command_line_parser'.


[SVN r28419]
2005-04-22 15:32:23 +00:00
Vladimir Prus
6565cbc334 Revive 'additional parser'.
[SVN r28415]
2005-04-22 14:05:17 +00:00
Vladimir Prus
c984d59de1 Refactor the command line parser so that it uses options_description,
as opposed to having his own data structures. Clean up option description
classes a bit, removing unneeded methods. Remove support for 'implicit'
options.


[SVN r28413]
2005-04-22 13:35:45 +00:00
Vladimir Prus
07778adab7 Use direct cast from any to reference, recently introduced in CVS.
[SVN r28411]
2005-04-22 12:56:15 +00:00
Vladimir Prus
d78ebf5f0e Don't force static linking on NT.
[SVN r28334]
2005-04-20 11:25:16 +00:00
Hartmut Kaiser
7b23670e4d Improved readability in certain cases.
[SVN r27896]
2005-03-31 06:55:01 +00:00
Vladimir Prus
cb9bd037d9 Fix 64-bit portability problem.
Patch from Jonathan Wakely. Original explanation follows:

   The attached patch fixes a 64 bit portability problem where
   std::string::size_type is assigned to unsigned, which is shorter
   than size_t on x86-64 and so will be truncated. This means the
   following comparison to std::string::npos is always false.


[SVN r27772]
2005-03-23 11:11:55 +00:00
Vladimir Prus
c2442fcad6 Remove a couple of unused option_description members.
[SVN r27494]
2005-02-24 12:57:07 +00:00
Vladimir Prus
e5a143e2c5 Update BOOST_CHECK_EQUAL_COLLECTIONS usage to the current version of
Boost.Test.


[SVN r27417]
2005-02-18 11:11:11 +00:00
Vladimir Prus
58d35a27b9 Change "throw" to "throw_exception".
[SVN r27398]
2005-02-16 09:03:19 +00:00
Vladimir Prus
69d2f8fb21 Use "const char * const []" for parameters which take command line.
[SVN r27397]
2005-02-16 08:09:36 +00:00
Vladimir Prus
cedd6570fd Patches for IRIX MIPSPro. See
https://sourceforge.net/tracker/?func=detail&atid=307586&aid=1115576&group_id=7586


[SVN r27269]
2005-02-09 09:06:45 +00:00
Vladimir Prus
065b0a4a9d Correct example usage of positional_options_description::add.
[SVN r27218]
2005-02-07 14:27:20 +00:00
Stefan Slapeta
fc423bf6bc Replaced BOOST_TEST*
[SVN r27052]
2005-02-03 12:45:59 +00:00
Vladimir Prus
a9c3f21021 Remove a couple of potentially confusing sentences.
[SVN r26839]
2005-01-24 16:03:26 +00:00
Vladimir Prus
f27dce4ed4 Initial docs for text formatting rules.
[SVN r26785]
2005-01-21 16:11:26 +00:00