[PHP-CVS] cvs: php-src(PHP_5_2) /main spprintf.c

2007-08-03 Thread Antony Dovgal
tony2001Fri Aug  3 09:48:58 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main   spprintf.c 
  Log:
  MFH: add I64 support to spprintf()
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/spprintf.c?r1=1.25.2.2.2.7r2=1.25.2.2.2.8diff_format=u
Index: php-src/main/spprintf.c
diff -u php-src/main/spprintf.c:1.25.2.2.2.7 
php-src/main/spprintf.c:1.25.2.2.2.8
--- php-src/main/spprintf.c:1.25.2.2.2.7Mon Jun 25 08:39:10 2007
+++ php-src/main/spprintf.c Fri Aug  3 09:48:58 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: spprintf.c,v 1.25.2.2.2.7 2007/06/25 08:39:10 dmitry Exp $ */
+/* $Id: spprintf.c,v 1.25.2.2.2.8 2007/08/03 09:48:58 tony2001 Exp $ */
 
 /* This is the spprintf implementation.
  * It has emerged from apache snprintf. See original header:
@@ -302,6 +302,16 @@
fmt++;
modifier = LM_LONG_DOUBLE;
break;
+   case 'I':
+   fmt++;
+#if SIZEOF_LONG_LONG
+   if (*fmt == '6'  *(fmt+1) == '4') {
+   fmt += 2;
+   modifier = LM_LONG_LONG;
+   } else
+#endif
+   modifier = LM_LONG;
+   break;
case 'l':
fmt++;
 #if SIZEOF_LONG_LONG

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /main spprintf.c

2007-08-03 Thread Antony Dovgal
tony2001Fri Aug  3 09:51:12 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main   spprintf.c 
  Log:
  fix folding
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/spprintf.c?r1=1.25.2.2.2.8r2=1.25.2.2.2.9diff_format=u
Index: php-src/main/spprintf.c
diff -u php-src/main/spprintf.c:1.25.2.2.2.8 
php-src/main/spprintf.c:1.25.2.2.2.9
--- php-src/main/spprintf.c:1.25.2.2.2.8Fri Aug  3 09:48:58 2007
+++ php-src/main/spprintf.c Fri Aug  3 09:51:12 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: spprintf.c,v 1.25.2.2.2.8 2007/08/03 09:48:58 tony2001 Exp $ */
+/* $Id: spprintf.c,v 1.25.2.2.2.9 2007/08/03 09:51:12 tony2001 Exp $ */
 
 /* This is the spprintf implementation.
  * It has emerged from apache snprintf. See original header:
@@ -112,6 +112,8 @@
 
 #include ext/standard/php_smart_str.h
 
+/* {{{ macros */
+
 /*
  * NUM_BUF_SIZE is the size of the buffer used for arithmetic conversions
  *
@@ -176,12 +178,12 @@
}   
\
 } while (0)
 
-
+/* }}} */
 
 /*
  * Do format conversion placing the output in buffer
  */
-static void xbuf_format_converter(smart_str *xbuf, const char *fmt, va_list ap)
+static void xbuf_format_converter(smart_str *xbuf, const char *fmt, va_list 
ap) /* {{{ */
 {
register char *s = NULL;
char *q;
@@ -745,12 +747,12 @@
}
return;
 }
-
+/* }}} */
 
 /*
  * This is the general purpose conversion function.
  */
-PHPAPI int vspprintf(char **pbuf, size_t max_len, const char *format, va_list 
ap)
+PHPAPI int vspprintf(char **pbuf, size_t max_len, const char *format, va_list 
ap) /* {{{ */
 {
smart_str xbuf = {0};
 
@@ -765,9 +767,9 @@

return xbuf.len;
 }
+/* }}} */
 
-
-PHPAPI int spprintf(char **pbuf, size_t max_len, const char *format, ...)
+PHPAPI int spprintf(char **pbuf, size_t max_len, const char *format, ...) /* 
{{{ */
 {
int cc;
va_list ap;
@@ -777,6 +779,8 @@
va_end(ap);
return (cc);
 }
+/* }}} */
+
 /*
  * Local variables:
  * tab-width: 4

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php