home *** CD-ROM | disk | FTP | other *** search
- /*
- * get_count.c Brian Rice rice@dg-rtp.dg.com 1989
- * This routine is part of the shop package.
- * It takes advantage of the fact that the first sizeof(long) bytes
- * in the file named by f are a long which gives the number of
- * items in that file.
- */
- #include <stdio.h>
-
- long int get_count(f)
- FILE *f;
- {
- long int c = 0L;
-
- rewind(f);
- (void) fread(&c,sizeof c,1,f);
-
- return c;
- }
-
-
-