Skip to content

curl: display --version features sorted alphabetically - #3611

Closed
bagder wants to merge 2 commits into
masterfrom
bagder/curl-sorted-features
Closed

bagder wants to merge 2 commits into
masterfrom
bagder/curl-sorted-features

Conversation

@bagder

@bagder bagder commented Feb 25, 2019

Copy link
Copy Markdown
Member

No description provided.

@bagder
bagder force-pushed the bagder/curl-sorted-features branch from ee46bd5 to 9f1fd7b Compare February 25, 2019 12:40
Comment thread src/tool_help.c
#elif defined(HAVE_STRCMPI)
return strcmpi(* (char * const *) p1, * (char * const *) p2);
#else
return strcmp(* (char * const *) p1, * (char * const *) p2);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to always use the least common denominator in order to make the output consistent across plattforms?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe. I'm not sure how common the case is without a case sensitive function here.

I think sorting it case sensitively makes it look funny since the lowercase features end up last.

I first wanted to use curl_strequal for this, but it doesn't offer the correct return code so we can't use that. (and I didn't feel like refactor everything to make such a version available)

An alternative could be to always specify features with an uppercase first letter to sort of shortcut this, but then I think "Libz" looks odd...

@bagder bagder closed this in 6cc6a44 Feb 27, 2019
@bagder
bagder deleted the bagder/curl-sorted-features branch February 27, 2019 07:15
@lock lock Bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

2 participants