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

/PHP_5_3/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_3/ext/dba/
H A Ddba.c152 PHP_MINIT_FUNCTION(dba); variable
153 PHP_MSHUTDOWN_FUNCTION(dba); variable
154 PHP_MINFO_FUNCTION(dba); variable
156 ZEND_BEGIN_MODULE_GLOBALS(dba)
159 ZEND_END_MODULE_GLOBALS(dba)
161 ZEND_DECLARE_MODULE_GLOBALS(dba)
169 static PHP_GINIT_FUNCTION(dba);
173 "dba",
175 PHP_MINIT(dba),
176 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)) {
109 gval = flatfile_fetch(dba, gkey TSRMLS_CC);
121 return(flatfile_delete(dba, gkey TSRMLS_CC) == -1 ? FAILURE : SUCCESS);
128 if (dba->nextkey.dptr) {
129 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 if(gdbm_store(dba->dbf, gkey, gval,
119 return gdbm_exists(dba->dbf, gkey) ? SUCCESS : FAILURE;
127 return gdbm_delete(dba->dbf, gkey) == -1 ? FAILURE : SUCCESS;
136 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);
116 ini_val = inifile_fetch(dba, &ini_key, 0 TSRMLS_CC);
132 res = inifile_delete(dba, &ini_key TSRMLS_CC);
142 if (inifile_firstkey(dba TSRMLS_CC)) {
143 char *result = inifile_key_string(&dba->curr.key);
155 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);
101 result = dpput(dba->dbf, key, keylen, val, vallen, mode == 1 ? DP_DKEEP : DP_DOVER);
114 value = dpget(dba->dbf, key, keylen, 0, -1, NULL);
127 return dpout(dba->dbf, key, keylen) ? SUCCESS : FAILURE;
136 dpiterinit(dba->dbf);
138 value = dpiternext(dba->dbf, &value_size);
154 value = dpiternext(dba
[all...]
/PHP_5_3/ext/dba/libflatfile/
H A Dflatfile.c51 int flatfile_store(flatfile *dba, datum key_datum, datum value_datum, int mode TSRMLS_DC) { argument
53 if (flatfile_findkey(dba, key_datum TSRMLS_CC)) {
56 php_stream_seek(dba->fp, 0L, SEEK_END);
57 php_stream_printf(dba->fp TSRMLS_CC, "%zu\n", key_datum.dsize);
58 php_stream_flush(dba->fp);
59 if (php_stream_write(dba->fp, key_datum.dptr, key_datum.dsize) < key_datum.dsize) {
62 php_stream_printf(dba->fp TSRMLS_CC, "%zu\n", value_datum.dsize);
63 php_stream_flush(dba->fp);
64 if (php_stream_write(dba->fp, value_datum.dptr, value_datum.dsize) < value_datum.dsize) {
68 flatfile_delete(dba, key_datu
87 flatfile_fetch(flatfile *dba, datum key_datum TSRMLS_DC) argument
107 flatfile_delete(flatfile *dba, datum key_datum TSRMLS_DC) argument
165 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_3/ext/dba/libinifile/
H A Dinifile.c85 inifile *dba; local
94 dba = pemalloc(sizeof(inifile), persistent);
95 memset(dba, 0, sizeof(inifile));
96 dba->fp = fp;
97 dba->readonly = readonly;
98 return dba;
103 void inifile_free(inifile *dba, int persistent) argument
105 if (dba) {
106 inifile_line_free(&dba->curr);
107 inifile_line_free(&dba
168 inifile_read(inifile *dba, line_type *ln TSRMLS_DC) argument
246 inifile_fetch(inifile *dba, const key_type *key, int skip TSRMLS_DC) argument
313 inifile_truncate(inifile *dba, size_t size TSRMLS_DC) argument
329 inifile_find_group(inifile *dba, const key_type *key, size_t *pos_grp_start TSRMLS_DC) argument
366 inifile_next_group(inifile *dba, const key_type *key, size_t *pos_grp_start TSRMLS_DC) argument
387 inifile_copy_to(inifile *dba, size_t pos_start, size_t pos_end, inifile **ini_copy TSRMLS_DC) argument
417 inifile_filter(inifile *dba, inifile *from, const key_type *key TSRMLS_DC) argument
462 inifile_delete_replace_append(inifile *dba, const key_type *key, const val_type *value, int append TSRMLS_DC) argument
565 inifile_delete(inifile *dba, const key_type *key TSRMLS_DC) argument
573 inifile_replace(inifile *dba, const key_type *key, const val_type *value TSRMLS_DC) argument
581 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 31 milliseconds