X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Furi.c;h=efa11bf4df23af6123388ba8057023643a22149a;hp=fae1411aaa4fa78c84a5dfb3c6a091aa0799f6b2;hb=2f570511e1ca2d63705dc425e9e7bc3f3d744f64;hpb=1932238af8876622f567da122fb52fb3791c9514 diff --git a/src/uri.c b/src/uri.c index fae1411..efa11bf 100644 --- a/src/uri.c +++ b/src/uri.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ /** @@ -179,42 +179,6 @@ int yaz_uri_to_array(const char *path, ODR o, char ***name, char ***val) return no; } -char *yaz_uri_val(const char *path, const char *name, ODR o) -{ - size_t nlen = strlen(name); - if (*path != '?') - return 0; - path++; - while (path && *path) - { - const char *p1 = strchr(path, '='); - if (!p1) - break; - if ((size_t)(p1 - path) == nlen && !memcmp(path, name, nlen)) - { - size_t i = 0; - char *ret; - - path = p1 + 1; - p1 = strchr(path, '&'); - if (!p1) - p1 = strlen(path) + path; - ret = (char *) odr_malloc(o, p1 - path + 1); - while (*path && *path != '&') - { - size_t l = 3; - ret[i++] = decode_uri_char(path, &l); - path += l; - } - ret[i] = '\0'; - return ret; - } - path = strchr(p1, '&'); - if (path) - path++; - } - return 0; -} /* * Local variables: