Commit Graph

82 Commits

Author SHA1 Message Date
Vladimir Prus
cbe799d914 Ignore unregisted options in 'store'.
[SVN r32264]
2006-01-09 09:44:44 +00:00
Vladimir Prus
5e4b39d672 Fix SF bug 1395874. When both "all" and "all-chroots" options were registered
and "--all" was specified on command line and approximation was on,
ambiguity was reported. Now, "all" is recognized.


[SVN r32263]
2006-01-09 09:06:24 +00:00
Vladimir Prus
d8c809b0a3 Fix wide version of split_winmain.
Patch from Tilman Sohr.


[SVN r32262]
2006-01-09 08:42:26 +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
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
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
Douglas Gregor
e6e1ef29db Fixup uses of max
[SVN r30059]
2005-07-13 16:32:41 +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
Markus Schöpflin
4fab784453 Fixed failure for 64 bit platforms.
[SVN r28860]
2005-05-13 11:48:09 +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
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
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
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
58d35a27b9 Change "throw" to "throw_exception".
[SVN r27398]
2005-02-16 09:03:19 +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
c3e02a2b0a Merge the utf8 workaround in program_options and serialization and
put the result to boost/detail and libs/detail.


[SVN r26758]
2005-01-20 08:49:13 +00:00
Vladimir Prus
934e96dcef Workaround for borland
[SVN r26757]
2005-01-20 07:29:17 +00:00
Vladimir Prus
87558bfe7c Added wordwrapping and improved intentation for options_description
output.

Patch from Bertolt Mildner.


[SVN r26679]
2005-01-12 12:05:47 +00:00
Vladimir Prus
87b4fff3e2 Fix missing includes.
Patch from Graham Bennett.


[SVN r26677]
2005-01-12 10:50:32 +00:00
Vladimir Prus
a00373eec5 Better way to supress the warning
[SVN r26276]
2004-11-23 12:25:20 +00:00
Vladimir Prus
4394406aeb Suppress gcc warning in release mode.
Thanks to Jody Hagins for the report.


[SVN r26274]
2004-11-23 07:31:13 +00:00
Vladimir Prus
9bd7193660 Make program_options compile on IBM compiler.
Patch from Matthias Troyer.


[SVN r26096]
2004-11-03 07:11:45 +00:00
Vladimir Prus
97b337c1ce MinGW-no-wstring workaround
[SVN r25292]
2004-09-21 06:20:02 +00:00
Vladimir Prus
074c154d18 Fix a recently introduces failure of unicode_test. I was trying
to form an argument to logic_error using wstring, which did not work. Now
try to convert wstring into local 8-bit encoding, and use a dummy text
when that fails.


[SVN r25242]
2004-09-20 06:14:18 +00:00
Vladimir Prus
ca1531d210 Improve the error reporting for invalid option values. Now the
'validation_error' exception allows to set the name of the option, and the
what() method uses the name to generate better message.


[SVN r25141]
2004-09-16 07:10:27 +00:00
Vladimir Prus
89a7168a42 Typo
[SVN r25106]
2004-09-15 09:56:53 +00:00
Vladimir Prus
44d5ba98c1 Improve 'bool_switch' -- don't accept any argument on the command line.
Allow to set 'zero_tokens' flag for the typed_value type.


[SVN r25105]
2004-09-15 09:49:00 +00:00
Vladimir Prus
80ecc439cf Try to fix Comeau problems.
[SVN r24741]
2004-08-26 10:07:39 +00:00
Vladimir Prus
2db987de85 Don't even compiler utf8_codecvt_facet.cpp when wstring is not available.
This avoids link errors on mingw.


[SVN r24740]
2004-08-26 09:37:53 +00:00
Vladimir Prus
b4192e34b9 Another set of doc/comment edits from Charles.
[SVN r24657]
2004-08-23 10:18:09 +00:00
Vladimir Prus
a2946c45fa Workaround lack of WCHAR_MAX on FreeBSD. Patch from Jonathan Wakely.
[SVN r23947]
2004-07-22 09:42:45 +00:00
Vladimir Prus
138d959d68 Don't instantiate std::vector with incomplete type, this is not allowed.
Thanks to Jonathan Wakely for the report.


[SVN r23942]
2004-07-22 07:39:34 +00:00
Vladimir Prus
2aa09ac7b2 Fix the utf8_codecvt::do_length declaration. Pointed out by Rene Rivera.
[SVN r23882]
2004-07-21 07:49:15 +00:00
Vladimir Prus
3e4531b71f Make the library compile on mingw, again. Thanks to Janusz Piwowarski for the
patch.


[SVN r23772]
2004-07-19 08:38:03 +00:00
Vladimir Prus
0cc6946235 Define environ on Comeau.
[SVN r23670]
2004-07-17 07:01:06 +00:00
Vladimir Prus
0535a47431 Replace string::push_back with string::operator+= for the sake on Intel.
[SVN r23669]
2004-07-17 06:58:38 +00:00
Vladimir Prus
bb4be6b636 VC fixes:
- use ispace, not std::ispace
- include <cctype> (noted by Hartmut Kaiser)


[SVN r23621]
2004-07-16 09:36:36 +00:00
Vladimir Prus
6f49b5b999 Patch from John Maddock for platforms without wchar_t support, specifically
cygwin.


[SVN r23576]
2004-07-15 11:40:26 +00:00
Vladimir Prus
9133a2e903 Added 'split_winmain' function.
[SVN r23550]
2004-07-14 15:57:02 +00:00
Vladimir Prus
6dcf98d974 Don't declare environ on WIN32 -- it's already defined in headers and second
definition cause warning about different dll linkage.


[SVN r23541]
2004-07-14 11:42:23 +00:00
Vladimir Prus
f084eeac4b Applied numerious suggestions from Pavel Vozenilek.
[SVN r23496]
2004-07-13 15:12:26 +00:00
Vladimir Prus
ee778af57c More declspecs
[SVN r23315]
2004-07-02 08:38:52 +00:00