2 fgets - read the next line from a file, newline is kept
13 This function reads the next line, including any trailing newline from
14 the open file associated with fd. Unlike fgetline, the trailing
15 newline is included in the return string.
17 If a line is read, it is returned, otherwise (EOF or ERROR) nil is returned.
20 ; fd = fopen("/tmp/newfile", "w")
21 ; fputs(fd, "chongo was here\n")
22 ; fd2 = fopen("/tmp/newfile", "r")
28 ; fd2 = fopen("/tmp/newfile", "r")
33 fd must be associated with an open file
39 errno, fclose, feof, ferror, fflush, fgetc, fgetline, fgets, files, fopen,
40 fprintf, fputc, fputs, fseek, fsize, ftell, isfile, printf, prompt
42 ## Copyright (C) 1999 Landon Curt Noll
44 ## Calc is open software; you can redistribute it and/or modify it under
45 ## the terms of the version 2.1 of the GNU Lesser General Public License
46 ## as published by the Free Software Foundation.
48 ## Calc is distributed in the hope that it will be useful, but WITHOUT
49 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
50 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
51 ## Public License for more details.
53 ## A copy of version 2.1 of the GNU Lesser General Public License is
54 ## distributed with calc under the filename COPYING-LGPL. You should have
55 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
56 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
58 ## @(#) $Revision: 30.1 $
59 ## @(#) $Id: fgets,v 30.1 2007/03/16 11:10:42 chongo Exp $
60 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fgets,v $
62 ## Under source code control: 1995/03/04 11:33:19
63 ## File existed as early as: 1995
65 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
66 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/