diff options
Diffstat (limited to 'urigetline.c')
-rw-r--r-- | urigetline.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/urigetline.c b/urigetline.c index 4963a84..eb8ab6b 100644 --- a/urigetline.c +++ b/urigetline.c @@ -1,6 +1,8 @@ +#define _XOPEN_SOURCE 500 #include "uri.h" #include <stdio.h> #include <stdlib.h> + #include <string.h> #include <fnmatch.h> @@ -60,7 +62,7 @@ int main(int argc,char *argv[]) {//argument needs to be the URI free(u); return 1; } - urifromline(u,argv[1]);//only argv[1] is a URI? + urifromline(u,strdup(argv[1])); for(;fgets(line,LINE_LENGTH-1,stdin);) {//each line comes from the config. we need to split it on spaces. if(strchr(line,'\r')) *strchr(line,'\r')=0; if(strchr(line,'\n')) *strchr(line,'\n')=0; |