From 6f402e2d2f052972886712f60d592684c8671982 Mon Sep 17 00:00:00 2001 From: epoch Date: Sat, 20 Apr 2019 05:32:27 -0500 Subject: rebased on an old copy of this repo. renamed everything. rewrote the uri parser. added uricmp. wew. --- uriescape.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 uriescape.c (limited to 'uriescape.c') diff --git a/uriescape.c b/uriescape.c new file mode 100644 index 0000000..da3da7e --- /dev/null +++ b/uriescape.c @@ -0,0 +1,14 @@ +#include "uri.h" +#include + +int main(int argc,char *argv[]) { + int len; + char *out; + if(argc < 2) return 1; + len=uriescapelength(argv[1],strlen(argv[1])); + out=malloc(len+1); + uriescape(argv[1],out,len); + out[len]=0; + printf("%s\n",out); + return 0; +} -- cgit v1.2.3