home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 1
/
FishNMoreVol1.bin
/
more
/
code_examples
/
librar
/
file2hex.c
< prev
next >
Wrap
Text File
|
1989-02-08
|
460b
|
22 lines
/*--------------------------------------*/
/* */
/* FILE2HEX(X) */
/* */
/* Reads and returns a number from a */
/* file. The argument is the file desc- */
/* riptor. */
/* */
/* Written by John Callicotte */
/* */
/*--------------------------------------*/
# include "stdio.h"
file2hex(fd)
FILE *fd;
{
int c,d,e;
c=getc(fd);
d=getc(fd);
e=256*c+d;
return(e);
}