home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 1 / FishNMoreVol1.bin / more / code_examples / librar / freed.c < prev    next >
Text File  |  1989-02-08  |  688b  |  30 lines

  1. /*--------------------------------------*/
  2. /*                    */
  3. /*             FREED(X,X,X)        */
  4. /*                    */
  5. /* Functionality:            */
  6. /*    Reads in a character array from    */
  7. /*    a file.                */
  8. /* Arguments:                */
  9. /*    0: The file descriptor        */
  10. /*    1: The character array.        */
  11. /*    2: The length of the array.    */
  12. /* Returns: The number of bytes actually*/
  13. /*        read from the file.        */
  14. /* Author: John Callicotte        */
  15. /* Date created/modified: 09/01/88    */
  16. /*                    */
  17. /*--------------------------------------*/
  18.  
  19. # include "stdio.h"
  20. void freed(fd,r,b)
  21. char r[];
  22. int b;
  23. FILE *fd;
  24. {
  25.         int j;
  26.         for (j=0;j<b;j++)        /* Read the array in */
  27.              r[j]=getc(fd);
  28.     r[b]=0;
  29. }
  30.