diff options
author | epoch <epoch@hacking.allowed.org> | 2020-01-27 17:29:58 -0600 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2020-01-27 17:29:58 -0600 |
commit | 81a3c946d5a1a46ef46597ab3af39f57a21cc753 (patch) | |
tree | d1d1fd0bb9f91ac204c402185a80392f4fb443d0 | |
parent | d4b183d46ac08139107b8c5f04ba9dc714b8c4f0 (diff) | |
download | uritools-81a3c946d5a1a46ef46597ab3af39f57a21cc753.tar.gz uritools-81a3c946d5a1a46ef46597ab3af39f57a21cc753.zip |
added blank lines between output for each URI that way recutils can parse it properly (also, it just looks better. easier to remove the blanks afterwards than to put them in afterwards.)
-rw-r--r-- | uricut.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -40,6 +40,7 @@ int main(int argc,char *argv[]) { short args[256];//this needs to be a short to make room for the F_WHOLE_URI int i,j,c=0; int size=1024; + char at_least_one=0; char fixme=0; char using_stdin=1; char malloced=0; @@ -135,6 +136,7 @@ int main(int argc,char *argv[]) { if(args[i]&F_WHOLE_URI) printf("%s\n",uri); } } else { + if(at_least_one) printf("\n"); 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); @@ -144,6 +146,7 @@ int main(int argc,char *argv[]) { 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); + at_least_one=1; } free(uri);//this is definitely malloc()d if(malloced) { |