ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/sm_list.h
Revision: 3.7
Committed: Mon Jul 14 22:24:00 2003 UTC (20 years, 9 months ago) by schorsch
Content type: text/plain
Branch: MAIN
CVS Tags: rad3R6P1, rad3R6
Changes since 3.6: +11 -1 lines
Log Message:
Instrumented headers against multiple inclusion and for use from C++.
Moved includes in headers out of "C" scope.

File Contents

# Content
1 /* RCSid: $Id: sm_list.h,v 3.6 2003/02/22 02:07:25 greg Exp $ */
2 /*
3 * list.h
4 * Linked list data structure and routines
5 */
6 #ifndef _RAD_SM_LIST_H_
7 #define _RAD_SM_LIST_H_
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 #ifndef TRUE
14 #define TRUE 1
15 #define FALSE 0
16 #endif
17
18 typedef struct _LIST {
19 int d;
20 struct _LIST *next;
21 }LIST;
22
23
24 #define LIST_NEXT(l) ((l)->next)
25 #define LIST_DATA(l) ((l)->d)
26 #define SET_LIST_NEXT(l,d) ((l)->next = (d))
27 #define SET_LIST_DATA(l,id) ((l)->d = (int)(id))
28
29 /*
30 LIST *new_list(void);
31 LIST *free_list(LIST *l);
32 LIST *append_list(LIST *a, LIST *b);
33
34 int pop_data(LIST **l);
35 LIST *add_data_to_circular_list(LIST *l,LIST **end,int d)
36 int remove_from_list(int d,LIST **list)
37 */
38 LIST *new_list();
39 LIST *free_list();
40 LIST *append_list();
41 int pop_data();
42 LIST *push_data();
43 LIST *add_data_to_circular_list();
44 int remove_from_list();
45 LIST *add_data();
46
47
48 #ifdef __cplusplus
49 }
50 #endif
51 #endif /* _RAD_SM_LIST_H_ */
52
53