How to convert the SWI code to gprolog ?

z_axis <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Organization zsoft
Message-ID <[email protected]>
$ head foo.dat
14 18 20 22 26 27 13
7 10 19 29 31 32 9
...

open('foo.dat', read, H), file_ints(H,Ns), close(H), ! ,
...

file_ints(S, L) :-
     read_line_to_codes(S, Cs),
     (   Cs == end_of_file
     ->  L = []
     ;   phrase(ints(Is), Cs),
         file_ints(S, R),
         L = [Is|R]
     ).

read_ints(F, L) :-
     open(F, read, S),
     file_ints(S, L),
     close(S).

ints(L) --> blanks, (integer(I), ints(Is), {L = [I|Is]} ; {L = []}).

...

It seems there arenot read_line_to_codes and blanks in gprolog ?

Sincerely !
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.