mprintf.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /***************************************************************************
  2. * _ _ ____ _
  3. * Project ___| | | | _ \| |
  4. * / __| | | | |_) | |
  5. * | (__| |_| | _ <| |___
  6. * \___|\___/|_| \_\_____|
  7. *
  8. * Copyright (C) 1998 - 2004, Daniel Stenberg, <[email protected]>, et al.
  9. *
  10. * This software is licensed as described in the file COPYING, which
  11. * you should have received as part of this distribution. The terms
  12. * are also available at http://curl.haxx.se/docs/copyright.html.
  13. *
  14. * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. * copies of the Software, and permit persons to whom the Software is
  16. * furnished to do so, under the terms of the COPYING file.
  17. *
  18. * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. * KIND, either express or implied.
  20. *
  21. * $Id$
  22. ***************************************************************************/
  23. #ifndef H_MPRINTF
  24. #define H_MPRINTF
  25. #include <stdarg.h>
  26. #include <stdio.h> /* needed for FILE */
  27. int curl_mprintf(const char *format, ...);
  28. int curl_mfprintf(FILE *fd, const char *format, ...);
  29. int curl_msprintf(char *buffer, const char *format, ...);
  30. int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...);
  31. int curl_mvprintf(const char *format, va_list args);
  32. int curl_mvfprintf(FILE *fd, const char *format, va_list args);
  33. int curl_mvsprintf(char *buffer, const char *format, va_list args);
  34. int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args);
  35. char *curl_maprintf(const char *format, ...);
  36. char *curl_mvaprintf(const char *format, va_list args);
  37. #ifdef _MPRINTF_REPLACE
  38. # define printf curl_mprintf
  39. # define fprintf curl_mfprintf
  40. # define sprintf curl_msprintf
  41. # define snprintf curl_msnprintf
  42. # define vprintf curl_mvprintf
  43. # define vfprintf curl_mvfprintf
  44. # define vsprintf curl_mvsprintf
  45. # define vsnprintf curl_mvsnprintf
  46. # define aprintf curl_maprintf
  47. # define vaprintf curl_mvaprintf
  48. #endif
  49. #endif /* H_MPRINTF */