curl-library
Re: curl_version_info() take 2
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 27 Sep 2002 11:33:50 +0200 (MET DST)
Date: Fri, 27 Sep 2002 11:33:50 +0200 (MET DST)
On Thu, 26 Sep 2002, Bjorn Reese wrote:
> How about something like this
>
> enum curl_version {
> CURL_VERSION, /* both version and version_num */
> CURL_VERSION_FEATURES,
> CURL_VERSION_SSL, /* both ssl_version and ssl_version_num */
> /* etc. */
> };
>
> uintmax_t curl_version(enum curl_version);
> const char *curl_version_name(enum curl_version);
Yeah, I'm more and more leaning towards this, even if it means having to add
two functions for the same underlying logical function. (And the numerical
one would have to be named curl_version_num() is curl_version() is already
occupied.)
Of course, the returned strings would have to be statics.
-- Daniel Stenberg -- curl related mails on curl related mailing lists please ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sfReceived on 2002-09-27