/*
   The characters are read from the file

	Version 1
		open
		get0
*/
browser_character_1(File):- 
	% Save the current input for later 
	current_input(Old),

	% Open for reading the file 
	open(File,read,Stream),

   	% Stream is the current input device
	set_input(Stream),

	% Loop driving by failure 
    repeat,
	   get0(Character),
       process(Character),

	 % Close the stream
	close(Stream),   

	% Restore the previous current input
	set_input(Old),
	% Stop now 
    !.

% Character of end of file = -1 
process(-1):- !.

% Process the rest of characters 
process(Character):- 
		/* Write the character */
		put(Character), 
		/* Loop driving by failure */
		fail.

