Added John Reillys patch for error code returns from clean_up_printer_driver_strunct()
[sfrench/samba-autobuild/.git] / source / include / util_list.h
1 /* 
2    Unix SMB/Netbios implementation.
3    Version 1.9.
4    Samba utility functions
5    Copyright (C) Andrew Tridgell                   1992-1999
6    Copyright (C) Gerald Carter <jerry@samba.org>   2000
7    
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2 of the License, or
11    (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 the Free Software
20    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23 /******************************************************************
24  Implementation of a generic list.  See lib/util_list.c for
25  details on using this.
26  *****************************************************************/
27
28 #include "smb.h"
29
30 #ifndef _GENERIC_LIST_H
31 #define _GENERIC_LIST_H
32
33 struct _list_node;
34
35 /* 
36  * node container in list 
37  */
38 struct _list_node {
39         
40         void                    *data;  /* generic container pointer */
41         uint8                   type;   /* needed for identifiers 
42                                            in a hetergenous list */
43         struct _list_node       *next;  /* next in the list */
44
45 };
46
47 /* 
48  * list data structure 
49  */
50 typedef struct _generic_list {
51
52         struct _list_node       *head, *tail;
53         uint32                  length;
54         BOOL                    initialized;
55
56 } GENERIC_LIST; 
57         
58
59 #endif /* _GENERIC_LIST_H */