CVS update: php3/functions

From: Date: Fri, 21 Aug 1998 05:30:53 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-402@lists.php.net to get a copy of this message
Date: Friday August 21, 1998 @ 1:30 Author: steinm Update of /repository/php3/functions In directory asf:/tmp/cvs-serv21548/functions Modified Files: hw.c hw.h Log Message: * added more functions for Hyperwave * bug fix Index: php3/functions/hw.c diff -c php3/functions/hw.c:1.3 php3/functions/hw.c:1.4 *** php3/functions/hw.c:1.3 Fri Aug 14 11:51:12 1998 --- php3/functions/hw.c Fri Aug 21 01:30:53 1998 *************** *** 23,29 **** +----------------------------------------------------------------------+ */ ! /* $Id: hw.c,v 1.3 1998/08/14 15:51:12 shane Exp $ */ #if COMPILE_DL #include "dl/phpdl.h" #endif --- 23,29 ---- +----------------------------------------------------------------------+ */ ! /* $Id: hw.c,v 1.4 1998/08/21 05:30:53 steinm Exp $ */ #if COMPILE_DL #include "dl/phpdl.h" #endif *************** *** 106,111 **** --- 106,112 ---- {"hw_documentbodytag", php3_hw_document_bodytag, NULL}, {"hw_document_content", php3_hw_document_content, NULL}, {"hw_objrec2array", php3_hw_objrec2array, NULL}, + {"hw_array2objrec", php3_hw_array2objrec, NULL}, {"hw_incollections", php3_hw_incollections, NULL}, {"hw_inscoll", php3_hw_inscoll, NULL}, {"hw_insertobject", php3_hw_insertobject, NULL}, *************** *** 1734,1746 **** doc=arg3->value.lval; docptr = php3_list_find(doc,&type); if(!docptr || (type!=php3_hw_module.le_document)) { ! php3_error(E_WARNING,"Unable to find file identifier %d",id); RETURN_FALSE; } set_swap(ptr->swap_on); { ! if (0 != (ptr->lasterror = send_putdocument(ptr->socket, "gehtnix.fernuni-hagen.de", id, docptr->attributes, docptr->data, docptr->size))) { RETURN_FALSE; } } --- 1735,1747 ---- doc=arg3->value.lval; docptr = php3_list_find(doc,&type); if(!docptr || (type!=php3_hw_module.le_document)) { ! php3_error(E_WARNING,"Unable to find document identifier %d",id); RETURN_FALSE; } set_swap(ptr->swap_on); { ! if (0 != (ptr->lasterror = send_putdocument(ptr->socket, "localhost", id, docptr->attributes, docptr->data, docptr->size))) { RETURN_FALSE; } } *************** *** 2585,2590 **** --- 2586,2609 ---- make_return_array_from_objrec(&return_value, arg1->value.str.val); } + void php3_hw_array2objrec(INTERNAL_FUNCTION_PARAMETERS) { + YYSTYPE *arg1; + char *objrec, *retobj; + TLS_VARS; + + if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) { + WRONG_PARAM_COUNT; + } + convert_to_string(arg1); + objrec = make_objrec_from_array(arg1->value.ht); + if(objrec) { + retobj = estrdup(objrec); + free(objrec); + RETURN_STRING(retobj, 0); + } else + RETURN_FALSE; + } + void php3_hw_incollections(INTERNAL_FUNCTION_PARAMETERS) { YYSTYPE *arg1, *arg2, *arg3, *arg4; int type, link, i; *************** *** 2677,2683 **** } if(objrec) free(objrec); ! RETURN_TRUE; } void php3_hw_insdoc(INTERNAL_FUNCTION_PARAMETERS) { --- 2696,2702 ---- } if(objrec) free(objrec); ! RETURN_LONG(newid); } void php3_hw_insdoc(INTERNAL_FUNCTION_PARAMETERS) { Index: php3/functions/hw.h diff -c php3/functions/hw.h:1.1 php3/functions/hw.h:1.2 *** php3/functions/hw.h:1.1 Wed Aug 12 05:29:17 1998 --- php3/functions/hw.h Fri Aug 21 01:30:53 1998 *************** *** 23,29 **** */ ! /* $Id: hw.h,v 1.1 1998/08/12 09:29:17 steinm Exp $ */ #ifndef _HW_H #define _HW_H --- 23,29 ---- */ ! /* $Id: hw.h,v 1.2 1998/08/21 05:30:53 steinm Exp $ */ #ifndef _HW_H #define _HW_H *************** *** 107,112 **** --- 107,113 ---- 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(); extern void php3_hw_getsrcbydestobj(INTERNAL_FUNCTION_PARAMETERS); -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#402) next »