/* +----------------------------------------------------------------------+ | PHP version 4.0 | +----------------------------------------------------------------------+ | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 2.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available at through the world-wide-web at | | http://www.php.net/license/2_01.txt. | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Kristian Koehntopp (kris@koehntopp.de) | +----------------------------------------------------------------------+ */ /* $Id$ */ /* {{{ includes & prototypes */ #include "php.h" #include "php_recode.h" #if HAVE_LIBRECODE #include "ext/standard/info.h" #include "ext/standard/php_string.h" #include "zend_list.h" #ifdef HAVE_BROKEN_RECODE extern char *program_name; char *program_name = "php"; #endif /* }}} */ #define SAFE_STRING(s) ((s)?(s):"") php_recode_globals recode_globals; extern int le_fp,le_pp; /* {{{ module stuff */ static zend_function_entry php_recode_functions[] = { PHP_FE(recode_string, NULL) PHP_FE(recode_file, NULL) PHP_FALIAS(recode, recode_string, NULL) {NULL, NULL, NULL} }; zend_module_entry recode_module_entry = { "Recode", php_recode_functions, PHP_MINIT(recode), PHP_MSHUTDOWN(recode), NULL, NULL, PHP_MINFO(recode), STANDARD_MODULE_PROPERTIES }; #if APACHE extern void timeout(int sig); #endif PHP_MINIT_FUNCTION(recode) { ReSLS_FETCH(); ReSG(outer) = recode_new_outer(true); if (ReSG(outer) == NULL) return FAILURE; return SUCCESS; } PHP_MSHUTDOWN_FUNCTION(recode) { ReSLS_FETCH(); if (ReSG(outer)) recode_delete_outer(ReSG(outer)); return SUCCESS; } PHP_MINFO_FUNCTION(recode) { ReSLS_FETCH(); php_printf("