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
46dbf047
Commit
46dbf047
authored
15 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
add some quark/string compare utilities.
parent
f092ffe8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/include/ZMap/zmapUtils.h
+11
-2
11 additions, 2 deletions
src/include/ZMap/zmapUtils.h
src/zmapUtils/zmapUtils.c
+50
-2
50 additions, 2 deletions
src/zmapUtils/zmapUtils.c
with
61 additions
and
4 deletions
src/include/ZMap/zmapUtils.h
+
11
−
2
View file @
46dbf047
...
@@ -24,9 +24,9 @@
...
@@ -24,9 +24,9 @@
*
*
* Description: Utility functions for ZMap.
* Description: Utility functions for ZMap.
* HISTORY:
* HISTORY:
* Last edited:
Apr 15 14:33
2009 (
rds
)
* Last edited:
Jun 5 17:55
2009 (
edgrif
)
* Created: Thu Feb 26 10:33:10 2004 (edgrif)
* Created: Thu Feb 26 10:33:10 2004 (edgrif)
* CVS info: $Id: zmapUtils.h,v 1.4
0
2009-0
4-15 13:41:25 rds
Exp $
* CVS info: $Id: zmapUtils.h,v 1.4
1
2009-0
6-05 17:04:44 edgrif
Exp $
*-------------------------------------------------------------------
*-------------------------------------------------------------------
*/
*/
#ifndef ZMAP_UTILS_H
#ifndef ZMAP_UTILS_H
...
@@ -197,4 +197,13 @@ void zMapUtilsUserInit(void) ;
...
@@ -197,4 +197,13 @@ void zMapUtilsUserInit(void) ;
gboolean
zMapUtilsUserIsDeveloper
(
void
)
;
gboolean
zMapUtilsUserIsDeveloper
(
void
)
;
gboolean
zMapUtilsUserSetDeveloper
(
char
*
passwd
)
;
gboolean
zMapUtilsUserSetDeveloper
(
char
*
passwd
)
;
void
zMapPrintQuark
(
GQuark
quark
)
;
void
zMapLogQuark
(
GQuark
quark
)
;
gboolean
zMapLogQuarkIsStr
(
GQuark
quark
,
char
*
str
)
;
gboolean
zMapLogQuarkIsExactStr
(
GQuark
quark
,
char
*
str
)
;
gboolean
zMapLogQuarkHasStr
(
GQuark
quark
,
char
*
sub_str
)
;
#endif
/* ZMAP_UTILS_H */
#endif
/* ZMAP_UTILS_H */
This diff is collapsed.
Click to expand it.
src/zmapUtils/zmapUtils.c
+
50
−
2
View file @
46dbf047
...
@@ -26,9 +26,9 @@
...
@@ -26,9 +26,9 @@
*
*
* Exported functions: See ZMap/zmapUtils.h
* Exported functions: See ZMap/zmapUtils.h
* HISTORY:
* HISTORY:
* Last edited:
May 22 10:48
2009 (
rds
)
* Last edited:
Jun 5 17:55
2009 (
edgrif
)
* Created: Fri Mar 12 08:16:24 2004 (edgrif)
* Created: Fri Mar 12 08:16:24 2004 (edgrif)
* CVS info: $Id: zmapUtils.c,v 1.3
1
2009-0
5-22 09:48:52 rds
Exp $
* CVS info: $Id: zmapUtils.c,v 1.3
2
2009-0
6-05 17:04:44 edgrif
Exp $
*-------------------------------------------------------------------
*-------------------------------------------------------------------
*/
*/
...
@@ -606,6 +606,54 @@ void zMapLogQuark(GQuark quark)
...
@@ -606,6 +606,54 @@ void zMapLogQuark(GQuark quark)
/*! Case insensitive compare.
* @param quark Quark to be stringified and compared.
* @param str String to be compared.
* @return TRUE if compared worked, FALSE otherwise.
*/
gboolean
zMapLogQuarkIsStr
(
GQuark
quark
,
char
*
str
)
{
gboolean
result
=
FALSE
;
if
(
g_ascii_strcasecmp
(
g_quark_to_string
(
quark
),
str
)
==
0
)
result
=
TRUE
;
return
result
;
}
/*! Case sensitive compare.
* @param quark Quark to be stringified and compared.
* @param str String to be compared.
* @return TRUE if compared worked, FALSE otherwise.
*/
gboolean
zMapLogQuarkIsExactStr
(
GQuark
quark
,
char
*
str
)
{
gboolean
result
=
FALSE
;
if
(
strcmp
(
g_quark_to_string
(
quark
),
str
)
==
0
)
result
=
TRUE
;
return
result
;
}
/*! Is str in quark.
* @param quark Quark to be stringified and compared.
* @param sub_str Sub-string to be compared.
* @return TRUE if compared worked, FALSE otherwise.
*/
gboolean
zMapLogQuarkHasStr
(
GQuark
quark
,
char
*
sub_str
)
{
gboolean
result
=
FALSE
;
if
((
strstr
(
g_quark_to_string
(
quark
),
sub_str
)))
result
=
TRUE
;
return
result
;
}
/*! @} end of zmaputils docs. */
/*! @} end of zmaputils docs. */
...
...
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