version: add a feature names array to curl_version_info_data#9583
version: add a feature names array to curl_version_info_data#9583monnerat wants to merge 3 commits intocurl:masterfrom
Conversation
3adef61 to
34073e8
Compare
34073e8 to
3881d12
Compare
4eaf738 to
f9dfa20
Compare
docs/libcurl/curl_version_info.3
Outdated
There was a problem hiding this comment.
This mentions that features is deprecated, but the man page still only documents the bits in that bitmask. It says nothing about the potential names in feature_names that users of this function probably are very interested in. The list above should probably list both?
There was a problem hiding this comment.
Yes, I can do it. Note this means the man page will still have to be updated when a new feature is introduced.
There was a problem hiding this comment.
That was always the case. How is a user supposed to know what the feature means if it isn't documented?
There was a problem hiding this comment.
As features is deprecated, do you expect me to remove the bit definitions in the doc ?
There was a problem hiding this comment.
I think it is way too early for that. The documentation also needs to work as a resource for people reading existing code, and there will be code using these flags for the foreseeable future and then the documentation needs to describe them.
There was a problem hiding this comment.
I think it is way too early for that.
Then the doc should be ready now !
f9dfa20 to
3065804
Compare
docs/libcurl/curl_version_info.3
Outdated
There was a problem hiding this comment.
This is much better, but now you've duplicated the documentation for each feature, and they're not duplicated identically. I suggest we instead list each feature with both name and bitmask define name, and have one explanation for it.
There was a problem hiding this comment.
Can I drop descriptions of CURL_VERSION_CONV and CURL_VERSION_KERBEROS4? They're obsolete and have no associated name. Reason: I want to label descriptions by names and these are not named! Or do I associate a dummy name that can never occur :-( ?
There was a problem hiding this comment.
each feature with both name and bitmask define name, and have one explanation for it.
Done.
(I wish man had a built-in .TABLE macro!)
There was a problem hiding this comment.
Oops! It seems the new documentation format causes test 1177 to fail :-(
d777418 to
f3ce058
Compare
f3ce058 to
7c2de16
Compare
7c2de16 to
07d5d8e
Compare
5ec6880 to
5d08759
Compare
bagder
left a comment
There was a problem hiding this comment.
If libcurl returns more/other features in its name list than the list in tool_libinfo.c knows about, I assume they will still get output fine?
docs/libcurl/curl_version_info.3
Outdated
There was a problem hiding this comment.
Time past soooo fast !
docs/libcurl/symbols-in-versions
Outdated
src/tool_libinfo.c
Outdated
There was a problem hiding this comment.
This is not an actual feature is it?
There was a problem hiding this comment.
No it isn't. This is a leftover from local tests. Does not harm, but useless. Removed now.
5d08759 to
f8b8dc4
Compare
|
All your remarks taken into account now. Thanks for pointing on them.
Yes. the feature list is taken directly from the name array: https://github.com/curl/curl/blob/f8b8dc4113d4a3115e56933980b9ab0f76de32a8/src/tool_help.c#L177-L182 In case an old library does not provide the feature array, the later is built by the tool from the flags: |
f8b8dc4 to
ef124a8
Compare
Field feature_names contains a null-terminated sorted array of feature names. Bitmask field features is deprecated. Documentation is updated. Test 1177 and tests/version-scan.pl updated to match new documentation format and extended to check feature names too.
If the run-time libcurl is too old to support feature names, the name array is created locally from the bit masks. This is the only sequence left that uses feature bit masks.
ef124a8 to
ae33f69
Compare
If the run-time libcurl is too old to support feature names, the name array is created locally from the bit masks. This is the only sequence left that uses feature bit masks. Closes #9583
|
Thanks! |
New field
feature_namescontains a pointer to a null-terminated sorted array of feature names. Bitmask fieldfeaturesis deprecated.This will allow us to support more than 32 features.
Whether the
strcasecmp4sort() procedure should be moved to strcase.c is questionable.