From d6b502441f8d9b4b169e4f9bb28468d8f2dec627 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 2 Oct 2013 11:48:02 +0200 Subject: [PATCH] Remove deprecated functions yaz_uri_val .. and yaz_uri_val_int. Never used outside YAZ. --- include/yaz/srw.h | 7 ------- src/srwutil.c | 7 ------- src/uri.c | 36 ------------------------------------ 3 files changed, 50 deletions(-) diff --git a/include/yaz/srw.h b/include/yaz/srw.h index 68644a9..51239f4 100644 --- a/include/yaz/srw.h +++ b/include/yaz/srw.h @@ -238,13 +238,6 @@ YAZ_EXPORT int yaz_diag_srw_to_bib1(int srw_code); YAZ_EXPORT const char *yaz_srw_pack_to_str(int pack); YAZ_EXPORT int yaz_srw_str_to_pack(const char *str); -/** \brief deprecated */ -YAZ_EXPORT char *yaz_uri_val(const char *path, const char *name, ODR o); - -/** \brief deprecated */ -YAZ_EXPORT void yaz_uri_val_int(const char *path, const char *name, - ODR o, Odr_int **intp); - YAZ_EXPORT int yaz_uri_to_array(const char *path, ODR o, char ***name, char ***val); YAZ_EXPORT void yaz_array_to_uri(char **path, ODR o, diff --git a/src/srwutil.c b/src/srwutil.c index ae8ecae..fdf9944 100644 --- a/src/srwutil.c +++ b/src/srwutil.c @@ -141,13 +141,6 @@ static void yaz_srw_decodeauth(Z_SRW_PDU *sr, Z_HTTP_Request *hreq, } } -void yaz_uri_val_int(const char *path, const char *name, ODR o, Odr_int **intp) -{ - const char *v = yaz_uri_val(path, name, o); - if (v) - *intp = odr_intdup(o, atoi(v)); -} - void yaz_mk_srw_diagnostic(ODR o, Z_SRW_diagnostic *d, const char *uri, const char *message, const char *details) diff --git a/src/uri.c b/src/uri.c index fae1411..135d024 100644 --- a/src/uri.c +++ b/src/uri.c @@ -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: -- 1.7.10.4