diff options
author | Sascha Schumann <sas@php.net> | 1999-12-04 19:19:57 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 1999-12-04 19:19:57 +0000 |
commit | 5b983c944f66b55192c901ce3fa38fcce6ca21e3 (patch) | |
tree | 89c7d57484170f274eba416495d88e02be541e6f /ext/sybase/php_sybase.h | |
parent | 83ce7c13d1a7f21b4bd7dd0b5ce4f4d6764d7e52 (diff) | |
download | php-git-5b983c944f66b55192c901ce3fa38fcce6ca21e3.tar.gz |
Clean up php3.*\.h files. The files itself are renamed, and references in all
.*\.[ch] files were changed. There is a slight chance that my script missed
a few changes, please correct them manually.
Diffstat (limited to 'ext/sybase/php_sybase.h')
-rw-r--r-- | ext/sybase/php_sybase.h | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/ext/sybase/php_sybase.h b/ext/sybase/php_sybase.h new file mode 100644 index 0000000000..1ce140d324 --- /dev/null +++ b/ext/sybase/php_sybase.h @@ -0,0 +1,143 @@ +/* + +----------------------------------------------------------------------+ + | PHP HTML Embedded Scripting Language Version 3.0 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997,1998 PHP Development Team (See Credits file) | + +----------------------------------------------------------------------+ + | This program is free software; you can redistribute it and/or modify | + | it under the terms of one of the following licenses: | + | | + | A) the GNU General Public License as published by the Free Software | + | Foundation; either version 2 of the License, or (at your option) | + | any later version. | + | | + | B) the PHP License as published by the PHP Development Team and | + | included in the distribution in the file: LICENSE | + | | + | This program is distributed in the hope that it will be useful, | + | but WITHOUT ANY WARRANTY; without even the implied warranty of | + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | + | GNU General Public License for more details. | + | | + | You should have received a copy of both licenses referred to here. | + | If you did not, or have any questions about PHP licensing, please | + | contact core@php.net. | + +----------------------------------------------------------------------+ + | Authors: Zeev Suraski <zeev@zend.com> | + +----------------------------------------------------------------------+ + */ + + +/* $Id$ */ + +#ifndef _PHP_SYBASE_H +#define _PHP_SYBASE_H + +#if COMPILE_DL +#undef HAVE_SYBASE +#define HAVE_SYBASE 1 +#endif + +#if HAVE_SYBASE + +extern php3_module_entry sybase_module_entry; +#define sybase_module_ptr &sybase_module_entry + +extern int php3_minit_sybase(INIT_FUNC_ARGS); +extern int php3_rinit_sybase(INIT_FUNC_ARGS); +extern int php3_mshutdown_sybase(SHUTDOWN_FUNC_ARGS); +extern int php3_rshutdown_sybase(SHUTDOWN_FUNC_ARGS); +void php3_info_sybase(ZEND_MODULE_INFO_FUNC_ARGS); +PHP_FUNCTION(sybase_connect); +PHP_FUNCTION(sybase_pconnect); +PHP_FUNCTION(sybase_close); +PHP_FUNCTION(sybase_select_db); +PHP_FUNCTION(sybase_query); +PHP_FUNCTION(sybase_free_result); +PHP_FUNCTION(sybase_get_last_message); +PHP_FUNCTION(sybase_num_rows); +PHP_FUNCTION(sybase_num_fields); +PHP_FUNCTION(sybase_fetch_row); +PHP_FUNCTION(sybase_fetch_array); +PHP_FUNCTION(sybase_fetch_object); +PHP_FUNCTION(sybase_data_seek); +PHP_FUNCTION(sybase_result); +PHP_FUNCTION(sybase_field_seek); +PHP_FUNCTION(sybase_min_error_severity); +PHP_FUNCTION(sybase_min_message_severity); + +PHP_FUNCTION(sybase_db_query); +PHP_FUNCTION(sybase_list_fields); +PHP_FUNCTION(sybase_fetch_lengths); +PHP_FUNCTION(sybase_fetch_field); +PHP_FUNCTION(sybase_field_seek); +PHP_FUNCTION(sybase_free_result); +PHP_FUNCTION(sybase_field_name); +PHP_FUNCTION(sybase_field_table); +PHP_FUNCTION(sybase_field_len); +PHP_FUNCTION(sybase_field_type); +PHP_FUNCTION(sybase_field_flags); + + + +#include <sybfront.h> +#include <sybdb.h> +#include <syberror.h> + +#define coltype(j) dbcoltype(sybase_ptr->link,j) +#define intcol(i) ((int) *(DBINT *) dbdata(sybase_ptr->link,i)) +#define smallintcol(i) ((int) *(DBSMALLINT *) dbdata(sybase_ptr->link,i)) +#define tinyintcol(i) ((int) *(DBTINYINT *) dbdata(sybase_ptr->link,i)) +#define anyintcol(j) (coltype(j)==SYBINT4?intcol(j):(coltype(j)==SYBINT2?smallintcol(j):tinyintcol(j))) +#define charcol(i) ((DBCHAR *) dbdata(sybase_ptr->link,i)) +#define floatcol(i) ((float) *(DBFLT8 *) dbdata(sybase_ptr->link,i)) + +typedef struct sybase_link_struct sybase_link; + +typedef struct { + long default_link; + long num_links,num_persistent; + long max_links,max_persistent; + long allow_persistent; + char *appname; + char *server_message; + int le_link,le_plink,le_result; + long min_error_severity,min_message_severity; + long cfg_min_error_severity,cfg_min_message_severity; + long compatability_mode; +} sybase_module; + +struct sybase_link_struct { + LOGINREC *login; + DBPROCESS *link; + int valid; +}; + +#define SYBASE_ROWS_BLOCK 128 + +typedef struct { + char *name,*column_source; + int max_length, numeric; + int type; +} sybase_field; + +typedef struct { + pval **data; + sybase_field *fields; + sybase_link *sybase_ptr; + int cur_row,cur_field; + int num_rows,num_fields; +} sybase_result; + + +extern sybase_module php3_sybase_module; + +#else + +#define sybase_module_ptr NULL + +#endif + +#define phpext_sybase_ptr sybase_module_ptr + +#endif /* _PHP_SYBASE_H */ |