This file is indexed.

/usr/share/Yap/readutil.yap is in yap 6.2.2-6+b2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
52
53
54
55
56
57
58
59
60
61
/*************************************************************************
*									 *
*	 YAP Prolog 							 *
*									 *
*	Yap Prolog was developed at NCCUP - Universidade do Porto	 *
*									 *
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997	 *
*									 *
**************************************************************************
*									 *
* File:		readutil.yap						 *
* Last rev:	5/12/99							 *
* mods:									 *
* comments:	SWI compatible read utilities				 *
*									 *
*************************************************************************/

:- module(readutil, [
	read_line_to_codes/2,
	read_line_to_codes/3,
	read_stream_to_codes/2,
	read_stream_to_codes/3,
	read_file_to_codes/2,
	read_file_to_codes/3,
	read_file_to_terms/2,
	read_file_to_terms/3
		    ]).


read_stream_to_codes(Stream, Codes) :-
	read_stream_to_codes(Stream, Codes, []).

read_file_to_codes(File, Codes, _) :-
	open(File, read, Stream),
	read_stream_to_codes(Stream, Codes, []),
	close(Stream).

read_file_to_codes(File, Codes) :-
	open(File, read, Stream),
	read_stream_to_codes(Stream, Codes, []),
	close(Stream).

read_file_to_terms(File, Codes, _) :-
	open(File, read, Stream),
	prolog_read_stream_to_terms(Stream, Codes, []),
	close(Stream).

read_file_to_terms(File, Codes) :-
	open(File, read, Stream),
	read_stream_to_terms(Stream, Codes, []),
	close(Stream).


prolog_read_stream_to_terms(Stream, Terms, Terms0) :-
	read(Stream, Term),
	(Term == end_of_file ->
	    Terms = Terms0
	;
	    Terms = [Term|TermsI],
	    prolog_read_stream_to_terms(Stream, TermsI, Terms0)
	).