From 044d90d4527e4ac4581788651ad5fe6e9e248128 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Fri, 11 Apr 2014 15:51:28 +0000 Subject: [PATCH] Ajustando configuração da extensão PHP --- configure.ac | 1 + src/php/main.cc | 4 ++-- src/php/php3270.h | 83 ----------------------------------------------------------------------------------- src/php/php3270.h.in | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 86 insertions(+), 85 deletions(-) delete mode 100644 src/php/php3270.h create mode 100644 src/php/php3270.h.in diff --git a/configure.ac b/configure.ac index aad43cf..2519efb 100644 --- a/configure.ac +++ b/configure.ac @@ -626,6 +626,7 @@ AC_CONFIG_FILES([ src/sample/Makefile mac/pw3270.bundle src/php/Makefile + src/php/php3270.h ]) dnl Output the generated config.status script. diff --git a/src/php/main.cc b/src/php/main.cc index 4fb5b9f..f963ece 100644 --- a/src/php/main.cc +++ b/src/php/main.cc @@ -118,7 +118,7 @@ zend_module_entry lib3270_module_entry = #if ZEND_MODULE_API_NO >= 20010901 STANDARD_MODULE_HEADER, #endif - PHP_LIB3270_EXTNAME, + PHP3270_EXTNAME, NULL, /* Functions */ PHP_MINIT(tn3270), NULL, /* MSHUTDOWN */ @@ -126,7 +126,7 @@ zend_module_entry lib3270_module_entry = NULL, /* RSHUTDOWN */ NULL, /* MINFO */ #if ZEND_MODULE_API_NO >= 20010901 - PHP_LIB3270_EXTVER, + PHP3270_EXTVER, #endif STANDARD_MODULE_PROPERTIES }; diff --git a/src/php/php3270.h b/src/php/php3270.h deleted file mode 100644 index 6dc6a5b..0000000 --- a/src/php/php3270.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Este programa está nomeado como php3270.h e possui - linhas de código. - * - * Contatos: - * - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) - * - * Referências: - * - * http://devzone.zend.com/1435/wrapping-c-classes-in-a-php-extension/ - * - */ - -#ifndef PHP_LIB3270_INCLUDED - - #define PHP_LIB3270_INCLUDED 1 - - #define PHP_LIB3270_EXTNAME "lib3270" - #define PHP_LIB3270_EXTVER "5.0" - - extern "C" - { - #include "php.h" - } - - extern zend_module_entry lib3270_module_entry; - #define phpext_lib3270_ptr &lib3270_module_entry; - - // 3270 session methods - PHP_METHOD(tn3270,__construct); - PHP_METHOD(tn3270,connect); - PHP_METHOD(tn3270,disconnect); - PHP_METHOD(tn3270,isconnected); - PHP_METHOD(tn3270,isready); - PHP_METHOD(tn3270,waitforready); - PHP_METHOD(tn3270,wait); - PHP_METHOD(tn3270,iterate); - - PHP_METHOD(tn3270,pfkey); - PHP_METHOD(tn3270,pakey); - PHP_METHOD(tn3270,enter); - - PHP_METHOD(tn3270,getstringat); - PHP_METHOD(tn3270,setstringat); - PHP_METHOD(tn3270,cmpstringat); - - - #undef PACKAGE_NAME - #undef PACKAGE_VERSION - #undef HAVE_MALLOC_H - #include - - // PHP object - using namespace PW3270_NAMESPACE; - - struct tn3270_object - { - zend_object std; - session * hSession; - }; - - -#endif // PHP_LIB3270_INCLUDED diff --git a/src/php/php3270.h.in b/src/php/php3270.h.in new file mode 100644 index 0000000..c34e75b --- /dev/null +++ b/src/php/php3270.h.in @@ -0,0 +1,83 @@ +/* + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a + * aplicativos mainframe. Registro no INPI sob o nome G3270. + * + * Copyright (C) <2008> + * + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela + * Free Software Foundation. + * + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para + * obter mais detalhes. + * + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin + * St, Fifth Floor, Boston, MA 02110-1301 USA + * + * Este programa está nomeado como php3270.h e possui - linhas de código. + * + * Contatos: + * + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) + * + * Referências: + * + * http://devzone.zend.com/1435/wrapping-c-classes-in-a-php-extension/ + * + */ + +#ifndef PHP3270_INCLUDED + + #define PHP3270_INCLUDED 1 + + #define PHP3270_EXTNAME "@PACKAGE_NAME@" + #define PHP3270_EXTVER "@PACKAGE_VERSION@" + + extern "C" + { + #include "php.h" + } + + extern zend_module_entry lib3270_module_entry; + #define phpext_lib3270_ptr &lib3270_module_entry; + + // 3270 session methods + PHP_METHOD(tn3270,__construct); + PHP_METHOD(tn3270,connect); + PHP_METHOD(tn3270,disconnect); + PHP_METHOD(tn3270,isconnected); + PHP_METHOD(tn3270,isready); + PHP_METHOD(tn3270,waitforready); + PHP_METHOD(tn3270,wait); + PHP_METHOD(tn3270,iterate); + + PHP_METHOD(tn3270,pfkey); + PHP_METHOD(tn3270,pakey); + PHP_METHOD(tn3270,enter); + + PHP_METHOD(tn3270,getstringat); + PHP_METHOD(tn3270,setstringat); + PHP_METHOD(tn3270,cmpstringat); + + + #undef PACKAGE_NAME + #undef PACKAGE_VERSION + #undef HAVE_MALLOC_H + #include + + // PHP object + using namespace PW3270_NAMESPACE; + + struct tn3270_object + { + zend_object std; + session * hSession; + }; + + +#endif // PHP_LIB3270_INCLUDED -- libgit2 0.21.2