README.curlx 2.0 KB

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