The sscanf() was always too complex for my little mind, so I either used atoi() or even open-coded it. The scariest code is the one that generates a format string of sscanf() on the fly from protocol headers.
@pro @Mae sscanf() is just too easy to mess up, which is why we are deprecating use of it in curl, and we will eventually ban it completely. Just a few remaining ones now to convert
@thomas_klopf it is just a function that is easy to get wrong and it has subtle side-effects that even seasoned developers have a hard time to be on top of, so we get rid of those calls as a precaution. To make sure our parsers do exactly what we want them to.
@beaufils more manual parsing and case by case specific fixes. For the final few replacements I'm introducing a small internal "framework" to ease some string parsing: github.com/curl/curl/pull/1569…
Designed to aid converting off from sscanf parsers. sscanf is hard to use right, easy to mess up and often makes for sloppy error checking.
The new parsers allow more exact and pedandic parsing.
Th...
Mae
in reply to daniel:// stenberg:// • • •daniel:// stenberg://
in reply to Mae • • •Account: Computers
in reply to daniel:// stenberg:// • • •daniel:// stenberg://
in reply to Account: Computers • • •Lord Tom Klopf of CZ
in reply to daniel:// stenberg:// • • •daniel:// stenberg://
in reply to Lord Tom Klopf of CZ • • •Lord Tom Klopf of CZ
in reply to daniel:// stenberg:// • • •chipiguay - Pablo 😴
in reply to daniel:// stenberg:// • • •Bruno BEAUFILS
in reply to daniel:// stenberg:// • • •daniel:// stenberg://
in reply to Bruno BEAUFILS • • •strparse: string parsing helper functions by bagder · Pull Request #15692 · curl/curl
GitHubBruno BEAUFILS
in reply to daniel:// stenberg:// • • •Thank's.
I like the way your strparse.c helpers are thought. I loved to have that much discipline when writing C code.
folkert van heusden
in reply to daniel:// stenberg:// • • •Sensitive content
daniel:// stenberg://
in reply to folkert van heusden • • •