/PHP-5.5/ext/dba/libflatfile/ |
H A D | flatfile.c | 57 php_stream_flush(dba->fp); in flatfile_store() 62 php_stream_flush(dba->fp); in flatfile_store() 69 php_stream_flush(dba->fp); in flatfile_store() 79 php_stream_flush(dba->fp); in flatfile_store() 114 php_stream_rewind(dba->fp); in flatfile_delete() 133 php_stream_flush(dba->fp); in flatfile_delete() 166 php_stream_rewind(dba->fp); in flatfile_findkey() 207 php_stream_rewind(dba->fp); in flatfile_firstkey() 220 dba->CurrentFlatFilePos = php_stream_tell(dba->fp); in flatfile_firstkey() 250 php_stream_seek(dba->fp, dba->CurrentFlatFilePos, SEEK_SET); in flatfile_nextkey() [all …]
|
H A D | flatfile.h | 40 int flatfile_store(flatfile *dba, datum key_datum, datum value_datum, int mode TSRMLS_DC); 41 datum flatfile_fetch(flatfile *dba, datum key_datum TSRMLS_DC); 42 int flatfile_delete(flatfile *dba, datum key_datum TSRMLS_DC); 43 int flatfile_findkey(flatfile *dba, datum key_datum TSRMLS_DC); 44 datum flatfile_firstkey(flatfile *dba TSRMLS_DC); 45 datum flatfile_nextkey(flatfile *dba TSRMLS_DC);
|
/PHP-5.5/ext/dba/libinifile/ |
H A D | inifile.c | 84 inifile *dba; in inifile_alloc() local 95 dba->fp = fp; in inifile_alloc() 97 return dba; in inifile_alloc() 104 if (dba) { in inifile_free() 250 …if (skip == -1 && dba->next.key.group && dba->next.key.name && !inifile_key_cmp(&dba->next.key, ke… in inifile_fetch() 252 php_stream_seek(dba->fp, dba->next.pos, SEEK_SET); in inifile_fetch() 268 dba->next = ln; in inifile_fetch() 269 dba->next.pos = php_stream_tell(dba->fp); in inifile_fetch() 281 dba->next.pos = php_stream_tell(dba->fp); in inifile_fetch() 301 php_stream_seek(dba->fp, dba->curr.pos, SEEK_SET); in inifile_nextkey() [all …]
|
H A D | inifile.h | 48 val_type inifile_fetch(inifile *dba, const key_type *key, int skip TSRMLS_DC); 49 int inifile_firstkey(inifile *dba TSRMLS_DC); 50 int inifile_nextkey(inifile *dba TSRMLS_DC); 51 int inifile_delete(inifile *dba, const key_type *key TSRMLS_DC); 52 int inifile_replace(inifile *dba, const key_type *key, const val_type *val TSRMLS_DC); 53 int inifile_append(inifile *dba, const key_type *key, const val_type *val TSRMLS_DC); 64 void inifile_free(inifile *dba, int persistent);
|
/PHP-5.5/ext/dba/ |
H A D | dba_flatfile.c | 56 if (dba->nextkey.dptr) { in DBA_CLOSE_FUNC() 57 efree(dba->nextkey.dptr); in DBA_CLOSE_FUNC() 129 if (dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC() 132 dba->nextkey = flatfile_firstkey(dba TSRMLS_CC); in DBA_FIRSTKEY_FUNC() 133 if (dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC() 137 return estrndup(dba->nextkey.dptr, dba->nextkey.dsize); in DBA_FIRSTKEY_FUNC() 146 if (!dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC() 150 if (dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC() 153 dba->nextkey = flatfile_nextkey(dba TSRMLS_CC); in DBA_NEXTKEY_FUNC() 154 if (dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC() [all …]
|
H A D | dba_db2.c | 93 if (dba->cursor) in DBA_CLOSE_FUNC() 94 dba->cursor->c_close(dba->cursor); in DBA_CLOSE_FUNC() 95 dba->dbp->close(dba->dbp, 0); in DBA_CLOSE_FUNC() 105 if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { in DBA_FETCH_FUNC() 122 if (dba->dbp->put(dba->dbp, NULL, &gkey, &gval, in DBA_UPDATE_FUNC() 135 if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { in DBA_EXISTS_FUNC() 154 dba->cursor->c_close(dba->cursor); 159 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0)) { 161 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor)) { 175 if (dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT) [all …]
|
H A D | dba_db3.c | 118 if (dba->cursor) dba->cursor->c_close(dba->cursor); in DBA_CLOSE_FUNC() 119 dba->dbp->close(dba->dbp, 0); in DBA_CLOSE_FUNC() 131 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { in DBA_FETCH_FUNC() 148 if (!dba->dbp->put(dba->dbp, NULL, &gkey, &gval, in DBA_UPDATE_FUNC() 162 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { in DBA_EXISTS_FUNC() 173 return dba->dbp->del(dba->dbp, NULL, &gkey, 0) ? FAILURE : SUCCESS; in DBA_DELETE_FUNC() 180 if (dba->cursor) { in DBA_FIRSTKEY_FUNC() 181 dba->cursor->c_close(dba->cursor); in DBA_FIRSTKEY_FUNC() 185 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0) != 0) { in DBA_FIRSTKEY_FUNC() 202 if (dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT) == 0) { in DBA_NEXTKEY_FUNC() [all …]
|
H A D | dba_gdbm.c | 77 if(dba->nextkey.dptr) free(dba->nextkey.dptr); in DBA_CLOSE_FUNC() 78 gdbm_close(dba->dbf); in DBA_CLOSE_FUNC() 143 if(dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC() 144 free(dba->nextkey.dptr); in DBA_FIRSTKEY_FUNC() 151 dba->nextkey = gkey; in DBA_FIRSTKEY_FUNC() 153 dba->nextkey.dptr = NULL; in DBA_FIRSTKEY_FUNC() 166 gkey = gdbm_nextkey(dba->dbf, dba->nextkey); in DBA_NEXTKEY_FUNC() 167 free(dba->nextkey.dptr); in DBA_NEXTKEY_FUNC() 171 dba->nextkey = gkey; in DBA_NEXTKEY_FUNC() 173 dba->nextkey.dptr = NULL; in DBA_NEXTKEY_FUNC() [all …]
|
H A D | dba_db1.c | 47 dba_db1_data *dba; in DBA_OPEN_FUNC() local 82 dba = pemalloc(sizeof(*dba), info->flags&DBA_PERSISTENT); in DBA_OPEN_FUNC() 83 dba->dbp = db; in DBA_OPEN_FUNC() 85 info->dbf = dba; in DBA_OPEN_FUNC() 93 dba->dbp->close(dba->dbp); in DBA_CLOSE_FUNC() 104 if (dba->dbp->get(dba->dbp, &gkey, &gval, 0) == RET_SUCCESS) { in DBA_FETCH_FUNC() 120 …return dba->dbp->put(dba->dbp, &gkey, &gval, mode == 1 ? R_NOOVERWRITE : 0) != RET_SUCCESS ? FAILU… in DBA_UPDATE_FUNC() 129 return dba->dbp->get(dba->dbp, &gkey, &gval, 0) != RET_SUCCESS ? FAILURE : SUCCESS; in DBA_EXISTS_FUNC() 137 return dba->dbp->del(dba->dbp, &gkey, 0) != RET_SUCCESS ? FAILURE : SUCCESS; in DBA_DELETE_FUNC() 149 if (dba->dbp->seq(dba->dbp, &gkey, &gval, R_FIRST) == RET_SUCCESS) { in DBA_FIRSTKEY_FUNC() [all …]
|
H A D | config.w32 | 4 ARG_WITH("dba", "DBA support", "no"); 7 if (CHECK_LIB("libdb31s.lib", "dba", PHP_DBA) && 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"); 16 WARNING("dba not enabled; libraries and headers not found");
|
H A D | dba_db4.c | 156 if (dba->cursor) dba->cursor->c_close(dba->cursor); 157 dba->dbp->close(dba->dbp, 0); 172 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { 192 if (!dba->dbp->put(dba->dbp, NULL, &gkey, &gval, 211 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { 225 return dba->dbp->del(dba->dbp, NULL, &gkey, 0) ? FAILURE : SUCCESS; 232 if (dba->cursor) { 233 dba->cursor->c_close(dba->cursor); 237 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0) != 0) { 258 if (dba->cursor && dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT) == 0) { [all …]
|
H A D | dba_inifile.c | 40 inifile *dba = info->dbf 64 inifile_free(dba, info->flags&DBA_PERSISTENT); in DBA_CLOSE_FUNC() 74 ini_val = inifile_fetch(dba, &ini_key, skip TSRMLS_CC); in DBA_FETCH_FUNC() 91 res = inifile_append(dba, &ini_key, &ini_val TSRMLS_CC); in DBA_UPDATE_FUNC() 115 ini_val = inifile_fetch(dba, &ini_key, 0 TSRMLS_CC); in DBA_EXISTS_FUNC() 131 res = inifile_delete(dba, &ini_key TSRMLS_CC); in DBA_DELETE_FUNC() 141 if (inifile_firstkey(dba TSRMLS_CC)) { in DBA_FIRSTKEY_FUNC() 142 char *result = inifile_key_string(&dba->curr.key); in DBA_FIRSTKEY_FUNC() 154 if (!dba->curr.key.group && !dba->curr.key.name) { in DBA_NEXTKEY_FUNC() 158 if (inifile_nextkey(dba TSRMLS_CC)) { in DBA_NEXTKEY_FUNC() [all …]
|
H A D | dba_tcadb.c | 34 #define TCADB_DATA dba_tcadb_data *dba = info->dbf 85 tcadbclose(dba->tcadb); in DBA_CLOSE_FUNC() 86 pefree(dba, info->flags & DBA_PERSISTENT); in DBA_CLOSE_FUNC() 95 value = tcadbget(dba->tcadb, key, keylen, &value_size); in DBA_FETCH_FUNC() 114 if (tcadbvsiz(dba->tcadb, key, keylen) > -1) { in DBA_UPDATE_FUNC() 119 result = tcadbput(dba->tcadb, key, keylen, val, vallen); in DBA_UPDATE_FUNC() 135 value = tcadbget(dba->tcadb, key, keylen, &value_len); in DBA_EXISTS_FUNC() 157 tcadbiterinit(dba->tcadb); in DBA_FIRSTKEY_FUNC() 159 value = tcadbiternext(dba->tcadb, &value_size); in DBA_FIRSTKEY_FUNC() 177 value = tcadbiternext(dba->tcadb, &value_size); in DBA_NEXTKEY_FUNC() [all …]
|
H A D | dba_qdbm.c | 34 #define QDBM_DATA dba_qdbm_data *dba = info->dbf 76 dpclose(dba->dbf); in DBA_CLOSE_FUNC() 77 pefree(dba, info->flags & DBA_PERSISTENT); in DBA_CLOSE_FUNC() 86 value = dpget(dba->dbf, key, keylen, 0, -1, &value_size); in DBA_FETCH_FUNC() 116 value = dpget(dba->dbf, key, keylen, 0, -1, NULL); in DBA_EXISTS_FUNC() 129 return dpout(dba->dbf, key, keylen) ? SUCCESS : FAILURE; in DBA_DELETE_FUNC() 138 dpiterinit(dba->dbf); in DBA_FIRSTKEY_FUNC() 140 value = dpiternext(dba->dbf, &value_size); in DBA_FIRSTKEY_FUNC() 156 value = dpiternext(dba->dbf, &value_size); in DBA_NEXTKEY_FUNC() 170 dpoptimize(dba->dbf, 0); in DBA_OPTIMIZE_FUNC() [all …]
|
H A D | dba_dbm.c | 42 #define DBM_DATA dba_dbm_data *dba = info->dbf 158 dba->nextkey = gkey; in DBA_FIRSTKEY_FUNC() 160 dba->nextkey.dptr = NULL; in DBA_FIRSTKEY_FUNC() 170 if(!dba->nextkey.dptr) return NULL; in DBA_NEXTKEY_FUNC() 172 gkey = nextkey(dba->nextkey); in DBA_NEXTKEY_FUNC() 176 dba->nextkey = gkey; in DBA_NEXTKEY_FUNC() 178 dba->nextkey.dptr = NULL; in DBA_NEXTKEY_FUNC()
|
H A D | dba.dsp | 1 # Microsoft Developer Studio Project File - Name="dba" - Package Owner=<4> 7 CFG=dba - Win32 Debug_TS Berkeley DB3 11 !MESSAGE NMAKE /f "dba.mak". 16 !MESSAGE NMAKE /f "dba.mak" CFG="dba - Win32 Debug_TS Berkeley DB3" 20 !MESSAGE "dba - Win32 Release_TS Berkeley DB3" (based on "Win32 (x86) Dynamic-Link Library") 21 !MESSAGE "dba - Win32 Debug_TS Berkeley DB3" (based on "Win32 (x86) Dynamic-Link Library") 32 !IF "$(CFG)" == "dba - Win32 Release_TS Berkeley DB3" 59 !ELSEIF "$(CFG)" == "dba - Win32 Debug_TS Berkeley DB3" 90 # Name "dba - Win32 Release_TS Berkeley DB3" 91 # Name "dba - Win32 Debug_TS Berkeley DB3" [all …]
|
H A D | dba.c | 153 PHP_MINIT_FUNCTION(dba); 154 PHP_MSHUTDOWN_FUNCTION(dba); 155 PHP_MINFO_FUNCTION(dba); 176 PHP_MINIT(dba), 177 PHP_MSHUTDOWN(dba), 180 PHP_MINFO(dba), 182 PHP_MODULE_GLOBALS(dba), 183 PHP_GINIT(dba), 190 ZEND_GET_MODULE(dba) in ZEND_GET_MODULE() argument 504 PHP_MINIT_FUNCTION(dba) in PHP_MINIT_FUNCTION() argument [all …]
|
/PHP-5.5/ext/spl/examples/ |
H A D | dba_array.php | 33 $dba = new DbaArray($argv[1], $argv[2]); variable 34 if ($dba && $argc > 3) { 36 $dba[$argv[3]] = $argv[4]; 38 var_dump(array('Index' => $argv[3], 'Value' => $dba[$argv[3]])); 40 unset($dba);
|
/PHP-5.5/ext/dba/tests/ |
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 | skipif.inc | 2 if (!extension_loaded('dba')) die('skip dba extension not available');
|
H A D | dba011.phpt | 28 resource(%d) of type (dba) 38 resource(%d) of type (dba)
|
H A D | bug65708.phpt | 2 Bug #65708 (dba functions cast $key param to string in-place, bypassing copy on write)
|
H A D | bug36436.phpt | 33 resource(%d) of type (dba persistent)
|
/PHP-5.5/ext/pgsql/tests/ |
H A D | 80_bug14383.phpt | 5 require_once(dirname(__FILE__).'/../../dba/tests/skipif.inc'); 18 require_once(dirname(__FILE__).'/../../dba/tests/test.inc'); 19 require_once(dirname(__FILE__).'/../../dba/tests/dba_handler.inc');
|
/PHP-5.5/win32/ |
H A D | php_modules.dsw | 42 Project: "dba"=..\ext\dba\dba.dsp - Package Owner=<4>
|