home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d4xx / d430 / smartfields.lha / SmartFields / Functions / field_link.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-01-11  |  842 b   |  31 lines

  1. /***************************************
  2. *  FIELD LINK v1.11
  3. *  © Copyright 1988 Timm Martin
  4. *  All Rights Reserved
  5. ****************************************/
  6.  
  7. #include <exec/io.h>
  8. #include <exec/types.h>
  9. #include <console/fields.h>
  10. #include <console/functions.h>
  11.  
  12. struct Field *field_link( final )
  13.   struct Field *final;
  14. {
  15.   struct Field *prev;       /* for stepping thru list */
  16.   struct Field *next;       /* prev->NextField */
  17.  
  18.   if (!final)
  19.     return (NULL);          /* error checking */
  20.  
  21.   final->NextField = NULL;  /* just to make sure */
  22.   next = final;             /* start at end of list */
  23.   prev = final->PrevField;
  24.   while (prev) {
  25.     prev->NextField = next; /* point previous field to next field */
  26.     next = prev;            /* store next field */
  27.     prev = prev->PrevField; /* get previous field */
  28.   }
  29.   return (next);
  30. }
  31.