build-mac/curl/mprintf.h
author Edouard Tisserant
Mon, 24 Aug 2015 17:23:37 +0200
changeset 340 ff99a398d872
child 531 a7cc26cc39f2
permissions -rw-r--r--
Added Xcode project for iOS build
Edouard@340
     1
#ifndef __CURL_MPRINTF_H
Edouard@340
     2
#define __CURL_MPRINTF_H
Edouard@340
     3
/***************************************************************************
Edouard@340
     4
 *                                  _   _ ____  _
Edouard@340
     5
 *  Project                     ___| | | |  _ \| |
Edouard@340
     6
 *                             / __| | | | |_) | |
Edouard@340
     7
 *                            | (__| |_| |  _ <| |___
Edouard@340
     8
 *                             \___|\___/|_| \_\_____|
Edouard@340
     9
 *
Edouard@340
    10
 * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
Edouard@340
    11
 *
Edouard@340
    12
 * This software is licensed as described in the file COPYING, which
Edouard@340
    13
 * you should have received as part of this distribution. The terms
Edouard@340
    14
 * are also available at http://curl.haxx.se/docs/copyright.html.
Edouard@340
    15
 *
Edouard@340
    16
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
Edouard@340
    17
 * copies of the Software, and permit persons to whom the Software is
Edouard@340
    18
 * furnished to do so, under the terms of the COPYING file.
Edouard@340
    19
 *
Edouard@340
    20
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
Edouard@340
    21
 * KIND, either express or implied.
Edouard@340
    22
 *
Edouard@340
    23
 ***************************************************************************/
Edouard@340
    24
Edouard@340
    25
#include <stdarg.h>
Edouard@340
    26
#include <stdio.h> /* needed for FILE */
Edouard@340
    27
Edouard@340
    28
#include "curl.h"
Edouard@340
    29
Edouard@340
    30
#ifdef  __cplusplus
Edouard@340
    31
extern "C" {
Edouard@340
    32
#endif
Edouard@340
    33
Edouard@340
    34
CURL_EXTERN int curl_mprintf(const char *format, ...);
Edouard@340
    35
CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...);
Edouard@340
    36
CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...);
Edouard@340
    37
CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength,
Edouard@340
    38
                               const char *format, ...);
Edouard@340
    39
CURL_EXTERN int curl_mvprintf(const char *format, va_list args);
Edouard@340
    40
CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args);
Edouard@340
    41
CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args);
Edouard@340
    42
CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength,
Edouard@340
    43
                                const char *format, va_list args);
Edouard@340
    44
CURL_EXTERN char *curl_maprintf(const char *format, ...);
Edouard@340
    45
CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
Edouard@340
    46
Edouard@340
    47
#ifdef _MPRINTF_REPLACE
Edouard@340
    48
# undef printf
Edouard@340
    49
# undef fprintf
Edouard@340
    50
# undef sprintf
Edouard@340
    51
# undef vsprintf
Edouard@340
    52
# undef snprintf
Edouard@340
    53
# undef vprintf
Edouard@340
    54
# undef vfprintf
Edouard@340
    55
# undef vsnprintf
Edouard@340
    56
# undef aprintf
Edouard@340
    57
# undef vaprintf
Edouard@340
    58
# define printf curl_mprintf
Edouard@340
    59
# define fprintf curl_mfprintf
Edouard@340
    60
# define sprintf curl_msprintf
Edouard@340
    61
# define vsprintf curl_mvsprintf
Edouard@340
    62
# define snprintf curl_msnprintf
Edouard@340
    63
# define vprintf curl_mvprintf
Edouard@340
    64
# define vfprintf curl_mvfprintf
Edouard@340
    65
# define vsnprintf curl_mvsnprintf
Edouard@340
    66
# define aprintf curl_maprintf
Edouard@340
    67
# define vaprintf curl_mvaprintf
Edouard@340
    68
#endif
Edouard@340
    69
Edouard@340
    70
#ifdef  __cplusplus
Edouard@340
    71
}
Edouard@340
    72
#endif
Edouard@340
    73
Edouard@340
    74
#endif /* __CURL_MPRINTF_H */