[Mplayer-cvslog] CVS: main url.c,1.3,1.4 url.h,1.2,1.3

Bertrand Baudet bertrand at users.sourceforge.net
Tue May 29 18:58:55 CEST 2001


Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv3973

Modified Files:
	url.c url.h 
Log Message:
Bugs fix, improvements...


Index: url.c
===================================================================
RCS file: /cvsroot/mplayer/main/url.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** url.c	2001/05/25 13:57:18	1.3
--- url.c	2001/05/29 16:58:52	1.4
***************
*** 1,2 ****
--- 1,11 ----
+ /* 
+  * URL Helper
+  * by Bertrand Baudet <bertrand_baudet at yahoo.com>
+  * (C) 2001, MPlayer team.
+  *
+  * TODO: 
+  * 	Extract the username/password if present
+  */
+ 
  #include <string.h>
  #include <stdlib.h>
***************
*** 6,10 ****
  
  URL_t*
! set_url(char* url) {
  	int pos1, pos2;
  	URL_t* Curl;
--- 15,19 ----
  
  URL_t*
! url_new(char* url) {
  	int pos1, pos2;
  	URL_t* Curl;
***************
*** 18,26 ****
  	}
  	// Initialisation of the URL container members
! 	Curl->url = NULL;
! 	Curl->protocol = NULL;
! 	Curl->hostname = NULL;
! 	Curl->file = NULL;
! 	Curl->port = 0;
  
  	// Copy the url in the URL container
--- 27,31 ----
  	}
  	// Initialisation of the URL container members
! 	memset( Curl, 0, sizeof(URL_t) );
  
  	// Copy the url in the URL container
***************
*** 102,106 ****
  
  void
! free_url(URL_t* url) {
  	if(url) return;
  	if(url->url) free(url->url);
--- 107,111 ----
  
  void
! url_free(URL_t* url) {
  	if(url) return;
  	if(url->url) free(url->url);
***************
*** 108,111 ****
--- 113,118 ----
  	if(url->hostname) free(url->hostname);
  	if(url->file) free(url->file);
+ 	if(url->username) free(url->username);
+ 	if(url->password) free(url->password);
  	free(url);
  }

Index: url.h
===================================================================
RCS file: /cvsroot/mplayer/main/url.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** url.h	2001/05/20 12:42:14	1.2
--- url.h	2001/05/29 16:58:52	1.3
***************
*** 1,5 ****
! #ifndef URL_H
! #define URL_H
  
  typedef struct {
  	char *url;
--- 1,11 ----
! /* 
!  * URL Helper
!  * by Bertrand Baudet <bertrand_baudet at yahoo.com>
!  * (C) 2001, MPlayer team.
!  */
  
+ #ifndef __URL_H
+ #define __URL_H
+ 
  typedef struct {
  	char *url;
***************
*** 8,15 ****
  	char *file;
  	unsigned int port;
  } URL_t;
  
! URL_t* set_url(char* url);
! void   free_url(URL_t* url);
  
  #endif
--- 14,23 ----
  	char *file;
  	unsigned int port;
+ 	char *username;
+ 	char *password;
  } URL_t;
  
! URL_t* url_new(char* url);
! void   url_free(URL_t* url);
  
  #endif


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list