diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2001-06-06 13:06:12 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2001-06-06 13:06:12 +0000 |
commit | 81e2cf03ac62c29c6bb365c31b9229aa3b4deff8 (patch) | |
tree | a0680a82219899445723cc36b058d9c4d263e17f | |
parent | 3bfd50f4f1dedb756c4e45566e2f8e172ab435ec (diff) | |
download | php-git-81e2cf03ac62c29c6bb365c31b9229aa3b4deff8.tar.gz |
Fix folding and clean up some extensions
161 files changed, 1610 insertions, 834 deletions
diff --git a/ext/aspell/aspell.c b/ext/aspell/aspell.c index 6a5cba65cd..e7f1be9a31 100644 --- a/ext/aspell/aspell.c +++ b/ext/aspell/aspell.c @@ -221,5 +221,6 @@ PHP_MINFO_FUNCTION(aspell) * 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 */ diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c index 3ef8226fd0..5771477c0f 100644 --- a/ext/bcmath/bcmath.c +++ b/ext/bcmath/bcmath.c @@ -499,4 +499,6 @@ PHP_FUNCTION(bcscale) * 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 */ diff --git a/ext/calendar/cal_unix.c b/ext/calendar/cal_unix.c index cfeaa978d2..80853eac3d 100644 --- a/ext/calendar/cal_unix.c +++ b/ext/calendar/cal_unix.c @@ -78,3 +78,11 @@ PHP_FUNCTION(jdtounix) } /* }}} */ +/* + * 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 + */ diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c index 4443c97bdd..2ac1dc1997 100644 --- a/ext/calendar/calendar.c +++ b/ext/calendar/calendar.c @@ -289,7 +289,6 @@ PHP_FUNCTION(jdtogregorian) } /* }}} */ - /* {{{ proto string jdmonthname(int juliandaycount, int mode) Returns name of month for julian day count */ PHP_FUNCTION(jdmonthname) @@ -339,3 +338,11 @@ PHP_FUNCTION(jdtogregorian) } /* }}} */ +/* + * 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 + */ diff --git a/ext/calendar/dow.c b/ext/calendar/dow.c index 4bd3575601..5336ea63e3 100644 --- a/ext/calendar/dow.c +++ b/ext/calendar/dow.c @@ -65,3 +65,12 @@ char *DayNameLong[7] = "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 + */ diff --git a/ext/calendar/french.c b/ext/calendar/french.c index 75efc30e35..ebb497d90e 100644 --- a/ext/calendar/french.c +++ b/ext/calendar/french.c @@ -148,3 +148,13 @@ char *FrenchMonthName[14] = "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 + */ diff --git a/ext/calendar/jewish.c b/ext/calendar/jewish.c index 2cf4baf864..2b3f93e601 100644 --- a/ext/calendar/jewish.c +++ b/ext/calendar/jewish.c @@ -730,3 +730,12 @@ long int JewishToSdn( } 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 + */ diff --git a/ext/calendar/julian.c b/ext/calendar/julian.c index 094b4ed647..cf78646165 100644 --- a/ext/calendar/julian.c +++ b/ext/calendar/julian.c @@ -238,3 +238,12 @@ long int JulianToSdn( + 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 + */ diff --git a/ext/ccvs/ccvs.c b/ext/ccvs/ccvs.c index 117226f2ab..c69bee5837 100644 --- a/ext/ccvs/ccvs.c +++ b/ext/ccvs/ccvs.c @@ -593,3 +593,13 @@ PHP_MINFO_FUNCTION(ccvs) */ } + + +/* + * 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 + */ diff --git a/ext/cpdf/cpdf.c b/ext/cpdf/cpdf.c index fbdcb2e842..9fa91bf4f3 100644 --- a/ext/cpdf/cpdf.c +++ b/ext/cpdf/cpdf.c @@ -1,27 +1,16 @@ /* +----------------------------------------------------------------------+ - | 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> | +----------------------------------------------------------------------+ @@ -2721,4 +2710,6 @@ PHP_FUNCTION(cpdf_add_outline) { * 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 */ diff --git a/ext/crack/crack.c b/ext/crack/crack.c index 7aaa200573..131d5d57ac 100644 --- a/ext/crack/crack.c +++ b/ext/crack/crack.c @@ -1,3 +1,21 @@ +/* + +----------------------------------------------------------------------+ + | 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 @@ -259,5 +277,6 @@ ZEND_FUNCTION(crack_getlastmessage) * 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 */ diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c index c8a1f7c6a9..17bb8764b4 100644 --- a/ext/ctype/ctype.c +++ b/ext/ctype/ctype.c @@ -13,7 +13,6 @@ | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Hartmut Holzgraefe <hartmut@six.de> | - | | +----------------------------------------------------------------------+ */ @@ -326,5 +325,6 @@ PHP_FUNCTION(ctype_xdigit) * 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 */ diff --git a/ext/curl/curl.c b/ext/curl/curl.c index 0d159e8ccd..2672398296 100644 --- a/ext/curl/curl.c +++ b/ext/curl/curl.c @@ -979,5 +979,6 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc) * 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 */ diff --git a/ext/cybercash/cybercash.c b/ext/cybercash/cybercash.c index 9e7016b82c..8ec8392f93 100644 --- a/ext/cybercash/cybercash.c +++ b/ext/cybercash/cybercash.c @@ -1,27 +1,16 @@ /* +----------------------------------------------------------------------+ - | 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> | @@ -234,5 +223,6 @@ PHP_FUNCTION(cybercash_base64_decode) * 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 */ diff --git a/ext/cybermut/cybermut.c b/ext/cybermut/cybermut.c index 6afcc7e47d..f05ef9420f 100644 --- a/ext/cybermut/cybermut.c +++ b/ext/cybermut/cybermut.c @@ -178,5 +178,6 @@ PHP_FUNCTION(cybermut_creerreponsecm) * 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 */ diff --git a/ext/db/db.c b/ext/db/db.c index 02cc441407..17d6f0d1c6 100644 --- a/ext/db/db.c +++ b/ext/db/db.c @@ -1242,5 +1242,6 @@ ZEND_GET_MODULE(dbm) * 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 */ diff --git a/ext/dba/dba.c b/ext/dba/dba.c index b72c9eae0f..e64adaaaf1 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -1,27 +1,16 @@ /* +----------------------------------------------------------------------+ - | 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> | +----------------------------------------------------------------------+ @@ -524,5 +513,6 @@ PHP_FUNCTION(dba_sync) * 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 */ diff --git a/ext/dba/dba_cdb.c b/ext/dba/dba_cdb.c index f9edfae777..2419a8f563 100644 --- a/ext/dba/dba_cdb.c +++ b/ext/dba/dba_cdb.c @@ -1,27 +1,16 @@ /* +----------------------------------------------------------------------+ - | 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> | +----------------------------------------------------------------------+ @@ -224,5 +213,6 @@ DBA_SYNC_FUNC(cdb) * 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 */ diff --git a/ext/dba/dba_db2.c b/ext/dba/dba_db2.c index 7f0f23d47c..3e25fcde52 100644 --- a/ext/dba/dba_db2.c +++ b/ext/dba/dba_db2.c @@ -1,27 +1,16 @@ /* +----------------------------------------------------------------------+ - | 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> | +----------------------------------------------------------------------+ @@ -205,5 +194,6 @@ DBA_SYNC_FUNC(db2) * 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 */ diff --git a/ext/dba/dba_db3.c b/ext/dba/dba_db3.c index 60012ccc23..a885cf26c6 100644 --- a/ext/dba/dba_db3.c +++ b/ext/dba/dba_db3.c @@ -1,27 +1,16 @@ /* +----------------------------------------------------------------------+ - | 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> | +----------------------------------------------------------------------+ @@ -212,5 +201,6 @@ DBA_SYNC_FUNC(db3) * 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 */ diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c index 554c92e559..cf087b37e3 100644 --- a/ext/dba/dba_dbm.c +++ b/ext/dba/dba_dbm.c @@ -1,27 +1,16 @@ /* +----------------------------------------------------------------------+ - | 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> | +----------------------------------------------------------------------+ @@ -190,5 +179,6 @@ DBA_SYNC_FUNC(dbm) * 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 */ diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c index b4fd5bf1bb..5f7dd4ede8 100644 --- a/ext/dba/dba_gdbm.c +++ b/ext/dba/dba_gdbm.c @@ -1,27 +1,16 @@ /* +----------------------------------------------------------------------+ - | 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> | +----------------------------------------------------------------------+ @@ -193,5 +182,6 @@ DBA_SYNC_FUNC(gdbm) * 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 */ diff --git a/ext/dba/dba_ndbm.c b/ext/dba/dba_ndbm.c index 4722ce91a4..0eb1fa8391 100644 --- a/ext/dba/dba_ndbm.c +++ b/ext/dba/dba_ndbm.c @@ -1,27 +1,16 @@ /* +----------------------------------------------------------------------+ - | 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> | +----------------------------------------------------------------------+ @@ -170,5 +159,6 @@ DBA_SYNC_FUNC(ndbm) * 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 */ diff --git a/ext/dbase/dbase.c b/ext/dbase/dbase.c index 885eb47dbc..68833bd4a2 100644 --- a/ext/dbase/dbase.c +++ b/ext/dbase/dbase.c @@ -779,5 +779,6 @@ BOOL WINAPI DllMain(HANDLE hModule, * 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 */ diff --git a/ext/dbase/dbf_head.c b/ext/dbase/dbf_head.c index b99c1a1acd..4530337879 100644 --- a/ext/dbase/dbf_head.c +++ b/ext/dbase/dbf_head.c @@ -260,3 +260,12 @@ void dbf_head_info(dbhead_t *dbh) 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 + */ diff --git a/ext/dbase/dbf_misc.c b/ext/dbase/dbf_misc.c index 0efb23ab16..3d8fd04f4a 100644 --- a/ext/dbase/dbf_misc.c +++ b/ext/dbase/dbf_misc.c @@ -168,3 +168,12 @@ char *db_cur_date(char *cp) 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 + */ diff --git a/ext/dbase/dbf_ndx.c b/ext/dbase/dbf_ndx.c index a648b42326..9e68c6dd98 100644 --- a/ext/dbase/dbf_ndx.c +++ b/ext/dbase/dbf_ndx.c @@ -181,3 +181,11 @@ ndx_record_t *ndx_get_next_rec(ndx_header_t *hp, ndx_record_t *rp) 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 + */ diff --git a/ext/dbase/dbf_rec.c b/ext/dbase/dbf_rec.c index fa342005fb..da8b8bdad7 100644 --- a/ext/dbase/dbf_rec.c +++ b/ext/dbase/dbf_rec.c @@ -180,3 +180,12 @@ char *dbf_get_next(dbhead_t *dbh) { 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 + */ diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c index e8896f5f7d..bcd0111b8a 100644 --- a/ext/ereg/ereg.c +++ b/ext/ereg/ereg.c @@ -46,6 +46,8 @@ typedef struct { int cflags; } reg_cache; +/* {{{ _php_regcomp + */ static int _php_regcomp(regex_t *preg, const char *pattern, int cflags) { int r = 0; @@ -70,6 +72,7 @@ static int _php_regcomp(regex_t *preg, const char *pattern, int cflags) return r; } +/* }}} */ static void _free_reg_cache(reg_cache *rc) { @@ -119,7 +122,7 @@ PHP_MINFO_FUNCTION(regex) 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) { @@ -158,7 +161,10 @@ 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 */ @@ -263,6 +269,7 @@ static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase) } regfree(&re); } +/* }}} */ /* {{{ proto int ereg(string pattern, string string [, array registers]) Regular expression match */ @@ -280,7 +287,8 @@ PHP_FUNCTION(eregi) } /* }}} */ -/* 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; @@ -418,7 +426,10 @@ char *php_reg_replace(const char *pattern, const char *replace, const char *stri /* whew. */ return (buf); } +/* }}} */ +/* {{{ php_ereg_replace + */ static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase) { pval **arg_pattern, @@ -475,6 +486,7 @@ static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase) STR_FREE(replace); STR_FREE(pattern); } +/* }}} */ /* {{{ proto string ereg_replace(string pattern, string replacement, string string) Replace regular expression */ @@ -492,6 +504,8 @@ PHP_FUNCTION(eregi_replace) } /* }}} */ +/* {{{ php_split + */ static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase) { pval **spliton, **str, **arg_count = NULL; @@ -586,6 +600,7 @@ static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase) regfree(&re); } +/* }}} */ /* ("root", "passwd", "uid", "gid", "other:stuff:like:/bin/sh") = split(":", $passwd_file, 5); */ @@ -650,5 +665,6 @@ PHPAPI PHP_FUNCTION(sql_regcase) * 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 */ diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 144a581a50..e27081c33c 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -1227,4 +1227,6 @@ PHP_FUNCTION(read_exif_data) { * 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 */ diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c index fabbd00064..dd22710daf 100644 --- a/ext/fbsql/php_fbsql.c +++ b/ext/fbsql/php_fbsql.c @@ -154,7 +154,8 @@ struct PHPFBLink #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) @@ -210,6 +211,7 @@ function_entry fbsql_functions[] = { {NULL, NULL, NULL} }; +/* }}} */ zend_module_entry fbsql_module_entry = { "fbsql", @@ -319,6 +321,8 @@ static int php_fbsql_get_default_link(INTERNAL_FUNCTION_PARAMETERS FBSQLLS_DC) 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) @@ -334,7 +338,7 @@ PHP_INI_BEGIN() 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) { @@ -419,6 +423,8 @@ PHP_MINFO_FUNCTION(fbsql) DISPLAY_INI_ENTRIES(); } +/* {{{ php_fbsql_do_connect + */ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistant) { PHPFBLink* phpLink; @@ -568,7 +574,7 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistant) } php_fbsql_set_default_link(return_value->value.lval); } - +/* }}} */ int phpfbFetchRow(PHPFBResult* result, int row) { @@ -600,7 +606,6 @@ PHP_FUNCTION(fbsql_connect) } /* }}} */ - /* {{{ proto resource fbsql_pconnect([string hostname [, string username [, string password]]]); */ PHP_FUNCTION(fbsql_pconnect) @@ -649,6 +654,8 @@ PHP_FUNCTION(fbsql_close) } /* }}} */ +/* {{{ php_fbsql_select_db + */ static int php_fbsql_select_db(char *databaseName, PHPFBLink *link) { unsigned port; @@ -710,6 +717,8 @@ static int php_fbsql_select_db(char *databaseName, PHPFBLink *link) } /* }}} */ +/* {{{ phpfbestrdup + */ void phpfbestrdup(const char * s, int* length, char** value) { int l = s?strlen(s):0; @@ -724,9 +733,10 @@ void phpfbestrdup(const char * s, int* length, char** value) } *length = l; } +/* }}} */ /* {{{ proto bool fbsql_autocommit(int link_identifier [, bool OnOff]) - */ + Turn on auto-commit */ PHP_FUNCTION(fbsql_autocommit) { PHPFBLink* phpLink = NULL; @@ -843,7 +853,6 @@ PHP_FUNCTION(fbsql_rollback) } /* }}} */ - /* {{{ proto string fbsql_hostname(int link_identifier [, string host_name]) */ PHP_FUNCTION(fbsql_hostname) @@ -879,7 +888,6 @@ PHP_FUNCTION(fbsql_hostname) } /* }}} */ - /* {{{ proto string fbsql_database(int link_identifier [, string database]) */ PHP_FUNCTION(fbsql_database) @@ -915,7 +923,6 @@ PHP_FUNCTION(fbsql_database) } /* }}} */ - /* {{{ proto string fbsql_database_password(int link_identifier [, string database_password]) */ PHP_FUNCTION(fbsql_database_password) @@ -951,7 +958,6 @@ PHP_FUNCTION(fbsql_database_password) } /* }}} */ - /* {{{ proto string fbsql_username(int link_identifier [, string username]) */ PHP_FUNCTION(fbsql_username) @@ -987,7 +993,6 @@ PHP_FUNCTION(fbsql_username) } /* }}} */ - /* {{{ proto string fbsql_password(int link_identifier [, string password]) */ PHP_FUNCTION(fbsql_password) @@ -1023,7 +1028,6 @@ PHP_FUNCTION(fbsql_password) } /* }}} */ - /* {{{ proto bool fbsql_select_db([string database_name [, int link_identifier]]) */ PHP_FUNCTION(fbsql_select_db) @@ -1079,7 +1083,6 @@ PHP_FUNCTION(fbsql_select_db) } /* }}} */ - /* {{{ proto int fbsql_change_user(string user, string password [, string database [, int link_identifier]]); */ PHP_FUNCTION(fbsql_change_user) @@ -1140,7 +1143,6 @@ PHP_FUNCTION(fbsql_change_user) } /* }}} */ - /* {{{ proto bool fbsql_create_db(string database_name [, int link_identifier]) */ PHP_FUNCTION(fbsql_create_db) @@ -1212,7 +1214,6 @@ PHP_FUNCTION(fbsql_create_db) } /* }}} */ - /* {{{ proto int fbsql_drop_db(string database_name [, int link_identifier]) */ PHP_FUNCTION(fbsql_drop_db) @@ -1361,7 +1362,6 @@ PHP_FUNCTION(fbsql_start_db) } /* }}} */ - /* {{{ proto int fbsql_stop_db(string database_name [, int link_identifier]) */ PHP_FUNCTION(fbsql_stop_db) @@ -1419,7 +1419,6 @@ 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) @@ -1462,6 +1461,8 @@ PHP_FUNCTION(fbsql_db_status) } /* }}} */ +/* {{{ mdOk + */ int mdOk(PHPFBLink* link, FBCMetaData* md) { FBCDatabaseConnection* c = link->connection; @@ -1500,7 +1501,10 @@ int mdOk(PHPFBLink* link, FBCMetaData* md) } return result; } +/* }}} */ +/* {{{ phpfbQuery + */ static int phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link) { PHPFBResult* result = NULL; @@ -1584,6 +1588,7 @@ static int phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link) if (link) link->affectedRows = fbcmdRowCount(md); return 1; } +/* }}} */ /* {{{ proto resource fbsql_query(string query [, int link_identifier]) */ @@ -1620,7 +1625,6 @@ PHP_FUNCTION(fbsql_query) } /* }}} */ - /* {{{ proto resource fbsql_db_query(string database_name, string query [, int link_identifier]) */ PHP_FUNCTION(fbsql_db_query) @@ -1664,7 +1668,6 @@ PHP_FUNCTION(fbsql_db_query) } /* }}} */ - /* {{{ proto int fbsql_list_dbs([int link_identifier]) */ PHP_FUNCTION(fbsql_list_dbs) @@ -1711,7 +1714,6 @@ PHP_FUNCTION(fbsql_list_dbs) } /* }}} */ - /* {{{ proto int fbsql_list_tables(string database, int [link_identifier]); */ PHP_FUNCTION(fbsql_list_tables) @@ -1759,7 +1761,6 @@ PHP_FUNCTION(fbsql_list_tables) } /* }}} */ - /* {{{ proto int fbsql_list_fields(string database_name, string table_name [, int link_identifier]) */ PHP_FUNCTION(fbsql_list_fields) @@ -1804,7 +1805,6 @@ PHP_FUNCTION(fbsql_list_fields) } /* }}} */ - /* {{{ proto string fbsql_error([int link_identifier]) */ PHP_FUNCTION(fbsql_error) @@ -1840,7 +1840,6 @@ PHP_FUNCTION(fbsql_error) } /* }}} */ - /* {{{ proto int fbsql_errno([int link_identifier]) */ PHP_FUNCTION(fbsql_errno) @@ -1871,7 +1870,6 @@ PHP_FUNCTION(fbsql_errno) } /* }}} */ - /* {{{ proto bool fbsql_warnings([int flag]); */ PHP_FUNCTION(fbsql_warnings) @@ -1891,7 +1889,6 @@ PHP_FUNCTION(fbsql_warnings) } /* }}} */ - /* {{{ proto int fbsql_affected_rows([int link_identifier]) */ PHP_FUNCTION(fbsql_affected_rows) @@ -1952,7 +1949,8 @@ PHP_FUNCTION(fbsql_insert_id) } /* }}} */ - +/* {{{ phpSizeOfInt + */ int phpSizeOfInt (int i) { int s = 1; @@ -1964,7 +1962,10 @@ int phpSizeOfInt (int i) while ((i = i / 10)) s++; return s; } +/* }}} */ +/* {{{ phpfbColumnAsString + */ void phpfbColumnAsString (PHPFBResult* result, int column, void* data ,int* length, char** value) { FBCMetaData* md = result->metaData; @@ -2146,7 +2147,10 @@ void phpfbColumnAsString (PHPFBResult* result, int column, void* data ,int* leng break; } } +/* }}} */ +/* {{{ phpfbSqlResult + */ void phpfbSqlResult (INTERNAL_FUNCTION_PARAMETERS, PHPFBResult* result, int rowIndex, int columnIndex) { void** row; @@ -2210,6 +2214,7 @@ void phpfbSqlResult (INTERNAL_FUNCTION_PARAMETERS, PHPFBResult* result, int rowI } } } +/* }}} */ /* {{{ proto mixed fbsql_result(int result [, int row [, mixed field]]) */ @@ -2286,7 +2291,6 @@ PHP_FUNCTION(fbsql_result) } /* }}} */ - /* {{{ proto int fbsql_next_result(int result) */ PHP_FUNCTION(fbsql_next_result) @@ -2336,7 +2340,6 @@ PHP_FUNCTION(fbsql_next_result) } /* }}} */ - /* {{{ proto int fbsql_num_rows(int result) */ PHP_FUNCTION(fbsql_num_rows) @@ -2372,7 +2375,6 @@ PHP_FUNCTION(fbsql_num_rows) } /* }}} */ - /* {{{ proto int fbsql_num_fields(int result) */ PHP_FUNCTION(fbsql_num_fields) @@ -2397,7 +2399,6 @@ PHP_FUNCTION(fbsql_num_fields) } /* }}} */ - /* {{{ proto array fbsql_fetch_row(int result) */ PHP_FUNCTION(fbsql_fetch_row) @@ -2406,7 +2407,6 @@ PHP_FUNCTION(fbsql_fetch_row) } /* }}} */ - /* {{{ proto object fbsql_fetch_assoc(int result) */ PHP_FUNCTION(fbsql_fetch_assoc) @@ -2415,7 +2415,6 @@ PHP_FUNCTION(fbsql_fetch_assoc) } /* }}} */ - /* {{{ proto object fbsql_fetch_object(int result [, int result_type]) */ PHP_FUNCTION(fbsql_fetch_object) @@ -2430,7 +2429,6 @@ 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) @@ -2439,6 +2437,8 @@ PHP_FUNCTION(fbsql_fetch_array) } /* }}} */ +/* {{{ php_fbsql_fetch_hash + */ static void php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type) { @@ -2548,7 +2548,7 @@ 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) */ @@ -2588,7 +2588,6 @@ PHP_FUNCTION(fbsql_data_seek) } /* }}} */ - /* {{{ proto array fbsql_fetch_lengths(int result) */ PHP_FUNCTION(fbsql_fetch_lengths) @@ -2621,7 +2620,6 @@ PHP_FUNCTION(fbsql_fetch_lengths) } /* }}} */ - /* {{{ proto object fbsql_fetch_field(int result [, int field_index]) */ PHP_FUNCTION(fbsql_fetch_field) @@ -2679,7 +2677,6 @@ PHP_FUNCTION(fbsql_fetch_field) } /* }}} */ - /* {{{ proto bool fbsql_field_seek(int result [, int field_index]) */ PHP_FUNCTION(fbsql_field_seek) @@ -2723,7 +2720,6 @@ PHP_FUNCTION(fbsql_field_seek) } /* }}} */ - /* {{{ proto string fbsql_field_name(int result [, int field_index]) */ PHP_FUNCTION(fbsql_field_name) @@ -2773,7 +2769,6 @@ PHP_FUNCTION(fbsql_field_name) } /* }}} */ - /* {{{ proto string fbsql_field_table(int result [, int field_index]) */ PHP_FUNCTION(fbsql_field_table) @@ -2815,7 +2810,6 @@ PHP_FUNCTION(fbsql_field_table) } /* }}} */ - /* {{{ proto string fbsql_field_len(int result [, int field_index]) */ PHP_FUNCTION(fbsql_field_len) @@ -2871,7 +2865,6 @@ PHP_FUNCTION(fbsql_field_len) } /* }}} */ - /* {{{ proto string fbsql_field_type(int result [, int field_index]) */ PHP_FUNCTION(fbsql_field_type) @@ -2924,7 +2917,6 @@ PHP_FUNCTION(fbsql_field_type) } /* }}} */ - /* {{{ proto string fbsql_field_flags(int result [, int field_index]) */ PHP_FUNCTION(fbsql_field_flags) @@ -3010,7 +3002,6 @@ PHP_FUNCTION(fbsql_field_flags) } /* }}} */ - /* {{{ proto bool fbsql_free_result(int result) */ PHP_FUNCTION(fbsql_free_result) @@ -3037,3 +3028,12 @@ 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 + */ diff --git a/ext/fdf/fdf.c b/ext/fdf/fdf.c index 7629c6e87f..78a08c3c91 100644 --- a/ext/fdf/fdf.c +++ b/ext/fdf/fdf.c @@ -764,5 +764,6 @@ SAPI_POST_HANDLER_FUNC(fdf_post_handler) * 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 */ diff --git a/ext/filepro/filepro.c b/ext/filepro/filepro.c index 905ffdf898..df66a449a5 100644 --- a/ext/filepro/filepro.c +++ b/ext/filepro/filepro.c @@ -572,5 +572,6 @@ PHP_FUNCTION(filepro_retrieve) * 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 */ diff --git a/ext/fribidi/fribidi.c b/ext/fribidi/fribidi.c index 5ff58a3841..1fe9fe115c 100755 --- a/ext/fribidi/fribidi.c +++ b/ext/fribidi/fribidi.c @@ -250,5 +250,6 @@ PHP_FUNCTION(fribidi_log2vis) * 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 */ diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 80fa322d8f..af73aebedc 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -1298,5 +1298,6 @@ bail: * 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 */ diff --git a/ext/gd/gd.c b/ext/gd/gd.c index fbaaf0910c..66c3ccc3d6 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -3499,5 +3499,6 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) { * 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 */ diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c index cdc96ae2cc..d826c439cf 100644 --- a/ext/gettext/gettext.c +++ b/ext/gettext/gettext.c @@ -31,6 +31,8 @@ #include <libintl.h> #include "ext/standard/info.h" +/* {{{ php_gettext_functions[] + */ function_entry php_gettext_functions[] = { PHP_FE(textdomain, NULL) PHP_FE(gettext, NULL) @@ -40,6 +42,7 @@ function_entry php_gettext_functions[] = { 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 @@ -173,4 +176,6 @@ PHP_FUNCTION(bindtextdomain) * 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 */ diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index 550c5f46c4..eb2e1009f7 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -1215,5 +1215,6 @@ static void _php_gmpnum_free(zend_rsrc_list_entry *rsrc) * 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 */ diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c index 7613bb00a7..a8b12ac5ca 100644 --- a/ext/hyperwave/hw.c +++ b/ext/hyperwave/hw.c @@ -230,7 +230,8 @@ PHP_MSHUTDOWN_FUNCTION(hw) 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. */ @@ -290,8 +291,9 @@ int make_return_objrec(pval **return_value, char **objrecs, int count) 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) { @@ -400,7 +402,10 @@ 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; @@ -542,8 +547,11 @@ int make_return_array_from_objrec(pval **return_value, char *objrec) { return(0); } +/* }}} */ #define BUFFERLEN 1024 +/* {{{ make_objrec_from_array + */ static char * make_objrec_from_array(HashTable *lht) { int i, count, keytype; ulong length; @@ -617,8 +625,11 @@ static char * make_objrec_from_array(HashTable *lht) { } return objrec; } +/* }}} */ #undef BUFFERLEN +/* {{{ make_ints_from_array + */ static int * make_ints_from_array(HashTable *lht) { int i, count; int *objids = NULL; @@ -646,7 +657,10 @@ static int * make_ints_from_array(HashTable *lht) { } return objids; } +/* }}} */ +/* {{{ make_strs_from_array + */ static char **make_strs_from_array(HashTable *arrht) { char **carr = NULL; char **ptr; @@ -674,8 +688,11 @@ static char **make_strs_from_array(HashTable *arrht) { } return(carr); } +/* }}} */ #define BUFFERLEN 30 +/* {{{ php_hw_do_connect + */ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) { zval **argv[4]; @@ -933,6 +950,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) ptr->username = NULL; efree(userdata); } +/* }}} */ #undef BUFFERLEN /* Start of user level functions */ @@ -1319,6 +1337,8 @@ PHP_FUNCTION(hw_root) } /* }}} */ +/* {{{ php_hw_command + */ char *php_hw_command(INTERNAL_FUNCTION_PARAMETERS, int comm) { pval **arg1; int link, type; @@ -1344,6 +1364,7 @@ char *php_hw_command(INTERNAL_FUNCTION_PARAMETERS, int comm) { return object; } } +/* }}} */ /* {{{ proto string hw_stat(int link) Returns status string */ @@ -2037,6 +2058,8 @@ PHP_FUNCTION(hw_modifyobject) { #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; @@ -2127,6 +2150,7 @@ void php_hw_mvcp(INTERNAL_FUNCTION_PARAMETERS, int mvcp) { RETURN_LONG(docIDcount + collIDcount); } +/* }}} */ /* {{{ proto void hw_mv(int link, array objrec, int from, int dest) Moves object */ @@ -4445,4 +4469,6 @@ void print_msg(hg_msg *msg, char *str, int txt) * 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 */ diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 2ff802c9ad..b852d8c275 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -295,5 +295,6 @@ PHP_FUNCTION(iconv_get_encoding) * 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 */ diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 164d23ce58..b37e6fd747 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -391,7 +391,8 @@ void mail_free_messagelist(MESSAGELIST **msglist) } } - +/* {{{ PHP_MINFO_FUNCTION + */ PHP_MINFO_FUNCTION(imap) { php_info_print_table_start(); @@ -411,7 +412,7 @@ PHP_MINFO_FUNCTION(imap) #endif php_info_print_table_end(); } - +/* }}} */ static void php_imap_init_globals(zend_imap_globals *imap_globals) { @@ -853,7 +854,6 @@ PHP_FUNCTION(imap_open) } /* }}} */ - /* {{{ proto int imap_popen(string mailbox, string user, string password [, int options]) Open a persistant IMAP stream to a mailbox */ PHP_FUNCTION(imap_popen) @@ -867,7 +867,6 @@ PHP_FUNCTION(imap_popen) #endif } /* }}} */ - /* {{{ proto int imap_reopen(int stream_id, string mailbox [, int options]) Reopen an IMAP stream to a new mailbox */ @@ -915,7 +914,6 @@ PHP_FUNCTION(imap_reopen) } /* }}} */ - /* {{{ 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) @@ -953,7 +951,6 @@ 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) @@ -981,7 +978,6 @@ PHP_FUNCTION(imap_num_msg) } /* }}} */ - /* {{{ proto int imap_ping(int stream_id) Check if the IMAP stream is still active */ PHP_FUNCTION(imap_ping) @@ -1006,7 +1002,6 @@ 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) @@ -1072,7 +1067,6 @@ PHP_FUNCTION(imap_get_quota) } /* }}} */ - /* {{{ 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) @@ -1135,7 +1129,6 @@ PHP_FUNCTION(imap_expunge) } /* }}} */ - /* {{{ proto int imap_close(int stream_id [, int options]) Close an IMAP stream */ PHP_FUNCTION(imap_close) @@ -1172,7 +1165,6 @@ PHP_FUNCTION(imap_close) } /* }}} */ - /* {{{ proto array imap_headers(int stream_id) Returns headers for all messages in a mailbox */ PHP_FUNCTION(imap_headers) @@ -1233,7 +1225,6 @@ PHP_FUNCTION(imap_headers) } /* }}} */ - /* {{{ proto string imap_body(int stream_id, int msg_no [, int options]) Read the message body */ PHP_FUNCTION(imap_body) @@ -1276,7 +1267,6 @@ 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) @@ -1305,7 +1295,6 @@ 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) @@ -1341,7 +1330,6 @@ 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) @@ -1378,7 +1366,6 @@ PHP_FUNCTION(imap_mail_move) } /* }}} */ - /* {{{ proto int imap_createmailbox(int stream_id, string mailbox) Create a new mailbox */ PHP_FUNCTION(imap_createmailbox) @@ -1409,7 +1396,6 @@ PHP_FUNCTION(imap_createmailbox) } /* }}} */ - /* {{{ proto int imap_renamemailbox(int stream_id, string old_name, string new_name) Rename a mailbox */ PHP_FUNCTION(imap_renamemailbox) @@ -1441,7 +1427,6 @@ PHP_FUNCTION(imap_renamemailbox) } /* }}} */ - /* {{{ proto int imap_deletemailbox(int stream_id, string mailbox) Delete a mailbox */ PHP_FUNCTION(imap_deletemailbox) @@ -1472,7 +1457,6 @@ PHP_FUNCTION(imap_deletemailbox) } /* }}} */ - /* {{{ proto array imap_list(int stream_id, string ref, string pattern) Read the list of mailboxes */ PHP_FUNCTION(imap_list) @@ -1518,7 +1502,6 @@ 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 */ @@ -1580,7 +1563,6 @@ PHP_FUNCTION(imap_list_full) } /* }}} */ - /* {{{ 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) @@ -1623,7 +1605,6 @@ PHP_FUNCTION(imap_listscan) /* }}} */ - /* {{{ proto object imap_check(int stream_id) Get mailbox properties */ PHP_FUNCTION(imap_check) @@ -1664,7 +1645,6 @@ 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) @@ -1697,7 +1677,6 @@ 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) @@ -1730,7 +1709,6 @@ 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) @@ -1829,7 +1807,6 @@ 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) @@ -1906,7 +1883,6 @@ PHP_FUNCTION(imap_lsub) } /* }}} */ - /* {{{ 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 */ @@ -1968,7 +1944,6 @@ PHP_FUNCTION(imap_lsub_full) } /* }}} */ - /* {{{ proto int imap_subscribe(int stream_id, string mailbox) Subscribe to a mailbox */ PHP_FUNCTION(imap_subscribe) @@ -1999,7 +1974,6 @@ PHP_FUNCTION(imap_subscribe) } /* }}} */ - /* {{{ proto int imap_unsubscribe(int stream_id, string mailbox) Unsubscribe from a mailbox */ PHP_FUNCTION(imap_unsubscribe) @@ -2029,7 +2003,6 @@ 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) @@ -2087,7 +2060,6 @@ 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) @@ -2129,7 +2101,6 @@ PHP_FUNCTION(imap_fetchbody) /* }}} */ - /* {{{ proto string imap_base64(string text) Decode BASE64 encoded text */ PHP_FUNCTION(imap_base64) @@ -2153,7 +2124,6 @@ PHP_FUNCTION(imap_base64) } /* }}} */ - /* {{{ proto string imap_qprint(string text) Convert a quoted-printable string to an 8-bit string */ PHP_FUNCTION(imap_qprint) @@ -2177,7 +2147,6 @@ PHP_FUNCTION(imap_qprint) } /* }}} */ - /* {{{ proto string imap_8bit(string text) Convert an 8-bit string to a quoted-printable string */ PHP_FUNCTION(imap_8bit) @@ -2198,7 +2167,6 @@ PHP_FUNCTION(imap_8bit) } /* }}} */ - /* {{{ proto string imap_binary(string text) Convert an 8bit string to a base64 string */ PHP_FUNCTION(imap_binary) @@ -2217,7 +2185,6 @@ PHP_FUNCTION(imap_binary) } /* }}} */ - /* {{{ proto object imap_mailboxmsginfo(int stream_id) Returns info about the current mailbox */ PHP_FUNCTION(imap_mailboxmsginfo) @@ -2271,7 +2238,6 @@ 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) @@ -2308,7 +2274,6 @@ 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) @@ -2350,7 +2315,6 @@ PHP_FUNCTION(imap_rfc822_parse_adrlist) } /* }}} */ - /* {{{ proto string imap_utf8(string string) Convert a string to UTF-8 */ PHP_FUNCTION(imap_utf8) @@ -2545,7 +2509,6 @@ PHP_FUNCTION(imap_utf7_decode) } /* }}} */ - /* {{{ proto string imap_utf7_encode(string buf) Encode a string in modified UTF-7 */ PHP_FUNCTION(imap_utf7_encode) @@ -2703,7 +2666,6 @@ PHP_FUNCTION(imap_setflag_full) } /* }}} */ - /* {{{ proto int imap_clearflag_full(int stream_id, string sequence, string flag [, int options]) Clears flags on messages */ PHP_FUNCTION(imap_clearflag_full) @@ -2733,7 +2695,6 @@ 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) @@ -2794,7 +2755,6 @@ 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) @@ -2838,7 +2798,6 @@ 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) @@ -2872,7 +2831,6 @@ 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 */ @@ -2902,7 +2860,6 @@ PHP_FUNCTION(imap_msgno) } /* }}} */ - /* {{{ proto object imap_status(int stream_id, string mailbox, int options) Get status info from a mailbox */ PHP_FUNCTION(imap_status) @@ -2955,7 +2912,6 @@ 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 */ @@ -3077,7 +3033,6 @@ PHP_FUNCTION(imap_bodystruct) /* }}} */ - /* {{{ 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) @@ -3176,7 +3131,6 @@ 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) @@ -3533,6 +3487,8 @@ 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 @@ -3575,10 +3531,9 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * #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 */ @@ -3707,7 +3662,6 @@ PHP_FUNCTION(imap_search) } /* }}} */ - /* {{{ 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 */ @@ -3736,7 +3690,6 @@ PHP_FUNCTION(imap_alerts) } /* }}} */ - /* {{{ 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 */ @@ -3765,7 +3718,6 @@ PHP_FUNCTION(imap_errors) } /* }}} */ - /* {{{ 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 */ @@ -3793,7 +3745,6 @@ PHP_FUNCTION(imap_last_error) } /* }}} */ - /* {{{ 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) @@ -3896,6 +3847,8 @@ 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; @@ -3934,7 +3887,10 @@ void _php_imap_parse_address (ADDRESS *addresslist, char *fulladdress, zval *pad 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; @@ -4010,7 +3966,10 @@ void _php_make_header_object(zval *myzvalue, ENVELOPE *en) } } +/* }}} */ +/* {{{ _php_imap_add_body + */ void _php_imap_add_body(zval *arg, BODY *body) { zval *parametres, *param, *dparametres, *dparam; @@ -4125,7 +4084,7 @@ void _php_imap_add_body(zval *arg, BODY *body) add_assoc_object(arg, "parts", parametres); } } - +/* }}} */ /* Interfaces to C-client */ void mm_searched(MAILSTREAM *stream,unsigned long number) @@ -4463,4 +4422,11 @@ PHP_FUNCTION (imap_thread) } /* }}} */ -/* 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 + */ diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index 3e7d8e4360..f3ff1049f0 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -134,7 +134,6 @@ ZEND_DECLARE_MODULE_GLOBALS(ibase) /* }}} */ - /* {{{ internal macros, functions and structures */ #define IB_STATUS (IBG(status)) @@ -247,7 +246,6 @@ PHP_FUNCTION(ibase_errmsg) } /* }}} */ - /* {{{ _php_ibase_error() print interbase error and save it for ibase_errmsg() */ static void _php_ibase_error(void) @@ -266,7 +264,6 @@ 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, ...) @@ -287,7 +284,6 @@ static void _php_ibase_module_error(char *msg, ...) /* destructors ---------------------- */ - /* {{{ _php_ibase_free_xsqlda() */ /* not actual destructor ... */ static void _php_ibase_free_xsqlda(XSQLDA *sqlda) @@ -309,7 +305,6 @@ static void _php_ibase_free_xsqlda(XSQLDA *sqlda) } /* }}} */ - /* {{{ _php_ibase_commit_link() */ static void _php_ibase_commit_link(ibase_db_link *link) { @@ -356,7 +351,6 @@ static void _php_ibase_close_link(zend_rsrc_list_entry *rsrc) } /* }}} */ - /* {{{ _php_ibase_close_plink() */ static void _php_ibase_close_plink(zend_rsrc_list_entry *rsrc) { @@ -372,7 +366,6 @@ 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) { @@ -407,7 +400,6 @@ 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) { @@ -459,7 +451,6 @@ static void _php_ibase_free_blob(zend_rsrc_list_entry *rsrc) } /* }}} */ - /* {{{ _php_ibase_free_trans() */ static void _php_ibase_free_trans(zend_rsrc_list_entry *rsrc) { @@ -483,7 +474,6 @@ 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) @@ -630,7 +620,6 @@ PHP_MINFO_FUNCTION(ibase) } /* }}} */ - /* {{{ _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) { @@ -692,7 +681,6 @@ static int _php_ibase_attach_db(char *server, char *uname, char *passwd, char *c } /* }}} */ - /* {{{ _php_ibase_connect() */ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) { @@ -891,7 +879,6 @@ 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) @@ -900,7 +887,6 @@ 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) @@ -909,7 +895,6 @@ PHP_FUNCTION(ibase_pconnect) } /* }}} */ - /* {{{ proto int ibase_close([int link_identifier]) Close an InterBase connection */ PHP_FUNCTION(ibase_close) @@ -1039,7 +1024,6 @@ static int _php_ibase_alloc_array(ibase_array **ib_arrayp, int *array_cntp, } /* }}} */ - /* {{{ _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) @@ -1144,7 +1128,6 @@ _php_ibase_alloc_query_error: } /* }}} */ - /* {{{ _php_ibase_bind() Bind parameter placeholders in a previously prepared query */ static int _php_ibase_bind(XSQLDA *sqlda, pval **b_vars, BIND_BUF *buf) @@ -1313,7 +1296,6 @@ 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) { @@ -1372,7 +1354,6 @@ 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) { @@ -1450,7 +1431,6 @@ _php_ibase_exec_error: /* I'm a bad boy... */ } /* }}} */ - /* {{{ proto int ibase_trans([int trans_args [, int link_identifier]]) Start transaction */ PHP_FUNCTION(ibase_trans) @@ -1542,7 +1522,6 @@ 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) @@ -1559,7 +1538,6 @@ static int _php_ibase_def_trans(ibase_db_link * ib_link, int trans_n) } /*}}}*/ - /* {{{ _php_ibase_trans_end() */ #define COMMIT 1 #define ROLLBACK 0 @@ -1615,7 +1593,6 @@ static void _php_ibase_trans_end(INTERNAL_FUNCTION_PARAMETERS, int commit) } /* }}} */ - /* {{{ proto int ibase_commit([int link_identifier,] int trans_number) Commit transaction */ PHP_FUNCTION(ibase_commit) @@ -1624,7 +1601,6 @@ PHP_FUNCTION(ibase_commit) } /* }}} */ - /* {{{ proto int ibase_rollback([int link_identifier,] int trans_number) Roolback transaction */ PHP_FUNCTION(ibase_rollback) @@ -1633,7 +1609,6 @@ PHP_FUNCTION(ibase_rollback) } /* }}} */ - /* {{{ proto int ibase_query([int link_identifier,] string query [, int bind_args]) Execute a query */ PHP_FUNCTION(ibase_query) @@ -1716,7 +1691,6 @@ 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) { @@ -1899,7 +1873,7 @@ static int _php_ibase_arr_pval(pval *ar_pval, char **datap, ibase_array *ib_arra } return SUCCESS; } - +/* }}} */ /* {{{ _php_ibase_fetch_hash() */ @@ -2120,7 +2094,6 @@ break; } /* }}} */ - /* {{{ proto array ibase_fetch_row(int result [, int blob_flag]) Fetch a row from the results of a query */ PHP_FUNCTION(ibase_fetch_row) @@ -2129,7 +2102,6 @@ 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) @@ -2138,7 +2110,6 @@ PHP_FUNCTION(ibase_fetch_object) } /* }}} */ - /* {{{ proto int ibase_free_result(int result) Free the memory used by a result */ PHP_FUNCTION(ibase_free_result) @@ -2159,7 +2130,6 @@ PHP_FUNCTION(ibase_free_result) } /* }}} */ - /* {{{ proto int ibase_prepare([int link_identifier,] string query) Prepare a query for later execution */ PHP_FUNCTION(ibase_prepare) @@ -2212,7 +2182,6 @@ PHP_FUNCTION(ibase_prepare) } /* }}} */ - /* {{{ proto int ibase_execute(int query [, int bind_args [, int ...]]) Execute a previously prepared query */ PHP_FUNCTION(ibase_execute) @@ -2266,7 +2235,6 @@ PHP_FUNCTION(ibase_execute) } /* }}} */ - /* {{{ proto int ibase_free_query(int query) Free memory used by a query */ PHP_FUNCTION(ibase_free_query) @@ -2287,7 +2255,6 @@ 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) @@ -2347,7 +2314,6 @@ PHP_FUNCTION(ibase_timefmt) } /* }}} */ - /* {{{ proto int ibase_num_fields(int result) Get the number of fields in result */ PHP_FUNCTION(ibase_num_fields) @@ -2373,7 +2339,6 @@ 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) @@ -2453,10 +2418,8 @@ 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) { @@ -2513,7 +2476,6 @@ static int _php_ibase_blob_info(isc_blob_handle bl_handle,IBASE_BLOBINFO *bl_inf } /* }}} */ - /* {{{ proto int ibase_blob_create([int link_identifier]) Create blob for adding data */ PHP_FUNCTION(ibase_blob_create) @@ -2562,7 +2524,6 @@ PHP_FUNCTION(ibase_blob_create) } /* }}} */ - /* {{{ proto int ibase_blob_open(string blob_id) Open blob for retriving data parts */ PHP_FUNCTION(ibase_blob_open) @@ -2600,7 +2561,6 @@ 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) @@ -2627,7 +2587,6 @@ 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) @@ -2677,7 +2636,6 @@ PHP_FUNCTION(ibase_blob_get) } /* }}} */ - #define BLOB_CLOSE 1 #define BLOB_CANCEL 2 @@ -2719,7 +2677,6 @@ static void _php_ibase_blob_end(INTERNAL_FUNCTION_PARAMETERS, int bl_end) } /* }}} */ - /* {{{ proto int ibase_blob_close(int blob_id) Close blob */ PHP_FUNCTION(ibase_blob_close) @@ -2728,7 +2685,6 @@ PHP_FUNCTION(ibase_blob_close) } /* }}} */ - /* {{{ proto int ibase_blob_cancel(int blob_id) Cancel creating blob */ PHP_FUNCTION(ibase_blob_cancel) @@ -2737,7 +2693,6 @@ 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) @@ -2812,7 +2767,6 @@ PHP_FUNCTION(ibase_blob_info) } /* }}} */ - /* {{{ proto int ibase_blob_echo(string blob_id_str) Output blob contents to browser */ PHP_FUNCTION(ibase_blob_echo) @@ -2971,5 +2925,6 @@ PHP_FUNCTION(ibase_blob_import) * 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 */ - diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index d7232bf7ee..894031bd11 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1991,5 +1991,6 @@ PHP_FUNCTION(ldap_8859_to_t61) { * 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 */ diff --git a/ext/mailparse/mailparse.c b/ext/mailparse/mailparse.c index 1ca5d58b76..541d929525 100755 --- a/ext/mailparse/mailparse.c +++ b/ext/mailparse/mailparse.c @@ -760,7 +760,6 @@ PHP_FUNCTION(mailparse_msg_get_part_data) } /* }}} */ - /* {{{ proto long mailparse_msg_get_part(resource rfc2045, string mimesection) Return a handle on a given section in a mimemessage */ @@ -796,5 +795,6 @@ PHP_FUNCTION(mailparse_msg_get_part) * 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 */ diff --git a/ext/mailparse/rfc2045.c b/ext/mailparse/rfc2045.c index a513c1f7e6..ea61cfdb2b 100755 --- a/ext/mailparse/rfc2045.c +++ b/ext/mailparse/rfc2045.c @@ -1163,6 +1163,12 @@ unsigned rfc2045_mimepartcount(const struct rfc2045 *p) 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 + */ diff --git a/ext/mailparse/rfc2045appendurl.c b/ext/mailparse/rfc2045appendurl.c index 231fbfe985..1683c0a390 100644 --- a/ext/mailparse/rfc2045appendurl.c +++ b/ext/mailparse/rfc2045appendurl.c @@ -33,6 +33,8 @@ ** --------------------------------------------------------------------- */ +/* {{{ get_method_path + */ static void get_method_path(const char *p, const char **method, unsigned *methodl, @@ -58,7 +60,10 @@ static void get_method_path(const char *p, *methodl=0; *path=p; } +/* }}} */ +/* {{{ rfc2045_append_url + */ char *rfc2045_append_url(const char *base, const char *loc) { const char *base_method; @@ -115,6 +120,7 @@ char *rfc2045_append_url(const char *base, const char *loc) return (buf); } +/* }}} */ char *rfc2045_content_base(struct rfc2045 *p) { @@ -126,5 +132,6 @@ 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 */ diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index 68ed41f1be..2656892bb9 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -1341,7 +1341,7 @@ PHP_FUNCTION(mcrypt_encrypt) 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 */ @@ -1359,7 +1359,7 @@ PHP_FUNCTION(mcrypt_decrypt) 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 */ @@ -1378,7 +1378,7 @@ PHP_FUNCTION(mcrypt_ecb) 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 */ @@ -1397,7 +1397,7 @@ PHP_FUNCTION(mcrypt_cbc) 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 */ @@ -1416,7 +1416,7 @@ PHP_FUNCTION(mcrypt_cfb) 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 */ @@ -1435,6 +1435,7 @@ PHP_FUNCTION(mcrypt_ofb) php_mcrypt_do_crypt (Z_STRVAL_PP(cipher), key, data, "ofb", iv, argc, Z_LVAL_PP(mode), return_value); } +/* }}} */ #endif @@ -1597,7 +1598,6 @@ PHP_FUNCTION(mcrypt_cfb) } /* }}} */ - /* {{{ 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) @@ -1652,3 +1652,12 @@ PHP_FUNCTION(mcrypt_ecb) #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 + */ diff --git a/ext/mhash/mhash.c b/ext/mhash/mhash.c index a8b6b9f2fb..75d86c5bbf 100644 --- a/ext/mhash/mhash.c +++ b/ext/mhash/mhash.c @@ -266,8 +266,15 @@ PHP_FUNCTION(mhash_keygen_s2k) 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 + */ diff --git a/ext/ming/ming.c b/ext/ming/ming.c index f404060d7d..bcd2e2d540 100644 --- a/ext/ming/ming.c +++ b/ext/ming/ming.c @@ -3035,3 +3035,12 @@ PHP_MINIT_FUNCTION(ming) /* }}} */ #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 + */ diff --git a/ext/mnogosearch/php_mnogo.c b/ext/mnogosearch/php_mnogo.c index c76c2ea62f..85c017ff7b 100644 --- a/ext/mnogosearch/php_mnogo.c +++ b/ext/mnogosearch/php_mnogo.c @@ -15,7 +15,7 @@ | 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> | @@ -108,6 +108,8 @@ static int le_link,le_res; #include <udm_config.h> #include <udmsearch.h> +/* {{{ mnogosearch_functions[] + */ function_entry mnogosearch_functions[] = { PHP_FE(udm_api_version, NULL) @@ -139,7 +141,7 @@ function_entry mnogosearch_functions[] = { {NULL, NULL, NULL} }; - +/* }}} */ zend_module_entry mnogosearch_module_entry = { "mnogosearch", @@ -168,6 +170,8 @@ static void _free_udm_res(zend_rsrc_list_entry *rsrc){ UdmFreeResult(Res); } +/* {{{ PHP_MINIT_FUNCTION + */ DLEXPORT PHP_MINIT_FUNCTION(mnogosearch) { UdmInit(); @@ -288,7 +292,7 @@ DLEXPORT PHP_MINIT_FUNCTION(mnogosearch) return SUCCESS; } - +/* }}} */ DLEXPORT PHP_MSHUTDOWN_FUNCTION(mnogosearch) { @@ -373,7 +377,6 @@ DLEXPORT PHP_FUNCTION(udm_alloc_agent) } /* }}} */ - /* {{{ proto int udm_set_agent_param(int agent, int var, string val) Set mnoGoSearch agent session parameters */ DLEXPORT PHP_FUNCTION(udm_set_agent_param) @@ -606,7 +609,6 @@ 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) @@ -707,7 +709,6 @@ 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) @@ -735,7 +736,6 @@ 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) @@ -811,7 +811,6 @@ 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) @@ -837,7 +836,6 @@ DLEXPORT PHP_FUNCTION(udm_clear_search_limits) } /* }}} */ - /* {{{ proto int udm_find(int agent, string query) Perform search */ DLEXPORT PHP_FUNCTION(udm_find) @@ -869,7 +867,6 @@ 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){ @@ -960,7 +957,6 @@ 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) @@ -1015,7 +1011,6 @@ DLEXPORT PHP_FUNCTION(udm_get_res_param) } /* }}} */ - /* {{{ proto int udm_free_res(int res) mnoGoSearch free result */ DLEXPORT PHP_FUNCTION(udm_free_res) @@ -1040,7 +1035,6 @@ DLEXPORT PHP_FUNCTION(udm_free_res) } /* }}} */ - /* {{{ proto int udm_free_agent(int agent) Free mnoGoSearch session */ DLEXPORT PHP_FUNCTION(udm_free_agent) @@ -1065,7 +1059,6 @@ DLEXPORT PHP_FUNCTION(udm_free_agent) } /* }}} */ - /* {{{ proto int udm_errno(int agent) Get mnoGoSearch error number */ DLEXPORT PHP_FUNCTION(udm_errno) @@ -1088,7 +1081,6 @@ DLEXPORT PHP_FUNCTION(udm_errno) } /* }}} */ - /* {{{ proto string udm_error(int agent) Get mnoGoSearch error message */ DLEXPORT PHP_FUNCTION(udm_error) @@ -1112,7 +1104,6 @@ DLEXPORT PHP_FUNCTION(udm_error) } /* }}} */ - /* {{{ proto int udm_api_version() Get mnoGoSearch API version */ DLEXPORT PHP_FUNCTION(udm_api_version) @@ -1121,7 +1112,6 @@ 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) @@ -1171,7 +1161,6 @@ 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) @@ -1221,7 +1210,6 @@ 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 */ @@ -1251,9 +1239,11 @@ DLEXPORT PHP_FUNCTION(udm_get_doc_count) #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 */ - diff --git a/ext/msql/php_msql.c b/ext/msql/php_msql.c index 86ed7ad25d..104ec19ea8 100644 --- a/ext/msql/php_msql.c +++ b/ext/msql/php_msql.c @@ -1318,5 +1318,6 @@ PHP_FUNCTION(msql_affected_rows) * 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 */ diff --git a/ext/muscat/EXPERIMENTAL b/ext/muscat/EXPERIMENTAL new file mode 100644 index 0000000000..4f0b763eeb --- /dev/null +++ b/ext/muscat/EXPERIMENTAL @@ -0,0 +1 @@ +This extension cannot be distributed with PHP - It is GPL'ed diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index 72162babaf..25d4174b72 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -2061,4 +2061,6 @@ PHP_FUNCTION(mysql_free_result) * 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 */ diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 17365e7512..9089ab790f 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -4239,6 +4239,7 @@ PHP_FUNCTION(ocistatementtype) RETVAL_STRING("UNKNOWN",1); } } +/* }}} */ /* {{{ proto int ocirowcount(int stmt) Return the row count of an OCI statement */ @@ -4290,8 +4291,7 @@ static oci_collection *oci_get_coll(int ind) return (oci_collection *) NULL; } } - - +/* }}} */ /* {{{ proto string ocifreecollection(object lob) Deletes collection object*/ @@ -4922,5 +4922,6 @@ PHP_FUNCTION(ocinewcollection) * 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 */ - diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 474e9cabc4..cff774a2c4 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -3519,5 +3519,6 @@ PHP_FUNCTION(odbc_tableprivileges) * 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 */ diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 1d4b1b860b..67b12389f0 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -1874,5 +1874,6 @@ static void _php_x509_free(zend_rsrc_list_entry *rsrc) * 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 */ diff --git a/ext/oracle/oracle.c b/ext/oracle/oracle.c index 2c65df62a8..2bcaabb580 100644 --- a/ext/oracle/oracle.c +++ b/ext/oracle/oracle.c @@ -20,6 +20,8 @@ +----------------------------------------------------------------------+ */ +/* $Id$ */ + /* comment out the next line if you're on Oracle 7.x and don't have the olog call. */ @@ -78,6 +80,8 @@ void ora_do_logon(INTERNAL_FUNCTION_PARAMETERS, int persistent); static int le_conn, le_pconn, le_cursor; +/* {{{ prototypes + */ PHP_FUNCTION(ora_bind); PHP_FUNCTION(ora_close); PHP_FUNCTION(ora_commit); @@ -107,7 +111,10 @@ PHP_RINIT_FUNCTION(oracle); 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) @@ -134,7 +141,10 @@ function_entry oracle_functions[] = { PHP_FE(ora_rollback, NULL) {NULL, NULL, NULL} }; +/* }}} */ +/* {{{ oracle_module_entry + */ zend_module_entry oracle_module_entry = { "oracle", oracle_functions, @@ -145,7 +155,10 @@ zend_module_entry oracle_module_entry = { PHP_MINFO(oracle), STANDARD_MODULE_PROPERTIES }; +/* }}} */ +/* {{{ ora_func_tab[] + */ static const text *ora_func_tab[] = {(text *) "unused", /* 1, 2 */ (text *) "unused", (text *) "OSQL", @@ -180,11 +193,14 @@ static const text *ora_func_tab[] = /* 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; @@ -206,7 +222,10 @@ static int _close_oraconn(zend_rsrc_list_entry *rsrc) return 1; } +/* }}} */ +/* {{{ pval_ora_param_destructor + */ static void pval_ora_param_destructor(oraParam *param) { @@ -214,8 +233,10 @@ pval_ora_param_destructor(oraParam *param) efree(param->progv); } } +/* }}} */ - +/* {{{ _close_oracur + */ static int _close_oracur(oraCursor *cur) { int i; @@ -252,13 +273,19 @@ static int _close_oracur(oraCursor *cur) 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", @@ -284,7 +311,10 @@ static void php_ora_init_globals(ORALS_D) memset((void*) &ORA(db_err_conn),0,sizeof(ORA(db_err_conn))); } +/* }}} */ +/* {{{ PHP_MINIT_FUNCTION + */ PHP_MINIT_FUNCTION(oracle) { @@ -311,7 +341,10 @@ PHP_MINIT_FUNCTION(oracle) return SUCCESS; } +/* }}} */ +/* {{{ PHP_RINIT_FUNCTION + */ PHP_RINIT_FUNCTION(oracle) { ORALS_FETCH(); @@ -325,8 +358,10 @@ PHP_RINIT_FUNCTION(oracle) */ return SUCCESS; } +/* }}} */ - +/* {{{ PHP_MSHUTDOWN_FUNCTION + */ PHP_MSHUTDOWN_FUNCTION(oracle) { ORALS_FETCH(); @@ -336,13 +371,18 @@ PHP_MSHUTDOWN_FUNCTION(oracle) return SUCCESS; } +/* }}} */ +/* {{{ PHP_RSHUTDOWN_FUNCTION + */ PHP_RSHUTDOWN_FUNCTION(oracle) { return SUCCESS; - } +/* }}} */ +/* {{{ _ora_ping + */ static int _ora_ping(oraConnection *conn) { Cda_Def cda; @@ -360,6 +400,7 @@ static int _ora_ping(oraConnection *conn) return 1; } +/* }}} */ /* ** PHP functions @@ -381,6 +422,8 @@ PHP_FUNCTION(ora_plogon) } /* }}} */ +/* {{{ ora_do_logon + */ void ora_do_logon(INTERNAL_FUNCTION_PARAMETERS, int persistent) { char *user,*passwd; @@ -553,6 +596,7 @@ void ora_do_logon(INTERNAL_FUNCTION_PARAMETERS, int persistent) efree(hashed_details); } +/* }}} */ /* {{{ proto int ora_logoff(int connection) Close an Oracle connection */ @@ -1528,6 +1572,8 @@ PHP_FUNCTION(ora_errorcode) } /* }}} */ +/* {{{ PHP_MINFO_FUNCTION + */ PHP_MINFO_FUNCTION(oracle) { @@ -1540,12 +1586,14 @@ 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) { @@ -1565,7 +1613,10 @@ ora_get_cursor(HashTable *list, pval **ind) return cursor; } +/* }}} */ +/* {{{ ora_error + */ static char * ora_error(Cda_Def * cda) { @@ -1586,7 +1637,10 @@ ora_error(Cda_Def * cda) } return (char *) errmsg; } +/* }}} */ +/* {{{ ora_describe_define + */ static sword ora_describe_define(oraCursor * cursor) { @@ -1677,7 +1731,10 @@ ora_describe_define(oraCursor * cursor) } return 1; } +/* }}} */ +/* {{{ ora_set_param_values + */ int ora_set_param_values(oraCursor *cursor, int isout) { char *paramname; @@ -1732,6 +1789,7 @@ int ora_set_param_values(oraCursor *cursor, int isout) return 1; } +/* }}} */ #endif /* HAVE_ORACLE */ @@ -1740,4 +1798,6 @@ int ora_set_param_values(oraCursor *cursor, int isout) * 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 */ diff --git a/ext/ovrimos/ovrimos.c b/ext/ovrimos/ovrimos.c index 06ccdc3d53..08bb341872 100644 --- a/ext/ovrimos/ovrimos.c +++ b/ext/ovrimos/ovrimos.c @@ -5,11 +5,11 @@ | 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> | @@ -17,6 +17,8 @@ +----------------------------------------------------------------------+ */ +/* $Id$ */ + #include <php.h> #include <php_globals.h> #include <zend_API.h> @@ -319,6 +321,8 @@ PHP_FUNCTION(ovrimos_exec) /* }}} */ +/* {{{ column_to_string + */ static void column_to_string(SQLS stmt, int i, char *buffer, int *len) { const char *bf = sqlColValue(stmt, i, 0); @@ -446,6 +450,7 @@ static void column_to_string(SQLS stmt, int i, char *buffer, int *len) break; } } +/* }}} */ /* {{{ proto int ovrimos_fetch_into(int result_id, array result_array [, string how, [int rownumber]]) Fetch one result row into an array @@ -1039,6 +1044,8 @@ PHP_FUNCTION(ovrimos_setoption) /* }}} */ #endif +/* {{{ ovrimos_functions[] + */ function_entry ovrimos_functions[] = { /* PHP_FE(ovrimos_setoption, NULL)*/ /* PHP_FE(ovrimos_autocommit, NULL)*/ @@ -1066,6 +1073,7 @@ function_entry ovrimos_functions[] = { PHP_FE(ovrimos_longreadlen, NULL) PHP_FALIAS(ovrimos_do, ovrimos_exec, NULL) {NULL, NULL, NULL} }; +/* }}} */ zend_module_entry ovrimos_module_entry = { "Ovrimos", @@ -1082,3 +1090,12 @@ DLEXPORT zend_module_entry *get_module() { 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 + */ diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index ecdd8b22b7..749c34f5e5 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1413,5 +1413,6 @@ ZEND_GET_MODULE(pcre) * 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 */ diff --git a/ext/pfpro/pfpro.c b/ext/pfpro/pfpro.c index 666239fcd0..b861af0a17 100644 --- a/ext/pfpro/pfpro.c +++ b/ext/pfpro/pfpro.c @@ -599,5 +599,6 @@ PHP_FUNCTION(pfpro_process) * 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 */ diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index a2f479e75b..d86a6afe80 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1957,4 +1957,6 @@ PHP_FUNCTION(pg_client_encoding) * 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 */ diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 6dd6fac233..3ecc6eca06 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -1,27 +1,16 @@ /* +----------------------------------------------------------------------+ - | 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> | +----------------------------------------------------------------------+ @@ -968,5 +957,6 @@ PHP_FUNCTION(posix_getrlimit) * 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 */ diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index 10abf469f7..76534e5710 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -800,5 +800,6 @@ PHP_MINFO_FUNCTION(pspell) * 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 */ diff --git a/ext/qtdom/qtdom.c b/ext/qtdom/qtdom.c index 4c08a97d9f..9d4ea7d059 100644 --- a/ext/qtdom/qtdom.c +++ b/ext/qtdom/qtdom.c @@ -13,13 +13,11 @@ | 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 @@ -59,8 +57,8 @@ zend_module_entry qtdom_module_entry = { 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 }; @@ -69,11 +67,8 @@ zend_module_entry qtdom_module_entry = { 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 @@ -92,47 +87,31 @@ PHP_MINIT_FUNCTION(qtdom) 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; @@ -161,11 +140,12 @@ int qdom_find_attributes( zval **children, struct qdom_attribute *attr ) 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; @@ -230,6 +210,7 @@ int qdom_find_children( zval **children, struct qdom_node *orig_node ) qdom_do_node_free( tmp_node ); return count; } +/* }}} */ /* {{{ proto object qdom_tree( string ) creates a tree of an xml string */ @@ -288,10 +269,11 @@ PHP_FUNCTION(qdom_error) #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 */ diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index b8617105c1..60e9dcd0ce 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -348,5 +348,6 @@ PHP_FUNCTION(shmop_delete) * 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 */ diff --git a/ext/skeleton/skeleton.c b/ext/skeleton/skeleton.c index a30bc8c591..2fbc52c749 100644 --- a/ext/skeleton/skeleton.c +++ b/ext/skeleton/skeleton.c @@ -143,5 +143,6 @@ PHP_FUNCTION(confirm_extname_compiled) * 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 */ diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 35155ef851..2a59a92277 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -410,5 +410,6 @@ PHP_FUNCTION(snmpset) { * 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 */ diff --git a/ext/snmp/winsnmp.c b/ext/snmp/winsnmp.c index 6e01354acf..ad590e47c7 100644 --- a/ext/snmp/winsnmp.c +++ b/ext/snmp/winsnmp.c @@ -238,5 +238,6 @@ DLEXPORT void php3_snmpwalk(INTERNAL_FUNCTION_PARAMETERS) { * 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 */ diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index c3c21be6ff..ce86c6452f 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -103,7 +103,8 @@ static unsigned char second_fifth_and_sixth_args_force_ref[] = 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) @@ -145,7 +146,7 @@ function_entry sockets_functions[] = { PHP_FE(socket_shutdown, NULL) {NULL, NULL, NULL} }; - +/* }}} */ zend_module_entry sockets_module_entry = { "sockets", @@ -243,7 +244,7 @@ static php_socket *accept_connect(php_socket *php_sock, struct sockaddr *la) 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; @@ -302,8 +303,10 @@ int php_read(int socket, void *buf, int maxlen) return n; } +/* }}} */ - +/* {{{ PHP_MINIT_FUNCTION + */ PHP_MINIT_FUNCTION(sockets) { struct protoent *pe; @@ -353,16 +356,17 @@ PHP_MINIT_FUNCTION(sockets) 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 */ @@ -1989,4 +1993,6 @@ PHP_FUNCTION(socket_shutdown) * 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 */ diff --git a/ext/standard/array.c b/ext/standard/array.c index e69dc6e597..a356cc3c70 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -3122,5 +3122,6 @@ PHP_FUNCTION(key_exists) * 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 */ diff --git a/ext/standard/assert.c b/ext/standard/assert.c index e5988f3a90..d28424d2bd 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -329,5 +329,6 @@ PHP_FUNCTION(assert_options) * 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 */ diff --git a/ext/standard/base64.c b/ext/standard/base64.c index 21864431fe..cf3a4b79a2 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -196,5 +196,6 @@ PHP_FUNCTION(base64_decode) { * 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 */ diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 3f14dc599c..50ae28eb4d 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2623,5 +2623,6 @@ PHP_FUNCTION(is_callable) * 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 */ diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index 9e39af959c..91183591b7 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -39,7 +39,8 @@ static void browscap_entry_dtor(zval *pvalue) } } - +/* {{{ convert_browscap_pattern + */ static void convert_browscap_pattern(zval *pattern) { register int i,j; @@ -80,8 +81,10 @@ static void convert_browscap_pattern(zval *pattern) 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) { @@ -126,8 +129,10 @@ static void php_browscap_parser_cb(zval *arg1, zval *arg2, int callback_type, vo break; } } +/* }}} */ - +/* {{{ PHP_MINIT_FUNCTION + */ PHP_MINIT_FUNCTION(browscap) { char *browscap = INI_STR("browscap"); @@ -151,8 +156,10 @@ PHP_MINIT_FUNCTION(browscap) return SUCCESS; } +/* }}} */ - +/* {{{ PHP_MSHUTDOWN_FUNCTION + */ PHP_MSHUTDOWN_FUNCTION(browscap) { if (INI_STR("browscap")) { @@ -160,8 +167,10 @@ PHP_MSHUTDOWN_FUNCTION(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; @@ -188,6 +197,7 @@ static int browser_reg_compare(zval **browser,int num_args, va_list args, zend_h regfree(&r); return 0; } +/* }}} */ /* {{{ proto object get_browser(string browser_name) Get information about the capabilities of a browser */ @@ -253,5 +263,6 @@ PHP_FUNCTION(get_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 */ diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c index e7b754d92f..86fe56cccc 100644 --- a/ext/standard/crc32.c +++ b/ext/standard/crc32.c @@ -131,5 +131,6 @@ PHP_NAMED_FUNCTION(php_if_crc32) * 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 */ diff --git a/ext/standard/credits.c b/ext/standard/credits.c index 7a65ab09b3..b2089b2eeb 100644 --- a/ext/standard/credits.c +++ b/ext/standard/credits.c @@ -24,6 +24,8 @@ #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) { @@ -109,10 +111,13 @@ PHPAPI void php_print_credits(int flag) 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 */ diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index 8d749e90fb..9b2f8729b6 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -175,12 +175,11 @@ PHP_FUNCTION(crypt) /* }}} */ #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 */ diff --git a/ext/standard/cyr_convert.c b/ext/standard/cyr_convert.c index 0869dd056a..44bb49a8d6 100644 --- a/ext/standard/cyr_convert.c +++ b/ext/standard/cyr_convert.c @@ -31,9 +31,6 @@ #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. @@ -50,6 +47,8 @@ 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, @@ -186,9 +185,9 @@ _cyr_mac = { 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: @@ -266,6 +265,7 @@ static char * php_convert_cyr_string(unsigned char *str, int length, char from, } return (char *)str; } +/* }}} */ /* {{{ proto string convert_cyr_string(string str, string from, string to) Convert from one Cyrillic character set to another */ @@ -294,5 +294,6 @@ PHP_FUNCTION(convert_cyr_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 */ diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index d5e1f180e5..c0f166c48a 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -75,6 +75,8 @@ PHP_FUNCTION(time) } /* }}} */ +/* {{{ php_mktime + */ void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm) { pval **arguments[7]; @@ -190,6 +192,7 @@ void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm) RETURN_LONG(seconds); } +/* }}} */ /* {{{ proto int mktime(int hour, int min, int sec, int mon, int day, int year) Get UNIX timestamp for a date */ @@ -207,6 +210,8 @@ PHP_FUNCTION(gmmktime) } /* }}} */ +/* {{{ php_date + */ static void php_date(INTERNAL_FUNCTION_PARAMETERS, int gm) { @@ -511,6 +516,7 @@ 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 */ @@ -628,7 +634,8 @@ PHP_FUNCTION(getdate) } /* }}} */ -/* 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; @@ -656,7 +663,7 @@ char *php_std_date(time_t t) 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 */ @@ -697,6 +704,8 @@ PHP_FUNCTION(checkdate) /* }}} */ #if HAVE_STRFTIME +/* {{{ _php_strftime + */ void _php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm) { pval **format_arg, **timestamp_arg; @@ -753,6 +762,8 @@ void _php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm) efree(buf); RETURN_FALSE; } +/* }}} */ + /* {{{ proto string strftime(string format [, int timestamp]) Format a local time/date according to locale settings */ PHP_FUNCTION(strftime) @@ -804,5 +815,6 @@ PHP_FUNCTION(strtotime) * 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 */ diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 23060fd365..93f0c386ef 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -364,5 +364,6 @@ PHP_NAMED_FUNCTION(php_if_readdir) * 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 */ diff --git a/ext/standard/dl.c b/ext/standard/dl.c index 7f10f5ac96..439fb889c7 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -91,6 +91,8 @@ PHP_FUNCTION(dl) #define USING_ZTS 0 #endif +/* {{{ php_dl + */ void php_dl(pval *file, int type, pval *return_value) { void *handle; @@ -200,7 +202,7 @@ void php_dl(pval *file, int type, pval *return_value) RETURN_TRUE; } - +/* }}} */ PHP_MINFO_FUNCTION(dl) { @@ -227,5 +229,6 @@ 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 */ diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 5ff093995d..bf8fa2eb76 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -18,6 +18,8 @@ /* $Id$ */ +/* {{{ includes + */ #include "php.h" #if HAVE_SYS_SOCKET_H #include <sys/socket.h> @@ -59,6 +61,7 @@ #endif #include "dns.h" +/* }}} */ char *php_gethostbyaddr(char *ip); char *php_gethostbyname(char *name); @@ -78,7 +81,8 @@ PHP_FUNCTION(gethostbyaddr) } /* }}} */ - +/* {{{ php_gethostbyaddr + */ char *php_gethostbyaddr(char *ip) { struct in_addr addr; @@ -100,6 +104,7 @@ char *php_gethostbyaddr(char *ip) } return estrdup(hp->h_name); } +/* }}} */ /* {{{ proto string gethostbyname(string hostname) Get the IP address corresponding to a given Internet host name */ @@ -151,6 +156,8 @@ PHP_FUNCTION(gethostbynamel) } /* }}} */ +/* {{{ php_gethostbyname + */ char *php_gethostbyname(char *name) { struct hostent *hp; @@ -166,6 +173,7 @@ char *php_gethostbyname(char *name) 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)) @@ -324,5 +332,6 @@ PHP_FUNCTION(getmxrr) * 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 */ diff --git a/ext/standard/exec.c b/ext/standard/exec.c index f85c40a98f..5dd828de26 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -35,7 +35,7 @@ #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) @@ -234,6 +234,7 @@ int php_Exec(int type, char *cmd, pval *array, pval *return_value) efree(buf); return FG(pclose_ret); } +/* }}} */ /* {{{ proto string exec(string command [, array output [, int return_value]]) Execute an external program */ @@ -326,6 +327,8 @@ PHP_FUNCTION(passthru) } /* }}} */ +/* {{{ php_get_index + */ static int php_get_index(char *s, char c) { register int x; @@ -336,8 +339,10 @@ static int php_get_index(char *s, char c) 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. @@ -363,7 +368,10 @@ char * php_escape_shell_cmd(char *str) { } return cmd; } +/* }}} */ +/* {{{ php_escape_shell_arg + */ char * php_escape_shell_arg(char *str) { register int x, y, l; char *cmd; @@ -389,6 +397,7 @@ char * php_escape_shell_arg(char *str) { cmd[l] = '\0'; return cmd; } +/* }}} */ /* {{{ proto string escapeshellcmd(string command) Escape shell metacharacters */ @@ -480,5 +489,6 @@ PHP_FUNCTION(shell_exec) * 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 */ diff --git a/ext/standard/file.c b/ext/standard/file.c index e52feda63f..8c31f827dc 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -584,6 +584,8 @@ PHP_NAMED_FUNCTION(php_if_tmpfile) /* }}} */ #if HAVE_PHP_STREAM +/* {{{ PHP_FUNCTION + */ PHP_FUNCTION(fopenstream) { zval ** zfilename, ** zmode; @@ -603,6 +605,7 @@ PHP_FUNCTION(fopenstream) } ZEND_REGISTER_RESOURCE(return_value, stream, le_stream); } +/* }}} */ #endif /* {{{ proto int fopen(string filename, string mode [, int use_include_path]) @@ -1729,7 +1732,6 @@ PHP_FUNCTION(rename) } /* }}} */ - /* {{{ proto int unlink(string filename) Delete a file */ PHP_FUNCTION(unlink) @@ -1758,7 +1760,6 @@ PHP_FUNCTION(unlink) } /* }}} */ - /* {{{ proto int ftruncate (int fp, int size) Truncate file to 'size' length */ PHP_NAMED_FUNCTION(php_if_ftruncate) @@ -1874,7 +1875,6 @@ PHP_NAMED_FUNCTION(php_if_fstat) } /* }}} */ - /* {{{ proto int copy(string source_file, string destination_file) Copy a file */ @@ -1915,7 +1915,8 @@ PHP_FUNCTION(copy) /* }}} */ - +/* {{{ php_copy_file + */ PHPAPI int php_copy_file(char *src, char *dest) { char buffer[8192]; @@ -1971,9 +1972,7 @@ cleanup: close(fd_t); return ret; } - - - +/* }}} */ /* {{{ proto string fread(int fp, int length) Binary-safe file read */ @@ -2028,6 +2027,7 @@ PHP_FUNCTION(fread) } /* }}} */ + /* {{{ proto array fgetcsv(int fp, int length [, string delimiter]) Get line from file pointer and parse for CSV fields */ @@ -2222,7 +2222,8 @@ PHP_FUNCTION(realpath) static fd_set readfd; static int max_fd; - +/* {{{ PHP_FUNCTION(fd_set) + */ PHP_FUNCTION(fd_set) { pval **arg; @@ -2274,7 +2275,10 @@ PHP_FUNCTION(fd_set) } RETURN_LONG(1); } +/* }}} */ +/* {{{ PHP_FUNCTION(select) + */ PHP_FUNCTION(select) { pval **timeout; @@ -2292,7 +2296,10 @@ PHP_FUNCTION(select) 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; @@ -2318,10 +2325,12 @@ PHP_FUNCTION(fd_isset) } 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; @@ -2351,11 +2360,13 @@ size_t php_fread_all(char **buf, int socket, FILE *fp, int issock) { 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]; @@ -2441,11 +2452,13 @@ php_meta_tags_token php_next_meta_token(FILE *fp, int socketd, int issock, int * 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 */ diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 41d0603e44..2eb07d8f20 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -421,7 +421,6 @@ PHP_FUNCTION(chown) } /* }}} */ - /* {{{ proto bool chmod(string filename, int mode) Change file mode */ PHP_FUNCTION(chmod) @@ -462,7 +461,6 @@ PHP_FUNCTION(chmod) } /* }}} */ - /* {{{ proto bool touch(string filename [, int time]) Set modification time of file */ PHP_FUNCTION(touch) @@ -535,7 +533,6 @@ PHP_FUNCTION(touch) } /* }}} */ - /* {{{ proto void clearstatcache(void) Clear file stat cache */ PHP_FUNCTION(clearstatcache) @@ -551,6 +548,8 @@ 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, @@ -761,6 +760,7 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ php_error(E_WARNING, "didn't understand stat call"); RETURN_FALSE; } +/* }}} */ /* another quickie macro to make defining similar functions easier */ #define FileFunction(name, funcnum) \ @@ -868,5 +868,6 @@ FileFunction(php_if_stat,17) * 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 */ diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c index 6395df992c..38b387f8b2 100644 --- a/ext/standard/flock_compat.c +++ b/ext/standard/flock_compat.c @@ -152,15 +152,13 @@ int flock(int fd, int operation) #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; @@ -214,7 +212,7 @@ int inet_aton(const char *cp, struct in_addr *ap) return 1; } - +/* }}} */ #endif /* !HAVE_INET_ATON */ /* @@ -222,5 +220,6 @@ int inet_aton(const char *cp, struct in_addr *ap) * 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 */ diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index 67791bbe23..4ccdc40723 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -389,8 +389,7 @@ php_sprintf_getnumber(char *buffer, int *pos) return num; } - -/* +/* {{{ php_formatted_print * New sprintf implementation for PHP. * * Modifiers: @@ -629,6 +628,7 @@ php_formatted_print(int ht, int *len) *len = outpos; return result; } +/* }}} */ /* {{{ proto string sprintf(string format [, mixed arg1 [, mixed ...]]) Return a formatted string */ @@ -665,5 +665,6 @@ PHP_FUNCTION(user_printf) * 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 */ diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c index c3334f8969..a4f5148b5a 100644 --- a/ext/standard/fsock.c +++ b/ext/standard/fsock.c @@ -737,6 +737,7 @@ PHPAPI size_t php_sock_fread(char *ptr, size_t size, int socket) } /* }}} */ + /* {{{ module start/shutdown functions */ /* {{{ php_msock_destroy */ @@ -761,5 +762,6 @@ PHP_RSHUTDOWN_FUNCTION(fsock) * 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 */ diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index 62efc0c413..f777a7518a 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -77,7 +77,8 @@ static int php_get_ftp_result(int socketd) 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; @@ -311,11 +312,13 @@ FILE *php_fopen_url_wrap_ftp(char *path, char *mode, int options, int *issock, i *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 */ diff --git a/ext/standard/head.c b/ext/standard/head.c index c10c9ba261..a455691725 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -81,6 +81,8 @@ PHP_FUNCTION(Header) } /* }}} */ +/* {{{ php_header + */ PHPAPI int php_header() { SLS_FETCH(); @@ -91,8 +93,10 @@ PHPAPI int php_header() 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; @@ -107,7 +111,10 @@ void php_push_cookie_list(char *name, char *value, time_t expires, char *path, c new->secure = secure; top = new; } +/* }}} */ +/* {{{ php_pop_cookie_list + */ CookieList *php_pop_cookie_list(void) { CookieList *ret; @@ -117,6 +124,7 @@ CookieList *php_pop_cookie_list(void) 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]]]]]) @@ -251,6 +259,8 @@ PHP_FUNCTION(setcookie) } /* }}} */ +/* {{{ php_headers_unsent + */ int php_headers_unsent(void) { if (php_header_printed!=1 || !php_print_header) { @@ -259,6 +269,7 @@ int php_headers_unsent(void) return 0; } } +/* }}} */ /* {{{ proto int headers_sent(void) Return true if headers have already been sent, false otherwise */ @@ -279,5 +290,6 @@ PHP_FUNCTION(headers_sent) * 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 */ diff --git a/ext/standard/html.c b/ext/standard/html.c index 3df62a4eae..5e9bc50117 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -106,6 +106,8 @@ static const struct { { NULL } }; +/* {{{ get_next_char + */ inline static unsigned short get_next_char(enum entity_charset charset, unsigned char * str, int * newpos, @@ -205,8 +207,10 @@ inline static unsigned short get_next_char(enum entity_charset charset, *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) { @@ -261,7 +265,10 @@ 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; @@ -347,7 +354,10 @@ PHPAPI char *php_escape_html_entities(unsigned char *old, int oldlen, int *newle } +/* }}} */ +/* {{{ php_html_entities + */ static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all) { zval **arg, **quotes, **charset; @@ -374,10 +384,13 @@ static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all) 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); @@ -386,6 +399,7 @@ void register_html_constants(INIT_FUNC_ARGS) 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 */ @@ -471,5 +485,6 @@ PHP_FUNCTION(get_html_translation_table) * 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 */ diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 37c229705c..db5735e9a7 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -68,6 +68,8 @@ #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; @@ -302,11 +304,13 @@ FILE *php_fopen_url_wrap_http(char *path, char *mode, int options, int *issock, } 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 */ diff --git a/ext/standard/image.c b/ext/standard/image.c index 8d4934e77b..7b550f9519 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -66,7 +66,8 @@ struct gfxinfo { 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; @@ -85,8 +86,10 @@ static struct gfxinfo *php_handle_gif (int socketd, FILE *fp, int issock) return result; } +/* }}} */ - +/* {{{ php_handle_psd + */ static struct gfxinfo *php_handle_psd (int socketd, FILE *fp, int issock) { struct gfxinfo *result = NULL; @@ -110,8 +113,10 @@ static struct gfxinfo *php_handle_psd (int socketd, FILE *fp, int issock) return result; } +/* }}} */ - +/* {{{ php_handle_bmp + */ static struct gfxinfo *php_handle_bmp (int socketd, FILE *fp, int issock) { struct gfxinfo *result = NULL; @@ -130,9 +135,10 @@ static struct gfxinfo *php_handle_bmp (int socketd, FILE *fp, int issock) 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; @@ -145,8 +151,10 @@ static unsigned long int php_swf_get_bits (unsigned char* buffer, unsigned int p } return result; } +/* }}} */ - +/* {{{ php_handle_swf + */ static struct gfxinfo *php_handle_swf (int socketd, FILE *fp, int issock) { struct gfxinfo *result = NULL; @@ -165,8 +173,10 @@ static struct gfxinfo *php_handle_swf (int socketd, FILE *fp, int issock) 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; @@ -190,6 +200,7 @@ static struct gfxinfo *php_handle_png (int socketd, FILE *fp, int issock) result->height = (unsigned int) in_height; return result; } +/* }}} */ /* routines to handle JPEG data */ @@ -227,6 +238,8 @@ static struct gfxinfo *php_handle_png (int socketd, FILE *fp, int issock) #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]; @@ -236,7 +249,10 @@ static unsigned short php_read2(int socketd, FILE *fp, int issock) 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 */ { @@ -250,7 +266,10 @@ static unsigned int php_next_marker(int socketd, FILE *fp, int issock) 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 */ { @@ -264,7 +283,10 @@ static void php_skip_variable(int socketd, FILE *fp, int issock) 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; @@ -291,8 +313,10 @@ static void php_read_APP(int socketd, FILE *fp, int issock,unsigned int marker,p 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; @@ -369,6 +393,7 @@ static struct gfxinfo *php_handle_jpeg (int socketd, FILE *fp, int issock, pval return NULL; } +/* }}} */ /* main function */ @@ -500,5 +525,6 @@ PHP_FUNCTION(getimagesize) * 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 */ diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c index e9967fc784..c0019282e8 100644 --- a/ext/standard/incomplete_class.c +++ b/ext/standard/incomplete_class.c @@ -33,6 +33,8 @@ #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]; @@ -49,12 +51,18 @@ static void incomplete_class_message(zend_property_reference *ref) 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); @@ -62,7 +70,10 @@ static int incomplete_class_set_property(zend_property_reference *property_refer /* does not reach this point */ return (0); } +/* }}} */ +/* {{{ incomplete_class_get_property + */ static zval incomplete_class_get_property(zend_property_reference *property_reference) { zval foo; @@ -73,7 +84,10 @@ static zval incomplete_class_get_property(zend_property_reference *property_refe 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; @@ -87,8 +101,10 @@ zend_class_entry *php_create_incomplete_class(BLS_D) return (BG(incomplete_class)); } +/* }}} */ - +/* {{{ php_lookup_class_name + */ char *php_lookup_class_name(zval *object, size_t *nlen, zend_bool del) { zval **val; @@ -106,7 +122,10 @@ char *php_lookup_class_name(zval *object, size_t *nlen, zend_bool del) return (retval); } +/* }}} */ +/* {{{ php_store_class_name + */ void php_store_class_name(zval *object, const char *name, size_t len) { zval *val; @@ -119,11 +138,13 @@ void php_store_class_name(zval *object, const char *name, size_t len) 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 */ diff --git a/ext/standard/info.c b/ext/standard/info.c index 16ee26bfa6..8d39d13ce0 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -38,6 +38,8 @@ 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); @@ -53,8 +55,10 @@ static int _display_module_info(zend_module_entry *module, void *arg) } return 0; } +/* }}} */ - +/* {{{ php_print_gpcse_array + */ static void php_print_gpcse_array(char *name, uint name_length ELS_DC) { zval **data, **tmp, tmp2; @@ -96,7 +100,10 @@ static void php_print_gpcse_array(char *name, uint name_length ELS_DC) } } } +/* }}} */ +/* {{{ php_info_print_style + */ void php_info_print_style(void) { php_printf("<STYLE TYPE=\"text/css\"><!--\n"); @@ -108,8 +115,10 @@ void php_info_print_style(void) 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; @@ -133,7 +142,10 @@ PHPAPI char *php_get_uname() #endif return estrdup(php_uname); } +/* }}} */ +/* {{{ php_print_info + */ PHPAPI void php_print_info(int flag) { char **env,*tmp1,*tmp2; @@ -324,7 +336,7 @@ PHPAPI void php_print_info(int flag) PUTS("</BODY></HTML>"); } - +/* }}} */ PHPAPI void php_info_print_table_start() @@ -364,7 +376,8 @@ PHPAPI void php_info_print_table_colspan_header(int num_cols, char *header) 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; @@ -385,8 +398,10 @@ PHPAPI void php_info_print_table_header(int num_cols, ...) va_end(row_elements); } +/* }}} */ - +/* {{{ php_info_print_table_row + */ PHPAPI void php_info_print_table_row(int num_cols, ...) { int i; @@ -414,9 +429,10 @@ PHPAPI void php_info_print_table_row(int num_cols, ...) 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); @@ -436,7 +452,7 @@ void register_phpinfo_constants(INIT_FUNC_ARGS) 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 */ @@ -475,7 +491,6 @@ PHP_FUNCTION(phpversion) } /* }}} */ - /* {{{ proto void phpcredits([int flag]) Prints the list of people who've contributed to the PHP project */ PHP_FUNCTION(phpcredits) @@ -505,7 +520,6 @@ 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) @@ -522,7 +536,6 @@ PHP_FUNCTION(php_egg_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) @@ -558,5 +571,6 @@ PHP_FUNCTION(php_uname) * 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 */ diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index 675291f252..0d07354455 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -73,6 +73,8 @@ #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) @@ -82,7 +84,10 @@ static int php_iptc_put1(FILE *fp,int spool,unsigned char c,unsigned char **spoo return c; } +/* }}} */ +/* {{{ php_iptc_get1 + */ static int php_iptc_get1(FILE *fp,int spool,unsigned char **spoolbuf) { int c; @@ -101,7 +106,10 @@ static int php_iptc_get1(FILE *fp,int spool,unsigned char **spoolbuf) return c; } +/* }}} */ +/* {{{ php_iptc_read_remaining + */ static int php_iptc_read_remaining(FILE *fp,int spool,unsigned char **spoolbuf) { int c; @@ -110,7 +118,10 @@ static int php_iptc_read_remaining(FILE *fp,int spool,unsigned char **spoolbuf) return M_EOI; } +/* }}} */ +/* {{{ php_iptc_skip_variable + */ static int php_iptc_skip_variable(FILE *fp,int spool,unsigned char **spoolbuf) { unsigned int length; @@ -129,7 +140,10 @@ static int php_iptc_skip_variable(FILE *fp,int spool,unsigned char **spoolbuf) return 0; } +/* }}} */ +/* {{{ php_iptc_next_marker + */ static int php_iptc_next_marker(FILE *fp,int spool,unsigned char **spoolbuf) { int c; @@ -157,6 +171,7 @@ static int php_iptc_next_marker(FILE *fp,int spool,unsigned char **spoolbuf) return (unsigned int) c; } +/* }}} */ static char psheader[] = "\xFF\xED\0\0Photoshop 3.0\08BIM\x04\x04\0\0\0\0"; @@ -375,5 +390,6 @@ PHP_FUNCTION(iptcparse) * 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 */ diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c index ca6e8b7fb4..22f6fc3fb5 100644 --- a/ext/standard/lcg.c +++ b/ext/standard/lcg.c @@ -97,3 +97,12 @@ PHP_FUNCTION(lcg_value) 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 + */ diff --git a/ext/standard/levenshtein.c b/ext/standard/levenshtein.c index d703617da3..e305f8070f 100644 --- a/ext/standard/levenshtein.c +++ b/ext/standard/levenshtein.c @@ -25,7 +25,8 @@ #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 ) @@ -72,8 +73,10 @@ static int reference_levdist(const char *s1, int l1, 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"); @@ -81,7 +84,7 @@ static int custom_levdist(char *str1,char *str2,char *callback_name) return -1; } - +/* }}} */ /* {{{ proto int levenshtein(string str1, string str2) Calculate Levenshtein distance between two strings */ @@ -148,3 +151,12 @@ PHP_FUNCTION(levenshtein) 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 + */ diff --git a/ext/standard/link.c b/ext/standard/link.c index 7e7e60697e..c600be1fc3 100644 --- a/ext/standard/link.c +++ b/ext/standard/link.c @@ -158,7 +158,6 @@ PHP_FUNCTION(link) } /* }}} */ - #endif /* @@ -166,4 +165,6 @@ PHP_FUNCTION(link) * 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 */ diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 3079659d34..67a2160028 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -12,7 +12,7 @@ | 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> | +----------------------------------------------------------------------+ */ @@ -215,5 +215,6 @@ PHP_MINFO_FUNCTION(mail) {} * 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 */ diff --git a/ext/standard/math.c b/ext/standard/math.c index 63a7c0a050..aa62621e5f 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -725,5 +725,6 @@ PHP_FUNCTION(number_format) * 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 */ diff --git a/ext/standard/md5.c b/ext/standard/md5.c index e22c46a124..62699a95e3 100644 --- a/ext/standard/md5.c +++ b/ext/standard/md5.c @@ -150,7 +150,8 @@ static unsigned char PADDING[64] = (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) { @@ -162,8 +163,10 @@ 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. */ @@ -202,8 +205,10 @@ void PHP_MD5Update(PHP_MD5_CTX * context, const unsigned char *input, ((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) @@ -230,8 +235,10 @@ 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]; @@ -321,8 +328,10 @@ const unsigned char block[64]; /* 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) @@ -339,8 +348,10 @@ unsigned int 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) @@ -354,11 +365,13 @@ unsigned int 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 */ diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c index 383e67476e..545bda300c 100644 --- a/ext/standard/metaphone.c +++ b/ext/standard/metaphone.c @@ -153,7 +153,8 @@ static char Lookahead(char *word, int how_far) /* 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. */ @@ -460,11 +461,13 @@ static int metaphone(char *word, int max_phonemes, char **phoned_word, int tradi 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 */ diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index 1eb10d49f6..0850c6cf2c 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -67,7 +67,6 @@ PHP_FUNCTION(microtime) } /* }}} */ - /* {{{ proto array gettimeofday(void) Returns the current time as array */ PHP_FUNCTION(gettimeofday) @@ -140,11 +139,11 @@ PHP_FUNCTION(getrusage) /* }}} */ - /* * 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 */ diff --git a/ext/standard/output.c b/ext/standard/output.c index 1f3f5f9f17..26f95af2e4 100644 --- a/ext/standard/output.c +++ b/ext/standard/output.c @@ -102,7 +102,8 @@ PHPAPI int php_header_write(const char *str, uint str_length) 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(); @@ -118,9 +119,10 @@ PHPAPI int php_start_ob_buffer(zval *output_handler, uint chunk_size) 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; @@ -243,9 +245,10 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush) 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(); @@ -254,8 +257,10 @@ PHPAPI void php_end_ob_buffers(zend_bool send_buffer) php_end_ob_buffer(send_buffer, 0); } } +/* }}} */ - +/* {{{ php_start_implicit_flush + */ PHPAPI void php_start_implicit_flush() { OLS_FETCH(); @@ -263,16 +268,20 @@ PHPAPI void php_start_implicit_flush() 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(); @@ -285,12 +294,14 @@ PHPAPI void php_ob_set_internal_handler(php_output_handler_func_t internal_outpu 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(); @@ -303,8 +314,10 @@ static inline void php_ob_allocate(void) 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(); @@ -325,8 +338,10 @@ static void php_ob_init(uint initial_size, uint block_size, zval *output_handler 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; @@ -352,6 +367,7 @@ static void php_ob_append(const char *text, uint text_length) return; } } +/* }}} */ #if 0 static void php_ob_prepend(const char *text, uint text_length) @@ -375,7 +391,8 @@ 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(); @@ -388,9 +405,10 @@ int php_ob_get_buffer(pval *p) 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(); @@ -402,6 +420,7 @@ int php_ob_get_length(pval *p) p->value.lval = OG(active_ob_buffer).text_length; return SUCCESS; } +/* }}} */ /* * Wrapper functions - implementation @@ -415,7 +434,8 @@ static int php_b_body_write(const char *str, uint str_length) 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; @@ -441,8 +461,10 @@ static int php_ub_body_write_no_header(const char *str, uint str_length) return result; } +/* }}} */ - +/* {{{ php_ub_body_write + */ static int php_ub_body_write(const char *str, uint str_length) { int result = 0; @@ -472,13 +494,12 @@ static int php_ub_body_write(const char *str, uint str_length) 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) @@ -526,7 +547,6 @@ 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) @@ -535,7 +555,6 @@ 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) @@ -544,7 +563,6 @@ PHP_FUNCTION(ob_end_clean) } /* }}} */ - /* {{{ proto string ob_get_contents(void) Return the contents of the output buffer */ PHP_FUNCTION(ob_get_contents) @@ -555,7 +573,6 @@ PHP_FUNCTION(ob_get_contents) } /* }}} */ - /* {{{ proto string ob_get_length(void) Return the length of the output buffer */ PHP_FUNCTION(ob_get_length) @@ -566,7 +583,6 @@ 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) @@ -597,7 +613,6 @@ PHP_FUNCTION(ob_implicit_flush) } /* }}} */ - PHPAPI char *php_get_output_start_filename() { OLS_FETCH(); @@ -618,5 +633,6 @@ PHPAPI int php_get_output_start_lineno() * 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 */ diff --git a/ext/standard/pack.c b/ext/standard/pack.c index b114131a4f..75544c41b7 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -68,7 +68,8 @@ static int machine_endian_long_map[4]; 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; @@ -81,7 +82,7 @@ static void php_pack(pval **val, int size, int *map, char *output) *(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,@. @@ -443,7 +444,8 @@ PHP_FUNCTION(pack) } /* }}} */ - +/* {{{ php_unpack + */ static long php_unpack(char *data, int size, int issigned, int *map) { long result; @@ -458,7 +460,7 @@ static long php_unpack(char *data, int size, int issigned, int *map) 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 @@ -791,7 +793,8 @@ PHP_FUNCTION(unpack) } /* }}} */ - +/* {{{ PHP_MINIT_FUNCTION + */ PHP_MINIT_FUNCTION(pack) { int machine_endian_check = 1; @@ -862,11 +865,13 @@ PHP_MINIT_FUNCTION(pack) 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 */ diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c index 3f6fb09f8b..d06f0fcfc4 100644 --- a/ext/standard/pageinfo.c +++ b/ext/standard/pageinfo.c @@ -41,6 +41,8 @@ #include "ext/standard/basic_functions.h" +/* {{{ php_statpage + */ static void php_statpage(BLS_D) { struct stat *pstat; @@ -55,7 +57,10 @@ static void php_statpage(BLS_D) } } } +/* }}} */ +/* {{{ php_getuid + */ long php_getuid(void) { BLS_FETCH(); @@ -63,6 +68,7 @@ long php_getuid(void) php_statpage(BLS_C); return (BG(page_uid)); } +/* }}} */ /* {{{ proto int getmyuid(void) Get PHP script owner's UID */ @@ -129,5 +135,6 @@ PHP_FUNCTION(getlastmod) * 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 */ diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index f70447904d..6e48f2b4aa 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -28,7 +28,8 @@ #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; @@ -45,11 +46,13 @@ FILE *php_fopen_url_wrap_php(char *path, char *mode, int options, int *issock, i 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 */ diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c index 067417a9bc..2fb0f601fb 100644 --- a/ext/standard/quot_print.c +++ b/ext/standard/quot_print.c @@ -133,5 +133,6 @@ PHP_FUNCTION(quoted_printable_decode) * 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 */ diff --git a/ext/standard/rand.c b/ext/standard/rand.c index d2a632b128..72227af0fd 100644 --- a/ext/standard/rand.c +++ b/ext/standard/rand.c @@ -94,6 +94,8 @@ #define MT_RAND_MAX ((long)(0x7FFFFFFF)) /* (1<<31) - 1 */ +/* {{{ seedMT + */ static void seedMT(php_uint32 seed BLS_DC) { /* @@ -148,7 +150,7 @@ 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) { @@ -351,5 +353,6 @@ PHP_FUNCTION(mt_getrandmax) * 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 */ diff --git a/ext/standard/reg.c b/ext/standard/reg.c index e8896f5f7d..bcd0111b8a 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -46,6 +46,8 @@ typedef struct { int cflags; } reg_cache; +/* {{{ _php_regcomp + */ static int _php_regcomp(regex_t *preg, const char *pattern, int cflags) { int r = 0; @@ -70,6 +72,7 @@ static int _php_regcomp(regex_t *preg, const char *pattern, int cflags) return r; } +/* }}} */ static void _free_reg_cache(reg_cache *rc) { @@ -119,7 +122,7 @@ PHP_MINFO_FUNCTION(regex) 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) { @@ -158,7 +161,10 @@ 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 */ @@ -263,6 +269,7 @@ static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase) } regfree(&re); } +/* }}} */ /* {{{ proto int ereg(string pattern, string string [, array registers]) Regular expression match */ @@ -280,7 +287,8 @@ PHP_FUNCTION(eregi) } /* }}} */ -/* 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; @@ -418,7 +426,10 @@ char *php_reg_replace(const char *pattern, const char *replace, const char *stri /* whew. */ return (buf); } +/* }}} */ +/* {{{ php_ereg_replace + */ static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase) { pval **arg_pattern, @@ -475,6 +486,7 @@ static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase) STR_FREE(replace); STR_FREE(pattern); } +/* }}} */ /* {{{ proto string ereg_replace(string pattern, string replacement, string string) Replace regular expression */ @@ -492,6 +504,8 @@ PHP_FUNCTION(eregi_replace) } /* }}} */ +/* {{{ php_split + */ static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase) { pval **spliton, **str, **arg_count = NULL; @@ -586,6 +600,7 @@ static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase) regfree(&re); } +/* }}} */ /* ("root", "passwd", "uid", "gid", "other:stuff:like:/bin/sh") = split(":", $passwd_file, 5); */ @@ -650,5 +665,6 @@ PHPAPI PHP_FUNCTION(sql_regcase) * 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 */ diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c index 98ba84f75f..dd58d48c4a 100644 --- a/ext/standard/scanf.c +++ b/ext/standard/scanf.c @@ -127,7 +127,7 @@ static int CharInSet(CharSet *cset, int ch); static void ReleaseCharSet(CharSet *cset); -/* +/* {{{ BuildCharSet *---------------------------------------------------------------------- * * BuildCharSet -- @@ -144,7 +144,6 @@ static void ReleaseCharSet(CharSet *cset); * *---------------------------------------------------------------------- */ - static char * BuildCharSet(CharSet *cset, char *format) { char *ch, start; @@ -234,8 +233,9 @@ static char * BuildCharSet(CharSet *cset, char *format) } return format; } +/* }}} */ -/* +/* {{{ CharInSet *---------------------------------------------------------------------- * * CharInSet -- @@ -250,7 +250,6 @@ static char * BuildCharSet(CharSet *cset, char *format) * *---------------------------------------------------------------------- */ - static int CharInSet(CharSet *cset, int c) { char ch = (char) c; @@ -273,8 +272,9 @@ static int CharInSet(CharSet *cset, int c) } return (cset->exclude ? !match : match); } +/* }}} */ -/* +/* {{{ ReleaseCharSet *---------------------------------------------------------------------- * * ReleaseCharSet -- @@ -289,7 +289,6 @@ static int CharInSet(CharSet *cset, int c) * *---------------------------------------------------------------------- */ - static void ReleaseCharSet(CharSet *cset) { efree((char *)cset->chars); @@ -297,8 +296,9 @@ static void ReleaseCharSet(CharSet *cset) efree((char *)cset->ranges); } } +/* }}} */ -/* +/* {{{ ValidateFormat *---------------------------------------------------------------------- * * ValidateFormat -- @@ -319,8 +319,6 @@ static void ReleaseCharSet(CharSet *cset) * *---------------------------------------------------------------------- */ - - PHPAPI int ValidateFormat(char *format,int numVars,int *totalSubs) { #define STATIC_LIST_SIZE 16 @@ -577,10 +575,10 @@ PHPAPI int ValidateFormat(char *format,int numVars,int *totalSubs) 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 : @@ -1227,7 +1225,7 @@ PHPAPI int php_sscanf_internal( char *string,char *format, return result; } - +/* }}} */ /* the compiler choked when i tried to make this a macro */ inline void scan_set_error_return(int numVars,pval **return_value) { @@ -1247,5 +1245,6 @@ 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 */ diff --git a/ext/standard/soundex.c b/ext/standard/soundex.c index 107088dc2f..a67462b1a0 100644 --- a/ext/standard/soundex.c +++ b/ext/standard/soundex.c @@ -117,5 +117,6 @@ PHP_FUNCTION(soundex) * 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 */ diff --git a/ext/standard/string.c b/ext/standard/string.c index cb84c9511e..6c9aa51e86 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -47,6 +47,8 @@ #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); @@ -80,6 +82,7 @@ void register_string_constants(INIT_FUNC_ARGS) #endif } +/* }}} */ int php_tag_find(char *tag, int len, char *set); @@ -91,6 +94,8 @@ static char hexconvtab[] = "0123456789abcdef"; 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; @@ -111,6 +116,7 @@ static char *php_bin2hex(const unsigned char *old, const size_t oldlen, size_t * return result; } +/* }}} */ #ifdef HAVE_LOCALECONV /* {{{ localeconv_r @@ -3360,5 +3366,6 @@ PHP_FUNCTION(sscanf) * 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 */ diff --git a/ext/standard/strnatcmp.c b/ext/standard/strnatcmp.c index 00455cfa41..c21f5ce0aa 100644 --- a/ext/standard/strnatcmp.c +++ b/ext/standard/strnatcmp.c @@ -38,7 +38,8 @@ static char const *version UNUSED = "$Id$"; - +/* {{{ compare_right + */ static int compare_right(char const **a, char const *aend, char const **b, char const *bend) { @@ -67,8 +68,10 @@ 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) { @@ -90,8 +93,10 @@ 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; @@ -156,11 +161,13 @@ PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len 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 */ diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index 3efe2b3710..236c54cf88 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -38,6 +38,8 @@ static void start_syslog(BLS_D); +/* {{{ PHP_MINIT_FUNCTION + */ PHP_MINIT_FUNCTION(syslog) { /* error levels */ @@ -98,7 +100,7 @@ PHP_MINIT_FUNCTION(syslog) return SUCCESS; } - +/* }}} */ PHP_RINIT_FUNCTION(syslog) { @@ -124,7 +126,8 @@ PHP_RSHUTDOWN_FUNCTION(syslog) return SUCCESS; } - +/* {{{ start_syslog + */ static void start_syslog(BLS_D) { ELS_FETCH(); @@ -188,6 +191,7 @@ static void start_syslog(BLS_D) BG(syslog_started)=1; } +/* }}} */ /* {{{ proto void define_syslog_variables(void) Initializes all syslog-related variables */ @@ -272,5 +276,6 @@ PHP_FUNCTION(syslog) * 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 */ diff --git a/ext/standard/type.c b/ext/standard/type.c index 76371ce6a2..b782df1c85 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -12,7 +12,7 @@ | 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> | +----------------------------------------------------------------------+ */ @@ -21,7 +21,7 @@ #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 @@ -54,8 +54,9 @@ int php_check_type(char *str) return (type); } /* php_check_type */ +/* }}} */ -/* +/* {{{ php_check_ident_type * 0 - simple variable * 1 - non-index array * 2 - index array @@ -75,7 +76,10 @@ int php_check_ident_type(char *str) } return (GPC_INDEXED_ARRAY); } +/* }}} */ +/* {{{ php_get_ident_index + */ char *php_get_ident_index(char *str) { char *temp; @@ -96,11 +100,13 @@ char *php_get_ident_index(char *str) } 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 */ diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c index 9bbc4f5f7d..1af35de9d7 100644 --- a/ext/standard/uniqid.c +++ b/ext/standard/uniqid.c @@ -98,5 +98,6 @@ function_entry uniqid_functions[] = { * 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 */ diff --git a/ext/standard/url.c b/ext/standard/url.c index b71414b6c2..45d69b5dc1 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -36,7 +36,8 @@ #endif /*APACHE*/ #endif /*_OSD_POSIX*/ - +/* {{{ free_url + */ void free_url(php_url * theurl) { if (theurl->scheme) @@ -55,7 +56,10 @@ void free_url(php_url * theurl) efree(theurl->fragment); efree(theurl); } +/* }}} */ +/* {{{ url_parse + */ php_url *url_parse(char *str) { regex_t re; @@ -157,6 +161,7 @@ php_url *url_parse(char *str) regfree(&re); return ret; } +/* }}} */ /* {{{ proto array parse_url(string url) Parse a URL and return its components */ @@ -202,6 +207,8 @@ PHP_FUNCTION(parse_url) } /* }}} */ +/* {{{ php_htoi + */ static int php_htoi(char *s) { int value; @@ -219,6 +226,7 @@ static int php_htoi(char *s) return (value); } +/* }}} */ /* rfc1738: @@ -235,6 +243,8 @@ static int php_htoi(char *s) static unsigned char hexchars[] = "0123456789ABCDEF"; +/* {{{ php_url_encode + */ char *php_url_encode(char *s, int len) { register int x, y; @@ -266,6 +276,7 @@ char *php_url_encode(char *s, int len) str[y] = '\0'; return ((char *) str); } +/* }}} */ /* {{{ proto string urlencode(string str) URL-encodes string */ @@ -314,6 +325,8 @@ PHP_FUNCTION(urldecode) } /* }}} */ +/* {{{ php_url_decode + */ int php_url_decode(char *str, int len) { char *dest = str; @@ -338,7 +351,10 @@ int php_url_decode(char *str, int len) *dest = '\0'; return dest - str; } +/* }}} */ +/* {{{ php_raw_url_encode + */ char *php_raw_url_encode(char *s, int len) { register int x, y; @@ -366,6 +382,7 @@ char *php_raw_url_encode(char *s, int len) str[y] = '\0'; return ((char *) str); } +/* }}} */ /* {{{ proto string rawurlencode(string str) URL-encodes string */ @@ -411,6 +428,8 @@ PHP_FUNCTION(rawurldecode) } /* }}} */ +/* {{{ php_raw_url_decode + */ int php_raw_url_decode(char *str, int len) { char *dest = str; @@ -433,11 +452,13 @@ int php_raw_url_decode(char *str, int len) *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 */ diff --git a/ext/standard/url_scanner.c b/ext/standard/url_scanner.c index 5371b7b308..57cdb60a4a 100644 --- a/ext/standard/url_scanner.c +++ b/ext/standard/url_scanner.c @@ -47,7 +47,8 @@ PHP_RSHUTDOWN_FUNCTION(url_scanner) 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; @@ -83,9 +84,12 @@ static char *url_attr_addon(const char *tag,const char *attr,const char *val,con } 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]; @@ -94,7 +98,10 @@ char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char 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; @@ -365,7 +372,7 @@ char *url_adapt(const char *src, size_t srclen, const char *data, size_t *newlen *outp='\0'; return out; } - +/* }}} */ #endif /* @@ -373,5 +380,6 @@ char *url_adapt(const char *src, size_t srclen, const char *data, size_t *newlen * 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 */ diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c index dbdf55149e..835e37f7f9 100644 --- a/ext/standard/url_scanner_ex.c +++ b/ext/standard/url_scanner_ex.c @@ -41,6 +41,8 @@ #include "php_smart_str.h" +/* {{{ PHP_INI_MH + */ static PHP_INI_MH(OnUpdateTags) { url_adapt_state_ex_t *ctx; @@ -84,11 +86,14 @@ static PHP_INI_MH(OnUpdateTags) 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; @@ -130,6 +135,7 @@ static inline void append_modified_url(smart_str *url, smart_str *dest, smart_st if (bash) smart_str_appendl(dest, bash, q - bash); } +/* }}} */ static inline void tag_arg(url_adapt_state_ex_t *ctx, char quote PLS_DC) { @@ -221,6 +227,8 @@ static inline void handle_val(STD_PARA, char quotes, char type) #define scdebug(x) #endif +/* {{{ mainloop + */ static inline void mainloop(url_adapt_state_ex_t *ctx, const char *newdata, size_t newlen) { char *end, *q; @@ -657,7 +665,10 @@ stop: 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}; @@ -677,7 +688,10 @@ char *url_adapt_single_url(const char *url, size_t urllen, const char *name, con 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; @@ -695,6 +709,7 @@ char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char ctx->result.len = 0; return ctx->result.c; } +/* }}} */ PHP_RINIT_FUNCTION(url_scanner) { @@ -753,5 +768,6 @@ PHP_MSHUTDOWN_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 */ diff --git a/ext/standard/var.c b/ext/standard/var.c index 112ceda3fb..dc240cf7ad 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -671,5 +671,6 @@ PHP_FUNCTION(unserialize) * 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 */ diff --git a/ext/swf/swf.c b/ext/swf/swf.c index f41e6676d8..ac7e6f3bcb 100644 --- a/ext/swf/swf.c +++ b/ext/swf/swf.c @@ -1253,5 +1253,6 @@ PHP_FUNCTION(swf_posround) * 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 */ diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c index 3a006dde76..5cfb0b37db 100644 --- a/ext/sysvsem/sysvsem.c +++ b/ext/sysvsem/sysvsem.c @@ -433,5 +433,6 @@ PHP_FUNCTION(sem_remove) * 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 */ diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c index ff28c9a5dd..999d95ce0d 100644 --- a/ext/sysvshm/sysvshm.c +++ b/ext/sysvshm/sysvshm.c @@ -422,5 +422,6 @@ int php_remove_shm_data(sysvshm_chunk_head *ptr, long shm_varpos) { * 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 */ diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index c0dd5eb454..54c7872bda 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -1217,5 +1217,6 @@ PHP_FUNCTION(wddx_deserialize) * 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 */ diff --git a/ext/xml/xml.c b/ext/xml/xml.c index b3d2ff28ea..3aaac36138 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -1652,5 +1652,6 @@ PHP_FUNCTION(utf8_decode) * 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 */ diff --git a/ext/xslt/sablot.c b/ext/xslt/sablot.c index 340e3d39f4..28d8c245e4 100644 --- a/ext/xslt/sablot.c +++ b/ext/xslt/sablot.c @@ -1544,5 +1544,6 @@ static MH_ERROR error_print(void *user_data, SablotHandle proc, MH_ERROR code, M * 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 */ diff --git a/ext/xslt/xslt.c b/ext/xslt/xslt.c index 9d61bc676e..dc969b5f12 100644 --- a/ext/xslt/xslt.c +++ b/ext/xslt/xslt.c @@ -251,5 +251,6 @@ extern void xslt_call_function(char *name, * 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 */ diff --git a/ext/yaz/php_yaz.c b/ext/yaz/php_yaz.c index 916be8460e..8ce2e1fa5c 100644 --- a/ext/yaz/php_yaz.c +++ b/ext/yaz/php_yaz.c @@ -2490,5 +2490,6 @@ ZEND_GET_MODULE(yaz) * 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 */ diff --git a/ext/zip/zip.c b/ext/zip/zip.c index dd82e646be..4460fd5d14 100644 --- a/ext/zip/zip.c +++ b/ext/zip/zip.c @@ -333,5 +333,6 @@ PHP_FUNCTION(zip_entry_close) * 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 */ diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index ca9a3e5aa4..6f501769e0 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -1283,5 +1283,6 @@ int php_enable_output_compression(int buffer_size) * 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 */ diff --git a/main/SAPI.c b/main/SAPI.c index d38e70e73f..499a2f682d 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -598,5 +598,6 @@ SAPI_API char *sapi_getenv(char *name, size_t name_len) * 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 */ diff --git a/main/alloca.c b/main/alloca.c index ff553f3541..faba929ef8 100644 --- a/main/alloca.c +++ b/main/alloca.c @@ -494,5 +494,6 @@ i00afunc (long address) * 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 */ diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 208a39eebb..f76ae1f88a 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -18,6 +18,8 @@ */ /* $Id$ */ +/* {{{ includes + */ #include "php.h" #include "php_globals.h" #include "SAPI.h" @@ -78,6 +80,7 @@ #if defined(AF_UNIX) #include <sys/un.h> #endif +/* }}} */ typedef FILE * (*php_fopen_url_wrapper_t) (const char *, char *, int, int *, int *, char **) ; @@ -88,6 +91,8 @@ PHPAPI char *expand_filepath(const char *filepath, char *real_path); 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(); @@ -98,7 +103,10 @@ PHPAPI int php_register_url_wrapper(char *protocol, FILE * (*wrapper)(char *path return FAILURE; } } +/* }}} */ +/* {{{ php_unregister_url_wrapper + */ PHPAPI int php_unregister_url_wrapper(char *protocol) { PLS_FETCH(); @@ -109,7 +117,10 @@ PHPAPI int php_unregister_url_wrapper(char *protocol) return SUCCESS; } } +/* }}} */ +/* {{{ php_init_fopen_wrappers + */ int php_init_fopen_wrappers(void) { PLS_FETCH(); @@ -119,7 +130,10 @@ int php_init_fopen_wrappers(void) return SUCCESS; } +/* }}} */ +/* {{{ php_shutdown_fopen_wrappers + */ int php_shutdown_fopen_wrappers(void) { PLS_FETCH(); @@ -130,9 +144,9 @@ int php_shutdown_fopen_wrappers(void) 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 @@ -182,7 +196,10 @@ PHPAPI int php_check_specific_open_basedir(char *basedir, char *path PLS_DC) return -1; } } +/* }}} */ +/* {{{ php_check_open_basedir + */ PHPAPI int php_check_open_basedir(char *path) { PLS_FETCH(); @@ -224,7 +241,10 @@ PHPAPI int php_check_open_basedir(char *path) /* 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; @@ -238,7 +258,10 @@ static FILE *php_fopen_and_set_opened_path(const char *path, char *mode, char ** } 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(); @@ -265,8 +288,10 @@ PHPAPI FILE *php_fopen_wrapper(char *path, char *mode, int options, int *issock, return php_fopen_and_set_opened_path(path, mode, opened_path); } } +/* }}} */ - +/* {{{ php_fopen_primary_script + */ PHPAPI FILE *php_fopen_primary_script(void) { FILE *fp; @@ -355,9 +380,9 @@ PHPAPI FILE *php_fopen_primary_script(void) 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. */ @@ -421,9 +446,10 @@ PHPAPI FILE *php_fopen_with_path(char *filename, char *mode, char *path, char ** 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; @@ -481,7 +507,10 @@ static FILE *php_fopen_url_wrapper(const char *path, char *mode, int options, in 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; @@ -512,8 +541,10 @@ PHPAPI char *php_strip_url_passwd(char *url) } return url; } +/* }}} */ - +/* {{{ expand_filepath + */ PHPAPI char *expand_filepath(const char *filepath, char *real_path) { cwd_state new_state; @@ -544,11 +575,13 @@ PHPAPI char *expand_filepath(const char *filepath, char *real_path) 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 */ diff --git a/main/internal_functions_win32.c b/main/internal_functions_win32.c index 98583f7ca6..61c42a9ca1 100644 --- a/main/internal_functions_win32.c +++ b/main/internal_functions_win32.c @@ -20,7 +20,8 @@ /* $Id$ */ - +/* {{{ includes + */ #include "php.h" #include "php_main.h" #include "zend_modules.h" @@ -60,7 +61,10 @@ #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 @@ -77,6 +81,7 @@ zend_module_entry *php_builtin_extensions[] = { phpext_xml_ptr, phpext_wddx_ptr }; +/* }}} */ #define EXTCOUNT (sizeof(php_builtin_extensions)/sizeof(zend_module_entry *)) @@ -102,5 +107,6 @@ int php_global_shutdown_internal_extensions(void) * 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 */ diff --git a/main/main.c b/main/main.c index 10a8d98064..46587980f4 100644 --- a/main/main.c +++ b/main/main.c @@ -18,10 +18,10 @@ +----------------------------------------------------------------------+ */ - /* $Id$ */ - +/* {{{ includes + */ #include <stdio.h> #include "php.h" #ifdef PHP_WIN32 @@ -75,18 +75,20 @@ #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(); @@ -94,9 +96,11 @@ static PHP_INI_MH(OnSetPrecision) EG(precision) = atoi(new_value); return SUCCESS; } - +/* }}} */ #if MEMORY_LIMIT +/* {{{ PHP_INI_MH + */ static PHP_INI_MH(OnChangeMemoryLimit) { int new_limit; @@ -108,9 +112,11 @@ static PHP_INI_MH(OnChangeMemoryLimit) } return zend_set_memory_limit(new_limit); } +/* }}} */ #endif - +/* {{{ PHP_INI_MH + */ static PHP_INI_MH(OnUpdateErrorReporting) { ELS_FETCH(); @@ -122,8 +128,10 @@ static PHP_INI_MH(OnUpdateErrorReporting) } return SUCCESS; } +/* }}} */ - +/* {{{ php_disable_functions + */ static void php_disable_functions() { char *func; @@ -137,8 +145,10 @@ static void php_disable_functions() func = strtok(NULL, ", "); } } +/* }}} */ - +/* {{{ PHP_INI_MH + */ static PHP_INI_MH(OnUpdateTimeout) { ELS_FETCH(); @@ -152,7 +162,7 @@ static PHP_INI_MH(OnUpdateTimeout) zend_set_timeout(EG(timeout_seconds)); return SUCCESS; } - +/* }}} */ /* Need to convert to strings and make use of: * PHP_SAFE_MODE @@ -174,6 +184,8 @@ static PHP_INI_MH(OnUpdateTimeout) #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) @@ -245,12 +257,13 @@ PHP_INI_BEGIN() 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; @@ -285,17 +298,21 @@ PHPAPI void php_log_err(char *log_message) 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; @@ -313,9 +330,10 @@ PHPAPI int php_printf(const char *format, ...) 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]; @@ -442,8 +460,7 @@ static void php_error_cb(int type, const char *error_filename, const uint error_ 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 */ @@ -467,6 +484,8 @@ PHP_FUNCTION(set_time_limit) } /* }}} */ +/* {{{ php_fopen_wrapper_for_zend + */ static FILE *php_fopen_wrapper_for_zend(const char *filename, char **opened_path) { int issock=0, socketd=0; @@ -482,8 +501,10 @@ static FILE *php_fopen_wrapper_for_zend(const char *filename, char **opened_path } 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); @@ -495,8 +516,10 @@ static int php_get_configuration_directive_for_zend(char *name, uint name_length return FAILURE; } } +/* }}} */ - +/* {{{ php_message_handler_for_zend + */ static void php_message_handler_for_zend(long message, void *data) { switch (message) { @@ -564,19 +587,24 @@ static void php_message_handler_for_zend(long message, void *data) 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 @@ -624,16 +652,20 @@ int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC) 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(); @@ -671,29 +703,36 @@ void php_request_shutdown(void *dummy) 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; @@ -708,7 +747,10 @@ int php_startup_extensions(zend_module_entry **ptr, int count) } return SUCCESS; } +/* }}} */ +/* {{{ php_global_startup_extensions + */ int php_global_startup_extensions(zend_module_entry **ptr, int count) { zend_module_entry **end = ptr+count; @@ -724,7 +766,10 @@ int php_global_startup_extensions(zend_module_entry **ptr, int count) } return SUCCESS; } +/* }}} */ +/* {{{ php_global_shutdown_extensions + */ int php_global_shutdown_extensions(zend_module_entry **ptr, int count) { zend_module_entry **end = ptr+count; @@ -740,7 +785,10 @@ int php_global_shutdown_extensions(zend_module_entry **ptr, int count) } return SUCCESS; } +/* }}} */ +/* {{{ php_module_startup + */ int php_module_startup(sapi_module_struct *sf) { zend_utility_functions zuf; @@ -896,22 +944,24 @@ int php_module_startup(sapi_module_struct *sf) /* 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() */ @@ -942,8 +992,10 @@ void php_module_shutdown() 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; @@ -971,8 +1023,10 @@ static inline void php_register_server_variables(ELS_D SLS_DC PLS_DC) 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; @@ -1077,8 +1131,10 @@ static int php_hash_environment(ELS_D SLS_DC PLS_DC) } return SUCCESS; } +/* }}} */ - +/* {{{ php_build_argv + */ static void php_build_argv(char *s, zval *track_vars_array ELS_DC PLS_DC) { pval *arr, *argc, *tmp; @@ -1134,8 +1190,10 @@ static void php_build_argv(char *s, zval *track_vars_array ELS_DC PLS_DC) 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]=='=' @@ -1149,7 +1207,10 @@ PHPAPI int php_handle_special_queries(SLS_D PLS_DC) } 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; @@ -1209,7 +1270,10 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_D return EG(exit_status); } +/* }}} */ +/* {{{ php_handle_aborted_connection + */ PHPAPI void php_handle_aborted_connection(void) { PLS_FETCH(); @@ -1220,7 +1284,10 @@ PHPAPI void php_handle_aborted_connection(void) zend_bailout(); } } +/* }}} */ +/* {{{ php_handle_auth_data + */ PHPAPI int php_handle_auth_data(const char *auth SLS_DC) { int ret = -1; @@ -1249,7 +1316,10 @@ PHPAPI int php_handle_auth_data(const char *auth SLS_DC) 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; @@ -1278,20 +1348,23 @@ PHPAPI int php_lint_script(zend_file_handle *file CLS_DC ELS_DC PLS_DC) 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 */ diff --git a/main/mergesort.c b/main/mergesort.c index b73b67773b..73c65c5100 100644 --- a/main/mergesort.c +++ b/main/mergesort.c @@ -97,7 +97,7 @@ static void insertionsort(u_char *a, size_t n, size_t size, int (*cmp)(const voi ((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 *)) @@ -233,6 +233,7 @@ COPY: b = t; free(list2); return (0); } +/* }}} */ #define swap(a, b) { \ s = b; \ @@ -253,7 +254,7 @@ COPY: b = t; } 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 @@ -324,8 +325,9 @@ static void setup(u_char *list1, u_char *list2, size_t n, size_t size, int (*cmp } #endif /* NATURAL */ } +/* }}} */ -/* +/* {{{ insertionsort * This is to avoid out-of-bounds addresses in sorting the * last 4 elements. */ @@ -342,11 +344,13 @@ static void insertionsort(u_char *a, size_t n, size_t size, int (*cmp)(const voi 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 */ diff --git a/main/network.c b/main/network.c index ff0d6e7f9b..b2fb94b3b5 100644 --- a/main/network.c +++ b/main/network.c @@ -68,6 +68,8 @@ int inet_aton(const char *, struct in_addr *); # 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 { @@ -101,9 +103,12 @@ static char *php_gai_strerror(int code) return "Unknown error"; } +/* }}} */ #endif #endif +/* {{{ php_network_freeaddresses + */ static void php_network_freeaddresses(struct sockaddr **sal) { struct sockaddr **sap; @@ -114,7 +119,10 @@ static void php_network_freeaddresses(struct sockaddr **sal) efree(*sap); efree(sal); } +/* }}} */ +/* {{{ php_network_getaddresses + */ static int php_network_getaddresses(const char *host, struct sockaddr ***sal) { struct sockaddr **sap; @@ -184,6 +192,7 @@ static int php_network_getaddresses(const char *host, struct sockaddr ***sal) *sap = NULL; return 0; } +/* }}} */ /* {{{ php_connect_nonb */ PHPAPI int php_connect_nonb(int sockfd, @@ -262,7 +271,7 @@ ok: } /* }}} */ -/* +/* {{{ 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. @@ -326,11 +335,13 @@ int php_hostconnect(char *host, unsigned short port, int socktype, int timeout) 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 */ diff --git a/main/output.c b/main/output.c index 1f3f5f9f17..26f95af2e4 100644 --- a/main/output.c +++ b/main/output.c @@ -102,7 +102,8 @@ PHPAPI int php_header_write(const char *str, uint str_length) 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(); @@ -118,9 +119,10 @@ PHPAPI int php_start_ob_buffer(zval *output_handler, uint chunk_size) 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; @@ -243,9 +245,10 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush) 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(); @@ -254,8 +257,10 @@ PHPAPI void php_end_ob_buffers(zend_bool send_buffer) php_end_ob_buffer(send_buffer, 0); } } +/* }}} */ - +/* {{{ php_start_implicit_flush + */ PHPAPI void php_start_implicit_flush() { OLS_FETCH(); @@ -263,16 +268,20 @@ PHPAPI void php_start_implicit_flush() 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(); @@ -285,12 +294,14 @@ PHPAPI void php_ob_set_internal_handler(php_output_handler_func_t internal_outpu 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(); @@ -303,8 +314,10 @@ static inline void php_ob_allocate(void) 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(); @@ -325,8 +338,10 @@ static void php_ob_init(uint initial_size, uint block_size, zval *output_handler 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; @@ -352,6 +367,7 @@ static void php_ob_append(const char *text, uint text_length) return; } } +/* }}} */ #if 0 static void php_ob_prepend(const char *text, uint text_length) @@ -375,7 +391,8 @@ 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(); @@ -388,9 +405,10 @@ int php_ob_get_buffer(pval *p) 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(); @@ -402,6 +420,7 @@ int php_ob_get_length(pval *p) p->value.lval = OG(active_ob_buffer).text_length; return SUCCESS; } +/* }}} */ /* * Wrapper functions - implementation @@ -415,7 +434,8 @@ static int php_b_body_write(const char *str, uint str_length) 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; @@ -441,8 +461,10 @@ static int php_ub_body_write_no_header(const char *str, uint str_length) return result; } +/* }}} */ - +/* {{{ php_ub_body_write + */ static int php_ub_body_write(const char *str, uint str_length) { int result = 0; @@ -472,13 +494,12 @@ static int php_ub_body_write(const char *str, uint str_length) 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) @@ -526,7 +547,6 @@ 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) @@ -535,7 +555,6 @@ 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) @@ -544,7 +563,6 @@ PHP_FUNCTION(ob_end_clean) } /* }}} */ - /* {{{ proto string ob_get_contents(void) Return the contents of the output buffer */ PHP_FUNCTION(ob_get_contents) @@ -555,7 +573,6 @@ PHP_FUNCTION(ob_get_contents) } /* }}} */ - /* {{{ proto string ob_get_length(void) Return the length of the output buffer */ PHP_FUNCTION(ob_get_length) @@ -566,7 +583,6 @@ 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) @@ -597,7 +613,6 @@ PHP_FUNCTION(ob_implicit_flush) } /* }}} */ - PHPAPI char *php_get_output_start_filename() { OLS_FETCH(); @@ -618,5 +633,6 @@ PHPAPI int php_get_output_start_lineno() * 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 */ diff --git a/main/php.h b/main/php.h index e7f0f114ee..f99d2c3007 100644 --- a/main/php.h +++ b/main/php.h @@ -343,5 +343,6 @@ PHPAPI PHP_FUNCTION(warn_not_available); * 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 */ diff --git a/main/php_content_types.c b/main/php_content_types.c index 81ca39882b..a9c8b1d781 100644 --- a/main/php_content_types.c +++ b/main/php_content_types.c @@ -24,13 +24,17 @@ #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; @@ -40,19 +44,23 @@ SAPI_POST_READER_FUNC(php_default_post_reader) 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 */ diff --git a/main/php_ini.c b/main/php_ini.c index c4b9abb13a..b705971cd4 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -39,7 +39,8 @@ static HashTable configuration_hash; 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) { @@ -72,8 +73,10 @@ static void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type) } } } +/* }}} */ - +/* {{{ php_ini_displayer + */ static int php_ini_displayer(zend_ini_entry *ini_entry, int module_number) { if (ini_entry->module_number != module_number) { @@ -90,8 +93,10 @@ static int php_ini_displayer(zend_ini_entry *ini_entry, int module_number) PUTS("</TD></TR>\n"); return 0; } +/* }}} */ - +/* {{{ display_ini_entries + */ PHPAPI void display_ini_entries(zend_module_entry *module) { int module_number; @@ -107,8 +112,7 @@ PHPAPI void display_ini_entries(zend_module_entry *module) 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 */ @@ -126,14 +130,18 @@ PHPAPI void display_ini_entries(zend_module_entry *module) # 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) { @@ -164,8 +172,10 @@ static void php_config_ini_parser_cb(zval *arg1, zval *arg2, int callback_type, break; } } +/* }}} */ - +/* {{{ php_load_function_extension_cb + */ static void php_load_function_extension_cb(void *arg) { zval *extension = (zval *) arg; @@ -173,14 +183,18 @@ static void php_load_function_extension_cb(void *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; @@ -264,8 +278,10 @@ int php_init_config(char *php_ini_path_override) return SUCCESS; } +/* }}} */ - +/* {{{ php_shutdown_config + */ int php_shutdown_config(void) { zend_hash_destroy(&configuration_hash); @@ -274,8 +290,10 @@ int php_shutdown_config(void) } 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); @@ -284,8 +302,10 @@ void php_ini_delayed_modules_startup(void) 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; @@ -296,8 +316,10 @@ zval *cfg_get_entry(char *name, uint name_length) return NULL; } } +/* }}} */ - +/* {{{ cfg_get_long + */ PHPAPI int cfg_get_long(char *varname,long *result) { zval *tmp,var; @@ -312,8 +334,10 @@ PHPAPI int cfg_get_long(char *varname,long *result) *result = var.value.lval; return SUCCESS; } +/* }}} */ - +/* {{{ cfg_get_double + */ PHPAPI int cfg_get_double(char *varname,double *result) { zval *tmp,var; @@ -328,8 +352,10 @@ PHPAPI int cfg_get_double(char *varname,double *result) *result = var.value.dval; return SUCCESS; } +/* }}} */ - +/* {{{ cfg_get_string + */ PHPAPI int cfg_get_string(char *varname, char **result) { zval *tmp; @@ -341,6 +367,7 @@ PHPAPI int cfg_get_string(char *varname, char **result) *result = tmp->value.str.val; return SUCCESS; } +/* }}} */ /* * Local variables: @@ -348,5 +375,6 @@ PHPAPI int cfg_get_string(char *varname, char **result) * 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 */ diff --git a/main/php_logos.c b/main/php_logos.c index f236dc011f..c9eb588911 100644 --- a/main/php_logos.c +++ b/main/php_logos.c @@ -93,5 +93,6 @@ int php_info_logos(const char *logo_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 */ diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c index 9cce838814..de4aacc998 100644 --- a/main/php_open_temporary_file.c +++ b/main/php_open_temporary_file.c @@ -199,5 +199,6 @@ PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, char **op * 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 */ diff --git a/main/php_sprintf.c b/main/php_sprintf.c index c91d4da6c5..ecbd6b0238 100644 --- a/main/php_sprintf.c +++ b/main/php_sprintf.c @@ -46,5 +46,6 @@ php_sprintf (char*s, const char* format, ...) * 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 */ diff --git a/main/php_streams.h b/main/php_streams.h index 640aebe11f..5083b5ba29 100755 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -96,12 +96,14 @@ PHPAPI int php_stream_cast(php_stream * stream, int castas, void ** ret, int sho #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 diff --git a/main/php_ticks.c b/main/php_ticks.c index 5e66bfdd37..95e63df322 100644 --- a/main/php_ticks.c +++ b/main/php_ticks.c @@ -76,5 +76,6 @@ void php_run_ticks(int count) * 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 */ diff --git a/main/php_variables.c b/main/php_variables.c index b5a2e8d50e..bb577fa609 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -333,5 +333,6 @@ void php_import_environment_variables(zval *array_ptr ELS_DC PLS_DC) * 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 */ diff --git a/main/reentrancy.c b/main/reentrancy.c index e1ff8266d5..80d169baed 100644 --- a/main/reentrancy.c +++ b/main/reentrancy.c @@ -436,5 +436,6 @@ cont: * 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 */ diff --git a/main/rfc1867.c b/main/rfc1867.c index 1347f9d829..899bfb66dd 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -479,5 +479,6 @@ SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) * 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 */ diff --git a/main/safe_mode.c b/main/safe_mode.c index 18b2f752c3..f14f7df0fa 100644 --- a/main/safe_mode.c +++ b/main/safe_mode.c @@ -169,5 +169,6 @@ PHPAPI char *php_get_current_user() * 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 */ diff --git a/main/snprintf.c b/main/snprintf.c index 238cf2cf2e..5fe1860d86 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -944,5 +944,6 @@ int ap_php_vsnprintf(char *buf, size_t len, const char *format, va_list ap) * 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 */ diff --git a/main/streams.c b/main/streams.c index d4ac991c69..6b3cd0f472 100755 --- a/main/streams.c +++ b/main/streams.c @@ -355,5 +355,6 @@ exit_success: * 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 */ diff --git a/main/strlcat.c b/main/strlcat.c index 7e4cd9feb0..e6bc017cc0 100644 --- a/main/strlcat.c +++ b/main/strlcat.c @@ -81,5 +81,6 @@ PHPAPI size_t php_strlcat(dst, src, siz) * 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 */ diff --git a/main/strlcpy.c b/main/strlcpy.c index 6b51ca3a86..9c1f4da01d 100644 --- a/main/strlcpy.c +++ b/main/strlcpy.c @@ -78,5 +78,6 @@ PHPAPI size_t php_strlcpy(dst, src, siz) * 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 */ diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index 1e79701d0f..db90946b53 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -62,6 +62,8 @@ #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); @@ -74,6 +76,7 @@ static int send_parsed_php(request_rec * r); 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); @@ -110,13 +113,17 @@ typedef struct _php_per_dir_entry { /* 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; @@ -130,9 +137,10 @@ static int sapi_apache_ub_write(const char *str, uint str_length) } return ret; } +/* }}} */ - - +/* {{{ sapi_apache_flush + */ static void sapi_apache_flush(void *server_context) { if (server_context) { @@ -143,8 +151,10 @@ static void sapi_apache_flush(void *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; @@ -164,14 +174,18 @@ int sapi_apache_read_post(char *buffer, uint count_bytes SLS_DC) 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; @@ -203,8 +217,10 @@ int sapi_apache_header_handler(sapi_header_struct *sapi_header, sapi_headers_str 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 */ @@ -215,8 +231,10 @@ int sapi_apache_send_headers(sapi_headers_struct *sapi_headers SLS_DC) 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; @@ -253,7 +271,10 @@ static void sapi_apache_register_server_variables(zval *track_vars_array ELS_DC 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 @@ -263,8 +284,10 @@ static int php_apache_startup(sapi_module_struct *sapi_module) return SUCCESS; } } +/* }}} */ - +/* {{{ php_apache_log_message + */ static void php_apache_log_message(char *message) { SLS_FETCH(); @@ -280,8 +303,10 @@ static void php_apache_log_message(char *message) fprintf(stderr, "\n"); } } +/* }}} */ - +/* {{{ php_apache_request_shutdown + */ static void php_apache_request_shutdown(void *dummy) { SLS_FETCH(); @@ -291,8 +316,10 @@ static void php_apache_request_shutdown(void *dummy) 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); @@ -317,20 +344,26 @@ static int php_apache_sapi_activate(SLS_D) 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 */ @@ -370,14 +403,18 @@ static sapi_module_struct apache_sapi_module = { 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)); @@ -415,14 +452,19 @@ static void init_request_info(SLS_D) 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) { @@ -439,7 +481,10 @@ 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; @@ -540,8 +585,10 @@ static int send_php(request_rec *r, int display_source_mode, char *filename) kill_timeout(r); return OK; } +/* }}} */ - +/* {{{ send_parsed_php + */ static int send_parsed_php(request_rec * r) { int result = send_php(r, 0, NULL); @@ -558,20 +605,27 @@ static int send_parsed_php(request_rec * r) 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; @@ -584,8 +638,10 @@ static void copy_per_dir_entry(php_per_dir_entry *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 @@ -595,15 +651,19 @@ static zend_bool should_overwrite_per_dir_entry(php_per_dir_entry *orig_per_dir_ 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; @@ -614,16 +674,20 @@ static void *php_create_dir(pool *p, char *dummy) 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; @@ -656,20 +720,26 @@ CONST_PREFIX char *php_apache_value_handler_ex(cmd_parms *cmd, HashTable *conf, 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]; @@ -683,22 +753,26 @@ CONST_PREFIX char *php_apache_flag_handler_ex(cmd_parms *cmd, HashTable *conf, c 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; @@ -714,7 +788,10 @@ int php_xbithack_handler(request_rec * r) } return send_parsed_php(r); } +/* }}} */ +/* {{{ apache_php_module_shutdown_wrapper + */ static void apache_php_module_shutdown_wrapper(void) { apache_php_initialized = 0; @@ -731,8 +808,11 @@ static void apache_php_module_shutdown_wrapper(void) 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; */ @@ -742,8 +822,11 @@ static void php_child_exit_handler(server_rec *s, pool *p) 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); @@ -764,9 +847,10 @@ void php_init_handler(server_rec *s, pool *p) } #endif } +/* }}} */ - - +/* {{{ handler_rec php_handlers[] + */ handler_rec php_handlers[] = { {"application/x-httpd-php", send_parsed_php}, @@ -774,8 +858,10 @@ handler_rec php_handlers[] = {"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"}, @@ -784,9 +870,10 @@ command_rec php_commands[] = {"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, @@ -817,11 +904,13 @@ module MODULE_VAR_EXPORT php4_module = ,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 */ diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c index bb4fb131c4..c969371526 100644 --- a/sapi/apache/php_apache.c +++ b/sapi/apache/php_apache.c @@ -168,6 +168,8 @@ PHP_FUNCTION(apache_note) } /* }}} */ +/* {{{ PHP_MINFO_FUNCTION + */ PHP_MINFO_FUNCTION(apache) { module *modp = NULL; @@ -288,7 +290,10 @@ PHP_MINFO_FUNCTION(apache) 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 @@ -297,8 +302,6 @@ PHP_MINFO_FUNCTION(apache) * 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; @@ -466,4 +469,6 @@ PHP_FUNCTION(apache_exec_uri) * 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 */ diff --git a/sapi/apache/sapi_apache.c b/sapi/apache/sapi_apache.c index 16296f8743..90d47da7d6 100644 --- a/sapi/apache/sapi_apache.c +++ b/sapi/apache/sapi_apache.c @@ -58,7 +58,8 @@ #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; @@ -96,10 +97,13 @@ int apache_php_module_main(request_rec *r, int display_source_mode CLS_DC ELS_DC 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 */ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index a8ae197999..461322bdba 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -197,7 +197,8 @@ static int sapi_cgi_deactivate(SLS_D) } - +/* {{{ sapi_module_struct cgi_sapi_module + */ static sapi_module_struct cgi_sapi_module = { "cgi", /* name */ "CGI", /* pretty name */ @@ -230,8 +231,10 @@ static sapi_module_struct cgi_sapi_module = { STANDARD_SAPI_MODULE_PROPERTIES }; +/* }}} */ - +/* {{{ php_cgi_usage + */ static void php_cgi_usage(char *argv0) { char *prog; @@ -261,8 +264,10 @@ static void php_cgi_usage(char *argv0) " -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"); @@ -323,7 +328,7 @@ static void init_request_info(SLS_D) auth = getenv("HTTP_AUTHORIZATION"); php_handle_auth_data(auth SLS_CC); } - +/* }}} */ static void define_command_line_ini_entry(char *arg) { @@ -357,10 +362,9 @@ static void php_register_command_line_global_vars(char **arg) } efree(*arg); } - - - +/* {{{ main + */ int main(int argc, char *argv[]) { int exit_status = SUCCESS; @@ -788,10 +792,13 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine 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 */ diff --git a/sapi/tux/php_tux.c b/sapi/tux/php_tux.c index d083a1c3de..0b0070228f 100644 --- a/sapi/tux/php_tux.c +++ b/sapi/tux/php_tux.c @@ -429,3 +429,12 @@ void doesnotmatter_fini(void) 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 + */ |