toolkit/crashreporter/google-breakpad/src/third_party/curl/mprintf.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/crashreporter/google-breakpad/src/third_party/curl/mprintf.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,82 @@
     1.4 +#ifndef __CURL_MPRINTF_H
     1.5 +#define __CURL_MPRINTF_H
     1.6 +/***************************************************************************
     1.7 + *                                  _   _ ____  _
     1.8 + *  Project                     ___| | | |  _ \| |
     1.9 + *                             / __| | | | |_) | |
    1.10 + *                            | (__| |_| |  _ <| |___
    1.11 + *                             \___|\___/|_| \_\_____|
    1.12 + *
    1.13 + * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
    1.14 + *
    1.15 + * This software is licensed as described in the file COPYING, which
    1.16 + * you should have received as part of this distribution. The terms
    1.17 + * are also available at http://curl.haxx.se/docs/copyright.html.
    1.18 + *
    1.19 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
    1.20 + * copies of the Software, and permit persons to whom the Software is
    1.21 + * furnished to do so, under the terms of the COPYING file.
    1.22 + *
    1.23 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
    1.24 + * KIND, either express or implied.
    1.25 + *
    1.26 + * $Id: mprintf.h,v 1.16 2008-05-20 10:21:50 patrickm Exp $
    1.27 + ***************************************************************************/
    1.28 +
    1.29 +#include <stdarg.h>
    1.30 +#include <stdio.h> /* needed for FILE */
    1.31 +
    1.32 +#include "curl.h"
    1.33 +
    1.34 +#ifdef  __cplusplus
    1.35 +extern "C" {
    1.36 +#endif
    1.37 +
    1.38 +CURL_EXTERN int curl_mprintf(const char *format, ...);
    1.39 +CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...);
    1.40 +CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...);
    1.41 +CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength,
    1.42 +                               const char *format, ...);
    1.43 +CURL_EXTERN int curl_mvprintf(const char *format, va_list args);
    1.44 +CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args);
    1.45 +CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args);
    1.46 +CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength,
    1.47 +                                const char *format, va_list args);
    1.48 +CURL_EXTERN char *curl_maprintf(const char *format, ...);
    1.49 +CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
    1.50 +
    1.51 +#ifdef _MPRINTF_REPLACE
    1.52 +# undef printf
    1.53 +# undef fprintf
    1.54 +# undef sprintf
    1.55 +# undef vsprintf
    1.56 +# undef snprintf
    1.57 +# undef vprintf
    1.58 +# undef vfprintf
    1.59 +# undef vsnprintf
    1.60 +# undef aprintf
    1.61 +# undef vaprintf
    1.62 +# define printf curl_mprintf
    1.63 +# define fprintf curl_mfprintf
    1.64 +#ifdef CURLDEBUG
    1.65 +/* When built with CURLDEBUG we define away the sprintf() functions since we
    1.66 +   don't want internal code to be using them */
    1.67 +# define sprintf sprintf_was_used
    1.68 +# define vsprintf vsprintf_was_used
    1.69 +#else
    1.70 +# define sprintf curl_msprintf
    1.71 +# define vsprintf curl_mvsprintf
    1.72 +#endif
    1.73 +# define snprintf curl_msnprintf
    1.74 +# define vprintf curl_mvprintf
    1.75 +# define vfprintf curl_mvfprintf
    1.76 +# define vsnprintf curl_mvsnprintf
    1.77 +# define aprintf curl_maprintf
    1.78 +# define vaprintf curl_mvaprintf
    1.79 +#endif
    1.80 +
    1.81 +#ifdef  __cplusplus
    1.82 +}
    1.83 +#endif
    1.84 +
    1.85 +#endif /* __CURL_MPRINTF_H */

mercurial