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)
325} 325}
326 326
327int 327int
328pies_url_create (struct pies_url **purl, const char *str) 328pies_basic_url_create (struct pies_url **purl, const char *str)
329{ 329{
330 int rc; 330 int rc;
331 struct pies_url *url; 331 struct pies_url *url;
@@ -344,6 +344,23 @@ pies_url_create (struct pies_url **purl, const char *str)
344 } 344 }
345 return rc; 345 return rc;
346} 346}
347
348extern char **environ;
349
350int
351pies_url_create (struct pies_url **purl, const char *str)
352{
353 struct wordsplit ws;
354 int rc;
355
356 ws.ws_env = (const char**) environ;
357 if (wordsplit (str, &ws,
358 WRDSF_NOCMD | WRDSF_QUOTE | WRDSF_NOSPLIT | WRDSF_ENV))
359 return -1;
360 rc = pies_basic_url_create (purl, ws.ws_wordv[0]);
361 wordsplit_free (&ws);
362 return rc;
363}
347 364
348const char * 365const char *
349pies_url_get_arg (struct pies_url *url, const char *argname) 366pies_url_get_arg (struct pies_url *url, const char *argname)

Return to:

Send suggestions and report system problems to the System administrator.