1 | /* |
2 | +----------------------------------------------------------------------+ |
3 | | PHP Version 5 | |
4 | +----------------------------------------------------------------------+ |
5 | | Copyright (c) 1997-2015 The PHP Group | |
6 | +----------------------------------------------------------------------+ |
7 | | This source file is subject to version 3.01 of the PHP license, | |
8 | | that is bundled with this package in the file LICENSE, and is | |
9 | | available through the world-wide-web at the following url: | |
10 | | http://www.php.net/license/3_01.txt | |
11 | | If you did not receive a copy of the PHP license and are unable to | |
12 | | obtain it through the world-wide-web, please send a note to | |
13 | | license@php.net so we can mail you a copy immediately. | |
14 | +----------------------------------------------------------------------+ |
15 | | Author: Marcus Boerger <helly@php.net> | |
16 | +----------------------------------------------------------------------+ |
17 | */ |
18 | |
19 | /* $Id$ */ |
20 | |
21 | /* |
22 | |
23 | The pbuf parameter of all spprintf version receives a pointer to the allocated |
24 | buffer. This buffer must be freed manually after usage using efree() function. |
25 | The buffer will always be terminated by a zero character. When pbuf is NULL |
26 | the function can be used to calculate the required size of the buffer but for |
27 | that purpose snprintf is faster. When both pbuf and the return value are 0 |
28 | than you are out of memory. |
29 | |
30 | There is also snprintf: See difference explained in snprintf.h |
31 | |
32 | */ |
33 | |
34 | #ifndef SPPRINTF_H |
35 | #define SPPRINTF_H |
36 | |
37 | #include "snprintf.h" |
38 | |
39 | BEGIN_EXTERN_C() |
40 | PHPAPI int spprintf( char **pbuf, size_t max_len, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4); |
41 | |
42 | PHPAPI int vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap) PHP_ATTRIBUTE_FORMAT(printf, 3, 0); |
43 | END_EXTERN_C() |
44 | |
45 | #endif /* SNPRINTF_H */ |
46 | |
47 | /* |
48 | * Local variables: |
49 | * tab-width: 4 |
50 | * c-basic-offset: 4 |
51 | * End: |
52 | */ |
53 | |