Make the ws_strto* routines more like the strto* routines.
authorGuy Harris <guy@alum.mit.edu>
Wed, 7 Sep 2016 17:43:15 +0000 (10:43 -0700)
committerGuy Harris <guy@alum.mit.edu>
Wed, 7 Sep 2016 20:41:53 +0000 (20:41 +0000)
commitc7fc2802221877d939bb939f04766a5a30cfdb9f
tree7762d3a9dbf0cd8caffdfed880ce576c3e5cb1cd
parenta66aa4c9c90017f0c03412b02a2be2b2cef3ac5d
Make the ws_strto* routines more like the strto* routines.

Not all uses of atoi() or various strto* routines in Wireshark expect
the string to contain *only* a number, so not all uses should require
that the byte after the number be a '\0'.  Have the ws_strto* routines
take a "pointer a pointer set to point to the character after the
number" argument, and have the callers do the appropriate checks of the
character after that.

This fixes the VMS trace reading code so that it can read those files
again.

The get_ routines are handed command-line arguments, so they *do* expect
the string to contain only a number; have them check to make sure the
byte after the number is a '\0'.

Change-Id: I46fc1bea7912b9278e385fe38491a0a2ad60d697
Reviewed-on: https://code.wireshark.org/review/17560
Reviewed-by: Guy Harris <guy@alum.mit.edu>
wiretap/vms.c
wsutil/clopts_common.c
wsutil/strtoi.c
wsutil/strtoi.h