FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 06-19-2010, 05:55 AM
Andres P
 
Default libalpm: compare pkgname with strcoll

Signed-off-by: Andres P <aepd87@gmail.com>
---

$ LC_COLLATE=en_US p -Qsq ernel26$
kernel26
Kernel26

lib/libalpm/package.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index becbc60..0060300 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -749,7 +749,7 @@ int _alpm_pkg_cmp(const void *p1, const void *p2)
{
pmpkg_t *pkg1 = (pmpkg_t *)p1;
pmpkg_t *pkg2 = (pmpkg_t *)p2;
- return(strcmp(pkg1->name, pkg2->name));
+ return(strcoll(pkg1->name, pkg2->name));
}

/* Test for existence of a package in a alpm_list_t*
--
1.7.1
 
Old 06-20-2010, 11:32 AM
Allan McRae
 
Default libalpm: compare pkgname with strcoll

On 19/06/10 15:55, Andres P wrote:

Signed-off-by: Andres P<aepd87@gmail.com>
---


Please add commit messages. Looking at this patch on its own, I have
no idea what the replacement is trying to achieve.


I have added a commit message this time.

Signed-off-by: Allan



$ LC_COLLATE=en_US p -Qsq ernel26$
kernel26
Kernel26

lib/libalpm/package.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index becbc60..0060300 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -749,7 +749,7 @@ int _alpm_pkg_cmp(const void *p1, const void *p2)
{
pmpkg_t *pkg1 = (pmpkg_t *)p1;
pmpkg_t *pkg2 = (pmpkg_t *)p2;
- return(strcmp(pkg1->name, pkg2->name));
+ return(strcoll(pkg1->name, pkg2->name));
}

/* Test for existence of a package in a alpm_list_t*
 

Thread Tools




All times are GMT. The time now is 08:12 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org