mirror of
https://github.com/curl/curl.git
synced 2026-08-26 06:23:32 +03:00
tool_writeout: bsearch the variable name
As the list of variable names grows, doing a simple loop to find the name get increasingly worse. This switches to a bsearch. Also: do a case sensitive check for the variable name. The names have not been documented to be case insensitive and there is no point in having them so. Closes #13914
This commit is contained in:
parent
374d178f14
commit
4464c9f2c6
5 changed files with 78 additions and 59 deletions
|
|
@ -30,6 +30,7 @@ int jsonquoted(const char *in, size_t len,
|
|||
struct curlx_dynbuf *out, bool lowercase);
|
||||
|
||||
void ourWriteOutJSON(FILE *stream, const struct writeoutvar mappings[],
|
||||
size_t nentries,
|
||||
struct per_transfer *per, CURLcode per_result);
|
||||
void headerJSON(FILE *stream, struct per_transfer *per);
|
||||
void jsonWriteString(FILE *stream, const char *in, bool lowercase);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue