1999-12-18 03:51:39 +08:00
|
|
|
|
/*
|
|
|
|
|
+----------------------------------------------------------------------+
|
2004-01-08 16:18:22 +08:00
|
|
|
|
| PHP Version 5 |
|
1999-12-18 03:51:39 +08:00
|
|
|
|
+----------------------------------------------------------------------+
|
2011-01-01 10:17:06 +08:00
|
|
|
|
| Copyright (c) 1997-2011 The PHP Group |
|
1999-12-18 03:51:39 +08:00
|
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 20:51:34 +08:00
|
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
1999-12-18 03:51:39 +08:00
|
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-11 04:04:29 +08:00
|
|
|
|
| available through the world-wide-web at the following url: |
|
2006-01-01 20:51:34 +08:00
|
|
|
|
| http://www.php.net/license/3_01.txt |
|
1999-12-18 03:51:39 +08:00
|
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
|
|
|
|
+----------------------------------------------------------------------+
|
2002-02-28 16:29:35 +08:00
|
|
|
|
| Author: Jaakko Hyv<EFBFBD>tti <jaakko.hyvatti@iki.fi> |
|
1999-12-18 03:51:39 +08:00
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdarg.h>
|
2004-11-16 05:04:09 +08:00
|
|
|
|
#include "php.h"
|
|
|
|
|
#ifdef PHP_WIN32
|
|
|
|
|
#include "config.w32.h"
|
2003-01-03 20:48:14 +08:00
|
|
|
|
#else
|
2005-01-10 05:05:06 +08:00
|
|
|
|
#include <php_config.h>
|
2003-01-03 20:48:14 +08:00
|
|
|
|
#endif
|
1999-12-18 03:51:39 +08:00
|
|
|
|
|
2004-11-16 05:04:09 +08:00
|
|
|
|
PHPAPI int
|
1999-12-18 03:51:39 +08:00
|
|
|
|
php_sprintf (char*s, const char* format, ...)
|
|
|
|
|
{
|
|
|
|
|
va_list args;
|
2004-12-17 21:08:44 +08:00
|
|
|
|
int ret;
|
1999-12-18 03:51:39 +08:00
|
|
|
|
|
|
|
|
|
va_start (args, format);
|
|
|
|
|
s[0] = '\0';
|
|
|
|
|
ret = vsprintf (s, format, args);
|
|
|
|
|
va_end (args);
|
2009-05-14 16:21:54 +08:00
|
|
|
|
return (ret < 0) ? -1 : ret;
|
1999-12-18 03:51:39 +08:00
|
|
|
|
}
|
|
|
|
|
|
2001-06-05 21:12:10 +08:00
|
|
|
|
/*
|
|
|
|
|
* Local variables:
|
|
|
|
|
* tab-width: 4
|
|
|
|
|
* c-basic-offset: 4
|
|
|
|
|
* End:
|
2001-09-09 21:29:31 +08:00
|
|
|
|
* vim600: sw=4 ts=4 fdm=marker
|
|
|
|
|
* vim<600: sw=4 ts=4
|
2001-06-05 21:12:10 +08:00
|
|
|
|
*/
|