home *** CD-ROM | disk | FTP | other *** search
- /*
- #### # # # #
- # # # # # The FreeWare C library for
- # # ## ### # # # # ### RISC OS machines
- # # # # # # # # # # # ___________________________________
- # # #### ### ## # # # #
- # # # # # # # # # # Please refer to the accompanying
- #### ### #### # # ##### # ### documentation for conditions of use
- ________________________________________________________________________
-
- File: LinkList.ListLength.c
- Author: Copyright © 1992 Jason Williams
- Version: 1.00 (2 Apr 1992)
- Purpose: Linked list handling functions
- */
-
-
- #include "LinkList.h"
- #include <stdlib.h>
- #include <stdio.h>
-
-
- extern int LinkList_ListLength(linklist_header *anchor)
- {
- linklist_header *ptr;
- register int length = 0;
-
- ptr = anchor->next;
- while (ptr != NULL)
- {
- length ++;
- ptr = ptr->next;
- }
-
- return(length);
- }
-