libxbps: xbps_pkgpattern_xxx extend set of chars to be detected.

This commit is contained in:
Juan RP 2011-10-24 10:03:45 +02:00
parent 7716fa15de
commit c6636d1b79
2 changed files with 6 additions and 3 deletions

View File

@ -55,7 +55,7 @@
*/
#define XBPS_PKGINDEX_VERSION "1.2"
#define XBPS_API_VERSION "20111024"
#define XBPS_API_VERSION "20111024-1"
#define XBPS_VERSION "0.11.0"
/**

View File

@ -172,11 +172,14 @@ xbps_pkgpattern_name(const char *pkg)
assert(pkg != NULL);
res = strpbrk(pkg, "><-");
res = strpbrk(pkg, "><*?[]");
if (res == NULL)
return NULL;
len = strlen(pkg) - strlen(res) + 1;
if (pkg[len-2] == '-')
len--;
pkgname = malloc(len);
if (pkgname == NULL)
return NULL;
@ -193,7 +196,7 @@ xbps_pkgpattern_version(const char *pkg)
assert(pkg != NULL);
res = strpbrk(pkg, "><-");
res = strpbrk(pkg, "><*?[]");
if (res == NULL)
return NULL;