At 15:19 +0100 1999/12/09, Joachim Wolf Laudien wrote:
>trying the Prolog demo with Hugs98Bin-991121-MacPPC.sea.bin
>I get at most two solutions: pressing ; after the first one
>doesn't do anything, it needs a Return to get transmitted,
>which will then get read after the second solution and
>terminates the query.
>
>I tried a simple getChar and experienced the same problem.
>On Mac you have to press Return and get two ';', the echoed input
>and the value; trying the same on Windows gives the expected result:
...
>Is this a problem with the Mac binary or am I missing some Mac
>specific options?
This is a problem (I think) with the C standard, which does not specify how
getchar (and which Hugs calls from its getChar) should behave relative to
the console. So on UNIX computers one has extensions: ECHO and NO-ECHO
terminals mode. There is also a distinction between inputting whole lines
and single characters.
Now, on the MacOS, it depends on the compiler you use, or rather the
console package you are using which usually comes with the compiler. The
now defunct Symantec compiler had such modes on its console, but the
console of the Metrowerks compiler we are using now does not. I think it
only allows inputting whole lines with echo in the editing mode. So it
means that it is not possible to turn over the input editing to a Hugs
running program via getChar: it will be always waiting for a whole line to
be input before letting the kernel starting processing it.
Hamilton Richards <[EMAIL PROTECTED]> said he intended to fiddle around
with this problem, so perhaps it might be fixed.
Another, more extensive fix, would be writing a whole new console package.
This is extremely time consuming though, so it would be great if somebody
out there interested in MacOS GUI programming would be willing to take up
the challenge.
Hans Aberg
* Email: Hans Aberg <mailto:[EMAIL PROTECTED]>
* Home Page: <http://www.matematik.su.se/~haberg/>
* AMS member listing: <http://www.ams.org/cml/>