/****************************************************************************
**
**  Name:  listw.h
**
**  Description:
**     Routines to access generic single linked list data structure in
**     Windows.
**
**  Status:  PRELIMINARY
**
**  $Log:   S:/tbird/mt2_186/inc/listw.h_v  $
** 
**    Rev 1.0   16 Dec 1996 13:54:26   Judy
** Initial revision.
** 
**    Rev 1.0   27 Aug 1996 15:21:26   Judy
** Initial revision.
   
      Rev 1.0   23 Aug 1996 17:45:02   Judy
   Initial revision.
** 
**    Rev 1.0   30 Jul 1991 13:57:20   nghia
** Initial revision.
**
**  $Header:   S:/tbird/mt2_186/inc/listw.h_v   1.0   16 Dec 1996 13:54:26   Judy  $
**
**  Copyright (C) 1991 Microtek International.  All rights reserved.
**
*****************************************************************************/

#define _LISTW_

                        /****************************
                         *                          *
                         *       INCLUDE FILES      *
                         *                          *
                         ****************************/

#ifndef _BASETYPE_
#include "basetype.h"
#endif

#ifndef _SSHARED_
#include "sshared.h"
#endif


                        /****************************
                         *                          *
                         *        DEFINITIONS       *
                         *                          *
                         ****************************/

/* Head of list */
typedef struct {
   DESCRIPTOR head;
   DESCRIPTOR current;
} LIST;


/* Global Macros */
#define InitList(list)   ((list)->head = NULL)
#define EmptyList(list)  ((list)->head == NULL)
#define IsTailList(list) ((list)->current == NULL)
#define HeadList(list)   ((list)->current = (list)->head)

                        /****************************
                         *                          *
                         *        PROTOTYPES        *
                         *                          *
                         ****************************/

RETCODE EXPORT AppendList(LIST FAR *list, CALLBACK data);
RETCODE EXPORT RemoveList(LIST FAR *list, CALLBACK data);

CALLBACK EXPORT GetList(LIST FAR *list);
DESCRIPTOR EXPORT NextList(LIST FAR *list);

/* !!!
VOID EXPORT DoList(LIST list, VOID (*Function)(VOID const *));
VOID EXPORT DoListDel(LIST Lst, VOID (*Func)(VOID const*));
*/
/******************************** E O F ***********************************/
