File: lineio.txi

package info (click to toggle)
slib 2c7-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,216 kB
  • ctags: 1,613
  • sloc: lisp: 19,483; makefile: 334; sh: 144
file content (51 lines) | stat: -rw-r--r-- 1,589 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51



@defun read-line read-line


@defunx read-line read-line port
Returns a string of the characters up to, but not including a
newline or end of file, updating @var{port} to point to the
character following the newline.  If no characters are available, an
end of file object is returned.  The @var{port} argument may be
omitted, in which case it defaults to the value returned by
@code{current-input-port}.
@end defun


@defun read-line! read-line! string


@defunx read-line! read-line! string port
Fills @var{read-line!} with characters up to, but not including a newline or end
of file, updating the @var{port} to point to the last character read
or following the newline if it was read.  If no characters are
available, an end of file object is returned.  If a newline or end
of file was found, the number of characters read is returned.
Otherwise, @code{#f} is returned.  The @var{port} argument may be
omitted, in which case it defaults to the value returned by
@code{current-input-port}.
@end defun



@defun write-line write-line string


@defunx write-line write-line string port
Writes @var{write-line} followed by a newline to the given @var{port} and returns
an unspecified value.  The @var{Port} argument may be omited, in
which case it defaults to the value returned by
@code{current-input-port}.@refill
@end defun


@defun display-file path


@defunx display-file path port
Displays the contents of the file named by @var{path} to @var{port}.  The
@var{port} argument may be ommited, in which case it defaults to the
value returned by @code{current-output-port}.
@end defun