Blame gladeui/glade-tsort.h

Packit 1e8aac
/*
Packit 1e8aac
 * glade-tsort.h: a topological sorting algorithm implementation
Packit 1e8aac
 * 
Packit 1e8aac
 * Copyright (C) 2013 Juan Pablo Ugarte.
Packit 1e8aac
 *
Packit 1e8aac
 * This program is free software; you can redistribute it and/or modify
Packit 1e8aac
 * it under the terms of the GNU General Public License as
Packit 1e8aac
 * published by the Free Software Foundation; either version 2 of the
Packit 1e8aac
 * License, or (at your option) any later version.
Packit 1e8aac
 *
Packit 1e8aac
 * This program is distributed in the hope that it will be useful,
Packit 1e8aac
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 1e8aac
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 1e8aac
 * GNU General Public License for more details.
Packit 1e8aac
 *
Packit 1e8aac
 * You should have received a copy of the GNU General Public License
Packit 1e8aac
 * along with this program; if not, write to the Free Software
Packit 1e8aac
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Packit 1e8aac
 *
Packit 1e8aac
 * Authors:
Packit 1e8aac
 *   Juan Pablo Ugarte <juanpablougarte@gmail.com>
Packit 1e8aac
 */
Packit 1e8aac
Packit 1e8aac
#ifndef __GLADE_TSORT_H__
Packit 1e8aac
#define __GLADE_TSORT_H__
Packit 1e8aac
Packit 1e8aac
#include <glib.h>
Packit 1e8aac
Packit 1e8aac
G_BEGIN_DECLS
Packit 1e8aac
Packit 1e8aac
typedef struct __NodeEdge _NodeEdge;
Packit 1e8aac
Packit 1e8aac
struct __NodeEdge
Packit 1e8aac
{
Packit 1e8aac
  gpointer predecessor;
Packit 1e8aac
  gpointer successor;
Packit 1e8aac
};
Packit 1e8aac
Packit 1e8aac
GList *_node_edge_prepend   (GList *list,
Packit 1e8aac
                             gpointer predecessor,
Packit 1e8aac
                             gpointer successor);
Packit 1e8aac
Packit 1e8aac
void   _node_edge_list_free (GList *list);
Packit 1e8aac
Packit 1e8aac
GList *_glade_tsort         (GList **nodes,
Packit 1e8aac
                             GList **edges);
Packit 1e8aac
Packit 1e8aac
G_END_DECLS
Packit 1e8aac
Packit 1e8aac
#endif /* __GLADE_TSORT_H__ */