]> granicus.if.org Git - php/commitdiff
@-Allow the writing of flash files to stdout.
authorSterling Hughes <sterling@php.net>
Mon, 22 May 2000 20:56:09 +0000 (20:56 +0000)
committerSterling Hughes <sterling@php.net>
Mon, 22 May 2000 20:56:09 +0000 (20:56 +0000)
ext/swf/swf.c

index f35f1980c2b3bcb62c43bba06d0a23bc8ea85447..e0b7e2f2e2395f2bc3ca14017c72adced0573dc5 100644 (file)
@@ -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);
 }