![]() |
libRASCH |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ra_linked_list.hGo to the documentation of this file.00001 00009 /*---------------------------------------------------------------------------- 00010 * 00011 * Copyright (C) 2002-2003, Raphael Schneider 00012 * See the file COPYING for information on usage and redistribution. 00013 * 00014 * $Header: /home/cvs_repos/librasch/include/ra_linked_list.h,v 1.4 2004/02/19 14:42:12 rasch Exp $ 00015 * 00016 *--------------------------------------------------------------------------*/ 00017 00018 #ifndef RA_LINKED_LIST_H 00019 #define RA_LINKED_LIST_H 00020 00021 #ifdef __cplusplus 00022 extern "C" { 00023 #endif 00024 00025 #include <ra.h> 00026 00027 /* 00028 struct's which are handled with this functions must have the following format: 00029 00030 first field: used to identify struct (not used in linked-list) 00031 second field: pointer to next struct 00032 third field: pointer to previous struct 00033 00034 00035 The remaining fields contain the struct-specific data and are not accessed with 00036 this functions. 00037 */ 00038 00049 struct linked_list 00050 { 00051 unsigned short not_used; /* some list-elements are returned to user-space as handles, 00052 the type of the handle are set in this var */ 00053 00054 struct linked_list *next; 00055 struct linked_list *prev; 00056 }; /* struct linked_list */ 00057 00058 00059 /* TODO: think about if these prototypes should be moved to ra.h */ 00060 LIBRAAPI int ra_list_add(void **head, void *item); 00061 LIBRAAPI int ra_list_insert(void **head, void *prev, void *item); 00062 LIBRAAPI int ra_list_del(void **head, void *item); 00063 LIBRAAPI int ra_list_len(void *head); 00064 00065 #ifdef __cplusplus 00066 } 00067 #endif 00068 00069 #endif /* RA_LINKED_LIST_H */ Generated on Fri May 27 11:32:39 2005 for libRASCH by 1.4.2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||