/PHP-8.0/ext/dba/ |
H A D | dba.stub.php | 23 /** @param resource $dba */ 24 function dba_close($dba): void {} argument 28 * @param resource $dba 35 * @param resource $dba 41 /** @param resource $dba */ 44 /** @param resource $dba */ 49 * @param resource $dba 55 * @param resource $dba 61 * @param resource $dba 65 /** @param resource $dba */ [all …]
|
H A D | dba_flatfile.c | 52 if (dba->nextkey.dptr) { in DBA_CLOSE_FUNC() 53 efree(dba->nextkey.dptr); in DBA_CLOSE_FUNC() 125 if (dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC() 128 dba->nextkey = flatfile_firstkey(dba); in DBA_FIRSTKEY_FUNC() 129 if (dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC() 133 return estrndup(dba->nextkey.dptr, dba->nextkey.dsize); in DBA_FIRSTKEY_FUNC() 142 if (!dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC() 146 if (dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC() 149 dba->nextkey = flatfile_nextkey(dba); in DBA_NEXTKEY_FUNC() 150 if (dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC() [all …]
|
H A D | dba_db2.c | 88 if (dba->cursor) in DBA_CLOSE_FUNC() 89 dba->cursor->c_close(dba->cursor); in DBA_CLOSE_FUNC() 90 dba->dbp->close(dba->dbp, 0); in DBA_CLOSE_FUNC() 100 if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { in DBA_FETCH_FUNC() 117 if (dba->dbp->put(dba->dbp, NULL, &gkey, &gval, in DBA_UPDATE_FUNC() 130 if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { in DBA_EXISTS_FUNC() 149 dba->cursor->c_close(dba->cursor); 154 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0)) { 156 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor)) { 170 if (dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT) [all …]
|
H A D | dba_db1.c | 43 dba_db1_data *dba; in DBA_OPEN_FUNC() local 77 dba = pemalloc(sizeof(*dba), info->flags&DBA_PERSISTENT); in DBA_OPEN_FUNC() 78 dba->dbp = db; in DBA_OPEN_FUNC() 80 info->dbf = dba; in DBA_OPEN_FUNC() 88 dba->dbp->close(dba->dbp); in DBA_CLOSE_FUNC() 99 if (dba->dbp->get(dba->dbp, &gkey, &gval, 0) == RET_SUCCESS) { in DBA_FETCH_FUNC() 115 …return dba->dbp->put(dba->dbp, &gkey, &gval, mode == 1 ? R_NOOVERWRITE : 0) != RET_SUCCESS ? FAILU… in DBA_UPDATE_FUNC() 124 return dba->dbp->get(dba->dbp, &gkey, &gval, 0) != RET_SUCCESS ? FAILURE : SUCCESS; in DBA_EXISTS_FUNC() 132 return dba->dbp->del(dba->dbp, &gkey, 0) != RET_SUCCESS ? FAILURE : SUCCESS; in DBA_DELETE_FUNC() 144 if (dba->dbp->seq(dba->dbp, &gkey, &gval, R_FIRST) == RET_SUCCESS) { in DBA_FIRSTKEY_FUNC() [all …]
|
H A D | config.w32 | 3 ARG_WITH("dba", "DBA support", "no"); 9 …EXTENSION("dba", "dba.c dba_cdb.c dba_db1.c dba_db2.c dba_db3.c dba_dbm.c dba_flatfile.c dba_gdbm.… 10 ADD_SOURCES("ext/dba/libcdb", "cdb.c cdb_make.c uint32.c", "dba"); 11 ADD_SOURCES("ext/dba/libflatfile", "flatfile.c", "dba"); 12 ADD_SOURCES("ext/dba/libinifile", "inifile.c", "dba"); 17 if (CHECK_LIB("libdb31s.lib;libdb61.lib", "dba", PHP_DBA) && 26 if (CHECK_LIB("qdbm_a.lib;qdbm.lib", "dba", PHP_DBA) && 28 ADD_SOURCES("ext/dba", "dba_qdbm.c", "dba"); 37 if (CHECK_LIB("liblmdb_a.lib", "dba", PHP_DBA) && 39 CHECK_LIB("ntdll.lib", "dba", PHP_DBA)) { [all …]
|
H A D | dba_db3.c | 121 if (dba->cursor) dba->cursor->c_close(dba->cursor); 122 dba->dbp->close(dba->dbp, 0); 134 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { 151 if (!dba->dbp->put(dba->dbp, NULL, &gkey, &gval, 165 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { 176 return dba->dbp->del(dba->dbp, NULL, &gkey, 0) ? FAILURE : SUCCESS; 183 if (dba->cursor) { 184 dba->cursor->c_close(dba->cursor); 188 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0) != 0) { 205 if (dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT) == 0) { [all …]
|
H A D | dba_gdbm.c | 72 if(dba->nextkey.dptr) free(dba->nextkey.dptr); in DBA_CLOSE_FUNC() 73 gdbm_close(dba->dbf); in DBA_CLOSE_FUNC() 138 if(dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC() 139 free(dba->nextkey.dptr); in DBA_FIRSTKEY_FUNC() 146 dba->nextkey = gkey; in DBA_FIRSTKEY_FUNC() 148 dba->nextkey.dptr = NULL; in DBA_FIRSTKEY_FUNC() 161 gkey = gdbm_nextkey(dba->dbf, dba->nextkey); in DBA_NEXTKEY_FUNC() 162 free(dba->nextkey.dptr); in DBA_NEXTKEY_FUNC() 166 dba->nextkey = gkey; in DBA_NEXTKEY_FUNC() 168 dba->nextkey.dptr = NULL; in DBA_NEXTKEY_FUNC() [all …]
|
H A D | dba_inifile.c | 36 inifile *dba = info->dbf 60 inifile_free(dba, info->flags&DBA_PERSISTENT); in DBA_CLOSE_FUNC() 70 ini_val = inifile_fetch(dba, &ini_key, skip); in DBA_FETCH_FUNC() 87 res = inifile_append(dba, &ini_key, &ini_val); in DBA_UPDATE_FUNC() 89 res = inifile_replace(dba, &ini_key, &ini_val); in DBA_UPDATE_FUNC() 111 ini_val = inifile_fetch(dba, &ini_key, 0); in DBA_EXISTS_FUNC() 128 res = inifile_delete_ex(dba, &ini_key, &found); in DBA_DELETE_FUNC() 138 if (inifile_firstkey(dba)) { in DBA_FIRSTKEY_FUNC() 139 char *result = inifile_key_string(&dba->curr.key); in DBA_FIRSTKEY_FUNC() 151 if (!dba->curr.key.group && !dba->curr.key.name) { in DBA_NEXTKEY_FUNC() [all …]
|
H A D | dba_db4.c | 150 if (dba->cursor) dba->cursor->c_close(dba->cursor); 151 dba->dbp->close(dba->dbp, 0); 166 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { 186 if (!dba->dbp->put(dba->dbp, NULL, &gkey, &gval, 205 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { 219 return dba->dbp->del(dba->dbp, NULL, &gkey, 0) ? FAILURE : SUCCESS; 226 if (dba->cursor) { 227 dba->cursor->c_close(dba->cursor); 231 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0) != 0) { 252 if (dba->cursor && dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT) == 0) { [all …]
|
H A D | dba_tcadb.c | 30 #define TCADB_DATA dba_tcadb_data *dba = info->dbf 81 tcadbclose(dba->tcadb); in DBA_CLOSE_FUNC() 82 tcadbdel(dba->tcadb); in DBA_CLOSE_FUNC() 83 pefree(dba, info->flags & DBA_PERSISTENT); in DBA_CLOSE_FUNC() 92 value = tcadbget(dba->tcadb, key, keylen, &value_size); in DBA_FETCH_FUNC() 111 if (tcadbvsiz(dba->tcadb, key, keylen) > -1) { in DBA_UPDATE_FUNC() 132 value = tcadbget(dba->tcadb, key, keylen, &value_len); in DBA_EXISTS_FUNC() 154 tcadbiterinit(dba->tcadb); in DBA_FIRSTKEY_FUNC() 156 value = tcadbiternext(dba->tcadb, &value_size); in DBA_FIRSTKEY_FUNC() 174 value = tcadbiternext(dba->tcadb, &value_size); in DBA_NEXTKEY_FUNC() [all …]
|
H A D | dba_qdbm.c | 30 #define QDBM_DATA dba_qdbm_data *dba = info->dbf 72 dpclose(dba->dbf); in DBA_CLOSE_FUNC() 73 pefree(dba, info->flags & DBA_PERSISTENT); in DBA_CLOSE_FUNC() 82 value = dpget(dba->dbf, key, keylen, 0, -1, &value_size); in DBA_FETCH_FUNC() 112 value = dpget(dba->dbf, key, keylen, 0, -1, NULL); in DBA_EXISTS_FUNC() 125 return dpout(dba->dbf, key, keylen) ? SUCCESS : FAILURE; in DBA_DELETE_FUNC() 134 dpiterinit(dba->dbf); in DBA_FIRSTKEY_FUNC() 136 value = dpiternext(dba->dbf, &value_size); in DBA_FIRSTKEY_FUNC() 152 value = dpiternext(dba->dbf, &value_size); in DBA_NEXTKEY_FUNC() 166 dpoptimize(dba->dbf, 0); in DBA_OPTIMIZE_FUNC() [all …]
|
H A D | dba_arginfo.h | 14 ZEND_ARG_INFO(0, dba) 19 ZEND_ARG_INFO(0, dba) 25 ZEND_ARG_INFO(0, dba) 33 ZEND_ARG_INFO(0, dba) 43 ZEND_ARG_INFO(0, dba) 49 ZEND_ARG_INFO(0, dba)
|
H A D | dba_dbm.c | 38 #define DBM_DATA dba_dbm_data *dba = info->dbf 153 dba->nextkey = gkey; in DBA_FIRSTKEY_FUNC() 155 dba->nextkey.dptr = NULL; in DBA_FIRSTKEY_FUNC() 165 if(!dba->nextkey.dptr) return NULL; in DBA_NEXTKEY_FUNC() 167 gkey = nextkey(dba->nextkey); in DBA_NEXTKEY_FUNC() 171 dba->nextkey = gkey; in DBA_NEXTKEY_FUNC() 173 dba->nextkey.dptr = NULL; in DBA_NEXTKEY_FUNC()
|
/PHP-8.0/ext/dba/libflatfile/ |
H A D | flatfile.c | 54 php_stream_flush(dba->fp); in flatfile_store() 59 php_stream_flush(dba->fp); in flatfile_store() 66 php_stream_flush(dba->fp); in flatfile_store() 76 php_stream_flush(dba->fp); in flatfile_store() 109 php_stream_rewind(dba->fp); in flatfile_delete() 128 php_stream_flush(dba->fp); in flatfile_delete() 160 php_stream_rewind(dba->fp); in flatfile_findkey() 200 php_stream_rewind(dba->fp); in flatfile_firstkey() 213 dba->CurrentFlatFilePos = php_stream_tell(dba->fp); in flatfile_firstkey() 242 php_stream_seek(dba->fp, dba->CurrentFlatFilePos, SEEK_SET); in flatfile_nextkey() [all …]
|
H A D | flatfile.h | 36 int flatfile_store(flatfile *dba, datum key_datum, datum value_datum, int mode); 37 datum flatfile_fetch(flatfile *dba, datum key_datum); 38 int flatfile_delete(flatfile *dba, datum key_datum); 39 int flatfile_findkey(flatfile *dba, datum key_datum); 40 datum flatfile_firstkey(flatfile *dba); 41 datum flatfile_nextkey(flatfile *dba);
|
/PHP-8.0/ext/dba/libinifile/ |
H A D | inifile.c | 82 inifile *dba; in inifile_alloc() local 93 dba->fp = fp; in inifile_alloc() 95 return dba; in inifile_alloc() 102 if (dba) { in inifile_free() 246 …if (skip == -1 && dba->next.key.group && dba->next.key.name && !inifile_key_cmp(&dba->next.key, ke… in inifile_fetch() 248 php_stream_seek(dba->fp, dba->next.pos, SEEK_SET); in inifile_fetch() 265 dba->next = ln; in inifile_fetch() 266 dba->next.pos = php_stream_tell(dba->fp); in inifile_fetch() 278 dba->next.pos = php_stream_tell(dba->fp); in inifile_fetch() 296 php_stream_seek(dba->fp, dba->curr.pos, SEEK_SET); in inifile_nextkey() [all …]
|
H A D | inifile.h | 44 val_type inifile_fetch(inifile *dba, const key_type *key, int skip); 45 int inifile_firstkey(inifile *dba); 46 int inifile_nextkey(inifile *dba); 47 int inifile_delete(inifile *dba, const key_type *key); 48 int inifile_delete_ex(inifile *dba, const key_type *key, zend_bool *found); 49 int inifile_replace(inifile *dba, const key_type *key, const val_type *val); 50 int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *val, zend_bool *found); 51 int inifile_append(inifile *dba, const key_type *key, const val_type *val); 62 void inifile_free(inifile *dba, int persistent);
|
/PHP-8.0/ext/dba/tests/ |
H A D | bug62490.phpt | 13 $dba = dba_open($db_filename, "n", $handler) 17 var_dump(dba_insert("a", $i, $dba)); 21 var_dump(dba_exists("a", $dba)); 23 var_dump(dba_delete("a", $dba)); 25 var_dump(dba_exists("a", $dba)); 27 var_dump(dba_delete("a", $dba));
|
H A D | dba012.phpt | 2 DBA dba.default_handler tests 9 dba.default_handler=flatfile 18 ini_set('dba.default_handler', 'does_not_exist'); 24 ini_set('dba.default_handler', ''); 38 resource(%d) of type (dba)
|
H A D | bug71514.phpt | 5 if (!extension_loaded('dba')) die('skip dba extension not available');
|
H A D | skipif.inc | 2 if (!extension_loaded('dba')) die('skip dba extension not available');
|
H A D | CONFLICTS | 2 dba
|
H A D | dba011.phpt | 24 resource(%d) of type (dba) 34 resource(%d) of type (dba)
|
/PHP-8.0/ |
H A D | .gitattributes | 4 /ext/dba/libinifile/inifile.c ident 5 /ext/dba/libflatfile/flatfile.c ident 6 /ext/dba/libcdb/cdb_make.c ident 7 /ext/dba/libcdb/cdb.c ident
|
/PHP-8.0/ext/pgsql/tests/ |
H A D | 80_bug14383.phpt | 5 require_once(__DIR__.'/../../dba/tests/skipif.inc'); 18 require_once(__DIR__.'/../../dba/tests/test.inc'); 19 require_once(__DIR__.'/../../dba/tests/dba_handler.inc'); 24 require_once(__DIR__.'/../../dba/tests/clean.inc');
|