Commit Graph

6 Commits

Author SHA1 Message Date
Dave Reisner d8c04909fa src/tool: allow timeouts to accept decimal values
Implement wrappers around strtod to convert the user argument to a
double with sane error checking. Use this to allow --max-time and
--connect-timeout to accept decimal values instead of strictly integers.

The manpage is updated to make mention of this feature and,
additionally, forewarn that the actual timeout of the operation can
vary in its precision (particularly as the value increases in its
decimal precision).
2013-07-14 23:04:05 +02:00
Yang Tse 79954a1b07 avoid mixing of enumerated type with another type 2012-11-26 16:23:48 +01:00
Daniel Stenberg f2b6ebed7b cmdline: parse numerical options stricter
1 - str2offset() no longer accepts negative numbers since offsets are by
nature positive.

2 - introduced str2unum() for the command line parser that accepts
numericals which are not supposed to be negative, so that it will
properly complain on apparent bad uses and mistakes.

Bug: http://curl.haxx.se/mail/archive-2012-07/0013.html
2012-07-10 23:11:30 +02:00
Yang Tse 919c97fa65 curl tool: use configuration files from lib directory
Configuration files such as curl_config.h and all config-*.h no longer exist
nor are generated/copied into 'src' directory, now these only exist in 'lib'
directory from where curl tool sources uses them.

Additionally old src/setup.h has been refactored into src/tool_setup.h which
now pulls lib/setup.h

The possibility of a makefile needing an include path adjustment exists.
2012-04-06 23:37:05 +02:00
Yang Tse 5bf0d74120 curl tool: OOM handling fixes 2011-10-05 15:06:26 +02:00
Yang Tse 49b79b7631 curl tool: code moved to tool_*.[ch] files 2011-10-05 00:03:58 +02:00