* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
}
/* }}} */
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
}
/* }}} */
-
/* {{{ proto string jdmonthname(int juliandaycount, int mode)
Returns name of month for julian day count */
PHP_FUNCTION(jdmonthname)
}
/* }}} */
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
"Friday",
"Saturday"
};
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
"Fructidor",
"Extra"
};
+
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
}
return (sdn + SDN_OFFSET);
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
+ inputDay
- SDN_OFFSET);
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
*/
}
+
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
/*
+----------------------------------------------------------------------+
- | PHP HTML Embedded Scripting Language Version 3.0 |
+ | PHP version 4.0 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-1999 PHP Development Team (See Credits file) |
+ | Copyright (c) 1997-2001 The PHP Group |
+----------------------------------------------------------------------+
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of one of the following licenses: |
- | |
- | A) the GNU General Public License as published by the Free Software |
- | Foundation; either version 2 of the License, or (at your option) |
- | any later version. |
- | |
- | B) the PHP License as published by the PHP Development Team and |
- | included in the distribution in the file: LICENSE |
- | |
- | This program is distributed in the hope that it will be useful, |
- | but WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- | GNU General Public License for more details. |
- | |
- | You should have received a copy of both licenses referred to here. |
- | If you did not, or have any questions about PHP licensing, please |
- | contact core@php.net. |
+ | This source file is subject to version 2.02 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_02.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: Uwe Steinmann <Uwe.Steinmann@fernuni-hagen.de> |
+----------------------------------------------------------------------+
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
+/*
+ +----------------------------------------------------------------------+
+ | PHP version 4.0 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2001 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.02 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_02.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: |
+ +----------------------------------------------------------------------+
+ */
+/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Hartmut Holzgraefe <hartmut@six.de> |
- | |
+----------------------------------------------------------------------+
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
/*
+----------------------------------------------------------------------+
- | PHP HTML Embedded Scripting Language Version 3.0 |
+ | PHP version 4.0 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997,1998 PHP Development Team (See Credits file) |
+ | Copyright (c) 1997-2001 The PHP Group |
+----------------------------------------------------------------------+
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of one of the following licenses: |
- | |
- | A) the GNU General Public License as published by the Free Software |
- | Foundation; either version 2 of the License, or (at your option) |
- | any later version. |
- | |
- | B) the PHP License as published by the PHP Development Team and |
- | included in the distribution in the file: LICENSE |
- | |
- | This program is distributed in the hope that it will be useful, |
- | but WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- | GNU General Public License for more details. |
- | |
- | You should have received a copy of both licenses referred to here. |
- | If you did not, or have any questions about PHP licensing, please |
- | contact core@php.net. |
+ | This source file is subject to version 2.02 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_02.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: Evan Klinger <evan715@sirius.com> |
| Timothy Whitfield <timothy@ametro.net> |
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
/*
+----------------------------------------------------------------------+
- | PHP HTML Embedded Scripting Language Version 3.0 |
+ | PHP version 4.0 |
+----------------------------------------------------------------------+
- | Copyright (c) 1999 PHP Development Team (See Credits file) |
+ | Copyright (c) 1997-2001 The PHP Group |
+----------------------------------------------------------------------+
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of one of the following licenses: |
- | |
- | A) the GNU General Public License as published by the Free Software |
- | Foundation; either version 2 of the License, or (at your option) |
- | any later version. |
- | |
- | B) the PHP License as published by the PHP Development Team and |
- | included in the distribution in the file: LICENSE |
- | |
- | This program is distributed in the hope that it will be useful, |
- | but WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- | GNU General Public License for more details. |
- | |
- | You should have received a copy of both licenses referred to here. |
- | If you did not, or have any questions about PHP licensing, please |
- | contact core@php.net. |
+ | This source file is subject to version 2.02 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_02.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: Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
/*
+----------------------------------------------------------------------+
- | PHP HTML Embedded Scripting Language Version 3.0 |
+ | PHP version 4.0 |
+----------------------------------------------------------------------+
- | Copyright (c) 1999 PHP Development Team (See Credits file) |
+ | Copyright (c) 1997-2001 The PHP Group |
+----------------------------------------------------------------------+
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of one of the following licenses: |
- | |
- | A) the GNU General Public License as published by the Free Software |
- | Foundation; either version 2 of the License, or (at your option) |
- | any later version. |
- | |
- | B) the PHP License as published by the PHP Development Team and |
- | included in the distribution in the file: LICENSE |
- | |
- | This program is distributed in the hope that it will be useful, |
- | but WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- | GNU General Public License for more details. |
- | |
- | You should have received a copy of both licenses referred to here. |
- | If you did not, or have any questions about PHP licensing, please |
- | contact core@php.net. |
+ | This source file is subject to version 2.02 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_02.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: Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
/*
+----------------------------------------------------------------------+
- | PHP HTML Embedded Scripting Language Version 3.0 |
+ | PHP version 4.0 |
+----------------------------------------------------------------------+
- | Copyright (c) 1999 PHP Development Team (See Credits file) |
+ | Copyright (c) 1997-2001 The PHP Group |
+----------------------------------------------------------------------+
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of one of the following licenses: |
- | |
- | A) the GNU General Public License as published by the Free Software |
- | Foundation; either version 2 of the License, or (at your option) |
- | any later version. |
- | |
- | B) the PHP License as published by the PHP Development Team and |
- | included in the distribution in the file: LICENSE |
- | |
- | This program is distributed in the hope that it will be useful, |
- | but WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- | GNU General Public License for more details. |
- | |
- | You should have received a copy of both licenses referred to here. |
- | If you did not, or have any questions about PHP licensing, please |
- | contact core@php.net. |
+ | This source file is subject to version 2.02 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_02.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: Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
/*
+----------------------------------------------------------------------+
- | PHP HTML Embedded Scripting Language Version 3.0 |
+ | PHP version 4.0 |
+----------------------------------------------------------------------+
- | Copyright (c) 1999 PHP Development Team (See Credits file) |
+ | Copyright (c) 1997-2001 The PHP Group |
+----------------------------------------------------------------------+
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of one of the following licenses: |
- | |
- | A) the GNU General Public License as published by the Free Software |
- | Foundation; either version 2 of the License, or (at your option) |
- | any later version. |
- | |
- | B) the PHP License as published by the PHP Development Team and |
- | included in the distribution in the file: LICENSE |
- | |
- | This program is distributed in the hope that it will be useful, |
- | but WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- | GNU General Public License for more details. |
- | |
- | You should have received a copy of both licenses referred to here. |
- | If you did not, or have any questions about PHP licensing, please |
- | contact core@php.net. |
+ | This source file is subject to version 2.02 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_02.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: Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
/*
+----------------------------------------------------------------------+
- | PHP HTML Embedded Scripting Language Version 3.0 |
+ | PHP version 4.0 |
+----------------------------------------------------------------------+
- | Copyright (c) 1999 PHP Development Team (See Credits file) |
+ | Copyright (c) 1997-2001 The PHP Group |
+----------------------------------------------------------------------+
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of one of the following licenses: |
- | |
- | A) the GNU General Public License as published by the Free Software |
- | Foundation; either version 2 of the License, or (at your option) |
- | any later version. |
- | |
- | B) the PHP License as published by the PHP Development Team and |
- | included in the distribution in the file: LICENSE |
- | |
- | This program is distributed in the hope that it will be useful, |
- | but WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- | GNU General Public License for more details. |
- | |
- | You should have received a copy of both licenses referred to here. |
- | If you did not, or have any questions about PHP licensing, please |
- | contact core@php.net. |
+ | This source file is subject to version 2.02 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_02.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: Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
/*
+----------------------------------------------------------------------+
- | PHP HTML Embedded Scripting Language Version 3.0 |
+ | PHP version 4.0 |
+----------------------------------------------------------------------+
- | Copyright (c) 1999 PHP Development Team (See Credits file) |
+ | Copyright (c) 1997-2001 The PHP Group |
+----------------------------------------------------------------------+
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of one of the following licenses: |
- | |
- | A) the GNU General Public License as published by the Free Software |
- | Foundation; either version 2 of the License, or (at your option) |
- | any later version. |
- | |
- | B) the PHP License as published by the PHP Development Team and |
- | included in the distribution in the file: LICENSE |
- | |
- | This program is distributed in the hope that it will be useful, |
- | but WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- | GNU General Public License for more details. |
- | |
- | You should have received a copy of both licenses referred to here. |
- | If you did not, or have any questions about PHP licensing, please |
- | contact core@php.net. |
+ | This source file is subject to version 2.02 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_02.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: Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
/*
+----------------------------------------------------------------------+
- | PHP HTML Embedded Scripting Language Version 3.0 |
+ | PHP version 4.0 |
+----------------------------------------------------------------------+
- | Copyright (c) 1999 PHP Development Team (See Credits file) |
+ | Copyright (c) 1997-2001 The PHP Group |
+----------------------------------------------------------------------+
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of one of the following licenses: |
- | |
- | A) the GNU General Public License as published by the Free Software |
- | Foundation; either version 2 of the License, or (at your option) |
- | any later version. |
- | |
- | B) the PHP License as published by the PHP Development Team and |
- | included in the distribution in the file: LICENSE |
- | |
- | This program is distributed in the hope that it will be useful, |
- | but WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- | GNU General Public License for more details. |
- | |
- | You should have received a copy of both licenses referred to here. |
- | If you did not, or have any questions about PHP licensing, please |
- | contact core@php.net. |
+ | This source file is subject to version 2.02 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_02.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: Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
cur_f->db_type, cur_f->db_flen, cur_f->db_fdc);
}
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
return cp;
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
return rp;
}
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
{
return get_dbf_record(dbh, dbh->db_cur_rec + 1);
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
int cflags;
} reg_cache;
+/* {{{ _php_regcomp
+ */
static int _php_regcomp(regex_t *preg, const char *pattern, int cflags)
{
int r = 0;
return r;
}
+/* }}} */
static void _free_reg_cache(reg_cache *rc)
{
call to ereg() or eregi() with the optional third argument. */
#define NS 10
-/*
+/* {{{ php_reg_eprint
* php_reg_eprint - convert error number to name
*/
static void php_reg_eprint(int err, regex_t *re) {
STR_FREE(buf);
STR_FREE(message);
}
+/* }}} */
+/* {{{ php_ereg
+ */
static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase)
{
pval **regex, /* Regular expression */
}
regfree(&re);
}
+/* }}} */
/* {{{ proto int ereg(string pattern, string string [, array registers])
Regular expression match */
}
/* }}} */
-/* this is the meat and potatoes of regex replacement! */
+/* {{{ php_reg_replace
+ * this is the meat and potatoes of regex replacement! */
char *php_reg_replace(const char *pattern, const char *replace, const char *string, int icase, int extended)
{
regex_t re;
/* whew. */
return (buf);
}
+/* }}} */
+/* {{{ php_ereg_replace
+ */
static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase)
{
pval **arg_pattern,
STR_FREE(replace);
STR_FREE(pattern);
}
+/* }}} */
/* {{{ proto string ereg_replace(string pattern, string replacement, string string)
Replace regular expression */
}
/* }}} */
+/* {{{ php_split
+ */
static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase)
{
pval **spliton, **str, **arg_count = NULL;
regfree(&re);
}
+/* }}} */
/* ("root", "passwd", "uid", "gid", "other:stuff:like:/bin/sh")
= split(":", $passwd_file, 5); */
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#define FBSQL_NUM 1<<1
#define FBSQL_BOTH (FBSQL_ASSOC|FBSQL_NUM)
-
+/* {{{ fbsql_functions[]
+ */
function_entry fbsql_functions[] = {
PHP_FE(fbsql_connect, NULL)
PHP_FE(fbsql_pconnect, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
zend_module_entry fbsql_module_entry = {
"fbsql",
static int phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link);
+/* {{{ PHP_INI
+ */
PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN ("fbsql.allow_persistant", "1", PHP_INI_SYSTEM, OnUpdateInt, allowPersistent, zend_fbsql_globals, fbsql_globals)
STD_PHP_INI_BOOLEAN ("fbsql.generate_warnings", "0", PHP_INI_SYSTEM, OnUpdateInt, generateWarnings, zend_fbsql_globals, fbsql_globals)
STD_PHP_INI_ENTRY ("fbsql.default_database", "", PHP_INI_SYSTEM, OnUpdateString, databaseName, zend_fbsql_globals, fbsql_globals)
STD_PHP_INI_ENTRY ("fbsql.default_database_password", "", PHP_INI_SYSTEM, OnUpdateString, databasePassword, zend_fbsql_globals, fbsql_globals)
PHP_INI_END()
-
+/* }}} */
static void php_fbsql_init_globals(zend_fbsql_globals *fbsql_globals)
{
DISPLAY_INI_ENTRIES();
}
+/* {{{ php_fbsql_do_connect
+ */
static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistant)
{
PHPFBLink* phpLink;
}
php_fbsql_set_default_link(return_value->value.lval);
}
-
+/* }}} */
int phpfbFetchRow(PHPFBResult* result, int row)
{
}
/* }}} */
-
/* {{{ proto resource fbsql_pconnect([string hostname [, string username [, string password]]]);
*/
PHP_FUNCTION(fbsql_pconnect)
}
/* }}} */
+/* {{{ php_fbsql_select_db
+ */
static int php_fbsql_select_db(char *databaseName, PHPFBLink *link)
{
unsigned port;
}
/* }}} */
+/* {{{ phpfbestrdup
+ */
void phpfbestrdup(const char * s, int* length, char** value)
{
int l = s?strlen(s):0;
}
*length = l;
}
+/* }}} */
/* {{{ proto bool fbsql_autocommit(int link_identifier [, bool OnOff])
- */
+ Turn on auto-commit */
PHP_FUNCTION(fbsql_autocommit)
{
PHPFBLink* phpLink = NULL;
}
/* }}} */
-
/* {{{ proto string fbsql_hostname(int link_identifier [, string host_name])
*/
PHP_FUNCTION(fbsql_hostname)
}
/* }}} */
-
/* {{{ proto string fbsql_database(int link_identifier [, string database])
*/
PHP_FUNCTION(fbsql_database)
}
/* }}} */
-
/* {{{ proto string fbsql_database_password(int link_identifier [, string database_password])
*/
PHP_FUNCTION(fbsql_database_password)
}
/* }}} */
-
/* {{{ proto string fbsql_username(int link_identifier [, string username])
*/
PHP_FUNCTION(fbsql_username)
}
/* }}} */
-
/* {{{ proto string fbsql_password(int link_identifier [, string password])
*/
PHP_FUNCTION(fbsql_password)
}
/* }}} */
-
/* {{{ proto bool fbsql_select_db([string database_name [, int link_identifier]])
*/
PHP_FUNCTION(fbsql_select_db)
}
/* }}} */
-
/* {{{ proto int fbsql_change_user(string user, string password [, string database [, int link_identifier]]);
*/
PHP_FUNCTION(fbsql_change_user)
}
/* }}} */
-
/* {{{ proto bool fbsql_create_db(string database_name [, int link_identifier])
*/
PHP_FUNCTION(fbsql_create_db)
}
/* }}} */
-
/* {{{ proto int fbsql_drop_db(string database_name [, int link_identifier])
*/
PHP_FUNCTION(fbsql_drop_db)
}
/* }}} */
-
/* {{{ proto int fbsql_stop_db(string database_name [, int link_identifier])
*/
PHP_FUNCTION(fbsql_stop_db)
}
/* }}} */
-
/* {{{ proto int fbsql_db_status(string database_name [, int link_identifier])
Get the status (Stoped, Starting, Started, Stopping) for a given database*/
PHP_FUNCTION(fbsql_db_status)
}
/* }}} */
+/* {{{ mdOk
+ */
int mdOk(PHPFBLink* link, FBCMetaData* md)
{
FBCDatabaseConnection* c = link->connection;
}
return result;
}
+/* }}} */
+/* {{{ phpfbQuery
+ */
static int phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link)
{
PHPFBResult* result = NULL;
if (link) link->affectedRows = fbcmdRowCount(md);
return 1;
}
+/* }}} */
/* {{{ proto resource fbsql_query(string query [, int link_identifier])
*/
}
/* }}} */
-
/* {{{ proto resource fbsql_db_query(string database_name, string query [, int link_identifier])
*/
PHP_FUNCTION(fbsql_db_query)
}
/* }}} */
-
/* {{{ proto int fbsql_list_dbs([int link_identifier])
*/
PHP_FUNCTION(fbsql_list_dbs)
}
/* }}} */
-
/* {{{ proto int fbsql_list_tables(string database, int [link_identifier]);
*/
PHP_FUNCTION(fbsql_list_tables)
}
/* }}} */
-
/* {{{ proto int fbsql_list_fields(string database_name, string table_name [, int link_identifier])
*/
PHP_FUNCTION(fbsql_list_fields)
}
/* }}} */
-
/* {{{ proto string fbsql_error([int link_identifier])
*/
PHP_FUNCTION(fbsql_error)
}
/* }}} */
-
/* {{{ proto int fbsql_errno([int link_identifier])
*/
PHP_FUNCTION(fbsql_errno)
}
/* }}} */
-
/* {{{ proto bool fbsql_warnings([int flag]);
*/
PHP_FUNCTION(fbsql_warnings)
}
/* }}} */
-
/* {{{ proto int fbsql_affected_rows([int link_identifier])
*/
PHP_FUNCTION(fbsql_affected_rows)
}
/* }}} */
-
+/* {{{ phpSizeOfInt
+ */
int phpSizeOfInt (int i)
{
int s = 1;
while ((i = i / 10)) s++;
return s;
}
+/* }}} */
+/* {{{ phpfbColumnAsString
+ */
void phpfbColumnAsString (PHPFBResult* result, int column, void* data ,int* length, char** value)
{
FBCMetaData* md = result->metaData;
break;
}
}
+/* }}} */
+/* {{{ phpfbSqlResult
+ */
void phpfbSqlResult (INTERNAL_FUNCTION_PARAMETERS, PHPFBResult* result, int rowIndex, int columnIndex)
{
void** row;
}
}
}
+/* }}} */
/* {{{ proto mixed fbsql_result(int result [, int row [, mixed field]])
*/
}
/* }}} */
-
/* {{{ proto int fbsql_next_result(int result)
*/
PHP_FUNCTION(fbsql_next_result)
}
/* }}} */
-
/* {{{ proto int fbsql_num_rows(int result)
*/
PHP_FUNCTION(fbsql_num_rows)
}
/* }}} */
-
/* {{{ proto int fbsql_num_fields(int result)
*/
PHP_FUNCTION(fbsql_num_fields)
}
/* }}} */
-
/* {{{ proto array fbsql_fetch_row(int result)
*/
PHP_FUNCTION(fbsql_fetch_row)
}
/* }}} */
-
/* {{{ proto object fbsql_fetch_assoc(int result)
*/
PHP_FUNCTION(fbsql_fetch_assoc)
}
/* }}} */
-
/* {{{ proto object fbsql_fetch_object(int result [, int result_type])
*/
PHP_FUNCTION(fbsql_fetch_object)
}
/* }}} */
-
/* {{{ proto array fbsql_fetch_array(int result [, int result_type])
Fetch a result row as an array (associative, numeric or both)*/
PHP_FUNCTION(fbsql_fetch_array)
}
/* }}} */
+/* {{{ php_fbsql_fetch_hash
+ */
static void php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
{
result->rowIndex = result->rowIndex+1;
result->columnIndex = 0;
}
-
+/* }}} */
/* {{{ proto int fbsql_data_seek(int result, int row_number)
*/
}
/* }}} */
-
/* {{{ proto array fbsql_fetch_lengths(int result)
*/
PHP_FUNCTION(fbsql_fetch_lengths)
}
/* }}} */
-
/* {{{ proto object fbsql_fetch_field(int result [, int field_index])
*/
PHP_FUNCTION(fbsql_fetch_field)
}
/* }}} */
-
/* {{{ proto bool fbsql_field_seek(int result [, int field_index])
*/
PHP_FUNCTION(fbsql_field_seek)
}
/* }}} */
-
/* {{{ proto string fbsql_field_name(int result [, int field_index])
*/
PHP_FUNCTION(fbsql_field_name)
}
/* }}} */
-
/* {{{ proto string fbsql_field_table(int result [, int field_index])
*/
PHP_FUNCTION(fbsql_field_table)
}
/* }}} */
-
/* {{{ proto string fbsql_field_len(int result [, int field_index])
*/
PHP_FUNCTION(fbsql_field_len)
}
/* }}} */
-
/* {{{ proto string fbsql_field_type(int result [, int field_index])
*/
PHP_FUNCTION(fbsql_field_type)
}
/* }}} */
-
/* {{{ proto string fbsql_field_flags(int result [, int field_index])
*/
PHP_FUNCTION(fbsql_field_flags)
}
/* }}} */
-
/* {{{ proto bool fbsql_free_result(int result)
*/
PHP_FUNCTION(fbsql_free_result)
/* }}} */
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#include <libintl.h>
#include "ext/standard/info.h"
+/* {{{ php_gettext_functions[]
+ */
function_entry php_gettext_functions[] = {
PHP_FE(textdomain, NULL)
PHP_FE(gettext, NULL)
PHP_FE(bindtextdomain, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
zend_module_entry php_gettext_module_entry = {
"gettext", php_gettext_functions, NULL, NULL, NULL, NULL, PHP_MINFO(gettext), STANDARD_MODULE_PROPERTIES
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
return SUCCESS;
}
-/* creates an array in return value and frees all memory
+/* {{{ make_return_objrec
+ * creates an array in return value and frees all memory
* Also adds as an assoc. array at the end of the return array with
* statistics.
*/
return 0;
}
+/* }}} */
-/*
+/* {{{ make2_return_array_from_objrec
** creates an array return value from object record
*/
int make2_return_array_from_objrec(pval **return_value, char *objrec, zval *sarr) {
return(0);
}
+/* }}} */
+/* {{{ make_return_array_from_objrec
+ */
int make_return_array_from_objrec(pval **return_value, char *objrec) {
char *attrname, *str, *temp, language[3], *title;
int iTitle, iDesc, iKeyword, iGroup;
return(0);
}
+/* }}} */
#define BUFFERLEN 1024
+/* {{{ make_objrec_from_array
+ */
static char * make_objrec_from_array(HashTable *lht) {
int i, count, keytype;
ulong length;
}
return objrec;
}
+/* }}} */
#undef BUFFERLEN
+/* {{{ make_ints_from_array
+ */
static int * make_ints_from_array(HashTable *lht) {
int i, count;
int *objids = NULL;
}
return objids;
}
+/* }}} */
+/* {{{ make_strs_from_array
+ */
static char **make_strs_from_array(HashTable *arrht) {
char **carr = NULL;
char **ptr;
}
return(carr);
}
+/* }}} */
#define BUFFERLEN 30
+/* {{{ php_hw_do_connect
+ */
static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
{
zval **argv[4];
ptr->username = NULL;
efree(userdata);
}
+/* }}} */
#undef BUFFERLEN
/* Start of user level functions */
}
/* }}} */
+/* {{{ php_hw_command
+ */
char *php_hw_command(INTERNAL_FUNCTION_PARAMETERS, int comm) {
pval **arg1;
int link, type;
return object;
}
}
+/* }}} */
/* {{{ proto string hw_stat(int link)
Returns status string */
#undef BUFFERLEN
/* }}} */
+/* {{{ php_hw_mvcp
+ */
void php_hw_mvcp(INTERNAL_FUNCTION_PARAMETERS, int mvcp) {
pval *arg1, *arg2, *arg3, *arg4;
int link, type, dest=0, from=0, count;
RETURN_LONG(docIDcount + collIDcount);
}
+/* }}} */
/* {{{ proto void hw_mv(int link, array objrec, int from, int dest)
Moves object */
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
}
}
-
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(imap)
{
php_info_print_table_start();
#endif
php_info_print_table_end();
}
-
+/* }}} */
static void php_imap_init_globals(zend_imap_globals *imap_globals)
{
}
/* }}} */
-
/* {{{ proto int imap_popen(string mailbox, string user, string password [, int options])
Open a persistant IMAP stream to a mailbox */
PHP_FUNCTION(imap_popen)
#endif
}
/* }}} */
-
/* {{{ proto int imap_reopen(int stream_id, string mailbox [, int options])
Reopen an IMAP stream to a new mailbox */
}
/* }}} */
-
/* {{{ proto int imap_append(int stream_id, string folder, string message [, string flags])
Append a new message to a specified mailbox */
PHP_FUNCTION(imap_append)
}
/* }}} */
-
/* {{{ proto int imap_num_msg(int stream_id)
Gives the number of messages in the current mailbox */
PHP_FUNCTION(imap_num_msg)
}
/* }}} */
-
/* {{{ proto int imap_ping(int stream_id)
Check if the IMAP stream is still active */
PHP_FUNCTION(imap_ping)
}
/* }}} */
-
/* {{{ proto int imap_num_recent(int stream_id)
Gives the number of recent messages in current mailbox */
PHP_FUNCTION(imap_num_recent)
}
/* }}} */
-
/* {{{ proto int imap_set_quota(int stream_id, string qroot, int mailbox_size)
Will set the quota for qroot mailbox */
PHP_FUNCTION(imap_set_quota)
}
/* }}} */
-
/* {{{ proto int imap_close(int stream_id [, int options])
Close an IMAP stream */
PHP_FUNCTION(imap_close)
}
/* }}} */
-
/* {{{ proto array imap_headers(int stream_id)
Returns headers for all messages in a mailbox */
PHP_FUNCTION(imap_headers)
}
/* }}} */
-
/* {{{ proto string imap_body(int stream_id, int msg_no [, int options])
Read the message body */
PHP_FUNCTION(imap_body)
}
/* }}} */
-
/* {{{ proto string imap_fetchtext_full(int stream_id, int msg_no [, int options])
Read the full text of a message */
PHP_FUNCTION(imap_fetchtext_full)
}
/* }}} */
-
/* {{{ proto int imap_mail_copy(int stream_id, int msg_no, string mailbox [, int options])
Copy specified message to a mailbox */
PHP_FUNCTION(imap_mail_copy)
}
/* }}} */
-
/* {{{ proto int imap_mail_move(int stream_id, int msg_no, string mailbox [, int options])
Move specified message to a mailbox */
PHP_FUNCTION(imap_mail_move)
}
/* }}} */
-
/* {{{ proto int imap_createmailbox(int stream_id, string mailbox)
Create a new mailbox */
PHP_FUNCTION(imap_createmailbox)
}
/* }}} */
-
/* {{{ proto int imap_renamemailbox(int stream_id, string old_name, string new_name)
Rename a mailbox */
PHP_FUNCTION(imap_renamemailbox)
}
/* }}} */
-
/* {{{ proto int imap_deletemailbox(int stream_id, string mailbox)
Delete a mailbox */
PHP_FUNCTION(imap_deletemailbox)
}
/* }}} */
-
/* {{{ proto array imap_list(int stream_id, string ref, string pattern)
Read the list of mailboxes */
PHP_FUNCTION(imap_list)
/* }}} */
-
/* {{{ proto array imap_getmailboxes(int stream_id, string ref, string pattern)
Reads the list of mailboxes and returns a full array of objects containing name, attributes, and delimiter */
/* Author: CJH */
}
/* }}} */
-
/* {{{ proto array imap_scan(int stream_id, string ref, string pattern, string content)
Read list of mailboxes containing a certain string */
PHP_FUNCTION(imap_listscan)
/* }}} */
-
/* {{{ proto object imap_check(int stream_id)
Get mailbox properties */
PHP_FUNCTION(imap_check)
}
/* }}} */
-
/* {{{ proto int imap_delete(int stream_id, int msg_no [, int flags])
Mark a message for deletion */
PHP_FUNCTION(imap_delete)
}
/* }}} */
-
/* {{{ proto int imap_undelete(int stream_id, int msg_no)
Remove the delete flag from a message */
PHP_FUNCTION(imap_undelete)
}
/* }}} */
-
/* {{{ proto object imap_headerinfo(int stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])
Read the headers of the message */
PHP_FUNCTION(imap_headerinfo)
}
/* }}} */
-
/* {{{ proto object imap_rfc822_parse_headers(string headers [, string default_host])
Parse a set of mail headers contained in a string, and return an object similar to imap_headerinfo() */
PHP_FUNCTION(imap_rfc822_parse_headers)
}
/* }}} */
-
/* {{{ proto array imap_getsubscribed(int stream_id, string ref, string pattern)
Return a list of subscribed mailboxes, in the same format as imap_getmailboxes() */
/* Author: CJH */
}
/* }}} */
-
/* {{{ proto int imap_subscribe(int stream_id, string mailbox)
Subscribe to a mailbox */
PHP_FUNCTION(imap_subscribe)
}
/* }}} */
-
/* {{{ proto int imap_unsubscribe(int stream_id, string mailbox)
Unsubscribe from a mailbox */
PHP_FUNCTION(imap_unsubscribe)
}
/* }}} */
-
/* {{{ proto object imap_fetchstructure(int stream_id, int msg_no [, int options])
Read the full structure of a message */
PHP_FUNCTION(imap_fetchstructure)
}
/* }}} */
-
/* {{{ proto string imap_fetchbody(int stream_id, int msg_no, int section [, int options])
Get a specific body section */
PHP_FUNCTION(imap_fetchbody)
/* }}} */
-
/* {{{ proto string imap_base64(string text)
Decode BASE64 encoded text */
PHP_FUNCTION(imap_base64)
}
/* }}} */
-
/* {{{ proto string imap_qprint(string text)
Convert a quoted-printable string to an 8-bit string */
PHP_FUNCTION(imap_qprint)
}
/* }}} */
-
/* {{{ proto string imap_8bit(string text)
Convert an 8-bit string to a quoted-printable string */
PHP_FUNCTION(imap_8bit)
}
/* }}} */
-
/* {{{ proto string imap_binary(string text)
Convert an 8bit string to a base64 string */
PHP_FUNCTION(imap_binary)
}
/* }}} */
-
/* {{{ proto object imap_mailboxmsginfo(int stream_id)
Returns info about the current mailbox */
PHP_FUNCTION(imap_mailboxmsginfo)
}
/* }}} */
-
/* {{{ proto string imap_rfc822_write_address(string mailbox, string host, string personal)
Returns a properly formatted email address given the mailbox, host, and personal info */
PHP_FUNCTION(imap_rfc822_write_address)
}
/* }}} */
-
/* {{{ proto array imap_rfc822_parse_adrlist(string address_string, string default_host)
Parses an address string */
PHP_FUNCTION(imap_rfc822_parse_adrlist)
}
/* }}} */
-
/* {{{ proto string imap_utf8(string string)
Convert a string to UTF-8 */
PHP_FUNCTION(imap_utf8)
}
/* }}} */
-
/* {{{ proto string imap_utf7_encode(string buf)
Encode a string in modified UTF-7 */
PHP_FUNCTION(imap_utf7_encode)
}
/* }}} */
-
/* {{{ proto int imap_clearflag_full(int stream_id, string sequence, string flag [, int options])
Clears flags on messages */
PHP_FUNCTION(imap_clearflag_full)
}
/* }}} */
-
/* {{{ proto array imap_sort(int stream_id, int criteria, int reverse [, int options [, string search_criteria]])
Sort an array of message headers, optionally including only messages that meet specified criteria. */
PHP_FUNCTION(imap_sort)
}
/* }}} */
-
/* {{{ proto string imap_fetchheader(int stream_id, int msg_no [, int options])
Get the full unfiltered header for a message */
PHP_FUNCTION(imap_fetchheader)
}
/* }}} */
-
/* {{{ proto int imap_uid(int stream_id, int msg_no)
Get the unique message id associated with a standard sequential message number */
PHP_FUNCTION(imap_uid)
RETURN_LONG(mail_uid(imap_le_struct->imap_stream, Z_LVAL_PP(msgno)));
}
/* }}} */
-
/* {{{ proto int imap_msgno(int stream_id, int unique_msg_id)
Get the sequence number associated with a UID */
}
/* }}} */
-
/* {{{ proto object imap_status(int stream_id, string mailbox, int options)
Get status info from a mailbox */
PHP_FUNCTION(imap_status)
}
}
/* }}} */
-
/* {{{ proto object imap_bodystruct(int stream_id, int msg_no, int section)
Read the structure of a specified body section of a specific message */
/* }}} */
-
/* {{{ proto array imap_fetch_overview(int stream_id, int msg_no)
Read an overview of the information in the headers of the given message sequence */
PHP_FUNCTION(imap_fetch_overview)
}
/* }}} */
-
/* {{{ proto string imap_mail_compose(array envelope, array body)
Create a MIME message based on given envelope and body sections */
PHP_FUNCTION(imap_mail_compose)
#ifndef PHP_WIN32
+/* {{{ _php_imap_mail
+ */
int _php_imap_mail(char *to, char *subject, char *message, char *headers, char *cc, char *bcc, char* rpath)
{
#ifdef PHP_WIN32
#endif
return 1;
}
+/* }}} */
#endif
-
-
#ifndef PHP_WIN32
/* {{{ proto int imap_mail(string to, string subject, string message [, string additional_headers [, string cc [, string bcc [, string rpath]]]])
Send an email message */
}
/* }}} */
-
/* {{{ proto array imap_alerts(void)
Returns an array of all IMAP alerts that have been generated since the last page load or since the last imap_alerts() call, whichever came last. The alert stack is cleared after imap_alerts() is called. */
/* Author: CJH */
}
/* }}} */
-
/* {{{ proto array imap_errors(void)
Returns an array of all IMAP errors generated since the last page load, or since the last imap_errors() call, whichever came last. The error stack is cleared after imap_errors() is called. */
/* Author: CJH */
}
/* }}} */
-
/* {{{ proto string imap_last_error(void)
Returns the last error that was generated by an IMAP function. The error stack is NOT cleared after this call. */
/* Author: CJH */
}
/* }}} */
-
/* {{{ proto array imap_mime_header_decode(string str)
Decode mime header element in accordance with RFC 2047 and return array of objects containing 'charset' encoding and decoded 'text' */
PHP_FUNCTION(imap_mime_header_decode)
/* Support Functions */
+/* {{{ _php_imap_parse_address
+ */
void _php_imap_parse_address (ADDRESS *addresslist, char *fulladdress, zval *paddress)
{
ADDRESS *addresstmp, *addresstmp2;
add_next_index_object(paddress, tmpvals);
} while ((addresstmp = addresstmp->next));
}
+/* }}} */
+/* {{{ _php_make_header_object
+ */
void _php_make_header_object(zval *myzvalue, ENVELOPE *en)
{
zval *paddress;
}
}
+/* }}} */
+/* {{{ _php_imap_add_body
+ */
void _php_imap_add_body(zval *arg, BODY *body)
{
zval *parametres, *param, *dparametres, *dparam;
add_assoc_object(arg, "parts", parametres);
}
}
-
+/* }}} */
/* Interfaces to C-client */
void mm_searched(MAILSTREAM *stream,unsigned long number)
}
/* }}} */
-/* end IMAP_THREAD functionality */
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
/* }}} */
-
/* {{{ internal macros, functions and structures */
#define IB_STATUS (IBG(status))
}
/* }}} */
-
/* {{{ _php_ibase_error()
print interbase error and save it for ibase_errmsg() */
static void _php_ibase_error(void)
}
/* }}} */
-
/* {{{ _php_ibase_module_error()
print php interbase module error and save it for ibase_errmsg() */
static void _php_ibase_module_error(char *msg, ...)
/* destructors ---------------------- */
-
/* {{{ _php_ibase_free_xsqlda() */
/* not actual destructor ... */
static void _php_ibase_free_xsqlda(XSQLDA *sqlda)
}
/* }}} */
-
/* {{{ _php_ibase_commit_link() */
static void _php_ibase_commit_link(ibase_db_link *link)
{
}
/* }}} */
-
/* {{{ _php_ibase_close_plink() */
static void _php_ibase_close_plink(zend_rsrc_list_entry *rsrc)
{
}
/* }}} */
-
/* {{{ _php_ibase_free_result() */
static void _php_ibase_free_result(zend_rsrc_list_entry *rsrc)
{
}
/* }}} */
-
/* {{{ _php_ibase_free_query() */
static void _php_ibase_free_query(ibase_query *ib_query)
{
}
/* }}} */
-
/* {{{ _php_ibase_free_trans() */
static void _php_ibase_free_trans(zend_rsrc_list_entry *rsrc)
{
}
/* }}} */
-
/* {{{ startup, shutdown and info functions */
PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN("ibase.allow_persistent", "1", PHP_INI_SYSTEM, OnUpdateInt, allow_persistent, zend_ibase_globals, ibase_globals)
}
/* }}} */
-
/* {{{ _php_ibase_attach_db() */
static int _php_ibase_attach_db(char *server, char *uname, char *passwd, char *charset, int buffers, char *role, isc_db_handle *db)
{
}
/* }}} */
-
/* {{{ _php_ibase_connect() */
static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
{
}
/* }}} */
-
/* {{{ proto int ibase_connect(string database [, string username] [, string password] [, string charset] [, int buffers] [, int dialect] [, string role])
Open a connection to an InterBase database */
PHP_FUNCTION(ibase_connect)
}
/* }}} */
-
/* {{{ proto int ibase_pconnect(string database [, string username] [, string password] [, string charset] [, int buffers] [, int dialect] [, string role])
Open a persistent connection to an InterBase database */
PHP_FUNCTION(ibase_pconnect)
}
/* }}} */
-
/* {{{ proto int ibase_close([int link_identifier])
Close an InterBase connection */
PHP_FUNCTION(ibase_close)
}
/* }}} */
-
/* {{{ _php_ibase_alloc_query() */
/* allocate and prepare query */
static int _php_ibase_alloc_query(ibase_query **ib_queryp, isc_db_handle link, isc_tr_handle trans, char *query, unsigned short dialect)
}
/* }}} */
-
/* {{{ _php_ibase_bind()
Bind parameter placeholders in a previously prepared query */
static int _php_ibase_bind(XSQLDA *sqlda, pval **b_vars, BIND_BUF *buf)
}
/* }}} */
-
/* {{{ _php_ibase_alloc_xsqlda() */
static void _php_ibase_alloc_xsqlda(XSQLDA *sqlda)
{
}
/* }}} */
-
/* {{{ _php_ibase_exec() */
static int _php_ibase_exec(ibase_result **ib_resultp, ibase_query *ib_query, int argc, pval **args)
{
}
/* }}} */
-
/* {{{ proto int ibase_trans([int trans_args [, int link_identifier]])
Start transaction */
PHP_FUNCTION(ibase_trans)
}
/* }}} */
-
/* {{{ _php_ibase_def_trans() */
/* open default transaction */
static int _php_ibase_def_trans(ibase_db_link * ib_link, int trans_n)
}
/*}}}*/
-
/* {{{ _php_ibase_trans_end() */
#define COMMIT 1
#define ROLLBACK 0
}
/* }}} */
-
/* {{{ proto int ibase_commit([int link_identifier,] int trans_number)
Commit transaction */
PHP_FUNCTION(ibase_commit)
}
/* }}} */
-
/* {{{ proto int ibase_rollback([int link_identifier,] int trans_number)
Roolback transaction */
PHP_FUNCTION(ibase_rollback)
}
/* }}} */
-
/* {{{ proto int ibase_query([int link_identifier,] string query [, int bind_args])
Execute a query */
PHP_FUNCTION(ibase_query)
}
/* }}} */
-
/* {{{ _php_ibase_var_pval() */
static int _php_ibase_var_pval(pval *val, void *data, int type, int len, int scale, int flag)
{
}
return SUCCESS;
}
-
+/* }}} */
/* {{{ _php_ibase_fetch_hash() */
}
/* }}} */
-
/* {{{ proto array ibase_fetch_row(int result [, int blob_flag])
Fetch a row from the results of a query */
PHP_FUNCTION(ibase_fetch_row)
}
/* }}} */
-
/* {{{ proto object ibase_fetch_object(int result [, int blob_flag])
Fetch a object from the results of a query */
PHP_FUNCTION(ibase_fetch_object)
}
/* }}} */
-
/* {{{ proto int ibase_free_result(int result)
Free the memory used by a result */
PHP_FUNCTION(ibase_free_result)
}
/* }}} */
-
/* {{{ proto int ibase_prepare([int link_identifier,] string query)
Prepare a query for later execution */
PHP_FUNCTION(ibase_prepare)
}
/* }}} */
-
/* {{{ proto int ibase_execute(int query [, int bind_args [, int ...]])
Execute a previously prepared query */
PHP_FUNCTION(ibase_execute)
}
/* }}} */
-
/* {{{ proto int ibase_free_query(int query)
Free memory used by a query */
PHP_FUNCTION(ibase_free_query)
}
/* }}} */
-
/* {{{ proto int ibase_timefmt(string format)
Sets the format of timestamp, date and time columns returned from queries */
PHP_FUNCTION(ibase_timefmt)
}
/* }}} */
-
/* {{{ proto int ibase_num_fields(int result)
Get the number of fields in result */
PHP_FUNCTION(ibase_num_fields)
}
/* }}} */
-
/* {{{ proto array ibase_field_info(int result, int field_number)
Get information about a field */
PHP_FUNCTION(ibase_field_info)
}
/* }}} */
-
/* blobs ----------------------------------- */
-
/* {{{ _php_ibase_blob_info(isc_blob_handle bl_handle,IBASE_BLOBINFO *bl_info) */
static int _php_ibase_blob_info(isc_blob_handle bl_handle,IBASE_BLOBINFO *bl_info)
{
}
/* }}} */
-
/* {{{ proto int ibase_blob_create([int link_identifier])
Create blob for adding data */
PHP_FUNCTION(ibase_blob_create)
}
/* }}} */
-
/* {{{ proto int ibase_blob_open(string blob_id)
Open blob for retriving data parts */
PHP_FUNCTION(ibase_blob_open)
}
/* }}} */
-
/* {{{ proto int ibase_blob_add(int blob_id, string data)
Add data into created blob */
PHP_FUNCTION(ibase_blob_add)
}
/* }}} */
-
/* {{{ proto string ibase_blob_get(int blob_id, int len)
Get len bytes data from open blob */
PHP_FUNCTION(ibase_blob_get)
}
/* }}} */
-
#define BLOB_CLOSE 1
#define BLOB_CANCEL 2
}
/* }}} */
-
/* {{{ proto int ibase_blob_close(int blob_id)
Close blob */
PHP_FUNCTION(ibase_blob_close)
}
/* }}} */
-
/* {{{ proto int ibase_blob_cancel(int blob_id)
Cancel creating blob */
PHP_FUNCTION(ibase_blob_cancel)
}
/* }}} */
-
/* {{{ proto object ibase_blob_info(string blob_id_str)
Return blob length and other useful info */
PHP_FUNCTION(ibase_blob_info)
}
/* }}} */
-
/* {{{ proto int ibase_blob_echo(string blob_id_str)
Output blob contents to browser */
PHP_FUNCTION(ibase_blob_echo)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
-
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
}
/* }}} */
-
/* {{{ proto long mailparse_msg_get_part(resource rfc2045, string mimesection)
Return a handle on a given section in a mimemessage
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: tw=78 ts=4 sw=4
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
for (q=p->firstpart; q; q=q->next) ++n;
return (n);
}
+
/*
- * vim:tw=78 sw=4 ts=4
- * */
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
** ---------------------------------------------------------------------
*/
+/* {{{ get_method_path
+ */
static void get_method_path(const char *p,
const char **method,
unsigned *methodl,
*methodl=0;
*path=p;
}
+/* }}} */
+/* {{{ rfc2045_append_url
+ */
char *rfc2045_append_url(const char *base, const char *loc)
{
const char *base_method;
return (buf);
}
+/* }}} */
char *rfc2045_content_base(struct rfc2045 *p)
{
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: tw=78 ts=4 sw=4
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
php_mcrypt_do_crypt (Z_STRVAL_PP(cipher), key, data, Z_STRVAL_PP(mode), iv, argc, MCRYPT_ENCRYPT, return_value);
}
-
+/* }}} */
/* {{{ proto string mcrypt_decrypt(string cipher, string key, string data, string mode, string iv)
OFB crypt/decrypt data using key key with cipher cipher starting with iv */
php_mcrypt_do_crypt (Z_STRVAL_PP(cipher), key, data, Z_STRVAL_PP(mode), iv, argc, MCRYPT_DECRYPT, return_value);
}
-
+/* }}} */
/* {{{ proto string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)
ECB crypt/decrypt data using key key with cipher cipher starting with iv */
php_mcrypt_do_crypt (Z_STRVAL_PP(cipher), key, data, "ecb", iv, argc, Z_LVAL_PP(mode), return_value);
}
-
+/* }}} */
/* {{{ proto string mcrypt_cbc(int cipher, string key, string data, int mode, string iv)
CBC crypt/decrypt data using key key with cipher cipher starting with iv */
php_mcrypt_do_crypt (Z_STRVAL_PP(cipher), key, data, "cbc", iv, argc, Z_LVAL_PP(mode), return_value);
}
-
+/* }}} */
/* {{{ proto string mcrypt_cfb(int cipher, string key, string data, int mode, string iv)
CFB crypt/decrypt data using key key with cipher cipher starting with iv */
php_mcrypt_do_crypt (Z_STRVAL_PP(cipher), key, data, "cfb", iv, argc, Z_LVAL_PP(mode), return_value);
}
-
+/* }}} */
/* {{{ proto string mcrypt_ofb(int cipher, string key, string data, int mode, string iv)
OFB crypt/decrypt data using key key with cipher cipher starting with iv */
php_mcrypt_do_crypt (Z_STRVAL_PP(cipher), key, data, "ofb", iv, argc, Z_LVAL_PP(mode), return_value);
}
+/* }}} */
#endif
}
/* }}} */
-
/* {{{ proto string mcrypt_cbc(int cipher, string key, string data, int mode [, string iv])
CBC crypt/decrypt data using key key with cipher cipher using optional iv */
PHP_FUNCTION(mcrypt_cbc)
#endif /* MCRYPT_2_2 */
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
RETURN_FALSE;
}
}
-
/* }}} */
-
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
/* }}} */
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: |
+ | Authors: |
| Initial version by Alex Barkov <bar@izhcom.ru> |
| and Ramil Kalimullin <ram@izhcom.ru> |
| Further development by Sergey Kartashoff <gluke@biosys.net> |
#include <udm_config.h>
#include <udmsearch.h>
+/* {{{ mnogosearch_functions[]
+ */
function_entry mnogosearch_functions[] = {
PHP_FE(udm_api_version, NULL)
{NULL, NULL, NULL}
};
-
+/* }}} */
zend_module_entry mnogosearch_module_entry = {
"mnogosearch",
UdmFreeResult(Res);
}
+/* {{{ PHP_MINIT_FUNCTION
+ */
DLEXPORT PHP_MINIT_FUNCTION(mnogosearch)
{
UdmInit();
return SUCCESS;
}
-
+/* }}} */
DLEXPORT PHP_MSHUTDOWN_FUNCTION(mnogosearch)
{
}
/* }}} */
-
/* {{{ proto int udm_set_agent_param(int agent, int var, string val)
Set mnoGoSearch agent session parameters */
DLEXPORT PHP_FUNCTION(udm_set_agent_param)
}
/* }}} */
-
/* {{{ proto int udm_load_ispell_data(int agent, int var, string val1, string val2, int flag)
Load ispell data */
DLEXPORT PHP_FUNCTION(udm_load_ispell_data)
}
/* }}} */
-
/* {{{ proto int udm_free_ispell_data(int agent)
Free memory allocated for ispell data */
DLEXPORT PHP_FUNCTION(udm_free_ispell_data)
}
/* }}} */
-
/* {{{ proto int udm_add_search_limit(int agent, int var, string val)
Add mnoGoSearch search restrictions */
DLEXPORT PHP_FUNCTION(udm_add_search_limit)
}
/* }}} */
-
/* {{{ proto int udm_clear_search_limits(int agent)
Clear all mnoGoSearch search restrictions */
DLEXPORT PHP_FUNCTION(udm_clear_search_limits)
}
/* }}} */
-
/* {{{ proto int udm_find(int agent, string query)
Perform search */
DLEXPORT PHP_FUNCTION(udm_find)
}
/* }}} */
-
/* {{{ proto string udm_get_res_field(int res, int row, int field)
Fetch mnoGoSearch result field */
DLEXPORT PHP_FUNCTION(udm_get_res_field){
}
/* }}} */
-
/* {{{ proto string udm_get_res_param(int res, int param)
Get mnoGoSearch result parameters */
DLEXPORT PHP_FUNCTION(udm_get_res_param)
}
/* }}} */
-
/* {{{ proto int udm_free_res(int res)
mnoGoSearch free result */
DLEXPORT PHP_FUNCTION(udm_free_res)
}
/* }}} */
-
/* {{{ proto int udm_free_agent(int agent)
Free mnoGoSearch session */
DLEXPORT PHP_FUNCTION(udm_free_agent)
}
/* }}} */
-
/* {{{ proto int udm_errno(int agent)
Get mnoGoSearch error number */
DLEXPORT PHP_FUNCTION(udm_errno)
}
/* }}} */
-
/* {{{ proto string udm_error(int agent)
Get mnoGoSearch error message */
DLEXPORT PHP_FUNCTION(udm_error)
}
/* }}} */
-
/* {{{ proto int udm_api_version()
Get mnoGoSearch API version */
DLEXPORT PHP_FUNCTION(udm_api_version)
}
/* }}} */
-
/* {{{ proto array udm_cat_list(int agent, string category)
Get mnoGoSearch categories list with the same root */
DLEXPORT PHP_FUNCTION(udm_cat_list)
}
/* }}} */
-
/* {{{ proto array udm_cat_path(int agent, string category)
Get mnoGoSearch categories path from the root to the given catgory */
DLEXPORT PHP_FUNCTION(udm_cat_path)
}
/* }}} */
-
#if UDM_VERSION_ID > 30110
/* {{{ proto int udm_get_doc_count(int agent)
Get total number of documents in database */
#endif
-
/*
* Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
-
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
--- /dev/null
+This extension cannot be distributed with PHP - It is GPL'ed
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
RETVAL_STRING("UNKNOWN",1);
}
}
+/* }}} */
/* {{{ proto int ocirowcount(int stmt)
Return the row count of an OCI statement */
return (oci_collection *) NULL;
}
}
-
-
+/* }}} */
/* {{{ proto string ocifreecollection(object lob)
Deletes collection object*/
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
-
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 8
* c-basic-offset: 8
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
+----------------------------------------------------------------------+
*/
+/* $Id$ */
+
/* comment out the next line if you're on Oracle 7.x and don't have the olog
call. */
static int le_conn, le_pconn, le_cursor;
+/* {{{ prototypes
+ */
PHP_FUNCTION(ora_bind);
PHP_FUNCTION(ora_close);
PHP_FUNCTION(ora_commit);
PHP_MSHUTDOWN_FUNCTION(oracle);
PHP_RSHUTDOWN_FUNCTION(oracle);
PHP_MINFO_FUNCTION(oracle);
+/* }}} */
+/* {{{ oracle_functions[]
+ */
function_entry oracle_functions[] = {
PHP_FE(ora_bind, NULL)
PHP_FE(ora_close, NULL)
PHP_FE(ora_rollback, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
+/* {{{ oracle_module_entry
+ */
zend_module_entry oracle_module_entry = {
"oracle",
oracle_functions,
PHP_MINFO(oracle),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
+/* {{{ ora_func_tab[]
+ */
static const text *ora_func_tab[] =
{(text *) "unused",
/* 1, 2 */ (text *) "unused", (text *) "OSQL",
/* 59, 60 */ (text *) "unused", (text *) "ODESCR",
/* 61, 62 */ (text *) "unused", (text *) "OBNDRA"
};
+/* }}} */
#ifdef COMPILE_DL_ORACLE
ZEND_GET_MODULE(oracle)
#endif
+/* {{{ _close_oraconn
+ */
static int _close_oraconn(zend_rsrc_list_entry *rsrc)
{
oraConnection *conn = (oraConnection *)rsrc->ptr;
return 1;
}
+/* }}} */
+/* {{{ pval_ora_param_destructor
+ */
static void
pval_ora_param_destructor(oraParam *param)
{
efree(param->progv);
}
}
+/* }}} */
-
+/* {{{ _close_oracur
+ */
static int _close_oracur(oraCursor *cur)
{
int i;
return 1;
}
+/* }}} */
+/* {{{ php_close_ora_cursor
+ */
static void php_close_ora_cursor(zend_rsrc_list_entry *rsrc)
{
oraCursor *cur = (oraCursor *)rsrc->ptr;
_close_oracur(cur);
}
+/* }}} */
+/* {{{ php_ora_init_globals
+ */
static void php_ora_init_globals(ORALS_D)
{
if (cfg_get_long("oracle.allow_persistent",
memset((void*) &ORA(db_err_conn),0,sizeof(ORA(db_err_conn)));
}
+/* }}} */
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(oracle)
{
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_RINIT_FUNCTION
+ */
PHP_RINIT_FUNCTION(oracle)
{
ORALS_FETCH();
*/
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(oracle)
{
ORALS_FETCH();
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_RSHUTDOWN_FUNCTION
+ */
PHP_RSHUTDOWN_FUNCTION(oracle)
{
return SUCCESS;
-
}
+/* }}} */
+/* {{{ _ora_ping
+ */
static int _ora_ping(oraConnection *conn)
{
Cda_Def cda;
return 1;
}
+/* }}} */
/*
** PHP functions
}
/* }}} */
+/* {{{ ora_do_logon
+ */
void ora_do_logon(INTERNAL_FUNCTION_PARAMETERS, int persistent)
{
char *user,*passwd;
efree(hashed_details);
}
+/* }}} */
/* {{{ proto int ora_logoff(int connection)
Close an Oracle connection */
}
/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(oracle)
{
#endif
php_info_print_table_end();
}
-
+/* }}} */
/*
** Functions internal to this module.
*/
+/* {{{ ora_get_cursor
+ */
static oraCursor *
ora_get_cursor(HashTable *list, pval **ind)
{
return cursor;
}
+/* }}} */
+/* {{{ ora_error
+ */
static char *
ora_error(Cda_Def * cda)
{
}
return (char *) errmsg;
}
+/* }}} */
+/* {{{ ora_describe_define
+ */
static sword
ora_describe_define(oraCursor * cursor)
{
}
return 1;
}
+/* }}} */
+/* {{{ ora_set_param_values
+ */
int ora_set_param_values(oraCursor *cursor, int isout)
{
char *paramname;
return 1;
}
+/* }}} */
#endif /* HAVE_ORACLE */
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
| Copyright (c) 1997-2001 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
+ | 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_02.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 |
+ | obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Dimitris Souflis <dsouflis@acm.org>, <dsouflis@ovrimos.com> |
+----------------------------------------------------------------------+
*/
+/* $Id$ */
+
#include <php.h>
#include <php_globals.h>
#include <zend_API.h>
/* }}} */
+/* {{{ column_to_string
+ */
static void column_to_string(SQLS stmt, int i, char *buffer, int *len)
{
const char *bf = sqlColValue(stmt, i, 0);
break;
}
}
+/* }}} */
/* {{{ proto int ovrimos_fetch_into(int result_id, array result_array [, string how, [int rownumber]])
Fetch one result row into an array
/* }}} */
#endif
+/* {{{ ovrimos_functions[]
+ */
function_entry ovrimos_functions[] = {
/* PHP_FE(ovrimos_setoption, NULL)*/
/* PHP_FE(ovrimos_autocommit, NULL)*/
PHP_FE(ovrimos_longreadlen, NULL)
PHP_FALIAS(ovrimos_do, ovrimos_exec, NULL) {NULL, NULL, NULL}
};
+/* }}} */
zend_module_entry ovrimos_module_entry = {
"Ovrimos",
{
return &ovrimos_module_entry;
};
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
/*
+----------------------------------------------------------------------+
- | PHP HTML Embedded Scripting Language Version 3.0 |
+ | PHP version 4.0 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-1999 PHP Development Team (See Credits file) |
+ | Copyright (c) 1997-2001 The PHP Group |
+----------------------------------------------------------------------+
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of one of the following licenses: |
- | |
- | A) the GNU General Public License as published by the Free Software |
- | Foundation; either version 2 of the License, or (at your option) |
- | any later version. |
- | |
- | B) the PHP License as published by the PHP Development Team and |
- | included in the distribution in the file: LICENSE |
- | |
- | This program is distributed in the hope that it will be useful, |
- | but WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- | GNU General Public License for more details. |
- | |
- | You should have received a copy of both licenses referred to here. |
- | If you did not, or have any questions about PHP licensing, please |
- | contact core@php.net. |
+ | This source file is subject to version 2.02 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_02.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> |
+----------------------------------------------------------------------+
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: |
- | |
+----------------------------------------------------------------------+
*/
-/* You should tweak config.m4 so this symbol (or some else suitable)
- gets defined.
-*/
+/* $Id$ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
qtdom_functions,
PHP_MINIT(qtdom),
PHP_MSHUTDOWN(qtdom),
- PHP_RINIT(qtdom), /* Replace with NULL if there's nothing to do at request start */
- PHP_RSHUTDOWN(qtdom), /* Replace with NULL if there's nothing to do at request end */
+ NULL,
+ NULL,
PHP_MINFO(qtdom),
STANDARD_MODULE_PROPERTIES
};
ZEND_GET_MODULE(qtdom)
#endif
-/* Remove comments and fill if you need to have entries in php.ini
-PHP_INI_BEGIN()
-PHP_INI_END()
-*/
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(qtdom)
{
/* Remove comments if you have entries in php.ini
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(qtdom)
{
-/* Remove comments if you have entries in php.ini
- UNREGISTER_INI_ENTRIES();
-*/
qdom_shutdown();
return SUCCESS;
}
+/* }}} */
-/* Remove if there's nothing to do at request start */
-PHP_RINIT_FUNCTION(qtdom)
-{
- return SUCCESS;
-}
-
-/* Remove if there's nothing to do at request end */
-PHP_RSHUTDOWN_FUNCTION(qtdom)
-{
- return SUCCESS;
-}
-
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(qtdom)
{
php_info_print_table_start();
php_info_print_table_header(2, "qtdom support", "enabled");
php_info_print_table_end();
-
- /* Remove comments if you have entries in php.ini
- DISPLAY_INI_ENTRIES();
- */
}
+/* }}} */
-/* Remove the following function when you have succesfully modified config.m4
- so that your module can be compiled into PHP, it exists only for testing
- purposes. */
-
-/* Helper function for creating the attributes, returns the number of attributes found
- or -1 if an error occured */
-
+/* {{{ qdom_find_attributes
+ * Helper function for creating the attributes, returns the number
+ * of attributes found or -1 if an error occured */
int qdom_find_attributes( zval **children, struct qdom_attribute *attr )
{
zval *child;
return count;
}
+/* }}} */
-/* Helper function for recursively going trough the QDomNode tree and creating
+/* {{{ qdom_find_children
+ Helper function for recursively going trough the QDomNode tree and creating
the same in PHP objects. Returns the number of children or -1 if an error
occured. */
-
int qdom_find_children( zval **children, struct qdom_node *orig_node )
{
zval *child;
qdom_do_node_free( tmp_node );
return count;
}
+/* }}} */
/* {{{ proto object qdom_tree( string )
creates a tree of an xml string */
#endif /* HAVE_QTDOM */
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
static unsigned char third_through_seventh_args_force_ref[] =
{7, BYREF_NONE, BYREF_NONE, BYREF_FORCE, BYREF_FORCE, BYREF_FORCE, BYREF_FORCE, BYREF_FORCE};
-
+/* {{{ sockets_functions[]
+ */
function_entry sockets_functions[] = {
PHP_FE(socket_fd_alloc, NULL)
PHP_FE(socket_fd_free, NULL)
PHP_FE(socket_shutdown, NULL)
{NULL, NULL, NULL}
};
-
+/* }}} */
zend_module_entry sockets_module_entry = {
"sockets",
return retval;
}
-/* php_read -- wrapper around read() so that it only reads to a \r or \n. */
+/* {{{ php_read -- wrapper around read() so that it only reads to a \r or \n. */
int php_read(int socket, void *buf, int maxlen)
{
int m = 0, n = 0;
return n;
}
+/* }}} */
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(sockets)
{
struct protoent *pe;
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(sockets)
{
php_info_print_table_start();
php_info_print_table_row(2, "Sockets Support", "enabled");
php_info_print_table_end();
}
-
-
+/* }}} */
/* {{{ proto resource socket_fd_alloc(void)
Allocates a new file descriptor set */
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vimo<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
}
}
-
+/* {{{ convert_browscap_pattern
+ */
static void convert_browscap_pattern(zval *pattern)
{
register int i,j;
pattern->value.str.val = t;
pattern->value.str.len = j;
}
+/* }}} */
-
+/* {{{ php_browscap_parser_cb
+ */
static void php_browscap_parser_cb(zval *arg1, zval *arg2, int callback_type, void *arg)
{
switch (callback_type) {
break;
}
}
+/* }}} */
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(browscap)
{
char *browscap = INI_STR("browscap");
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(browscap)
{
if (INI_STR("browscap")) {
}
return SUCCESS;
}
+/* }}} */
-
+/* {{{ browser_reg_compare
+ */
static int browser_reg_compare(zval **browser,int num_args, va_list args, zend_hash_key *key)
{
zval **browser_name;
regfree(&r);
return 0;
}
+/* }}} */
/* {{{ proto object get_browser(string browser_name)
Get information about the capabilities of a browser */
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#define CREDIT_LINE(module, authors) php_info_print_table_row(2, module, authors)
+/* {{{ php_print_credits
+ */
PHPAPI void php_print_credits(int flag)
{
if (flag & PHP_CREDITS_FULLPAGE) {
PUTS("</body></html>\n");
}
}
+/* }}} */
+
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
/* }}} */
#endif
-
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#include <stdio.h>
-
-
-
/*****************************************************************************
* This is codetables for different Cyrillic charsets (relative to koi8-r).
* Each table contains data for 128-255 symbols from ASCII table.
typedef unsigned char _cyr_charset_table[512];
+/* {{{ const static _cyr_charset_table _cyr_win1251
+ */
const static _cyr_charset_table _cyr_win1251 = {
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
158,128,129,150,132,133,148,131,149,136,137,138,139,140,141,142,
143,159,144,145,146,147,134,130,156,155,135,152,157,153,151,154,
};
+/* }}} */
-
-/*****************************************************************************
+/* {{{ php_convert_cyr_string
* This is the function that performs real in-place conversion of the string
* between charsets.
* Parameters:
}
return (char *)str;
}
+/* }}} */
/* {{{ proto string convert_cyr_string(string str, string from, string to)
Convert from one Cyrillic character set to another */
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
}
/* }}} */
+/* {{{ php_mktime
+ */
void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm)
{
pval **arguments[7];
RETURN_LONG(seconds);
}
+/* }}} */
/* {{{ proto int mktime(int hour, int min, int sec, int mon, int day, int year)
Get UNIX timestamp for a date */
}
/* }}} */
+/* {{{ php_date
+ */
static void
php_date(INTERNAL_FUNCTION_PARAMETERS, int gm)
{
return_value->value.str.len = strlen(return_value->value.str.val);
return_value->type = IS_STRING;
}
+/* }}} */
/* {{{ proto string date(string format [, int timestamp])
Format a local time/date */
}
/* }}} */
-/* Return date string in standard format for http headers */
+/* {{{ php_std_date
+ Return date string in standard format for http headers */
char *php_std_date(time_t t)
{
struct tm *tm1, tmbuf;
str[79]=0;
return (str);
}
-
+/* }}} */
/* {{{ proto bool checkdate(int month, int day, int year)
Returns true(1) if it is a valid date in gregorian calendar */
/* }}} */
#if HAVE_STRFTIME
+/* {{{ _php_strftime
+ */
void _php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm)
{
pval **format_arg, **timestamp_arg;
efree(buf);
RETURN_FALSE;
}
+/* }}} */
+
/* {{{ proto string strftime(string format [, int timestamp])
Format a local time/date according to locale settings */
PHP_FUNCTION(strftime)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#define USING_ZTS 0
#endif
+/* {{{ php_dl
+ */
void php_dl(pval *file, int type, pval *return_value)
{
void *handle;
RETURN_TRUE;
}
-
+/* }}} */
PHP_MINFO_FUNCTION(dl)
{
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
/* $Id$ */
+/* {{{ includes
+ */
#include "php.h"
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include "dns.h"
+/* }}} */
char *php_gethostbyaddr(char *ip);
char *php_gethostbyname(char *name);
}
/* }}} */
-
+/* {{{ php_gethostbyaddr
+ */
char *php_gethostbyaddr(char *ip)
{
struct in_addr addr;
}
return estrdup(hp->h_name);
}
+/* }}} */
/* {{{ proto string gethostbyname(string hostname)
Get the IP address corresponding to a given Internet host name */
}
/* }}} */
+/* {{{ php_gethostbyname
+ */
char *php_gethostbyname(char *name)
{
struct hostent *hp;
memcpy(&in.s_addr, *(hp->h_addr_list), sizeof(in.s_addr));
return estrdup(inet_ntoa(in));
}
+/* }}} */
#if HAVE_RES_SEARCH && !(defined(__BEOS__)||defined(PHP_WIN32))
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#include <signal.h>
#endif
-/*
+/* {{{ php_Exec
* If type==0, only last line of output is returned (exec)
* If type==1, all lines will be printed and last lined returned (system)
* If type==2, all lines will be saved to given array (exec with &$array)
efree(buf);
return FG(pclose_ret);
}
+/* }}} */
/* {{{ proto string exec(string command [, array output [, int return_value]])
Execute an external program */
}
/* }}} */
+/* {{{ php_get_index
+ */
static int php_get_index(char *s, char c)
{
register int x;
return -1;
}
+/* }}} */
-/* Escape all chars that could possibly be used to
+/* {{{ php_escape_shell_cmd
+ Escape all chars that could possibly be used to
break out of a shell command
This function emalloc's a string and returns the pointer.
}
return cmd;
}
+/* }}} */
+/* {{{ php_escape_shell_arg
+ */
char * php_escape_shell_arg(char *str) {
register int x, y, l;
char *cmd;
cmd[l] = '\0';
return cmd;
}
+/* }}} */
/* {{{ proto string escapeshellcmd(string command)
Escape shell metacharacters */
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
/* }}} */
#if HAVE_PHP_STREAM
+/* {{{ PHP_FUNCTION
+ */
PHP_FUNCTION(fopenstream)
{
zval ** zfilename, ** zmode;
}
ZEND_REGISTER_RESOURCE(return_value, stream, le_stream);
}
+/* }}} */
#endif
/* {{{ proto int fopen(string filename, string mode [, int use_include_path])
}
/* }}} */
-
/* {{{ proto int unlink(string filename)
Delete a file */
PHP_FUNCTION(unlink)
}
/* }}} */
-
/* {{{ proto int ftruncate (int fp, int size)
Truncate file to 'size' length */
PHP_NAMED_FUNCTION(php_if_ftruncate)
}
/* }}} */
-
/* {{{ proto int copy(string source_file, string destination_file)
Copy a file */
/* }}} */
-
+/* {{{ php_copy_file
+ */
PHPAPI int php_copy_file(char *src, char *dest)
{
char buffer[8192];
close(fd_t);
return ret;
}
-
-
-
+/* }}} */
/* {{{ proto string fread(int fp, int length)
Binary-safe file read */
}
/* }}} */
+
/* {{{ proto array fgetcsv(int fp, int length [, string delimiter])
Get line from file pointer and parse for CSV fields */
static fd_set readfd;
static int max_fd;
-
+/* {{{ PHP_FUNCTION(fd_set)
+ */
PHP_FUNCTION(fd_set)
{
pval **arg;
}
RETURN_LONG(1);
}
+/* }}} */
+/* {{{ PHP_FUNCTION(select)
+ */
PHP_FUNCTION(select)
{
pval **timeout;
RETURN_LONG(select(max_fd + 1,&readfd,NULL,NULL,((*timeout)->value.lval <= 0) ? NULL : &tv));
}
+/* }}} */
+/* {{{ PHP_FUNCTION(fd_isset)
+ */
PHP_FUNCTION(fd_isset)
{
pval **fdarg;
}
RETURN_FALSE;
}
+/* }}} */
#endif
-/* Function reads all data from file or socket and puts it into the buffer */
+/* {{{ php_fread_all
+ Function reads all data from file or socket and puts it into the buffer */
size_t php_fread_all(char **buf, int socket, FILE *fp, int issock) {
size_t ret;
char *ptr;
return len;
}
+/* }}} */
/* See http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2 */
#define PHP_META_HTML401_CHARS "-_.:"
-/* Tokenizes an HTML file for get_meta_tags */
+/* {{{ php_next_meta_token
+ Tokenizes an HTML file for get_meta_tags */
php_meta_tags_token php_next_meta_token(FILE *fp, int socketd, int issock, int *use_last_char, int *last_char, char **data, int *datalen) {
int ch, compliment;
char buff[META_DEF_BUFSIZE + 1];
return TOK_EOF;
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: tw=78 sw=4 ts=4 fdm=marker
+ * vim600: tw=78 sw=4 ts=4 fdm=marker
+ * vim<600: tw=78 sw=4 ts=4
*/
}
/* }}} */
-
/* {{{ proto bool chmod(string filename, int mode)
Change file mode */
PHP_FUNCTION(chmod)
}
/* }}} */
-
/* {{{ proto bool touch(string filename [, int time])
Set modification time of file */
PHP_FUNCTION(touch)
}
/* }}} */
-
/* {{{ proto void clearstatcache(void)
Clear file stat cache */
PHP_FUNCTION(clearstatcache)
#define IS_LINK_OPERATION() (type == 8 /* filetype */ || type == 14 /* is_link */ || type == 16 /* lstat */)
+/* {{{ php_stat
+ */
static void php_stat(const char *filename, php_stat_len filename_length, int type, pval *return_value)
{
zval *stat_dev,*stat_ino,*stat_mode,*stat_nlink,*stat_uid,*stat_gid,*stat_rdev,
php_error(E_WARNING, "didn't understand stat call");
RETURN_FALSE;
}
+/* }}} */
/* another quickie macro to make defining similar functions easier */
#define FileFunction(name, funcnum) \
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#endif /* !defined(HAVE_FLOCK) */
#if !(HAVE_INET_ATON)
-
-/*
+/* {{{ inet_aton
* Check whether "cp" is a valid ascii representation
* of an Internet address and convert to a binary address.
* Returns 1 if the address is valid, 0 if not.
* This replaces inet_addr, the return value from which
* cannot distinguish between failure and a local broadcast address.
*/
-
int inet_aton(const char *cp, struct in_addr *ap)
{
int dots = 0;
return 1;
}
-
+/* }}} */
#endif /* !HAVE_INET_ATON */
/*
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
return num;
}
-
-/*
+/* {{{ php_formatted_print
* New sprintf implementation for PHP.
*
* Modifiers:
*len = outpos;
return result;
}
+/* }}} */
/* {{{ proto string sprintf(string format [, mixed arg1 [, mixed ...]])
Return a formatted string */
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
}
/* }}} */
+
/* {{{ module start/shutdown functions */
/* {{{ php_msock_destroy */
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
return strtol(tmp_line, NULL, 10);
}
-
+/* {{{ php_fopen_url_wrap_ftp
+ */
FILE *php_fopen_url_wrap_ftp(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path)
{
FILE *fp=NULL;
*socketd = 0;
return NULL;
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
}
/* }}} */
+/* {{{ php_header
+ */
PHPAPI int php_header()
{
SLS_FETCH();
return 1; /* allow output */
}
}
+/* }}} */
-
+/* {{{ php_push_cookie_list
+ */
void php_push_cookie_list(char *name, char *value, time_t expires, char *path, char *domain, int secure)
{
CookieList *new;
new->secure = secure;
top = new;
}
+/* }}} */
+/* {{{ php_pop_cookie_list
+ */
CookieList *php_pop_cookie_list(void)
{
CookieList *ret;
top = top->next;
return (ret);
}
+/* }}} */
/* php_set_cookie(name,value,expires,path,domain,secure) */
/* {{{ proto void setcookie(string name [, string value [, int expires [, string path [, string domain [, string secure]]]]])
}
/* }}} */
+/* {{{ php_headers_unsent
+ */
int php_headers_unsent(void)
{
if (php_header_printed!=1 || !php_print_header) {
return 0;
}
}
+/* }}} */
/* {{{ proto int headers_sent(void)
Return true if headers have already been sent, false otherwise */
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
{ NULL }
};
+/* {{{ get_next_char
+ */
inline static unsigned short get_next_char(enum entity_charset charset,
unsigned char * str,
int * newpos,
*mbseqlen = mbpos;
return this_char;
}
+/* }}} */
-/* returns the charset identifier based on current locale or a hint.
+/* {{{ entity_charset determine_charset
+ * returns the charset identifier based on current locale or a hint.
* defaults to iso-8859-1 */
static enum entity_charset determine_charset(char * charset_hint)
{
return charset;
}
+/* }}} */
+/* {{{ php_escape_html_entities
+ */
PHPAPI char *php_escape_html_entities(unsigned char *old, int oldlen, int *newlen, int all, int quote_style, char * hint_charset)
{
int i, maxlen, len;
}
+/* }}} */
+/* {{{ php_html_entities
+ */
static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all)
{
zval **arg, **quotes, **charset;
new = php_escape_html_entities((*arg)->value.str.val, (*arg)->value.str.len, &len, all, quote_style, hint_charset);
RETVAL_STRINGL(new,len,0);
}
+/* }}} */
#define HTML_SPECIALCHARS 0
#define HTML_ENTITIES 1
+/* {{{ register_html_constants
+ */
void register_html_constants(INIT_FUNC_ARGS)
{
REGISTER_LONG_CONSTANT("HTML_SPECIALCHARS", HTML_SPECIALCHARS, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("ENT_QUOTES", ENT_QUOTES, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("ENT_NOQUOTES", ENT_NOQUOTES, CONST_PERSISTENT|CONST_CS);
}
+/* }}} */
/* {{{ proto string htmlspecialchars(string string [, int quote_style][, string charset])
Convert special characters to HTML entities */
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#define HTTP_HEADER_BLOCK_SIZE 128
+/* {{{ php_fopen_url_wrap_http
+ */
FILE *php_fopen_url_wrap_http(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path)
{
FILE *fp=NULL;
}
return (fp);
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
unsigned int channels;
};
-/* routine to handle GIF files. If only everything were that easy... ;} */
+/* {{{ php_handle_gif
+ * routine to handle GIF files. If only everything were that easy... ;} */
static struct gfxinfo *php_handle_gif (int socketd, FILE *fp, int issock)
{
struct gfxinfo *result = NULL;
return result;
}
+/* }}} */
-
+/* {{{ php_handle_psd
+ */
static struct gfxinfo *php_handle_psd (int socketd, FILE *fp, int issock)
{
struct gfxinfo *result = NULL;
return result;
}
+/* }}} */
-
+/* {{{ php_handle_bmp
+ */
static struct gfxinfo *php_handle_bmp (int socketd, FILE *fp, int issock)
{
struct gfxinfo *result = NULL;
return result;
}
+/* }}} */
-
-/* routines to handle SWF files. */
+/* {{{ php_swf_get_bits
+ * routines to handle SWF files. */
static unsigned long int php_swf_get_bits (unsigned char* buffer, unsigned int pos, unsigned int count)
{
unsigned int loop;
}
return result;
}
+/* }}} */
-
+/* {{{ php_handle_swf
+ */
static struct gfxinfo *php_handle_swf (int socketd, FILE *fp, int issock)
{
struct gfxinfo *result = NULL;
php_swf_get_bits (a, 5 + (2 * bits), bits)) / 20;
return result;
}
+/* }}} */
-/* routine to handle PNG files */
+/* {{{ php_handle_png
+ * routine to handle PNG files */
static struct gfxinfo *php_handle_png (int socketd, FILE *fp, int issock)
{
struct gfxinfo *result = NULL;
result->height = (unsigned int) in_height;
return result;
}
+/* }}} */
/* routines to handle JPEG data */
#define M_APP14 0xee
#define M_APP15 0xef
+/* {{{ php_read2
+ */
static unsigned short php_read2(int socketd, FILE *fp, int issock)
{
unsigned char a[2];
return (((unsigned short) a[ 0 ]) << 8) + ((unsigned short) a[ 1 ]);
}
+/* }}} */
+/* {{{ php_next_marker
+ */
static unsigned int php_next_marker(int socketd, FILE *fp, int issock)
/* get next marker byte from file */
{
return (unsigned int) c;
}
+/* }}} */
+/* {{{ php_skip_variable
+ */
static void php_skip_variable(int socketd, FILE *fp, int issock)
/* skip over a variable-length block; assumes proper length marker */
{
FP_FREAD(tmp, (long) length, socketd, fp, issock); /* skip the header */
efree(tmp);
}
+/* }}} */
+/* {{{ php_read_APP
+ */
static void php_read_APP(int socketd, FILE *fp, int issock,unsigned int marker,pval *info)
{
unsigned short length;
efree(buffer);
}
+/* }}} */
-/* main loop to parse JPEG structure */
+/* {{{ php_handle_jpeg
+ main loop to parse JPEG structure */
static struct gfxinfo *php_handle_jpeg (int socketd, FILE *fp, int issock, pval *info)
{
struct gfxinfo *result = NULL;
return NULL;
}
+/* }}} */
/* main function */
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#define INCOMPLETE_CLASS "__PHP_Incomplete_Class"
#define MAGIC_MEMBER "__PHP_Incomplete_Class_Name"
+/* {{{ incomplete_class_message
+ */
static void incomplete_class_message(zend_property_reference *ref)
{
char buf[1024];
php_error(E_ERROR, "%s", buf);
}
+/* }}} */
+/* {{{ incomplete_class_call_func
+ */
static void incomplete_class_call_func(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference)
{
incomplete_class_message(property_reference);
}
+/* }}} */
+/* {{{ incomplete_class_set_property
+ */
static int incomplete_class_set_property(zend_property_reference *property_reference, zval *value)
{
incomplete_class_message(property_reference);
/* does not reach this point */
return (0);
}
+/* }}} */
+/* {{{ incomplete_class_get_property
+ */
static zval incomplete_class_get_property(zend_property_reference *property_reference)
{
zval foo;
memset(&foo, 0, sizeof(zval)); /* shut warnings up */
return (foo);
}
+/* }}} */
+/* {{{ php_create_incomplete_class
+ */
zend_class_entry *php_create_incomplete_class(BLS_D)
{
zend_class_entry incomplete_class;
return (BG(incomplete_class));
}
+/* }}} */
-
+/* {{{ php_lookup_class_name
+ */
char *php_lookup_class_name(zval *object, size_t *nlen, zend_bool del)
{
zval **val;
return (retval);
}
+/* }}} */
+/* {{{ php_store_class_name
+ */
void php_store_class_name(zval *object, const char *name, size_t len)
{
zval *val;
zend_hash_update(object->value.obj.properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER), &val, sizeof(val), NULL);
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
PHPAPI extern char *php_ini_opened_path;
+/* {{{ _display_module_info
+ */
static int _display_module_info(zend_module_entry *module, void *arg)
{
int show_info_func = *((int *) arg);
}
return 0;
}
+/* }}} */
-
+/* {{{ php_print_gpcse_array
+ */
static void php_print_gpcse_array(char *name, uint name_length ELS_DC)
{
zval **data, **tmp, tmp2;
}
}
}
+/* }}} */
+/* {{{ php_info_print_style
+ */
void php_info_print_style(void)
{
php_printf("<STYLE TYPE=\"text/css\"><!--\n");
php_printf("TH { font-family: arial,helvetica,sans-serif; font-size: 11pt; font-weight: bold; }\n");
php_printf("//--></STYLE>\n");
}
+/* }}} */
-
+/* {{{ php_get_uname
+ */
PHPAPI char *php_get_uname()
{
char *php_uname;
#endif
return estrdup(php_uname);
}
+/* }}} */
+/* {{{ php_print_info
+ */
PHPAPI void php_print_info(int flag)
{
char **env,*tmp1,*tmp2;
PUTS("</BODY></HTML>");
}
-
+/* }}} */
PHPAPI void php_info_print_table_start()
php_printf("<TR BGCOLOR=\"" PHP_HEADER_COLOR "\"><TH COLSPAN=%d>%s</TH></TR>\n", num_cols, header );
}
-
+/* {{{ php_info_print_table_header
+ */
PHPAPI void php_info_print_table_header(int num_cols, ...)
{
int i;
va_end(row_elements);
}
+/* }}} */
-
+/* {{{ php_info_print_table_row
+ */
PHPAPI void php_info_print_table_row(int num_cols, ...)
{
int i;
va_end(row_elements);
}
+/* }}} */
-
-
+/* {{{ register_phpinfo_constants
+ */
void register_phpinfo_constants(INIT_FUNC_ARGS)
{
REGISTER_LONG_CONSTANT("INFO_GENERAL", PHP_INFO_GENERAL, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("CREDITS_QA", PHP_CREDITS_QA, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("CREDITS_ALL", PHP_CREDITS_ALL, CONST_PERSISTENT|CONST_CS);
}
-
+/* }}} */
/* {{{ proto void phpinfo([int what])
Output a page of useful information about PHP and the current request */
}
/* }}} */
-
/* {{{ proto void phpcredits([int flag])
Prints the list of people who've contributed to the PHP project */
PHP_FUNCTION(phpcredits)
/* }}} */
-
/* {{{ proto string php_logo_guid(void)
Return the special ID used to request the PHP logo in phpinfo screens*/
PHP_FUNCTION(php_logo_guid)
}
/* }}} */
-
/* {{{ proto string zend_logo_guid(void)
Return the special ID used to request the Zend logo in phpinfo screens*/
PHP_FUNCTION(zend_logo_guid)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#define M_APP14 0xee
#define M_APP15 0xef
+/* {{{ php_iptc_put1
+ */
static int php_iptc_put1(FILE *fp,int spool,unsigned char c,unsigned char **spoolbuf)
{
if (spool > 0)
return c;
}
+/* }}} */
+/* {{{ php_iptc_get1
+ */
static int php_iptc_get1(FILE *fp,int spool,unsigned char **spoolbuf)
{
int c;
return c;
}
+/* }}} */
+/* {{{ php_iptc_read_remaining
+ */
static int php_iptc_read_remaining(FILE *fp,int spool,unsigned char **spoolbuf)
{
int c;
return M_EOI;
}
+/* }}} */
+/* {{{ php_iptc_skip_variable
+ */
static int php_iptc_skip_variable(FILE *fp,int spool,unsigned char **spoolbuf)
{
unsigned int length;
return 0;
}
+/* }}} */
+/* {{{ php_iptc_next_marker
+ */
static int php_iptc_next_marker(FILE *fp,int spool,unsigned char **spoolbuf)
{
int c;
return (unsigned int) c;
}
+/* }}} */
static char psheader[] = "\xFF\xED\0\0Photoshop 3.0\08BIM\x04\x04\0\0\0\0";
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
RETURN_DOUBLE(php_combined_lcg());
}
/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
#define LEVENSHTEIN_MAX_LENTH 255
-/* reference implementation, only optimized for memory usage, not speed */
+/* {{{ reference_levdist
+ * reference implementation, only optimized for memory usage, not speed */
static int reference_levdist(const char *s1, int l1,
const char *s2, int l2,
int cost_ins, int cost_rep, int cost_del )
return c0;
}
+/* }}} */
-
+/* {{{ custom_levdist
+ */
static int custom_levdist(char *str1,char *str2,char *callback_name)
{
php_error(E_WARNING,"the general Levenshtein support is not there yet");
return -1;
}
-
+/* }}} */
/* {{{ proto int levenshtein(string str1, string str2)
Calculate Levenshtein distance between two strings */
RETURN_LONG(distance);
}
/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
}
/* }}} */
-
#endif
/*
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: |
+ | Authors: Rasmus Lerdorf <rasmus@php.net> |
+----------------------------------------------------------------------+
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
(a) += (b); \
}
-/* MD5 initialization. Begins an MD5 operation, writing a new context.
+/* {{{ PHP_MD5Init
+ * MD5 initialization. Begins an MD5 operation, writing a new context.
*/
void PHP_MD5Init(PHP_MD5_CTX * context)
{
context->state[2] = 0x98badcfe;
context->state[3] = 0x10325476;
}
+/* }}} */
-/* MD5 block update operation. Continues an MD5 message-digest
+/* {{{ PHP_MD5Update
+ MD5 block update operation. Continues an MD5 message-digest
operation, processing another message block, and updating the
context.
*/
((unsigned char*) & context->buffer[index], (unsigned char*) & input[i],
inputLen - i);
}
+/* }}} */
-/* MD5 finalization. Ends an MD5 message-digest operation, writing the
+/* {{{ PHP_MD5Final
+ MD5 finalization. Ends an MD5 message-digest operation, writing the
the message digest and zeroizing the context.
*/
void PHP_MD5Final(unsigned char digest[16], PHP_MD5_CTX * context)
*/
memset((unsigned char*) context, 0, sizeof(*context));
}
+/* }}} */
-/* MD5 basic transformation. Transforms state based on block.
+/* {{{ MD5Transform
+ * MD5 basic transformation. Transforms state based on block.
*/
static void MD5Transform(state, block)
php_uint32 state[4];
/* Zeroize sensitive information. */
memset((unsigned char*) x, 0, sizeof(x));
}
+/* }}} */
-/* Encodes input (php_uint32) into output (unsigned char). Assumes len is
+/* {{{ Encode
+ Encodes input (php_uint32) into output (unsigned char). Assumes len is
a multiple of 4.
*/
static void Encode(output, input, len)
output[j + 3] = (unsigned char) ((input[i] >> 24) & 0xff);
}
}
+/* }}} */
-/* Decodes input (unsigned char) into output (php_uint32). Assumes len is
+/* {{{ Decode
+ Decodes input (unsigned char) into output (php_uint32). Assumes len is
a multiple of 4.
*/
static void Decode(output, input, len)
output[i] = ((php_uint32) input[j]) | (((php_uint32) input[j + 1]) << 8) |
(((php_uint32) input[j + 2]) << 16) | (((php_uint32) input[j + 3]) << 24);
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
/* Note is a letter is a 'break' in the word */
#define Isbreak(c) (!isalpha(c))
-
+/* {{{ metaphone
+ */
static int metaphone(char *word, int max_phonemes, char **phoned_word, int traditional)
{
int w_idx = 0; /* point in the phonization we're at. */
return 0;
} /* END metaphone */
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
}
/* }}} */
-
/* {{{ proto array gettimeofday(void)
Returns the current time as array */
PHP_FUNCTION(gettimeofday)
/* }}} */
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
return OG(php_header_write)(str, str_length);
}
-/* Start output buffering */
+/* {{{ php_start_ob_buffer
+ * Start output buffering */
PHPAPI int php_start_ob_buffer(zval *output_handler, uint chunk_size)
{
OLS_FETCH();
OG(php_body_write) = php_b_body_write;
return SUCCESS;
}
+/* }}} */
-
-/* End output buffering (one level) */
+/* {{{ php_end_ob_buffer
+ * End output buffering (one level) */
PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush)
{
char *final_buffer=NULL;
efree(to_be_destroyed_handled_output[1]);
}
}
+/* }}} */
-
-/* End output buffering (all buffers) */
+/* {{{ php_end_ob_buffers
+ * End output buffering (all buffers) */
PHPAPI void php_end_ob_buffers(zend_bool send_buffer)
{
OLS_FETCH();
php_end_ob_buffer(send_buffer, 0);
}
}
+/* }}} */
-
+/* {{{ php_start_implicit_flush
+ */
PHPAPI void php_start_implicit_flush()
{
OLS_FETCH();
php_end_ob_buffer(1, 0); /* Switch out of output buffering if we're in it */
OG(implicit_flush)=1;
}
+/* }}} */
-
+/* {{{ php_end_implicit_flush
+ */
PHPAPI void php_end_implicit_flush()
{
OLS_FETCH();
OG(implicit_flush)=0;
}
+/* }}} */
-
+/* {{{ php_ob_set_internal_handler
+ */
PHPAPI void php_ob_set_internal_handler(php_output_handler_func_t internal_output_handler, uint buffer_size)
{
OLS_FETCH();
OG(active_ob_buffer).internal_output_handler_buffer = (char *) emalloc(buffer_size);
OG(active_ob_buffer).internal_output_handler_buffer_size = buffer_size;
}
-
+/* }}} */
/*
* Output buffering - implementation
*/
+/* {{{ php_ob_allocate
+ */
static inline void php_ob_allocate(void)
{
OLS_FETCH();
OG(active_ob_buffer).buffer = (char *) erealloc(OG(active_ob_buffer).buffer, OG(active_ob_buffer).size+1);
}
}
+/* }}} */
-
+/* {{{ php_ob_init
+ */
static void php_ob_init(uint initial_size, uint block_size, zval *output_handler, uint chunk_size)
{
OLS_FETCH();
OG(active_ob_buffer).status = 0;
OG(active_ob_buffer).internal_output_handler = NULL;
}
+/* }}} */
-
+/* {{{ php_ob_append
+ */
static void php_ob_append(const char *text, uint text_length)
{
char *target;
return;
}
}
+/* }}} */
#if 0
static void php_ob_prepend(const char *text, uint text_length)
#endif
-/* Return the current output buffer */
+/* {{{ php_ob_get_buffer
+ * Return the current output buffer */
int php_ob_get_buffer(pval *p)
{
OLS_FETCH();
p->value.str.len = OG(active_ob_buffer).text_length;
return SUCCESS;
}
+/* }}} */
-
-/* Return the size of the current output buffer */
+/* {{{ php_ob_get_length
+ * Return the size of the current output buffer */
int php_ob_get_length(pval *p)
{
OLS_FETCH();
p->value.lval = OG(active_ob_buffer).text_length;
return SUCCESS;
}
+/* }}} */
/*
* Wrapper functions - implementation
return str_length;
}
-
+/* {{{ php_ub_body_write_no_header
+ */
static int php_ub_body_write_no_header(const char *str, uint str_length)
{
char *newstr = NULL;
return result;
}
+/* }}} */
-
+/* {{{ php_ub_body_write
+ */
static int php_ub_body_write(const char *str, uint str_length)
{
int result = 0;
return result;
}
-
+/* }}} */
/*
* HEAD support
*/
-
/* {{{ proto void ob_start([ string user_function [, int chunk_size]])
Turn on Output Buffering (specifying an optional output handler). */
PHP_FUNCTION(ob_start)
}
/* }}} */
-
/* {{{ proto void ob_end_flush(void)
Flush (send) the output buffer, and turn off output buffering */
PHP_FUNCTION(ob_end_flush)
}
/* }}} */
-
/* {{{ proto void ob_end_clean(void)
Clean (erase) the output buffer, and turn off output buffering */
PHP_FUNCTION(ob_end_clean)
}
/* }}} */
-
/* {{{ proto string ob_get_contents(void)
Return the contents of the output buffer */
PHP_FUNCTION(ob_get_contents)
}
/* }}} */
-
/* {{{ proto string ob_get_length(void)
Return the length of the output buffer */
PHP_FUNCTION(ob_get_length)
}
/* }}} */
-
/* {{{ proto void ob_implicit_flush([int flag])
Turn implicit flush on/off and is equivalent to calling flush() after every output call */
PHP_FUNCTION(ob_implicit_flush)
}
/* }}} */
-
PHPAPI char *php_get_output_start_filename()
{
OLS_FETCH();
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
static int big_endian_long_map[4];
static int little_endian_long_map[4];
-
+/* {{{ php_pack
+ */
static void php_pack(pval **val, int size, int *map, char *output)
{
int i;
*(output++) = v[map[i]];
}
}
-
+/* }}} */
/* pack() idea stolen from Perl (implemented formats behave the same as there)
* Implemented formats are A,a,h,H,c,C,s,S,i,I,l,L,n,N,f,d,x,X,@.
}
/* }}} */
-
+/* {{{ php_unpack
+ */
static long php_unpack(char *data, int size, int issigned, int *map)
{
long result;
return result;
}
-
+/* }}} */
/* unpack() is based on Perl's unpack(), but is modified a bit from there.
* Rather than depending on error-prone ordered lists or syntactically
}
/* }}} */
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(pack)
{
int machine_endian_check = 1;
return SUCCESS;
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#include "ext/standard/basic_functions.h"
+/* {{{ php_statpage
+ */
static void php_statpage(BLS_D)
{
struct stat *pstat;
}
}
}
+/* }}} */
+/* {{{ php_getuid
+ */
long php_getuid(void)
{
BLS_FETCH();
php_statpage(BLS_C);
return (BG(page_uid));
}
+/* }}} */
/* {{{ proto int getmyuid(void)
Get PHP script owner's UID */
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#include "php_fopen_wrappers.h"
-
+/* {{{ php_fopen_url_wrap_php
+ */
FILE *php_fopen_url_wrap_php(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path)
{
const char *res = path + 6;
return NULL;
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#define MT_RAND_MAX ((long)(0x7FFFFFFF)) /* (1<<31) - 1 */
+/* {{{ seedMT
+ */
static void seedMT(php_uint32 seed BLS_DC)
{
/*
for(BG(left)=0, *s++=x, j=N; --j;
*s++ = (x*=69069U) & 0xFFFFFFFFU);
}
-
+/* }}} */
static php_uint32 reloadMT(BLS_D)
{
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
int cflags;
} reg_cache;
+/* {{{ _php_regcomp
+ */
static int _php_regcomp(regex_t *preg, const char *pattern, int cflags)
{
int r = 0;
return r;
}
+/* }}} */
static void _free_reg_cache(reg_cache *rc)
{
call to ereg() or eregi() with the optional third argument. */
#define NS 10
-/*
+/* {{{ php_reg_eprint
* php_reg_eprint - convert error number to name
*/
static void php_reg_eprint(int err, regex_t *re) {
STR_FREE(buf);
STR_FREE(message);
}
+/* }}} */
+/* {{{ php_ereg
+ */
static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase)
{
pval **regex, /* Regular expression */
}
regfree(&re);
}
+/* }}} */
/* {{{ proto int ereg(string pattern, string string [, array registers])
Regular expression match */
}
/* }}} */
-/* this is the meat and potatoes of regex replacement! */
+/* {{{ php_reg_replace
+ * this is the meat and potatoes of regex replacement! */
char *php_reg_replace(const char *pattern, const char *replace, const char *string, int icase, int extended)
{
regex_t re;
/* whew. */
return (buf);
}
+/* }}} */
+/* {{{ php_ereg_replace
+ */
static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase)
{
pval **arg_pattern,
STR_FREE(replace);
STR_FREE(pattern);
}
+/* }}} */
/* {{{ proto string ereg_replace(string pattern, string replacement, string string)
Replace regular expression */
}
/* }}} */
+/* {{{ php_split
+ */
static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase)
{
pval **spliton, **str, **arg_count = NULL;
regfree(&re);
}
+/* }}} */
/* ("root", "passwd", "uid", "gid", "other:stuff:like:/bin/sh")
= split(":", $passwd_file, 5); */
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
static void ReleaseCharSet(CharSet *cset);
-/*
+/* {{{ BuildCharSet
*----------------------------------------------------------------------
*
* BuildCharSet --
*
*----------------------------------------------------------------------
*/
-
static char * BuildCharSet(CharSet *cset, char *format)
{
char *ch, start;
}
return format;
}
+/* }}} */
-/*
+/* {{{ CharInSet
*----------------------------------------------------------------------
*
* CharInSet --
*
*----------------------------------------------------------------------
*/
-
static int CharInSet(CharSet *cset, int c)
{
char ch = (char) c;
}
return (cset->exclude ? !match : match);
}
+/* }}} */
-/*
+/* {{{ ReleaseCharSet
*----------------------------------------------------------------------
*
* ReleaseCharSet --
*
*----------------------------------------------------------------------
*/
-
static void ReleaseCharSet(CharSet *cset)
{
efree((char *)cset->chars);
efree((char *)cset->ranges);
}
}
+/* }}} */
-/*
+/* {{{ ValidateFormat
*----------------------------------------------------------------------
*
* ValidateFormat --
*
*----------------------------------------------------------------------
*/
-
-
PHPAPI int ValidateFormat(char *format,int numVars,int *totalSubs)
{
#define STATIC_LIST_SIZE 16
return SCAN_ERROR_INVALID_FORMAT;
#undef STATIC_LIST_SIZE
}
+/* }}} */
-
-
-/* This is the internal function which does processing on behalf of
+/* {{{ php_sscanf_internal
+ * This is the internal function which does processing on behalf of
* both sscanf() and fscanf()
*
* parameters :
return result;
}
-
+/* }}} */
/* the compiler choked when i tried to make this a macro */
inline void scan_set_error_return(int numVars,pval **return_value) {
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#define PHP_PATHINFO_BASENAME 1
#define PHP_PATHINFO_EXTENSION 2
+/* {{{ register_string_constants
+ */
void register_string_constants(INIT_FUNC_ARGS)
{
REGISTER_LONG_CONSTANT("STR_PAD_LEFT", STR_PAD_LEFT, CONST_CS | CONST_PERSISTENT);
#endif
}
+/* }}} */
int php_tag_find(char *tag, int len, char *set);
static MUTEX_T locale_mutex = NULL;
#endif
+/* {{{ php_bin2hex
+ */
static char *php_bin2hex(const unsigned char *old, const size_t oldlen, size_t *newlen)
{
unsigned char *result = NULL;
return result;
}
+/* }}} */
#ifdef HAVE_LOCALECONV
/* {{{ localeconv_r
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
static char const *version UNUSED =
"$Id$";
-
+/* {{{ compare_right
+ */
static int
compare_right(char const **a, char const *aend, char const **b, char const *bend)
{
return 0;
}
+/* }}} */
-
+/* {{{ compare_left
+ */
static int
compare_left(char const **a, char const *aend, char const **b, char const *bend)
{
return 0;
}
+/* }}} */
-
+/* {{{ strnatcmp_ex
+ */
PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len, int fold_case)
{
char ca, cb;
return 1;
}
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
static void start_syslog(BLS_D);
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(syslog)
{
/* error levels */
return SUCCESS;
}
-
+/* }}} */
PHP_RINIT_FUNCTION(syslog)
{
return SUCCESS;
}
-
+/* {{{ start_syslog
+ */
static void start_syslog(BLS_D)
{
ELS_FETCH();
BG(syslog_started)=1;
}
+/* }}} */
/* {{{ proto void define_syslog_variables(void)
Initializes all syslog-related variables */
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Rasmus Lerdorf |
+ | Authors: Rasmus Lerdorf <rasmus@php.net> |
+----------------------------------------------------------------------+
*/
#include "php.h"
#include "type.h"
-/*
+/* {{{ php_check_type
* Determines if 'str' is an integer (long), real number or a string
*
* Note that leading zeroes automatically force a STRING type
return (type);
} /* php_check_type */
+/* }}} */
-/*
+/* {{{ php_check_ident_type
* 0 - simple variable
* 1 - non-index array
* 2 - index array
}
return (GPC_INDEXED_ARRAY);
}
+/* }}} */
+/* {{{ php_get_ident_index
+ */
char *php_get_ident_index(char *str)
{
char *temp;
}
return (temp);
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#endif /*APACHE*/
#endif /*_OSD_POSIX*/
-
+/* {{{ free_url
+ */
void free_url(php_url * theurl)
{
if (theurl->scheme)
efree(theurl->fragment);
efree(theurl);
}
+/* }}} */
+/* {{{ url_parse
+ */
php_url *url_parse(char *str)
{
regex_t re;
regfree(&re);
return ret;
}
+/* }}} */
/* {{{ proto array parse_url(string url)
Parse a URL and return its components */
}
/* }}} */
+/* {{{ php_htoi
+ */
static int php_htoi(char *s)
{
int value;
return (value);
}
+/* }}} */
/* rfc1738:
static unsigned char hexchars[] = "0123456789ABCDEF";
+/* {{{ php_url_encode
+ */
char *php_url_encode(char *s, int len)
{
register int x, y;
str[y] = '\0';
return ((char *) str);
}
+/* }}} */
/* {{{ proto string urlencode(string str)
URL-encodes string */
}
/* }}} */
+/* {{{ php_url_decode
+ */
int php_url_decode(char *str, int len)
{
char *dest = str;
*dest = '\0';
return dest - str;
}
+/* }}} */
+/* {{{ php_raw_url_encode
+ */
char *php_raw_url_encode(char *s, int len)
{
register int x, y;
str[y] = '\0';
return ((char *) str);
}
+/* }}} */
/* {{{ proto string rawurlencode(string str)
URL-encodes string */
}
/* }}} */
+/* {{{ php_raw_url_decode
+ */
int php_raw_url_decode(char *str, int len)
{
char *dest = str;
*dest = '\0';
return dest - str;
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
return SUCCESS;
}
-
+/* {{{ url_attr_addon
+ */
static char *url_attr_addon(const char *tag,const char *attr,const char *val,const char *buf)
{
int flag = 0;
}
return NULL;
}
+/* }}} */
#define US BG(url_adapt_state)
+/* {{{ url_adapt_ext
+ */
char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char *val, size_t *newlen)
{
char buf[1024];
return url_adapt(src, srclen, buf, newlen);
}
+/* }}} */
+/* {{{ url_adapt
+ */
char *url_adapt(const char *src, size_t srclen, const char *data, size_t *newlen)
{
char *out,*outp;
*outp='\0';
return out;
}
-
+/* }}} */
#endif
/*
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#include "php_smart_str.h"
+/* {{{ PHP_INI_MH
+ */
static PHP_INI_MH(OnUpdateTags)
{
url_adapt_state_ex_t *ctx;
return SUCCESS;
}
+/* }}} */
PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("url_rewriter.tags", "a=href,area=href,frame=src,form=fakeentry", PHP_INI_ALL, OnUpdateTags, url_adapt_state_ex, php_basic_globals, basic_globals)
PHP_INI_END()
+/* {{{ append_modified_url
+ */
static inline void append_modified_url(smart_str *url, smart_str *dest, smart_str *name, smart_str *val, const char *separator)
{
register const char *p, *q;
if (bash)
smart_str_appendl(dest, bash, q - bash);
}
+/* }}} */
static inline void tag_arg(url_adapt_state_ex_t *ctx, char quote PLS_DC)
{
#define scdebug(x)
#endif
+/* {{{ mainloop
+ */
static inline void mainloop(url_adapt_state_ex_t *ctx, const char *newdata, size_t newlen)
{
char *end, *q;
if (rest) memmove(ctx->buf.c, start, rest);
ctx->buf.len = rest;
}
+/* }}} */
+/* {{{ url_adapt_single_url
+ */
char *url_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen)
{
smart_str surl = {0};
return buf.c;
}
+/* }}} */
+/* {{{ url_adapt_ext
+ */
char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char *value, size_t *newlen)
{
char *ret;
ctx->result.len = 0;
return ctx->result.c;
}
+/* }}} */
PHP_RINIT_FUNCTION(url_scanner)
{
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
*/
/* $Id$ */
+/* {{{ includes
+ */
#include "php.h"
#include "php_globals.h"
#include "SAPI.h"
#if defined(AF_UNIX)
#include <sys/un.h>
#endif
+/* }}} */
typedef FILE * (*php_fopen_url_wrapper_t) (const char *, char *, int, int *, int *, char **) ;
HashTable fopen_url_wrappers_hash;
+/* {{{ php_register_url_wrapper
+ */
PHPAPI int php_register_url_wrapper(char *protocol, FILE * (*wrapper)(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path))
{
PLS_FETCH();
return FAILURE;
}
}
+/* }}} */
+/* {{{ php_unregister_url_wrapper
+ */
PHPAPI int php_unregister_url_wrapper(char *protocol)
{
PLS_FETCH();
return SUCCESS;
}
}
+/* }}} */
+/* {{{ php_init_fopen_wrappers
+ */
int php_init_fopen_wrappers(void)
{
PLS_FETCH();
return SUCCESS;
}
+/* }}} */
+/* {{{ php_shutdown_fopen_wrappers
+ */
int php_shutdown_fopen_wrappers(void)
{
PLS_FETCH();
return SUCCESS;
}
+/* }}} */
-
-/*
+/* {{{ php_check_specific_open_basedir
When open_basedir is not NULL, check if the given filename is located in
open_basedir. Returns -1 if error or not in the open_basedir, else 0
return -1;
}
}
+/* }}} */
+/* {{{ php_check_open_basedir
+ */
PHPAPI int php_check_open_basedir(char *path)
{
PLS_FETCH();
/* Nothing to check... */
return 0;
}
+/* }}} */
+/* {{{ php_fopen_and_set_opened_path
+ */
static FILE *php_fopen_and_set_opened_path(const char *path, char *mode, char **opened_path)
{
FILE *fp;
}
return fp;
}
+/* }}} */
+/* {{{ php_fopen_wrapper
+ */
PHPAPI FILE *php_fopen_wrapper(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path)
{
PLS_FETCH();
return php_fopen_and_set_opened_path(path, mode, opened_path);
}
}
+/* }}} */
-
+/* {{{ php_fopen_primary_script
+ */
PHPAPI FILE *php_fopen_primary_script(void)
{
FILE *fp;
return fp;
}
+/* }}} */
-
-/*
+/* {{{ php_fopen_with_path
* Tries to open a file with a PATH-style list of directories.
* If the filename starts with "." or "/", the path is ignored.
*/
efree(pathbuf);
return NULL;
}
-
+/* }}} */
-
+/* {{{ php_fopen_url_wrapper
+ */
static FILE *php_fopen_url_wrapper(const char *path, char *mode, int options, int *issock, int *socketd, char **opened_path)
{
FILE *fp = NULL;
php_error(E_WARNING, "Invalid URL specified, %s", path);
return NULL;
}
+/* }}} */
+/* {{{ php_strip_url_passwd
+ */
PHPAPI char *php_strip_url_passwd(char *url)
{
register char *p = url, *url_start;
}
return url;
}
+/* }}} */
-
+/* {{{ expand_filepath
+ */
PHPAPI char *expand_filepath(const char *filepath, char *real_path)
{
cwd_state new_state;
return real_path;
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
/* $Id$ */
-
+/* {{{ includes
+ */
#include "php.h"
#include "php_main.h"
#include "zend_modules.h"
#include "ext/xml/php_xml.h"
#include "ext/wddx/php_wddx.h"
#include "ext/mysql/php_mysql.h"
+/* }}} */
+/* {{{ php_builtin_extensions[]
+ */
zend_module_entry *php_builtin_extensions[] = {
phpext_standard_ptr,
#if WITH_BCMATH
phpext_xml_ptr,
phpext_wddx_ptr
};
+/* }}} */
#define EXTCOUNT (sizeof(php_builtin_extensions)/sizeof(zend_module_entry *))
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
+----------------------------------------------------------------------+
*/
-
/* $Id$ */
-
+/* {{{ includes
+ */
#include <stdio.h>
#include "php.h"
#ifdef PHP_WIN32
#include "php_logos.h"
#include "SAPI.h"
+/* }}} */
#ifndef ZTS
php_core_globals core_globals;
#else
PHPAPI int core_globals_id;
#endif
-
static void php_build_argv(char *s, zval *track_vars_array ELS_DC PLS_DC);
#define SAFE_FILENAME(f) ((f)?(f):"-")
+/* {{{ PHP_INI_MH
+ */
static PHP_INI_MH(OnSetPrecision)
{
ELS_FETCH();
EG(precision) = atoi(new_value);
return SUCCESS;
}
-
+/* }}} */
#if MEMORY_LIMIT
+/* {{{ PHP_INI_MH
+ */
static PHP_INI_MH(OnChangeMemoryLimit)
{
int new_limit;
}
return zend_set_memory_limit(new_limit);
}
+/* }}} */
#endif
-
+/* {{{ PHP_INI_MH
+ */
static PHP_INI_MH(OnUpdateErrorReporting)
{
ELS_FETCH();
}
return SUCCESS;
}
+/* }}} */
-
+/* {{{ php_disable_functions
+ */
static void php_disable_functions()
{
char *func;
func = strtok(NULL, ", ");
}
}
+/* }}} */
-
+/* {{{ PHP_INI_MH
+ */
static PHP_INI_MH(OnUpdateTimeout)
{
ELS_FETCH();
zend_set_timeout(EG(timeout_seconds));
return SUCCESS;
}
-
+/* }}} */
/* Need to convert to strings and make use of:
* PHP_SAFE_MODE
#else
# define DEFAULT_SENDMAIL_PATH NULL
#endif
+/* {{{ PHP_INI
+ */
PHP_INI_BEGIN()
PHP_INI_ENTRY_EX("define_syslog_variables", "0", PHP_INI_ALL, NULL, php_ini_boolean_displayer_cb)
PHP_INI_ENTRY_EX("highlight.bg", HL_BG_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb)
STD_PHP_INI_ENTRY("allow_url_fopen", "1", PHP_INI_ALL, OnUpdateBool, allow_url_fopen, php_core_globals, core_globals)
PHP_INI_END()
-
-
+/* }}} */
/* True global (no need for thread safety */
static int module_initialized = 0;
+/* {{{ php_log_err
+ */
PHPAPI void php_log_err(char *log_message)
{
FILE *log_file;
sapi_module.log_message(log_message);
}
}
-
+/* }}} */
/* is 4K big enough? */
#define PRINTF_BUFFER_SIZE 1024*4
-/* wrapper for modules to use PHPWRITE */
+/* {{{ php_write
+ wrapper for modules to use PHPWRITE */
PHPAPI int php_write(void *buf, uint size)
{
return PHPWRITE(buf, size);
}
+/* }}} */
+/* {{{ php_printf
+ */
PHPAPI int php_printf(const char *format, ...)
{
va_list args;
return ret;
}
+/* }}} */
-
-/* extended error handling function */
+/* {{{ php_error_cb
+ extended error handling function */
static void php_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args)
{
char buffer[1024];
zend_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void **) & tmp, sizeof(pval *), NULL);
}
}
-
-
+/* }}} */
/* {{{ proto void set_time_limit(int seconds)
Sets the maximum time a script can run */
}
/* }}} */
+/* {{{ php_fopen_wrapper_for_zend
+ */
static FILE *php_fopen_wrapper_for_zend(const char *filename, char **opened_path)
{
int issock=0, socketd=0;
}
return retval;
}
+/* }}} */
-
+/* {{{ php_get_configuration_directive_for_zend
+ */
static int php_get_configuration_directive_for_zend(char *name, uint name_length, zval *contents)
{
zval *retval = cfg_get_entry(name, name_length);
return FAILURE;
}
}
+/* }}} */
-
+/* {{{ php_message_handler_for_zend
+ */
static void php_message_handler_for_zend(long message, void *data)
{
switch (message) {
break;
}
}
-
+/* }}} */
#if PHP_SIGCHILD
+/* {{{ sigchld_handler
+ */
static void sigchld_handler(int apar)
{
while (waitpid(-1, NULL, WNOHANG) > 0)
;
signal(SIGCHLD,sigchld_handler);
}
+/* }}} */
#endif
static int php_hash_environment(ELS_D SLS_DC PLS_DC);
+/* {{{ php_request_startup
+ */
int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC)
{
#if PHP_SIGCHILD
return SUCCESS;
}
+/* }}} */
-
+/* {{{ php_request_shutdown_for_exec
+ */
void php_request_shutdown_for_exec(void *dummy)
{
/* used to close fd's in the 3..255 range here, but it's problematic
*/
shutdown_memory_manager(1, 1);
}
+/* }}} */
-
+/* {{{ php_request_shutdown
+ */
void php_request_shutdown(void *dummy)
{
CLS_FETCH();
zend_unset_timeout();
}
}
+/* }}} */
-
+/* {{{ php_config_ini_shutdown
+ */
static void php_config_ini_shutdown(void)
{
php_shutdown_config();
}
+/* }}} */
-
+/* {{{ php_body_write_wrapper
+ */
static int php_body_write_wrapper(const char *str, uint str_length)
{
return php_body_write(str, str_length);
}
-
+/* }}} */
#ifdef ZTS
+/* {{{ core_globals_ctor
+ */
static void core_globals_ctor(php_core_globals *core_globals)
{
memset(core_globals,0,sizeof(*core_globals));
}
-
+/* }}} */
#endif
-
+/* {{{ php_startup_extensions
+ */
int php_startup_extensions(zend_module_entry **ptr, int count)
{
zend_module_entry **end = ptr+count;
}
return SUCCESS;
}
+/* }}} */
+/* {{{ php_global_startup_extensions
+ */
int php_global_startup_extensions(zend_module_entry **ptr, int count)
{
zend_module_entry **end = ptr+count;
}
return SUCCESS;
}
+/* }}} */
+/* {{{ php_global_shutdown_extensions
+ */
int php_global_shutdown_extensions(zend_module_entry **ptr, int count)
{
zend_module_entry **end = ptr+count;
}
return SUCCESS;
}
+/* }}} */
+/* {{{ php_module_startup
+ */
int php_module_startup(sapi_module_struct *sf)
{
zend_utility_functions zuf;
/* we're done */
return SUCCESS;
}
-
-
+/* }}} */
void php_module_shutdown_for_exec()
{
/* used to close fd's in the range 3.255 here, but it's problematic */
}
-
+/* {{{ php_module_shutdown_wrapper
+ */
int php_module_shutdown_wrapper(sapi_module_struct *sapi_globals)
{
php_module_shutdown();
return SUCCESS;
}
+/* }}} */
-
+/* {{{ php_module_shutdown
+ */
void php_module_shutdown()
{
int module_number=0; /* for UNREGISTER_INI_ENTRIES() */
shutdown_memory_manager(0, 1);
module_initialized = 0;
}
+/* }}} */
-
+/* {{{ php_register_server_variables
+ */
static inline void php_register_server_variables(ELS_D SLS_DC PLS_DC)
{
zval *array_ptr=NULL;
php_register_variable("PHP_AUTH_PW", SG(request_info).auth_password, array_ptr ELS_CC PLS_CC);
}
}
+/* }}} */
-
+/* {{{ php_hash_environment
+ */
static int php_hash_environment(ELS_D SLS_DC PLS_DC)
{
char *p;
}
return SUCCESS;
}
+/* }}} */
-
+/* {{{ php_build_argv
+ */
static void php_build_argv(char *s, zval *track_vars_array ELS_DC PLS_DC)
{
pval *arr, *argc, *tmp;
zend_hash_update(track_vars_array->value.ht, "argv", sizeof("argv"), &arr, sizeof(pval *), NULL);
zend_hash_update(track_vars_array->value.ht, "argc", sizeof("argc"), &argc, sizeof(pval *), NULL);
}
+/* }}} */
-
+/* {{{ php_handle_special_queries
+ */
PHPAPI int php_handle_special_queries(SLS_D PLS_DC)
{
if (SG(request_info).query_string && SG(request_info).query_string[0]=='='
}
return 0;
}
+/* }}} */
+/* {{{ php_execute_script
+ */
PHPAPI int php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_DC)
{
zend_file_handle *prepend_file_p, *append_file_p;
return EG(exit_status);
}
+/* }}} */
+/* {{{ php_handle_aborted_connection
+ */
PHPAPI void php_handle_aborted_connection(void)
{
PLS_FETCH();
zend_bailout();
}
}
+/* }}} */
+/* {{{ php_handle_auth_data
+ */
PHPAPI int php_handle_auth_data(const char *auth SLS_DC)
{
int ret = -1;
return ret;
}
+/* }}} */
+/* {{{ php_lint_script
+ */
PHPAPI int php_lint_script(zend_file_handle *file CLS_DC ELS_DC PLS_DC)
{
zend_op_array *op_array;
return retval;
}
+/* }}} */
#ifdef PHP_WIN32
-/* just so that this symbol gets exported... */
+/* {{{ dummy_indent
+ just so that this symbol gets exported... */
PHPAPI void dummy_indent()
{
zend_indent();
}
+/* }}} */
#endif
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
((u_char *)0 + \
(((u_char *)p + PSIZE - 1 - (u_char *) 0) & ~(PSIZE - 1)))
-/*
+/* {{{ php_mergesort
* Arguments are as for qsort.
*/
int php_mergesort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void *))
free(list2);
return (0);
}
+/* }}} */
#define swap(a, b) { \
s = b; \
} while(bot < s); \
}
-/*
+/* {{{ setup
* Optional hybrid natural/pairwise first pass. Eats up list1 in runs of
* increasing order, list2 in a corresponding linked list. Checks for runs
* when THRESHOLD/2 pairs compare with same sense. (Only used when NATURAL
}
#endif /* NATURAL */
}
+/* }}} */
-/*
+/* {{{ insertionsort
* This is to avoid out-of-bounds addresses in sorting the
* last 4 elements.
*/
swap(u, t);
}
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
# define PHP_GAI_STRERROR(x) (gai_strerror(x))
#else
# define PHP_GAI_STRERROR(x) (php_gai_strerror(x))
+/* {{{ php_gai_strerror
+ */
static char *php_gai_strerror(int code)
{
static struct {
return "Unknown error";
}
+/* }}} */
#endif
#endif
+/* {{{ php_network_freeaddresses
+ */
static void php_network_freeaddresses(struct sockaddr **sal)
{
struct sockaddr **sap;
efree(*sap);
efree(sal);
}
+/* }}} */
+/* {{{ php_network_getaddresses
+ */
static int php_network_getaddresses(const char *host, struct sockaddr ***sal)
{
struct sockaddr **sap;
*sap = NULL;
return 0;
}
+/* }}} */
/* {{{ php_connect_nonb */
PHPAPI int php_connect_nonb(int sockfd,
}
/* }}} */
-/*
+/* {{{ php_hostconnect
* Creates a socket of type socktype and connects to the given host and
* port, returns the created socket on success, else returns -1.
* timeout gives timeout in seconds, 0 means blocking mode.
php_network_freeaddresses(psal);
return s;
}
+/* }}} */
/*
* Local variables:
* tab-width: 8
* c-basic-offset: 8
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
return OG(php_header_write)(str, str_length);
}
-/* Start output buffering */
+/* {{{ php_start_ob_buffer
+ * Start output buffering */
PHPAPI int php_start_ob_buffer(zval *output_handler, uint chunk_size)
{
OLS_FETCH();
OG(php_body_write) = php_b_body_write;
return SUCCESS;
}
+/* }}} */
-
-/* End output buffering (one level) */
+/* {{{ php_end_ob_buffer
+ * End output buffering (one level) */
PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush)
{
char *final_buffer=NULL;
efree(to_be_destroyed_handled_output[1]);
}
}
+/* }}} */
-
-/* End output buffering (all buffers) */
+/* {{{ php_end_ob_buffers
+ * End output buffering (all buffers) */
PHPAPI void php_end_ob_buffers(zend_bool send_buffer)
{
OLS_FETCH();
php_end_ob_buffer(send_buffer, 0);
}
}
+/* }}} */
-
+/* {{{ php_start_implicit_flush
+ */
PHPAPI void php_start_implicit_flush()
{
OLS_FETCH();
php_end_ob_buffer(1, 0); /* Switch out of output buffering if we're in it */
OG(implicit_flush)=1;
}
+/* }}} */
-
+/* {{{ php_end_implicit_flush
+ */
PHPAPI void php_end_implicit_flush()
{
OLS_FETCH();
OG(implicit_flush)=0;
}
+/* }}} */
-
+/* {{{ php_ob_set_internal_handler
+ */
PHPAPI void php_ob_set_internal_handler(php_output_handler_func_t internal_output_handler, uint buffer_size)
{
OLS_FETCH();
OG(active_ob_buffer).internal_output_handler_buffer = (char *) emalloc(buffer_size);
OG(active_ob_buffer).internal_output_handler_buffer_size = buffer_size;
}
-
+/* }}} */
/*
* Output buffering - implementation
*/
+/* {{{ php_ob_allocate
+ */
static inline void php_ob_allocate(void)
{
OLS_FETCH();
OG(active_ob_buffer).buffer = (char *) erealloc(OG(active_ob_buffer).buffer, OG(active_ob_buffer).size+1);
}
}
+/* }}} */
-
+/* {{{ php_ob_init
+ */
static void php_ob_init(uint initial_size, uint block_size, zval *output_handler, uint chunk_size)
{
OLS_FETCH();
OG(active_ob_buffer).status = 0;
OG(active_ob_buffer).internal_output_handler = NULL;
}
+/* }}} */
-
+/* {{{ php_ob_append
+ */
static void php_ob_append(const char *text, uint text_length)
{
char *target;
return;
}
}
+/* }}} */
#if 0
static void php_ob_prepend(const char *text, uint text_length)
#endif
-/* Return the current output buffer */
+/* {{{ php_ob_get_buffer
+ * Return the current output buffer */
int php_ob_get_buffer(pval *p)
{
OLS_FETCH();
p->value.str.len = OG(active_ob_buffer).text_length;
return SUCCESS;
}
+/* }}} */
-
-/* Return the size of the current output buffer */
+/* {{{ php_ob_get_length
+ * Return the size of the current output buffer */
int php_ob_get_length(pval *p)
{
OLS_FETCH();
p->value.lval = OG(active_ob_buffer).text_length;
return SUCCESS;
}
+/* }}} */
/*
* Wrapper functions - implementation
return str_length;
}
-
+/* {{{ php_ub_body_write_no_header
+ */
static int php_ub_body_write_no_header(const char *str, uint str_length)
{
char *newstr = NULL;
return result;
}
+/* }}} */
-
+/* {{{ php_ub_body_write
+ */
static int php_ub_body_write(const char *str, uint str_length)
{
int result = 0;
return result;
}
-
+/* }}} */
/*
* HEAD support
*/
-
/* {{{ proto void ob_start([ string user_function [, int chunk_size]])
Turn on Output Buffering (specifying an optional output handler). */
PHP_FUNCTION(ob_start)
}
/* }}} */
-
/* {{{ proto void ob_end_flush(void)
Flush (send) the output buffer, and turn off output buffering */
PHP_FUNCTION(ob_end_flush)
}
/* }}} */
-
/* {{{ proto void ob_end_clean(void)
Clean (erase) the output buffer, and turn off output buffering */
PHP_FUNCTION(ob_end_clean)
}
/* }}} */
-
/* {{{ proto string ob_get_contents(void)
Return the contents of the output buffer */
PHP_FUNCTION(ob_get_contents)
}
/* }}} */
-
/* {{{ proto string ob_get_length(void)
Return the length of the output buffer */
PHP_FUNCTION(ob_get_length)
}
/* }}} */
-
/* {{{ proto void ob_implicit_flush([int flag])
Turn implicit flush on/off and is equivalent to calling flush() after every output call */
PHP_FUNCTION(ob_implicit_flush)
}
/* }}} */
-
PHPAPI char *php_get_output_start_filename()
{
OLS_FETCH();
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#include "php_content_types.h"
+/* {{{ php_post_entries[]
+ */
static sapi_post_entry php_post_entries[] = {
{ DEFAULT_POST_CONTENT_TYPE, sizeof(DEFAULT_POST_CONTENT_TYPE)-1, sapi_read_standard_form_data, php_std_post_handler },
{ MULTIPART_CONTENT_TYPE, sizeof(MULTIPART_CONTENT_TYPE)-1, sapi_read_standard_form_data, rfc1867_post_handler },
{ NULL, 0, NULL }
};
+/* }}} */
-
+/* {{{ SAPI_POST_READER_FUNC
+ */
SAPI_POST_READER_FUNC(php_default_post_reader)
{
char *data;
data = estrndup(SG(request_info).post_data,SG(request_info).post_data_length);
SET_VAR_STRINGL("HTTP_RAW_POST_DATA", data, SG(request_info).post_data_length);
}
+/* }}} */
-
+/* {{{ php_startup_sapi_content_types
+ */
int php_startup_sapi_content_types(void)
{
sapi_register_post_entries(php_post_entries);
sapi_register_default_post_reader(php_default_post_reader);
return SUCCESS;
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
PHPAPI char *php_ini_opened_path=NULL;
static php_extension_lists extension_lists;
-
+/* {{{ php_ini_displayer_cb
+ */
static void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type)
{
if (ini_entry->displayer) {
}
}
}
+/* }}} */
-
+/* {{{ php_ini_displayer
+ */
static int php_ini_displayer(zend_ini_entry *ini_entry, int module_number)
{
if (ini_entry->module_number != module_number) {
PUTS("</TD></TR>\n");
return 0;
}
+/* }}} */
-
+/* {{{ display_ini_entries
+ */
PHPAPI void display_ini_entries(zend_module_entry *module)
{
int module_number;
zend_hash_apply_with_argument(&EG(ini_directives), (apply_func_arg_t) php_ini_displayer, (void *) (long) module_number);
php_info_print_table_end();
}
-
-
+/* }}} */
/* php.ini support */
# endif
#endif
-
+/* {{{ pvalue_config_destructor
+ */
static void pvalue_config_destructor(zval *pvalue)
{
if (pvalue->type == IS_STRING && pvalue->value.str.val != empty_string) {
free(pvalue->value.str.val);
}
}
+/* }}} */
+/* {{{ php_config_ini_parser_cb
+ */
static void php_config_ini_parser_cb(zval *arg1, zval *arg2, int callback_type, void *arg)
{
switch (callback_type) {
break;
}
}
+/* }}} */
-
+/* {{{ php_load_function_extension_cb
+ */
static void php_load_function_extension_cb(void *arg)
{
zval *extension = (zval *) arg;
php_dl(extension, MODULE_PERSISTENT, &zval);
}
+/* }}} */
-
+/* {{{ php_load_zend_extension_cb
+ */
static void php_load_zend_extension_cb(void *arg)
{
zend_load_extension(*((char **) arg));
}
+/* }}} */
-
+/* {{{ php_init_config
+ */
int php_init_config(char *php_ini_path_override)
{
char *env_location, *php_ini_search_path;
return SUCCESS;
}
+/* }}} */
-
+/* {{{ php_shutdown_config
+ */
int php_shutdown_config(void)
{
zend_hash_destroy(&configuration_hash);
}
return SUCCESS;
}
+/* }}} */
-
+/* {{{ php_ini_delayed_modules_startup
+ */
void php_ini_delayed_modules_startup(void)
{
zend_llist_apply(&extension_lists.engine, php_load_zend_extension_cb);
zend_llist_destroy(&extension_lists.engine);
zend_llist_destroy(&extension_lists.functions);
}
+/* }}} */
-
+/* {{{ cfg_get_entry
+ */
zval *cfg_get_entry(char *name, uint name_length)
{
zval *tmp;
return NULL;
}
}
+/* }}} */
-
+/* {{{ cfg_get_long
+ */
PHPAPI int cfg_get_long(char *varname,long *result)
{
zval *tmp,var;
*result = var.value.lval;
return SUCCESS;
}
+/* }}} */
-
+/* {{{ cfg_get_double
+ */
PHPAPI int cfg_get_double(char *varname,double *result)
{
zval *tmp,var;
*result = var.value.dval;
return SUCCESS;
}
+/* }}} */
-
+/* {{{ cfg_get_string
+ */
PHPAPI int cfg_get_string(char *varname, char **result)
{
zval *tmp;
*result = tmp->value.str.val;
return SUCCESS;
}
+/* }}} */
/*
* Local variables:
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#define php_stream_is(stream, anops) (stream->ops == anops)
#endif /* HAVE_PHP_STREAM */
+
+#endif
+
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
-
-#endif
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#undef shutdown
+/* {{{ Prototypes
+ */
int apache_php_module_main(request_rec *r, int display_source_mode CLS_DC ELS_DC PLS_DC SLS_DC);
void php_save_umask(void);
void php_restore_umask(void);
static int send_parsed_php_source(request_rec * r);
int php_xbithack_handler(request_rec * r);
void php_init_handler(server_rec *s, pool *p);
+/* }}} */
#if MODULE_MAGIC_NUMBER >= 19970728
static void php_child_exit_handler(server_rec *s, pool *p);
/* some systems are missing these from their header files */
+/* {{{ php_save_umask
+ */
void php_save_umask(void)
{
saved_umask = umask(077);
umask(saved_umask);
}
+/* }}} */
-
+/* {{{ sapi_apache_ub_write
+ */
static int sapi_apache_ub_write(const char *str, uint str_length)
{
int ret=0;
}
return ret;
}
+/* }}} */
-
-
+/* {{{ sapi_apache_flush
+ */
static void sapi_apache_flush(void *server_context)
{
if (server_context) {
#endif
}
}
+/* }}} */
-
+/* {{{ sapi_apache_read_post
+ */
int sapi_apache_read_post(char *buffer, uint count_bytes SLS_DC)
{
uint total_read_bytes=0, read_bytes;
signal(SIGPIPE, handler);
return total_read_bytes;
}
+/* }}} */
-
+/* {{{ sapi_apache_read_cookies
+ */
char *sapi_apache_read_cookies(SLS_D)
{
return (char *) table_get(((request_rec *) SG(server_context))->subprocess_env, "HTTP_COOKIE");
}
+/* }}} */
-
+/* {{{ sapi_apache_header_handler
+ */
int sapi_apache_header_handler(sapi_header_struct *sapi_header, sapi_headers_struct *sapi_headers SLS_DC)
{
char *header_name, *header_content, *p;
return 0; /* don't use the default SAPI mechanism, Apache duplicates this functionality */
}
+/* }}} */
-
+/* {{{ sapi_apache_send_headers
+ */
int sapi_apache_send_headers(sapi_headers_struct *sapi_headers SLS_DC)
{
if(SG(server_context) == NULL) { /* server_context is not here anymore */
send_http_header((request_rec *) SG(server_context));
return SAPI_HEADER_SENT_SUCCESSFULLY;
}
+/* }}} */
-
+/* {{{ sapi_apache_register_server_variables
+ */
static void sapi_apache_register_server_variables(zval *track_vars_array ELS_DC SLS_DC PLS_DC)
{
register int i;
php_register_variable("PHP_SELF", ((request_rec *) SG(server_context))->uri, track_vars_array ELS_CC PLS_CC);
}
+/* }}} */
+/* {{{ php_apache_startup
+ */
static int php_apache_startup(sapi_module_struct *sapi_module)
{
if (php_module_startup(sapi_module) == FAILURE
return SUCCESS;
}
}
+/* }}} */
-
+/* {{{ php_apache_log_message
+ */
static void php_apache_log_message(char *message)
{
SLS_FETCH();
fprintf(stderr, "\n");
}
}
+/* }}} */
-
+/* {{{ php_apache_request_shutdown
+ */
static void php_apache_request_shutdown(void *dummy)
{
SLS_FETCH();
SG(server_context) = NULL; /* The server context (request) is invalid by the time run_cleanups() is called */
php_request_shutdown(dummy);
}
+/* }}} */
-
+/* {{{ php_apache_sapi_activate
+ */
static int php_apache_sapi_activate(SLS_D)
{
request_rec *r = (request_rec *) SG(server_context);
SG(request_info).headers_only = r->header_only;
return SUCCESS;
}
+/* }}} */
-
+/* {{{ php_apache_get_stat
+ */
static struct stat *php_apache_get_stat(SLS_D)
{
return &((request_rec *) SG(server_context))->finfo;
}
+/* }}} */
-
+/* {{{ php_apache_getenv
+ */
static char *php_apache_getenv(char *name, size_t name_len SLS_DC)
{
return (char *) table_get(((request_rec *) SG(server_context))->subprocess_env, name);
}
+/* }}} */
-
+/* {{{ sapi_module_struct apache_sapi_module
+ */
static sapi_module_struct apache_sapi_module = {
"apache", /* name */
"Apache", /* pretty name */
STANDARD_SAPI_MODULE_PROPERTIES
};
+/* }}} */
-
+/* {{{ php_restore_umask
+ */
void php_restore_umask(void)
{
umask(saved_umask);
}
+/* }}} */
-
+/* {{{ init_request_info
+ */
static void init_request_info(SLS_D)
{
request_rec *r = ((request_rec *) SG(server_context));
SG(request_info).auth_password = NULL;
}
}
+/* }}} */
-
+/* {{{ php_apache_alter_ini_entries
+ */
static int php_apache_alter_ini_entries(php_per_dir_entry *per_dir_entry)
{
zend_alter_ini_entry(per_dir_entry->key, per_dir_entry->key_length+1, per_dir_entry->value, per_dir_entry->value_length, per_dir_entry->type, PHP_INI_STAGE_ACTIVATE);
return 0;
}
+/* }}} */
+/* {{{ php_apache_get_default_mimetype
+ */
static char *php_apache_get_default_mimetype(request_rec *r SLS_DC)
{
}
return mimetype;
}
+/* }}} */
+/* {{{ send_php
+ */
static int send_php(request_rec *r, int display_source_mode, char *filename)
{
int retval;
kill_timeout(r);
return OK;
}
+/* }}} */
-
+/* {{{ send_parsed_php
+ */
static int send_parsed_php(request_rec * r)
{
int result = send_php(r, 0, NULL);
return result;
}
+/* }}} */
-
+/* {{{ send_parsed_php_source
+ */
static int send_parsed_php_source(request_rec * r)
{
return send_php(r, 1, NULL);
}
+/* }}} */
-
+/* {{{ estroy_per_dir_entry
+ */
static void destroy_per_dir_entry(php_per_dir_entry *per_dir_entry)
{
free(per_dir_entry->key);
free(per_dir_entry->value);
}
+/* }}} */
+/* {{{ copy_per_dir_entry
+ */
static void copy_per_dir_entry(php_per_dir_entry *per_dir_entry)
{
php_per_dir_entry tmp = *per_dir_entry;
memcpy(per_dir_entry->value, tmp.value, tmp.value_length);
per_dir_entry->value[per_dir_entry->value_length] = 0;
}
+/* }}} */
-
+/* {{{ should_overwrite_per_dir_entry
+ */
static zend_bool should_overwrite_per_dir_entry(php_per_dir_entry *orig_per_dir_entry, php_per_dir_entry *new_per_dir_entry)
{
if (new_per_dir_entry->type==PHP_INI_SYSTEM
return 0;
}
}
+/* }}} */
-
+/* {{{ php_destroy_per_dir_info
+ */
static void php_destroy_per_dir_info(HashTable *per_dir_info)
{
zend_hash_destroy(per_dir_info);
free(per_dir_info);
}
+/* }}} */
-
+/* {{{ php_create_dir
+ */
static void *php_create_dir(pool *p, char *dummy)
{
HashTable *per_dir_info;
return per_dir_info;
}
+/* }}} */
-
+/* {{{ php_merge_dir
+ */
static void *php_merge_dir(pool *p, void *basev, void *addv)
{
/* This function *must* return addv, and not modify basev */
zend_hash_merge_ex((HashTable *) addv, (HashTable *) basev, (copy_ctor_func_t) copy_per_dir_entry, sizeof(php_per_dir_entry), (zend_bool (*)(void *, void *)) should_overwrite_per_dir_entry);
return addv;
}
+/* }}} */
-
+/* {{{ php_apache_value_handler_ex
+ */
CONST_PREFIX char *php_apache_value_handler_ex(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2, int mode)
{
php_per_dir_entry per_dir_entry;
zend_hash_update((HashTable *) conf, per_dir_entry.key, per_dir_entry.key_length, &per_dir_entry, sizeof(php_per_dir_entry), NULL);
return NULL;
}
+/* }}} */
-
+/* {{{ php_apache_value_handler
+ */
CONST_PREFIX char *php_apache_value_handler(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2)
{
return php_apache_value_handler_ex(cmd, conf, arg1, arg2, PHP_INI_PERDIR);
}
+/* }}} */
-
+/* {{{ php_apache_admin_value_handler
+ */
CONST_PREFIX char *php_apache_admin_value_handler(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2)
{
return php_apache_value_handler_ex(cmd, conf, arg1, arg2, PHP_INI_SYSTEM);
}
+/* }}} */
-
+/* {{{ php_apache_flag_handler_ex
+ */
CONST_PREFIX char *php_apache_flag_handler_ex(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2, int mode)
{
char bool_val[2];
return php_apache_value_handler_ex(cmd, conf, arg1, bool_val, mode);
}
+/* }}} */
-
+/* {{{ php_apache_flag_handler
+ */
CONST_PREFIX char *php_apache_flag_handler(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2)
{
return php_apache_flag_handler_ex(cmd, conf, arg1, arg2, PHP_INI_PERDIR);
}
+/* }}} */
-
+/* {{{ php_apache_admin_flag_handler
+ */
CONST_PREFIX char *php_apache_admin_flag_handler(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2)
{
return php_apache_flag_handler_ex(cmd, conf, arg1, arg2, PHP_INI_SYSTEM);
}
+/* }}} */
-
-
-
+/* {{{ int php_xbithack_handler(request_rec * r)
+ */
int php_xbithack_handler(request_rec * r)
{
php_apache_info_struct *conf;
}
return send_parsed_php(r);
}
+/* }}} */
+/* {{{ apache_php_module_shutdown_wrapper
+ */
static void apache_php_module_shutdown_wrapper(void)
{
apache_php_initialized = 0;
tsrm_shutdown();
#endif
}
+/* }}} */
#if MODULE_MAGIC_NUMBER >= 19970728
+/* {{{ php_child_exit_handler
+ */
static void php_child_exit_handler(server_rec *s, pool *p)
{
/* apache_php_initialized = 0; */
tsrm_shutdown();
#endif
}
+/* }}} */
#endif
+/* {{{ void php_init_handler(server_rec *s, pool *p)
+ */
void php_init_handler(server_rec *s, pool *p)
{
register_cleanup(p, NULL, (void (*)(void *))apache_php_module_shutdown_wrapper, (void (*)(void *))php_module_shutdown_for_exec);
}
#endif
}
+/* }}} */
-
-
+/* {{{ handler_rec php_handlers[]
+ */
handler_rec php_handlers[] =
{
{"application/x-httpd-php", send_parsed_php},
{"text/html", php_xbithack_handler},
{NULL}
};
+/* }}} */
-
+/* {{{ command_rec php_commands[]
+ */
command_rec php_commands[] =
{
{"php_value", php_apache_value_handler, NULL, OR_OPTIONS, TAKE2, "PHP Value Modifier"},
{"php_admin_flag", php_apache_admin_flag_handler, NULL, ACCESS_CONF|RSRC_CONF, TAKE2, "PHP Flag Modifier (Admin)"},
{NULL}
};
+/* }}} */
-
-
+/* {{{ odule MODULE_VAR_EXPORT php4_module
+ */
module MODULE_VAR_EXPORT php4_module =
{
STANDARD_MODULE_STUFF,
,NULL /* post read-request */
#endif
};
-
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
}
/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(apache)
{
module *modp = NULL;
php_info_print_table_end();
}
}
+/* }}} */
+/* {{{ proto int virtual(string filename)
+ Perform an Apache sub-request */
/* This function is equivalent to <!--#include virtual...-->
* in mod_include. It does an Apache sub-request. It is useful
* for including CGI scripts or .shtml files, or anything else
* as an Apache module, since it uses the Apache API for doing
* sub requests.
*/
-/* {{{ proto int virtual(string filename)
- Perform an Apache sub-request */
PHP_FUNCTION(virtual)
{
pval **filename;
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
#include "php_version.h"
/*#include "mod_php4.h"*/
-
+/* {{{ apache_php_module_main
+ */
int apache_php_module_main(request_rec *r, int display_source_mode CLS_DC ELS_DC PLS_DC SLS_DC)
{
zend_file_handle file_handle;
php_header(); /* Make sure headers have been sent */
return (OK);
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
}
-
+/* {{{ sapi_module_struct cgi_sapi_module
+ */
static sapi_module_struct cgi_sapi_module = {
"cgi", /* name */
"CGI", /* pretty name */
STANDARD_SAPI_MODULE_PROPERTIES
};
+/* }}} */
-
+/* {{{ php_cgi_usage
+ */
static void php_cgi_usage(char *argv0)
{
char *prog;
" -i PHP information\n"
" -h This help\n", prog);
}
+/* }}} */
-
+/* {{{ init_request_info
+ */.
static void init_request_info(SLS_D)
{
char *content_length = getenv("CONTENT_LENGTH");
auth = getenv("HTTP_AUTHORIZATION");
php_handle_auth_data(auth SLS_CC);
}
-
+/* }}} */
static void define_command_line_ini_entry(char *arg)
{
}
efree(*arg);
}
-
-
-
+/* {{{ main
+ */
int main(int argc, char *argv[])
{
int exit_status = SUCCESS;
return exit_status;
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
sapi_shutdown();
}
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */