This library contains primitives to read lines, files, multiple terms, etc.
On end-of-file the atom end_of_file
is returned. See
also
at_end_of_stream/[0,1].
read_header_data(Stream, Header) :- read_line_to_codes(Stream, Header, Tail), read_header_data(Header, Stream, Tail). read_header_data("\r\n", _, _) :- !. read_header_data("\n", _, _) :- !. read_header_data("", _, _) :- !. read_header_data(_, Stream, Tail) :- read_line_to_codes(Stream, Tail, NewTail), read_header_data(Tail, Stream, NewTail). |
tail(Tail)
is defined, forming a difference-list.
tail(Tail)
is defined, forming a difference-list.