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

  1. /*--------------------------------------*/
  2. /*                    */
  3. /*            SLFILE2HEX(X)        */
  4. /*                    */
  5. /* Reads and returns a number from a    */
  6. /* file. The argument is the file desc- */
  7. /* riptor.                */
  8. /*                    */
  9. /*      Written by John Callicotte    */
  10. /*                    */
  11. /*--------------------------------------*/
  12. # include "stdio.h"
  13. long slfile2hex(fd)
  14. FILE *fd;
  15. {
  16.         int a,b,c,d;
  17.     long e;
  18.     a=scram(getc(fd));
  19.     b=scram(getc(fd));
  20.         c=scram(getc(fd));
  21.         d=scram(getc(fd));
  22.         e=16777216L*a+65536L*b+256L*c+d;
  23.         return(e);
  24. }
  25.