The most convenient method would probably be to use %n - which gives you the number of characters converted so far. So if you put a %n at the end of the normal input, you should get a number matching the length of the string [give or take, if there are spaces on the end of the string, you may not get the spaces processed - so you may have to either strip trailing spaces or check if the remaining part of the string is only whitespace].
By the way,
Code:
if (inx = sscanf( buffer, "%lf%*c%s", &parse_struct->value, parse_struct->name ) != 2 )
doesn't do what I think you think it does. It assigns inx with
Code:
(sscanf( buffer, "%lf%*c%s", &parse_struct->value, parse_struct->name ) != 2 )
, which is either 0 (if sscanf returned something other than 2) or 1 (if sscanf returns 2). You probably expected to get 2 out of inx when the input is consumed correctly. To do that, you would have to add extra parenthesis to make the assignment happen before the check of not-equal-to 2.
--
Mats