]> Repositorios git - scryer-prolog.git/commitdiff
MODIFIED: library(charsio): read_term_from_chars/2 is now called read_from_chars/2
authorMarkus Triska <[email protected]>
Mon, 17 Jan 2022 19:09:50 +0000 (20:09 +0100)
committerMarkus Triska <[email protected]>
Mon, 17 Jan 2022 19:21:18 +0000 (20:21 +0100)
This is for compatibility with SICStus Prolog and GNU Prolog.

src/lib/charsio.pl
src/lib/files.pl
src/lib/time.pl

index 8585681033fecdf12617b85adb49eef026dc84bf..3a9443010ec064eba6f41277639ba5a31f03953f 100644 (file)
@@ -3,7 +3,7 @@
                     get_single_char/1,
                     read_n_chars/3,
                     read_line_to_chars/3,
-                    read_term_from_chars/2,
+                    read_from_chars/2,
                     write_term_to_chars/3,
                     chars_base64/3]).
 
@@ -113,17 +113,17 @@ get_single_char(C) :-
     ).
 
 
-read_term_from_chars(Chars, Term) :-
+read_from_chars(Chars, Term) :-
     (  var(Chars) ->
-       instantiation_error(read_term_from_chars/2)
+       instantiation_error(read_from_chars/2)
     ;  nonvar(Term) ->
-       throw(error(uninstantiation_error(Term), read_term_from_chars/2))
+       throw(error(uninstantiation_error(Term), read_from_chars/2))
     ;  '$skip_max_list'(_, -1, Chars, Chars0),
        Chars0 == [],
        partial_string(Chars) ->
        true
     ;
-       type_error(complete_string, Chars, read_term_from_chars/2)
+       type_error(complete_string, Chars, read_from_chars/2)
     ),
     '$read_term_from_chars'(Chars, Term).
 
index 6989cb4697c7d1da7a14ec508c535f07e6080c86..9ee1c2b988e3ace92212b13752a68956b3446cf5 100644 (file)
@@ -174,7 +174,7 @@ file_creation_time(File, T) :-
 file_time_(File, Which, T) :-
         file_must_exist(File, file_time_/3),
         '$file_time'(File, Which, T0),
-        read_term_from_chars(T0, T).
+        read_from_chars(T0, T).
 
 
 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
index 56e31fae32634a73007755d2afa7d6508fc71801..5da5bb594508c49f58858d11995bcdabb84679f1 100644 (file)
 :- use_module(library(error)).
 :- use_module(library(dcgs)).
 :- use_module(library(lists)).
-:- use_module(library(charsio), [read_term_from_chars/2]).
+:- use_module(library(charsio), [read_from_chars/2]).
 
 current_time(T) :-
         '$current_time'(T0),
-        read_term_from_chars(T0, T).
+        read_from_chars(T0, T).
 
 format_time([], _) --> [].
 format_time(['%','%'|Fs], T) --> !, "%", format_time(Fs, T).