#include <exec/types.h>

#include <stdio.h>

#include "header.h"

struct nodenum *get_nodenum(struct area *a,int i)
{
  struct nodenum *n;

   if(i < 1)
   {
      if(MyDEBUG)
      {
         printf("areas.lib->get_nodenum: invalid nodenum referenced\n");
      }
   }

   n=a->first_nodenum;

   while(--i)
   {
      n=n->next_nodenum;

      if(n == 0)
         return(0);
   }

   return(n);
}

