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

  1. /*--------------------------------------*/
  2. /*                    */
  3. /*            SFASC2INT(X,X)        */
  4. /*                    */
  5. /* Converts bytes from a file to an     */
  6. /* integer. The first argument is the     */
  7. /* file descriptor. The second argument */
  8. /* is the number of bytes to read.     */
  9. /*                    */
  10. /*--------------------------------------*/
  11. # include "stdio.h"
  12. # include "stdlib.h"
  13. sfasc2int(fd,a)
  14. int a;
  15. FILE *fd;
  16. {
  17.     char w[20];
  18.         int d;
  19.     sfreed(fd,w,a);
  20.         w[a]=0;
  21.     d=atoi(w);
  22.         return(d);
  23. }
  24.