2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

util: New function ovs_scan().

This new function is essentially an implementation of sscanf() with
slightly different behavior (see the comment) that is more convenient for
Open vSwitch internal use.  Also, this implementation ought to work out of
the box on Windows, which has a defective sscanf() that lacks the 'hh'
modifier required to scan into a char variable.

Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2013-11-15 08:54:56 -08:00
parent 1af1ed8500
commit ed2232fc77
5 changed files with 982 additions and 1 deletions

View File

@@ -264,6 +264,8 @@ bool str_to_uint(const char *, int base, unsigned int *);
bool str_to_ulong(const char *, int base, unsigned long *);
bool str_to_ullong(const char *, int base, unsigned long long *);
bool ovs_scan(const char *s, const char *template, ...) SCANF_FORMAT(2, 3);
bool str_to_double(const char *, double *);
int hexit_value(int c);