cvs: php4 /ext/swf/ swf.c
[email protected] ("Sterling Hughes")
| Newsgroups | php.version4 |
|---|---|
| Message-ID | <cvssterling959028969@cvsserver> |
sterling Mon May 22 22:56:09 2000 EDT
Modified files:
/php4/ext/swf swf.c
Log:
@-Allow the writing of flash files to stdout.
Index: php4/ext/swf/swf.c
diff -u php4/ext/swf/swf.c:1.12 php4/ext/swf/swf.c:1.13
--- php4/ext/swf/swf.c:1.12 Sat May 20 02:13:05 2000
+++ php4/ext/swf/swf.c Mon May 22 22:56:09 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: swf.c,v 1.12 2000/05/20 00:13:05 sterling Exp $ */
+/* $Id: swf.c,v 1.13 2000/05/22 20:56:09 sterling Exp $ */
#include "php.h"
@@ -151,6 +151,7 @@
PHP_FUNCTION(swf_openfile)
{
zval **name, **sizeX, **sizeY, **frameRate, **r, **g, **b;
+ char *na;
if (ARG_COUNT(ht) != 7 ||
zend_get_parameters_ex(7, &name, &sizeX, &sizeY, &frameRate, &r, &g, &b) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -164,7 +165,9 @@
convert_to_double_ex(g);
convert_to_double_ex(b);
- swf_openfile((*name)->value.str.val,
+ na = (*name)->value.str.val;
+
+ swf_openfile((strcasecmp("php://stdout", na)==0) ? stdout : na,
(float)(*sizeX)->value.dval, (float)(*sizeY)->value.dval,
(float)(*frameRate)->value.dval, (float)(*r)->value.dval, (float)(*g)->value.dval, (float)(*b)->value.dval);
}