home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 October
/
Chip_1997-10_cd.bin
/
tema
/
sybase
/
powerj
/
hpp.z
/
WLLIST.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-10-18
|
2KB
|
54 lines
/*
* wllist.h -- External definitions for wllist.c
*
*/
#ifndef _WLLIST_HPP_INCLUDED
#define _WLLIST_HPP_INCLUDED
#ifndef _WNO_PRAGMA_PUSH
#pragma pack(push,8);
#pragma enum int;
#endif
/* Generic list link field */
typedef struct wllist_link * wllist_link_p;
typedef struct wllist_header * wllist_header_p;
typedef struct wllist_link {
wllist_link_p prev, next;
} wllist_link;
typedef struct wllist_header {
wllist_link_p first;
wllist_link_p last;
} wllist_header;
#define WLLNext( x ) (void *)(((wllist_link_p)(x))->next)
#define WLLPrev( x ) (void *)(((wllist_link_p)(x))->prev)
#define WLLFirst( x ) (void *)(((wllist_header_p)(x))->first)
#define WLLLast( x ) (void *)(((wllist_header_p)(x))->last)
#define WLListRemoveFirst(x) (void *)WLListDelete(x,WLLFirst(x))
#ifndef _WDECL_HPP_INCLUDED
# include "wdecl.hpp"
#endif
extern WCMDECLSPEC void WCMDEF WLListNew( wllist_header_p top );
extern WCMDECLSPEC void WCMDEF WLListPrefix( wllist_header_p top, void * entry );
extern WCMDECLSPEC void WCMDEF WLListSuffix( wllist_header_p top, void * entry );
extern WCMDECLSPEC void * WCMDEF WLListDelete( wllist_header_p top, void * entry );
extern WCMDECLSPEC void WCMDEF WLListInsert( wllist_header_p top, void * prev,
void * entry );
extern WCMDECLSPEC void WCMDEF WLListKill( wllist_header_p top, void (*free)( void * ) );
extern WCMDECLSPEC void WCMDEF WLListFree( void *first, void (*free)( void * ) );
#ifndef _WNO_PRAGMA_PUSH
#pragma enum pop;
#pragma pack(pop);
#endif
#endif /* _WLLIST_HPP_INCLUDED */