#endif
#include "php.h"
-
-#if HAVE_MING
+#include "php_ming.h"
#include "ext/standard/info.h"
#include "ext/standard/file.h"
-#include "php_ming.h"
+#include "ext/standard/fsock.h"
+
+#if HAVE_MING
static zend_function_entry ming_functions[] = {
PHP_FALIAS(ming_setcubicthreshold, ming_setCubicThreshold, NULL)
return (SWFCharacter)getBitmap(id TSRMLS_CC);
else
php_error(E_ERROR, "called object is not an SWFCharacter");
+ return NULL;
}
/* }}} */
buffer = realloc(buffer, alloced);
}
- l = php_sock_fread(buffer+offset, SOCKBUF_INCREMENT, socket);
+ l = SOCK_FREAD(buffer+offset, SOCKBUF_INCREMENT, socket);
offset += l;
}
static SWFInput getInput(zval **zfile)
{
FILE *file;
- int type, s, offset;
- char *buffer;
+ int type;
SWFInput input;
file = (FILE *)zend_fetch_resource(zfile, -1, "File-Handle", &type, 3,
zval **zfile, **zmask = NULL;
SWFBitmap bitmap;
SWFInput input, maskinput;
- int ret, type;
+ int ret;
if(ZEND_NUM_ARGS() == 1)
{
PHP_FUNCTION(swfgradient_addEntry)
{
- zval **ratio, **r, **g, **b, **za;
+ zval **ratio, **r, **g, **b;
byte a = 0xff;
if(ZEND_NUM_ARGS() == 4)
{
zval **x;
SWFMovie movie = getMovie(getThis() TSRMLS_CC);
- int type;
- int le_fopen;
void *what;
if((ZEND_NUM_ARGS() != 1) || zend_get_parameters_ex(1, &x) == FAILURE)
PHP_FUNCTION(swfmovie_streamMp3)
{
- FILE *file;
zval **zfile;
SWFSound sound;
SWFInput input;
{
/* XXX - this didn't work so well last I tried.. */
- if(Ming_init() != 0)
+ if(Ming_init() != 0) {
php_error(E_ERROR, "Error initializing Ming module");
+ return FAILURE;
+ }
+
+ return SUCCESS;
}
PHP_MINIT_FUNCTION(ming)