1 /*****************************************************************************
3 * Project ___| | | | _ \| |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
8 * The contents of this file are subject to the Mozilla Public License
9 * Version 1.0 (the "License"); you may not use this file except in
10 * compliance with the License. You may obtain a copy of the License at
11 * http://www.mozilla.org/MPL/
13 * Software distributed under the License is distributed on an "AS IS"
14 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
15 * License for the specific language governing rights and limitations
18 * The Original Code is Curl.
20 * The Initial Developer of the Original Code is Daniel Stenberg.
22 * Portions created by the Initial Developer are Copyright (C) 1998.
23 * All Rights Reserved.
25 * ------------------------------------------------------------
27 * - Daniel Stenberg <Daniel.Stenberg@haxx.nu>
31 * $Source: /cvsroot/curl/curl/lib/version.c,v $
32 * $Revision: 1.1.1.1 $
33 * $Date: 1999-12-29 14:21:42 $
38 * ------------------------------------------------------------
39 ****************************************************************************/
45 #include <curl/curl.h>
48 char *curl_version(void)
50 static char version
[200];
52 #if defined(USE_SSLEAY)
55 strcpy(version
, LIBCURL_NAME
" " LIBCURL_VERSION
);
56 ptr
=strchr(version
, '\0');
60 #if (SSLEAY_VERSION_NUMBER >= 0x900000)
61 sprintf(ptr
, " (SSL %x.%x.%x)",
62 (SSLEAY_VERSION_NUMBER
>>28)&0xff,
63 (SSLEAY_VERSION_NUMBER
>>20)&0xff,
64 (SSLEAY_VERSION_NUMBER
>>12)&0xf);
66 if(SSLEAY_VERSION_NUMBER
&0x0f) {
67 sub
[0]=(SSLEAY_VERSION_NUMBER
&0x0f) + 'a' -1;
72 sprintf(ptr
, " (SSL %x.%x.%x%s)",
73 (SSLEAY_VERSION_NUMBER
>>12)&0xff,
74 (SSLEAY_VERSION_NUMBER
>>8)&0xf,
75 (SSLEAY_VERSION_NUMBER
>>4)&0xf, sub
);
78 ptr
=strchr(ptr
, '\0');
82 sprintf(ptr
, " (zlib %s)", zlibVersion());