]> granicus.if.org Git - php/commitdiff
Folding markers
authorArd Biesheuvel <abies@php.net>
Sat, 12 Jun 2004 17:09:33 +0000 (17:09 +0000)
committerArd Biesheuvel <abies@php.net>
Sat, 12 Jun 2004 17:09:33 +0000 (17:09 +0000)
ext/pdo_firebird/firebird_driver.c
ext/pdo_firebird/firebird_statement.c
ext/pdo_firebird/pdo_firebird.c

index 8b8ad371d3b7274d24f16b01cea05851bbf350f8..c9a6c8e975cb7af811ed110f20dd9df37e917ff9 100644 (file)
@@ -31,7 +31,7 @@
 #include "php_pdo_firebird_int.h"
 
 /* map driver specific error message to PDO error */
-void _firebird_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, char const *file, long line TSRMLS_DC)
+void _firebird_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, char const *file, long line TSRMLS_DC) /* {{{ */
 {
        pdo_firebird_db_handle *H = stmt ? ((pdo_firebird_stmt *)stmt->driver_data)->H 
                : (pdo_firebird_db_handle *)dbh->driver_data;
@@ -78,11 +78,12 @@ void _firebird_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, char const *file, long li
                        break;
        }
 }
+/* }}} */
 
 #define RECORD_ERROR(dbh) _firebird_error(dbh, NULL, __FILE__, __LINE__ TSRMLS_CC)
 
 /* called by PDO to close a db handle */
-static int firebird_handle_closer(pdo_dbh_t *dbh TSRMLS_DC)
+static int firebird_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */
 {
        pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;
        
@@ -106,10 +107,11 @@ static int firebird_handle_closer(pdo_dbh_t *dbh TSRMLS_DC)
 
        return 0;
 }
+/* }}} */
 
 /* called by PDO to prepare an SQL query */
-static int firebird_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, pdo_stmt_t *stmt,
-       long options, zval *driver_options TSRMLS_DC)
+static int firebird_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, /* {{{ */
+       pdo_stmt_t *stmt, long options, zval *driver_options TSRMLS_DC)
 {
        pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;
        pdo_firebird_stmt *S = NULL;
@@ -187,9 +189,10 @@ static int firebird_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_le
        
        return 0;
 }
+/* }}} */
 
 /* called by PDO to execute a statement that doesn't produce a result */
-static long firebird_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRMLS_DC)
+static long firebird_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRMLS_DC) /* {{{ */
 {
        pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;
        isc_stmt_handle stmt = NULL;
@@ -262,9 +265,10 @@ static long firebird_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len T
 
        return ret;
 }
+/* }}} */
 
 /* called by the PDO SQL parser to add quotes to values that are copied into SQL */
-static int firebird_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquotedlen,
+static int firebird_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquotedlen, /* {{{ */
        char **quoted, int *quotedlen TSRMLS_DC)
 {
        pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;
@@ -302,9 +306,10 @@ static int firebird_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unqu
                return 1;
        }                       
 }
+/* }}} */
 
 /* called by PDO to start a transaction */
-static int firebird_handle_begin(pdo_dbh_t *dbh TSRMLS_DC)
+static int firebird_handle_begin(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */
 {
        pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;
 
@@ -314,9 +319,10 @@ static int firebird_handle_begin(pdo_dbh_t *dbh TSRMLS_DC)
        }
        return 1;
 }
+/* }}} */
 
 /* called by PDO to commit a transaction */
-static int firebird_handle_commit(pdo_dbh_t *dbh TSRMLS_DC)
+static int firebird_handle_commit(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */
 {
        pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;
 
@@ -326,9 +332,10 @@ static int firebird_handle_commit(pdo_dbh_t *dbh TSRMLS_DC)
        }
        return 1;
 }
+/* }}} */
 
 /* called by PDO to rollback a transaction */
-static int firebird_handle_rollback(pdo_dbh_t *dbh TSRMLS_DC)
+static int firebird_handle_rollback(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */
 {
        pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;
 
@@ -338,9 +345,10 @@ static int firebird_handle_rollback(pdo_dbh_t *dbh TSRMLS_DC)
        }
        return 1;
 }
+/* }}} */
 
 /* called by PDO to set a driver-specific dbh attribute */
-static int firebird_handle_set_attribute(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC)
+static int firebird_handle_set_attribute(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC) /* {{{ */
 {
        pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;
 
@@ -372,15 +380,17 @@ static int firebird_handle_set_attribute(pdo_dbh_t *dbh, long attr, zval *val TS
        }
        return 0;
 }
+/* }}} */
 
 /* called by PDO to get a driver-specific dbh attribute */
-static int firebird_handle_get_attribute(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC)
+static int firebird_handle_get_attribute(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC) /* {{{ */
 {
        return 0;
 }
+/* }}} */
 
 /* called by PDO to retrieve driver-specific information about an error that has occurred */
-static int pdo_firebird_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info TSRMLS_DC)
+static int pdo_firebird_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info TSRMLS_DC) /* {{{ */
 {
        pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;
        ISC_STATUS *s = H->isc_status;
@@ -401,8 +411,9 @@ static int pdo_firebird_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval
        }
        return 1;
 }
+/* }}} */
 
-static struct pdo_dbh_methods firebird_methods = {
+static struct pdo_dbh_methods firebird_methods = { /* {{{ */
        firebird_handle_closer,
        firebird_handle_preparer,
        firebird_handle_doer,
@@ -415,6 +426,7 @@ static struct pdo_dbh_methods firebird_methods = {
        pdo_firebird_fetch_error_func,
        firebird_handle_get_attribute,
 };
+/* }}} */
 
 /* the driver-specific PDO handle constructor */
 static int pdo_firebird_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_DC) /* {{{ */
@@ -475,10 +487,11 @@ static int pdo_firebird_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRM
 }
 /* }}} */
 
-pdo_driver_t pdo_firebird_driver = {
+pdo_driver_t pdo_firebird_driver = { /* {{{ */
        PDO_DRIVER_HEADER(firebird),
        pdo_firebird_handle_factory
 };
+/* }}} */
 
 /*
  * Local variables:
index eca73de00bc7ced76408d844b39b3f3bcd2570a2..4b7b3eb3545a6a15896162538a7bd8eaf54d364f 100644 (file)
@@ -35,7 +35,7 @@
 #define RECORD_ERROR(stmt) _firebird_error(NULL, stmt,  __FILE__, __LINE__ TSRMLS_CC)
 
 /* free the allocated space for passing field values to the db and back */
-static void free_sqlda(XSQLDA const *sqlda)
+static void free_sqlda(XSQLDA const *sqlda) /* {{{ */
 {
        int i;
        
@@ -47,9 +47,10 @@ static void free_sqlda(XSQLDA const *sqlda)
                }
        }
 }
+/* }}} */
        
 /* called by PDO to clean up a statement handle */
-static int firebird_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC)
+static int firebird_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
 {
        pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
        int i;
@@ -73,9 +74,10 @@ static int firebird_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC)
        
        return 1;
 }
+/* }}} */
 
 /* called by PDO to execute a prepared query */
-static int firebird_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC)
+static int firebird_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
 {
        pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
        pdo_firebird_db_handle *H = S->H;
@@ -111,9 +113,10 @@ static int firebird_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC)
 
        return 0;
 }
+/* }}} */
 
 /* called by PDO to fetch the next row from a statement */
-static int firebird_stmt_fetch(pdo_stmt_t *stmt TSRMLS_DC)
+static int firebird_stmt_fetch(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
 {
        pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
        pdo_firebird_db_handle *H = S->H;
@@ -140,9 +143,10 @@ static int firebird_stmt_fetch(pdo_stmt_t *stmt TSRMLS_DC)
        }
        return 0;
 }
+/* }}} */
 
 /* called by PDO to retrieve information about the fields being returned */
-static int firebird_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC)
+static int firebird_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC) /* {{{ */
 {
        pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
        struct pdo_column_data *col = &stmt->columns[colno];
@@ -161,7 +165,7 @@ static int firebird_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC)
 }
 
 /* internal function to override return types of parameters */
-static void set_param_type(enum pdo_param_type *param_type, XSQLVAR const *var)
+static void set_param_type(enum pdo_param_type *param_type, XSQLVAR const *var) /* {{{ */
 {
        /* set the param type after the field type */
        switch (var->sqltype & ~1) {
@@ -189,11 +193,13 @@ static void set_param_type(enum pdo_param_type *param_type, XSQLVAR const *var)
                        break;
        }
 }
+/* }}} */
 
 #define FETCH_BUF(buf,type,len) ((buf) = (buf) ? (buf) : \
        emalloc((len) ? (len * sizeof(type)) : ((len) = sizeof(type))))
 
-static int firebird_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsigned long *len TSRMLS_DC)
+static int firebird_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr,  /* {{{ */
+       unsigned long *len TSRMLS_DC)
 {
        pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
        XSQLVAR const *var = &S->out_sqlda.sqlvar[colno];
@@ -304,8 +310,9 @@ static int firebird_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsign
        }
        return 1;
 }
+/* }}} */
 
-static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param,
+static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, /* {{{ */
        enum pdo_param_event event_type TSRMLS_DC)
 {
        pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
@@ -417,8 +424,9 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat
        }               
        return 1;
 }
+/* }}} */
 
-static int firebird_stmt_set_attribute(pdo_stmt_t *stmt, long attr, zval *val TSRMLS_DC)
+static int firebird_stmt_set_attribute(pdo_stmt_t *stmt, long attr, zval *val TSRMLS_DC) /* {{{ */
 {
        pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
        
@@ -438,6 +446,7 @@ static int firebird_stmt_set_attribute(pdo_stmt_t *stmt, long attr, zval *val TS
        }
        return 1;
 }
+/* }}} */
 
 static int firebird_stmt_get_attribute(pdo_stmt_t *stmt, long attr, zval *val TSRMLS_DC)
 {
@@ -456,6 +465,7 @@ static int firebird_stmt_get_attribute(pdo_stmt_t *stmt, long attr, zval *val TS
        }
        return 1;
 }
+/* }}} */
 
 struct pdo_stmt_methods firebird_stmt_methods = {
        firebird_stmt_dtor,
@@ -467,6 +477,7 @@ struct pdo_stmt_methods firebird_stmt_methods = {
        firebird_stmt_set_attribute,
        firebird_stmt_get_attribute
 };
+/* }}} */
 
 /*
  * Local variables:
index bdb946f108178d5f10b157b93d6734b15ef3b4a0..4e635469428f59c9558e166f99e88b52f7778620 100644 (file)
 #include "php_pdo_firebird.h"
 #include "php_pdo_firebird_int.h"
 
-/* {{{ pdo_firebird_functions[] */
-function_entry pdo_firebird_functions[] = {
+function_entry pdo_firebird_functions[] = { /* {{{ */
        {NULL, NULL, NULL}
 };
 /* }}} */
 
-/* {{{ pdo_firebird_module_entry */
-zend_module_entry pdo_firebird_module_entry = {
+zend_module_entry pdo_firebird_module_entry = { /* {{{ */
        STANDARD_MODULE_HEADER,
        "PDO_Firebird",
        pdo_firebird_functions,
@@ -55,9 +53,7 @@ zend_module_entry pdo_firebird_module_entry = {
 ZEND_GET_MODULE(pdo_firebird)
 #endif
 
-/* {{{ PHP_MINIT_FUNCTION
- */
-PHP_MINIT_FUNCTION(pdo_firebird)
+PHP_MINIT_FUNCTION(pdo_firebird) /* {{{ */
 {
        php_pdo_register_driver(&pdo_firebird_driver);
 
@@ -65,9 +61,7 @@ PHP_MINIT_FUNCTION(pdo_firebird)
 }
 /* }}} */
 
-/* {{{ PHP_MSHUTDOWN_FUNCTION
- */
-PHP_MSHUTDOWN_FUNCTION(pdo_firebird)
+PHP_MSHUTDOWN_FUNCTION(pdo_firebird) /* {{{ */
 {
        php_pdo_unregister_driver(&pdo_firebird_driver);
 
@@ -75,9 +69,7 @@ PHP_MSHUTDOWN_FUNCTION(pdo_firebird)
 }
 /* }}} */
 
-/* {{{ PHP_MINFO_FUNCTION
- */
-PHP_MINFO_FUNCTION(pdo_firebird)
+PHP_MINFO_FUNCTION(pdo_firebird) /* {{{ */
 {
        php_info_print_table_start();
        php_info_print_table_header(2, "PDO Driver for Firebird/InterBase", "enabled");