CVS update: php3/functions

From: Date: Fri, 13 Nov 1998 10:24:59 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-2367@lists.php.net to get a copy of this message
Date: Friday November 13, 1998 @ 5:24 Author: steinm Update of /repository/php3/functions In directory asf:/u2/tmp/cvs-serv29311/functions Modified Files: url.c Log Message: Added prototypes Index: php3/functions/url.c diff -c php3/functions/url.c:1.40 php3/functions/url.c:1.41 *** php3/functions/url.c:1.40 Tue Oct 6 05:44:19 1998 --- php3/functions/url.c Fri Nov 13 05:24:58 1998 *************** *** 26,32 **** | Author: Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ ! /* $Id: url.c,v 1.40 1998/10/06 09:44:19 martin Exp $ */ #include <stdlib.h> #include <string.h> --- 26,32 ---- | Author: Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ ! /* $Id: url.c,v 1.41 1998/11/13 10:24:58 steinm Exp $ */ #include <stdlib.h> #include <string.h> *************** *** 159,164 **** --- 159,166 ---- return ret; } + /* {{{ proto array parse_url(string url) + Parse a URL and return its components */ void php3_parse_url(INTERNAL_FUNCTION_PARAMETERS) { pval *string; *************** *** 199,205 **** if (resource->fragment != NULL) add_assoc_string(return_value, "fragment", resource->fragment, 1); free_url(resource); ! } static int php3_htoi(char *s) { --- 201,207 ---- if (resource->fragment != NULL) add_assoc_string(return_value, "fragment", resource->fragment, 1); free_url(resource); ! } /* }}} */ static int php3_htoi(char *s) { *************** *** 265,270 **** --- 267,274 ---- return ((char *) str); } + /* {{{ proto string urlencode(string str) + URL-encodes string */ void php3_urlencode(INTERNAL_FUNCTION_PARAMETERS) { pval *arg; *************** *** 282,289 **** str = _php3_urlencode(arg->value.str.val, arg->value.str.len); RETVAL_STRING(str, 1); efree(str); ! } void php3_urldecode(INTERNAL_FUNCTION_PARAMETERS) { pval *arg; --- 286,295 ---- str = _php3_urlencode(arg->value.str.val, arg->value.str.len); RETVAL_STRING(str, 1); efree(str); ! } /* }}} */ + /* {{{ proto string urldecode(string str) + Decodes URL-encoded string */ void php3_urldecode(INTERNAL_FUNCTION_PARAMETERS) { pval *arg; *************** *** 301,307 **** len = _php3_urldecode(arg->value.str.val, arg->value.str.len); RETVAL_STRINGL(arg->value.str.val, len, 1); ! } int _php3_urldecode(char *str, int len) { --- 307,313 ---- len = _php3_urldecode(arg->value.str.val, arg->value.str.len); RETVAL_STRINGL(arg->value.str.val, len, 1); ! } /* }}} */ int _php3_urldecode(char *str, int len) { *************** *** 356,361 **** --- 362,369 ---- return ((char *) str); } + /* {{{ proto string rawurlencode(string str) + URL-encodes string */ void php3_rawurlencode(INTERNAL_FUNCTION_PARAMETERS) { pval *arg; *************** *** 373,380 **** str = _php3_rawurlencode(arg->value.str.val, arg->value.str.len); RETVAL_STRING(str, 1); efree(str); ! } void php3_rawurldecode(INTERNAL_FUNCTION_PARAMETERS) { pval *arg; --- 381,390 ---- str = _php3_rawurlencode(arg->value.str.val, arg->value.str.len); RETVAL_STRING(str, 1); efree(str); ! } /* }}} */ + /* {{{ proto string rawurldecode(string str) + Decodes URL-encodes string */ void php3_rawurldecode(INTERNAL_FUNCTION_PARAMETERS) { pval *arg; *************** *** 392,398 **** len = _php3_rawurldecode(arg->value.str.val, arg->value.str.len); RETVAL_STRINGL(arg->value.str.val, len, 1); ! } int _php3_rawurldecode(char *str, int len) { --- 402,408 ---- len = _php3_rawurldecode(arg->value.str.val, arg->value.str.len); RETVAL_STRINGL(arg->value.str.val, len, 1); ! } /* }}} */ int _php3_rawurldecode(char *str, int len) { -- 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 (#2367) next »