cvs: pecl /mdbtools .cvsignore LICENSE README config.m4 mdbtools.c mdbtools.xml package.xml php_mdbtools.h /mdbtools/manual/mdbtools configure.xml
reference.xml /mdbtools/manual/mdbtools/functions mdb-close.xml mdb-fetch-assoc.xml mdb-fetch-row.xml mdb-num-fields.xml mdb-num-rows.xml
mdb-open.xml mdb-table-close.xml mdb-table-fields.xml mdb-table-open.xml mdb-tables.xml mdb-type-name.xml mdb-version.xml /mdbtools/tests
mdb_close.phpt mdb_fetch_assoc.phpt mdb_fetch_row.phpt mdb_num_fields.phpt mdb_num_rows.phpt mdb_open.phpt mdb_table_close.phpt mdb_table_fields.phpt
mdb_table_open.phpt mdb_tables.phpt mdb_type_name.phpt mdb_version.phpt
| From: | Hartmut Holzgraefe | Date: | Mon, 20 Feb 2006 17:43:11 +0000 |
| Subject: | cvs: pecl /mdbtools .cvsignore LICENSE README config.m4 mdbtools.c mdbtools.xml package.xml php_mdbtools.h /mdbtools/manual/mdbtools configure.xml reference.xml /mdbtools/manual/mdbtools/functions mdb-close.xml mdb-fetch-assoc.xml mdb-fetch-row.xml mdb-num-fields.xml mdb-num-rows.xml mdb-open.xml mdb-table-close.xml mdb-table-fields.xml mdb-table-open.xml mdb-tables.xml mdb-type-name.xml mdb-version.xml /mdbtools/tests mdb_close.phpt mdb_fetch_assoc.phpt mdb_fetch_row.phpt mdb_num_fields.phpt mdb_num_rows.phpt mdb_open.phpt mdb_table_close.phpt mdb_table_fields.phpt mdb_table_open.phpt mdb_tables.phpt mdb_type_name.phpt mdb_version.phpt |
||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-5219@lists.php.net to get a copy of this message | ||
hholzgra Mon Feb 20 17:43:11 2006 UTC
Modified files:
/pecl/mdbtools .cvsignore LICENSE README config.m4 mdbtools.c
mdbtools.xml package.xml php_mdbtools.h
/pecl/mdbtools/manual/mdbtools configure.xml reference.xml
/pecl/mdbtools/manual/mdbtools/functions mdb-close.xml
mdb-fetch-assoc.xml
mdb-fetch-row.xml
mdb-num-fields.xml
mdb-num-rows.xml
mdb-open.xml
mdb-table-close.xml
mdb-table-fields.xml
mdb-table-open.xml
mdb-tables.xml
mdb-type-name.xml
mdb-version.xml
/pecl/mdbtools/tests mdb_close.phpt mdb_fetch_assoc.phpt
mdb_fetch_row.phpt mdb_num_fields.phpt
mdb_num_rows.phpt mdb_open.phpt
mdb_table_close.phpt mdb_table_fields.phpt
mdb_table_open.phpt mdb_tables.phpt
mdb_type_name.phpt mdb_version.phpt
Log:
generated code updated using latest mdbtools.xml spec file
and CodeGen_PECL 1.0.0 stable
http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/.cvsignore?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/.cvsignore diff -u pecl/mdbtools/.cvsignore:1.1 pecl/mdbtools/.cvsignore:1.2 --- pecl/mdbtools/.cvsignore:1.1 Tue Mar 30 20:31:37 2004 +++ pecl/mdbtools/.cvsignore Mon Feb 20 17:43:10 2006 @@ -30,7 +30,15 @@ mkinstalldirs modules scan_makefile_in.awk -*.tgz -*~ -#*# -.#* +*.dsw +*.plg +*.opt +*.ncb +Release +Release_inline +Debug +Release_TS +Release_TSDbg +Release_TS_inline +Debug_TS +mdbtools*.tgz http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/LICENSE?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/LICENSE diff -u pecl/mdbtools/LICENSE:1.1 pecl/mdbtools/LICENSE:1.2 --- pecl/mdbtools/LICENSE:1.1 Tue Mar 30 20:31:37 2004 +++ pecl/mdbtools/LICENSE Mon Feb 20 17:43:10 2006 @@ -456,47 +456,3 @@ DAMAGES. END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - <one line to give the library's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/README?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/README diff -u pecl/mdbtools/README:1.3 pecl/mdbtools/README:1.4 --- pecl/mdbtools/README:1.3 Thu Apr 15 17:34:24 2004 +++ pecl/mdbtools/README Mon Feb 20 17:43:10 2006 @@ -1,13 +1,13 @@ -This is a standalone PHP extension created using PECL_Gen 0.8.2 +This is a standalone PHP extension created using CodeGen_PECL 1.0.0 HACKING ======= -There are two ways to modify an extension created using PECL_Gen: +There are two ways to modify an extension created using CodeGen_PECL: 1) you can modify the generated code as with any other PHP extension -2) you can add custom code to the PECL_Gen XML source and re-run pecl-gen +2) you can add custom code to the CodeGen_PECL XML source and re-run pecl-gen The 2nd approach may look a bit complicated but you have be aware that any manual changes to the generated code will be lost if you ever change the @@ -15,7 +15,7 @@ to the newly generated code again. Adding code snippets to the XML source itself on the other hand may be a bit more complicated but this way your custom code will always be in the -generated code no matter how often you rerun PECL_Gen. +generated code no matter how often you rerun CodeGen_PECL. BUILDING ON UNIX etc. @@ -30,10 +30,25 @@ 5. $ [sudo] make install *) this is a general problem with "make test" and standalone extensions - (that is being worked on) so please don't blame PECL_Gen for this + (that is being worked on) so please don't blame CodeGen_PECL for this +BUILDING ON WINDOWS +=================== + +The extension provides the VisualStudio V6 project file + + mdbtools.dsp +To compile the extension you open this file using VisualStudio, +select the apropriate configuration for your installation +(either "Release_TS" or "Debug_TS") and create "php_mdbtools.dll" + +After successfull compilation you have to copy the newly +created "php_mdbtools.dll" to the PHP +extension directory (default: C:\PHP\extensions). + + TESTING ======= http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/config.m4?r1=1.4&r2=1.5&diff_format=u Index: pecl/mdbtools/config.m4 diff -u pecl/mdbtools/config.m4:1.4 pecl/mdbtools/config.m4:1.5 --- pecl/mdbtools/config.m4:1.4 Thu Nov 11 16:42:22 2004 +++ pecl/mdbtools/config.m4 Mon Feb 20 17:43:10 2006 @@ -5,8 +5,8 @@ PHP_ARG_WITH(mdbtools, whether to enable mdbtools functions, [ --with-mdbtools[=DIR] With mdbtools support]) -if test "$PHP_MDBTOOLS" != "no"; then +if test "$PHP_MDBTOOLS" != "no"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test $PKG_CONFIG = "no"; then @@ -35,20 +35,35 @@ if test -r "$i/include/mdbtools.h"; then PHP_MDBTOOLS_DIR=$i AC_MSG_RESULT(found in $i) + break fi done + if test "x" = "x$PHP_MDBTOOLS_DIR"; then + AC_MSG_ERROR(not found) + fi fi + export OLD_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_MDBTOOLS" + export CPPFLAGS="$OLD_CPPFLAGS" PHP_ADD_INCLUDE($PHP_MDBTOOLS_DIR/include) - -fi - -if test "$PHP_MDBTOOLS" != "no"; then + export OLD_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_MDBTOOLS" AC_CHECK_HEADER([$PHP_MDBTOOLS_DIR/include/mdbtools.h], [], AC_MSG_ERROR('mdbtools.h' header not found)) + AC_CHECK_TYPE(MdbHandle *, [], [AC_MSG_ERROR(required payload type for resource MdbDatabase not found)], [#include "$srcdir/php_mdbtools.h"]) + AC_CHECK_TYPE(my_MdbTableDef *, [], [AC_MSG_ERROR(required payload type for resource MdbTable not found)], [#include "$srcdir/php_mdbtools.h"]) + export CPPFLAGS="$OLD_CPPFLAGS" PHP_SUBST(MDBTOOLS_SHARED_LIBADD) - PHP_ADD_LIBRARY_WITH_PATH(mdb, $PHP_MDBTOOLS_DIR/lib, MDBTOOLS_SHARED_LIBADD) - AC_CHECK_LIB(mdb, mdb_init, [AC_DEFINE(HAVE_MDB,1,[ ])], [AC_MSG_ERROR(mdb library not found or wrong version)],) + + PHP_CHECK_LIBRARY(mdb, mdb_init, + [ + PHP_ADD_LIBRARY_WITH_PATH(mdb, $PHP_MDBTOOLS_DIR/lib, MDBTOOLS_SHARED_LIBADD) + ],[ + AC_MSG_ERROR([wrong mdb lib version or lib not found]) + ],[ + -L$PHP_MDBTOOLS_DIR/lib + ]) PHP_SUBST(MDBTOOLS_SHARED_LIBADD) http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/mdbtools.c?r1=1.4&r2=1.5&diff_format=u Index: pecl/mdbtools/mdbtools.c diff -u pecl/mdbtools/mdbtools.c:1.4 pecl/mdbtools/mdbtools.c:1.5 --- pecl/mdbtools/mdbtools.c:1.4 Thu Nov 11 16:42:22 2004 +++ pecl/mdbtools/mdbtools.c Mon Feb 20 17:43:10 2006 @@ -28,6 +28,7 @@ #if HAVE_MDBTOOLS +/* {{{ Resource destructors */ int le_MdbDatabase; void MdbDatabase_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) { @@ -35,6 +36,7 @@ mdb_close(resource); } + int le_MdbTable; void MdbTable_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) { @@ -52,6 +54,9 @@ efree(resource); } + +/* }}} * + /* {{{ mdbtools_functions[] */ function_entry mdbtools_functions[] = { PHP_FE(mdb_open , NULL) @@ -81,8 +86,8 @@ mdbtools_functions, PHP_MINIT(mdbtools), /* Replace with NULL if there is nothing to do at php startup */ PHP_MSHUTDOWN(mdbtools), /* Replace with NULL if there is nothing to do at php shutdown */ - PHP_RINIT(mdbtools), /* Replace with NULL if there is nothing to do at request start */ - PHP_RSHUTDOWN(mdbtools), /* Replace with NULL if there is nothing to do at request end */ + PHP_RINIT(mdbtools), /* Replace with NULL if there is nothing to do at request start */ + PHP_RSHUTDOWN(mdbtools), /* Replace with NULL if there is nothing to do at request end */ PHP_MINFO(mdbtools), "0.1", STANDARD_MODULE_PROPERTIES @@ -94,43 +99,33 @@ #endif -/* {{{ globals and ini entries */ -/* }}} */ - - /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(mdbtools) { - REGISTER_LONG_CONSTANT("MDB_VER_JET3", MDB_VER_JET3, 0); - REGISTER_LONG_CONSTANT("MDB_VER_JET4", MDB_VER_JET4, 0); - REGISTER_LONG_CONSTANT("MDB_BOOL", MDB_BOOL, 0); - REGISTER_LONG_CONSTANT("MDB_BYTE", MDB_BYTE, 0); - REGISTER_LONG_CONSTANT("MDB_INT", MDB_INT, 0); - REGISTER_LONG_CONSTANT("MDB_LONGINT", MDB_LONGINT, 0); - REGISTER_LONG_CONSTANT("MDB_MONEY", MDB_MONEY, 0); - REGISTER_LONG_CONSTANT("MDB_FLOAT", MDB_FLOAT, 0); - REGISTER_LONG_CONSTANT("MDB_DOUBLE", MDB_DOUBLE, 0); - REGISTER_LONG_CONSTANT("MDB_SDATETIME", MDB_SDATETIME, 0); - REGISTER_LONG_CONSTANT("MDB_TEXT", MDB_TEXT, 0); - REGISTER_LONG_CONSTANT("MDB_OLE", MDB_OLE, 0); - REGISTER_LONG_CONSTANT("MDB_MEMO", MDB_MEMO, 0); - REGISTER_LONG_CONSTANT("MDB_REPID", MDB_REPID, 0); - REGISTER_LONG_CONSTANT("MDB_NUMERIC", MDB_NUMERIC, 0); - + REGISTER_LONG_CONSTANT("MDB_VER_JET3", MDB_VER_JET3, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_VER_JET4", MDB_VER_JET4, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_BOOL", MDB_BOOL, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_BYTE", MDB_BYTE, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_INT", MDB_INT, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_LONGINT", MDB_LONGINT, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_MONEY", MDB_MONEY, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_FLOAT", MDB_FLOAT, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_DOUBLE", MDB_DOUBLE, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_SDATETIME", MDB_SDATETIME, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_TEXT", MDB_TEXT, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_OLE", MDB_OLE, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_MEMO", MDB_MEMO, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_REPID", MDB_REPID, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_NUMERIC", MDB_NUMERIC, CONST_PERSISTENT | CONST_CS); le_MdbDatabase = zend_register_list_destructors_ex(MdbDatabase_dtor, - NULL, - "MdbDatabase", - module_number); - + NULL, "MdbDatabase", module_number); le_MdbTable = zend_register_list_destructors_ex(MdbTable_dtor, - NULL, - "MdbTable", - module_number); + NULL, "MdbTable", module_number); - { + do { mdb_init(); - } + } while (0); return SUCCESS; } @@ -142,7 +137,6 @@ { mdb_exit(); - return SUCCESS; } /* }}} */ @@ -188,84 +182,86 @@ PHP_FUNCTION(mdb_open) { MdbHandle * return_res; - char * path = NULL; + const char * path = NULL; int path_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &path_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s/", &path, &path_len) == FAILURE) { return; } - - { + do { +#line 164 "mdbtools.xml" return_res = mdb_open(path, MDB_NOFLAGS); if (!return_res) RETURN_FALSE; - } + } while(0); ZEND_REGISTER_RESOURCE(return_value, return_res, le_MdbDatabase); } -/* }}} */ +/* }}} mdb_open */ /* {{{ proto void mdb_close(resource MdbDatabase db) Close an open Access .mdb file */ PHP_FUNCTION(mdb_close) { - zval * db = NULL; - int db_id = -1; - MdbHandle * res_db; + zval * db_res = NULL; + int db_resid = -1; + MdbHandle * db; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &db) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &db_res) == FAILURE) { return; } - - ZEND_FETCH_RESOURCE(res_db, MdbHandle *, &db, db_id, "MdbDatabase", le_MdbDatabase); + ZEND_FETCH_RESOURCE(db, MdbHandle *, &db_res, db_resid, "MdbDatabase", le_MdbDatabase); - { + do { +#line 188 "mdbtools.xml" zend_list_delete(Z_LVAL_P(db)); - } + } while(0); } -/* }}} */ +/* }}} mdb_close */ /* {{{ proto int mdb_version(resource MdbDatabase db) Get Jet Engine version number from .mdb file */ PHP_FUNCTION(mdb_version) { - zval * db = NULL; - int db_id = -1; - MdbHandle * res_db; + zval * db_res = NULL; + int db_resid = -1; + MdbHandle * db; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &db) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &db_res) == FAILURE) { return; } - - ZEND_FETCH_RESOURCE(res_db, MdbHandle *, &db, db_id, "MdbDatabase", le_MdbDatabase); + ZEND_FETCH_RESOURCE(db, MdbHandle *, &db_res, db_resid, "MdbDatabase", le_MdbDatabase); - { + do { +#line 204 "mdbtools.xml" RETURN_LONG(res_db->f->jet_version); - } + } while(0); } -/* }}} */ +/* }}} mdb_version */ -/* {{{ proto array mdb_tables(resource MdbDatabase db [, bool systabs]) +/* {{{ proto array mdb_tables(resource MdbDatabase db[, bool systabs]) Get names of tables in an .mdb file */ PHP_FUNCTION(mdb_tables) { - zval * db = NULL; - int db_id = -1; - MdbHandle * res_db; + zval * db_res = NULL; + int db_resid = -1; + MdbHandle * db; zend_bool systabs = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|b", &db, &systabs) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/|b/", &db_res, &systabs) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(db, MdbHandle *, &db_res, db_resid, "MdbDatabase", le_MdbDatabase); - ZEND_FETCH_RESOURCE(res_db, MdbHandle *, &db, db_id, "MdbDatabase", le_MdbDatabase); + array_init(return_value); - { + do { +#line 223 "mdbtools.xml" int i; MdbCatalogEntry *entry; @@ -283,30 +279,30 @@ } add_next_index_string(return_value, entry->object_name, 1); } - } + } while(0); } -/* }}} */ +/* }}} mdb_tables */ /* {{{ proto resource MdbTable mdb_table_open(resource MdbDatabase db, string table) Open a table in an .mdb file for reading */ PHP_FUNCTION(mdb_table_open) { - my_MdbTableDef * return_res = (my_MdbTableDef *)emalloc(sizeof(my_MdbTableDef)); - zval * db = NULL; - int db_id = -1; - MdbHandle * res_db; - char * table = NULL; + my_MdbTableDef * return_res = (my_MdbTableDef *)ecalloc(1, sizeof(my_MdbTableDef)); + zval * db_res = NULL; + int db_resid = -1; + MdbHandle * db; + const char * table = NULL; int table_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &db, &table, &table_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/s/", &db_res, &table, &table_len) == FAILURE) { return; } - - ZEND_FETCH_RESOURCE(res_db, MdbHandle *, &db, db_id, "MdbDatabase", le_MdbDatabase); + ZEND_FETCH_RESOURCE(db, MdbHandle *, &db_res, db_resid, "MdbDatabase", le_MdbDatabase); - { + do { +#line 252 "mdbtools.xml" int i, j; MdbCatalogEntry *entry; MdbColumn *col; @@ -327,8 +323,9 @@ mdb_read_indices(return_res->table); mdb_rewind_table(return_res->table); - return_res->column_names = ecalloc(return_res->num_cols, sizeof(char *)); - return_res->bound_values = ecalloc(return_res->num_cols, sizeof(char *)); + return_res->column_names = ecalloc(return_res->num_cols, sizeof(char *)); + return_res->bound_values = ecalloc(return_res->num_cols, sizeof(char *)); + return_res->bound_lengths = ecalloc(return_res->num_cols, sizeof(int)); for (j=0; j<return_res->num_cols; j++) { col=g_ptr_array_index(return_res->table->columns, j); @@ -337,34 +334,36 @@ return_res->bound_values[j] = emalloc(MDB_BIND_SIZE); return_res->bound_values[j][0] = '\0'; - mdb_bind_column(return_res->table, j+1, return_res->bound_values[j]); + mdb_bind_column(return_res->table, j+1, return_res->bound_values[j], return_res->bound_lengths+j); } } } if (!return_res->table) RETURN_FALSE; - } + } while(0); ZEND_REGISTER_RESOURCE(return_value, return_res, le_MdbTable); } -/* }}} */ +/* }}} mdb_table_open */ /* {{{ proto array mdb_fetch_row(resource MdbTable table) Get a table row as an enumerated array */ PHP_FUNCTION(mdb_fetch_row) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); + array_init(return_value); - { + do { +#line 310 "mdbtools.xml" int i; if (!mdb_fetch_row(res_table->table)) { @@ -374,29 +373,31 @@ array_init(return_value); for (i = 0; i < res_table->num_cols; i++) { - add_next_index_string(return_value, res_table->bound_values[i], 1); + add_next_index_stringl(return_value, res_table->bound_values[i], res_table->bound_lengths[i], 1); } - } + } while(0); } -/* }}} */ +/* }}} mdb_fetch_row */ /* {{{ proto array mdb_fetch_assoc(resource MdbTable table) Get a table row as an associative array */ PHP_FUNCTION(mdb_fetch_assoc) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); + array_init(return_value); - { + do { +#line 343 "mdbtools.xml" int i; if (!mdb_fetch_row(res_table->table)) { @@ -406,117 +407,119 @@ array_init(return_value); for (i = 0; i < res_table->num_cols; i++) { - add_assoc_string(return_value, res_table->column_names[i], res_table->bound_values[i], 1); + add_assoc_stringl(return_value, res_table->column_names[i], res_table->bound_values[i], res_table->bound_lengths[i], 1); } - } + } while(0); } -/* }}} */ +/* }}} mdb_fetch_assoc */ /* {{{ proto int mdb_rewind(resource MdbTable table) Rewind to first row in table */ PHP_FUNCTION(mdb_rewind) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); - - { + do { +#line 370 "mdbtools.xml" RETURN_LONG(mdb_rewind_table(res_table->table)); - } + } while(0); } -/* }}} */ +/* }}} mdb_rewind */ /* {{{ proto void mdb_table_close(resource MdbTable table) Close an opened table */ PHP_FUNCTION(mdb_table_close) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); - - { + do { +#line 388 "mdbtools.xml" zend_list_delete(Z_LVAL_P(table)); - } + } while(0); } -/* }}} */ +/* }}} mdb_table_close */ /* {{{ proto int mdb_num_fields(resource MdbTable table) Get number of table columns */ PHP_FUNCTION(mdb_num_fields) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); - - { + do { +#line 408 "mdbtools.xml" RETURN_LONG(res_table->table->num_cols); - } + } while(0); } -/* }}} */ +/* }}} mdb_num_fields */ /* {{{ proto int mdb_num_rows(resource MdbTable table) Get number of table rows */ PHP_FUNCTION(mdb_num_rows) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } - - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - { + do { +#line 428 "mdbtools.xml" RETURN_LONG(res_table->table->num_rows); - } + } while(0); } -/* }}} */ +/* }}} mdb_num_rows */ /* {{{ proto array mdb_table_fields(resource MdbTable table) Get field type information for all fields in a table */ PHP_FUNCTION(mdb_table_fields) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); + array_init(return_value); - { + do { +#line 471 "mdbtools.xml" int i; zval *row; MdbColumn *col; @@ -539,27 +542,29 @@ add_next_index_zval(return_value, row); } - } + } while(0); } -/* }}} */ +/* }}} mdb_table_fields */ /* {{{ proto array mdb_table_indexes(resource MdbTable table) Get index type information for all indexes in a table */ PHP_FUNCTION(mdb_table_indexes) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); + array_init(return_value); - { + do { +#line 508 "mdbtools.xml" int i,j; zval *row; MdbIndex *idx; @@ -590,32 +595,32 @@ add_next_index_zval(return_value, row); } - } + } while(0); } -/* }}} */ +/* }}} mdb_table_indexes */ /* {{{ proto string mdb_type_name(resource MdbDatabase db, int typecode) Look up the name for a field type */ PHP_FUNCTION(mdb_type_name) { - zval * db = NULL; - int db_id = -1; - MdbHandle * res_db; + zval * db_res = NULL; + int db_resid = -1; + MdbHandle * db; long typecode = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &db, &typecode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/l/", &db_res, &typecode) == FAILURE) { return; } - - ZEND_FETCH_RESOURCE(res_db, MdbHandle *, &db, db_id, "MdbDatabase", le_MdbDatabase); + ZEND_FETCH_RESOURCE(db, MdbHandle *, &db_res, db_resid, "MdbDatabase", le_MdbDatabase); - { + do { +#line 556 "mdbtools.xml" RETURN_STRING(mdb_get_coltype_string (res_db->default_backend, typecode), 1); - } + } while(0); } -/* }}} */ +/* }}} mdb_type_name */ #endif /* HAVE_MDBTOOLS */ http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/mdbtools.xml?r1=1.5&r2=1.6&diff_format=u Index: pecl/mdbtools/mdbtools.xml diff -u pecl/mdbtools/mdbtools.xml:1.5 pecl/mdbtools/mdbtools.xml:1.6 --- pecl/mdbtools/mdbtools.xml:1.5 Mon Feb 20 17:39:44 2006 +++ pecl/mdbtools/mdbtools.xml Mon Feb 20 17:43:10 2006 @@ -556,4 +556,14 @@ </code> </function> + <test name="foo"> + <title>foobar</title> + <code> +echo "hallo"; + </code> + <result> +hallo + </result> + </test> + </extension> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/package.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/package.xml diff -u pecl/mdbtools/package.xml:1.3 pecl/mdbtools/package.xml:1.4 --- pecl/mdbtools/package.xml:1.3 Thu Nov 11 16:42:22 2004 +++ pecl/mdbtools/package.xml Mon Feb 20 17:43:10 2006 @@ -1,6 +1,7 @@ -<?xml version="1.0" encoding="iso-8859-1"?> +<?xml version="1.0"?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"> <package> + <name>mdbtools</name> <summary>MDB data file access library</summary> <description> @@ -11,7 +12,9 @@ It is based on libmdb from the mdbtools package available at http://mdbtools.sourceforge.net/ </description> + <license>LGPL</license> + <configureoptions> <configureoption name="with-mdbtools" default="autodetect" prompt="mdbtools installation directory?" /> </configureoptions> @@ -27,19 +30,44 @@ <release> <version>0.1</version> - <date>2004-03-25</date> <state>alpha</state> <notes> first tests </notes> + <date>2004-03-25</date> </release> + <changelog> + + </changelog> + <deps> + <dep type="php" rel="ge" version="4.0.0"/> + </deps> <filelist> - <dir role="doc" name="/"> - <file role="doc">EXPERIMENTAL</file> - <file role="doc">CREDITS</file> - <file role="src">config.m4</file> - <file role="src">mdbtools.c</file> - <file role="src">php_mdbtools.h</file> + <dir name="/"> + <file role='doc' name='EXPERIMENTAL'/> + <file role='doc' name='CREDITS'/> + <file role='src' name='config.m4'/> + <file role='src' name='mdbtools.dsp'/> + <file role='src' name='config.w32'/> + <file role='src' name='mdbtools.c'/> + <file role='src' name='php_mdbtools.h'/> + <dir name="tests"> + <file role='test' name='mdb_open.phpt'/> + <file role='test' name='mdb_close.phpt'/> + <file role='test' name='mdb_version.phpt'/> + <file role='test' name='mdb_tables.phpt'/> + <file role='test' name='mdb_table_open.phpt'/> + <file role='test' name='mdb_fetch_row.phpt'/> + <file role='test' name='mdb_fetch_assoc.phpt'/> + <file role='test' name='mdb_rewind.phpt'/> + <file role='test' name='mdb_table_close.phpt'/> + <file role='test' name='mdb_num_fields.phpt'/> + <file role='test' name='mdb_num_rows.phpt'/> + <file role='test' name='mdb_table_fields.phpt'/> + <file role='test' name='mdb_table_indexes.phpt'/> + <file role='test' name='mdb_type_name.phpt'/> + <file role='test' name='foo.phpt'/> + </dir> </dir> </filelist> </package> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/php_mdbtools.h?r1=1.4&r2=1.5&diff_format=u Index: pecl/mdbtools/php_mdbtools.h diff -u pecl/mdbtools/php_mdbtools.h:1.4 pecl/mdbtools/php_mdbtools.h:1.5 --- pecl/mdbtools/php_mdbtools.h:1.4 Thu Nov 11 16:42:22 2004 +++ pecl/mdbtools/php_mdbtools.h Mon Feb 20 17:43:10 2006 @@ -27,6 +27,9 @@ #ifndef PHP_MDBTOOLS_H #define PHP_MDBTOOLS_H +#ifdef __cplusplus +extern "C" { +#endif #ifdef HAVE_CONFIG_H #include "config.h" @@ -39,8 +42,14 @@ #include <php_ini.h> #include <SAPI.h> #include <ext/standard/info.h> - +#include <Zend/zend_extensions.h> +#ifdef __cplusplus +} // extern "C" +#endif #include <mdbtools.h> +#ifdef __cplusplus +extern "C" { +#endif extern zend_module_entry mdbtools_module_entry; #define phpext_mdbtools_ptr &mdbtools_module_entry @@ -61,12 +70,31 @@ #include "TSRM.h" #endif +#define FREE_RESOURCE(resource) zend_list_delete(Z_LVAL_P(resource)) + +#define PROP_GET_LONG(name) Z_LVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC)) +#define PROP_SET_LONG(name, l) zend_update_property_long(_this_ce, _this_zval, #name, strlen(#name), l TSRMLS_CC) + +#define PROP_GET_DOUBLE(name) Z_DVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC)) +#define PROP_SET_DOUBLE(name, d) zend_update_property_double(_this_ce, _this_zval, #name, strlen(#name), d TSRMLS_CC) + +#define PROP_GET_STRING(name) Z_STRVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC)) +#define PROP_GET_STRLEN(name) Z_STRLEN_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC)) +#define PROP_SET_STRING(name, s) zend_update_property_string(_this_ce, _this_zval, #name, strlen(#name), s TSRMLS_CC) +#define PROP_SET_STRINGL(name, s, l) zend_update_property_string(_this_ce, _this_zval, #name, strlen(#name), s, l TSRMLS_CC) + PHP_FUNCTION(mdb_open); PHP_FUNCTION(mdb_close); PHP_FUNCTION(mdb_version); PHP_FUNCTION(mdb_tables); +ZEND_BEGIN_ARG_INFO(mdb_tables_args, 0) + ZEND_ARG_INFO(0, systabs) +ZEND_END_ARG_INFO() PHP_FUNCTION(mdb_table_open); +ZEND_BEGIN_ARG_INFO(mdb_table_open_args, 0) + ZEND_ARG_INFO(0, table) +ZEND_END_ARG_INFO() PHP_FUNCTION(mdb_fetch_row); PHP_FUNCTION(mdb_fetch_assoc); PHP_FUNCTION(mdb_rewind); @@ -76,13 +104,22 @@ PHP_FUNCTION(mdb_table_fields); PHP_FUNCTION(mdb_table_indexes); PHP_FUNCTION(mdb_type_name); +ZEND_BEGIN_ARG_INFO(mdb_type_name_args, 0) + ZEND_ARG_INFO(0, typecode) +ZEND_END_ARG_INFO() +#ifdef __cplusplus +} // extern "C" +#endif +/* 'bottom' header snippets*/ typedef struct { MdbTableDef *table; int num_cols; char **bound_values; + char **bound_lengths; char **column_names; } my_MdbTableDef; + #endif /* PHP_HAVE_MDBTOOLS */ #endif /* PHP_MDBTOOLS_H */ http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/configure.xml?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/manual/mdbtools/configure.xml diff -u pecl/mdbtools/manual/mdbtools/configure.xml:1.1 pecl/mdbtools/manual/mdbtools/configure.xml:1.2 --- pecl/mdbtools/manual/mdbtools/configure.xml:1.1 Tue Mar 30 20:31:37 2004 +++ pecl/mdbtools/manual/mdbtools/configure.xml Mon Feb 20 17:43:10 2006 @@ -9,9 +9,6 @@ <section id='mdbtools.install'> &reftitle.install; - <para> -mdbtools installation prefix - </para> </section> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/reference.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/reference.xml diff -u pecl/mdbtools/manual/mdbtools/reference.xml:1.3 pecl/mdbtools/manual/mdbtools/reference.xml:1.4 --- pecl/mdbtools/manual/mdbtools/reference.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/reference.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <reference id='ref.mdbtools'> <title>MDB data file access library</title> <titleabbrev>mdbtools</titleabbrev> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-close.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-close.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-close.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-close.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-close.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-close.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-close"> <refnamediv> <refname>mdb_close</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-assoc.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-assoc.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-assoc.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-assoc.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-assoc.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-assoc.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-fetch-assoc"> <refnamediv> <refname>mdb_fetch_assoc</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-row.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-row.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-row.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-row.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-row.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-row.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-fetch-row"> <refnamediv> <refname>mdb_fetch_row</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-num-fields.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-num-fields.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-num-fields.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-num-fields.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-num-fields.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-num-fields.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-num-fields"> <refnamediv> <refname>mdb_num_fields</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-num-rows.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-num-rows.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-num-rows.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-num-rows.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-num-rows.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-num-rows.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-num-rows"> <refnamediv> <refname>mdb_num_rows</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-open.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-open.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-open.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-open.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-open.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-open.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-open"> <refnamediv> <refname>mdb_open</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-table-close.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-table-close.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-table-close.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-table-close.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-table-close.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-table-close.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-table-close"> <refnamediv> <refname>mdb_table_close</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-table-fields.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-table-fields.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-table-fields.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-table-fields.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-table-fields.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-table-fields.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-table-fields"> <refnamediv> <refname>mdb_table_fields</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-table-open.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-table-open.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-table-open.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-table-open.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-table-open.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-table-open.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-table-open"> <refnamediv> <refname>mdb_table_open</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-tables.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-tables.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-tables.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-tables.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-tables.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-tables.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-tables"> <refnamediv> <refname>mdb_tables</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-type-name.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-type-name.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-type-name.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-type-name.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-type-name.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-type-name.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-type-name"> <refnamediv> <refname>mdb_type_name</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-version.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-version.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-version.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-version.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-version.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-version.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-version"> <refnamediv> <refname>mdb_version</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_close.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_close.phpt diff -u pecl/mdbtools/tests/mdb_close.phpt:1.1 pecl/mdbtools/tests/mdb_close.phpt:1.2 --- pecl/mdbtools/tests/mdb_close.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_close.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_close() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_close() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_close() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_fetch_assoc.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_fetch_assoc.phpt diff -u pecl/mdbtools/tests/mdb_fetch_assoc.phpt:1.1 pecl/mdbtools/tests/mdb_fetch_assoc.phpt:1.2 --- pecl/mdbtools/tests/mdb_fetch_assoc.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_fetch_assoc.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_fetch_assoc() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_fetch_assoc() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_fetch_assoc() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_fetch_row.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_fetch_row.phpt diff -u pecl/mdbtools/tests/mdb_fetch_row.phpt:1.1 pecl/mdbtools/tests/mdb_fetch_row.phpt:1.2 --- pecl/mdbtools/tests/mdb_fetch_row.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_fetch_row.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_fetch_row() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_fetch_row() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_fetch_row() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_num_fields.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_num_fields.phpt diff -u pecl/mdbtools/tests/mdb_num_fields.phpt:1.1 pecl/mdbtools/tests/mdb_num_fields.phpt:1.2 --- pecl/mdbtools/tests/mdb_num_fields.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_num_fields.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_num_fields() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_num_fields() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_num_fields() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_num_rows.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_num_rows.phpt diff -u pecl/mdbtools/tests/mdb_num_rows.phpt:1.1 pecl/mdbtools/tests/mdb_num_rows.phpt:1.2 --- pecl/mdbtools/tests/mdb_num_rows.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_num_rows.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_num_rows() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_num_rows() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_num_rows() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_open.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_open.phpt diff -u pecl/mdbtools/tests/mdb_open.phpt:1.1 pecl/mdbtools/tests/mdb_open.phpt:1.2 --- pecl/mdbtools/tests/mdb_open.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_open.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,15 @@ --TEST-- mdb_open() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_open() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo "hallo"; + ?> --EXPECT-- -no test case for mdb_open() yet \ No newline at end of file +hallo http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_table_close.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_table_close.phpt diff -u pecl/mdbtools/tests/mdb_table_close.phpt:1.1 pecl/mdbtools/tests/mdb_table_close.phpt:1.2 --- pecl/mdbtools/tests/mdb_table_close.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_table_close.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_table_close() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_table_close() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_table_close() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_table_fields.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_table_fields.phpt diff -u pecl/mdbtools/tests/mdb_table_fields.phpt:1.1 pecl/mdbtools/tests/mdb_table_fields.phpt:1.2 --- pecl/mdbtools/tests/mdb_table_fields.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_table_fields.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_table_fields() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_table_fields() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_table_fields() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_table_open.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_table_open.phpt diff -u pecl/mdbtools/tests/mdb_table_open.phpt:1.1 pecl/mdbtools/tests/mdb_table_open.phpt:1.2 --- pecl/mdbtools/tests/mdb_table_open.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_table_open.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_table_open() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_table_open() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_table_open() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_tables.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_tables.phpt diff -u pecl/mdbtools/tests/mdb_tables.phpt:1.1 pecl/mdbtools/tests/mdb_tables.phpt:1.2 --- pecl/mdbtools/tests/mdb_tables.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_tables.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_tables() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_tables() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_tables() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_type_name.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_type_name.phpt diff -u pecl/mdbtools/tests/mdb_type_name.phpt:1.1 pecl/mdbtools/tests/mdb_type_name.phpt:1.2 --- pecl/mdbtools/tests/mdb_type_name.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_type_name.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_type_name() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_type_name() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_type_name() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_version.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_version.phpt diff -u pecl/mdbtools/tests/mdb_version.phpt:1.1 pecl/mdbtools/tests/mdb_version.phpt:1.2 --- pecl/mdbtools/tests/mdb_version.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_version.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_version() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_version() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_version() yet \ No newline at end of file +OK \ No newline at end of file
http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/.cvsignore?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/.cvsignore diff -u pecl/mdbtools/.cvsignore:1.1 pecl/mdbtools/.cvsignore:1.2 --- pecl/mdbtools/.cvsignore:1.1 Tue Mar 30 20:31:37 2004 +++ pecl/mdbtools/.cvsignore Mon Feb 20 17:43:10 2006 @@ -30,7 +30,15 @@ mkinstalldirs modules scan_makefile_in.awk -*.tgz -*~ -#*# -.#* +*.dsw +*.plg +*.opt +*.ncb +Release +Release_inline +Debug +Release_TS +Release_TSDbg +Release_TS_inline +Debug_TS +mdbtools*.tgz http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/LICENSE?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/LICENSE diff -u pecl/mdbtools/LICENSE:1.1 pecl/mdbtools/LICENSE:1.2 --- pecl/mdbtools/LICENSE:1.1 Tue Mar 30 20:31:37 2004 +++ pecl/mdbtools/LICENSE Mon Feb 20 17:43:10 2006 @@ -456,47 +456,3 @@ DAMAGES. END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - <one line to give the library's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/README?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/README diff -u pecl/mdbtools/README:1.3 pecl/mdbtools/README:1.4 --- pecl/mdbtools/README:1.3 Thu Apr 15 17:34:24 2004 +++ pecl/mdbtools/README Mon Feb 20 17:43:10 2006 @@ -1,13 +1,13 @@ -This is a standalone PHP extension created using PECL_Gen 0.8.2 +This is a standalone PHP extension created using CodeGen_PECL 1.0.0 HACKING ======= -There are two ways to modify an extension created using PECL_Gen: +There are two ways to modify an extension created using CodeGen_PECL: 1) you can modify the generated code as with any other PHP extension -2) you can add custom code to the PECL_Gen XML source and re-run pecl-gen +2) you can add custom code to the CodeGen_PECL XML source and re-run pecl-gen The 2nd approach may look a bit complicated but you have be aware that any manual changes to the generated code will be lost if you ever change the @@ -15,7 +15,7 @@ to the newly generated code again. Adding code snippets to the XML source itself on the other hand may be a bit more complicated but this way your custom code will always be in the -generated code no matter how often you rerun PECL_Gen. +generated code no matter how often you rerun CodeGen_PECL. BUILDING ON UNIX etc. @@ -30,10 +30,25 @@ 5. $ [sudo] make install *) this is a general problem with "make test" and standalone extensions - (that is being worked on) so please don't blame PECL_Gen for this + (that is being worked on) so please don't blame CodeGen_PECL for this +BUILDING ON WINDOWS +=================== + +The extension provides the VisualStudio V6 project file + + mdbtools.dsp +To compile the extension you open this file using VisualStudio, +select the apropriate configuration for your installation +(either "Release_TS" or "Debug_TS") and create "php_mdbtools.dll" + +After successfull compilation you have to copy the newly +created "php_mdbtools.dll" to the PHP +extension directory (default: C:\PHP\extensions). + + TESTING ======= http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/config.m4?r1=1.4&r2=1.5&diff_format=u Index: pecl/mdbtools/config.m4 diff -u pecl/mdbtools/config.m4:1.4 pecl/mdbtools/config.m4:1.5 --- pecl/mdbtools/config.m4:1.4 Thu Nov 11 16:42:22 2004 +++ pecl/mdbtools/config.m4 Mon Feb 20 17:43:10 2006 @@ -5,8 +5,8 @@ PHP_ARG_WITH(mdbtools, whether to enable mdbtools functions, [ --with-mdbtools[=DIR] With mdbtools support]) -if test "$PHP_MDBTOOLS" != "no"; then +if test "$PHP_MDBTOOLS" != "no"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test $PKG_CONFIG = "no"; then @@ -35,20 +35,35 @@ if test -r "$i/include/mdbtools.h"; then PHP_MDBTOOLS_DIR=$i AC_MSG_RESULT(found in $i) + break fi done + if test "x" = "x$PHP_MDBTOOLS_DIR"; then + AC_MSG_ERROR(not found) + fi fi + export OLD_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_MDBTOOLS" + export CPPFLAGS="$OLD_CPPFLAGS" PHP_ADD_INCLUDE($PHP_MDBTOOLS_DIR/include) - -fi - -if test "$PHP_MDBTOOLS" != "no"; then + export OLD_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_MDBTOOLS" AC_CHECK_HEADER([$PHP_MDBTOOLS_DIR/include/mdbtools.h], [], AC_MSG_ERROR('mdbtools.h' header not found)) + AC_CHECK_TYPE(MdbHandle *, [], [AC_MSG_ERROR(required payload type for resource MdbDatabase not found)], [#include "$srcdir/php_mdbtools.h"]) + AC_CHECK_TYPE(my_MdbTableDef *, [], [AC_MSG_ERROR(required payload type for resource MdbTable not found)], [#include "$srcdir/php_mdbtools.h"]) + export CPPFLAGS="$OLD_CPPFLAGS" PHP_SUBST(MDBTOOLS_SHARED_LIBADD) - PHP_ADD_LIBRARY_WITH_PATH(mdb, $PHP_MDBTOOLS_DIR/lib, MDBTOOLS_SHARED_LIBADD) - AC_CHECK_LIB(mdb, mdb_init, [AC_DEFINE(HAVE_MDB,1,[ ])], [AC_MSG_ERROR(mdb library not found or wrong version)],) + + PHP_CHECK_LIBRARY(mdb, mdb_init, + [ + PHP_ADD_LIBRARY_WITH_PATH(mdb, $PHP_MDBTOOLS_DIR/lib, MDBTOOLS_SHARED_LIBADD) + ],[ + AC_MSG_ERROR([wrong mdb lib version or lib not found]) + ],[ + -L$PHP_MDBTOOLS_DIR/lib + ]) PHP_SUBST(MDBTOOLS_SHARED_LIBADD) http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/mdbtools.c?r1=1.4&r2=1.5&diff_format=u Index: pecl/mdbtools/mdbtools.c diff -u pecl/mdbtools/mdbtools.c:1.4 pecl/mdbtools/mdbtools.c:1.5 --- pecl/mdbtools/mdbtools.c:1.4 Thu Nov 11 16:42:22 2004 +++ pecl/mdbtools/mdbtools.c Mon Feb 20 17:43:10 2006 @@ -28,6 +28,7 @@ #if HAVE_MDBTOOLS +/* {{{ Resource destructors */ int le_MdbDatabase; void MdbDatabase_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) { @@ -35,6 +36,7 @@ mdb_close(resource); } + int le_MdbTable; void MdbTable_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) { @@ -52,6 +54,9 @@ efree(resource); } + +/* }}} * + /* {{{ mdbtools_functions[] */ function_entry mdbtools_functions[] = { PHP_FE(mdb_open , NULL) @@ -81,8 +86,8 @@ mdbtools_functions, PHP_MINIT(mdbtools), /* Replace with NULL if there is nothing to do at php startup */ PHP_MSHUTDOWN(mdbtools), /* Replace with NULL if there is nothing to do at php shutdown */ - PHP_RINIT(mdbtools), /* Replace with NULL if there is nothing to do at request start */ - PHP_RSHUTDOWN(mdbtools), /* Replace with NULL if there is nothing to do at request end */ + PHP_RINIT(mdbtools), /* Replace with NULL if there is nothing to do at request start */ + PHP_RSHUTDOWN(mdbtools), /* Replace with NULL if there is nothing to do at request end */ PHP_MINFO(mdbtools), "0.1", STANDARD_MODULE_PROPERTIES @@ -94,43 +99,33 @@ #endif -/* {{{ globals and ini entries */ -/* }}} */ - - /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(mdbtools) { - REGISTER_LONG_CONSTANT("MDB_VER_JET3", MDB_VER_JET3, 0); - REGISTER_LONG_CONSTANT("MDB_VER_JET4", MDB_VER_JET4, 0); - REGISTER_LONG_CONSTANT("MDB_BOOL", MDB_BOOL, 0); - REGISTER_LONG_CONSTANT("MDB_BYTE", MDB_BYTE, 0); - REGISTER_LONG_CONSTANT("MDB_INT", MDB_INT, 0); - REGISTER_LONG_CONSTANT("MDB_LONGINT", MDB_LONGINT, 0); - REGISTER_LONG_CONSTANT("MDB_MONEY", MDB_MONEY, 0); - REGISTER_LONG_CONSTANT("MDB_FLOAT", MDB_FLOAT, 0); - REGISTER_LONG_CONSTANT("MDB_DOUBLE", MDB_DOUBLE, 0); - REGISTER_LONG_CONSTANT("MDB_SDATETIME", MDB_SDATETIME, 0); - REGISTER_LONG_CONSTANT("MDB_TEXT", MDB_TEXT, 0); - REGISTER_LONG_CONSTANT("MDB_OLE", MDB_OLE, 0); - REGISTER_LONG_CONSTANT("MDB_MEMO", MDB_MEMO, 0); - REGISTER_LONG_CONSTANT("MDB_REPID", MDB_REPID, 0); - REGISTER_LONG_CONSTANT("MDB_NUMERIC", MDB_NUMERIC, 0); - + REGISTER_LONG_CONSTANT("MDB_VER_JET3", MDB_VER_JET3, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_VER_JET4", MDB_VER_JET4, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_BOOL", MDB_BOOL, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_BYTE", MDB_BYTE, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_INT", MDB_INT, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_LONGINT", MDB_LONGINT, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_MONEY", MDB_MONEY, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_FLOAT", MDB_FLOAT, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_DOUBLE", MDB_DOUBLE, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_SDATETIME", MDB_SDATETIME, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_TEXT", MDB_TEXT, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_OLE", MDB_OLE, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_MEMO", MDB_MEMO, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_REPID", MDB_REPID, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("MDB_NUMERIC", MDB_NUMERIC, CONST_PERSISTENT | CONST_CS); le_MdbDatabase = zend_register_list_destructors_ex(MdbDatabase_dtor, - NULL, - "MdbDatabase", - module_number); - + NULL, "MdbDatabase", module_number); le_MdbTable = zend_register_list_destructors_ex(MdbTable_dtor, - NULL, - "MdbTable", - module_number); + NULL, "MdbTable", module_number); - { + do { mdb_init(); - } + } while (0); return SUCCESS; } @@ -142,7 +137,6 @@ { mdb_exit(); - return SUCCESS; } /* }}} */ @@ -188,84 +182,86 @@ PHP_FUNCTION(mdb_open) { MdbHandle * return_res; - char * path = NULL; + const char * path = NULL; int path_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &path_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s/", &path, &path_len) == FAILURE) { return; } - - { + do { +#line 164 "mdbtools.xml" return_res = mdb_open(path, MDB_NOFLAGS); if (!return_res) RETURN_FALSE; - } + } while(0); ZEND_REGISTER_RESOURCE(return_value, return_res, le_MdbDatabase); } -/* }}} */ +/* }}} mdb_open */ /* {{{ proto void mdb_close(resource MdbDatabase db) Close an open Access .mdb file */ PHP_FUNCTION(mdb_close) { - zval * db = NULL; - int db_id = -1; - MdbHandle * res_db; + zval * db_res = NULL; + int db_resid = -1; + MdbHandle * db; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &db) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &db_res) == FAILURE) { return; } - - ZEND_FETCH_RESOURCE(res_db, MdbHandle *, &db, db_id, "MdbDatabase", le_MdbDatabase); + ZEND_FETCH_RESOURCE(db, MdbHandle *, &db_res, db_resid, "MdbDatabase", le_MdbDatabase); - { + do { +#line 188 "mdbtools.xml" zend_list_delete(Z_LVAL_P(db)); - } + } while(0); } -/* }}} */ +/* }}} mdb_close */ /* {{{ proto int mdb_version(resource MdbDatabase db) Get Jet Engine version number from .mdb file */ PHP_FUNCTION(mdb_version) { - zval * db = NULL; - int db_id = -1; - MdbHandle * res_db; + zval * db_res = NULL; + int db_resid = -1; + MdbHandle * db; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &db) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &db_res) == FAILURE) { return; } - - ZEND_FETCH_RESOURCE(res_db, MdbHandle *, &db, db_id, "MdbDatabase", le_MdbDatabase); + ZEND_FETCH_RESOURCE(db, MdbHandle *, &db_res, db_resid, "MdbDatabase", le_MdbDatabase); - { + do { +#line 204 "mdbtools.xml" RETURN_LONG(res_db->f->jet_version); - } + } while(0); } -/* }}} */ +/* }}} mdb_version */ -/* {{{ proto array mdb_tables(resource MdbDatabase db [, bool systabs]) +/* {{{ proto array mdb_tables(resource MdbDatabase db[, bool systabs]) Get names of tables in an .mdb file */ PHP_FUNCTION(mdb_tables) { - zval * db = NULL; - int db_id = -1; - MdbHandle * res_db; + zval * db_res = NULL; + int db_resid = -1; + MdbHandle * db; zend_bool systabs = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|b", &db, &systabs) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/|b/", &db_res, &systabs) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(db, MdbHandle *, &db_res, db_resid, "MdbDatabase", le_MdbDatabase); - ZEND_FETCH_RESOURCE(res_db, MdbHandle *, &db, db_id, "MdbDatabase", le_MdbDatabase); + array_init(return_value); - { + do { +#line 223 "mdbtools.xml" int i; MdbCatalogEntry *entry; @@ -283,30 +279,30 @@ } add_next_index_string(return_value, entry->object_name, 1); } - } + } while(0); } -/* }}} */ +/* }}} mdb_tables */ /* {{{ proto resource MdbTable mdb_table_open(resource MdbDatabase db, string table) Open a table in an .mdb file for reading */ PHP_FUNCTION(mdb_table_open) { - my_MdbTableDef * return_res = (my_MdbTableDef *)emalloc(sizeof(my_MdbTableDef)); - zval * db = NULL; - int db_id = -1; - MdbHandle * res_db; - char * table = NULL; + my_MdbTableDef * return_res = (my_MdbTableDef *)ecalloc(1, sizeof(my_MdbTableDef)); + zval * db_res = NULL; + int db_resid = -1; + MdbHandle * db; + const char * table = NULL; int table_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &db, &table, &table_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/s/", &db_res, &table, &table_len) == FAILURE) { return; } - - ZEND_FETCH_RESOURCE(res_db, MdbHandle *, &db, db_id, "MdbDatabase", le_MdbDatabase); + ZEND_FETCH_RESOURCE(db, MdbHandle *, &db_res, db_resid, "MdbDatabase", le_MdbDatabase); - { + do { +#line 252 "mdbtools.xml" int i, j; MdbCatalogEntry *entry; MdbColumn *col; @@ -327,8 +323,9 @@ mdb_read_indices(return_res->table); mdb_rewind_table(return_res->table); - return_res->column_names = ecalloc(return_res->num_cols, sizeof(char *)); - return_res->bound_values = ecalloc(return_res->num_cols, sizeof(char *)); + return_res->column_names = ecalloc(return_res->num_cols, sizeof(char *)); + return_res->bound_values = ecalloc(return_res->num_cols, sizeof(char *)); + return_res->bound_lengths = ecalloc(return_res->num_cols, sizeof(int)); for (j=0; j<return_res->num_cols; j++) { col=g_ptr_array_index(return_res->table->columns, j); @@ -337,34 +334,36 @@ return_res->bound_values[j] = emalloc(MDB_BIND_SIZE); return_res->bound_values[j][0] = '\0'; - mdb_bind_column(return_res->table, j+1, return_res->bound_values[j]); + mdb_bind_column(return_res->table, j+1, return_res->bound_values[j], return_res->bound_lengths+j); } } } if (!return_res->table) RETURN_FALSE; - } + } while(0); ZEND_REGISTER_RESOURCE(return_value, return_res, le_MdbTable); } -/* }}} */ +/* }}} mdb_table_open */ /* {{{ proto array mdb_fetch_row(resource MdbTable table) Get a table row as an enumerated array */ PHP_FUNCTION(mdb_fetch_row) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); + array_init(return_value); - { + do { +#line 310 "mdbtools.xml" int i; if (!mdb_fetch_row(res_table->table)) { @@ -374,29 +373,31 @@ array_init(return_value); for (i = 0; i < res_table->num_cols; i++) { - add_next_index_string(return_value, res_table->bound_values[i], 1); + add_next_index_stringl(return_value, res_table->bound_values[i], res_table->bound_lengths[i], 1); } - } + } while(0); } -/* }}} */ +/* }}} mdb_fetch_row */ /* {{{ proto array mdb_fetch_assoc(resource MdbTable table) Get a table row as an associative array */ PHP_FUNCTION(mdb_fetch_assoc) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); + array_init(return_value); - { + do { +#line 343 "mdbtools.xml" int i; if (!mdb_fetch_row(res_table->table)) { @@ -406,117 +407,119 @@ array_init(return_value); for (i = 0; i < res_table->num_cols; i++) { - add_assoc_string(return_value, res_table->column_names[i], res_table->bound_values[i], 1); + add_assoc_stringl(return_value, res_table->column_names[i], res_table->bound_values[i], res_table->bound_lengths[i], 1); } - } + } while(0); } -/* }}} */ +/* }}} mdb_fetch_assoc */ /* {{{ proto int mdb_rewind(resource MdbTable table) Rewind to first row in table */ PHP_FUNCTION(mdb_rewind) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); - - { + do { +#line 370 "mdbtools.xml" RETURN_LONG(mdb_rewind_table(res_table->table)); - } + } while(0); } -/* }}} */ +/* }}} mdb_rewind */ /* {{{ proto void mdb_table_close(resource MdbTable table) Close an opened table */ PHP_FUNCTION(mdb_table_close) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); - - { + do { +#line 388 "mdbtools.xml" zend_list_delete(Z_LVAL_P(table)); - } + } while(0); } -/* }}} */ +/* }}} mdb_table_close */ /* {{{ proto int mdb_num_fields(resource MdbTable table) Get number of table columns */ PHP_FUNCTION(mdb_num_fields) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); - - { + do { +#line 408 "mdbtools.xml" RETURN_LONG(res_table->table->num_cols); - } + } while(0); } -/* }}} */ +/* }}} mdb_num_fields */ /* {{{ proto int mdb_num_rows(resource MdbTable table) Get number of table rows */ PHP_FUNCTION(mdb_num_rows) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } - - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - { + do { +#line 428 "mdbtools.xml" RETURN_LONG(res_table->table->num_rows); - } + } while(0); } -/* }}} */ +/* }}} mdb_num_rows */ /* {{{ proto array mdb_table_fields(resource MdbTable table) Get field type information for all fields in a table */ PHP_FUNCTION(mdb_table_fields) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); + array_init(return_value); - { + do { +#line 471 "mdbtools.xml" int i; zval *row; MdbColumn *col; @@ -539,27 +542,29 @@ add_next_index_zval(return_value, row); } - } + } while(0); } -/* }}} */ +/* }}} mdb_table_fields */ /* {{{ proto array mdb_table_indexes(resource MdbTable table) Get index type information for all indexes in a table */ PHP_FUNCTION(mdb_table_indexes) { - zval * table = NULL; - int table_id = -1; - my_MdbTableDef * res_table; + zval * table_res = NULL; + int table_resid = -1; + my_MdbTableDef * table; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &table) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/", &table_res) == FAILURE) { return; } + ZEND_FETCH_RESOURCE(table, my_MdbTableDef *, &table_res, table_resid, "MdbTable", le_MdbTable); - ZEND_FETCH_RESOURCE(res_table, my_MdbTableDef *, &table, table_id, "MdbTable", le_MdbTable); + array_init(return_value); - { + do { +#line 508 "mdbtools.xml" int i,j; zval *row; MdbIndex *idx; @@ -590,32 +595,32 @@ add_next_index_zval(return_value, row); } - } + } while(0); } -/* }}} */ +/* }}} mdb_table_indexes */ /* {{{ proto string mdb_type_name(resource MdbDatabase db, int typecode) Look up the name for a field type */ PHP_FUNCTION(mdb_type_name) { - zval * db = NULL; - int db_id = -1; - MdbHandle * res_db; + zval * db_res = NULL; + int db_resid = -1; + MdbHandle * db; long typecode = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &db, &typecode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r/l/", &db_res, &typecode) == FAILURE) { return; } - - ZEND_FETCH_RESOURCE(res_db, MdbHandle *, &db, db_id, "MdbDatabase", le_MdbDatabase); + ZEND_FETCH_RESOURCE(db, MdbHandle *, &db_res, db_resid, "MdbDatabase", le_MdbDatabase); - { + do { +#line 556 "mdbtools.xml" RETURN_STRING(mdb_get_coltype_string (res_db->default_backend, typecode), 1); - } + } while(0); } -/* }}} */ +/* }}} mdb_type_name */ #endif /* HAVE_MDBTOOLS */ http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/mdbtools.xml?r1=1.5&r2=1.6&diff_format=u Index: pecl/mdbtools/mdbtools.xml diff -u pecl/mdbtools/mdbtools.xml:1.5 pecl/mdbtools/mdbtools.xml:1.6 --- pecl/mdbtools/mdbtools.xml:1.5 Mon Feb 20 17:39:44 2006 +++ pecl/mdbtools/mdbtools.xml Mon Feb 20 17:43:10 2006 @@ -556,4 +556,14 @@ </code> </function> + <test name="foo"> + <title>foobar</title> + <code> +echo "hallo"; + </code> + <result> +hallo + </result> + </test> + </extension> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/package.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/package.xml diff -u pecl/mdbtools/package.xml:1.3 pecl/mdbtools/package.xml:1.4 --- pecl/mdbtools/package.xml:1.3 Thu Nov 11 16:42:22 2004 +++ pecl/mdbtools/package.xml Mon Feb 20 17:43:10 2006 @@ -1,6 +1,7 @@ -<?xml version="1.0" encoding="iso-8859-1"?> +<?xml version="1.0"?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"> <package> + <name>mdbtools</name> <summary>MDB data file access library</summary> <description> @@ -11,7 +12,9 @@ It is based on libmdb from the mdbtools package available at http://mdbtools.sourceforge.net/ </description> + <license>LGPL</license> + <configureoptions> <configureoption name="with-mdbtools" default="autodetect" prompt="mdbtools installation directory?" /> </configureoptions> @@ -27,19 +30,44 @@ <release> <version>0.1</version> - <date>2004-03-25</date> <state>alpha</state> <notes> first tests </notes> + <date>2004-03-25</date> </release> + <changelog> + + </changelog> + <deps> + <dep type="php" rel="ge" version="4.0.0"/> + </deps> <filelist> - <dir role="doc" name="/"> - <file role="doc">EXPERIMENTAL</file> - <file role="doc">CREDITS</file> - <file role="src">config.m4</file> - <file role="src">mdbtools.c</file> - <file role="src">php_mdbtools.h</file> + <dir name="/"> + <file role='doc' name='EXPERIMENTAL'/> + <file role='doc' name='CREDITS'/> + <file role='src' name='config.m4'/> + <file role='src' name='mdbtools.dsp'/> + <file role='src' name='config.w32'/> + <file role='src' name='mdbtools.c'/> + <file role='src' name='php_mdbtools.h'/> + <dir name="tests"> + <file role='test' name='mdb_open.phpt'/> + <file role='test' name='mdb_close.phpt'/> + <file role='test' name='mdb_version.phpt'/> + <file role='test' name='mdb_tables.phpt'/> + <file role='test' name='mdb_table_open.phpt'/> + <file role='test' name='mdb_fetch_row.phpt'/> + <file role='test' name='mdb_fetch_assoc.phpt'/> + <file role='test' name='mdb_rewind.phpt'/> + <file role='test' name='mdb_table_close.phpt'/> + <file role='test' name='mdb_num_fields.phpt'/> + <file role='test' name='mdb_num_rows.phpt'/> + <file role='test' name='mdb_table_fields.phpt'/> + <file role='test' name='mdb_table_indexes.phpt'/> + <file role='test' name='mdb_type_name.phpt'/> + <file role='test' name='foo.phpt'/> + </dir> </dir> </filelist> </package> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/php_mdbtools.h?r1=1.4&r2=1.5&diff_format=u Index: pecl/mdbtools/php_mdbtools.h diff -u pecl/mdbtools/php_mdbtools.h:1.4 pecl/mdbtools/php_mdbtools.h:1.5 --- pecl/mdbtools/php_mdbtools.h:1.4 Thu Nov 11 16:42:22 2004 +++ pecl/mdbtools/php_mdbtools.h Mon Feb 20 17:43:10 2006 @@ -27,6 +27,9 @@ #ifndef PHP_MDBTOOLS_H #define PHP_MDBTOOLS_H +#ifdef __cplusplus +extern "C" { +#endif #ifdef HAVE_CONFIG_H #include "config.h" @@ -39,8 +42,14 @@ #include <php_ini.h> #include <SAPI.h> #include <ext/standard/info.h> - +#include <Zend/zend_extensions.h> +#ifdef __cplusplus +} // extern "C" +#endif #include <mdbtools.h> +#ifdef __cplusplus +extern "C" { +#endif extern zend_module_entry mdbtools_module_entry; #define phpext_mdbtools_ptr &mdbtools_module_entry @@ -61,12 +70,31 @@ #include "TSRM.h" #endif +#define FREE_RESOURCE(resource) zend_list_delete(Z_LVAL_P(resource)) + +#define PROP_GET_LONG(name) Z_LVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC)) +#define PROP_SET_LONG(name, l) zend_update_property_long(_this_ce, _this_zval, #name, strlen(#name), l TSRMLS_CC) + +#define PROP_GET_DOUBLE(name) Z_DVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC)) +#define PROP_SET_DOUBLE(name, d) zend_update_property_double(_this_ce, _this_zval, #name, strlen(#name), d TSRMLS_CC) + +#define PROP_GET_STRING(name) Z_STRVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC)) +#define PROP_GET_STRLEN(name) Z_STRLEN_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC)) +#define PROP_SET_STRING(name, s) zend_update_property_string(_this_ce, _this_zval, #name, strlen(#name), s TSRMLS_CC) +#define PROP_SET_STRINGL(name, s, l) zend_update_property_string(_this_ce, _this_zval, #name, strlen(#name), s, l TSRMLS_CC) + PHP_FUNCTION(mdb_open); PHP_FUNCTION(mdb_close); PHP_FUNCTION(mdb_version); PHP_FUNCTION(mdb_tables); +ZEND_BEGIN_ARG_INFO(mdb_tables_args, 0) + ZEND_ARG_INFO(0, systabs) +ZEND_END_ARG_INFO() PHP_FUNCTION(mdb_table_open); +ZEND_BEGIN_ARG_INFO(mdb_table_open_args, 0) + ZEND_ARG_INFO(0, table) +ZEND_END_ARG_INFO() PHP_FUNCTION(mdb_fetch_row); PHP_FUNCTION(mdb_fetch_assoc); PHP_FUNCTION(mdb_rewind); @@ -76,13 +104,22 @@ PHP_FUNCTION(mdb_table_fields); PHP_FUNCTION(mdb_table_indexes); PHP_FUNCTION(mdb_type_name); +ZEND_BEGIN_ARG_INFO(mdb_type_name_args, 0) + ZEND_ARG_INFO(0, typecode) +ZEND_END_ARG_INFO() +#ifdef __cplusplus +} // extern "C" +#endif +/* 'bottom' header snippets*/ typedef struct { MdbTableDef *table; int num_cols; char **bound_values; + char **bound_lengths; char **column_names; } my_MdbTableDef; + #endif /* PHP_HAVE_MDBTOOLS */ #endif /* PHP_MDBTOOLS_H */ http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/configure.xml?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/manual/mdbtools/configure.xml diff -u pecl/mdbtools/manual/mdbtools/configure.xml:1.1 pecl/mdbtools/manual/mdbtools/configure.xml:1.2 --- pecl/mdbtools/manual/mdbtools/configure.xml:1.1 Tue Mar 30 20:31:37 2004 +++ pecl/mdbtools/manual/mdbtools/configure.xml Mon Feb 20 17:43:10 2006 @@ -9,9 +9,6 @@ <section id='mdbtools.install'> &reftitle.install; - <para> -mdbtools installation prefix - </para> </section> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/reference.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/reference.xml diff -u pecl/mdbtools/manual/mdbtools/reference.xml:1.3 pecl/mdbtools/manual/mdbtools/reference.xml:1.4 --- pecl/mdbtools/manual/mdbtools/reference.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/reference.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <reference id='ref.mdbtools'> <title>MDB data file access library</title> <titleabbrev>mdbtools</titleabbrev> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-close.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-close.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-close.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-close.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-close.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-close.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-close"> <refnamediv> <refname>mdb_close</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-assoc.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-assoc.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-assoc.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-assoc.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-assoc.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-assoc.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-fetch-assoc"> <refnamediv> <refname>mdb_fetch_assoc</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-row.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-row.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-row.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-row.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-row.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-fetch-row.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-fetch-row"> <refnamediv> <refname>mdb_fetch_row</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-num-fields.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-num-fields.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-num-fields.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-num-fields.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-num-fields.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-num-fields.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-num-fields"> <refnamediv> <refname>mdb_num_fields</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-num-rows.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-num-rows.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-num-rows.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-num-rows.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-num-rows.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-num-rows.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-num-rows"> <refnamediv> <refname>mdb_num_rows</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-open.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-open.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-open.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-open.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-open.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-open.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-open"> <refnamediv> <refname>mdb_open</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-table-close.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-table-close.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-table-close.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-table-close.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-table-close.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-table-close.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-table-close"> <refnamediv> <refname>mdb_table_close</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-table-fields.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-table-fields.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-table-fields.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-table-fields.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-table-fields.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-table-fields.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-table-fields"> <refnamediv> <refname>mdb_table_fields</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-table-open.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-table-open.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-table-open.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-table-open.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-table-open.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-table-open.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-table-open"> <refnamediv> <refname>mdb_table_open</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-tables.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-tables.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-tables.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-tables.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-tables.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-tables.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-tables"> <refnamediv> <refname>mdb_tables</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-type-name.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-type-name.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-type-name.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-type-name.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-type-name.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-type-name.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-type-name"> <refnamediv> <refname>mdb_type_name</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/manual/mdbtools/functions/mdb-version.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/mdbtools/manual/mdbtools/functions/mdb-version.xml diff -u pecl/mdbtools/manual/mdbtools/functions/mdb-version.xml:1.3 pecl/mdbtools/manual/mdbtools/functions/mdb-version.xml:1.4 --- pecl/mdbtools/manual/mdbtools/functions/mdb-version.xml:1.3 Tue Feb 8 18:17:36 2005 +++ pecl/mdbtools/manual/mdbtools/functions/mdb-version.xml Mon Feb 20 17:43:10 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mdb-version"> <refnamediv> <refname>mdb_version</refname> http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_close.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_close.phpt diff -u pecl/mdbtools/tests/mdb_close.phpt:1.1 pecl/mdbtools/tests/mdb_close.phpt:1.2 --- pecl/mdbtools/tests/mdb_close.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_close.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_close() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_close() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_close() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_fetch_assoc.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_fetch_assoc.phpt diff -u pecl/mdbtools/tests/mdb_fetch_assoc.phpt:1.1 pecl/mdbtools/tests/mdb_fetch_assoc.phpt:1.2 --- pecl/mdbtools/tests/mdb_fetch_assoc.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_fetch_assoc.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_fetch_assoc() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_fetch_assoc() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_fetch_assoc() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_fetch_row.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_fetch_row.phpt diff -u pecl/mdbtools/tests/mdb_fetch_row.phpt:1.1 pecl/mdbtools/tests/mdb_fetch_row.phpt:1.2 --- pecl/mdbtools/tests/mdb_fetch_row.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_fetch_row.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_fetch_row() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_fetch_row() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_fetch_row() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_num_fields.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_num_fields.phpt diff -u pecl/mdbtools/tests/mdb_num_fields.phpt:1.1 pecl/mdbtools/tests/mdb_num_fields.phpt:1.2 --- pecl/mdbtools/tests/mdb_num_fields.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_num_fields.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_num_fields() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_num_fields() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_num_fields() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_num_rows.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_num_rows.phpt diff -u pecl/mdbtools/tests/mdb_num_rows.phpt:1.1 pecl/mdbtools/tests/mdb_num_rows.phpt:1.2 --- pecl/mdbtools/tests/mdb_num_rows.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_num_rows.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_num_rows() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_num_rows() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_num_rows() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_open.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_open.phpt diff -u pecl/mdbtools/tests/mdb_open.phpt:1.1 pecl/mdbtools/tests/mdb_open.phpt:1.2 --- pecl/mdbtools/tests/mdb_open.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_open.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,15 @@ --TEST-- mdb_open() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_open() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo "hallo"; + ?> --EXPECT-- -no test case for mdb_open() yet \ No newline at end of file +hallo http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_table_close.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_table_close.phpt diff -u pecl/mdbtools/tests/mdb_table_close.phpt:1.1 pecl/mdbtools/tests/mdb_table_close.phpt:1.2 --- pecl/mdbtools/tests/mdb_table_close.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_table_close.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_table_close() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_table_close() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_table_close() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_table_fields.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_table_fields.phpt diff -u pecl/mdbtools/tests/mdb_table_fields.phpt:1.1 pecl/mdbtools/tests/mdb_table_fields.phpt:1.2 --- pecl/mdbtools/tests/mdb_table_fields.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_table_fields.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_table_fields() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_table_fields() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_table_fields() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_table_open.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_table_open.phpt diff -u pecl/mdbtools/tests/mdb_table_open.phpt:1.1 pecl/mdbtools/tests/mdb_table_open.phpt:1.2 --- pecl/mdbtools/tests/mdb_table_open.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_table_open.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_table_open() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_table_open() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_table_open() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_tables.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_tables.phpt diff -u pecl/mdbtools/tests/mdb_tables.phpt:1.1 pecl/mdbtools/tests/mdb_tables.phpt:1.2 --- pecl/mdbtools/tests/mdb_tables.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_tables.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_tables() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_tables() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_tables() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_type_name.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_type_name.phpt diff -u pecl/mdbtools/tests/mdb_type_name.phpt:1.1 pecl/mdbtools/tests/mdb_type_name.phpt:1.2 --- pecl/mdbtools/tests/mdb_type_name.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_type_name.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_type_name() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_type_name() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_type_name() yet \ No newline at end of file +OK \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pecl/mdbtools/tests/mdb_version.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/mdbtools/tests/mdb_version.phpt diff -u pecl/mdbtools/tests/mdb_version.phpt:1.1 pecl/mdbtools/tests/mdb_version.phpt:1.2 --- pecl/mdbtools/tests/mdb_version.phpt:1.1 Tue Mar 30 20:31:38 2004 +++ pecl/mdbtools/tests/mdb_version.phpt Mon Feb 20 17:43:10 2006 @@ -1,12 +1,14 @@ --TEST-- mdb_version() function --SKIPIF-- -<?php if (!extension_loaded('mdbtools')) print 'skip'; ?> ---POST-- ---GET-- ---FILE-- <?php - echo 'no test case for mdb_version() yet'; + +if(!extension_loaded('mdbtools')) die('skip'); + + ?> +--FILE-- +<?php +echo 'OK'; // no test case for this function yet ?> --EXPECT-- -no test case for mdb_version() yet \ No newline at end of file +OK \ No newline at end of file