2 fgetstr - read the next null-terminated string from a file
8 fs file stream open for reading
10 return string, null or error value
13 If the stream is at end of file, the null value is returned.
15 If the stream cannot be read, an error value is returned.
17 Otherwise the function returns the string of characters from the
18 current file position to the first null character ('\0') (the file
19 position for further reading then being immediately after the '\0'),
20 or if no null character is encountered, the string of characters to
21 the end of file (the string as usual being terminated by '\0').
23 If the stream being read is from stdin (i.e. files(0)), the
24 characters entered are not displayed and reading ends when a '\0' is
25 entered (on many terminals this is by ctrl-@).
28 ; f = fopen("/tmp/junk", "w")
29 ; fputstr(f, " Alpha Beta ", "", "Gamma\n\tDelta")
47 fputstr, fgetword, fgets, fputs, fopen, files, fprintf
49 ## Copyright (C) 1999-2006 Landon Curt Noll
51 ## Calc is open software; you can redistribute it and/or modify it under
52 ## the terms of the version 2.1 of the GNU Lesser General Public License
53 ## as published by the Free Software Foundation.
55 ## Calc is distributed in the hope that it will be useful, but WITHOUT
56 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
57 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
58 ## Public License for more details.
60 ## A copy of version 2.1 of the GNU Lesser General Public License is
61 ## distributed with calc under the filename COPYING-LGPL. You should have
62 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
63 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
65 ## @(#) $Revision: 30.1 $
66 ## @(#) $Id: fgetstr,v 30.1 2007/03/16 11:10:42 chongo Exp $
67 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fgetstr,v $
69 ## Under source code control: 1996/04/30 03:05:17
70 ## File existed as early as: 1996
72 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
73 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/