Back to index

php5  5.3.10
spprintf.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Marcus Boerger <helly@php.net>                               |
00016    +----------------------------------------------------------------------+
00017  */
00018 
00019 /* $Id: spprintf.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 /*
00022 
00023 The pbuf parameter of all spprintf version receives a pointer to the allocated
00024 buffer. This buffer must be freed manually after usage using efree() function.
00025 The buffer will allways be terminated by a zero character. When pbuf is NULL
00026 the function can be used to calculate the required size of the buffer but for
00027 that purpose snprintf is faster. When both pbuf and the return value are 0
00028 than you are out of memory.
00029 
00030 There is also snprintf: See difference explained in snprintf.h
00031 
00032 */
00033 
00034 #ifndef SPPRINTF_H
00035 #define SPPRINTF_H
00036 
00037 #include "snprintf.h"
00038 
00039 BEGIN_EXTERN_C()
00040 PHPAPI int spprintf( char **pbuf, size_t max_len, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
00041 
00042 PHPAPI int vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap) PHP_ATTRIBUTE_FORMAT(printf, 3, 0);
00043 END_EXTERN_C()
00044 
00045 #endif /* SNPRINTF_H */
00046 
00047 /*
00048  * Local variables:
00049  * tab-width: 4
00050  * c-basic-offset: 4
00051  * End:
00052  */