Blame glib/gslist.h

Packit ae235b
/* GLIB - Library of useful routines for C programming
Packit ae235b
 * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
Packit ae235b
 *
Packit ae235b
 * This library is free software; you can redistribute it and/or
Packit ae235b
 * modify it under the terms of the GNU Lesser General Public
Packit ae235b
 * License as published by the Free Software Foundation; either
Packit ae235b
 * version 2.1 of the License, or (at your option) any later version.
Packit ae235b
 *
Packit ae235b
 * This library is distributed in the hope that it will be useful,
Packit ae235b
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit ae235b
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
Packit ae235b
 * Lesser General Public License for more details.
Packit ae235b
 *
Packit ae235b
 * You should have received a copy of the GNU Lesser General Public
Packit ae235b
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
Packit ae235b
 */
Packit ae235b
Packit ae235b
/*
Packit ae235b
 * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
Packit ae235b
 * file for a list of people on the GLib Team.  See the ChangeLog
Packit ae235b
 * files for a list of changes.  These files are distributed with
Packit ae235b
 * GLib at ftp://ftp.gtk.org/pub/gtk/.
Packit ae235b
 */
Packit ae235b
Packit ae235b
#ifndef __G_SLIST_H__
Packit ae235b
#define __G_SLIST_H__
Packit ae235b
Packit ae235b
#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
Packit ae235b
#error "Only <glib.h> can be included directly."
Packit ae235b
#endif
Packit ae235b
Packit ae235b
#include <glib/gmem.h>
Packit ae235b
#include <glib/gnode.h>
Packit ae235b
Packit ae235b
G_BEGIN_DECLS
Packit ae235b
Packit ae235b
typedef struct _GSList GSList;
Packit ae235b
Packit ae235b
struct _GSList
Packit ae235b
{
Packit ae235b
  gpointer data;
Packit ae235b
  GSList *next;
Packit ae235b
};
Packit ae235b
Packit ae235b
/* Singly linked lists
Packit ae235b
 */
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_alloc                   (void) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
void     g_slist_free                    (GSList           *list);
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
void     g_slist_free_1                  (GSList           *list);
Packit ae235b
#define	 g_slist_free1		         g_slist_free_1
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
void     g_slist_free_full               (GSList           *list,
Packit ae235b
					  GDestroyNotify    free_func);
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_append                  (GSList           *list,
Packit ae235b
					  gpointer          data) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_prepend                 (GSList           *list,
Packit ae235b
					  gpointer          data) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_insert                  (GSList           *list,
Packit ae235b
					  gpointer          data,
Packit ae235b
					  gint              position) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_insert_sorted           (GSList           *list,
Packit ae235b
					  gpointer          data,
Packit ae235b
					  GCompareFunc      func) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_insert_sorted_with_data (GSList           *list,
Packit ae235b
					  gpointer          data,
Packit ae235b
					  GCompareDataFunc  func,
Packit ae235b
					  gpointer          user_data) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_insert_before           (GSList           *slist,
Packit ae235b
					  GSList           *sibling,
Packit ae235b
					  gpointer          data) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_concat                  (GSList           *list1,
Packit ae235b
					  GSList           *list2) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_remove                  (GSList           *list,
Packit ae235b
					  gconstpointer     data) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_remove_all              (GSList           *list,
Packit ae235b
					  gconstpointer     data) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_remove_link             (GSList           *list,
Packit ae235b
					  GSList           *link_) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_delete_link             (GSList           *list,
Packit ae235b
					  GSList           *link_) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_reverse                 (GSList           *list) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_copy                    (GSList           *list) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
Packit ae235b
GLIB_AVAILABLE_IN_2_34
Packit ae235b
GSList*  g_slist_copy_deep               (GSList            *list,
Packit ae235b
					  GCopyFunc         func,
Packit ae235b
					  gpointer          user_data) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_nth                     (GSList           *list,
Packit ae235b
					  guint             n);
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_find                    (GSList           *list,
Packit ae235b
					  gconstpointer     data);
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_find_custom             (GSList           *list,
Packit ae235b
					  gconstpointer     data,
Packit ae235b
					  GCompareFunc      func);
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
gint     g_slist_position                (GSList           *list,
Packit ae235b
					  GSList           *llink);
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
gint     g_slist_index                   (GSList           *list,
Packit ae235b
					  gconstpointer     data);
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_last                    (GSList           *list);
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
guint    g_slist_length                  (GSList           *list);
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
void     g_slist_foreach                 (GSList           *list,
Packit ae235b
					  GFunc             func,
Packit ae235b
					  gpointer          user_data);
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_sort                    (GSList           *list,
Packit ae235b
					  GCompareFunc      compare_func) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
GSList*  g_slist_sort_with_data          (GSList           *list,
Packit ae235b
					  GCompareDataFunc  compare_func,
Packit ae235b
					  gpointer          user_data) G_GNUC_WARN_UNUSED_RESULT;
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
gpointer g_slist_nth_data                (GSList           *list,
Packit ae235b
					  guint             n);
Packit ae235b
Packit ae235b
#define  g_slist_next(slist)	         ((slist) ? (((GSList *)(slist))->next) : NULL)
Packit ae235b
Packit ae235b
G_END_DECLS
Packit ae235b
Packit ae235b
#endif /* __G_SLIST_H__ */