/************************************************/
/* ML-Support                                   */
/* Freeware                                     */
/* © 1998-99 Christian Hattemer                 */
/* email: chris@mail.riednet.wh.tu-darmstadt.de */
/* 10.01.99 21:20                               */
/************************************************/

/* stormamiga.lib */
#ifdef USESTORMAMIGA
   #define STORMAMIGA
   #define STORMAMIGA_INLINE
   #include <stormamiga.h>
#endif

/* Ansi */
#include <string.h>

/* ML-Support */
#include "GUI.h"
#include "MLList.h"

/* Functions */
APTR  SAVEDS ConstructFunc(REG(a0) struct Hook *hook, REG(a2) APTR Pool   , REG(a1) struct MLListNode *MLN);
void  SAVEDS DestructFunc (REG(a0) struct Hook *hook, REG(a2) APTR Pool   , REG(a1) struct MLListNode *MLN);
ULONG SAVEDS DisplayFunc  (REG(a0) struct Hook *hook, REG(a2) char **Array, REG(a1) struct MLListNode *MLN);


APTR SAVEDS ConstructFunc(REG(a0) struct Hook *hook, REG(a2) APTR Pool, REG(a1) struct MLListNode *MLN)
{
   struct MLListNode *New;

   if (New = AllocPooled(Pool, sizeof(struct MLListNode)))
   {
      memcpy(New, MLN, sizeof(struct MLListNode));
   }

   return New;
}

void SAVEDS DestructFunc(REG(a0) struct Hook *hook, REG(a2) APTR Pool, REG(a1) struct MLListNode *MLN)
{
   FreePooled(Pool, MLN, sizeof(struct MLListNode));
}

ULONG SAVEDS DisplayFunc(REG(a0) struct Hook *hook, REG(a2) char **Array, REG(a1) struct MLListNode *MLN)
{
   *Array++ = MLN->IsSubs ? "x" : " ";
   *Array   = MLN->MLName;

   return 0;
}

