Searched refs:dba (Results 1 - 16 of 16) sorted by relevance

/PHP_5_5/ext/spl/examples/
H A Ddba_array.php14 * Note: configure with --enable-dba
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/
H A Ddba.c153 PHP_MINIT_FUNCTION(dba); variable
154 PHP_MSHUTDOWN_FUNCTION(dba); variable
155 PHP_MINFO_FUNCTION(dba); variable
157 ZEND_BEGIN_MODULE_GLOBALS(dba)
160 ZEND_END_MODULE_GLOBALS(dba)
162 ZEND_DECLARE_MODULE_GLOBALS(dba)
170 static PHP_GINIT_FUNCTION(dba);
174 "dba",
176 PHP_MINIT(dba),
177 PHP_MSHUTDOWN(dba),
[all...]
H A Ddba_db1.c38 #define DB1_DATA dba_db1_data *dba = info->dbf
47 dba_db1_data *dba; local
82 dba = pemalloc(sizeof(*dba), info->flags&DBA_PERSISTENT);
83 dba->dbp = db;
85 info->dbf = dba;
93 dba->dbp->close(dba->dbp);
104 if (dba->dbp->get(dba
[all...]
H A Ddba_db2.c36 #define DB2_DATA dba_db2_data *dba = info->dbf
93 if (dba->cursor)
94 dba->cursor->c_close(dba->cursor);
95 dba->dbp->close(dba->dbp, 0);
96 pefree(dba, info->flags&DBA_PERSISTENT);
105 if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
122 if (dba
[all...]
H A Ddba_db3.c45 #define DB3_DATA dba_db3_data *dba = info->dbf
118 if (dba->cursor) dba->cursor->c_close(dba->cursor);
119 dba->dbp->close(dba->dbp, 0);
120 pefree(dba, info->flags&DBA_PERSISTENT);
131 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
148 if (!dba
[all...]
H A Ddba_db4.c63 #define DB4_DATA dba_db4_data *dba = info->dbf
156 if (dba->cursor) dba->cursor->c_close(dba->cursor);
157 dba->dbp->close(dba->dbp, 0);
158 pefree(dba, info->flags&DBA_PERSISTENT);
172 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
192 if (!dba
[all...]
H A Ddba_dbm.c42 #define DBM_DATA dba_dbm_data *dba = info->dbf
158 dba->nextkey = gkey;
160 dba->nextkey.dptr = NULL;
170 if(!dba->nextkey.dptr) return NULL;
172 gkey = nextkey(dba->nextkey);
176 dba->nextkey = gkey;
178 dba->nextkey.dptr = NULL;
H A Ddba_flatfile.c39 #define FLATFILE_DATA flatfile *dba = info->dbf
56 if (dba->nextkey.dptr) {
57 efree(dba->nextkey.dptr);
59 pefree(dba, info->flags&DBA_PERSISTENT);
70 gval = flatfile_fetch(dba, gkey TSRMLS_CC);
90 switch(flatfile_store(dba, gkey, gval, mode==1 ? FLATFILE_INSERT : FLATFILE_REPLACE TSRMLS_CC)) {
110 gval = flatfile_fetch(dba, gkey TSRMLS_CC);
122 return(flatfile_delete(dba, gkey TSRMLS_CC) == -1 ? FAILURE : SUCCESS);
129 if (dba->nextkey.dptr) {
130 efree(dba
[all...]
H A Ddba_gdbm.c34 #define GDBM_DATA dba_gdbm_data *dba = info->dbf
77 if(dba->nextkey.dptr) free(dba->nextkey.dptr);
78 gdbm_close(dba->dbf);
79 pefree(dba, info->flags&DBA_PERSISTENT);
89 gval = gdbm_fetch(dba->dbf, gkey);
107 switch (gdbm_store(dba->dbf, gkey, gval, mode == 1 ? GDBM_INSERT : GDBM_REPLACE)) {
126 return gdbm_exists(dba->dbf, gkey) ? SUCCESS : FAILURE;
134 return gdbm_delete(dba->dbf, gkey) == -1 ? FAILURE : SUCCESS;
143 if(dba
[all...]
H A Ddba_inifile.c40 inifile *dba = info->dbf
64 inifile_free(dba, info->flags&DBA_PERSISTENT);
74 ini_val = inifile_fetch(dba, &ini_key, skip TSRMLS_CC);
91 res = inifile_append(dba, &ini_key, &ini_val TSRMLS_CC);
93 res = inifile_replace(dba, &ini_key, &ini_val TSRMLS_CC);
115 ini_val = inifile_fetch(dba, &ini_key, 0 TSRMLS_CC);
131 res = inifile_delete(dba, &ini_key TSRMLS_CC);
141 if (inifile_firstkey(dba TSRMLS_CC)) {
142 char *result = inifile_key_string(&dba->curr.key);
154 if (!dba
[all...]
H A Ddba_qdbm.c34 #define QDBM_DATA dba_qdbm_data *dba = info->dbf
76 dpclose(dba->dbf);
77 pefree(dba, info->flags & DBA_PERSISTENT);
86 value = dpget(dba->dbf, key, keylen, 0, -1, &value_size);
100 if (dpput(dba->dbf, key, keylen, val, vallen, mode == 1 ? DP_DKEEP : DP_DOVER)) {
116 value = dpget(dba->dbf, key, keylen, 0, -1, NULL);
129 return dpout(dba->dbf, key, keylen) ? SUCCESS : FAILURE;
138 dpiterinit(dba->dbf);
140 value = dpiternext(dba->dbf, &value_size);
156 value = dpiternext(dba
[all...]
H A Ddba_tcadb.c34 #define TCADB_DATA dba_tcadb_data *dba = info->dbf
85 tcadbclose(dba->tcadb);
86 pefree(dba, info->flags & DBA_PERSISTENT);
95 value = tcadbget(dba->tcadb, key, keylen, &value_size);
114 if (tcadbvsiz(dba->tcadb, key, keylen) > -1) {
119 result = tcadbput(dba->tcadb, key, keylen, val, vallen);
135 value = tcadbget(dba->tcadb, key, keylen, &value_len);
148 return tcadbout(dba->tcadb, key, keylen) ? SUCCESS : FAILURE;
157 tcadbiterinit(dba->tcadb);
159 value = tcadbiternext(dba
[all...]
/PHP_5_5/ext/dba/libflatfile/
H A Dflatfile.c50 int flatfile_store(flatfile *dba, datum key_datum, datum value_datum, int mode TSRMLS_DC) { argument
52 if (flatfile_findkey(dba, key_datum TSRMLS_CC)) {
55 php_stream_seek(dba->fp, 0L, SEEK_END);
56 php_stream_printf(dba->fp TSRMLS_CC, "%zu\n", key_datum.dsize);
57 php_stream_flush(dba->fp);
58 if (php_stream_write(dba->fp, key_datum.dptr, key_datum.dsize) < key_datum.dsize) {
61 php_stream_printf(dba->fp TSRMLS_CC, "%zu\n", value_datum.dsize);
62 php_stream_flush(dba->fp);
63 if (php_stream_write(dba->fp, value_datum.dptr, value_datum.dsize) < value_datum.dsize) {
67 flatfile_delete(dba, key_datu
86 flatfile_fetch(flatfile *dba, datum key_datum TSRMLS_DC) argument
106 flatfile_delete(flatfile *dba, datum key_datum TSRMLS_DC) argument
164 flatfile_findkey(flatfile *dba, datum key_datum TSRMLS_DC) argument
[all...]
H A Dflatfile.h40 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 Dinifile.c84 inifile *dba; local
93 dba = pemalloc(sizeof(inifile), persistent);
94 memset(dba, 0, sizeof(inifile));
95 dba->fp = fp;
96 dba->readonly = readonly;
97 return dba;
102 void inifile_free(inifile *dba, int persistent) argument
104 if (dba) {
105 inifile_line_free(&dba->curr);
106 inifile_line_free(&dba
167 inifile_read(inifile *dba, line_type *ln TSRMLS_DC) argument
245 inifile_fetch(inifile *dba, const key_type *key, int skip TSRMLS_DC) argument
312 inifile_truncate(inifile *dba, size_t size TSRMLS_DC) argument
328 inifile_find_group(inifile *dba, const key_type *key, size_t *pos_grp_start TSRMLS_DC) argument
365 inifile_next_group(inifile *dba, const key_type *key, size_t *pos_grp_start TSRMLS_DC) argument
386 inifile_copy_to(inifile *dba, size_t pos_start, size_t pos_end, inifile **ini_copy TSRMLS_DC) argument
416 inifile_filter(inifile *dba, inifile *from, const key_type *key TSRMLS_DC) argument
461 inifile_delete_replace_append(inifile *dba, const key_type *key, const val_type *value, int append TSRMLS_DC) argument
564 inifile_delete(inifile *dba, const key_type *key TSRMLS_DC) argument
572 inifile_replace(inifile *dba, const key_type *key, const val_type *value TSRMLS_DC) argument
580 inifile_append(inifile *dba, const key_type *key, const val_type *value TSRMLS_DC) argument
[all...]
H A Dinifile.h48 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);

Completed in 9 milliseconds