From 072755ca8d26bd5b182f4a025fecc290fed349d2 Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Mon, 22 May 2000 20:56:09 +0000 Subject: [PATCH] @-Allow the writing of flash files to stdout. --- ext/swf/swf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/swf/swf.c b/ext/swf/swf.c index f35f1980c2..e0b7e2f2e2 100644 --- a/ext/swf/swf.c +++ b/ext/swf/swf.c @@ -151,6 +151,7 @@ PHP_MINIT_FUNCTION(swf) 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 @@ PHP_FUNCTION(swf_openfile) 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); } -- 2.50.1