CVS update: php3/functions

From: Date: Fri, 21 Aug 1998 09:05:29 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-404@lists.php.net to get a copy of this message
Date: Friday August 21, 1998 @ 5:05 Author: steinm Update of /repository/php3/functions In directory asf:/tmp/cvs-serv23657/functions Modified Files: hw.c Log Message: Added extra parameter to hw_new_document() Index: php3/functions/hw.c diff -c php3/functions/hw.c:1.4 php3/functions/hw.c:1.5 *** php3/functions/hw.c:1.4 Fri Aug 21 01:30:53 1998 --- php3/functions/hw.c Fri Aug 21 05:05:28 1998 *************** *** 23,29 **** +----------------------------------------------------------------------+ */ ! /* $Id: hw.c,v 1.4 1998/08/21 05:30:53 steinm Exp $ */ #if COMPILE_DL #include "dl/phpdl.h" #endif --- 23,29 ---- +----------------------------------------------------------------------+ */ ! /* $Id: hw.c,v 1.5 1998/08/21 09:05:28 steinm Exp $ */ #if COMPILE_DL #include "dl/phpdl.h" #endif *************** *** 1728,1741 **** id=arg2->value.lval; ptr = php3_list_find(link,&type); if(!ptr || (type!=php3_hw_module.le_socketp && type!=php3_hw_module.le_psocketp)) { ! php3_error(E_WARNING,"Unable to find file identifier %d",id); RETURN_FALSE; } 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; } --- 1728,1741 ---- id=arg2->value.lval; ptr = php3_list_find(link,&type); if(!ptr || (type!=php3_hw_module.le_socketp && type!=php3_hw_module.le_psocketp)) { ! php3_error(E_WARNING,"Unable to find connection identifier %d",link); RETURN_FALSE; } 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",doc); RETURN_FALSE; } *************** *** 1749,1769 **** } void php3_hw_new_document(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; hw_document *doc; ! if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) { WRONG_PARAM_COUNT; } convert_to_string(arg1); convert_to_string(arg2); doc = malloc(sizeof(hw_document)); ! doc->data = strdup(arg2->value.str.val); doc->attributes = strdup(arg1->value.str.val); doc->bodytag = NULL; ! doc->size = strlen(doc->data); return_value->value.lval = php3_list_insert(doc,php3_hw_module.le_document); return_value->type = IS_LONG; } --- 1749,1771 ---- } void php3_hw_new_document(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2, *arg3; hw_document *doc; ! if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) { WRONG_PARAM_COUNT; } convert_to_string(arg1); convert_to_string(arg2); + convert_to_long(arg3); doc = malloc(sizeof(hw_document)); ! doc->data = malloc(arg3->value.lval); ! memcpy(doc->data, arg2->value.str.val, arg3->value.lval); doc->attributes = strdup(arg1->value.str.val); doc->bodytag = NULL; ! doc->size = arg3->value.lval; return_value->value.lval = php3_list_insert(doc,php3_hw_module.le_document); return_value->type = IS_LONG; } -- 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 (#404) next »