Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!att!cbnewsl!ams From: ams@cbnewsl.ATT.COM (andrew.m.shaw) Newsgroups: comp.lang.c Subject: Re: fgets() for open() ?? Message-ID: <1703@cbnewsl.ATT.COM> Date: 31 Aug 89 14:23:01 GMT References: <410002@hpdml93.HP.COM> Organization: AT&T Bell Laboratories Lines: 14 From article <410002@hpdml93.HP.COM>, by libbyb@hpdml93.HP.COM (Libby Bagley): < If I open a file using fopen(), I have the function < fgets() available to me. < < If I open a file using open(), is there a function < similar to fgets() that I can use? (Remember my < reference into the file is no longer a file < pointer, but an integer file descriptor.) FILE * fdopen (int fd, char * type) associates a stdio stream with the fd returned by open(2). This allows you to use fgets,fseek, etc. See fopen(3). Andrew Shaw