Move the job of converting provided coeffects to ambient coeffects from callee to...
[hiphop-php.git] / hphp / zend / zend-printf.h
blob51e89ea20420e75838963b9b72f4fd6325c6dcbc
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
6 | Copyright (c) 1998-2010 Zend Technologies Ltd. (http://www.zend.com) |
7 +----------------------------------------------------------------------+
8 | This source file is subject to version 2.00 of the Zend license, |
9 | that is bundled with this package in the file LICENSE, and is |
10 | available through the world-wide-web at the following url: |
11 | http://www.zend.com/license/2_00.txt. |
12 | If you did not receive a copy of the Zend license and are unable to |
13 | obtain it through the world-wide-web, please send a note to |
14 | license@zend.com so we can mail you a copy immediately. |
15 +----------------------------------------------------------------------+
18 #ifndef incl_HPHP_ZEND_ZEND_PRINTF_H_
19 #define incl_HPHP_ZEND_ZEND_PRINTF_H_
21 #include <sys/types.h>
22 #include <stdarg.h>
24 // The "php_gcvt" and "php_conv_fp" functions assume that their "buf" argument
25 // point to at least this many (minus 1 for the latter) bytes of memory.
26 #define NUM_BUF_SIZE 500
28 namespace HPHP {
29 ///////////////////////////////////////////////////////////////////////////////
31 char *php_gcvt(double value, int ndigit, char dec_point, char exponent,
32 char *buf);
33 char *php_conv_fp(char format, double num, bool add_dp, int precision,
34 char dec_point, int *is_negative, char *buf, int *len);
36 // XXX: vspprintf and spprintf have slightly different semantics and flags than
37 // C99 printf (because PHP) so we can't annotate them with ATTRIBUTE_PRINTF
39 int vspprintf(char **pbuf, size_t max_len, const char *format, ...);
40 int vspprintf_ap(char **pbuf, size_t max_len, const char *format, va_list ap);
41 int spprintf(char **pbuf, size_t max_len, const char *format, ...);
43 ///////////////////////////////////////////////////////////////////////////////
46 #endif // incl_HPHP_ZEND_ZEND_PRINTF_H_