home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / prog-asm / talincod.lha / talincode.lha / countnodes.c next >
Encoding:
C/C++ Source or Header  |  1991-11-04  |  471 b   |  17 lines

  1. /* ======================================================================== *
  2.              CountNodes.c -- get the number of nodes in an exec list
  3.                                    By Talin.
  4.                   Compiled under Manx 5.0 with small code/data
  5.  * ======================================================================== */
  6.  
  7. #include <std_headers.h>
  8.  
  9. LONG CountNodes(struct MinList *list)
  10. {    struct MinNode        *n;
  11.     LONG                i;
  12.  
  13.     for (n = GetHead(list), i = 0; n; n = NextNode(n), i++) ;
  14.  
  15.     return i;
  16. }
  17.