diff options
author | Ali Fardan <raiz@stellarbound.space> | 2020-11-21 07:31:53 +0300 |
---|---|---|
committer | Ali Fardan <raiz@stellarbound.space> | 2020-11-21 07:31:53 +0300 |
commit | 8df738163593a6e2589407b185039930ce599f02 (patch) | |
tree | 07f182e9334fba34277b81a6b5f3ddc7e1b4ae22 | |
parent | e088964229bf984dbb8767f1e0b0e81f1f4dece9 (diff) | |
download | libyuri-8df738163593a6e2589407b185039930ce599f02.tar.gz |
add mkfile and fix compilation on 9front
-rw-r--r-- | encode.c | 2 | ||||
-rw-r--r-- | mkfile | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/encode.c b/encode.c index ae2d05e..75b7f90 100644 --- a/encode.c +++ b/encode.c @@ -82,7 +82,7 @@ uri_encode(struct uri *u) if (u->npath != 0) { for (i = 0; i < u->npath; i++) { - if ((i == 0) ? u->authority.host : 1) { + if (i != 0 || u->authority.host) { len += 1; /* / */ dup = realloc(ret, len); if (dup == NULL) { diff --git a/mkfile b/mkfile new file mode 100644 index 0000000..022fa74 --- /dev/null +++ b/mkfile @@ -0,0 +1,9 @@ +</sys/src/ape/config + +CFLAGS=-Fwc -D_BSD_SOURCE -D_POSIX_SOURCE + +LIB=libyuri.a$O +HFILES=yuri.h +OFILES=yuri.$O decode.$O encode.$O normalize.$O strlcpy.$O strlcat.$O + +</sys/src/cmd/mklib |