]> Repositorios git - scryer-prolog.git/commitdiff
MODIFIED: library(charsio): read_n_chars/3 is now called get_n_chars/3
authorMarkus Triska <[email protected]>
Mon, 17 Jan 2022 19:36:51 +0000 (20:36 +0100)
committerMarkus Triska <[email protected]>
Mon, 17 Jan 2022 19:37:55 +0000 (20:37 +0100)
This is because "read" is associated with general Prolog terms.

src/lib/charsio.pl
src/lib/pio.pl

index 3a9443010ec064eba6f41277639ba5a31f03953f..3ef732dbc7d0f8aa1aca59ce8d995e9c197067dd 100644 (file)
@@ -1,7 +1,7 @@
 :- module(charsio, [char_type/2,
                     chars_utf8bytes/2,
                     get_single_char/1,
-                    read_n_chars/3,
+                    get_n_chars/3,
                     read_line_to_chars/3,
                     read_from_chars/2,
                     write_term_to_chars/3,
@@ -205,7 +205,7 @@ read_line_to_chars(Stream, Cs0, Cs) :-
    characters read.
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
-read_n_chars(Stream, N, Cs) :-
+get_n_chars(Stream, N, Cs) :-
         can_be(integer, N),
         (   var(N) ->
             read_to_eof(Stream, Cs),
index 38849a4b6ea50249500622942643c845c57dd509..db609aa69a0714a93df3a29aed3e27c3fd64de2a 100644 (file)
@@ -21,7 +21,7 @@
 :- use_module(library(freeze)).
 :- use_module(library(iso_ext), [setup_call_cleanup/3, partial_string/3]).
 :- use_module(library(lists), [member/2, maplist/2]).
-:- use_module(library(charsio), [read_n_chars/3]).
+:- use_module(library(charsio), [get_n_chars/3]).
 
 :- meta_predicate(phrase_from_file(2, ?)).
 :- meta_predicate(phrase_from_file(2, ?, ?)).
@@ -62,7 +62,7 @@ reader_step(Stream, Pos, Xs0) :-
         set_stream_position(Stream, Pos),
         (   at_end_of_stream(Stream)
         ->  Xs0 = []
-        ;   read_n_chars(Stream, 4096, Cs),
+        ;   get_n_chars(Stream, 4096, Cs),
             partial_string(Cs, Xs0, Xs),
             stream_to_lazy_list(Stream, Xs)
         ).