[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: How to get FILE* from an int file desctriptor...



Shridhar Daithankar forced the electrons to say:
> Can anybody tell me how to obtain a FILE* from an int file desctriptor
> and vice versa?

FILE *fdopen(int fd) and int fileno (FILE *fp) are what you are looking
for.

Binand

-- 
#define l/* Binand Raj S. <binand@xxxxxxxxxxxxxxxxxxxxx> */".%\"-\"("
#define s/* Ambition: To write sendmail.cf from scratch  */abs(abs(i)-5)
main(i,j){for(i=-5;i<6;i++){for(j=0;j<35-s;j++,putchar(32));putchar(s[l]^
108);for(j=0;j<2*s-1;j++,putchar(32));s&&putchar(s[l]^108);putchar(10);}}