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

  1. /*--------------------------------------*/
  2. /*                    */
  3. /*            FILE2LHEX(X)        */
  4. /*                    */
  5. /* Reads and returns a number from a    */
  6. /* file. The argument is the file desc- */
  7. /* riptor.                */
  8. /*                    */
  9. /*--------------------------------------*/
  10. # include "stdio.h"
  11. long file2lhex(fd)
  12. FILE *fd;
  13. {
  14.         int c,d;
  15.     long r;
  16.         c=getc(fd);
  17.         d=getc(fd);
  18.         r=(256*c)+d;
  19.         return(r);
  20. }
  21.