aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 41f5c04..11d220d 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -325,7 +325,7 @@ pies_url_copy (struct pies_url **purl, struct pies_url *src)
}
int
-pies_url_create (struct pies_url **purl, const char *str)
+pies_basic_url_create (struct pies_url **purl, const char *str)
{
int rc;
struct pies_url *url;
@@ -345,6 +345,23 @@ pies_url_create (struct pies_url **purl, const char *str)
return rc;
}
+extern char **environ;
+
+int
+pies_url_create (struct pies_url **purl, const char *str)
+{
+ struct wordsplit ws;
+ int rc;
+
+ ws.ws_env = (const char**) environ;
+ if (wordsplit (str, &ws,
+ WRDSF_NOCMD | WRDSF_QUOTE | WRDSF_NOSPLIT | WRDSF_ENV))
+ return -1;
+ rc = pies_basic_url_create (purl, ws.ws_wordv[0]);
+ wordsplit_free (&ws);
+ return rc;
+}
+
const char *
pies_url_get_arg (struct pies_url *url, const char *argname)
{

Return to:

Send suggestions and report system problems to the System administrator.