1 _ _ ____ _ 2 ___| | | | _ \| | 3 / __| | | | |_) | | 4 | (__| |_| | _ <| |___ 5 \___|\___/|_| \_\_____| 6 7 Source Code Functions Apps Might Use 8 ==================================== 9 10The libcurl source code offers a few functions by source only. They are not 11part of the official libcurl API, but the source files might be useful for 12others so apps can optionally compile/build with these sources to gain 13additional functions. 14 15We provide them through a single header file for easy access for apps: 16"curlx.h" 17 18 curlx_strtoofft() 19 20 A macro that converts a string containing a number to a curl_off_t number. 21 This might use the curlx_strtoll() function which is provided as source 22 code in strtoofft.c. Note that the function is only provided if no 23 strtoll() (or equivalent) function exist on your platform. If curl_off_t 24 is only a 32 bit number on your platform, this macro uses strtol(). 25 26 curlx_tvnow() 27 28 returns a struct timeval for the current time. 29 30 curlx_tvdiff() 31 32 returns the difference between two timeval structs, in number of 33 milliseconds. 34 35 curlx_tvdiff_secs() 36 37 returns the same as curlx_tvdiff but with full usec resolution (as a 38 double) 39 40FUTURE 41====== 42 43 Several functions will be removed from the public curl_ name space in a 44 future libcurl release. They will then only become available as curlx_ 45 functions instead. To make the transition easier, we already today provide 46 these functions with the curlx_ prefix to allow sources to get built properly 47 with the new function names. The functions this concerns are: 48 49 curlx_getenv 50 curlx_strequal 51 curlx_strnequal 52 curlx_mvsnprintf 53 curlx_msnprintf 54 curlx_maprintf 55 curlx_mvaprintf 56 curlx_msprintf 57 curlx_mprintf 58 curlx_mfprintf 59 curlx_mvsprintf 60 curlx_mvprintf 61 curlx_mvfprintf 62