2 fgetfile - read the rest of a file to form a string
8 fs file stream open for reading
10 return string or null value
14 If the current file position for fs is the end of the file, the
15 null value is returned.
17 Otherwise the function returns the string formed from reading all
18 characters from the current file position to the end of the file.
20 If the content of the file "newfile" is a sequence of statements that
21 could form the body of function definition, the statement sequence
23 fs = fopen("newfile", "r");
26 achieves the same as the command
33 ; f = fopen("/tmp/newfile", "w")
34 ; fputs(f, "abc\0xyz\n\t\xb0\0\r\v123"
37 ""abc\0xyz\n\t\xb0\0\r\v123""
46 fgets, fgetstr, files, fopen, fprintf, fputs, fputstr
48 ## Copyright (C) 1999-2006 Landon Curt Noll
50 ## Calc is open software; you can redistribute it and/or modify it under
51 ## the terms of the version 2.1 of the GNU Lesser General Public License
52 ## as published by the Free Software Foundation.
54 ## Calc is distributed in the hope that it will be useful, but WITHOUT
55 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
56 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
57 ## Public License for more details.
59 ## A copy of version 2.1 of the GNU Lesser General Public License is
60 ## distributed with calc under the filename COPYING-LGPL. You should have
61 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
62 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
64 ## @(#) $Revision: 30.1 $
65 ## @(#) $Id: fgetfile,v 30.1 2007/03/16 11:10:42 chongo Exp $
66 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fgetfile,v $
68 ## Under source code control: 1996/04/30 03:05:17
69 ## File existed as early as: 1996
71 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
72 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/