- added Oracle-OCI8 persistent connections
- fixed OCIDefineByName crash.
- fixed some NULL-column related problems in OCI8-module.
-- optimized fgets() and fread()
-- memory leak in operators.c fixed
-- Fixed the XML bug that caused garbage behind attributes
- Some Informix driver improvements.
- PUT method support (mlemos@acm.org)
-- Add ldap_mod_add(), ldap_mod_del() and ldap_mod_replace() (Gerritt Thomson)
- Fix parameter count problem in odbc_setoption()
- Really fix implode() this time. The fix in 3.0.7 was bogus
- Added more option to the date() function: (Colin Viebrock)
- Improvements in FreeType support: Macintosh fonts work, and non-antialiased
output is considerably cleaner <mka@satama.com>
- Fixed checkdate() function, range of valid years is now 0 to 32767
-- Make sure XML element attributes have the right character encoding
- hw_insertdocument() returns object id now
- Add pdf_open() warning in configure and documentation
- Add diskfreespace() function
extern module *top_module;
-void php3_virtual(INTERNAL_FUNCTION_PARAMETERS);
-void php3_getallheaders(INTERNAL_FUNCTION_PARAMETERS);
-void php3_apachelog(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(virtual);
+PHP_FUNCTION(getallheaders);
+PHP_FUNCTION(apachelog);
void php3_info_apache(ZEND_MODULE_INFO_FUNC_ARGS);
-void php3_apache_note(INTERNAL_FUNCTION_PARAMETERS);
-void php3_apache_lookup_uri(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(apache_note);
+PHP_FUNCTION(apache_lookup_uri);
function_entry apache_functions[] = {
{"virtual", php3_virtual, NULL},
/* {{{ proto string apache_note(string note_name [, string note_value])
Get and set Apache request notes */
-void php3_apache_note(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(apache_note)
{
pval *arg_name,*arg_val;
char *note_val;
*/
/* {{{ proto int virtual(string filename)
Perform an Apache sub-request */
-void php3_virtual(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(virtual)
{
pval *filename;
request_rec *rr = NULL;
/* {{{ proto array getallheaders(void)
Fetch all HTTP request headers */
-void php3_getallheaders(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(getallheaders)
{
array_header *env_arr;
table_entry *tenv;
/* {{{ proto class apache_lookup_uri(string URI)
Perform a partial request of the given URI to obtain information about it */
-void php3_apache_lookup_uri(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(apache_lookup_uri)
{
pval *filename;
request_rec *rr=NULL;
#if 0
This function is most likely a bad idea. Just playing with it for now.
-void php3_apache_exec_uri(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(apache_exec_uri)
{
pval *filename;
request_rec *rr=NULL;
/* {{{ proto string bcadd(string left_operand, string right_operand [, int scale])
Returns the sum of two arbitrary precision numbers */
-void php3_bcmath_add(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(bcmath_add)
{
pval *left, *right,*scale_param;
bc_num first, second, result;
/* {{{ proto string bcsub(string left_operand, string right_operand [, int scale])
Returns the difference between two arbitrary precision numbers (subtration) */
-void php3_bcmath_sub(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(bcmath_sub)
{
pval *left, *right,*scale_param;
bc_num first, second, result;
/* {{{ proto string bcmul(string left_operand, string right_operand [, int scale])
Returns the multiplication of two arbitrary precision numbers */
-void php3_bcmath_mul(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(bcmath_mul)
{
pval *left, *right,*scale_param;
bc_num first, second, result;
/* {{{ proto string bcdiv(string left_operand, string right_operand [, int scale])
Returns the quotient of two arbitrary precision numbers (division) */
-void php3_bcmath_div(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(bcmath_div)
{
pval *left, *right,*scale_param;
bc_num first, second, result;
/* {{{ proto string bcmod(string left_operand, string right_operand)
Returns the modulus of the two arbitrary precision operands */
-void php3_bcmath_mod(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(bcmath_mod)
{
pval *left, *right;
bc_num first, second, result;
/* {{{ proto string bcpow(string x, string y [, int scale])
Returns the value of an arbitrary precision number raised to the power of another */
-void php3_bcmath_pow(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(bcmath_pow)
{
pval *left, *right,*scale_param;
bc_num first, second, result;
/* {{{ proto string bcsqrt(string operand [, int scale])
Returns the square root of an arbitray precision number */
-void php3_bcmath_sqrt(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(bcmath_sqrt)
{
pval *left,*scale_param;
bc_num result;
/* {{{ proto string bccomp(string left_operand, string right_operand [, int scale])
Compares two arbitrary precision numbers */
-void php3_bcmath_comp(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(bcmath_comp)
{
pval *left, *right, *scale_param;
bc_num first, second;
/* {{{ proto string bcscale(int scale)
Sets default scale parameter for all bc math functions */
-void php3_bcmath_set_scale(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(bcmath_set_scale)
{
pval *new_scale;
#define FALSE 0
#endif
-extern void init_numbers (void);
-extern void destruct_numbers (void);
-extern void str2num (bc_num *num, char *str, int scale);
+void init_numbers (void);
+void destruct_numbers (void);
+void str2num (bc_num *num, char *str, int scale);
extern char *num2str (bc_num num);
-extern void bc_add ( bc_num n1, bc_num n2, bc_num *result, int scale_min);
-extern void bc_sub (bc_num n1, bc_num n2, bc_num *result, int scale_min);
-extern void bc_multiply (bc_num n1, bc_num n2, bc_num *prod, int scale);
+void bc_add ( bc_num n1, bc_num n2, bc_num *result, int scale_min);
+void bc_sub (bc_num n1, bc_num n2, bc_num *result, int scale_min);
+void bc_multiply (bc_num n1, bc_num n2, bc_num *prod, int scale);
extern int bc_divide (bc_num n1, bc_num n2, bc_num *quot, int scale);
extern int bc_modulo (bc_num num1, bc_num num2, bc_num *result, int scale);
-extern void bc_raise (bc_num num1, bc_num num2, bc_num *result, int scale);
+void bc_raise (bc_num num1, bc_num num2, bc_num *result, int scale);
extern int bc_sqrt (bc_num *num, int scale);
extern int bc_compare (bc_num n1, bc_num n2);
-extern void free_num (bc_num *num);
-extern void init_num (bc_num *num);
+void free_num (bc_num *num);
+void init_num (bc_num *num);
#endif
extern int php3_rinit_bcmath(INIT_FUNC_ARGS);
extern int php3_rend_bcmath(SHUTDOWN_FUNC_ARGS);
-extern void php3_bcmath_add(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_bcmath_sub(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_bcmath_mul(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_bcmath_div(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_bcmath_mod(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_bcmath_pow(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_bcmath_sqrt(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_bcmath_comp(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_bcmath_set_scale(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(bcmath_add);
+PHP_FUNCTION(bcmath_sub);
+PHP_FUNCTION(bcmath_mul);
+PHP_FUNCTION(bcmath_div);
+PHP_FUNCTION(bcmath_mod);
+PHP_FUNCTION(bcmath_pow);
+PHP_FUNCTION(bcmath_sqrt);
+PHP_FUNCTION(bcmath_comp);
+PHP_FUNCTION(bcmath_set_scale);
#else
extern int php3_minit_COM(INIT_FUNC_ARGS);
extern int php3_mshutdown_COM(SHUTDOWN_FUNC_ARGS);
-extern void php3_COM_load(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_COM_invoke(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(COM_load);
+PHP_FUNCTION(COM_invoke);
PHP_FUNCTION(com_propget);
PHP_FUNCTION(com_propput);
#endif /* Win32|WINNT */
+#define phpext_COM_ptr COM_module_ptr
+
#endif /* _PHP3_COM_H */
# endif /* HAVE_MOD_DAV */
+#define phpext_dav_ptr phpdav_module_ptr
+
#endif /* _PHP_DAV_H */
+
/*
* Local variables:
* tab-width: 4
php3_printf(php3_get_info_db());
}
-void php3_dblist(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(dblist)
{
char *str = php3_get_info_db();
RETURN_STRING(str,1);
}
-void php3_dbmopen(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(dbmopen) {
pval *filename, *mode;
dbm_info *info=NULL;
int ret;
return NULL;
}
-void php3_dbmclose(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(dbmclose) {
pval *id;
if (ARG_COUNT(ht) != 1 || getParameters(ht,1,&id)==FAILURE) {
* ret = 0 success
* ret = 1 key already exists - nothing done
*/
-void php3_dbminsert(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(dbminsert)
{
pval *id, *key, *value;
dbm_info *info;
return(ret);
}
-void php3_dbmreplace(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(dbmreplace)
{
pval *id, *key, *value;
dbm_info *info;
return(ret);
}
-void php3_dbmfetch(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(dbmfetch)
{
pval *id, *key;
dbm_info *info;
}
-void php3_dbmexists(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(dbmexists)
{
pval *id, *key;
dbm_info *info;
return(ret);
}
-void php3_dbmdelete(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(dbmdelete)
{
pval *id, *key;
dbm_info *info;
return(ret);
}
-void php3_dbmfirstkey(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(dbmfirstkey)
{
pval *id;
dbm_info *info;
return (ret);
}
-void php3_dbmnextkey(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(dbmnextkey)
{
pval *id, *key;
dbm_info *info;
char *_php3_dbmnextkey(dbm_info *info, char *key);
/* db file functions */
-extern int php3_minit_db(INIT_FUNC_ARGS);
-extern int php3_rinit_db(INIT_FUNC_ARGS);
-extern void php3_info_db(ZEND_MODULE_INFO_FUNC_ARGS);
-extern void php3_dblist(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbmopen(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbmclose(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbminsert(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbmfetch(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbmreplace(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbmexists(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbmdelete(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbmfirstkey(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbmnextkey(INTERNAL_FUNCTION_PARAMETERS);
+int php3_minit_db(INIT_FUNC_ARGS);
+int php3_rinit_db(INIT_FUNC_ARGS);
+void php3_info_db(ZEND_MODULE_INFO_FUNC_ARGS);
+PHP_FUNCTION(dblist);
+PHP_FUNCTION(dbmopen);
+PHP_FUNCTION(dbmclose);
+PHP_FUNCTION(dbminsert);
+PHP_FUNCTION(dbmfetch);
+PHP_FUNCTION(dbmreplace);
+PHP_FUNCTION(dbmexists);
+PHP_FUNCTION(dbmdelete);
+PHP_FUNCTION(dbmfirstkey);
+PHP_FUNCTION(dbmnextkey);
#undef phpext_db_ptr
#define phpext_db_ptr NULL
/* {{{ proto int dbase_open(string name, int mode)
Opens a dBase-format database file */
-void php3_dbase_open(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(dbase_open) {
pval *dbf_name, *options;
dbhead_t *dbh;
int handle;
/* {{{ proto bool dbase_close(int identifier)
Closes an open dBase-format database file */
-void php3_dbase_close(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(dbase_close) {
pval *dbh_id;
dbhead_t *dbh;
int dbh_type;
/* {{{ proto int dbase_numrecords(int identifier)
Returns the number of records in the database */
-void php3_dbase_numrecords(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(dbase_numrecords) {
pval *dbh_id;
dbhead_t *dbh;
int dbh_type;
/* {{{ proto int dbase_numfields(int identifier)
Returns the number of fields (columns) in the database */
-void php3_dbase_numfields(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(dbase_numfields) {
pval *dbh_id;
dbhead_t *dbh;
int dbh_type;
/* {{{ proto bool dbase_pack(int identifier)
Packs the database (deletes records marked for deletion) */
-void php3_dbase_pack(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(dbase_pack) {
pval *dbh_id;
dbhead_t *dbh;
int dbh_type;
/* {{{ proto bool dbase_add_record(int identifier, array data)
Adds a record to the database */
-void php3_dbase_add_record(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(dbase_add_record) {
pval *dbh_id, *fields, *field;
dbhead_t *dbh;
int dbh_type;
/* {{{ proto bool dbase_delete_record(int identifier, int record)
Marks a record to be deleted */
-void php3_dbase_delete_record(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(dbase_delete_record) {
pval *dbh_id, *record;
dbhead_t *dbh;
int dbh_type;
/* {{{ proto array dbase_get_record(int identifier, int record)
Returns an array representing a record from the database */
-void php3_dbase_get_record(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(dbase_get_record) {
pval *dbh_id, *record;
dbhead_t *dbh;
int dbh_type;
/* From Martin Kuba <makub@aida.inet.cz> */
/* {{{ proto array dbase_get_record_with_names(int identifier, int record)
Returns an associative array representing a record from the database */
-void php3_dbase_get_record_with_names(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(dbase_get_record_with_names) {
pval *dbh_id, *record;
dbhead_t *dbh;
int dbh_type;
/* {{{ proto bool dbase_create(string filename, array fields)
Creates a new dBase-format database file */
-void php3_dbase_create(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(dbase_create) {
pval *filename, *fields, *field, *value;
int fd;
dbhead_t *dbh;
extern dbhead_t *get_dbf_head(int fd);
-extern void free_dbf_head(dbhead_t *dbh);
+void free_dbf_head(dbhead_t *dbh);
extern int put_dbf_head(dbhead_t *dbh);
extern int get_dbf_field(dbhead_t *dbh, dbfield_t *dbf);
extern int put_dbf_field(dbhead_t *dbh, dbfield_t *dbf);
-extern void put_dbf_info(dbhead_t *dbh);
+void put_dbf_info(dbhead_t *dbh);
extern char *get_dbf_f_fmt(dbfield_t *dbf);
extern dbhead_t *dbf_open(char *dp, int o_flags);
-extern void dbf_head_info(dbhead_t *dbh);
+void dbf_head_info(dbhead_t *dbh);
-extern void put_long(char *cp, long lval);
+void put_long(char *cp, long lval);
extern long get_long(char *cp);
extern int get_short(char *cp);
-extern void put_short(char *cp, int sval);
-extern void put_double(char *cp, double fval);
+void put_short(char *cp, int sval);
+void put_double(char *cp, double fval);
extern double get_double(char *cp);
-extern void copy_fill(char *dp, char *sp, int len);
-extern void copy_crimp(char *dp, char *sp, int len);
-extern void db_set_date(char *cp, int year, int month, int day);
+void copy_fill(char *dp, char *sp, int len);
+void copy_crimp(char *dp, char *sp, int len);
+void db_set_date(char *cp, int year, int month, int day);
extern int db_date_year(char *cp);
extern int db_date_month(char *cp);
extern int db_date_day(char *cp);
extern long put_dbf_record(dbhead_t *dbh, long rec_num, char *cp);
extern int put_piece(dbhead_t *dbh, long offset, char *cp, int len);
extern int del_dbf_record(dbhead_t *dbh, long rec_num);
-extern void pack_dbf(dbhead_t *dbh);
+void pack_dbf(dbhead_t *dbh);
extern char *get_field_val(char *rp, dbfield_t *fldp, char *cp);
-extern void put_field_val(char *rp, dbfield_t *fldp, char *cp);
-extern void out_rec(dbhead_t *dbh, dbfield_t *dbf, char *cp);
+void put_field_val(char *rp, dbfield_t *fldp, char *cp);
+void out_rec(dbhead_t *dbh, dbfield_t *dbf, char *cp);
extern int is_valid_rec(char *cp);
extern char *dbf_get_next(dbhead_t *dbh);
#define dbase_module_ptr &dbase_module_entry
extern int php3_minit_dbase(INIT_FUNC_ARGS);
-extern void php3_dbase_open(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbase_create(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbase_close(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbase_numrecords(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbase_numfields(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbase_add_record(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbase_get_record(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbase_delete_record(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbase_pack(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dbase_get_record_with_names(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(dbase_open);
+PHP_FUNCTION(dbase_create);
+PHP_FUNCTION(dbase_close);
+PHP_FUNCTION(dbase_numrecords);
+PHP_FUNCTION(dbase_numfields);
+PHP_FUNCTION(dbase_add_record);
+PHP_FUNCTION(dbase_get_record);
+PHP_FUNCTION(dbase_delete_record);
+PHP_FUNCTION(dbase_pack);
+PHP_FUNCTION(dbase_get_record_with_names);
#else
#define dbase_module_ptr NULL
#endif
/* {{{ proto int fdf_open(string filename)
Opens a new fdf document */
-void php3_fdf_open(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(fdf_open) {
pval *file;
int id, type;
FDFDoc fdf;
/* {{{ proto void fdf_close(int fdfdoc)
Closes the fdf document */
-void php3_fdf_close(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(fdf_close) {
pval *arg1;
int id, type;
FDFDoc fdf;
/* {{{ proto void fdf_create(void)
Creates a new fdf document */
-void php3_fdf_create(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(fdf_create) {
int id, type;
FDFDoc fdf;
FDFErc err;
/* {{{ proto void fdf_get_value(int fdfdoc, string fieldname)
Gets the value of a field as string */
-void php3_fdf_get_value(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(fdf_get_value) {
pval *arg1, *arg2;
int id, type;
ASInt32 nr;
/* {{{ proto void fdf_set_value(int fdfdoc, string fieldname, string value, int isName)
Sets the value of a field */
-void php3_fdf_set_value(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(fdf_set_value) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
FDFDoc fdf;
/* {{{ proto void fdf_next_field_name(int fdfdoc [, string fieldname])
Gets the name of the next field name or the first field name */
-void php3_fdf_next_field_name(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(fdf_next_field_name) {
pval *argv[2];
int id, type, argc;
ASInt32 nr;
/* {{{ proto void fdf_set_ap(int fdfdoc, string fieldname, int face, string filename, int pagenr)
Sets the value of a field */
-void php3_fdf_set_ap(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(fdf_set_ap) {
pval *arg1, *arg2, *arg3, *arg4, *arg5;
int id, type;
FDFDoc fdf;
/* {{{ proto void fdf_set_status(int fdfdoc, string status)
Sets the value in the /Status key. */
-void php3_fdf_set_status(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(fdf_set_status) {
pval *arg1, *arg2;
int id, type;
ASInt32 nr;
/* {{{ proto void fdf_get_status(int fdfdoc)
Gets the value in the /Status key. */
-void php3_fdf_get_status(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(fdf_get_status) {
pval *arg1;
int id, type;
ASInt32 nr;
/* {{{ proto void fdf_set_file(int fdfdoc, string filename)
Sets the value of the FDF's /F key */
-void php3_fdf_set_file(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(fdf_set_file) {
pval *arg1, *arg2;
int id, type;
FDFDoc fdf;
/* {{{ proto void fdf_get_file(int fdfdoc)
Gets the value in the /F key. */
-void php3_fdf_get_file(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(fdf_get_file) {
pval *arg1;
int id, type;
ASInt32 nr;
/* {{{ proto void fdf_save(int fdfdoc, string filename)
Writes out an FDF file. */
-void php3_fdf_save(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(fdf_save) {
pval *arg1, *arg2;
int id, type;
FDFDoc fdf;
#include <FdfTk.h>
extern php3_module_entry fdf_module_entry;
-#define fdf_module_ptr &fdf_module_entry
+#define phpext_fdf_ptr &fdf_module_entry
extern int php3_minit_fdf(INIT_FUNC_ARGS);
extern int php3_mend_fdf(void);
-extern void php3_info_fdf(ZEND_MODULE_INFO_FUNC_ARGS);
-extern void php3_fdf_open(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_fdf_close(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_fdf_create(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_fdf_save(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_fdf_get_value(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_fdf_set_value(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_fdf_next_field_name(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_fdf_set_ap(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_fdf_get_status(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_fdf_set_status(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_fdf_set_file(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_fdf_get_file(INTERNAL_FUNCTION_PARAMETERS);
+void php3_info_fdf(ZEND_MODULE_INFO_FUNC_ARGS);
+PHP_FUNCTION(fdf_open);
+PHP_FUNCTION(fdf_close);
+PHP_FUNCTION(fdf_create);
+PHP_FUNCTION(fdf_save);
+PHP_FUNCTION(fdf_get_value);
+PHP_FUNCTION(fdf_set_value);
+PHP_FUNCTION(fdf_next_field_name);
+PHP_FUNCTION(fdf_set_ap);
+PHP_FUNCTION(fdf_get_status);
+PHP_FUNCTION(fdf_set_status);
+PHP_FUNCTION(fdf_set_file);
+PHP_FUNCTION(fdf_get_file);
#else
-#define fdf_module_ptr NULL
+#define phpext_fdf_ptr NULL
#endif
#endif /* _PHP3_FDF_H */
#include <errno.h>
#include "php_globals.h"
-#include "filepro.h"
+#include "php_filepro.h"
#if HAVE_FILEPRO
typedef struct fp_field {
* a user is using it! We cannot lock anything since Web connections don't
* provide the ability to later unlock what we locked. Be smart, be safe.
*/
-void php3_filepro(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(filepro)
{
pval *dir;
FILE *fp;
*
* Errors return false, success returns the row count.
*/
-void php3_filepro_rowcount(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(filepro_rowcount)
{
FILE *fp;
char workbuf[MAXPATHLEN];
*
* Errors return false, success returns the name of the field.
*/
-void php3_filepro_fieldname(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(filepro_fieldname)
{
pval *fno;
FP_FIELD *lp;
*
* Errors return false, success returns the type (edit) of the field
*/
-void php3_filepro_fieldtype(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(filepro_fieldtype)
{
pval *fno;
FP_FIELD *lp;
*
* Errors return false, success returns the character width of the field.
*/
-void php3_filepro_fieldwidth(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(filepro_fieldwidth)
{
pval *fno;
FP_FIELD *lp;
*
* Errors return false, success returns the field count.
*/
-void php3_filepro_fieldcount(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(filepro_fieldcount)
{
FP_TLS_VARS;
*
* Errors return false, success returns the datum.
*/
-void php3_filepro_retrieve(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(filepro_retrieve)
{
pval *rno, *fno;
FP_FIELD *lp;
#define _FILEPRO_H
#if HAVE_FILEPRO
extern php3_module_entry filepro_module_entry;
-#define filepro_module_ptr &filepro_module_entry
+#define phpext_filepro_ptr &filepro_module_entry
-extern void php3_filepro(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_filepro_rowcount(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_filepro_fieldname(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_filepro_fieldtype(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_filepro_fieldwidth(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_filepro_fieldcount(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_filepro_retrieve(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(filepro);
+PHP_FUNCTION(filepro_rowcount);
+PHP_FUNCTION(filepro_fieldname);
+PHP_FUNCTION(filepro_fieldtype);
+PHP_FUNCTION(filepro_fieldwidth);
+PHP_FUNCTION(filepro_fieldcount);
+PHP_FUNCTION(filepro_retrieve);
extern int php3_minit_filepro(INIT_FUNC_ARGS);
extern int php3_mend_filepro(void);
#else
-#define filepro_module_ptr NULL
+#define phpext_filepro_ptr NULL
#endif
#endif /* _FILEPRO_H */
/* {{{ proto int imageloadfont(string filename)
Load a new font */
-void php3_imageloadfont(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imageloadfont) {
pval *file;
int hdr_size = sizeof(gdFont) - sizeof(char *);
int ind, body_size, n=0, b;
/* {{{ proto int imagecreate(int x_size, int y_size)
Create a new image */
-void php3_imagecreate(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagecreate) {
pval *x_size, *y_size;
int ind;
gdImagePtr im;
/* {{{ proto int imagecreatefromgif(string filename)
Create a new image from file or URL */
-void php3_imagecreatefromgif (INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagecreatefromgif ) {
pval *file;
int ind;
gdImagePtr im;
/* {{{ proto int imagedestroy(int im)
Destroy an image */
-void php3_imagedestroy(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagedestroy) {
pval *imgind;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &imgind) == FAILURE) {
/* {{{ proto int imagecolorallocate(int im, int red, int green, int blue)
Allocate a color for an image */
-void php3_imagecolorallocate(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagecolorallocate) {
pval *imgind, *red, *green, *blue;
int ind, ind_type;
int col;
/* im, x, y */
/* {{{ proto int imagecolorat(int im, int x, int y)
Get the index of the color of a pixel */
-void php3_imagecolorat(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagecolorat) {
pval *imgind, *x, *y;
int ind, ind_type;
gdImagePtr im;
/* {{{ proto int imagecolorclosest(int im, int red, int green, int blue)
Get the index of the closest color to the specified color */
-void php3_imagecolorclosest(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagecolorclosest) {
pval *imgind, *red, *green, *blue;
int ind, ind_type;
int col;
/* {{{ proto int imagecolordeallocate(int im, int index)
De-allocate a color for an image */
-void php3_imagecolordeallocate(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagecolordeallocate) {
pval *imgind, *index;
int ind, ind_type, col;
gdImagePtr im;
/* {{{ proto int imagecolorresolve(int im, int red, int green, int blue)
Get the index of the specified color or its closest possible alternative */
-void php3_imagecolorresolve(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagecolorresolve) {
pval *imgind, *red, *green, *blue;
int ind, ind_type;
int col;
/* {{{ proto int imagecolorexact(int im, int red, int green, int blue)
Get the index of the specified color */
-void php3_imagecolorexact(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagecolorexact) {
pval *imgind, *red, *green, *blue;
int ind, ind_type;
int col;
/* {{{ proto int imagecolorset(int im, int col, int red, int green, int blue)
Set the color for the specified palette index */
-void php3_imagecolorset(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagecolorset) {
pval *imgind, *color, *red, *green, *blue;
int ind, ind_type;
int col;
/* {{{ proto array imagecolorsforindex(int im, int col)
Get the colors for an index */
-void php3_imagecolorsforindex(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagecolorsforindex) {
pval *imgind, *index;
int col, ind, ind_type;
gdImagePtr im;
/* {{{ proto int imagegif(int im, string filename)
Output image to browser or file */
-void php3_imagegif (INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagegif ) {
pval *imgind, *file;
gdImagePtr im;
char *fn=NULL;
/* {{{ proto int imagesetpixel(int im, int x, int y, int col)
Set a single pixel */
-void php3_imagesetpixel(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagesetpixel) {
pval *imarg, *xarg, *yarg, *colarg;
gdImagePtr im;
int col, y, x;
/* im, x1, y1, x2, y2, col */
/* {{{ proto int imageline(int im, int x1, int y1, int x2, int y2, int col)
Draw a line */
-void php3_imageline(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imageline) {
pval *IM, *COL, *X1, *Y1, *X2, *Y2;
gdImagePtr im;
int col, y2, x2, y1, x1;
/* {{{ proto int imagedashedline(int im, int x1, int y1, int x2, int y2, int col)
Draw a dashed line */
-void php3_imagedashedline(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagedashedline) {
pval *IM, *COL, *X1, *Y1, *X2, *Y2;
gdImagePtr im;
int col, y2, x2, y1, x1;
/* im, x1, y1, x2, y2, col */
/* {{{ proto int imagerectangle(int im, int x1, int y1, int x2, int y2, int col)
Draw a rectangle */
-void php3_imagerectangle(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagerectangle) {
pval *IM, *COL, *X1, *Y1, *X2, *Y2;
gdImagePtr im;
int col, y2, x2, y1, x1;
/* im, x1, y1, x2, y2, col */
/* {{{ proto int imagefilledrectangle(int im, int x1, int y1, int x2, int y2, int col)
Draw a filled rectangle */
-void php3_imagefilledrectangle(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagefilledrectangle) {
pval *IM, *COL, *X1, *Y1, *X2, *Y2;
gdImagePtr im;
int col, y2, x2, y1, x1;
/* {{{ proto int imagearc(int im, int cx, int cy, int w, int h, int s, int e, int col)
Draw a partial ellipse */
-void php3_imagearc(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagearc) {
pval *COL, *E, *ST, *H, *W, *CY, *CX, *IM;
gdImagePtr im;
int col, e, st, h, w, cy, cx;
/* im, x, y, border, col */
/* {{{ proto int imagefilltoborder(int im, int x, int y, int border, int col)
Flood fill to specific color */
-void php3_imagefilltoborder(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagefilltoborder) {
pval *IM, *X, *Y, *BORDER, *COL;
gdImagePtr im;
int col, border, y, x;
/* im, x, y, col */
/* {{{ proto int imagefill(int im, int x, int y, int col)
Flood fill */
-void php3_imagefill(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagefill) {
pval *IM, *X, *Y, *COL;
gdImagePtr im;
int col, y, x;
/* {{{ proto int imagecolorstotal(int im)
Find out the number of colors in an image's palette */
-void php3_imagecolorstotal(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagecolorstotal) {
pval *IM;
gdImagePtr im;
int ind_type;
/* im, col */
/* {{{ proto int imagecolortransparent(int im [, int col])
Define a color as transparent */
-void php3_imagecolortransparent(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagecolortransparent) {
pval *IM, *COL = NULL;
gdImagePtr im;
int col;
/* im, interlace */
/* {{{ proto int imageinterlace(int im [, int interlace])
Enable or disable interlace */
-void php3_imageinterlace(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imageinterlace) {
pval *IM, *INT = NULL;
gdImagePtr im;
int interlace;
/* {{{ proto int imagepolygon(int im, array point, int num_points, int col)
Draw a polygon */
-void php3_imagepolygon(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imagepolygon)
{
_php3_imagepolygon(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
/* {{{ proto int imagefilledpolygon(int im, array point, int num_points, int col)
Draw a filled polygon */
-void php3_imagefilledpolygon(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imagefilledpolygon)
{
_php3_imagepolygon(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
/* {{{ proto int imagefontwidth(int font)
Get font width */
-void php3_imagefontwidth(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imagefontwidth)
{
_php3_imagefontsize(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
/* {{{ proto int imagefontheight(int font)
Get font height */
-void php3_imagefontheight(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imagefontheight)
{
_php3_imagefontsize(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
/* {{{ proto int imagechar(int im, int font, int x, int y, string c, int col)
Draw a character */
-void php3_imagechar(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagechar) {
_php3_imagechar(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
/* }}} */
/* {{{ proto int imagecharup(int im, int font, int x, int y, string c, int col)
Draw a character rotated 90 degrees counter-clockwise */
-void php3_imagecharup(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagecharup) {
_php3_imagechar(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
/* }}} */
/* {{{ proto int imagestring(int im, int font, int x, int y, string str, int col)
Draw a string horizontally */
-void php3_imagestring(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagestring) {
_php3_imagechar(INTERNAL_FUNCTION_PARAM_PASSTHRU, 2);
}
/* }}} */
/* {{{ proto int imagestringup(int im, int font, int x, int y, string str, int col)
Draw a string vertically - rotated 90 degrees counter-clockwise */
-void php3_imagestringup(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(imagestringup) {
_php3_imagechar(INTERNAL_FUNCTION_PARAM_PASSTHRU, 3);
}
/* }}} */
/* {{{ proto int imagecopy(int dst_im, int src_im, int dstX, int dstY, int srcX, int srcY, int srcW, int srcH)
Copy part of an image */
-void php3_imagecopy(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imagecopy)
{
pval *SIM, *DIM, *SX, *SY, *SW, *SH, *DX, *DY;
gdImagePtr im_dst;
/* {{{ proto int imagecopyresized(int dst_im, int src_im, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH);
Copy and resize part of an image */
-void php3_imagecopyresized(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imagecopyresized)
{
pval *SIM, *DIM, *SX, *SY, *SW, *SH, *DX, *DY, *DW, *DH;
gdImagePtr im_dst;
/* {{{ proto int imagesx(int im)
Get image width */
-void php3_imagesxfn(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imagesxfn)
{
pval *IM;
gdImagePtr im;
/* {{{ proto int imagesy(int im)
Get image height */
-void php3_imagesyfn(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imagesyfn)
{
pval *IM;
gdImagePtr im;
/* {{{ proto array imagettfbbox(int size, int angle, string font_file, string text)
Give the bounding box of a text using TrueType fonts */
-void php3_imagettfbbox(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imagettfbbox)
{
php3_imagettftext_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, TTFTEXT_BBOX);
}
/* {{{ proto array imagettftext(int im, int size, int angle, int x, int y, int col, string font_file, string text)
Write text to the image using a TrueType font */
-void php3_imagettftext(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imagettftext)
{
php3_imagettftext_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, TTFTEXT_DRAW);
}
#define phpext_gd_ptr &gd_module_entry
/* gd.c functions */
-extern void php3_info_gd(ZEND_MODULE_INFO_FUNC_ARGS);
+void php3_info_gd(ZEND_MODULE_INFO_FUNC_ARGS);
extern int php3_minit_gd(INIT_FUNC_ARGS);
extern int php3_mend_gd(SHUTDOWN_FUNC_ARGS);
extern int gdImageColorResolve(gdImagePtr, int, int, int);
-extern void php3_imagearc(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagechar(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecharup(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecolorallocate(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecolorat(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecolorclosest(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecolordeallocate(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecolorresolve(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecolorexact(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecolorset(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecolorstotal(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecolorsforindex(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecolortransparent(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecopy(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecopyresized(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecreate(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagecreatefromgif (INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagedestroy(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagefill(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagefilledpolygon(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagefilledrectangle(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagefilltoborder(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagefontwidth(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagefontheight(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagegif (INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imageinterlace(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imageline(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imageloadfont(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagepolygon(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagerectangle(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagesetpixel(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagestring(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagestringup(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagesxfn(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagesyfn(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_free_gd_font(gdFontPtr);
-extern void _php3_gdimagecharup(gdImagePtr, gdFontPtr, int, int, int, int);
-extern void php3_imagedashedline(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(imagearc);
+PHP_FUNCTION(imagechar);
+PHP_FUNCTION(imagecharup);
+PHP_FUNCTION(imagecolorallocate);
+PHP_FUNCTION(imagecolorat);
+PHP_FUNCTION(imagecolorclosest);
+PHP_FUNCTION(imagecolordeallocate);
+PHP_FUNCTION(imagecolorresolve);
+PHP_FUNCTION(imagecolorexact);
+PHP_FUNCTION(imagecolorset);
+PHP_FUNCTION(imagecolorstotal);
+PHP_FUNCTION(imagecolorsforindex);
+PHP_FUNCTION(imagecolortransparent);
+PHP_FUNCTION(imagecopy);
+PHP_FUNCTION(imagecopyresized);
+PHP_FUNCTION(imagecreate);
+PHP_FUNCTION(imagecreatefromgif );
+PHP_FUNCTION(imagedestroy);
+PHP_FUNCTION(imagefill);
+PHP_FUNCTION(imagefilledpolygon);
+PHP_FUNCTION(imagefilledrectangle);
+PHP_FUNCTION(imagefilltoborder);
+PHP_FUNCTION(imagefontwidth);
+PHP_FUNCTION(imagefontheight);
+PHP_FUNCTION(imagegif );
+PHP_FUNCTION(imageinterlace);
+PHP_FUNCTION(imageline);
+PHP_FUNCTION(imageloadfont);
+PHP_FUNCTION(imagepolygon);
+PHP_FUNCTION(imagerectangle);
+PHP_FUNCTION(imagesetpixel);
+PHP_FUNCTION(imagestring);
+PHP_FUNCTION(imagestringup);
+PHP_FUNCTION(imagesxfn);
+PHP_FUNCTION(imagesyfn);
+void php3_free_gd_font(gdFontPtr);
+void _php3_gdimagecharup(gdImagePtr, gdFontPtr, int, int, int, int);
+PHP_FUNCTION(imagedashedline);
#ifdef HAVE_LIBTTF
-extern void php3_imagettfbbox(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_imagettftext(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(imagettfbbox);
+PHP_FUNCTION(imagettftext);
#endif
#else
php3_printf("GNU gettext support active.");
}
-void php3_textdomain(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(textdomain)
{
pval *domain;
char *domain_name, *retval;
RETURN_STRING(retval, 1);
}
-void php3_gettext(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(gettext)
{
pval *msgid;
char *msgstr;
RETURN_STRING(msgstr, 1);
}
-void php3_dgettext(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(dgettext)
{
pval *domain_name, *msgid;
char *msgstr;
RETURN_STRING(msgstr, 1);
}
-void php3_dcgettext(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(dcgettext)
{
pval *domain_name, *msgid, *category;
char *msgstr;
RETURN_STRING(msgstr, 1);
}
-void php3_bindtextdomain(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(bindtextdomain)
{
pval *domain_name, *dir;
char *retval, *dir_name;
extern php3_module_entry php3_gettext_module_entry;
#define gettext_module_ptr &php3_gettext_module_entry
-extern void php3_info_gettext(ZEND_MODULE_INFO_FUNC_ARGS);
-extern void php3_textdomain(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_gettext(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dgettext(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_dcgettext(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_bindtextdomain(INTERNAL_FUNCTION_PARAMETERS);
+void php3_info_gettext(ZEND_MODULE_INFO_FUNC_ARGS);
+PHP_FUNCTION(textdomain);
+PHP_FUNCTION(gettext);
+PHP_FUNCTION(dgettext);
+PHP_FUNCTION(dcgettext);
+PHP_FUNCTION(bindtextdomain);
#else
#define gettext_module_ptr NULL
typedef int hw_objectID;
typedef char hw_objrec;
-extern void set_swap(int do_swap);
+void set_swap(int do_swap);
extern int open_hg_connection(char *server_name, int port);
-extern void close_hg_connection(int sockfd);
+void close_hg_connection(int sockfd);
extern int initialize_hg_connection(int sockfd, int *do_swap, int *version, char **userdata, char **server_string, char *username, char *password);
extern int send_ready(int sockfd);
/* ***************************** */
/* {{{ proto int hw_connect(string host, int port [string username [, string password]])
Connect to the Hyperwave server */
-void php3_hw_connect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(hw_connect)
{
php3_hw_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0);
}
/* {{{ proto int hw_pconnect(string host, int port [string username [, string password]])
Connect to the Hyperwave server persistent */
-void php3_hw_pconnect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(hw_pconnect)
{
php3_hw_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
}
/* {{{ proto void hw_close(int link)
Close connection to Hyperwave server */
-void php3_hw_close(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_close) {
pval *arg1;
int id, type;
hw_connection *ptr;
/* {{{ proto void hw_info(int link)
Outputs info string */
-void php3_hw_info(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(hw_info)
{
pval *arg1;
int id, type;
/* {{{ proto int hw_error(int link)
Returns last error number */
-void php3_hw_error(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(hw_error)
{
pval *arg1;
int id, type;
/* {{{ proto string hw_errormsg(int link)
Returns last error message */
-void php3_hw_errormsg(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(hw_errormsg)
{
pval *arg1;
int id, type;
/* {{{ proto hw_root(void)
Returns object id of root collection */
-void php3_hw_root(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(hw_root)
{
return_value->value.lval = 0;
return_value->type = IS_LONG;
/* {{{ proto string hw_stat(int link)
Returns status string */
-void php3_hw_stat(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_stat) {
char *object;
object = php3_hw_command(INTERNAL_FUNCTION_PARAM_PASSTHRU, STAT_COMMAND);
/* {{{ proto array hw_who(int link)
Returns names and info of users loged in */
-void php3_hw_who(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_who) {
pval user_arr;
char *object, *ptr, *temp, *attrname;
int i;
}
/* }}} */
-void php3_hw_dummy(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_dummy) {
pval *arg1, *arg2, *arg3;
int link, id, type, msgid;
hw_connection *ptr;
/* {{{ proto string hw_getobject(int link, int objid)
Returns object record */
-void php3_hw_getobject(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getobject) {
pval *arg1, *arg2;
int link, id, type;
hw_connection *ptr;
/* {{{ proto int hw_insertobject(int link, string objrec, string parms)
Inserts an object */
-void php3_hw_insertobject(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_insertobject) {
pval *arg1, *arg2, *arg3;
int link, type;
char *objrec, *parms;
/* {{{ proto string hw_getandlock(int link, int objid)
Returns object record and locks object */
-void php3_hw_getandlock(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getandlock) {
pval *arg1, *arg2;
int link, id, type;
hw_connection *ptr;
/* {{{ proto void hw_unlock(int link, int objid)
Unlocks object */
-void php3_hw_unlock(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_unlock) {
pval *arg1, *arg2;
int link, id, type;
hw_connection *ptr;
/* {{{ proto void hw_deleteobject(int link, int objid)
Deletes object */
-void php3_hw_deleteobject(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_deleteobject) {
pval *arg1, *arg2;
int link, id, type;
hw_connection *ptr;
/* {{{ proto void hw_changeobject(int link, int objid, array attributes)
Changes attributes of an object */
-void php3_hw_changeobject(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_changeobject) {
pval *arg1, *arg2, *arg3;
int link, id, type, i;
hw_connection *ptr;
/* {{{ proto void hw_mv(int link, array objrec, int from, int dest)
Moves object */
-void php3_hw_mv(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_mv) {
php3_hw_mvcp(INTERNAL_FUNCTION_PARAM_PASSTHRU, MOVE);
}
/* }}} */
/* {{{ proto void hw_cp(int link, array objrec, int dest)
Copies object */
-void php3_hw_cp(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_cp) {
php3_hw_mvcp(INTERNAL_FUNCTION_PARAM_PASSTHRU, COPY);
}
/* }}} */
/* {{{ proto hwdoc hw_gettext(int link, int objid[, int rootid])
Returns text document. Links are relative to rootid if given */
-void php3_hw_gettext(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_gettext) {
pval *argv[3];
int argc, link, id, type, mode;
int rootid = 0;
/* {{{ proto void hw_edittext(int link, hwdoc doc)
Modifies text document */
-void php3_hw_edittext(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_edittext) {
pval *arg1, *arg2;
int link, id, doc, type;
hw_connection *ptr;
/* {{{ proto hwdoc hw_getcgi(int link, int objid)
Returns the output of a cgi script */
-void php3_hw_getcgi(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getcgi) {
pval *arg1, *arg2;
int link, id, type;
hw_document *doc;
/* {{{ proto hwdoc hw_getremote(int link, int objid)
Returns the output of a remote document */
-void php3_hw_getremote(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getremote) {
pval *arg1, *arg2;
int link, id, type;
hw_document *doc;
/* {{{ proto [array|hwdoc] hw_getremotechildren(int link, int objid)
Returns the remote document if only one or an array of object records */
-void php3_hw_getremotechildren(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getremotechildren) {
pval *arg1, *arg2;
int link, type, i;
hw_connection *ptr;
/* {{{ proto void hw_setlinkroot(int link, int rootid)
Set the id to which links are calculated */
-void php3_hw_setlinkroot(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_setlinkroot) {
pval *arg1, *arg2;
int link, type, rootid;
hw_connection *ptr;
/* {{{ proto hwdoc hw_pipedocument(int link, int objid)
Returns document */
-void php3_hw_pipedocument(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_pipedocument) {
pval *argv[3];
int link, id, type, argc, mode;
int rootid = 0;
/* {{{ proto hwdoc hw_pipecgi(int link, int objid)
Returns output of cgi script */
-void php3_hw_pipecgi(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_pipecgi) {
pval *arg1, *arg2;
int link, id, type;
hw_connection *ptr;
/* {{{ proto void hw_insertdocument(int link, int parentid, hwdoc doc)
Insert new document */
-void php3_hw_insertdocument(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_insertdocument) {
pval *arg1, *arg2, *arg3;
int link, id, doc, type;
hw_connection *ptr;
/* {{{ proto hwdoc hw_new_document(int link, string data, string objrec, int size)
Create a new document */
-void php3_hw_new_document(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_new_document) {
pval *arg1, *arg2, *arg3;
hw_document *doc;
/* {{{ proto void hw_free_document(hwdoc doc)
Frees memory of document */
-void php3_hw_free_document(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_free_document) {
pval *arg1;
int id, type;
hw_document *ptr;
/* {{{ proto void hw_output_document(hwdoc doc)
Prints document */
-void php3_hw_output_document(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_output_document) {
pval *arg1;
int id, type, count;
hw_document *ptr;
/* {{{ proto string hw_document_bodytag(hwdoc doc [, string prefix])
Return bodytag prefixed by prefix */
-void php3_hw_document_bodytag(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_document_bodytag) {
pval *argv[2];
int id, type, argc;
hw_document *ptr;
/* {{{ proto string hw_document_content(hwdoc doc)
Returns content of document */
-void php3_hw_document_content(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_document_content) {
pval *argv[1];
int id, type, argc;
hw_document *ptr;
/* {{{ proto int hw_document_content(hwdoc doc)
Returns size of document */
-void php3_hw_document_size(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_document_size) {
pval *arg1;
int id, type;
hw_document *ptr;
/* {{{ proto string hw_document_content(hwdoc doc)
Returns object record of document */
-void php3_hw_document_attributes(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_document_attributes) {
pval *arg1;
int id, type;
hw_document *ptr;
/* {{{ proto array hw_getparentsobj(int link, int objid)
Returns array of parent object records */
-void php3_hw_getparentsobj(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getparentsobj) {
pval *arg1, *arg2;
int link, id, type;
int count;
/* {{{ proto array hw_getparents(int link, int objid)
Returns array of parent object ids */
-void php3_hw_getparents(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getparents) {
pval *arg1, *arg2;
int link, id, type;
int count;
/* {{{ proto array hw_children(int link, int objid)
Returns array of children object ids */
-void php3_hw_children(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_children) {
pval *arg1, *arg2;
int link, id, type;
int count;
/* {{{ proto array hw_children(int link, int objid)
Returns array of children object records */
-void php3_hw_childrenobj(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_childrenobj) {
pval *arg1, *arg2;
int link, id, type;
int count;
/* {{{ proto array hw_childcoll(int link, int objid)
Returns array of child collection object ids */
-void php3_hw_getchildcoll(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getchildcoll) {
pval *arg1, *arg2;
int link, id, type;
int count;
/* {{{ proto array hw_childcollobj(int link, int objid)
Returns array of child collection object records */
-void php3_hw_getchildcollobj(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getchildcollobj) {
pval *arg1, *arg2;
int link, id, type;
int count;
/* {{{ proto int hw_docbyanchor(int link, int anchorid)
Returns objid of document belonging to anchorid */
-void php3_hw_docbyanchor(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_docbyanchor) {
pval *arg1, *arg2;
int link, id, type;
hw_connection *ptr;
/* {{{ proto array hw_docbyanchorobj(int link, int anchorid)
Returns object record of document belonging to anchorid */
-void php3_hw_docbyanchorobj(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_docbyanchorobj) {
pval *arg1, *arg2;
int link, id, type;
hw_connection *ptr;
/* {{{ proto array hw_getobjectbyquery(int link, string query, int maxhits)
Search for query and return maxhits objids */
-void php3_hw_getobjectbyquery(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getobjectbyquery) {
pval *arg1, *arg2, *arg3;
int link, type, maxhits;
char *query;
/* {{{ proto array hw_getobjectbyqueryobj(int link, string query, int maxhits)
Search for query and return maxhits object records */
-void php3_hw_getobjectbyqueryobj(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getobjectbyqueryobj) {
pval *arg1, *arg2, *arg3;
int link, type, maxhits;
char *query;
/* {{{ proto array hw_getobjectbyquerycoll(int link, int collid, string query, int maxhits)
Search for query in collection and return maxhits objids */
-void php3_hw_getobjectbyquerycoll(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getobjectbyquerycoll) {
pval *arg1, *arg2, *arg3, *arg4;
int link, id, type, maxhits;
char *query;
/* {{{ proto array hw_getobjectbyquerycollobj(int link, int collid, string query, int maxhits)
Search for query in collection and return maxhits object records */
-void php3_hw_getobjectbyquerycollobj(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getobjectbyquerycollobj) {
pval *arg1, *arg2, *arg3, *arg4;
int link, id, type, maxhits;
char *query;
/* {{{ proto array hw_getchilddoccoll(int link, int objid)
Returns all children ids which are documents */
-void php3_hw_getchilddoccoll(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getchilddoccoll) {
pval *arg1, *arg2;
int link, id, type;
int count, i;
/* {{{ proto array hw_getchilddoccollobj(int link, int objid)
Returns all children object records which are documents */
-void php3_hw_getchilddoccollobj(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getchilddoccollobj) {
pval *arg1, *arg2;
int link, id, type;
int count;
/* {{{ proto array hw_getanchors(int link, int objid)
Return all anchors of object */
-void php3_hw_getanchors(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getanchors) {
pval *arg1, *arg2;
int link, id, type;
int count, i;
/* {{{ proto array hw_getanchorsobj(int link, int objid)
Return all object records of anchors of object */
-void php3_hw_getanchorsobj(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getanchorsobj) {
pval *arg1, *arg2;
int link, id, type;
int count;
/* {{{ proto string hw_getusername(int link)
Returns the current user name */
-void php3_hw_getusername(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getusername) {
pval *arg1;
int link, type;
hw_connection *ptr;
/* {{{ proto void hw_identify(int link, string username, string password)
Identifies at Hyperwave server */
-void php3_hw_identify(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_identify) {
pval *arg1, *arg2, *arg3;
int link, type;
char *name, *passwd, *userdata;
/* {{{ proto array hw_objrec2array(string objrec)
Returns object array of object record*/
-void php3_hw_objrec2array(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_objrec2array) {
pval *arg1;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
/* {{{ proto string hw_array2objrec(array objarr)
Returns object record of object array */
-void php3_hw_array2objrec(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_array2objrec) {
pval *arg1;
char *objrec, *retobj;
/* {{{ proto array hw_incollections(int link, array objids, array collids, int para)
Returns object ids which are in collections */
-void php3_hw_incollections(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_incollections) {
pval *arg1, *arg2, *arg3, *arg4;
int type, link, i;
hw_connection *ptr;
/* {{{ proto void hw_inscoll(int link, int parentid, array objarr)
Inserts collection */
-void php3_hw_inscoll(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_inscoll) {
pval *arg1, *arg2, *arg3;
char *objrec;
int id, newid, type, link;
/* {{{ proto void hw_inscoll(int link, int parentid, array objarr [, string text])
Inserts document */
-void php3_hw_insdoc(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_insdoc) {
pval *argv[4];
char *objrec, *text;
int id, newid, type, link, argc;
/* {{{ proto int hw_getsrcbydestobj(int link, int destid)
Returns object id of source docuent by destination anchor */
-void php3_hw_getsrcbydestobj(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getsrcbydestobj) {
pval *arg1, *arg2;
int link, type, id;
int count;
/* {{{ proto string hw_getrellink(int link, int rootid, int sourceid, int destid)
Get link form source to dest relative to rootid */
-void php3_hw_getrellink(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(hw_getrellink) {
pval *arg1, *arg2, *arg3, *arg4;
int link, type;
int rootid, destid, sourceid;
php3_printf("HG-CSP Version: 7.17");
}
-void php3_hw_connection_info(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(hw_connection_info)
{
pval *arg1;
hw_connection *ptr;
extern hw_connection php3_hw_connection;
extern int php3_minit_hw(INIT_FUNC_ARGS);
-extern void php3_hw_connect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_pconnect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_close(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_root(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_info(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_error(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_errormsg(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_mv(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_cp(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_deleteobject(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_changeobject(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getparents(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getparentsobj(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_children(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_childrenobj(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getchildcoll(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getchildcollobj(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getobject(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getandlock(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_unlock(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_gettext(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_edittext(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getcgi(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getremote(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getremotechildren(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_pipedocument(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_pipecgi(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_insertdocument(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_docbyanchorobj(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_docbyanchor(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getobjectbyquery(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getobjectbyqueryobj(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getobjectbyquerycoll(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getobjectbyquerycollobj(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getchilddoccoll(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getchilddoccollobj(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getanchors(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getanchorsobj(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getusername(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_setlinkroot(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_inscoll(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_incollections(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_insertobject(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_insdoc(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_identify(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_free_document(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_new_document(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_output_document(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_document_size(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_document_attributes(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_document_bodytag(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_document_content(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_objrec2array(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_array2objrec(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_connection_info(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_info_hw(ZEND_MODULE_INFO_FUNC_ARGS);
-extern void php3_hw_getsrcbydestobj(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_getrellink(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_dummy(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_who(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_hw_stat(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(hw_connect);
+PHP_FUNCTION(hw_pconnect);
+PHP_FUNCTION(hw_close);
+PHP_FUNCTION(hw_root);
+PHP_FUNCTION(hw_info);
+PHP_FUNCTION(hw_error);
+PHP_FUNCTION(hw_errormsg);
+PHP_FUNCTION(hw_mv);
+PHP_FUNCTION(hw_cp);
+PHP_FUNCTION(hw_deleteobject);
+PHP_FUNCTION(hw_changeobject);
+PHP_FUNCTION(hw_getparents);
+PHP_FUNCTION(hw_getparentsobj);
+PHP_FUNCTION(hw_children);
+PHP_FUNCTION(hw_childrenobj);
+PHP_FUNCTION(hw_getchildcoll);
+PHP_FUNCTION(hw_getchildcollobj);
+PHP_FUNCTION(hw_getobject);
+PHP_FUNCTION(hw_getandlock);
+PHP_FUNCTION(hw_unlock);
+PHP_FUNCTION(hw_gettext);
+PHP_FUNCTION(hw_edittext);
+PHP_FUNCTION(hw_getcgi);
+PHP_FUNCTION(hw_getremote);
+PHP_FUNCTION(hw_getremotechildren);
+PHP_FUNCTION(hw_pipedocument);
+PHP_FUNCTION(hw_pipecgi);
+PHP_FUNCTION(hw_insertdocument);
+PHP_FUNCTION(hw_docbyanchorobj);
+PHP_FUNCTION(hw_docbyanchor);
+PHP_FUNCTION(hw_getobjectbyquery);
+PHP_FUNCTION(hw_getobjectbyqueryobj);
+PHP_FUNCTION(hw_getobjectbyquerycoll);
+PHP_FUNCTION(hw_getobjectbyquerycollobj);
+PHP_FUNCTION(hw_getchilddoccoll);
+PHP_FUNCTION(hw_getchilddoccollobj);
+PHP_FUNCTION(hw_getanchors);
+PHP_FUNCTION(hw_getanchorsobj);
+PHP_FUNCTION(hw_getusername);
+PHP_FUNCTION(hw_setlinkroot);
+PHP_FUNCTION(hw_inscoll);
+PHP_FUNCTION(hw_incollections);
+PHP_FUNCTION(hw_insertobject);
+PHP_FUNCTION(hw_insdoc);
+PHP_FUNCTION(hw_identify);
+PHP_FUNCTION(hw_free_document);
+PHP_FUNCTION(hw_new_document);
+PHP_FUNCTION(hw_output_document);
+PHP_FUNCTION(hw_document_size);
+PHP_FUNCTION(hw_document_attributes);
+PHP_FUNCTION(hw_document_bodytag);
+PHP_FUNCTION(hw_document_content);
+PHP_FUNCTION(hw_objrec2array);
+PHP_FUNCTION(hw_array2objrec);
+PHP_FUNCTION(hw_connection_info);
+void php3_info_hw(ZEND_MODULE_INFO_FUNC_ARGS);
+PHP_FUNCTION(hw_getsrcbydestobj);
+PHP_FUNCTION(hw_getrellink);
+PHP_FUNCTION(hw_dummy);
+PHP_FUNCTION(hw_who);
+PHP_FUNCTION(hw_stat);
#else
#define hw_module_ptr NULL
#endif /* HYPERWAVE */
/* type casts left out, put here to remove warnings in
msvc
*/
-extern void rfc822_date(char *date);
+void rfc822_date(char *date);
extern char *cpystr(const char *string);
extern unsigned long find_rightmost_bit (unsigned long *valptr);
-extern void fs_give (void **block);
-extern void *fs_get (size_t size);
+void fs_give (void **block);
+void *fs_get (size_t size);
int add_assoc_object(pval *arg, char *key, pval tmp);
int add_next_index_object(pval *arg, pval tmp);
void imap_add_body( pval *arg, BODY *body );
/* {{{ proto int imap_open(string mailbox, string user, string password [, int options])
Open an IMAP stream to a mailbox */
-void php3_imap_open(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_open)
{
pval *mailbox;
pval *user;
/* {{{ proto int imap_reopen(int stream_id, string mailbox [, int options])
Reopen IMAP stream to new mailbox */
-void php3_imap_reopen(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_reopen)
{
pval *streamind;
pval *mailbox;
/* {{{ proto int imap_append(int stream_id, string folder, string message [, string flags])
Append a string message to a specified mailbox */
-void php3_imap_append(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_append)
{
pval *streamind,*folder, *message,*flags;
int ind, ind_type;
/* {{{ proto imap_num_msg(int stream_id)
Gives the number of messages in the current mailbox */
-void php3_imap_num_msg(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_num_msg)
{
pval *streamind;
int ind, ind_type;
/* {{{ proto int imap_ping(int stream_id)
Check if the IMAP stream is still active */
-void php3_imap_ping(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_ping)
{
pval *streamind;
int ind, ind_type;
/* {{{ proto int imap_num_recent(int stream_id)
Gives the number of recent messages in current mailbox */
-void php3_imap_num_recent(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_num_recent)
{
pval *streamind;
int ind, ind_type;
/* {{{ proto int imap_expunge(int stream_id)
Delete all messages marked for deletion */
-void php3_imap_expunge(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_expunge)
{
pval *streamind;
int ind, ind_type;
/* {{{ proto int imap_close(int stream_id [, int options])
Close an IMAP stream */
-void php3_imap_close(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_close)
{
pval *options, *streamind;
int ind, ind_type;
/* {{{ proto array imap_headers(int stream_id)
Returns headers for all messages in a mailbox */
-void php3_imap_headers(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_headers)
{
pval *streamind;
int ind, ind_type;
/* {{{ proto imap_body(int stream_id, int msg_no [, int options])
Read the message body */
-void php3_imap_body(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_body)
{
pval *streamind, * msgno, *flags;
int ind, ind_type;
/* v--- add proto here when this function is done */
/* {{{ string imap_fetchtext_full(int stream_id, int msg_no [, int options])
Read the body of a message*/
-void php3_imap_fetchtext_full(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_fetchtext_full)
{
pval *streamind, * msgno, *flags;
int ind, ind_type;
/* {{{ proto int imap_mail_copy(int stream_id, int msg_no, string mailbox [, int options])
Copy specified message to a mailbox */
-void php3_imap_mail_copy(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_mail_copy)
{
pval *streamind,*seq, *folder, *options;
int ind, ind_type;
/* {{{ proto imap_mail_move(int stream_id, int msg_no, string mailbox)
Move specified message to a mailbox */
-void php3_imap_mail_move(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_mail_move)
{
pval *streamind,*seq, *folder;
int ind, ind_type;
/* {{{ proto int imap_createmailbox(int stream_id, string mailbox)
Create a new mailbox */
-void php3_imap_createmailbox(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_createmailbox)
{
pval *streamind, *folder;
int ind, ind_type;
/* {{{ proto int imap_renamemailbox(int stream_id, string old_name, string new_name)
Rename a mailbox */
-void php3_imap_renamemailbox(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_renamemailbox)
{
pval *streamind, *old, *new;
int ind, ind_type;
/* {{{ proto imap_deletemailbox(int stream_id, string mailbox)
Delete a mailbox */
-void php3_imap_deletemailbox(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_deletemailbox)
{
pval *streamind, *folder;
int ind, ind_type;
/* {{{ proto array imap_list(int stream_id, string ref, string pattern)
Read the list of mailboxes */
-void php3_imap_list(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_list)
{
pval *streamind, *ref, *pat;
int ind, ind_type;
/* {{{ proto imap_scan(int stream_id, string ref, string pattern, string content)
Read list of mailboxes containing a certain string */
-void php3_imap_listscan(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_listscan)
{
pval *streamind, *ref, *pat, *content;
int ind, ind_type;
/* {{{ proto object imap_check(int stream_id)
Get mailbox properties */
-void php3_imap_check(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_check)
{
pval *streamind;
int ind, ind_type;
/* {{{ proto int imap_delete(int stream_id, int msg_no)
Mark a message for deletion */
-void php3_imap_delete(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_delete)
{
pval *streamind, * msgno;
int ind, ind_type;
/* {{{ proto int imap_undelete(int stream_id, int msg_no)
Remove the delete flag from a message */
-void php3_imap_undelete(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_undelete)
{
pval *streamind, * msgno;
int ind, ind_type;
/* {{{ proto object imap_header(int stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])
Read the header of the message */
-void php3_imap_headerinfo(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_headerinfo)
{
pval *streamind, * msgno,to,tovals,from,fromvals,reply_to,reply_tovals,sender;
pval *fromlength;
/* KMLANG */
/* {{{ proto array imap_lsub(int stream_id, string ref, string pattern)
Return a list of subscribed mailboxes */
-void php3_imap_lsub(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_lsub)
{
pval *streamind, *ref, *pat;
int ind, ind_type;
/* {{{ proto int imap_subscribe(int stream_id, string mailbox)
Subscribe to a mailbox */
-void php3_imap_subscribe(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_subscribe)
{
pval *streamind, *folder;
int ind, ind_type;
/* {{{ proto int imap_unsubscribe(int stream_id, string mailbox)
Unsubscribe from a mailbox */
-void php3_imap_unsubscribe(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_unsubscribe)
{
pval *streamind, *folder;
int ind, ind_type;
/* {{{ proto object imap_fetchstructure(int stream_id, int msg_no [, int options])
Read the full structure of a message */
-void php3_imap_fetchstructure(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_fetchstructure)
{
pval *streamind, *msgno,*flags;
int ind, ind_type;
/* {{{ proto string imap_fetchbody(int stream_id, int msg_no, int section [, int options])
Get a specific body section */
-void php3_imap_fetchbody(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_fetchbody)
{
pval *streamind, *msgno, *sec,*flags;
int ind, ind_type;
/* {{{ proto string imap_base64(string text)
Decode BASE64 encoded text */
-void php3_imap_base64(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_base64)
{
pval *text;
char *decode;
/* {{{ proto string imap_qprint(string text)
Convert a quoted-printable string to an 8-bit string */
-void php3_imap_qprint(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_qprint)
{
pval *text;
char *decode;
/* {{{ proto string imap_8bit(string text)
Convert an 8-bit string to a quoted-printable string */
-void php3_imap_8bit(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_8bit)
{
pval *text;
char *decode;
/* {{{ proto string imap_binary(string text)
Convert an 8bit string to a base64 string */
-void php3_imap_binary(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_binary)
{
pval *text;
unsigned long len;
/* {{{ proto array imap_mailboxmsginfo(int stream_id)
Returns info about the current mailbox in an associative array */
-void php3_imap_mailboxmsginfo(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_mailboxmsginfo)
{
pval *streamind;
char date[50];
/* {{{ proto string imap_rfc822_write_address(string mailbox, string host, string personal)
Returns a properly formatted email address given the mailbox, host, and personal info */
-void php3_imap_rfc822_write_address(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_rfc822_write_address)
{
pval *mailbox,*host,*personal;
ADDRESS *addr;
/* {{{ proto array imap_rfc822_parse_adrlist(string address_string, string default_host)
Parses an address string */
-void php3_imap_rfc822_parse_adrlist(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_rfc822_parse_adrlist)
{
pval *string,*defaulthost,tovals;
ADDRESS *addresstmp;
/* {{{ proto int imap_setflag_full(int stream_id, string sequence, string flag [, int options])
Sets flags on messages */
-void php3_imap_setflag_full(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_setflag_full)
{
pval *streamind;
pval *sequence;
/* {{{ proto imap_clearflag_full(int stream_id, string sequence, string flag [, int options])
Clears flags on messages */
-void php3_imap_clearflag_full(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_clearflag_full)
{
pval *streamind;
pval *sequence;
/* {{{ proto array imap_sort(int stream_id, int criteria, int reverse [, int options])
Sort an array of message headers */
-void php3_imap_sort(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_sort)
{
pval *streamind;
pval *pgm;
/* {{{ proto string imap_fetchheader(int stream_id, int msg_no [, int options])
Get the full unfiltered header for a message */
-void php3_imap_fetchheader(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_fetchheader)
{
pval *streamind, * msgno, * flags;
int ind, ind_type;
/* {{{ proto int imap_uid(int stream_id, int msg_no)
Get the unique message id associated with a standard sequential message number */
-void php3_imap_uid(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_uid)
{
pval *streamind, *msgno;
int ind, ind_type;
/* {{{ proto int imap_msgno(int stream_id, int unique_msg_id)
Get the sequence number associated with a UID */
-void php3_imap_msgno(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_msgno)
{
pval *streamind, *msgno;
int ind, ind_type;
/* {{{ proto object imap_status(int stream_id, string mailbox, int options)
Get status info from a mailbox */
-void php3_imap_status(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_status)
{
pval *streamind, *mbx, *flags;
int ind, ind_type;
/* {{{ proto object imap_bodystruct(int stream_id, int msg_no, int section)
Read the structure of a specified body section of a specific message */
-void php3_imap_bodystruct(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_bodystruct)
{
pval *streamind, *msg, *section;
int ind, ind_type;
/* {{{ proto array imap_fetch_overview(int stream_id, int msg_no)
Read an overview of the information in the headers of the given message */
-void php3_imap_fetch_overview(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_fetch_overview)
{
pval *streamind, *sequence;
int ind, ind_type;
/* {{{ proto string imap_mail_compose(array envelope, array body)
Create a MIME message based on given envelope and body sections */
-void php3_imap_mail_compose(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(imap_mail_compose)
{
pval *envelope, *body;
char *key;
#define php3_imap_module_ptr &php3_imap_module_entry
extern int imap_init(INIT_FUNC_ARGS);
-extern void imap_info(void);
-void php3_imap_open(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_reopen(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_close(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_num_msg(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_headers(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_body(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_expunge(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_delete(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_undelete(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_check(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_headerinfo(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_mail_copy(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_mail_move(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_createmailbox(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_renamemailbox(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_deletemailbox(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_list(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_listscan(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_lsub(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_subscribe(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_unsubscribe(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_num_recent(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_fetchstructure(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_fetchbody(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_append(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_ping(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_base64(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_qprint(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_8bit(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_binary(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_mailboxmsginfo(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_rfc822_write_address(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_rfc822_parse_adrlist(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_setflag_full(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_clearflag_full(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_sort(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_fetchtext(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_fetchheader(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_uid(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_msgno(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_fetchtext_full(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_status(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_bodystruct(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_fetch_overview(INTERNAL_FUNCTION_PARAMETERS);
-void php3_imap_mail_compose(INTERNAL_FUNCTION_PARAMETERS);
+void imap_info(void);
+PHP_FUNCTION(imap_open);
+PHP_FUNCTION(imap_reopen);
+PHP_FUNCTION(imap_close);
+PHP_FUNCTION(imap_num_msg);
+PHP_FUNCTION(imap_headers);
+PHP_FUNCTION(imap_body);
+PHP_FUNCTION(imap_expunge);
+PHP_FUNCTION(imap_delete);
+PHP_FUNCTION(imap_undelete);
+PHP_FUNCTION(imap_check);
+PHP_FUNCTION(imap_headerinfo);
+PHP_FUNCTION(imap_mail_copy);
+PHP_FUNCTION(imap_mail_move);
+PHP_FUNCTION(imap_createmailbox);
+PHP_FUNCTION(imap_renamemailbox);
+PHP_FUNCTION(imap_deletemailbox);
+PHP_FUNCTION(imap_list);
+PHP_FUNCTION(imap_listscan);
+PHP_FUNCTION(imap_lsub);
+PHP_FUNCTION(imap_subscribe);
+PHP_FUNCTION(imap_unsubscribe);
+PHP_FUNCTION(imap_num_recent);
+PHP_FUNCTION(imap_fetchstructure);
+PHP_FUNCTION(imap_fetchbody);
+PHP_FUNCTION(imap_append);
+PHP_FUNCTION(imap_ping);
+PHP_FUNCTION(imap_base64);
+PHP_FUNCTION(imap_qprint);
+PHP_FUNCTION(imap_8bit);
+PHP_FUNCTION(imap_binary);
+PHP_FUNCTION(imap_mailboxmsginfo);
+PHP_FUNCTION(imap_rfc822_write_address);
+PHP_FUNCTION(imap_rfc822_parse_adrlist);
+PHP_FUNCTION(imap_setflag_full);
+PHP_FUNCTION(imap_clearflag_full);
+PHP_FUNCTION(imap_sort);
+PHP_FUNCTION(imap_fetchtext);
+PHP_FUNCTION(imap_fetchheader);
+PHP_FUNCTION(imap_uid);
+PHP_FUNCTION(imap_msgno);
+PHP_FUNCTION(imap_fetchtext_full);
+PHP_FUNCTION(imap_status);
+PHP_FUNCTION(imap_bodystruct);
+PHP_FUNCTION(imap_fetch_overview);
+PHP_FUNCTION(imap_mail_compose);
#else
#define php3_imap_module_ptr NULL
-
+#define phpext_imap_ptr php3_imap_module_ptr
#endif
#include "php.h"
-#include "internal_functions.h"
#include "php3_string.h"
#include "build-defs.h"
-#include "php3_ifx.h"
+#include "php_informix.h"
#if HAVE_IFX
/* }}} */
-void php3_ifx_connect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_connect)
{
php3_ifx_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0);
}
-void php3_ifx_pconnect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_pconnect)
{
php3_ifx_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
}
/* {{{ proto int ifx_close(int connid)
close informix connection */
-void php3_ifx_close(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_close)
{
pval *ifx_link;
int id,type;
/* {{{ proto int ifx_query(string query, int connid, [int cursortype], [array idarray])
perform a query on a given connection */
-void php3_ifx_query(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_query)
{
pval *query,*ifx_link, *cursortype, *dummy;
int id,type;
/* {{{ proto int ifx_prepare(string query, int connid, [int cursortype], [array idarray])
prepare a query on a given connection */
-void php3_ifx_prepare(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_prepare)
{
pval *query,*ifx_link, *cursortype, *dummy;
/* {{{ proto int ifx_do(int resultid)
executes a previously prepared query or opens a cursor for it */
-void php3_ifx_do(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_do)
{
pval *result;
int type;
/* {{{ proto string ifx_error();
returns the Informix error codes (SQLSTATE & SQLCODE) */
-void php3_ifx_error(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_error)
{
pval *ifx_link;
int id,type;
/* {{{ proto string ifx_errormsg([int errorcode])
returns the Informix errormessage associated with */
-void php3_ifx_errormsg(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_errormsg)
{
pval *errcode;
/* {{{ proto int ifx_affected_rows(int resultid)
returns the number of rows affected by query identified by resultid */
-void php3_ifx_affected_rows(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_affected_rows)
{
pval *result;
int type;
/* {{{ array ifx_fetch_row(int resultid, [mixed position])
fetches the next row or <position> row if using a scroll cursor */
-void php3_ifx_fetch_row(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_fetch_row)
{
pval *result, *position;
IFX_RES *Ifx_Result;
/* {{{ proto int ifx_htmltbl_result(int resultid, [string htmltableoptions])
formats all rows of the $resultid query into a html table */
-void php3_ifx_htmltbl_result(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_htmltbl_result)
{
pval *result, *arg2;
IFX_RES *Ifx_Result;
/* {{{ proto array ifx_fieldtypes(int resultid)
returns an associative array with fieldnames as key for query <resultid> */
-void php3_ifx_fieldtypes(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_fieldtypes)
{
pval *result, *arg2;
IFX_RES *Ifx_Result;
/* {{{ proto array ifx_fieldproperties(int resultid)
returns an associative for query <resultid> array with fieldnames as key */
-void php3_ifx_fieldproperties(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_fieldproperties)
{
pval *result, *arg2;
IFX_RES *Ifx_Result;
/* {{{ proto int ifx_num_rows(int resultid)
returns the number of rows already fetched for query identified by resultid */
-void php3_ifx_num_rows(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_num_rows)
{
pval *result;
IFX_RES *Ifx_Result;
/* {{{ proto int ifx_num_fields(int resultid)
returns the number of columns in query resultid */
-void php3_ifx_num_fields(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_num_fields)
{
pval *result;
IFX_RES *Ifx_Result;
/* {{{ proto int ifx_free_result(int resultid)
releases resources for query associated with resultid */
-void php3_ifx_free_result(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ifx_free_result)
{
pval *result;
IFX_RES *Ifx_Result;
/* {{{ proto int ifx_create_blob(int type, int mode, string param)
creates a blob-object */
-void php3_ifx_create_blob(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifx_create_blob) {
pval *pmode, *pparam,*ptype;
long id;
long mode,type;
/* {{{ proto int ifx_copy_blob(int bid)
duplicates the given blob-object */
-void php3_ifx_copy_blob(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifx_copy_blob) {
pval *pbid;
long newid;
/* {{{ proto int ifx_free_blob(int bid)
deletes the blob-object */
-void php3_ifx_free_blob(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifx_free_blob) {
pval *pid;
long ret;
/* {{{ proto string ifx_get_blob(int bid)
returns the content of the blob-object */
-void php3_ifx_get_blob(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifx_get_blob) {
pval *pbid;
char *content;
long len;
/* {{{ proto int update_blob(int bid, string content)
updates the content of the blob-object */
-void php3_ifx_update_blob(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifx_update_blob) {
pval *pbid,*pparam;
long ret;
/* {{{ proto void ifx_blobinfile_mode(int mode)
sets the default blob-mode for all select-queries */
-void php3_ifx_blobinfile_mode(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifx_blobinfile_mode) {
pval *pmode;
/* {{{ proto void ifx_textasvarchar(int mode)
sets the default text-mode for all select-queries */
-void php3_ifx_textasvarchar(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifx_textasvarchar) {
pval *pmode;
/* {{{ proto void ifx_byteasvarchar(int mode)
sets the default byte-mode for all select-queries */
-void php3_ifx_byteasvarchar(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifx_byteasvarchar) {
pval *pmode;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
/* {{{ proto void ifx_nullformat(int mode)
sets the default return value of a NULL-value un a fetch-row */
-void php3_ifx_nullformat(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifx_nullformat) {
pval *pmode;
/* {{{ proto int ifx_create_char(string param)
creates a char-object */
-void php3_ifx_create_char(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifx_create_char) {
pval *pparam;
long id;
/* {{{ proto string ifx_get_char(int bid)
returns the content of the char-object */
-void php3_ifx_get_char(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifx_get_char) {
pval *pbid;
char *content;
long len;
/* {{{ proto int ifx_free_char(int bid)
deletes the char-object */
-void php3_ifx_free_char(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifx_free_char) {
pval *pid;
long ret;
/* {{{ proto int ifx_update_char(int bid, string content)
updates the content of the char-object */
-void php3_ifx_update_char(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifx_update_char) {
pval *pbid,*pparam;
long ret;
/* {{{ proto int ifxus_create_slob(int mode)
creates a slob-object and opens it */
-void php3_ifxus_create_slob(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifxus_create_slob) {
pval *pmode;
long id;
long mode,create_mode;
/* {{{ proto int ifxus_free_slob(int bid)
deletes the slob-object */
-void php3_ifxus_free_slob(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifxus_free_slob) {
pval *pid;
long ret;
/* {{{ proto int ifxus_close_slob(int bid)
deletes the slob-object */
-void php3_ifxus_close_slob(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifxus_close_slob) {
pval *pid;
long ret;
/* {{{ proto int ifxus_open_slob(long bid, int mode)
opens an slob-object */
-void php3_ifxus_open_slob(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifxus_open_slob) {
pval *pbid,*pmode;
long id;
long mode,create_mode;
/* {{{ proto int ifxus_tell_slob(long bid)
returns the current file or seek position of an open slob-object */
-void php3_ifxus_tell_slob(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifxus_tell_slob) {
pval *pbid;
long bid;
IFX_IDRES *Ifx_slob;
/* {{{ proto int ifxus_seek_slob(long bid, int mode, long offset)
sets the current file or seek position of an open slob-object */
-void php3_ifxus_seek_slob(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifxus_seek_slob) {
pval *pbid, *pmode, *poffset;
long bid,lakt_seek_pos;
IFX_IDRES *Ifx_slob;
/* {{{ proto int ifxus_read_slob(long bid, long nbytes)
reads nbytes of the slob-object */
-void php3_ifxus_read_slob(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifxus_read_slob) {
pval *pbid, *pnbytes;
long bid, nbytes;
IFX_IDRES *Ifx_slob;
/* {{{ proto int ifxus_write_slob(long bid, string content)
writes a string into the slob-object */
-void php3_ifxus_write_slob(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(ifxus_write_slob) {
pval *pbid, *pcontent;
long bid, nbytes;
IFX_IDRES *Ifx_slob;
extern int php3_minit_ifx(INIT_FUNC_ARGS);
extern int php3_rinit_ifx(INIT_FUNC_ARGS);
extern int php3_mshutdown_ifx(SHUTDOWN_FUNC_ARGS);
-extern void php3_info_ifx(ZEND_MODULE_INFO_FUNC_ARGS);
-extern void php3_ifx_connect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_pconnect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_close(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_query(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_prepare(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_do(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_error(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_errormsg(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_affected_rows(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_num_rows(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_num_fields(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_fetch_row(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_free_result(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_htmltbl_result(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_fieldtypes(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_fieldproperties(INTERNAL_FUNCTION_PARAMETERS);
+void php3_info_ifx(ZEND_MODULE_INFO_FUNC_ARGS);
+PHP_FUNCTION(ifx_connect);
+PHP_FUNCTION(ifx_pconnect);
+PHP_FUNCTION(ifx_close);
+PHP_FUNCTION(ifx_query);
+PHP_FUNCTION(ifx_prepare);
+PHP_FUNCTION(ifx_do);
+PHP_FUNCTION(ifx_error);
+PHP_FUNCTION(ifx_errormsg);
+PHP_FUNCTION(ifx_affected_rows);
+PHP_FUNCTION(ifx_num_rows);
+PHP_FUNCTION(ifx_num_fields);
+PHP_FUNCTION(ifx_fetch_row);
+PHP_FUNCTION(ifx_free_result);
+PHP_FUNCTION(ifx_htmltbl_result);
+PHP_FUNCTION(ifx_fieldtypes);
+PHP_FUNCTION(ifx_fieldproperties);
long php3_intifx_getType(long id, HashTable *list);
-extern void php3_ifx_create_blob(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ifx_create_blob);
long php3_intifx_create_blob(long type, long mode, char* param, long len, HashTable *list);
-extern void php3_ifx_free_blob(INTERNAL_FUNCTION_PARAMETERS) ;
+PHP_FUNCTION(ifx_free_blob) ;
long php3_intifx_free_blob(long id, HashTable *list);
long php3_intifx2_free_blob(long id, HashTable *list);
-extern void php3_ifx_get_blob(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ifx_get_blob);
long php3_intifx_get_blob(long bid, HashTable *list, char** content);
-extern void php3_ifx_update_blob(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ifx_update_blob);
long php3_intifx_update_blob(long bid, char* param, long len, HashTable *list);
loc_t *php3_intifx_get_blobloc(long bid, HashTable *list);
char* php3_intifx_create_tmpfile(long bid);
-extern void php3_ifx_blobinfile_mode(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_copy_blob(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ifx_blobinfile_mode);
+PHP_FUNCTION(ifx_copy_blob);
long php3_intifx_copy_blob(long bid, HashTable *list);
-extern void php3_ifx_textasvarchar(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_byteasvarchar(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifx_nullformat(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ifx_textasvarchar);
+PHP_FUNCTION(ifx_byteasvarchar);
+PHP_FUNCTION(ifx_nullformat);
char* php3_intifx_null();
-extern void php3_ifx_create_char(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ifx_create_char);
long php3_intifx_create_char(char* param, long len, HashTable *list);
-extern void php3_ifx_free_char(INTERNAL_FUNCTION_PARAMETERS) ;
+PHP_FUNCTION(ifx_free_char) ;
long php3_intifx_free_char(long id, HashTable *list);
-extern void php3_ifx_update_char(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ifx_update_char);
long php3_intifx_update_char(long bid, char* param, long len, HashTable *list);
-extern void php3_ifx_get_char(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ifx_get_char);
long php3_intifx_get_char(long bid, HashTable *list, char** content);
#if HAVE_IFX_IUS
-extern void php3_ifxus_create_slob(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ifxus_create_slob);
long php3_intifxus_create_slob(long create_mode, HashTable *list);
-extern void php3_ifxus_free_slob(INTERNAL_FUNCTION_PARAMETERS) ;
+PHP_FUNCTION(ifxus_free_slob) ;
long php3_intifxus_free_slob(long bid, HashTable *list);
-extern void php3_ifxus_close_slob(INTERNAL_FUNCTION_PARAMETERS) ;
+PHP_FUNCTION(ifxus_close_slob) ;
long php3_intifxus_close_slob(long bid, HashTable *list);
-extern void php3_ifxus_open_slob(INTERNAL_FUNCTION_PARAMETERS) ;
+PHP_FUNCTION(ifxus_open_slob) ;
long php3_intifxus_open_slob(long bid, long create_mode, HashTable *list);
long php3_intifxus_new_slob(HashTable *list);
ifx_lo_t *php3_intifxus_get_slobloc(long bid, HashTable *list);
-extern void php3_ifxus_read_slob(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifxus_write_slob(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifxus_seek_slob(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ifxus_tell_slob(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ifxus_read_slob);
+PHP_FUNCTION(ifxus_write_slob);
+PHP_FUNCTION(ifxus_seek_slob);
+PHP_FUNCTION(ifxus_tell_slob);
#endif
typedef struct {
#endif
+#define phpext_informix_ptr ifx_module_ptr
+
#endif /* _PHP3_IFX_H */
/* {{{ proto int ibase_connect(string database [, string username] [, string password])
Open a connection to an InterBase database */
-void php3_ibase_connect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ibase_connect)
{
_php3_ibase_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
/* {{{ proto int ibase_pconnect(string database [, string username] [, string password])
Open a persistent connection to an InterBase database */
-void php3_ibase_pconnect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ibase_pconnect)
{
_php3_ibase_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
/* {{{ proto int ibase_close([int link_identifier])
Close an InterBase connection */
-void php3_ibase_close(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ibase_close)
{
pval *ibase_link;
int id, type;
/* {{{ proto int ibase_query([int link_identifier, ]string query)
Execute a query (without parameter placeholders). */
-void php3_ibase_query(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ibase_query)
{
pval *query, *ibase_link;
int id, type;
/* {{{ proto int ibase_fetch_row(int result)
Fetch a row from the results of a query. */
-void php3_ibase_fetch_row(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ibase_fetch_row)
{
pval *result;
pval *pval_ptr;
/* {{{ proto int ibase_free_result(int result)
Free the memory used by a result. */
-void php3_ibase_free_result(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ibase_free_result)
{
pval *result;
ibase_result_handle *ibase_result;
/* {{{ proto int ibase_prepare([int link_identifier, ]string query)
Prepare a query for later binding of parameter placeholders and execution. */
-void php3_ibase_prepare(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ibase_prepare)
{
pval *query, *ibase_link;
int id, type;
/* {{{ proto int ibase_bind (int query)
Bind parameter placeholders in a previously prepared query. Still nonfunctional. */
-void php3_ibase_bind(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ibase_bind)
{
pval *query;
ibase_query_handle *ibase_query;
/* {{{ proto int ibase_execute(int query)
Execute a previously prepared (and possibly binded) query. */
-void php3_ibase_execute(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ibase_execute)
{
pval *query;
ibase_query_handle *ibase_query;
/* {{{ proto int ibase_free_query(int query)
Free memory used by a query */
-void php3_ibase_free_query(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ibase_free_query)
{
pval *query;
ibase_query_handle *ibase_query;
/* {{{ proto int ibase_timefmt(string format)
Sets the format of datetime columns returned from queries. Still nonfunctional. */
-void php3_ibase_timefmt(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ibase_timefmt)
{
pval *pmode;
IBASE_TLS_VARS;
extern int php3_minit_ibase(INIT_FUNC_ARGS);
extern int php3_rinit_ibase(INIT_FUNC_ARGS);
extern int php3_mfinish_ibase(void);
-extern void php3_info_ibase(ZEND_MODULE_INFO_FUNC_ARGS);
-extern void php3_ibase_connect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ibase_pconnect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ibase_close(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ibase_query(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ibase_fetch_row(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ibase_free_result(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ibase_prepare(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ibase_bind(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ibase_execute(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ibase_free_query(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ibase_timefmt(INTERNAL_FUNCTION_PARAMETERS);
+void php3_info_ibase(ZEND_MODULE_INFO_FUNC_ARGS);
+PHP_FUNCTION(ibase_connect);
+PHP_FUNCTION(ibase_pconnect);
+PHP_FUNCTION(ibase_close);
+PHP_FUNCTION(ibase_query);
+PHP_FUNCTION(ibase_fetch_row);
+PHP_FUNCTION(ibase_free_result);
+PHP_FUNCTION(ibase_prepare);
+PHP_FUNCTION(ibase_bind);
+PHP_FUNCTION(ibase_execute);
+PHP_FUNCTION(ibase_free_query);
+PHP_FUNCTION(ibase_timefmt);
typedef struct {
long default_link;
#endif /* HAVE_IBASE */
+#define phpext_interbase_ptr php3_ibase_module_ptr
+
#endif /* _PHP3_IBASE_H */
/*
+----------------------------------------------------------------------+
| PHP HTML Embedded Scripting Language Version 3.0 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997,1998 PHP Development Team (See Credits file) |
+ | Copyright (c) 1997-1999 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: |
| Authors: Amitay Isaacs <amitay@w-o-i.com> |
| Eric Warnke <ericw@albany.edu> |
| Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+ | Gerrit Thomson <334647@swin.edu.au> |
+----------------------------------------------------------------------+
*/
{"ldap_add", php3_ldap_add, NULL},
{"ldap_delete", php3_ldap_delete, NULL},
{"ldap_modify", php3_ldap_modify, NULL},
+/* additional functions for attribute based modifications, Gerrit Thomson */
+ {"ldap_mod_add", php3_ldap_mod_add, NULL},
+ {"ldap_mod_replace", php3_ldap_mod_replace, NULL},
+ {"ldap_mod_del", php3_ldap_mod_del, NULL},
+/* end gjt mod */
{NULL, NULL, NULL}
};
/* {{{ proto int ldap_connect([string host [, int port]])
Connect to an LDAP server */
-void php3_ldap_connect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_connect)
{
char *host;
int port;
}
#if 0
-void php3_ber_free(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ber_free)
{
pval *berp;
/* {{{ proto int ldap_bind(int link [, string dn, string password])
Bind to LDAP directory */
-void php3_ldap_bind(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_bind)
{
pval *link, *bind_rdn, *bind_pw;
char *ldap_bind_rdn, *ldap_bind_pw;
/* {{{ proto int ldap_unbind(int link)
Unbind from LDAP directory */
-void php3_ldap_unbind(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_unbind)
{
pval *link;
LDAP *ldap;
return;
}
-/* {{{ proto int ldap_read(int link, string base_dn, string filter [, string attributes])
+/* {{{ proto int ldap_read(int link, string base_dn, string filter [, array attributes])
Read an entry */
-void php3_ldap_read(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_read)
{
php3_ldap_do_search(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_SCOPE_BASE);
}
/* }}} */
-/* {{{ proto int ldap_list(int link, string base_dn, string filter [, string attributes])
+/* {{{ proto int ldap_list(int link, string base_dn, string filter [, array attributes])
Single-level search */
-void php3_ldap_list(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_list)
{
php3_ldap_do_search(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_SCOPE_ONELEVEL);
}
/* }}} */
-/* {{{ proto int ldap_search(int link, string base_dn, string filter [, string attributes])
+/* {{{ proto int ldap_search(int link, string base_dn, string filter [, array attributes])
Search LDAP tree under base_dn */
-void php3_ldap_search(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_search)
{
php3_ldap_do_search(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_SCOPE_SUBTREE);
}
/* {{{ proto int ldap_free_result(int result)
Free result memory */
-void php3_ldap_free_result(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_free_result)
{
pval *result;
LDAPMessage *ldap_result;
/* {{{ proto int ldap_count_entries(int link, int result)
Count the number of entries in a search result */
-void php3_ldap_count_entries(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_count_entries)
{
pval *result, *link;
LDAP *ldap;
/* {{{ proto int ldap_first_entry(int link, int result)
Return first result id */
-void php3_ldap_first_entry(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_first_entry)
{
pval *result, *link;
LDAP *ldap;
/* {{{ proto int ldap_next_entry(int link, int entry)
Get next result entry */
-void php3_ldap_next_entry(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_next_entry)
{
pval *result_entry, *link;
LDAP *ldap;
/* {{{ proto array ldap_get_entries(int link, int result)
Get all result entries */
-void php3_ldap_get_entries(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_get_entries)
{
pval *link, *result;
LDAPMessage *ldap_result, *ldap_result_entry;
/* {{{ proto string ldap_first_attribute(int link, int result, int ber)
Return first attribute */
-void php3_ldap_first_attribute(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_first_attribute)
{
pval *result,*link,*berp;
LDAP *ldap;
/* {{{ proto string ldap_next_attribute(int link, int result, int ber)
Get the next attribute in result */
-void php3_ldap_next_attribute(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_next_attribute)
{
pval *result,*link,*berp;
LDAP *ldap;
/* {{{ proto array ldap_get_attributes(int link, int result)
Get attributes from a search result entry */
-void php3_ldap_get_attributes(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_get_attributes)
{
pval *link, *result_entry;
pval tmp;
/* {{{ proto array ldap_get_values(int link, int result, string attribute)
Get all values from a result entry */
-void php3_ldap_get_values(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_get_values)
{
pval *link, *result_entry, *attr;
LDAP *ldap;
/* {{{ proto string ldap_get_dn(int link, int result)
Get the DN of a result entry */
-void php3_ldap_get_dn(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_get_dn)
{
pval *link,*entryp;
LDAP *ld;
/* {{{ proto array ldap_explode_dn(string dn, int with_attrib)
Splits DN into its component parts */
-void php3_ldap_explode_dn(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_explode_dn)
{
pval *dn, *with_attrib;
char **ldap_value;
/* {{{ proto string ldap_dn2ufn(string dn)
Convert DN to User Friendly Naming format */
-void php3_ldap_dn2ufn(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_dn2ufn)
{
pval *dn;
char *ufn;
}
}
/* }}} */
-
+
+/* added to fix use of ldap_modify_add for doing an ldap_add, gerrit thomson. */
+#define PHP_LD_FULL_ADD 0xff
+
static void php3_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper)
{
int i, j, num_attribs, num_values;
char *attribute;
ulong index;
-
+int is_full_add=0; /* flag for full add operation so ldap_mod_add can be put back into oper, gerrit THomson */
+
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &link, &dn, &entry) == FAILURE) {
WRONG_PARAM_COUNT;
}
ldap_mods = emalloc((num_attribs+1) * sizeof(LDAPMod *));
_php3_hash_internal_pointer_reset(entry->value.ht);
+ /* added by gerrit thomson to fix ldap_add using ldap_mod_add */
+ if ( oper == PHP_LD_FULL_ADD )
+ {
+ oper = LDAP_MOD_ADD;
+ is_full_add = 1;
+ }
+ /* end additional , gerrit thomson */
for(i=0; i<num_attribs; i++) {
ldap_mods[i] = emalloc(sizeof(LDAPMod));
}
ldap_mods[i]->mod_values = emalloc((num_values+1) * sizeof(char *));
-
- if (num_values == 1) {
+
+/* allow for arrays with one element, no allowance for arrays with none but probably not required, gerrit thomson. */
+/* if (num_values == 1) {*/
+ if ((num_values == 1) && (value->type != IS_ARRAY)) {
convert_to_string(value);
ldap_mods[i]->mod_values[0] = value->value.str.val;
} else {
}
ldap_mods[num_attribs] = NULL;
- if (oper == LDAP_MOD_ADD) {
+/* check flag to see if do_mod was called to perform full add , gerrit thomson */
+/* if (oper == LDAP_MOD_ADD) { */
+ if (is_full_add == 1) {
if (ldap_add_s(ldap, ldap_dn, ldap_mods) != LDAP_SUCCESS) {
ldap_perror(ldap, "LDAP");
php3_error(E_WARNING, "LDAP: add operation could not be completed.");
/* {{{ proto int ldap_add(int link, string dn, array entry)
Add entries to LDAP directory */
-void php3_ldap_add(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_add)
{
- php3_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_ADD);
+ /* use a newly define parameter into the do_modify so ldap_mod_add can be used the way it is supposed to be used , Gerrit THomson */
+ /* php3_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_ADD);*/
+ php3_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_LD_FULL_ADD);
}
/* }}} */
/* {{{ proto int ldap_modify(int link, string dn, array entry)
Modify an LDAP entry */
-void php3_ldap_modify(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_modify)
{
php3_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_REPLACE);
}
/* }}} */
+
+/* three functions for attribute base modifications, gerrit Thomson */
+
+
+
+/* {{{ proto int ldap_mod_replace(int link, string dn, array entry)
+ Replace attribute values with new ones */
+PHP_FUNCTION(ldap_mod_replace)
+{
+ php3_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_REPLACE);}
+/* }}} */
+
+/* {{{ proto int ldap_mod_add(int link, string dn, array entry)
+ Add attribute values to current */
+PHP_FUNCTION(ldap_mod_add)
+{
+ php3_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_ADD);
+}
+/* }}} */
+
+/* {{{ proto int ldap_mod_del(int link, string dn, array entry)
+ Delete attribute values */
+PHP_FUNCTION(ldap_mod_del)
+{
+ php3_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_DELETE);
+}
+
+/* end of attribute based functions , gerrit thomson */
+
+
/* {{{ proto int ldap_delete(int link, string dn)
Delete an entry from a directory */
-void php3_ldap_delete(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ldap_delete)
{
pval *link, *dn;
LDAP *ldap;
#define ldap_module_ptr &ldap_module_entry
/* LDAP functions */
-extern int php3_minit_ldap(INIT_FUNC_ARGS);
-extern int php3_mshutdown_ldap(SHUTDOWN_FUNC_ARGS);
+int php3_minit_ldap(INIT_FUNC_ARGS);
+int php3_mshutdown_ldap(SHUTDOWN_FUNC_ARGS);
-extern void php3_info_ldap(ZEND_MODULE_INFO_FUNC_ARGS);
+void php3_info_ldap(ZEND_MODULE_INFO_FUNC_ARGS);
-extern void php3_ldap_connect(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ldap_connect);
-extern void php3_ldap_bind(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ldap_unbind(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ldap_bind);
+PHP_FUNCTION(ldap_unbind);
-extern void php3_ldap_read(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ldap_list(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ldap_search(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ldap_read);
+PHP_FUNCTION(ldap_list);
+PHP_FUNCTION(ldap_search);
-extern void php3_ldap_free_result(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ldap_count_entries(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ldap_free_result);
+PHP_FUNCTION(ldap_count_entries);
-extern void php3_ldap_first_entry(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ldap_next_entry(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ldap_get_entries(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ldap_first_entry);
+PHP_FUNCTION(ldap_next_entry);
+PHP_FUNCTION(ldap_get_entries);
#if 0
-extern void php3_ldap_free_entry(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ldap_free_entry);
#endif
-extern void php3_ldap_first_attribute(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ldap_next_attribute(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ldap_get_attributes(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ldap_first_attribute);
+PHP_FUNCTION(ldap_next_attribute);
+PHP_FUNCTION(ldap_get_attributes);
-extern void php3_ldap_get_values(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ldap_get_values);
-extern void php3_ber_free(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ldap_get_dn(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ldap_explode_dn(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ldap_dn2ufn(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ber_free);
+PHP_FUNCTION(ldap_get_dn);
+PHP_FUNCTION(ldap_explode_dn);
+PHP_FUNCTION(ldap_dn2ufn);
-extern void php3_ldap_add(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ldap_delete(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_ldap_modify(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(ldap_add);
+PHP_FUNCTION(ldap_delete);
+PHP_FUNCTION(ldap_modify);
typedef struct {
long default_link;
#endif
+#define phpext_ldap_ptr ldap_module_ptr
+
#endif /* _PHP3_LDAP_H */
/* {{{ proto int msql_connect([string hostname[:port]] [, string username] [, string password])
Open a connection to an mSQL Server */
-DLEXPORT void php3_msql_connect(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_connect)
{
php3_msql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0);
}
/* {{{ proto int msql_pconnect([string hostname[:port]] [, string username] [, string password])
Open a persistent connection to an mSQL Server */
-DLEXPORT void php3_msql_pconnect(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_pconnect)
{
php3_msql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
}
/* {{{ proto int msql_close([int link_identifier])
Close an mSQL connection */
-DLEXPORT void php3_msql_close(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_close)
{
pval *msql_link;
int id,type;
/* {{{ proto int msql_select_db(string database_name [, int link_identifier])
Select an mSQL database */
-DLEXPORT void php3_msql_select_db(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_select_db)
{
pval *db,*msql_link;
int id,type;
/* {{{ proto int msql_create_db(string database_name [, int link_identifier])
Create an mSQL database */
-DLEXPORT void php3_msql_create_db(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_create_db)
{
pval *db,*msql_link;
int id,type;
/* {{{ proto int msql_drop_db(string database_name [, int link_identifier])
Drop (delete) an mSQL database */
-DLEXPORT void php3_msql_drop_db(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_drop_db)
{
pval *db,*msql_link;
int id,type;
/* {{{ proto int msql_query(string query [, int link_identifier])
Send an SQL query to mSQL */
-DLEXPORT void php3_msql_query(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_query)
{
pval *query,*msql_link;
int id,type;
/* {{{ proto int msql_db_query(string database_name, string query [, int link_identifier])
Send an SQL query to mSQL */
-DLEXPORT void php3_msql_db_query(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_db_query)
{
pval *db,*query,*msql_link;
int id,type;
/* {{{ proto int msql_list_dbs([int link_identifier])
List databases available on an mSQL server */
-DLEXPORT void php3_msql_list_dbs(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_list_dbs)
{
pval *msql_link;
int id,type;
/* {{{ proto int msql_list_tables(string database_name [, int link_identifier])
List tables in an mSQL database */
-DLEXPORT void php3_msql_list_tables(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_list_tables)
{
pval *db,*msql_link;
int id,type;
/* {{{ proto int msql_list_fields(string database_name, string table_name [, int link_identifier])
List mSQL result fields */
-DLEXPORT void php3_msql_list_fields(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_list_fields)
{
pval *db,*table,*msql_link;
int id,type;
/* {{{ proto string msql_error([int link_identifier])
Returns the text of the error message from previous mSQL operation */
-void php3_msql_error(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(msql_error)
{
if (ARG_COUNT(ht)) {
WRONG_PARAM_COUNT;
/* {{{ proto int msql_result(int query, int row [, mixed field])
Get result data */
-DLEXPORT void php3_msql_result(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_result)
{
pval *result, *row, *field=NULL;
m_result *msql_result;
/* {{{ proto int msql_num_rows(int query)
Get number of rows in a result */
-DLEXPORT void php3_msql_num_rows(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_num_rows)
{
pval *result;
m_result *msql_result;
/* {{{ proto int msql_num_fields(int query)
Get number of fields in a result */
-DLEXPORT void php3_msql_num_fields(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_num_fields)
{
pval *result;
m_result *msql_result;
/* {{{ proto array msql_fetch_row(int query)
Get a result row as an enumerated array */
-DLEXPORT void php3_msql_fetch_row(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_fetch_row)
{
pval *result;
m_result *msql_result;
}
/* }}} */
-static void php3_msql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS)
+static PHP_FUNCTION(msql_fetch_hash)
{
pval *result;
m_result *msql_result;
/* {{{ proto object msql_fetch_object(int query)
Fetch a result row as an object */
-DLEXPORT void php3_msql_fetch_object(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_fetch_object)
{
php3_msql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU);
if (return_value->type==IS_ARRAY) {
/* {{{ proto array msql_fetch_array(int query)
Fetch a result row as an associative array */
-DLEXPORT void php3_msql_fetch_array(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_fetch_array)
{
php3_msql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* {{{ proto int msql_data_seek(int query, int row_number)
Move internal result pointer */
-DLEXPORT void php3_msql_data_seek(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_data_seek)
{
pval *result,*offset;
m_result *msql_result;
/* {{{ proto object msql_fetch_field(int query [, int field_offset])
Get column information from a result and return as an object */
-DLEXPORT void php3_msql_fetch_field(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_fetch_field)
{
pval *result, *field=NULL;
m_result *msql_result;
/* {{{ proto int msql_field_seek(int query, int field_offset)
Set result pointer to a specific field offset */
-DLEXPORT void php3_msql_field_seek(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_field_seek)
{
pval *result, *offset;
m_result *msql_result;
/* {{{ proto string msql_field_name(int query, int field_index)
Get the name of the specified field in a result */
-DLEXPORT void php3_msql_field_name(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_field_name)
{
php3_msql_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_MSQL_FIELD_NAME);
}
/* {{{ proto string msql_field_table(int query, int field_offset)
Get name of the table the specified field is in */
-DLEXPORT void php3_msql_field_table(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_field_table)
{
php3_msql_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_MSQL_FIELD_TABLE);
}
/* {{{ proto int msql_field_len(int query, int field_offet)
Returns the length of the specified field */
-DLEXPORT void php3_msql_field_len(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_field_len)
{
php3_msql_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_MSQL_FIELD_LEN);
}
/* {{{ proto string msql_field_type(int query, int field_offset)
Get the type of the specified field in a result */
-DLEXPORT void php3_msql_field_type(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_field_type)
{
php3_msql_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_MSQL_FIELD_TYPE);
}
/* {{{ proto string msql_field_flags(int query, int field_offset)
Get the flags associated with the specified field in a result */
-DLEXPORT void php3_msql_field_flags(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_field_flags)
{
php3_msql_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_MSQL_FIELD_FLAGS);
}
/* {{{ proto int msql_free_result(int query)
Free result memory */
-DLEXPORT void php3_msql_free_result(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_free_result)
{
pval *result;
m_result *msql_result;
/* {{{ proto int msql_affected_rows(int query)
Return number of affected rows */
-DLEXPORT void php3_msql_affected_rows(INTERNAL_FUNCTION_PARAMETERS)
+DLEXPORT PHP_FUNCTION(msql_affected_rows)
{
pval *result;
m_result *msql_result;
extern DLEXPORT int php3_rinit_msql(INIT_FUNC_ARGS);
extern DLEXPORT int php3_mshutdown_msql(SHUTDOWN_FUNC_ARGS);
extern DLEXPORT void php3_info_msql(ZEND_MODULE_INFO_FUNC_ARGS);
-extern DLEXPORT void php3_msql_connect(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_pconnect(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_close(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_select_db(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_create_db(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_drop_db(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_list_dbs(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_list_tables(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_list_fields(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_error(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_affected_rows(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_query(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_db_query(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_result(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_num_rows(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_num_fields(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_fetch_row(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_data_seek(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_fetch_field(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_field_seek(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_free_result(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_field_name(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_field_table(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_field_len(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_field_type(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_field_flags(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_fetch_array(INTERNAL_FUNCTION_PARAMETERS);
-extern DLEXPORT void php3_msql_fetch_object(INTERNAL_FUNCTION_PARAMETERS);
+extern DLEXPORT PHP_FUNCTION(msql_connect);
+extern DLEXPORT PHP_FUNCTION(msql_pconnect);
+extern DLEXPORT PHP_FUNCTION(msql_close);
+extern DLEXPORT PHP_FUNCTION(msql_select_db);
+extern DLEXPORT PHP_FUNCTION(msql_create_db);
+extern DLEXPORT PHP_FUNCTION(msql_drop_db);
+extern DLEXPORT PHP_FUNCTION(msql_list_dbs);
+extern DLEXPORT PHP_FUNCTION(msql_list_tables);
+extern DLEXPORT PHP_FUNCTION(msql_list_fields);
+extern DLEXPORT PHP_FUNCTION(msql_error);
+extern DLEXPORT PHP_FUNCTION(msql_affected_rows);
+extern DLEXPORT PHP_FUNCTION(msql_query);
+extern DLEXPORT PHP_FUNCTION(msql_db_query);
+extern DLEXPORT PHP_FUNCTION(msql_result);
+extern DLEXPORT PHP_FUNCTION(msql_num_rows);
+extern DLEXPORT PHP_FUNCTION(msql_num_fields);
+extern DLEXPORT PHP_FUNCTION(msql_fetch_row);
+extern DLEXPORT PHP_FUNCTION(msql_data_seek);
+extern DLEXPORT PHP_FUNCTION(msql_fetch_field);
+extern DLEXPORT PHP_FUNCTION(msql_field_seek);
+extern DLEXPORT PHP_FUNCTION(msql_free_result);
+extern DLEXPORT PHP_FUNCTION(msql_field_name);
+extern DLEXPORT PHP_FUNCTION(msql_field_table);
+extern DLEXPORT PHP_FUNCTION(msql_field_len);
+extern DLEXPORT PHP_FUNCTION(msql_field_type);
+extern DLEXPORT PHP_FUNCTION(msql_field_flags);
+extern DLEXPORT PHP_FUNCTION(msql_fetch_array);
+extern DLEXPORT PHP_FUNCTION(msql_fetch_object);
typedef struct {
long default_link;
#endif
+#define phpext_msql_ptr msql_module_ptr
+
#endif /* _PHP3_MSQL_H */
#endif
#if APACHE
-extern void timeout(int sig);
+void timeout(int sig);
#endif
#define CHECK_LINK(link) { if (link==-1) { php3_error(E_WARNING,"MySQL: A link to the server could not be established"); RETURN_FALSE; } }
/* {{{ proto int mysql_connect([string hostname[:port]] [, string username] [, string password])
Open a connection to a MySQL Server */
-void php3_mysql_connect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_connect)
{
php3_mysql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0);
}
/* {{{ proto int mysql_pconnect([string hostname[:port]] [, string username] [, string password])
Open a persistent connection to a MySQL Server */
-void php3_mysql_pconnect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_pconnect)
{
php3_mysql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
}
/* {{{ proto int mysql_close([int link_identifier])
Close a MySQL connection */
-void php3_mysql_close(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_close)
{
pval *mysql_link;
int id,type;
/* {{{ proto int mysql_select_db(string database_name [, int link_identifier])
Select a MySQL database */
-void php3_mysql_select_db(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_select_db)
{
pval *db,*mysql_link;
int id,type;
/* {{{ proto int mysql_create_db(string database_name [, int link_identifier])
Create a MySQL database */
-void php3_mysql_create_db(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_create_db)
{
pval *db,*mysql_link;
int id,type;
/* {{{ proto int mysql_drop_db(string database_name [, int link_identifier])
Drop (delete) a MySQL database */
-void php3_mysql_drop_db(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_drop_db)
{
pval *db,*mysql_link;
int id,type;
/* {{{ proto int mysql_query(string query [, int link_identifier])
Send an SQL query to MySQL */
-void php3_mysql_query(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_query)
{
pval *query,*mysql_link;
int id,type;
/* {{{ proto int mysql_db_query(string database_name, string query [, int link_identifier])
Send an SQL query to MySQL */
-void php3_mysql_db_query(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_db_query)
{
pval *db,*query,*mysql_link;
int id,type;
/* {{{ proto int mysql_list_dbs([int link_identifier])
List databases available on a MySQL server */
-void php3_mysql_list_dbs(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_list_dbs)
{
pval *mysql_link;
int id,type;
/* {{{ proto int mysql_list_tables(string database_name [, int link_identifier])
List tables in a MySQL database */
-void php3_mysql_list_tables(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_list_tables)
{
pval *db,*mysql_link;
int id,type;
/* {{{ proto int mysql_list_fields(string database_name, string table_name [, int link_identifier])
List MySQL result fields */
-void php3_mysql_list_fields(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_list_fields)
{
pval *db,*table,*mysql_link;
int id,type;
/* {{{ proto string mysql_error([int link_identifier])
Returns the text of the error message from previous MySQL operation */
-void php3_mysql_error(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_error)
{
pval *mysql_link;
int id,type;
/* {{{ proto int mysql_errno([int link_identifier])
Returns the number of the error message from previous MySQL operation */
#ifdef mysql_errno
-void php3_mysql_errno(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_errno)
{
pval *mysql_link;
int id,type;
/* {{{ proto int mysql_affected_rows([int link_identifier])
Get number of affected rows in previous MySQL operation */
-void php3_mysql_affected_rows(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_affected_rows)
{
pval *mysql_link;
int id,type;
/* {{{ proto int mysql_insert_id([int link_identifier])
Get the id generated from the previous INSERT operation */
-void php3_mysql_insert_id(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_insert_id)
{
pval *mysql_link;
int id,type;
/* {{{ proto int mysql_result(int result, int row [, mixed field])
Get result data */
-void php3_mysql_result(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_result)
{
pval *result, *row, *field=NULL;
MYSQL_RES *mysql_result;
/* {{{ proto int mysql_num_rows(int result)
Get number of rows in a result */
-void php3_mysql_num_rows(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_num_rows)
{
pval *result;
MYSQL_RES *mysql_result;
/* {{{ proto int mysql_num_fields(int result)
Get number of fields in a result */
-void php3_mysql_num_fields(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_num_fields)
{
pval *result;
MYSQL_RES *mysql_result;
/* {{{ proto array mysql_fetch_row(int result)
Get a result row as an enumerated array */
-void php3_mysql_fetch_row(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_fetch_row)
{
pval *result;
MYSQL_RES *mysql_result;
}
/* }}} */
-static void php3_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS)
+static PHP_FUNCTION(mysql_fetch_hash)
{
pval *result;
MYSQL_RES *mysql_result;
/* {{{ proto object mysql_fetch_object(int result)
Fetch a result row as an object */
-void php3_mysql_fetch_object(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_fetch_object)
{
php3_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU);
if (return_value->type==IS_ARRAY) {
/* {{{ proto array mysql_fetch_array(int result)
Fetch a result row as an associative array */
-void php3_mysql_fetch_array(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_fetch_array)
{
php3_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* {{{ proto int mysql_data_seek(int result, int row_number)
Move internal result pointer */
-void php3_mysql_data_seek(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_data_seek)
{
pval *result,*offset;
MYSQL_RES *mysql_result;
/* {{{ proto array mysql_fetch_lengths(int result)
Get max data size of each column in a result */
-void php3_mysql_fetch_lengths(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_fetch_lengths)
{
pval *result;
MYSQL_RES *mysql_result;
/* {{{ proto object mysql_fetch_field(int result [, int field_offset])
Get column information from a result and return as an object */
-void php3_mysql_fetch_field(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_fetch_field)
{
pval *result,*field=NULL;
MYSQL_RES *mysql_result;
/* {{{ proto int mysql_field_seek(int result, int field_offset)
Set result pointer to a specific field offset */
-void php3_mysql_field_seek(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_field_seek)
{
pval *result, *offset;
MYSQL_RES *mysql_result;
/* {{{ proto string mysql_field_name(int result, int field_index)
Get the name of the specified field in a result */
-void php3_mysql_field_name(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_field_name)
{
php3_mysql_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_MYSQL_FIELD_NAME);
}
/* {{{ proto string mysql_field_table(int result, int field_offset)
Get name of the table the specified field is in */
-void php3_mysql_field_table(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_field_table)
{
php3_mysql_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_MYSQL_FIELD_TABLE);
}
/* {{{ proto int mysql_field_len(int result, int field_offet)
Returns the length of the specified field */
-void php3_mysql_field_len(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_field_len)
{
php3_mysql_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_MYSQL_FIELD_LEN);
}
/* {{{ proto string mysql_field_type(int result, int field_offset)
Get the type of the specified field in a result */
-void php3_mysql_field_type(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_field_type)
{
php3_mysql_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_MYSQL_FIELD_TYPE);
}
/* {{{ proto string mysql_field_flags(int result, int field_offset)
Get the flags associated with the specified field in a result */
-void php3_mysql_field_flags(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_field_flags)
{
php3_mysql_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_MYSQL_FIELD_FLAGS);
}
/* {{{ proto int mysql_free_result(int result)
Free result memory */
-void php3_mysql_free_result(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mysql_free_result)
{
pval *result;
MYSQL_RES *mysql_result;
extern int php3_minit_mysql(INIT_FUNC_ARGS);
extern int php3_rinit_mysql(INIT_FUNC_ARGS);
extern int php3_mshutdown_mysql(SHUTDOWN_FUNC_ARGS);
-extern void php3_info_mysql(ZEND_MODULE_INFO_FUNC_ARGS);
-extern void php3_mysql_connect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_pconnect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_close(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_select_db(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_create_db(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_drop_db(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_query(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_db_query(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_list_dbs(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_list_tables(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_list_fields(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_error(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_errno(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_affected_rows(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_insert_id(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_result(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_num_rows(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_num_fields(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_fetch_row(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_fetch_array(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_fetch_object(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_data_seek(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_fetch_lengths(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_fetch_field(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_field_seek(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_free_result(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_field_name(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_field_table(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_field_len(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_field_type(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_mysql_field_flags(INTERNAL_FUNCTION_PARAMETERS);
+void php3_info_mysql(ZEND_MODULE_INFO_FUNC_ARGS);
+PHP_FUNCTION(mysql_connect);
+PHP_FUNCTION(mysql_pconnect);
+PHP_FUNCTION(mysql_close);
+PHP_FUNCTION(mysql_select_db);
+PHP_FUNCTION(mysql_create_db);
+PHP_FUNCTION(mysql_drop_db);
+PHP_FUNCTION(mysql_query);
+PHP_FUNCTION(mysql_db_query);
+PHP_FUNCTION(mysql_list_dbs);
+PHP_FUNCTION(mysql_list_tables);
+PHP_FUNCTION(mysql_list_fields);
+PHP_FUNCTION(mysql_error);
+PHP_FUNCTION(mysql_errno);
+PHP_FUNCTION(mysql_affected_rows);
+PHP_FUNCTION(mysql_insert_id);
+PHP_FUNCTION(mysql_result);
+PHP_FUNCTION(mysql_num_rows);
+PHP_FUNCTION(mysql_num_fields);
+PHP_FUNCTION(mysql_fetch_row);
+PHP_FUNCTION(mysql_fetch_array);
+PHP_FUNCTION(mysql_fetch_object);
+PHP_FUNCTION(mysql_data_seek);
+PHP_FUNCTION(mysql_fetch_lengths);
+PHP_FUNCTION(mysql_fetch_field);
+PHP_FUNCTION(mysql_field_seek);
+PHP_FUNCTION(mysql_free_result);
+PHP_FUNCTION(mysql_field_name);
+PHP_FUNCTION(mysql_field_table);
+PHP_FUNCTION(mysql_field_len);
+PHP_FUNCTION(mysql_field_type);
+PHP_FUNCTION(mysql_field_flags);
typedef struct {
long default_link;
/* }}} */
/* {{{ extension function prototypes */
-void php3_oci8_bindbyname(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_definebyname(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_columnisnull(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_columnname(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_columnsize(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_columntype(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_execute(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_fetch(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_cancel(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_fetchinto(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_fetchstatement(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_freestatement(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_internaldebug(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_logout(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_logon(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_nlogon(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_plogon(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_error(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_freedesc(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_savedesc(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_loaddesc(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_commit(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_rollback(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_newdescriptor(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_numcols(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_parse(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_newcursor(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_result(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_serverversion(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_statementtype(INTERNAL_FUNCTION_PARAMETERS);
-void php3_oci8_rowcount(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(oci8_bindbyname);
+PHP_FUNCTION(oci8_definebyname);
+PHP_FUNCTION(oci8_columnisnull);
+PHP_FUNCTION(oci8_columnname);
+PHP_FUNCTION(oci8_columnsize);
+PHP_FUNCTION(oci8_columntype);
+PHP_FUNCTION(oci8_execute);
+PHP_FUNCTION(oci8_fetch);
+PHP_FUNCTION(oci8_cancel);
+PHP_FUNCTION(oci8_fetchinto);
+PHP_FUNCTION(oci8_fetchstatement);
+PHP_FUNCTION(oci8_freestatement);
+PHP_FUNCTION(oci8_internaldebug);
+PHP_FUNCTION(oci8_logout);
+PHP_FUNCTION(oci8_logon);
+PHP_FUNCTION(oci8_nlogon);
+PHP_FUNCTION(oci8_plogon);
+PHP_FUNCTION(oci8_error);
+PHP_FUNCTION(oci8_freedesc);
+PHP_FUNCTION(oci8_savedesc);
+PHP_FUNCTION(oci8_loaddesc);
+PHP_FUNCTION(oci8_commit);
+PHP_FUNCTION(oci8_rollback);
+PHP_FUNCTION(oci8_newdescriptor);
+PHP_FUNCTION(oci8_numcols);
+PHP_FUNCTION(oci8_parse);
+PHP_FUNCTION(oci8_newcursor);
+PHP_FUNCTION(oci8_result);
+PHP_FUNCTION(oci8_serverversion);
+PHP_FUNCTION(oci8_statementtype);
+PHP_FUNCTION(oci8_rowcount);
/* }}} */
/* {{{ extension definition structures */
if you want to define a LOB/CLOB etc make sure you allocate it via OCINewDescriptor BEFORE defining!!!
*/
-void php3_oci8_definebyname(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_definebyname)
{
pval *stmt, *name, *var, *type;
oci8_statement *statement;
if you want to bind a LOB/CLOB etc make sure you allocate it via OCINewDescriptor BEFORE binding!!!
*/
-void php3_oci8_bindbyname(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_bindbyname)
{
pval *stmt, *name, *var, *maxlen, *tmp,*type;
oci8_statement *statement;
/* {{{ proto string ocifreedesc(object lob)
*/
-void php3_oci8_freedesc(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_freedesc)
{
pval *id, *conn, *desc;
oci8_connection *connection;
/* {{{ proto string ocisavedesc(object lob)
*/
-void php3_oci8_savedesc(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_savedesc)
{
pval *id, *tmp, *conn, *arg;
OCILobLocator *mylob;
/* {{{ proto string ociloaddesc(object lob)
*/
-void php3_oci8_loaddesc(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_loaddesc)
{
pval *id, *tmp, *conn;
oci8_connection *connection;
initialize a new empty descriptor LOB/FILE (LOB is default)
*/
-void php3_oci8_newdescriptor(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_newdescriptor)
{
pval *conn, *type;
oci8_connection *connection;
rollback the current context
*/
-void php3_oci8_rollback(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_rollback)
{
pval *conn;
oci8_connection *connection;
commit the current context
*/
-void php3_oci8_commit(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_commit)
{
pval *conn;
oci8_connection *connection;
Tell the name of a column.
*/
-void php3_oci8_columnname(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_columnname)
{
pval *stmt, *col;
oci8_statement *statement;
Tell the maximum data size of a column.
*/
-void php3_oci8_columnsize(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_columnsize)
{
pval *stmt, *col;
oci8_statement *statement;
Tell the data type of a column.
*/
-void php3_oci8_columntype(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_columntype)
{
pval *stmt, *col;
oci8_statement *statement;
Tell whether a column is NULL.
*/
-void php3_oci8_columnisnull(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_columnisnull)
{
pval *stmt, *col;
oci8_statement *statement;
/* Disables or enables the internal debug output.
* By default it is disabled.
*/
-void php3_oci8_internaldebug(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_internaldebug)
{
pval *arg;
OCI8_TLS_VARS;
Execute a parsed statement.
*/
-void php3_oci8_execute(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_execute)
{
pval *stmt,*mode;
oci8_statement *statement;
Prepare a new row of data for reading.
*/
-void php3_oci8_cancel(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_cancel)
{
pval *stmt;
oci8_statement *statement;
Prepare a new row of data for reading.
*/
-void php3_oci8_fetch(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_fetch)
{
pval *stmt;
oci8_statement *statement;
Fetch a row of result data into an array.
*/
-void php3_oci8_fetchinto(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_fetchinto)
{
pval *stmt, *array, *element, *fmode;
oci8_statement *statement;
Fetch all rows of result data into an array.
*/
-void php3_oci8_fetchstatement(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_fetchstatement)
{
pval *stmt, *array, element, *fmode;
oci8_statement *statement;
Free all resources associated with a statement.
*/
-void php3_oci8_freestatement(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_freestatement)
{
pval *stmt;
oci8_statement *statement;
/* Logs off and disconnects.
*/
-void php3_oci8_logout(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_logout)
{
oci8_connection *connection;
pval *arg;
* optional third parameter is not specified, PHP uses the environment
* variable ORACLE_SID to determine which database to connect to.
*/
-void php3_oci8_nlogon(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_nlogon)
{
oci8_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0,1);
}
* optional third parameter is not specified, PHP uses the environment
* variable ORACLE_SID to determine which database to connect to.
*/
-void php3_oci8_logon(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_logon)
{
oci8_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0,0);
}
* optional third parameter is not specified, PHP uses the environment
* variable ORACLE_SID to determine which database to connect to.
*/
-void php3_oci8_plogon(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_plogon)
{
oci8_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,1,0);
}
Return the last error of stmt|conn|global. If no error happened returns false.
*/
-void php3_oci8_error(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_error)
{
pval *mixed;
oci8_statement *statement;
Return the number of result columns in a statement.
*/
-void php3_oci8_numcols(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_numcols)
{
pval *stmt;
oci8_statement *statement;
Parse a query and return a statement.
*/
-void php3_oci8_parse(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_parse)
{
pval *conn, *query;
oci8_connection *connection;
*/
-void php3_oci8_newcursor(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_newcursor)
{
pval *conn;
oci8_connection *connection;
Return a single column of result data.
*/
-void php3_oci8_result(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_result)
{
pval *stmt, *col;
oci8_statement *statement;
Return a string containing server version information.
*/
-void php3_oci8_serverversion(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_serverversion)
{
oci8_connection *connection;
pval *arg;
/* XXX it would be better with a general interface to OCIAttrGet() */
-void php3_oci8_statementtype(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_statementtype)
{
pval *stmt;
oci8_statement *statement;
}
}
-void php3_oci8_rowcount(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(oci8_rowcount)
{
pval *stmt;
oci8_statement *statement;
*/
/* {{{ proto odbc_execute(int result_id [, array parameters_array])
Execute a prepared statement */
-extern PHP_FUNCTION(odbc_execute)
+PHP_FUNCTION(odbc_execute)
{
pval *arg1, *arg2, arr, *tmp;
typedef struct params_t {
/* }}} */
#if HAVE_SOLID
-void php3_solid_fetch_prev(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(solid_fetch_prev)
{
int res_ind;
odbc_result *result;
# include <cli0core.h>
# include <cli0ext1.h>
# define HAVE_SQL_EXTENDED_FETCH 0
-extern void php3_solid_fetch_prev(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(solid_fetch_prev);
# elif HAVE_EMPRESS /* Empress */
extern int php3_minit_odbc(INIT_FUNC_ARGS);
extern int php3_mshutdown_odbc(SHUTDOWN_FUNC_ARGS);
extern int php3_rinit_odbc(INIT_FUNC_ARGS);
-extern void php3_info_odbc(ZEND_MODULE_INFO_FUNC_ARGS);
-extern PHP_FUNCTION(odbc_setoption);
-extern PHP_FUNCTION(odbc_autocommit);
-extern PHP_FUNCTION(odbc_close);
-extern PHP_FUNCTION(odbc_close_all);
-extern PHP_FUNCTION(odbc_commit);
-extern PHP_FUNCTION(odbc_connect);
-extern PHP_FUNCTION(odbc_pconnect);
-extern void php3_odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int);
-extern PHP_FUNCTION(odbc_cursor);
-extern PHP_FUNCTION(odbc_exec);
-extern PHP_FUNCTION(odbc_do);
-extern PHP_FUNCTION(odbc_execute);
-extern PHP_FUNCTION(odbc_fetch_into);
-extern PHP_FUNCTION(odbc_fetch_row);
-extern PHP_FUNCTION(odbc_field_len);
-extern PHP_FUNCTION(odbc_field_name);
-extern PHP_FUNCTION(odbc_field_type);
-extern PHP_FUNCTION(odbc_field_num);
-extern PHP_FUNCTION(odbc_free_result);
-extern PHP_FUNCTION(odbc_num_fields);
-extern PHP_FUNCTION(odbc_num_rows);
-extern PHP_FUNCTION(odbc_prepare);
-extern PHP_FUNCTION(odbc_result);
-extern PHP_FUNCTION(odbc_result_all);
-extern PHP_FUNCTION(odbc_rollback);
-extern void php3_odbc_transact(INTERNAL_FUNCTION_PARAMETERS, int);
-extern PHP_FUNCTION(odbc_binmode);
-extern PHP_FUNCTION(odbc_longreadlen);
+void php3_info_odbc(ZEND_MODULE_INFO_FUNC_ARGS);
+PHP_FUNCTION(odbc_setoption);
+PHP_FUNCTION(odbc_autocommit);
+PHP_FUNCTION(odbc_close);
+PHP_FUNCTION(odbc_close_all);
+PHP_FUNCTION(odbc_commit);
+PHP_FUNCTION(odbc_connect);
+PHP_FUNCTION(odbc_pconnect);
+void php3_odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int);
+PHP_FUNCTION(odbc_cursor);
+PHP_FUNCTION(odbc_exec);
+PHP_FUNCTION(odbc_do);
+PHP_FUNCTION(odbc_execute);
+PHP_FUNCTION(odbc_fetch_into);
+PHP_FUNCTION(odbc_fetch_row);
+PHP_FUNCTION(odbc_field_len);
+PHP_FUNCTION(odbc_field_name);
+PHP_FUNCTION(odbc_field_type);
+PHP_FUNCTION(odbc_field_num);
+PHP_FUNCTION(odbc_free_result);
+PHP_FUNCTION(odbc_num_fields);
+PHP_FUNCTION(odbc_num_rows);
+PHP_FUNCTION(odbc_prepare);
+PHP_FUNCTION(odbc_result);
+PHP_FUNCTION(odbc_result_all);
+PHP_FUNCTION(odbc_rollback);
+void php3_odbc_transact(INTERNAL_FUNCTION_PARAMETERS, int);
+PHP_FUNCTION(odbc_binmode);
+PHP_FUNCTION(odbc_longreadlen);
typedef struct odbc_connection {
#if HAVE_DB2
#endif /* HAVE_UODBC */
+#define phpext_odbc_ptr odbc_module_ptr
+
#endif /* _PHP_ODBC_H */
/*
/* velocis.c functions */
extern int php3_minit_velocis(INIT_FUNC_ARGS);
extern int php3_rinit_velocis(INIT_FUNC_ARGS);
-extern void php3_info_velocis(ZEND_MODULE_INFO_FUNC_ARGS);
+void php3_info_velocis(ZEND_MODULE_INFO_FUNC_ARGS);
extern int php3_shutdown_velocis(SHUTDOWN_FUNC_ARGS);
-extern void php3_velocis_connect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_velocis_close(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_velocis_exec(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_velocis_fetch(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_velocis_result(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_velocis_freeresult(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_velocis_autocommit(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_velocis_off_autocommit(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_velocis_commit(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_velocis_rollback(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_velocis_fieldnum(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_velocis_fieldname(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(velocis_connect);
+PHP_FUNCTION(velocis_close);
+PHP_FUNCTION(velocis_exec);
+PHP_FUNCTION(velocis_fetch);
+PHP_FUNCTION(velocis_result);
+PHP_FUNCTION(velocis_freeresult);
+PHP_FUNCTION(velocis_autocommit);
+PHP_FUNCTION(velocis_off_autocommit);
+PHP_FUNCTION(velocis_commit);
+PHP_FUNCTION(velocis_rollback);
+PHP_FUNCTION(velocis_fieldnum);
+PHP_FUNCTION(velocis_fieldname);
extern velocis_module php3_velocis_module;
/* Users functions */
-void php3_velocis_connect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(velocis_connect)
{
pval *serv,*user,*pass;
char *Serv = NULL;
RETURN_LONG(ind);
}
-void php3_velocis_close(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(velocis_close)
{
pval *id;
VConn *conn;
RETURN_TRUE;
}
-void php3_velocis_exec(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(velocis_exec)
{
pval *ind,*exec_str;
char *query = NULL;
RETURN_LONG(indx);
}
-void php3_velocis_fetch(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(velocis_fetch)
{
pval *ind;
Vresult *res;
RETURN_TRUE;
}
-void php3_velocis_result(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(velocis_result)
{
pval *ind,*col;
Vresult *res;
}
}
-void php3_velocis_freeresult(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(velocis_freeresult)
{
pval *ind;
Vresult *res;
RETURN_TRUE;
}
-void php3_velocis_autocommit(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(velocis_autocommit)
{
pval *id;
RETCODE stat;
RETURN_TRUE;
}
-void php3_velocis_off_autocommit(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(velocis_off_autocommit)
{
pval *id;
RETCODE stat;
RETURN_TRUE;
}
-void php3_velocis_commit(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(velocis_commit)
{
pval *id;
RETCODE stat;
RETURN_TRUE;
}
-void php3_velocis_rollback(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(velocis_rollback)
{
pval *id;
RETCODE stat;
RETURN_TRUE;
}
-void php3_velocis_fieldname(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(velocis_fieldname)
{
pval *ind,*col;
Vresult *res;
RETURN_STRING(res->values[indx].name,TRUE);
}
-void php3_velocis_fieldnum(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(velocis_fieldnum)
{
pval *ind;
Vresult *res;
/* {{{ proto int ora_logon(string user, string password)
Open an Oracle connection */
-void php3_Ora_Logon(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_Logon)
{
php3_Ora_Do_Logon(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
/* {{{ proto int ora_plogon(string user, string password)
Open a persistant Oracle connection */
-void php3_Ora_PLogon(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_PLogon)
{
php3_Ora_Do_Logon(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
/* {{{ proto int ora_logoff(int connection)
Close an Oracle connection */
-void php3_Ora_Logoff(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_Logoff)
{ /* conn_index */
int type, ind;
oraConnection *conn;
/* {{{ proto int ora_open(int connection)
Open an Oracle cursor */
-void php3_Ora_Open(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_Open)
{ /* conn_index */
pval *arg;
oraConnection *conn = NULL;
/* {{{ proto int ora_close(int cursor)
Close an Oracle cursor */
-void php3_Ora_Close(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_Close)
{ /* conn_index */
pval *arg;
/* {{{ proto int ora_commitoff(int connection)
Disable automatic commit */
-void php3_Ora_CommitOff(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_CommitOff)
{ /* conn_index */
pval *arg;
oraConnection *conn;
/* {{{ proto int ora_commiton(int connection)
Enable automatic commit */
-void php3_Ora_CommitOn(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_CommitOn)
{ /* conn_index */
pval *arg;
oraConnection *conn;
/* {{{ proto int ora_commit(int connection)
Commit an Oracle transaction */
-void php3_Ora_Commit(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_Commit)
{ /* conn_index */
pval *arg;
oraConnection *conn;
/* {{{ proto int ora_rollback(int connection)
Roll back an Oracle transaction */
-void php3_Ora_Rollback(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_Rollback)
{ /* conn_index */
pval *arg;
oraConnection *conn;
/* {{{ proto int ora_parse(int cursor, string sql_statement [, int defer])
Parse an Oracle SQL statement */
-void php3_Ora_Parse(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_Parse)
{
/* cursor_ind, sql_statement [, defer] */
int argc;
/* {{{ proto int ora_bind(int cursor, string php_variable_name, string sql_parameter_name, int length [, int type])
Bind a PHP variable to an Oracle parameter */
-void php3_Ora_Bind(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_Bind)
{ /* cursor_ind, php_var_name, sql_var_name, data_len [, inout]*/
/* inout: 0 = in/out, 1 = in, 2 = out */
int argc;
*/
/* {{{ proto int ora_exec(int cursor)
Execute a parsed statement */
-void php3_Ora_Exec(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_Exec)
{ /* cursor_index */
pval *arg;
oraCursor *cursor = NULL;
/* {{{ proto int ora_numcols(int cursor)
Returns the numbers of columns in a result */
-void php3_Ora_NumCols(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_NumCols)
{ /* cursor_index */
pval *arg;
oraCursor *cursor = NULL;
/* {{{ proto int ora_numrows(int cursor)
Returns the number of rows in a result */
-void php3_Ora_NumRows(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_NumRows)
{ /* cursor_index */
pval *arg;
oraCursor *cursor = NULL;
/* prepares/executes/fetches 1st row if avail*/
/* {{{ proto int ora_do(int connection, int cursor)
Parse and execute a statement and fetch first result row */
-void php3_Ora_Do(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_Do)
{
pval *argv[2];
oraConnection *conn = NULL;
/* {{{ proto int ora_fetch(int cursor)
Fetch a row of result data from a cursor */
-void php3_Ora_Fetch(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_Fetch)
{ /* cursor_index */
pval *arg;
oraCursor *cursor;
/* {{{ proto int ora_fetch_into(int cursor, array result [ , int flags ])
Fetch a row into the specified result array */
-void php3_Ora_FetchInto(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_FetchInto)
{
pval *arg1, *arr, *flg, *tmp;
oraCursor *cursor;
/* {{{ proto string ora_columnname(int cursor, int column)
Get the name of an Oracle result column */
-void php3_Ora_ColumnName(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_ColumnName)
{ /* cursor_index, column_index */
pval *argv[2];
int cursor_ind;
/* {{{ proto string ora_columntype(int cursor, int column)
Get the type of an Oracle result column */
-void php3_Ora_ColumnType(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_ColumnType)
{ /* cursor_index, column_index */
pval *argv[2];
int cursor_ind, colno;
/* {{{ proto int ora_columnsize(int cursor, int column)
Return the size of the column */
-void php3_Ora_ColumnSize(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_ColumnSize)
{ /* cursor_index, column_index */
pval *argv[2];
int cursor_ind;
/* {{{ proto mixed ora_getcolumn(int cursor, int column)
Get data from a fetched row */
-void php3_Ora_GetColumn(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_GetColumn)
{ /* cursor_index, column_index */
pval *argv[2];
int colno;
/* {{{ proto string ora_error(int cursor_or_connection)
Get an Oracle error message */
-void php3_Ora_Error(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_Error)
{
pval *arg;
oraCursor *cursor;
/* {{{ proto int ora_errorcode(int cursor_or_connection)
Get an Oracle error code */
-void php3_Ora_ErrorCode(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Ora_ErrorCode)
{
pval *arg;
oraCursor *cursor;
HashTable *resource_plist;
} oracle_module;
-extern void php3_Ora_Bind(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_Close(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_Commit(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_CommitOff(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_CommitOn(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_Do(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_Error(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_ErrorCode(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_Exec(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_Fetch(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_FetchInto(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_ColumnType(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_ColumnName(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_ColumnSize(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_GetColumn(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_NumCols(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_NumRows(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_Logoff(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_Logon(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_PLogon(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_Open(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_Parse(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_Ora_Rollback(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(Ora_Bind);
+PHP_FUNCTION(Ora_Close);
+PHP_FUNCTION(Ora_Commit);
+PHP_FUNCTION(Ora_CommitOff);
+PHP_FUNCTION(Ora_CommitOn);
+PHP_FUNCTION(Ora_Do);
+PHP_FUNCTION(Ora_Error);
+PHP_FUNCTION(Ora_ErrorCode);
+PHP_FUNCTION(Ora_Exec);
+PHP_FUNCTION(Ora_Fetch);
+PHP_FUNCTION(Ora_FetchInto);
+PHP_FUNCTION(Ora_ColumnType);
+PHP_FUNCTION(Ora_ColumnName);
+PHP_FUNCTION(Ora_ColumnSize);
+PHP_FUNCTION(Ora_GetColumn);
+PHP_FUNCTION(Ora_NumCols);
+PHP_FUNCTION(Ora_NumRows);
+PHP_FUNCTION(Ora_Logoff);
+PHP_FUNCTION(Ora_Logon);
+PHP_FUNCTION(Ora_PLogon);
+PHP_FUNCTION(Ora_Open);
+PHP_FUNCTION(Ora_Parse);
+PHP_FUNCTION(Ora_Rollback);
extern int php3_minit_oracle(INIT_FUNC_ARGS);
extern int php3_mshutdown_oracle(SHUTDOWN_FUNC_ARGS);
extern int php3_rshutdown_oracle(SHUTDOWN_FUNC_ARGS);
-extern void php3_info_oracle(ZEND_MODULE_INFO_FUNC_ARGS);
+void php3_info_oracle(ZEND_MODULE_INFO_FUNC_ARGS);
extern int php3_rinit_oracle(INIT_FUNC_ARGS);
#else
/* {{{ proto int pdf_get_info(void)
Returns a default info structure for a pdf document */
-void php3_pdf_get_info(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_get_info) {
PDF_info *pdf_info;
int id;
PDF_TLS_VARS;
/* {{{ proto pdf_set_info_creator(int info, string creator)
Fills the creator field of the info structure */
-void php3_pdf_set_info_creator(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_info_creator) {
pval *arg1, *arg2;
int id, type;
PDF_info *pdf_info;
/* {{{ proto pdf_set_info_title(int info, string title)
Fills the title field of the info structure */
-void php3_pdf_set_info_title(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_info_title) {
pval *arg1, *arg2;
int id, type;
PDF_info *pdf_info;
/* {{{ proto pdf_set_info_subject(int info, string subject)
Fills the subject field of the info structure */
-void php3_pdf_set_info_subject(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_info_subject) {
pval *arg1, *arg2;
int id, type;
PDF_info *pdf_info;
/* {{{ proto pdf_set_info_author(int info, string author)
Fills the author field of the info structure */
-void php3_pdf_set_info_author(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_info_author) {
pval *arg1, *arg2;
int id, type;
PDF_info *pdf_info;
/* {{{ proto pdf_set_info_keywords(int info, string keywords)
Fills the keywords field of the info structure */
-void php3_pdf_set_info_keywords(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_info_keywords) {
pval *arg1, *arg2;
int id, type;
PDF_info *pdf_info;
/* {{{ proto int pdf_open(int filedesc, int info)
Opens a new pdf document */
-void php3_pdf_open(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_open) {
pval *file;
pval *info;
int id, type;
/* {{{ proto void pdf_close(int pdfdoc)
Closes the pdf document */
-void php3_pdf_close(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_close) {
pval *arg1;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_begin_page(int pdfdoc, double height, double width)
Starts page */
-void php3_pdf_begin_page(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_begin_page) {
pval *arg1, *arg2, *arg3;
int id, type;
double height, width;
/* {{{ proto void pdf_end_page(int pdfdoc)
Ends page */
-void php3_pdf_end_page(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_end_page) {
pval *arg1;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_show(int pdfdoc, string text)
Output text at current position */
-void php3_pdf_show(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_show) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_show_xy(int pdfdoc, string text)
Output text at position */
-void php3_pdf_show_xy(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_show_xy) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_set_font(int pdfdoc, string font, double size, string encoding)
Select the current font face and size */
-void php3_pdf_set_font(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_font) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_set_leading(int pdfdoc, double distance)
Sets distance between text lines */
-void php3_pdf_set_leading(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_leading) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_set_text_rendering(int pdfdoc, int mode)
Determines how text is rendered */
-void php3_pdf_set_text_rendering(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_text_rendering) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_set_horiz_scaling(int pdfdoc, double scale)
Sets horizontal scaling of text */
-void php3_pdf_set_horiz_scaling(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_horiz_scaling) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_set_text_rise(int pdfdoc, double value)
Sets the text rise */
-void php3_pdf_set_text_rise(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_text_rise) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_set_text_matrix(int pdfdoc, arry matrix)
Sets the text matrix */
-void php3_pdf_set_text_matrix(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_text_matrix) {
pval *arg1, *arg2, *data;
int id, type, i;
HashTable *matrix;
/* {{{ proto void pdf_set_text_pos(int pdfdoc, double x, double y)
*/
-void php3_pdf_set_text_pos(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_text_pos) {
pval *arg1, *arg2, *arg3;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_set_char_spacing(int pdfdoc, double space)
Sets character spacing */
-void php3_pdf_set_char_spacing(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_char_spacing) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_set_word_spacing(int pdfdoc, double space)
Sets spacing between words */
-void php3_pdf_set_word_spacing(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_word_spacing) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_continue_text(int pdfdoc, string text)
Output text in next line */
-void php3_pdf_continue_text(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_continue_text) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto double pdf_stringwidth(int pdfdoc, string text)
Returns width of text in current font*/
-void php3_pdf_stringwidth(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_stringwidth) {
pval *arg1, *arg2;
int id, type;
double width;
/* {{{ proto void pdf_save(int pdfdoc)
Saves current enviroment */
-void php3_pdf_save(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_save) {
pval *arg1;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_restore(int pdfdoc)
Restores formerly saved enviroment */
-void php3_pdf_restore(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_restore) {
pval *arg1;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_translate(int pdfdoc, double x, double y)
Sets origin of coordinate system */
-void php3_pdf_translate(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_translate) {
pval *arg1, *arg2, *arg3;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_scale(int pdfdoc, double x-scale, double y-scale)
Sets scaling */
-void php3_pdf_scale(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_scale) {
pval *arg1, *arg2, *arg3;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_rotate(int pdfdoc, double angle)
Sets rotation */
-void php3_pdf_rotate(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_rotate) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_setflat(int pdfdoc, double value)
Sets flatness */
-void php3_pdf_setflat(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setflat) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_setlinejoin(int pdfdoc, int value)
Sets linejoin parameter */
-void php3_pdf_setlinejoin(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setlinejoin) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_setlinecap(int pdfdoc, int value)
Sets linecap parameter */
-void php3_pdf_setlinecap(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setlinecap) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_setmiterlimit(int pdfdoc, double value)
Sets miter limit */
-void php3_pdf_setmiterlimit(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setmiterlimit) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_setlinewidth(int pdfdoc, double width)
Sets line width */
-void php3_pdf_setlinewidth(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setlinewidth) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_setdash(int pdfdoc, double white, double black)
Sets dash pattern */
-void php3_pdf_setdash(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setdash) {
pval *arg1, *arg2, *arg3;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_moveto(int pdfdoc, double x, double y)
Sets current point */
-void php3_pdf_moveto(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_moveto) {
pval *arg1, *arg2, *arg3;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_curveto(int pdfdoc, double x1, double y1, double x2, double y2, double x3, double y3)
Draws a curve */
-void php3_pdf_curveto(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_curveto) {
pval *arg1, *arg2, *arg3, *arg4, *arg5, *arg6, *arg7;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_lineto(int pdfdoc, double x, double y)
Draws a line */
-void php3_pdf_lineto(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_lineto) {
pval *arg1, *arg2, *arg3;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_circle(int pdfdoc, double x, double y, double radius)
Draws a circle */
-void php3_pdf_circle(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_circle) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_arc(int pdfdoc, double x, double y, double radius, double start, double end)
Draws an arc */
-void php3_pdf_arc(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_arc) {
pval *arg1, *arg2, *arg3, *arg4, *arg5, *arg6;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_rect(int pdfdoc, double x, double y, double width, double height)
Draws a rectangle */
-void php3_pdf_rect(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_rect) {
pval *arg1, *arg2, *arg3, *arg4, *arg5;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_closepath(int pdfdoc)
Close path */
-void php3_pdf_closepath(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_closepath) {
pval *arg1;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_closepath_stroke(int pdfdoc)
Close path and draw line along path */
-void php3_pdf_closepath_stroke(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_closepath_stroke) {
pval *arg1;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_closepath_stroke(int pdfdoc)
Draw line along path path */
-void php3_pdf_stroke(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_stroke) {
pval *arg1;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_fill(int pdfdoc)
Fill current path */
-void php3_pdf_fill(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_fill) {
pval *arg1;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_fill_stroke(int pdfdoc)
Fill and stroke current path */
-void php3_pdf_fill_stroke(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_fill_stroke) {
pval *arg1;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_closepath_fill_stroke(int pdfdoc)
Close, fill and stroke current path */
-void php3_pdf_closepath_fill_stroke(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_closepath_fill_stroke) {
pval *arg1;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_endpath(int pdfdoc)
Ends current path */
-void php3_pdf_endpath(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_endpath) {
pval *arg1;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_clip(int pdfdoc)
Clips to current path */
-void php3_pdf_clip(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_clip) {
pval *arg1;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_setgray_fill(int pdfdoc, double value)
Sets filling color to gray value */
-void php3_pdf_setgray_fill(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setgray_fill) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_setgray_stroke(int pdfdoc, double value)
Sets drawing color to gray value */
-void php3_pdf_setgray_stroke(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setgray_stroke) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_setgray(int pdfdoc, double value)
Sets drawing and filling color to gray value */
-void php3_pdf_setgray(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setgray) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_setrgbcolor_fill(int pdfdoc, double red, double green, double blue)
Sets filling color to rgb color value */
-void php3_pdf_setrgbcolor_fill(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setrgbcolor_fill) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_setrgbcolor_stroke(int pdfdoc, double red, double green, double blue)
Sets drawing color to rgb color value */
-void php3_pdf_setrgbcolor_stroke(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setrgbcolor_stroke) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_setrgbcolor(int pdfdoc, double red, double green, double blue)
Sets drawing and filling color to rgb color value */
-void php3_pdf_setrgbcolor(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setrgbcolor) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_add_outline(int pdfdoc, string text);
Add bookmark for current page */
-void php3_pdf_add_outline(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_add_outline) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_set_transition(int pdfdoc, int transition)
Sets transition between pages */
-void php3_pdf_set_transition(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_transition) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
/* {{{ proto void pdf_set_duration(int pdfdoc, double duration)
Sets duration between pages */
-void php3_pdf_set_duration(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_duration) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
extern php3_module_entry pdf_module_entry;
#define pdf_module_ptr &pdf_module_entry
-extern void php3_info_pdf(ZEND_MODULE_INFO_FUNC_ARGS);
+void php3_info_pdf(ZEND_MODULE_INFO_FUNC_ARGS);
extern int php3_minit_pdf(INIT_FUNC_ARGS);
extern int php3_mend_pdf(void);
-extern void php3_pdf_get_info(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_info_creator(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_info_title(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_info_subject(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_info_author(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_info_keywords(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_open(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_close(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_begin_page(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_end_page(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_show(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_show_xy(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_font(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_leading(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_text_rendering(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_horiz_scaling(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_text_rise(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_text_matrix(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_text_pos(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_char_spacing(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_word_spacing(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_continue_text(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_stringwidth(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_save(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_restore(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_translate(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_scale(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_rotate(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setflat(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setlinejoin(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setlinecap(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setmiterlimit(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setlinewidth(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setdash(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_moveto(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_curveto(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_lineto(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_circle(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_arc(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_rect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_closepath(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_closepath_stroke(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_stroke(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_fill(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_fill_stroke(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_closepath_fill_stroke(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_endpath(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_clip(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setgray_fill(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setgray_stroke(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setgray(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setrgbcolor_fill(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setrgbcolor_stroke(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setrgbcolor(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_add_outline(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_transition(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_duration(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(pdf_get_info);
+PHP_FUNCTION(pdf_set_info_creator);
+PHP_FUNCTION(pdf_set_info_title);
+PHP_FUNCTION(pdf_set_info_subject);
+PHP_FUNCTION(pdf_set_info_author);
+PHP_FUNCTION(pdf_set_info_keywords);
+PHP_FUNCTION(pdf_open);
+PHP_FUNCTION(pdf_close);
+PHP_FUNCTION(pdf_begin_page);
+PHP_FUNCTION(pdf_end_page);
+PHP_FUNCTION(pdf_show);
+PHP_FUNCTION(pdf_show_xy);
+PHP_FUNCTION(pdf_set_font);
+PHP_FUNCTION(pdf_set_leading);
+PHP_FUNCTION(pdf_set_text_rendering);
+PHP_FUNCTION(pdf_set_horiz_scaling);
+PHP_FUNCTION(pdf_set_text_rise);
+PHP_FUNCTION(pdf_set_text_matrix);
+PHP_FUNCTION(pdf_set_text_pos);
+PHP_FUNCTION(pdf_set_char_spacing);
+PHP_FUNCTION(pdf_set_word_spacing);
+PHP_FUNCTION(pdf_continue_text);
+PHP_FUNCTION(pdf_stringwidth);
+PHP_FUNCTION(pdf_save);
+PHP_FUNCTION(pdf_restore);
+PHP_FUNCTION(pdf_translate);
+PHP_FUNCTION(pdf_scale);
+PHP_FUNCTION(pdf_rotate);
+PHP_FUNCTION(pdf_setflat);
+PHP_FUNCTION(pdf_setlinejoin);
+PHP_FUNCTION(pdf_setlinecap);
+PHP_FUNCTION(pdf_setmiterlimit);
+PHP_FUNCTION(pdf_setlinewidth);
+PHP_FUNCTION(pdf_setdash);
+PHP_FUNCTION(pdf_moveto);
+PHP_FUNCTION(pdf_curveto);
+PHP_FUNCTION(pdf_lineto);
+PHP_FUNCTION(pdf_circle);
+PHP_FUNCTION(pdf_arc);
+PHP_FUNCTION(pdf_rect);
+PHP_FUNCTION(pdf_closepath);
+PHP_FUNCTION(pdf_closepath_stroke);
+PHP_FUNCTION(pdf_stroke);
+PHP_FUNCTION(pdf_fill);
+PHP_FUNCTION(pdf_fill_stroke);
+PHP_FUNCTION(pdf_closepath_fill_stroke);
+PHP_FUNCTION(pdf_endpath);
+PHP_FUNCTION(pdf_clip);
+PHP_FUNCTION(pdf_setgray_fill);
+PHP_FUNCTION(pdf_setgray_stroke);
+PHP_FUNCTION(pdf_setgray);
+PHP_FUNCTION(pdf_setrgbcolor_fill);
+PHP_FUNCTION(pdf_setrgbcolor_stroke);
+PHP_FUNCTION(pdf_setrgbcolor);
+PHP_FUNCTION(pdf_add_outline);
+PHP_FUNCTION(pdf_set_transition);
+PHP_FUNCTION(pdf_set_duration);
#else
#define pdf_module_ptr NULL
#endif
+
+#define phpext_pdf_ptr pdf_module_ptr
+
#endif /* _PHP3_PDF_H */
#include <stdlib.h>
-#ifndef MSVC5
-#include "php_config.h"
-#endif
#include "php.h"
#include "php3_pgsql.h"
#include "ext/standard/php3_standard.h"
/* {{{ proto int pg_connect([string connection_string] | [string host, string port, [string options, [string tty,]] string database)
Open a PostgreSQL connection */
-void php3_pgsql_connect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_connect)
{
php3_pgsql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0);
}
/* {{{ proto int pg_connect([string connection_string] | [string host, string port, [string options, [string tty,]] string database)
Open a persistent PostgreSQL connection */
-void php3_pgsql_pconnect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_pconnect)
{
php3_pgsql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
}
/* {{{ proto bool pg_close([int connection])
Close a PostgreSQL connection */
-void php3_pgsql_close(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_close)
{
pval *pgsql_link;
int id,type;
/* {{{ proto string pg_dbname([int connection])
Get the database name */
-void php3_pgsql_dbname(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_dbname)
{
php3_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_PG_DBNAME);
}
/* {{{ proto string pg_errormessage([int connection])
Get the error message string */
-void php3_pgsql_error_message(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_error_message)
{
php3_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_PG_ERROR_MESSAGE);
}
/* {{{ proto string pg_options([int connection])
Get the options associated with the connection */
-void php3_pgsql_options(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_options)
{
php3_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_PG_OPTIONS);
}
/* {{{ proto int pg_port([int connection])
Return the port number associated with the connection */
-void php3_pgsql_port(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_port)
{
php3_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_PG_PORT);
}
/* {{{ proto string pg_tty([int connection])
Return the tty name associated with the connection */
-void php3_pgsql_tty(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_tty)
{
php3_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_PG_TTY);
}
/* {{{ proto string pg_host([int connection])
Returns the host name associated with the connection */
-void php3_pgsql_host(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_host)
{
php3_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_PG_HOST);
}
/* {{{ proto int pg_exec([int connection,] string query)
Execute a query */
-void php3_pgsql_exec(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_exec)
{
pval *query,*pgsql_link;
int id,type;
/* {{{ proto int pg_numrows(int result)
Return the number of rows in the result */
-void php3_pgsql_num_rows(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_num_rows)
{
php3_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_PG_NUM_ROWS);
}
/* {{{ proto int pg_numfields(int result)
Return the number of fields in the result */
-void php3_pgsql_num_fields(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_num_fields)
{
php3_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_PG_NUM_FIELDS);
}
/* {{{ proto int pg_cmdtuples(int result)
Returns the number of affected tuples */
-void php3_pgsql_cmdtuples(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_cmdtuples)
{
php3_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_PG_CMD_TUPLES);
}
/* {{{ proto string pg_fieldname(int result, int field_number)
Returns the name of the field */
-void php3_pgsql_field_name(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_field_name)
{
php3_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_PG_FIELD_NAME);
}
/* {{{ proto pg_fieldsize(int result, int field_number)
Returns the internal size of the field */
-void php3_pgsql_field_size(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_field_size)
{
php3_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_PG_FIELD_SIZE);
}
/* {{{ proto string pg_fieldtype(int result, int field_number)
Returns the type name for the given field */
-void php3_pgsql_field_type(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_field_type)
{
php3_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP3_PG_FIELD_TYPE);
}
/* {{{ proto int pg_fieldnum(int result, string field_name)
Returns the field number of the named field */
-void php3_pgsql_field_number(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_field_number)
{
pval *result,*field;
PGresult *pgsql_result;
/* {{{ proto mixed pg_result(int result, int row_number, mixed field_name)
Returns values from a result identifier */
-void php3_pgsql_result(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_result)
{
pval *result, *row, *field=NULL;
PGresult *pgsql_result;
/* {{{ proto array pg_fetchrow(int result, int row)
Get a row as an enumerated array */
-void php3_pgsql_fetch_row(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_fetch_row)
{
pval *result, *row;
PGresult *pgsql_result;
}
/* }}} */
-void php3_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_fetch_hash)
{
pval *result, *row, *pval_ptr;
PGresult *pgsql_result;
/* ?? This is a rather odd function - why not just point pg_fetcharray() directly at fetch_hash ? -RL */
/* {{{ proto array pg_fetch_array(int result, int row)
Fetch a row as an array */
-void php3_pgsql_fetch_array(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_fetch_array)
{
php3_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* {{{ proto object pg_fetch_object(int result, int row)
Fetch a row as an object */
-void php3_pgsql_fetch_object(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_fetch_object)
{
php3_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU);
if (return_value->type==IS_ARRAY) {
/* {{{ proto int pg_fieldprtlen(int result, int row, mixed field_name_or_number)
Returns the printed length */
-void php3_pgsql_data_length(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_data_length)
{
php3_pgsql_data_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP3_PG_DATA_LENGTH);
}
/* {{{ proto int pg_fieldisnull(int result, int row, mixed field_name_or_number)
Test if a field is NULL */
-void php3_pgsql_data_isnull(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_data_isnull)
{
php3_pgsql_data_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP3_PG_DATA_ISNULL);
}
/* {{{ proto int pg_freeresult(int result)
Free result memory */
-void php3_pgsql_free_result(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_free_result)
{
pval *result;
pgsql_result_handle *pg_result;
/* {{{ proto int pg_getlastoid(int result)
Returns the last object identifier */
-void php3_pgsql_last_oid(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_last_oid)
{
pval *result;
PGresult *pgsql_result;
/* {{{ proto int pg_locreate(int connection)
Create a large object */
-void php3_pgsql_lo_create(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_lo_create)
{
pval *pgsql_link;
PGconn *pgsql;
/* {{{ proto void pg_lounlink([int connection, ] int large_obj_id)
Delete a large object */
-void php3_pgsql_lo_unlink(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_lo_unlink)
{
pval *pgsql_link, *oid;
PGconn *pgsql;
/* {{{ proto int pg_loopen([int connection,] int objoid, string mode)
Open a large object and return fd */
-void php3_pgsql_lo_open(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_lo_open)
{
pval *pgsql_link, *oid, *mode;
PGconn *pgsql;
/* {{{ proto void pg_loclose(int fd)
Close a large object */
-void php3_pgsql_lo_close(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_lo_close)
{
pval *pgsql_lofp;
int id, type;
/* {{{ proto string pg_loread(int fd, int len)
Read a large object */
-void php3_pgsql_lo_read(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_lo_read)
{
pval *pgsql_id, *len;
int id, buf_len, type, nbytes;
/* {{{ proto int pg_lowrite(int fd, string buf)
Write a large object */
-void php3_pgsql_lo_write(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_lo_write)
{
pval *pgsql_id, *str;
int id, buf_len, nbytes, type;
/* {{{ proto void pg_loreadall(int fd)
Read a large object and send straight to browser */
-void php3_pgsql_lo_readall(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(pgsql_lo_readall)
{
pval *pgsql_id;
int i, id, tbytes, type;
extern int php3_minit_pgsql(INIT_FUNC_ARGS);
extern int php3_rinit_pgsql(INIT_FUNC_ARGS);
-extern void php3_pgsql_connect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_pconnect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_close(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_dbname(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_error_message(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_options(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_port(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_tty(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_host(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_exec(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_num_rows(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_num_fields(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_cmdtuples(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_field_name(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_field_size(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_field_type(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_field_number(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_result(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_fetch_row(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_fetch_array(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_fetch_object(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_data_length(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_data_isnull(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_free_result(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_last_oid(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_lo_create(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_lo_unlink(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_lo_open(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_lo_close(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_lo_read(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_lo_write(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pgsql_lo_readall(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(pgsql_connect);
+PHP_FUNCTION(pgsql_pconnect);
+PHP_FUNCTION(pgsql_close);
+PHP_FUNCTION(pgsql_dbname);
+PHP_FUNCTION(pgsql_error_message);
+PHP_FUNCTION(pgsql_options);
+PHP_FUNCTION(pgsql_port);
+PHP_FUNCTION(pgsql_tty);
+PHP_FUNCTION(pgsql_host);
+PHP_FUNCTION(pgsql_exec);
+PHP_FUNCTION(pgsql_num_rows);
+PHP_FUNCTION(pgsql_num_fields);
+PHP_FUNCTION(pgsql_cmdtuples);
+PHP_FUNCTION(pgsql_field_name);
+PHP_FUNCTION(pgsql_field_size);
+PHP_FUNCTION(pgsql_field_type);
+PHP_FUNCTION(pgsql_field_number);
+PHP_FUNCTION(pgsql_result);
+PHP_FUNCTION(pgsql_fetch_row);
+PHP_FUNCTION(pgsql_fetch_array);
+PHP_FUNCTION(pgsql_fetch_object);
+PHP_FUNCTION(pgsql_data_length);
+PHP_FUNCTION(pgsql_data_isnull);
+PHP_FUNCTION(pgsql_free_result);
+PHP_FUNCTION(pgsql_last_oid);
+PHP_FUNCTION(pgsql_lo_create);
+PHP_FUNCTION(pgsql_lo_unlink);
+PHP_FUNCTION(pgsql_lo_open);
+PHP_FUNCTION(pgsql_lo_close);
+PHP_FUNCTION(pgsql_lo_read);
+PHP_FUNCTION(pgsql_lo_write);
+PHP_FUNCTION(pgsql_lo_readall);
void php3_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent);
int php3_pgsql_get_default_link(INTERNAL_FUNCTION_PARAMETERS);
void php3_pgsql_get_result_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type);
char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list);
void php3_pgsql_get_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type);
-void php3_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(pgsql_fetch_hash);
void php3_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type);
}
-void php3_COM_load(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(COM_load)
{
pval *module_name, *server_name=NULL;
CLSID clsid;
}
-void php3_COM_invoke(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(COM_invoke)
{
pval **arguments;
pval *object, *function_name;
extern int php3_minit_COM(INIT_FUNC_ARGS);
extern int php3_mshutdown_COM(SHUTDOWN_FUNC_ARGS);
-extern void php3_COM_load(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_COM_invoke(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(COM_load);
+PHP_FUNCTION(COM_invoke);
PHP_FUNCTION(com_propget);
PHP_FUNCTION(com_propput);
#endif /* Win32|WINNT */
+#define phpext_COM_ptr COM_module_ptr
+
#endif /* _PHP3_COM_H */
#define snmp_module_ptr &snmp_module_entry
extern int php3i_snmp_init(INIT_FUNC_ARGS);
-extern PHP_FUNCTION(snmpget);
-extern PHP_FUNCTION(snmpwalk);
-extern PHP_FUNCTION(snmprealwalk);
-extern void php3_info_snmp(ZEND_MODULE_INFO_FUNC_ARGS);
+PHP_FUNCTION(snmpget);
+PHP_FUNCTION(snmpwalk);
+PHP_FUNCTION(snmprealwalk);
+void php3_info_snmp(ZEND_MODULE_INFO_FUNC_ARGS);
#else
#define snmp_module_ptr NULL
#endif /* HAVE_SNMP */
+#define phpext_snmp_ptr snmp_module_ptr
+
#endif /* _PHP3_SNMP_H */
/* {{{ proto string snmpget(string host, string community, string object_id [, int timeout [, int retries]])
Fetch an SNMP object */
-void php3_snmpget(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(snmpget) {
_php3_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
}
/* }}} */
/* {{{ proto string snmpwalk(string host, string community, string object_id [, int timeout [, int retries]])
Return all objects under the specified object id */
-void php3_snmpwalk(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(snmpwalk) {
return _php3_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,2);
}
/* }}} */
extern int php3_rinit_sybct(INIT_FUNC_ARGS);
extern int php3_mshutdown_sybct(SHUTDOWN_FUNC_ARGS);
extern int php3_rshutdown_sybct(SHUTDOWN_FUNC_ARGS);
-extern void php3_info_sybct(ZEND_MODULE_INFO_FUNC_ARGS);
-extern void php3_sybct_connect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_pconnect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_close(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_select_db(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_query(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_free_result(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_get_last_message(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_num_rows(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_num_fields(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_fetch_row(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_fetch_array(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_fetch_object(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_data_seek(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_result(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_affected_rows(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_field_seek(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_min_client_severity(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_min_server_severity(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybct_fetch_field(INTERNAL_FUNCTION_PARAMETERS);
+void php3_info_sybct(ZEND_MODULE_INFO_FUNC_ARGS);
+PHP_FUNCTION(sybct_connect);
+PHP_FUNCTION(sybct_pconnect);
+PHP_FUNCTION(sybct_close);
+PHP_FUNCTION(sybct_select_db);
+PHP_FUNCTION(sybct_query);
+PHP_FUNCTION(sybct_free_result);
+PHP_FUNCTION(sybct_get_last_message);
+PHP_FUNCTION(sybct_num_rows);
+PHP_FUNCTION(sybct_num_fields);
+PHP_FUNCTION(sybct_fetch_row);
+PHP_FUNCTION(sybct_fetch_array);
+PHP_FUNCTION(sybct_fetch_object);
+PHP_FUNCTION(sybct_data_seek);
+PHP_FUNCTION(sybct_result);
+PHP_FUNCTION(sybct_affected_rows);
+PHP_FUNCTION(sybct_field_seek);
+PHP_FUNCTION(sybct_min_client_severity);
+PHP_FUNCTION(sybct_min_server_severity);
+PHP_FUNCTION(sybct_fetch_field);
#include <ctpublic.h>
extern int php3_rinit_sybase(INIT_FUNC_ARGS);
extern int php3_mshutdown_sybase(SHUTDOWN_FUNC_ARGS);
extern int php3_rshutdown_sybase(SHUTDOWN_FUNC_ARGS);
-extern void php3_info_sybase(ZEND_MODULE_INFO_FUNC_ARGS);
-extern void php3_sybase_connect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_pconnect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_close(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_select_db(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_query(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_free_result(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_get_last_message(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_num_rows(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_num_fields(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_fetch_row(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_fetch_array(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_fetch_object(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_data_seek(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_result(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_field_seek(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_min_error_severity(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_min_message_severity(INTERNAL_FUNCTION_PARAMETERS);
-
-extern void php3_sybase_db_query(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_list_fields(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_fetch_lengths(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_fetch_field(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_field_seek(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_free_result(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_field_name(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_field_table(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_field_len(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_field_type(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sybase_field_flags(INTERNAL_FUNCTION_PARAMETERS);
+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);
#endif
+#define phpext_sybase_ptr sybase_module_ptr
+
#endif /* _PHP3_SYBASE_H */
}
-void php3_sybct_connect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_connect)
{
php3_sybct_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0);
}
-void php3_sybct_pconnect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_pconnect)
{
php3_sybct_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
}
-void php3_sybct_close(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_close)
{
pval *sybct_link_index;
int id,type;
}
-void php3_sybct_select_db(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_select_db)
{
pval *db,*sybct_link_index;
int id,type;
}
-void php3_sybct_query(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_query)
{
pval *query,*sybct_link_index;
int id,type;
}
-void php3_sybct_free_result(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_free_result)
{
pval *sybct_result_index;
sybct_result *result;
#if 0
-void php3_sybct_get_last_message(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_get_last_message)
{
if (php3_sybct_module.server_message) {
RETURN_STRING(php3_sybct_module.server_message,1);
#endif
-void php3_sybct_num_rows(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_num_rows)
{
pval *result_index;
int type,id;
}
-void php3_sybct_num_fields(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_num_fields)
{
pval *result_index;
int type,id;
}
-void php3_sybct_fetch_row(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_fetch_row)
{
pval *sybct_result_index;
int type,i,id;
}
-static void php3_sybct_fetch_hash(INTERNAL_FUNCTION_PARAMETERS)
+static PHP_FUNCTION(sybct_fetch_hash)
{
pval *sybct_result_index;
sybct_result *result;
}
-void php3_sybct_fetch_object(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_fetch_object)
{
php3_sybct_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU);
if (return_value->type==IS_ARRAY) {
}
-void php3_sybct_fetch_array(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_fetch_array)
{
php3_sybct_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
-void php3_sybct_data_seek(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_data_seek)
{
pval *sybct_result_index,*offset;
int type,id;
}
-void php3_sybct_fetch_field(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_fetch_field)
{
pval *sybct_result_index,*offset;
int type,id,field_offset;
}
-void php3_sybct_field_seek(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_field_seek)
{
pval *sybct_result_index,*offset;
int type,id,field_offset;
}
-void php3_sybct_result(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_result)
{
pval *row, *field, *sybct_result_index;
int id,type,field_offset=0;
}
-void php3_sybct_affected_rows(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_affected_rows)
{
pval *sybct_link_index;
int id,type;
}
-void php3_sybct_min_client_severity(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_min_client_severity)
{
pval *severity;
}
-void php3_sybct_min_server_severity(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybct_min_server_severity)
{
pval *severity;
}
-void php3_sybase_connect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_connect)
{
php3_sybase_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0);
}
-void php3_sybase_pconnect(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_pconnect)
{
php3_sybase_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
}
-void php3_sybase_close(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_close)
{
pval *sybase_link_index;
int id,type;
}
-void php3_sybase_select_db(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_select_db)
{
pval *db,*sybase_link_index;
int id,type;
}
-void php3_sybase_query(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_query)
{
pval *query,*sybase_link_index;
int id,type,retvalue;
}
-void php3_sybase_free_result(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_free_result)
{
pval *sybase_result_index;
sybase_result *result;
}
-void php3_sybase_get_last_message(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_get_last_message)
{
RETURN_STRING(php3_sybase_module.server_message,1);
}
-void php3_sybase_num_rows(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_num_rows)
{
pval *result_index;
int type,id;
}
-void php3_sybase_num_fields(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_num_fields)
{
pval *result_index;
int type,id;
}
-void php3_sybase_fetch_row(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_fetch_row)
{
pval *sybase_result_index;
int type,i,id;
}
-static void php3_sybase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS)
+static PHP_FUNCTION(sybase_fetch_hash)
{
pval *sybase_result_index;
sybase_result *result;
}
-void php3_sybase_fetch_object(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_fetch_object)
{
php3_sybase_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU);
if (return_value->type==IS_ARRAY) {
}
-void php3_sybase_fetch_array(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_fetch_array)
{
php3_sybase_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
-void php3_sybase_data_seek(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_data_seek)
{
pval *sybase_result_index,*offset;
int type,id;
}
-void php3_sybase_fetch_field(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_fetch_field)
{
pval *sybase_result_index,*offset;
int type,id,field_offset;
add_property_string(return_value, "type", php3_sybase_get_field_name(result->fields[field_offset].type), 1);
}
-void php3_sybase_field_seek(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_field_seek)
{
pval *sybase_result_index,*offset;
int type,id,field_offset;
}
-void php3_sybase_result(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_result)
{
pval *row, *field, *sybase_result_index;
int id,type,field_offset=0;
}
-void php3_sybase_min_error_severity(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_min_error_severity)
{
pval *severity;
}
-void php3_sybase_min_message_severity(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sybase_min_message_severity)
{
pval *severity;
extern int php3_rinit_sysvsem(INIT_FUNC_ARGS);
extern int php3_mshutdown_sysvsem(SHUTDOWN_FUNC_ARGS);
extern int php3_rshutdown_sysvsem(SHUTDOWN_FUNC_ARGS);
-extern void php3_info_sysvsem(void);
-extern void php3_sysvsem_get(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sysvsem_acquire(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sysvsem_release(INTERNAL_FUNCTION_PARAMETERS);
+void php3_info_sysvsem(void);
+PHP_FUNCTION(sysvsem_get);
+PHP_FUNCTION(sysvsem_acquire);
+PHP_FUNCTION(sysvsem_release);
typedef struct {
int le_sem;
/* {{{ proto int sem_get(int key [, int max_acquire [, int perm]])
Return an id for the semaphore with the given key, and allow max_acquire (default 1) processes to acquire it simultaneously. */
-void php3_sysvsem_get(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sysvsem_get)
{
pval *arg_key, *arg_max_acquire, *arg_perm;
int key, max_acquire, perm;
/* {{{ proto int sem_acquire(int id)
Acquires the semaphore with the given id, blocking if necessary. */
-void php3_sysvsem_acquire(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sysvsem_acquire)
{
_php3_sysvsem_semop(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
/* {{{ proto int sem_release(int id)
Releases the semaphore with the given id. */
-void php3_sysvsem_release(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sysvsem_release)
{
_php3_sysvsem_semop(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
extern int php3_minit_sysvshm(INIT_FUNC_ARGS);
-extern void php3_sysvshm_attach(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sysvshm_detach(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sysvshm_remove(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sysvshm_put_var(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sysvshm_get_var(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_sysvshm_remove_var(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(sysvshm_attach);
+PHP_FUNCTION(sysvshm_detach);
+PHP_FUNCTION(sysvshm_remove);
+PHP_FUNCTION(sysvshm_put_var);
+PHP_FUNCTION(sysvshm_get_var);
+PHP_FUNCTION(sysvshm_remove_var);
extern int php3int_put_shmdata(sysvshm_chunk_head *ptr,long key,char *data, long len);
extern long php3int_check_shmdata(sysvshm_chunk_head *ptr, long key);
extern int php3int_remove_shmdata(sysvshm_chunk_head *ptr, long shm_varpos);
/* {{{ proto int shm_attach(int key, int size, int flag)
Return an id for the shared memory with the given key. */
-void php3_sysvshm_attach(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sysvshm_attach)
{
pval *arg_key,*arg_size,*arg_flag;
long shm_size,shm_flag;
/* {{{ proto int shm_detach(int id)
releases the shared memory attachment with the given id. */
-void php3_sysvshm_detach(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sysvshm_detach)
{
pval *arg_id;
long id;
/* {{{ proto int shm_remove(int key)
removes the shared memory with the given key. */
-void php3_sysvshm_remove(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sysvshm_remove)
{
pval *arg_key;
long id;
/* {{{ proto int shm_put(int id, int key, object *variable)
insert a variable into shared memory. */
-void php3_sysvshm_put_var(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sysvshm_put_var)
{
pval *arg_id, *arg_key, *arg_var;
long key, id;
/* {{{ proto string/float/int/array shm_get_var(int id, int key)
returns a variable into shared memory. */
-void php3_sysvshm_get_var(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sysvshm_get_var)
{
pval *arg_id, *arg_key;
long key, id;
/* {{{ proto int shm_remove_var(int id, int key)
removes variable from shared memory. */
-void php3_sysvshm_remove_var(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sysvshm_remove_var)
{
pval *arg_id, *arg_key;
long key, id;
#endif /* HAVE_LIBEXPAT */
+#define phpext_xml_ptr xml_module_ptr
+
/*
* Local variables:
* tab-width: 4
+----------------------------------------------------------------------+
| PHP HTML Embedded Scripting Language Version 3.0 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997,1998 PHP Development Team (See Credits file) |
+ | Copyright (c) 1997-1999 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: |
| If you did not, or have any questions about PHP licensing, please |
| contact core@php.net. |
+----------------------------------------------------------------------+
- | Authors: Stig Sæther Bakken <ssb@guardian.no> |
+ | Authors: Stig Sæther Bakken <ssb@fast.no> |
+----------------------------------------------------------------------+
*/
static void xml_set_handler(char **, pval *);
inline static unsigned short xml_encode_iso_8859_1(unsigned char);
inline static char xml_decode_iso_8859_1(unsigned short);
-inline static unsigned short xml_encode_us_ascii(char);
+inline static unsigned short xml_encode_us_ascii(unsigned char);
inline static char xml_decode_us_ascii(unsigned short);
static XML_Char *xml_utf8_encode(const char *, int, int *, const XML_Char *);
static char *xml_utf8_decode(const XML_Char *, int, int *, const XML_Char *);
static pval *xml_call_handler(xml_parser *, char *, int, pval **);
static pval *php3i_xmlcharpval(const XML_Char *, int, const XML_Char *);
static int php3i_xmlcharlen(const XML_Char *);
+static void php3i_add_to_info(xml_parser *parser,char *name);
+
void php3i_xml_startElementHandler(void *, const char *, const char **);
void php3i_xml_endElementHandler(void *, const char *);
PHP_FE(xml_set_notation_decl_handler, NULL)
PHP_FE(xml_set_external_entity_ref_handler, NULL)
PHP_FE(xml_parse, NULL)
+ PHP_FE(xml_parse_into_struct, NULL)
PHP_FE(xml_get_error_code, NULL)
PHP_FE(xml_error_string, NULL)
PHP_FE(xml_get_current_line_number, NULL)
REGISTER_LONG_CONSTANT("XML_OPTION_CASE_FOLDING", PHP3_XML_OPTION_CASE_FOLDING, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("XML_OPTION_TARGET_ENCODING", PHP3_XML_OPTION_TARGET_ENCODING, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("XML_OPTION_SKIP_TAGSTART", PHP3_XML_OPTION_SKIP_TAGSTART, CONST_CS|CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("XML_OPTION_SKIP_WHITE", PHP3_XML_OPTION_SKIP_WHITE, CONST_CS|CONST_PERSISTENT);
+
return SUCCESS;
}
if (parser->parser) {
XML_ParserFree(parser->parser);
}
+ if (parser->ltags) {
+ efree(parser->ltags);
+ }
if (parser->startElementHandler) {
efree(parser->startElementHandler);
}
inline static unsigned short
xml_encode_iso_8859_1(unsigned char c)
{
- php3_printf("c=%d ", c);
return (unsigned short)c;
}
/* {{{ xml_encode_us_ascii() */
inline static unsigned short
-xml_encode_us_ascii(char c)
+xml_encode_us_ascii(unsigned char c)
{
return (unsigned short)c;
}
int pos = len;
char *newbuf;
unsigned short c;
- unsigned short (*encoder)(char) = NULL;
+ unsigned short (*encoder)(unsigned char) = NULL;
xml_encoding *enc = xml_get_encoding(encoding);
*newlen = 0;
xml_utf8_decode(const XML_Char *s, int len, int *newlen, const XML_Char *encoding)
{
int pos = len;
- char *newbuf = emalloc(len);
+ char *newbuf = emalloc(len + 1);
unsigned short c;
char (*decoder)(unsigned short) = NULL;
xml_encoding *enc = xml_get_encoding(encoding);
*/
memcpy(newbuf, s, len);
*newlen = len;
+ newbuf[*newlen] = '\0';
return newbuf;
}
while (pos > 0) {
++*newlen;
}
if (*newlen < len) {
- newbuf = erealloc(newbuf, *newlen);
+ newbuf = erealloc(newbuf, *newlen + 1);
}
+ newbuf[*newlen] = '\0';
return newbuf;
}
/* }}} */
}
/* }}} */
- /* {{{ php3i_xml_startElementHandler() */
+/* {{{ php3i_add_to_info */
+static void php3i_add_to_info(xml_parser *parser,char *name)
+{
+ pval *element, values;
+
+ if (! parser->info) {
+ return;
+ }
+
+ if (_php3_hash_find(parser->info->value.ht,name,strlen(name) + 1,(void **) &element) == FAILURE) {
+ if (array_init(&values) == FAILURE) {
+ php3_error(E_ERROR, "Unable to initialize array");
+ return;
+ }
+
+ _php3_hash_update(parser->info->value.ht, name, strlen(name)+1, (void *) &values, sizeof(pval), (void **) &element);
+ }
+
+ add_next_index_long(element,parser->curtag);
+
+
+ parser->curtag++;
+}
+
+/* }}} */
+/* {{{ php3i_xml_startElementHandler() */
void php3i_xml_startElementHandler(void *userData, const char *name,
const char **attributes)
{
xml_parser *parser = (xml_parser *)userData;
+ const char **attrs = attributes;
XML_TLS_VARS;
- if (parser && parser->startElementHandler) {
+ if (parser) {
pval *retval, *args[3];
+ parser->level++;
+
if (parser->case_folding) {
name = _php3_strtoupper(estrdup(name));
}
- args[0] = php3i_long_pval(parser->index);
- args[1] = php3i_string_pval(name);
- args[2] = emalloc(sizeof(pval));
- array_init(args[2]);
- while (attributes && *attributes) {
- char *key = (char *)attributes[0];
- char *value = (char *)attributes[1];
- if (parser->case_folding) {
- key = _php3_strtoupper(estrdup(key));
+
+ if (parser->startElementHandler) {
+ args[0] = php3i_long_pval(parser->index);
+ args[1] = php3i_string_pval(name);
+ args[2] = emalloc(sizeof(pval));
+ array_init(args[2]);
+ while (attributes && *attributes) {
+ char *key = (char *)attributes[0];
+ char *value = (char *)attributes[1];
+ char *decoded_value;
+ int decoded_len;
+ if (parser->case_folding) {
+ key = _php3_strtoupper(estrdup(key));
+ }
+ decoded_value = xml_utf8_decode(value, strlen(value),
+ &decoded_len,
+ parser->target_encoding);
+
+ add_assoc_string(args[2], key, decoded_value, 0);
+ if (parser->case_folding) {
+ efree(key);
+ }
+ attributes += 2;
}
- add_assoc_string(args[2], key, value, 1);
- if (parser->case_folding) {
- efree(key);
+
+ if ((retval = xml_call_handler(parser, parser->startElementHandler, 3, args))) {
+ php3tls_pval_destructor(retval);
+ efree(retval);
}
- attributes += 2;
- }
- if ((retval = xml_call_handler(parser, parser->startElementHandler, 3, args))) {
- php3tls_pval_destructor(retval);
- efree(retval);
+ }
+
+ if (parser->data) {
+ pval tag, atr;
+ int atcnt = 0;
+
+ array_init(&tag);
+ array_init(&atr);
+
+ php3i_add_to_info(parser,((char *) name) + parser->toffset);
+
+ add_assoc_string(&tag,"tag",((char *) name) + parser->toffset,1); /* cast to avoid gcc-warning */
+ add_assoc_string(&tag,"type","open",1);
+ add_assoc_long(&tag,"level",parser->level);
+
+ parser->ltags[parser->level-1] = estrdup(name);
+ parser->lastwasopen = 1;
+
+ attributes = attrs;
+ while (attributes && *attributes) {
+ char *key = (char *)attributes[0];
+ char *value = (char *)attributes[1];
+ char *decoded_value;
+ int decoded_len;
+ if (parser->case_folding) {
+ key = _php3_strtoupper(estrdup(key));
+ }
+ decoded_value = xml_utf8_decode(value, strlen(value),
+ &decoded_len,
+ parser->target_encoding);
+
+ add_assoc_stringl(&atr,key,decoded_value,decoded_len,0);
+ atcnt++;
+ if (parser->case_folding) {
+ efree(key);
+ }
+ attributes += 2;
+ }
+
+ if (atcnt) {
+ _php3_hash_add(tag.value.ht,"attributes",sizeof("attributes"),&atr,sizeof(pval),NULL);
+ } else {
+ php3tls_pval_destructor(&atr);
+ }
+
+ _php3_hash_next_index_insert(parser->data->value.ht,&tag,sizeof(pval),(void *) &parser->ctag);
}
+
if (parser->case_folding) {
efree((char *)name);
}
xml_parser *parser = (xml_parser *)userData;
XML_TLS_VARS;
- if (parser && parser->endElementHandler) {
+ if (parser) {
pval *retval, *args[2];
if (parser->case_folding) {
name = _php3_strtoupper(estrdup(name));
}
- args[0] = php3i_long_pval(parser->index);
- args[1] = php3i_string_pval(name);
- if ((retval = xml_call_handler(parser, parser->endElementHandler, 2, args))) {
- php3tls_pval_destructor(retval);
- efree(retval);
+
+ if (parser->endElementHandler) {
+ args[0] = php3i_long_pval(parser->index);
+ args[1] = php3i_string_pval(name);
+
+ if ((retval = xml_call_handler(parser, parser->endElementHandler, 2, args))) {
+ php3tls_pval_destructor(retval);
+ efree(retval);
+ }
+ }
+
+ if (parser->data) {
+ pval tag;
+
+ if (parser->lastwasopen) {
+ add_assoc_string(parser->ctag,"type","complete",1);
+ } else {
+ array_init(&tag);
+
+ php3i_add_to_info(parser,((char *) name) + parser->toffset);
+
+ add_assoc_string(&tag,"tag",((char *) name) + parser->toffset,1); /* cast to avoid gcc-warning */
+ add_assoc_string(&tag,"type","close",1);
+ add_assoc_long(&tag,"level",parser->level);
+
+ _php3_hash_next_index_insert(parser->data->value.ht,&tag,sizeof(pval),NULL);
+ }
+
+ parser->lastwasopen = 0;
}
+
if (parser->case_folding) {
efree((char *)name);
}
+ if (parser->ltags) {
+ efree(parser->ltags[parser->level-1]);
+ }
+ parser->level--;
}
}
xml_parser *parser = (xml_parser *)userData;
XML_TLS_VARS;
- if (parser && parser->characterDataHandler) {
+ if (parser) {
pval *retval, *args[2];
- args[0] = php3i_long_pval(parser->index);
- args[1] = php3i_xmlcharpval(s, len, parser->target_encoding);
- if ((retval = xml_call_handler(parser, parser->characterDataHandler, 2, args))) {
- php3tls_pval_destructor(retval);
- efree(retval);
+ if (parser->characterDataHandler) {
+ args[0] = php3i_long_pval(parser->index);
+ args[1] = php3i_xmlcharpval(s, len, parser->target_encoding);
+ if ((retval = xml_call_handler(parser, parser->characterDataHandler, 2, args))) {
+ php3tls_pval_destructor(retval);
+ efree(retval);
+ }
+ }
+
+ if (parser->data) {
+ int i;
+ int doprint = 0;
+
+ char *decoded_value;
+ int decoded_len;
+
+ decoded_value = xml_utf8_decode(s,len,&decoded_len,parser->target_encoding);
+ for (i = 0; i < decoded_len; i++) {
+ switch (decoded_value[i]) {
+ case ' ':
+ case '\t':
+ case '\n':
+ continue;
+ default:
+ doprint = 1;
+ break;
+ }
+ if (doprint) {
+ break;
+ }
+ }
+ if (doprint || (! parser->skipwhite)) {
+ if (parser->lastwasopen) {
+ add_assoc_string(parser->ctag,"value",decoded_value,0);
+ } else {
+ pval tag;
+
+ array_init(&tag);
+
+ php3i_add_to_info(parser,parser->ltags[parser->level-1] + parser->toffset);
+
+ add_assoc_string(&tag,"tag",parser->ltags[parser->level-1] + parser->toffset,1);
+ add_assoc_string(&tag,"value",decoded_value,0);
+ add_assoc_string(&tag,"type","cdata",1);
+ add_assoc_long(&tag,"level",parser->level);
+
+ _php3_hash_next_index_insert(parser->data->value.ht,&tag,sizeof(pval),NULL);
+ }
+ } else {
+ efree(decoded_value);
+ }
}
}
}
/************************* EXTENSION FUNCTIONS *************************/
-/* {{{ int xml_parser_create() */
-
+/* {{{ proto int xml_parser_create()
+ Create an XML parser */
PHP_FUNCTION(xml_parser_create)
{
xml_parser *parser;
parser->parser = XML_ParserCreate(encoding);
parser->target_encoding = encoding;
XML_SetUserData(parser->parser, parser);
- XML_SetElementHandler(parser->parser, php3i_xml_startElementHandler, php3i_xml_endElementHandler);
- XML_SetCharacterDataHandler(parser->parser, php3i_xml_characterDataHandler);
- XML_SetProcessingInstructionHandler(parser->parser, php3i_xml_processingInstructionHandler);
- XML_SetDefaultHandler(parser->parser, php3i_xml_defaultHandler);
- XML_SetUnparsedEntityDeclHandler(parser->parser, php3i_xml_unparsedEntityDeclHandler);
- XML_SetNotationDeclHandler(parser->parser, php3i_xml_notationDeclHandler);
- XML_SetExternalEntityRefHandler(parser->parser, php3i_xml_externalEntityRefHandler);
id = php3_list_insert(parser, XML_GLOBAL(php3_xml_module).le_xml_parser);
parser = xml_get_parser(id, thisfunc, list);
parser->index = id;
RETVAL_LONG(id);
}
-
/* }}} */
-/* {{{ int xml_set_element_handler(int pind, string shdl, string ehdl) */
+/* {{{ proto int xml_set_element_handler(int pind, string shdl, string ehdl)
+ Set up start and end element handlers */
PHP_FUNCTION(xml_set_element_handler)
{
xml_parser *parser;
}
xml_set_handler(&parser->startElementHandler, shdl);
xml_set_handler(&parser->endElementHandler, ehdl);
+ XML_SetElementHandler(parser->parser, php3i_xml_startElementHandler, php3i_xml_endElementHandler);
RETVAL_TRUE;
}
-
/* }}} */
-/* {{{ int xml_set_character_data_handler(int pind, string hdl) */
+/* {{{ proto int xml_set_character_data_handler(int pind, string hdl)
+ Set up character data handler */
PHP_FUNCTION(xml_set_character_data_handler)
{
xml_parser *parser;
RETURN_FALSE;
}
xml_set_handler(&parser->characterDataHandler, hdl);
+ XML_SetCharacterDataHandler(parser->parser, php3i_xml_characterDataHandler);
RETVAL_TRUE;
}
-
/* }}} */
-/* {{{ int xml_set_processing_instruction_handler(int pind, string hdl) */
+/* {{{ proto int xml_set_processing_instruction_handler(int pind, string hdl)
+ Set up processing instruction (PI) handler */
PHP_FUNCTION(xml_set_processing_instruction_handler)
{
xml_parser *parser;
RETURN_FALSE;
}
xml_set_handler(&parser->processingInstructionHandler, hdl);
+ XML_SetProcessingInstructionHandler(parser->parser, php3i_xml_processingInstructionHandler);
RETVAL_TRUE;
}
-
/* }}} */
-/* {{{ int xml_set_default_handler(int pind, string hdl) */
+/* {{{ proto int xml_set_default_handler(int pind, string hdl)
+ Set up default handler */
PHP_FUNCTION(xml_set_default_handler)
{
xml_parser *parser;
RETURN_FALSE;
}
xml_set_handler(&parser->defaultHandler, hdl);
+ XML_SetDefaultHandler(parser->parser, php3i_xml_defaultHandler);
RETVAL_TRUE;
}
-
/* }}} */
-/* {{{ int xml_set_unparsed_entity_decl_handler(int pind, string hdl) */
+/* {{{ proto int xml_set_unparsed_entity_decl_handler(int pind, string hdl)
+ Set up unparsed entity declaration handler */
PHP_FUNCTION(xml_set_unparsed_entity_decl_handler)
{
xml_parser *parser;
RETURN_FALSE;
}
xml_set_handler(&parser->unparsedEntityDeclHandler, hdl);
+ XML_SetUnparsedEntityDeclHandler(parser->parser, php3i_xml_unparsedEntityDeclHandler);
RETVAL_TRUE;
}
-
/* }}} */
-/* {{{ int xml_set_notation_decl_handler(int pind, string hdl) */
+/* {{{ proto int xml_set_notation_decl_handler(int pind, string hdl)
+ Set up notation declaration handler */
PHP_FUNCTION(xml_set_notation_decl_handler)
{
xml_parser *parser;
RETURN_FALSE;
}
xml_set_handler(&parser->notationDeclHandler, hdl);
+ XML_SetNotationDeclHandler(parser->parser, php3i_xml_notationDeclHandler);
RETVAL_TRUE;
}
-
/* }}} */
-/* {{{ int xml_set_external_entity_ref_handler(int pind, string hdl) */
+/* {{{ proto int xml_set_external_entity_ref_handler(int pind, string hdl)
+ Set up external entity reference handler */
PHP_FUNCTION(xml_set_external_entity_ref_handler)
{
xml_parser *parser;
RETURN_FALSE;
}
xml_set_handler(&parser->externalEntityRefHandler, hdl);
+ XML_SetExternalEntityRefHandler(parser->parser, php3i_xml_externalEntityRefHandler);
RETVAL_TRUE;
}
-
/* }}} */
-/* {{{ int xml_parse(int pind, string data[, int isFinal]) */
+/* {{{ proto int xml_parse(int pind, string data[, int isFinal])
+ Start parsing an XML document */
PHP_FUNCTION(xml_parse)
{
xml_parser *parser;
if (parser == NULL) {
RETURN_FALSE;
}
- fflush(stdout);
+ /* fflush(stdout); uups, that can't be serious?!?!?*/
ret = XML_Parse(parser->parser, data->value.str.val, data->value.str.len, isFinal);
RETVAL_LONG(ret);
}
/* }}} */
-/* {{{ int xml_get_error_code(int pind) */
+/* {{{ proto int xml_parse_into_struct(int pind, string data,array &struct,array &index)
+ Parsing a XML document */
+
+PHP_FUNCTION(xml_parse_into_struct)
+{
+ xml_parser *parser;
+ pval *pind, *data, *xdata,*info = 0;
+ int argc, ret;
+ XML_TLS_VARS;
+
+ argc = ARG_COUNT(ht);
+ if (getParameters(ht, 4, &pind, &data, &xdata,&info) == SUCCESS) {
+ if (!ParameterPassedByReference(ht, 4)) {
+ php3_error(E_WARNING, "Array to be filled with values must be passed by reference.");
+ RETURN_FALSE;
+ }
+ array_init(info);
+ } else if (getParameters(ht, 3, &pind, &data, &xdata) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ if (!ParameterPassedByReference(ht, 3)) {
+ php3_error(E_WARNING, "Array to be filled with values must be passed by reference.");
+ RETURN_FALSE;
+ }
+
+ convert_to_long(pind);
+ convert_to_string(data);
+ array_init(xdata);
+
+ parser = xml_get_parser(pind->value.lval, "XML_Parse_Into_Struct", list);
+ if (parser == NULL) {
+ RETURN_FALSE;
+ }
+
+ parser->data = xdata;
+ parser->info = info;
+ parser->level = 0;
+ parser->ltags = emalloc(XML_MAXLEVEL * sizeof(char *));
+
+ XML_SetDefaultHandler(parser->parser, php3i_xml_defaultHandler);
+ XML_SetElementHandler(parser->parser, php3i_xml_startElementHandler, php3i_xml_endElementHandler);
+ XML_SetCharacterDataHandler(parser->parser, php3i_xml_characterDataHandler);
+
+ ret = XML_Parse(parser->parser, data->value.str.val, data->value.str.len, 1);
+
+ RETVAL_LONG(ret);
+}
+/* }}} */
+/* {{{ proto int xml_get_error_code(int pind)
+ Get XML parser error code */
PHP_FUNCTION(xml_get_error_code)
{
xml_parser *parser;
}
RETVAL_LONG((long)XML_GetErrorCode(parser->parser));
}
-
/* }}} */
-/* {{{ string xml_error_string(int code) */
+/* {{{ proto string xml_error_string(int code)
+ Get XML parser error string */
PHP_FUNCTION(xml_error_string)
{
pval *code;
RETVAL_STRING(str, 1);
}
}
-
/* }}} */
-/* {{{ int xml_get_current_line_number(int pind) */
+/* {{{ proto int xml_get_current_line_number(int pind)
+ Get current line number for an XML parser */
PHP_FUNCTION(xml_get_current_line_number)
{
xml_parser *parser;
}
RETVAL_LONG(XML_GetCurrentLineNumber(parser->parser));
}
-
/* }}} */
-/* {{{ int xml_get_current_column_number(int pind) */
+/* {{{ proto int xml_get_current_column_number(int pind)
+ Get current column number for an XML parser
+*/
PHP_FUNCTION(xml_get_current_column_number)
{
xml_parser *parser;
}
RETVAL_LONG(XML_GetCurrentColumnNumber(parser->parser));
}
-
/* }}} */
-/* {{{ int xml_get_current_byte_index(int pind) */
+/* {{{ proto int xml_get_current_byte_index(int pind)
+ Get current byte index for an XML parser */
PHP_FUNCTION(xml_get_current_byte_index)
{
xml_parser *parser;
}
RETVAL_LONG(XML_GetCurrentByteIndex(parser->parser));
}
-
/* }}} */
-/* {{{ int xml_parser_free(int pind) */
+/* {{{ proto int xml_parser_free(int pind)
+ Free an XML parser */
PHP_FUNCTION(xml_parser_free)
{
pval *pind;
}
RETVAL_TRUE;
}
-
/* }}} */
-/* {{{ int xml_parser_set_option(int pind, int option, mixed value) */
+/* {{{ proto int xml_parser_set_option(int pind, int option, mixed value)
+ Set options in an XML parser */
PHP_FUNCTION(xml_parser_set_option)
{
xml_parser *parser;
convert_to_long(val);
parser->case_folding = val->value.lval;
break;
+ case PHP3_XML_OPTION_SKIP_TAGSTART:
+ convert_to_long(val);
+ parser->toffset = val->value.lval;
+ break;
+ case PHP3_XML_OPTION_SKIP_WHITE:
+ convert_to_long(val);
+ parser->skipwhite = val->value.lval;
+ break;
case PHP3_XML_OPTION_TARGET_ENCODING: {
xml_encoding *enc = xml_get_encoding(val->value.str.val);
if (enc == NULL) {
}
RETVAL_TRUE;
}
-
/* }}} */
-/* {{{ int xml_parser_get_option(int pind, int option) */
+/* {{{ proto int xml_parser_get_option(int pind, int option)
+ Get options from an XML parser */
PHP_FUNCTION(xml_parser_get_option)
{
xml_parser *parser;
}
RETVAL_FALSE;
}
-
/* }}} */
-/* {{{ string utf8_encode(string data) */
+/* {{{ proto string utf8_encode(string data)
+ Encodes an ISO-8859-1 string to UTF-8 */
PHP_FUNCTION(utf8_encode)
{
pval *arg;
}
RETVAL_STRINGL(encoded, len, 0);
}
-
/* }}} */
-/* {{{ string utf8_decode(string data) */
+/* {{{ proto string utf8_decode(string data)
+ Converts a UTF-8 encoded string to ISO-8859-1 */
PHP_FUNCTION(utf8_decode)
{
pval *arg;
}
RETVAL_STRINGL(decoded, len, 0);
}
-
/* }}} */
#endif
extern int php3_minit_zlib(INIT_FUNC_ARGS);
extern int php3_mshutdown_zlib(SHUTDOWN_FUNC_ARGS);
-extern void php3_info_zlib(ZEND_MODULE_INFO_FUNC_ARGS);
-extern void php3_gzopen(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_gzclose(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_gzeof(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_gzread(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_gzgetc(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_gzgets(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_gzgetss(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_gzwrite(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_gzrewind(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_gztell(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_gzseek(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_gzpassthru(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_readgzfile(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_gzfile(INTERNAL_FUNCTION_PARAMETERS);
+void php3_info_zlib(ZEND_MODULE_INFO_FUNC_ARGS);
+PHP_FUNCTION(gzopen);
+PHP_FUNCTION(gzclose);
+PHP_FUNCTION(gzeof);
+PHP_FUNCTION(gzread);
+PHP_FUNCTION(gzgetc);
+PHP_FUNCTION(gzgets);
+PHP_FUNCTION(gzgetss);
+PHP_FUNCTION(gzwrite);
+PHP_FUNCTION(gzrewind);
+PHP_FUNCTION(gztell);
+PHP_FUNCTION(gzseek);
+PHP_FUNCTION(gzpassthru);
+PHP_FUNCTION(readgzfile);
+PHP_FUNCTION(gzfile);
#else
#define zlib_module_ptr NULL
/* {{{ proto array gzfile(string filename)
Read und uncompress entire .gz-file into an array */
-void php3_gzfile(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(gzfile) {
pval *filename, *arg2;
gzFile zp;
char *slashed, buf[8192];
/* Now loop through the file and do the magic quotes thing if needed */
memset(buf,0,8191);
- while((int)gzgets(zp, buf, 8191)) {
+ while(gzgets(zp, buf, 8191) != NULL) {
if (PG(magic_quotes_runtime)) {
int len;
/* {{{ proto int gzopen(string filename, string mode [, int use_include_path])
Open a .gz-file and return a .gz-file pointer */
-void php3_gzopen(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(gzopen) {
pval *arg1, *arg2, *arg3;
gzFile *zp;
char *p;
/* {{{ proto int gzclose(int zp)
Close an open .gz-file pointer */
-void php3_gzclose(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(gzclose) {
pval *arg1;
int id, type;
gzFile *zp;
/* {{{ proto int gzeof(int zp)
Test for end-of-file on a .gz-file pointer */
-void php3_gzeof(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(gzeof) {
pval *arg1;
gzFile *zp;
int id, type;
/* {{{ proto string gzgets(int zp, int length)
Get a line from .gz-file pointer */
-void php3_gzgets(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(gzgets) {
pval *arg1, *arg2;
gzFile *zp;
int id, len, type;
buf = emalloc(sizeof(char) * (len + 1));
/* needed because recv doesnt put a null at the end*/
memset(buf,0,len+1);
- if (!((int)gzgets(zp, buf, len))) {
+ if (!(gzgets(zp, buf, len) != NULL)) {
efree(buf);
RETVAL_FALSE;
} else {
/* {{{ proto string gzgetc(int zp)
Get a character from .gz-file pointer */
-void php3_gzgetc(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(gzgetc) {
pval *arg1;
gzFile *zp;
int id, type, c;
/* Strip any HTML tags while reading */
/* {{{ proto string gzgetss(int zp, int length)
Get a line from file pointer and strip HTML tags */
-void php3_gzgetss(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(gzgetss)
{
pval *fd, *bytes;
gzFile *zp;
buf = emalloc(sizeof(char) * (len + 1));
/*needed because recv doesnt set null char at end*/
memset(buf,0,len+1);
- if (!((int)gzgets(zp, buf, len))) {
+ if (!(gzgets(zp, buf, len) != NULL)) {
efree(buf);
RETURN_FALSE;
}
/* {{{ proto int gzwrite(int zp, string str [, int length])
Binary-safe .gz-file write */
-void php3_gzwrite(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(gzwrite) {
pval *arg1, *arg2, *arg3=NULL;
gzFile *zp;
int ret,id,type;
/* {{{ proto int gzrewind(int zp)
Rewind the position of a .gz-file pointer */
-void php3_gzrewind(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(gzrewind) {
pval *arg1;
int id,type;
gzFile *zp;
/* {{{ proto int gztell(int zp)
Get .gz-file pointer's read/write position */
-void php3_gztell(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(gztell) {
pval *arg1;
int id, type;
long pos;
/* {{{ proto int gzseek(int zp, int offset)
Seek on a file pointer */
-void php3_gzseek(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(gzseek) {
pval *arg1, *arg2;
int ret,id,type;
long pos;
*/
/* {{{ proto int readgzfile(string filename [, int use_include_path])
Output a .gz-file */
-void php3_readgzfile(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(readgzfile) {
pval *arg1, *arg2;
char buf[8192];
gzFile *zp;
*/
/* {{{ proto int gzpassthru(int zp)
Output all remaining data from a .gz-file pointer */
-void php3_gzpassthru(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(gzpassthru) {
pval *arg1;
gzFile *zp;
char buf[8192];
/* {{{ proto int gzread(int zp, int length)
Binary-safe file read */
-void php3_gzread(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(gzread)
{
pval *arg1, *arg2;
gzFile *zp;
#! /bin/sh
-# $Id: genif.sh,v 1.5 1999-05-11 00:01:41 zeev Exp $
+# $Id: genif.sh,v 1.6 1999-05-21 10:05:41 sas Exp $
# replacement for genif.pl
infile="$1"
for ext in ${1+"$@"} ; do
module_ptrs=" phpext_${ext}_ptr,\\\n$module_ptrs"
- for pre in php3 php php4 zend; do
- hdrfile="ext/$ext/${pre}_${ext}.h"
+ for pre in php3_ php_ php4_ zend_ "" ; do
+ hdrfile="ext/$ext/${pre}${ext}.h"
if test -f "$srcdir/$hdrfile" ; then
includes="#include \"$hdrfile\"\\\n$includes"
fi