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
bfd2c51e
Commit
bfd2c51e
authored
19 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
add func. to go through GList backwards.
parent
38310b95
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
+53
-0
53 additions, 0 deletions
src/zmapUtils/zmapGLibUtils.c
with
53 additions
and
0 deletions
src/zmapUtils/zmapGLibUtils.c
0 → 100755
+
53
−
0
View file @
bfd2c51e
/* File: zmapGLibUtils.c
* Author: Ed Griffiths (edgrif@sanger.ac.uk)
* Copyright (c) Sanger Institute, 2005
*-------------------------------------------------------------------
* ZMap is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* or see the on-line version at http://www.gnu.org/copyleft/gpl.txt
*-------------------------------------------------------------------
* This file is part of the ZMap genome database package
* originated by
* Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk,
* Roy Storey (Sanger Institute, UK) rds@sanger.ac.uk
*
* Description: A collection of "add-ons" to GLib that seem useful.
*
* Exported functions: See ZMap/zmapGLibUtils.h
* HISTORY:
* Last edited: Oct 13 15:27 2005 (edgrif)
* Created: Thu Oct 13 15:22:35 2005 (edgrif)
* CVS info: $Id: zmapGLibUtils.c,v 1.1 2005-11-03 16:14:29 edgrif Exp $
*-------------------------------------------------------------------
*/
#include
<ZMap/zmapGLibUtils.h>
/* Go through a list in reverse calling the supplied GFunc.
* This was lifted from the glib code of g_list. */
void
my_g_list_foreach_reverse
(
GList
*
list
,
GFunc
func
,
gpointer
user_data
)
{
list
=
g_list_last
(
list
)
;
while
(
list
)
{
GList
*
prev
=
list
->
prev
;
(
*
func
)(
list
->
data
,
user_data
)
;
list
=
prev
;
}
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