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

  1. /*--------------------------------------*/
  2. /*                    */
  3. /*              FILE3HEX(X)        */
  4. /*                    */
  5. /* Returns a number from the given file    */
  6. /* descriptor that was stored with the    */
  7. /* function HEX3FILE.            */
  8. /*                    */
  9. /*--------------------------------------*/
  10. # include "stdio.h"
  11. long file3hex(fd)
  12. FILE *fd;
  13. {
  14.     int a,b,c;
  15.     long d;
  16.     a=getc(fd);
  17.     b=getc(fd);
  18.     c=getc(fd);
  19.     d=(a*65536L)+(b*256L)+c;
  20.     return(d);
  21. }
  22.