From 61fa33424e49128ddca8ef679680882b04c96654 Mon Sep 17 00:00:00 2001 From: epochqwert Date: Mon, 15 Oct 2018 08:07:14 +0000 Subject: added urlescape and urlunescape --- urlescape.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 urlescape.c (limited to 'urlescape.c') diff --git a/urlescape.c b/urlescape.c new file mode 100644 index 0000000..ce8e3e7 --- /dev/null +++ b/urlescape.c @@ -0,0 +1,14 @@ +#include +#include "url.h" + +int main(int argc,char *argv[]) { + int len; + char *out; + if(argc < 2) return 1; + len=urlescapelength(argv[1],strlen(argv[1])); + out=malloc(len+1); + urlescape(argv[1],out,len); + out[len]=0; + printf("%s\n",out); + return 0; +} -- cgit v1.2.3