summaryrefslogtreecommitdiffstats
path: root/libmpdemux/url.c
diff options
context:
space:
mode:
authorbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-12 21:02:00 +0000
committerbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-12 21:02:00 +0000
commit052eec728bb54dc6734c5b99dacd02984a3d42c5 (patch)
tree5d15dd9e426644ae587f503a6621dd49a6619096 /libmpdemux/url.c
parent2fe62851a9505333d0e5b9f61cd078a38d7723a4 (diff)
downloadmpv-052eec728bb54dc6734c5b99dacd02984a3d42c5.tar.bz2
mpv-052eec728bb54dc6734c5b99dacd02984a3d42c5.tar.xz
Added a debug function to print the struct's variables.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4120 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/url.c')
-rw-r--r--libmpdemux/url.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/libmpdemux/url.c b/libmpdemux/url.c
index b73a51fe44..5a13513076 100644
--- a/libmpdemux/url.c
+++ b/libmpdemux/url.c
@@ -192,3 +192,31 @@ url_escape_string(char *outbuf, char *inbuf) {
} 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