[m-dev.] for review: use readline in browser/

Erwan Jahier Erwan.Jahier at irisa.fr
Thu May 27 22:18:18 AEST 1999


| Index: browser/browse.m
| ===================================================================
| RCS file: /home/mercury1/repository/mercury/browser/browse.m,v
| retrieving revision 1.9
| diff -u -r1.9 browse.m
| --- browse.m	1999/05/21 14:38:18	1.9
| +++ browse.m	1999/05/27 04:42:16

| @@ -193,44 +194,46 @@
|  % Interactive display
|  %
|  
| -browse__browse(Object, InputStream, OutputStream, State0, State) -->
| -	browse_common(internal, Object, InputStream, OutputStream, 
| -		State0, State).
| +browse__browse(Object, OutputStream, State0, State) -->
| +	browse_common(internal, Object, OutputStream, State0, State).
|  
|  browse__browse_external(Object, InputStream, OutputStream, State0, State) -->
| -	browse_common(external, Object, InputStream, OutputStream, 
| -		State0, State).
| +	io__set_input_stream(InputStream, OldInputStream),
| +	browse_common(external, Object, OutputStream, State0, State),
| +	io__set_input_stream(OldInputStream, _).
|  
|  
| -:- pred browse_common(debugger, T, io__input_stream, io__output_stream,
| -			browser_state, browser_state, io__state, io__state).
| -:- mode browse_common(in, in, in, in, in, out, di, uo) is det.
| -browse_common(Debugger, Object, InputStream, OutputStream, State0, State) -->
| +:- pred browse_common(debugger, T, io__output_stream, browser_state,
| +		browser_state, io__state, io__state).
| +:- mode browse_common( in, in, in, in, out, di, uo) is det.
| +
| +browse_common(Debugger, Object, OutputStream, State0, State) -->

Euh... As its name suggests, browse_common() is used both by the internal and 
the external debuggers. If you remove that argument, you will break the 
external debugger.



|  	{ type_to_univ(Object, Univ) },
|  	{ set_term(Univ, State0, State1) },
| -	io__set_input_stream(InputStream, OldInputStream),
|  	io__set_output_stream(OutputStream, OldOutputStream),
|  	% startup_message,
|  	browse_main_loop(Debugger, State1, State),
| -	io__set_input_stream(OldInputStream, _),
|  	io__set_output_stream(OldOutputStream, _).

Ditto



-- 
R1.


--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list