summaryrefslogtreecommitdiff
path: root/wsutil/strtoi.h
AgeCommit message (Collapse)AuthorFilesLines
2016-10-22wsutil: add statements for c++ calls.Dario Lombardo1-0/+8
Change-Id: I082eb462b0a6ce77f9ca82c51d79d65516c92b53 Reviewed-on: https://code.wireshark.org/review/18401 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-16Add ws_hexstrtou{bits} and use ws_hexstrtou32 in androiddump.Guy Harris1-1/+19
Make the reply length unsigned - there's no reason for it to be signed. Change-Id: I5f4d1f027eeddee939547c052220efb89800f4b1 Reviewed-on: https://code.wireshark.org/review/17740 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-12Let strtoi with NULL endptr require no invalid charactersPeter Wu1-3/+5
If the caller is not interested in checking its end, then it probably wants a valid number only if the string contains a valid number. Add a shortcut for this. Change-Id: I39701bd445e29fb2606720b18ca3764c74a7255b Reviewed-on: https://code.wireshark.org/review/17658 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-09-07Make the ws_strto* routines more like the strto* routines.Guy Harris1-8/+10
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>
2016-09-05wsutil: add string to integer conversion utilities.Dario Lombardo1-0/+63
In the current code many functions have been used for convertion (strtol, atoi, g_ascii_strtoll, etc). Those utilities want to be the only, shared, way to convert integers. Change-Id: I22ba1bf54e144e73a4728612a4437de5a2d339e2 Reviewed-on: https://code.wireshark.org/review/17414 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Dario Lombardo <lomato@gmail.com>