cvs: php4 / NEWS /ext/fdf fdf.c php_fdf.h

From: Date: Fri, 13 Jul 2001 16:58:09 +0000
Subject: cvs: php4 / NEWS /ext/fdf fdf.c php_fdf.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6214@lists.php.net to get a copy of this message
rasmus Fri Jul 13 12:58:09 2001 EDT Modified files: /php4 NEWS /php4/ext/fdf fdf.c php_fdf.h Log: Add fdf_set_encoding() Index: php4/NEWS diff -u php4/NEWS:1.705 php4/NEWS:1.706 --- php4/NEWS:1.705 Fri Jul 13 08:20:13 2001 +++ php4/NEWS Fri Jul 13 12:58:06 2001 @@ -1,6 +1,9 @@ PHP 4.0 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 200?, Version 4.0.7-dev +- Add fdf_set_encoding() function (Masaki YATSU, Rasmus) +- Fix return value for a failed snmpset() - now returns false (Rasmus) +- Add hostname:port support to snmp functions (nbougues@axialys.net, Rasmus) - Reversed the destruction-order of resources. This fixes the reported OCI8 "failed to rollback outstanding transactions!" message. (Thies Zend Engine) - Added option for returning XMLRPC fault packets. (Matt Allen, Sascha Index: php4/ext/fdf/fdf.c diff -u php4/ext/fdf/fdf.c:1.49 php4/ext/fdf/fdf.c:1.50 --- php4/ext/fdf/fdf.c:1.49 Wed Jun 6 09:05:44 2001 +++ php4/ext/fdf/fdf.c Fri Jul 13 12:58:09 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fdf.c,v 1.49 2001/06/06 13:05:44 rasmus Exp $ */ +/* $Id: fdf.c,v 1.50 2001/07/13 16:58:09 rasmus Exp $ */ /* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from http://beta1.adobe.com/ada/acrosdk/forms.html. */ @@ -62,6 +62,7 @@ PHP_FE(fdf_set_opt, NULL) PHP_FE(fdf_set_submit_form_action, NULL) PHP_FE(fdf_set_javascript_action, NULL) + PHP_FE(fdf_set_encoding, NULL) {NULL, NULL, NULL} }; /* }}} */ @@ -685,6 +686,38 @@ } /* }}} */ +/* {{{ fdf_set_encoding(int fdf_document, string encoding) + Sets FDF encoding (either "Shift-JIS" or "Unicode") */ +PHP_FUNCTION(fdf_set_encoding) { + pval **arg1, **arg2; + int id, type; + FDFDoc fdf; + FDFErc err; + FDF_TLS_VARS; + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) { + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(arg1); + convert_to_string_ex(arg2); + id=(*arg1)->value.lval; + fdf = zend_list_find(id,&type); + if(!fdf || type!=FDF_GLOBAL(le_fdf)) { + php_error(E_WARNING,"Unable to find file identifier %d",id); + RETURN_FALSE; + } + + err = FDFSetEncoding(fdf, (*arg2)->value.str.val); + + if(err != FDFErcOK) { + printf("error setting encoding\n"); + } + + RETURN_TRUE; +} +/* }}} */ + /* {{{ SAPI_POST_HANDLER_FUNC * SAPI post handler for FDF forms */ SAPI_POST_HANDLER_FUNC(fdf_post_handler) @@ -756,6 +789,7 @@ } } /* }}} */ + #endif Index: php4/ext/fdf/php_fdf.h diff -u php4/ext/fdf/php_fdf.h:1.12 php4/ext/fdf/php_fdf.h:1.13 --- php4/ext/fdf/php_fdf.h:1.12 Fri Apr 6 19:17:31 2001 +++ php4/ext/fdf/php_fdf.h Fri Jul 13 12:58:09 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_fdf.h,v 1.12 2001/04/06 23:17:31 sniper Exp $ */ +/* $Id: php_fdf.h,v 1.13 2001/07/13 16:58:09 rasmus Exp $ */ #ifndef PHP_FDF_H #define PHP_FDF_H @@ -53,6 +53,7 @@ PHP_FUNCTION(fdf_set_opt); PHP_FUNCTION(fdf_set_submit_form_action); PHP_FUNCTION(fdf_set_javascript_action); +PHP_FUNCTION(fdf_set_encoding); #else #define fdf_module_ptr NULL

« previous php.cvs (#6214) next »