Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
6b01a771
Commit
6b01a771
authored
18 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
make quark search case insensitive
parent
141ea8b2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapUtils/zmapGLibUtils.c
+20
-6
20 additions, 6 deletions
src/zmapUtils/zmapGLibUtils.c
with
20 additions
and
6 deletions
src/zmapUtils/zmapGLibUtils.c
+
20
−
6
View file @
6b01a771
...
...
@@ -26,9 +26,9 @@
*
* Exported functions: See ZMap/zmapGLibUtils.h
* HISTORY:
* Last edited: Oct
2
15:
40
2006 (edgrif)
* Last edited: Oct
3
15:
38
2006 (edgrif)
* Created: Thu Oct 13 15:22:35 2005 (edgrif)
* CVS info: $Id: zmapGLibUtils.c,v 1.1
0
2006-10-0
2
15:
12
:41 edgrif Exp $
* CVS info: $Id: zmapGLibUtils.c,v 1.1
1
2006-10-0
3
15:
07
:41 edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -70,9 +70,8 @@ struct _GRealArray
static
inline
GQuark
g_quark_new
(
ZMapQuarkSet
quark_set
,
gchar
*
string
)
;
static
void
printCB
(
gpointer
data
,
gpointer
user_data
)
;
static
gint
caseCompareFunc
(
gconstpointer
a
,
gconstpointer
b
)
;
/*! @defgroup zmapGLibutils zMapGLibUtils: glib-derived utilities for ZMap
...
...
@@ -253,11 +252,10 @@ void zMap_g_list_quark_print(GList *quark_list)
GList
*
zMap_g_list_find_quark
(
GList
*
list
,
GQuark
str_quark
)
{
GList
*
result
=
NULL
;
GCompareFunc
compare_func
;
zMapAssert
(
list
&&
str_quark
)
;
result
=
g_list_find
(
list
,
GINT_TO_POINTER
(
str_quark
))
;
result
=
g_list_find
_custom
(
list
,
GINT_TO_POINTER
(
str_quark
)
,
caseCompareFunc
)
;
return
result
;
}
...
...
@@ -519,3 +517,19 @@ static void printCB(gpointer data, gpointer user_data)
return
;
}
/*
The function takes two gconstpointer arguments, the GList element's data and the given user data
*/
static
gint
caseCompareFunc
(
gconstpointer
a
,
gconstpointer
b
)
{
gint
result
=
-
1
;
GQuark
list_quark
=
GPOINTER_TO_INT
(
a
),
str_quark
=
GPOINTER_TO_INT
(
b
)
;
result
=
g_ascii_strcasecmp
(
g_quark_to_string
(
list_quark
),
g_quark_to_string
(
str_quark
))
;
return
result
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment