[m-rev.] for review: fix readline problems

Mark Brown dougl at cs.mu.OZ.AU
Tue Dec 11 16:44:06 AEDT 2001


On 11-Dec-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> The nightly tests have been failing on ceres, due to a problem
> with readline 4.2 issuing unsuppressable runtime warnings.
> This change should, I hope, fix that problem.

This change looks fine to me.  It should be ok to go ahead and
commit provided it has passed testing.

Cheers,
Mark.

> 
> ----------
> 
> Estimated hours taken: 4
> Branches: main
> 
> Fix some problems with mdb and readline 4.2 that arose due to the use
> of readline when input is redirected from an input file.  Readline 4.2
> issues a run-time warning, complaining that it can't get the terminal
> characteristics.
> 
> One unfortunate consequence of this change is that none of the test
> cases in our test suite actually test the use of readline anymore.
> However, none of the line-editing features were being tested anyway,
> and it's not really possible to test the use of readline properly
> with our current test framework.
> 
> configure.in:
> runtime/mercury_conf.h.in:
> 	Check for the existence of isatty().
> 
> trace/mercury_trace_readline.c:
> 	Only use readline() if the input is a terminal.
> 
> trace/mercury_trace_internal.c:
> 	Delete the special handling of the `echo' command when readline
> 	is enabled, because whether or not readline is enabled now has
> 	no effect on echoing when the input is not a terminal.
> 	Double-echoing when the input *is* a terminal and the "echo on"
> 	command was used is probably appropriate anyway.
> 
> tests/debugger/Mmakefile:
> tests/debugger/interactive.inp:
> tests/debugger/interactive.exp:
> 	Reenable the `interactive' test case, since the spurious
> 	readline-related failures should not occur anymore.
> 	This required updating the input file and expected output
> 	file to reflect various earlier changes:
> 	- readline is used for query input, so queries have to be all on one line;
> 	- queries are now echoed properly when `echo on' is set;
> 	- detailed stack traces include goal paths
> 	- we fixed a bug with the display of caller line numbers
> 	- we fixed a bug with the display of switch goal paths
> 
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list