diff options
author | epoch <epoch@hacking.allowed.org> | 2019-04-22 23:33:09 -0500 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2019-04-22 23:33:09 -0500 |
commit | 25c40a3f4c5447fc2224b1707b44a99b46515151 (patch) | |
tree | 8ed6d5157f6e48e40a61bd3d10a9e4f27e0be66d /uricut.c | |
parent | 75fa9480f82b0fab52c00c35e1641da265041dfa (diff) | |
download | uritools-25c40a3f4c5447fc2224b1707b44a99b46515151.tar.gz uritools-25c40a3f4c5447fc2224b1707b44a99b46515151.zip |
only printing parts of the url that are actually defined now
Diffstat (limited to 'uricut.c')
-rw-r--r-- | uricut.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -137,14 +137,14 @@ int main(int argc,char *argv[]) { if(args[i]&F_WHOLE_URI) printf("%s\n",uri); } } else { - printf("scheme: %s\n",u.scheme); - printf("username: %s\n",u.username); - printf("password: %s\n",u.password); - printf("domain: %s\n",u.domain); - printf("port: %s\n",u.port); - printf("path: %s\n",u.path); - printf("query_string: %s\n",u.query_string); - printf("fragment_id: %s\n",u.fragment_id); + if(u.scheme) printf("scheme: %s\n",u.scheme); + if(u.username) printf("username: %s\n",u.username); + if(u.password) printf("password: %s\n",u.password); + if(u.domain) printf("domain: %s\n",u.domain); + if(u.port) printf("port: %s\n",u.port); + if(u.path) printf("path: %s\n",u.path); + if(u.query_string) printf("query_string: %s\n",u.query_string); + if(u.fragment_id) printf("fragment_id: %s\n",u.fragment_id); printf("whole_uri: %s\n",uri); } free(uri);//this is definitely malloc()d |