cvs: php4 /ext/standard url.c url.h /main fopen-wrappers.c

From: Date: Sat, 29 Jul 2000 22:32:21 +0000
Subject: cvs: php4 /ext/standard url.c url.h /main fopen-wrappers.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-983@lists.php.net to get a copy of this message
rasmus Sat Jul 29 15:32:21 2000 EDT Modified files: /php4/ext/standard url.c url.h /php4/main fopen-wrappers.c Log: This url symbol was a bit too generic. Change it to php_url instead. It was clashing with a similar typedef in the UdmSearch integration I am working on. Index: php4/ext/standard/url.c diff -u php4/ext/standard/url.c:1.26 php4/ext/standard/url.c:1.27 --- php4/ext/standard/url.c:1.26 Fri Jun 9 06:15:19 2000 +++ php4/ext/standard/url.c Sat Jul 29 15:32:21 2000 @@ -15,7 +15,7 @@ | Author: Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ -/* $Id: url.c,v 1.26 2000/06/09 13:15:19 zeev Exp $ */ +/* $Id: url.c,v 1.27 2000/07/29 22:32:21 rasmus Exp $ */ #include <stdlib.h> #include <string.h> @@ -37,7 +37,7 @@ #endif /*_OSD_POSIX*/ -void free_url(url * theurl) +void free_url(php_url * theurl) { if (theurl->scheme) efree(theurl->scheme); @@ -56,7 +56,7 @@ efree(theurl); } -url *url_parse(char *str) +php_url *url_parse(char *str) { regex_t re; regmatch_t subs[10]; @@ -64,12 +64,12 @@ int length = strlen(str); char *result; - url *ret = (url *) emalloc(sizeof(url)); + php_url *ret = (php_url *) emalloc(sizeof(php_url)); if (!ret) { /*php_error(E_WARNING,"Unable to allocate memory\n");*/ return NULL; } - memset(ret, 0, sizeof(url)); + memset(ret, 0, sizeof(php_url)); /* from Appendix B of draft-fielding-url-syntax-09, http://www.ics.uci.edu/~fielding/url/url.txt */ @@ -161,7 +161,7 @@ PHP_FUNCTION(parse_url) { pval **str; - url *resource; + php_url *resource; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) { WRONG_PARAM_COUNT; Index: php4/ext/standard/url.h diff -u php4/ext/standard/url.h:1.7 php4/ext/standard/url.h:1.8 --- php4/ext/standard/url.h:1.7 Sun Jul 23 18:39:49 2000 +++ php4/ext/standard/url.h Sat Jul 29 15:32:21 2000 @@ -15,12 +15,12 @@ | Authors: Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ -/* $Id: url.h,v 1.7 2000/07/24 01:39:49 david Exp $ */ +/* $Id: url.h,v 1.8 2000/07/29 22:32:21 rasmus Exp $ */ #ifndef URL_H #define URL_H -typedef struct url { +typedef struct php_url { char *scheme; char *user; char *pass; @@ -29,10 +29,10 @@ char *path; char *query; char *fragment; -} url; +} php_url; -void free_url(url *); -extern url *url_parse(char *); +void free_url(php_url *); +extern php_url *url_parse(char *); extern int php_url_decode(char *, int); /* return value: length of decoded string */ extern char *php_url_encode(char *, int); extern int php_raw_url_decode(char *, int); /* return value: length of decoded string */ Index: php4/main/fopen-wrappers.c diff -u php4/main/fopen-wrappers.c:1.71 php4/main/fopen-wrappers.c:1.72 --- php4/main/fopen-wrappers.c:1.71 Sat Jul 29 03:48:57 2000 +++ php4/main/fopen-wrappers.c Sat Jul 29 15:32:21 2000 @@ -16,7 +16,7 @@ | Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: fopen-wrappers.c,v 1.71 2000/07/29 10:48:57 zeev Exp $ */ +/* $Id: fopen-wrappers.c,v 1.72 2000/07/29 22:32:21 rasmus Exp $ */ #include "php.h" #include "php_globals.h" @@ -512,7 +512,7 @@ static FILE *php_fopen_url_wrap_http(const char *path, char *mode, int options, int *issock, int *socketd, char **opened_path) { FILE *fp=NULL; - url *resource=NULL; + php_url *resource=NULL; struct sockaddr_in server; char tmp_line[512]; char location[512]; @@ -679,7 +679,7 @@ static FILE *php_fopen_url_wrap_ftp(const char *path, char *mode, int options, int *issock, int *socketd, char **opened_path) { FILE *fp=NULL; - url *resource=NULL; + php_url *resource=NULL; struct sockaddr_in server; char tmp_line[512]; unsigned short portno;

« previous php.cvs (#983) next »