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
1f5eb7a3
Commit
1f5eb7a3
authored
15 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
improve quark list printing function.
parent
9e95b7a3
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/zmapGLibUtils.h
+3
-3
3 additions, 3 deletions
src/include/ZMap/zmapGLibUtils.h
src/zmapUtils/zmapGLibUtils.c
+19
-6
19 additions, 6 deletions
src/zmapUtils/zmapGLibUtils.c
with
22 additions
and
9 deletions
src/include/ZMap/zmapGLibUtils.h
+
3
−
3
View file @
1f5eb7a3
...
...
@@ -26,9 +26,9 @@
* glib but not included with their distribution.
*
* HISTORY:
* Last edited:
Aug 5 16:42
200
8
(edgrif)
* Last edited:
Mar 24 10:24
200
9
(edgrif)
* Created: Thu Oct 13 15:56:54 2005 (edgrif)
* CVS info: $Id: zmapGLibUtils.h,v 1.1
8
200
8
-0
8-29 09:54
:1
6
edgrif Exp $
* CVS info: $Id: zmapGLibUtils.h,v 1.1
9
200
9
-0
4-03 15:41
:1
8
edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_GLIBUTILS_H
...
...
@@ -72,7 +72,7 @@ void zMap_g_list_foreach_directional(GList *list, GFunc func, gpointer user_data
ZMapGListDirection
forward
);
gboolean
zMap_g_list_cond_foreach
(
GList
*
list
,
ZMapGFuncCond
func
,
gpointer
user_data
)
;
GList
*
zMap_g_list_move
(
GList
*
list
,
gpointer
user_data
,
gint
new_index
)
;
void
zMap_g_list_quark_print
(
GList
*
quark_list
)
;
void
zMap_g_list_quark_print
(
GList
*
quark_list
,
char
*
list_name
,
gboolean
new_line
)
;
GList
*
zMap_g_list_find_quark
(
GList
*
list
,
GQuark
str_quark
)
;
GList
*
zMap_g_list_grep
(
GList
**
list_inout
,
gpointer
data
,
GCompareFunc
func
);
GList
*
zMap_g_list_insert_list_after
(
GList
*
recipient
,
GList
*
donor
,
int
point
);
...
...
This diff is collapsed.
Click to expand it.
src/zmapUtils/zmapGLibUtils.c
+
19
−
6
View file @
1f5eb7a3
...
...
@@ -26,9 +26,9 @@
*
* Exported functions: See ZMap/zmapGLibUtils.h
* HISTORY:
* Last edited:
Aug 5 16:52
200
8
(edgrif)
* Last edited:
Mar 24 13:07
200
9
(edgrif)
* Created: Thu Oct 13 15:22:35 2005 (edgrif)
* CVS info: $Id: zmapGLibUtils.c,v 1.2
5
200
8
-0
8-29 09:54
:1
6
edgrif Exp $
* CVS info: $Id: zmapGLibUtils.c,v 1.2
6
200
9
-0
4-03 15:41
:1
8
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -289,12 +289,24 @@ GList *zMap_g_list_move(GList *list, gpointer user_data, gint new_index)
/*!
* Prints out the contents of a list assuming that each element is a GQuark. We have
* lots of these in zmap so this is useful. */
void
zMap_g_list_quark_print
(
GList
*
quark_list
)
* lots of these in zmap so this is useful.
*
* @param quark_list A GList where each data pointer is a GQuark.
* @param list_name Optional list name to be printed first.
* @param new_line FALSE print list on one line, TRUE print each element
* on a new line.
* @return <nothing>
*/
void
zMap_g_list_quark_print
(
GList
*
quark_list
,
char
*
list_name
,
gboolean
new_line
)
{
zMapAssert
(
quark_list
)
;
g_list_foreach
(
quark_list
,
printCB
,
NULL
)
;
if
(
list_name
)
printf
(
"
\"
%s
\"
:%s"
,
list_name
,
(
new_line
?
"
\n
"
:
"
\t
"
))
;
g_list_foreach
(
quark_list
,
printCB
,
GINT_TO_POINTER
(
new_line
))
;
printf
(
"
\n
"
)
;
return
;
}
...
...
@@ -774,8 +786,9 @@ static inline GQuark g_quark_new (ZMapQuarkSet quark_set, gchar *string)
static
void
printCB
(
gpointer
data
,
gpointer
user_data
)
{
GQuark
quark
=
GPOINTER_TO_INT
(
data
)
;
gboolean
new_line
=
GPOINTER_TO_INT
(
user_data
)
;
printf
(
"%s
\
n
"
,
g_quark_to_string
(
quark
))
;
printf
(
"
\"
%s
\
"
%s
"
,
g_quark_to_string
(
quark
)
,
(
new_line
?
"
\n
"
:
"
\t
"
)
)
;
return
;
}
...
...
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