Dynamic Load Balance 3.6.1+32-59d1
gslist.h
Go to the documentation of this file.
1/*********************************************************************************/
2/* Copyright 2009-2024 Barcelona Supercomputing Center */
3/* */
4/* This file is part of the DLB library. */
5/* */
6/* DLB is free software: you can redistribute it and/or modify */
7/* it under the terms of the GNU Lesser General Public License as published by */
8/* the Free Software Foundation, either version 3 of the License, or */
9/* (at your option) any later version. */
10/* */
11/* DLB is distributed in the hope that it will be useful, */
12/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
13/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
14/* GNU Lesser General Public License for more details. */
15/* */
16/* You should have received a copy of the GNU Lesser General Public License */
17/* along with DLB. If not, see <https://www.gnu.org/licenses/>. */
18/*********************************************************************************/
19
20/* Subset of GSList from GLIB to implement a stack: */
21
22/* GLIB - Library of useful routines for C programming
23 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
24 *
25 * SPDX-License-Identifier: LGPL-2.1-or-later
26 *
27 * This library is free software; you can redistribute it and/or
28 * modify it under the terms of the GNU Lesser General Public
29 * License as published by the Free Software Foundation; either
30 * version 2.1 of the License, or (at your option) any later version.
31 *
32 * This library is distributed in the hope that it will be useful,
33 * but WITHOUT ANY WARRANTY; without even the implied warranty of
34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
35 * Lesser General Public License for more details.
36 *
37 * You should have received a copy of the GNU Lesser General Public
38 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
39 */
40
41/*
42 * Modified by the GLib Team and others 1997-2000. See the AUTHORS
43 * file for a list of people on the GLib Team. See the ChangeLog
44 * files for a list of changes. These files are distributed with
45 * GLib at ftp://ftp.gtk.org/pub/gtk/.
46 */
47
48#ifndef GSLIST_H
49#define GSLIST_H
50
51#include "support/gtypes.h"
52
53typedef struct _GSList GSList;
54
55struct _GSList
56{
58 GSList *next;
59};
60
61typedef void (*GFunc) (gpointer data, gpointer user_data);
62
63/* Singly linked lists
64 */
65void g_slist_free (GSList *list);
66GSList* g_slist_prepend (GSList *list,
67 gpointer data);
68GSList* g_slist_remove (GSList *list,
69 gconstpointer data);
70GSList* g_slist_reverse (GSList *list);
71guint g_slist_length (GSList *list);
72void g_slist_foreach (GSList *list,
73 GFunc func,
74 gpointer user_data);
75
76#endif /* GSLIST_H */
guint g_slist_length(GSList *list)
Definition: gslist.c:181
GSList * g_slist_remove(GSList *list, gconstpointer data)
Definition: gslist.c:118
void g_slist_free(GSList *list)
Definition: gslist.c:64
GSList * g_slist_prepend(GSList *list, gpointer data)
Definition: gslist.c:94
void(* GFunc)(gpointer data, gpointer user_data)
Definition: gslist.h:61
void g_slist_foreach(GSList *list, GFunc func, gpointer user_data)
Definition: gslist.c:207
GSList * g_slist_reverse(GSList *list)
Definition: gslist.c:151
void * gpointer
Definition: gtypes.h:58
const void * gconstpointer
Definition: gtypes.h:59
unsigned int guint
Definition: gtypes.h:55
Definition: gslist.h:56
gpointer data
Definition: gslist.h:57
GSList * next
Definition: gslist.h:58