[Mplayer-cvslog] CVS: main/libmpdemux url.c,1.11,1.12 url.h,1.5,1.6

Bertrand Baudet bertrand at mplayer.dev.hu
Sat Jan 12 22:02:03 CET 2002


Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv9423/libmpdemux

Modified Files:
	url.c url.h 
Log Message:
Added a debug function to print the struct's variables.


Index: url.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/url.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- url.c	19 Dec 2001 13:03:22 -0000	1.11
+++ url.c	12 Jan 2002 21:02:00 -0000	1.12
@@ -192,3 +192,31 @@
 	} while (c != '\0');
 }
 
+#ifdef __URL_DEBUG
+void
+url_debug(URL_t *url) {
+	if( url==NULL ) {
+		printf("URL pointer NULL\n");
+		return;
+	}
+	if( url->url!=NULL ) {
+		printf("url=%s\n", url->url );
+	}
+	if( url->protocol!=NULL ) {
+		printf("protocol=%s\n", url->protocol );
+	}
+	if( url->hostname!=NULL ) {
+		printf("hostname=%s\n", url->hostname );
+	}
+	printf("port=%d\n", url->port );
+	if( url->file!=NULL ) {
+		printf("file=%s\n", url->file );
+	}
+	if( url->username!=NULL ) {
+		printf("username=%s\n", url->username );
+	}
+	if( url->password!=NULL ) {
+		printf("password=%s\n", url->password );
+	}
+}
+#endif //__URL_DEBUG

Index: url.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/url.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- url.h	14 Dec 2001 23:48:47 -0000	1.5
+++ url.h	12 Jan 2002 21:02:00 -0000	1.6
@@ -7,6 +7,8 @@
 #ifndef __URL_H
 #define __URL_H
 
+//#define __URL_DEBUG
+
 typedef struct {
 	char *url;
 	char *protocol;
@@ -24,4 +26,8 @@
 void url_unescape_string(char *outbuf, char *inbuf);
 void url_escape_string(char *outbuf, char *inbuf);
 
-#endif
+#ifndef __URL_DEBUG
+void url_debug(URL_t* url);
+#endif // __URL_DEBUG
+
+#endif // __URL_H




More information about the MPlayer-cvslog mailing list