]> granicus.if.org Git - curl/commit
cmdline: parse numerical options stricter
authorDaniel Stenberg <daniel@haxx.se>
Tue, 10 Jul 2012 21:11:30 +0000 (23:11 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 10 Jul 2012 21:11:30 +0000 (23:11 +0200)
commitf2b6ebed7bfcfcbe65bcadbce1c5ae7e6134c11e
tree29ecfad1b06a38d9f05dbe01afda078edb705cc5
parente5843470e8a77d43604884cdf34ccf3f4799a7f5
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
src/tool_getparam.c
src/tool_getparam.h
src/tool_helpers.c
src/tool_paramhlp.c
src/tool_paramhlp.h