summaryrefslogtreecommitdiff
path: root/ext/dba
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2001-06-05 13:12:10 +0000
committerRasmus Lerdorf <rasmus@php.net>2001-06-05 13:12:10 +0000
commit25c3a3a39d7aebdce95825e6af2ad8c62905b7cc (patch)
tree4d8f1ff9644c880e3b7a63a361a0db2280d8058f /ext/dba
parent4efe6f7e6b53496fb1c4f6990b3ad0771bd9be67 (diff)
downloadphp-git-25c3a3a39d7aebdce95825e6af2ad8c62905b7cc.tar.gz
vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
Diffstat (limited to 'ext/dba')
-rw-r--r--ext/dba/dba.c37
-rw-r--r--ext/dba/dba_cdb.c8
-rw-r--r--ext/dba/dba_db2.c8
-rw-r--r--ext/dba/dba_db3.c8
-rw-r--r--ext/dba/dba_dbm.c8
-rw-r--r--ext/dba/dba_gdbm.c8
-rw-r--r--ext/dba/dba_ndbm.c8
7 files changed, 79 insertions, 6 deletions
diff --git a/ext/dba/dba.c b/ext/dba/dba.c
index 54f337177f..b72c9eae0f 100644
--- a/ext/dba/dba.c
+++ b/ext/dba/dba.c
@@ -47,6 +47,8 @@
#include "php_db2.h"
#include "php_db3.h"
+/* {{{ dba_functions[]
+ */
function_entry dba_functions[] = {
PHP_FE(dba_open, NULL)
PHP_FE(dba_popen, NULL)
@@ -62,6 +64,7 @@ function_entry dba_functions[] = {
PHP_FE(dba_sync, NULL)
{NULL,NULL,NULL}
};
+/* }}} */
static PHP_MINIT_FUNCTION(dba);
static PHP_MSHUTDOWN_FUNCTION(dba);
@@ -179,9 +182,8 @@ static int le_pdb;
static HashTable ht_keys;
/* }}} */
-/* {{{ helper routines */
- /* {{{ dba_close */
-
+/* {{{ dba_close
+ */
static void dba_close(dba_info *info)
{
if(info->hnd) info->hnd->close(info);
@@ -190,12 +192,17 @@ static void dba_close(dba_info *info)
}
/* }}} */
+/* {{{ dba_close_rsrc
+ */
static void dba_close_rsrc(zend_rsrc_list_entry *rsrc)
{
dba_info *info = (dba_info *)rsrc->ptr;
dba_close(info);
}
+/* }}} */
+/* {{{ PHP_MINIT_FUNCTION
+ */
static PHP_MINIT_FUNCTION(dba)
{
zend_hash_init(&ht_keys, 0, NULL, NULL, 1);
@@ -203,15 +210,21 @@ static PHP_MINIT_FUNCTION(dba)
GLOBAL(le_pdb) = zend_register_list_destructors_ex(NULL, dba_close_rsrc, "dba persistent", module_number);
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
static PHP_MSHUTDOWN_FUNCTION(dba)
{
zend_hash_destroy(&ht_keys);
return SUCCESS;
}
+/* }}} */
#include "ext/standard/php_smart_str.h"
+/* {{{ PHP_MINFO_FUNCTION
+ */
static PHP_MINFO_FUNCTION(dba)
{
dba_handler *hptr;
@@ -233,8 +246,10 @@ static PHP_MINFO_FUNCTION(dba)
}
php_info_print_table_end();
}
+/* }}} */
-
+/* {{{ php_dba_update
+ */
static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
{
DBA_ID_PARS;
@@ -253,9 +268,12 @@ static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
RETURN_TRUE;
RETURN_FALSE;
}
+/* }}} */
#define FREENOW if(args) efree(args); if(key) efree(key)
+/* {{{ php_dba_open
+ */
static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
{
pval ***args = (pval ***) NULL;
@@ -355,9 +373,8 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
FREENOW;
RETURN_LONG(listid);
}
-#undef FREENOW
-/* }}} */
/* }}} */
+#undef FREENOW
/* {{{ proto int dba_popen(string path, string mode, string handlername [, string ...])
Opens path using the specified handler in mode persistently */
@@ -501,3 +518,11 @@ PHP_FUNCTION(dba_sync)
/* }}} */
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/dba/dba_cdb.c b/ext/dba/dba_cdb.c
index ab54d12da6..f9edfae777 100644
--- a/ext/dba/dba_cdb.c
+++ b/ext/dba/dba_cdb.c
@@ -218,3 +218,11 @@ DBA_SYNC_FUNC(cdb)
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/dba/dba_db2.c b/ext/dba/dba_db2.c
index 2c6fcb8ace..7f0f23d47c 100644
--- a/ext/dba/dba_db2.c
+++ b/ext/dba/dba_db2.c
@@ -199,3 +199,11 @@ DBA_SYNC_FUNC(db2)
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/dba/dba_db3.c b/ext/dba/dba_db3.c
index e0832a86a0..60012ccc23 100644
--- a/ext/dba/dba_db3.c
+++ b/ext/dba/dba_db3.c
@@ -206,3 +206,11 @@ DBA_SYNC_FUNC(db3)
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c
index ede05a47ca..554c92e559 100644
--- a/ext/dba/dba_dbm.c
+++ b/ext/dba/dba_dbm.c
@@ -184,3 +184,11 @@ DBA_SYNC_FUNC(dbm)
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c
index 85666991bb..b4fd5bf1bb 100644
--- a/ext/dba/dba_gdbm.c
+++ b/ext/dba/dba_gdbm.c
@@ -187,3 +187,11 @@ DBA_SYNC_FUNC(gdbm)
return SUCCESS;
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/dba/dba_ndbm.c b/ext/dba/dba_ndbm.c
index 45652e3b54..4722ce91a4 100644
--- a/ext/dba/dba_ndbm.c
+++ b/ext/dba/dba_ndbm.c
@@ -164,3 +164,11 @@ DBA_SYNC_FUNC(ndbm)
return SUCCESS;
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */