/[svn]/hopm/trunk/src/libopm/src/list.h
ViewVC logotype

Contents of /hopm/trunk/src/libopm/src/list.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5135 - (show annotations)
Thu Dec 25 18:51:51 2014 UTC (5 years, 5 months ago) by michael
File MIME type: text/x-csrc
File size: 1550 byte(s)
- propset svn:eol-style native

1 #ifndef LIST_H
2 #define LIST_H
3
4
5 /* Copyright (C) 2002 by the past and present ircd coders, and others.
6 * Adapted from Hybrid7 DLINK macros
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to
20 *
21 * The Free Software Foundation, Inc.
22 * 59 Temple Place - Suite 330
23 * Boston, MA 02111-1307, USA.
24 *
25 */
26
27 #define LIST_FOREACH(pos, head) for (pos = (head); pos != NULL; pos = pos->next)
28 #define LIST_FOREACH_SAFE(pos, n, head) for (pos = (head), n = pos ? pos->next : NULL; pos != NULL; pos = n, n = pos ? pos->next : NULL)
29 #define LIST_FOREACH_PREV(pos, head) for (pos = (head); pos != NULL; pos = pos->prev)
30 #define LIST_SIZE(list) list->elements
31 /* End Copyright */
32
33 OPM_NODE_T *libopm_node_create(void *);
34 OPM_LIST_T *libopm_list_create(void);
35
36 OPM_NODE_T *libopm_list_add(OPM_LIST_T *, OPM_NODE_T *);
37 OPM_NODE_T *libopm_list_remove(OPM_LIST_T *, OPM_NODE_T *);
38
39 void libopm_list_free(OPM_LIST_T *);
40 void libopm_node_free(OPM_NODE_T *);
41
42 #endif /* LIST_H */

Properties

Name Value
svn:eol-style native
svn:keywords Id

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28