home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 1
/
FishNMoreVol1.bin
/
more
/
code_examples
/
librar
/
long2asc.c
< prev
next >
Wrap
Text File
|
1989-02-08
|
512b
|
26 lines
/*--------------------------------------*/
/* */
/* LONG2ASC(X,X) */
/* */
/* Puts a long integer given in the */
/* first argument into a character */
/* array given in the second argument. */
/* */
/*--------------------------------------*/
void long2asc(a,r)
char r[4];
long a;
{
int c;
long d,e;
c=e=a/16777216L;
d=a-16777216L*e;
r[0]=c;
c=d=a/65536L;
d=a-65536L*d;
r[1]=c;
c=e=d/256;
r[2]=c;
c=d=d-256*e;
r[3]=c;
}