[m-dev.] for review: use readline in browser/
Mark Anthony BROWN
dougl at cs.mu.OZ.AU
Thu May 27 23:10:18 AEST 1999
Erwan Jahier writes:
> |
> | -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.
>
But the internal debugger's input is done via a call to MR_trace_getline,
not via a stream, so the only thing they have in "common" is the
output stream ;).
The code that sets the input stream is now in browse_external/7. I
figured that would be enough to avoid breaking the external debugger,
but I couldn't easily test it. Did I miss something?
Cheers,
Mark
--
Mark Brown (dougl at cs.mu.oz.au) )O+ | For Microsoft to win,
MEngSc student, | the customer must lose
Dept of Computer Science, Melbourne Uni | -- Eric S. Raymond
--------------------------------------------------------------------------
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