home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume8 / graph+ / part03 / numcols.c < prev    next >
Encoding:
C/C++ Source or Header  |  1987-03-01  |  502 b   |  30 lines

  1. /*
  2.  * Copyright (C) 1986   Alan Kent
  3.  *
  4.  * Permission is granted to freely distribute part or
  5.  * all of this code as long as it is not for profit
  6.  * and this message is retained in the code.
  7.  *
  8.  * No resposibility is taken for any damage or incorect
  9.  * results this program generates.
  10.  * 
  11.  */
  12.  
  13.  
  14. #include <stdio.h>
  15. #include "graph.h"
  16.  
  17.  
  18. num_cols ( table )
  19. table_st *table;
  20. {
  21.     int count;
  22.     table_st *p;
  23.  
  24.     count = 0;
  25.     for ( p = table; p != NULL; p = p->next )
  26.     count++;
  27.     return ( count );
  28. }
  29.  
  30.