On Sat, 26 Apr 2008, Robert Spykerman wrote:
> Date: Sat, 26 Apr 2008 09:47:10 -0700 (PDT)
> From: Robert Spykerman <robert.spykerman@[EMAIL PROTECTED]
>
> Newsgroups: comp.lang.forth, comp.lang.forth.mac
> Subject: Re: Xina output behaviour.
>
> On Apr 26, 7:20 pm, morrimich...@[EMAIL PROTECTED]
wrote:
>> In most Forths that I have used, output is on the same line as the
>> input to the interpreter, but in Xina the output is on the next line.
>> For instance:
>>
>> \ Most Forths:
>> 2 2 + . 4 ok
>> \ Xina
>> 2 2 + .
>> 4 ok
>>
>> Is their anyway to make Xina output on the same line as it's input? I
>> don't mind having to edit the assembly source if that is what's
>> neccesary. Also, is their a way to get Mops to do this as well?
>>
>> Thanks in advance.
>
> Hmm.. that's an interesting question.
>
> What you are seeing is the default behaviour of lina.
>
> I am still dissecting and piecing the source together in my head. Lina
> takes input from the console from stdin, (ie REFILL-TIB) and the
> carriage return you see (before the output and OK) , I believe stems
> from the cr you tap in as stdin is read via READ-FILE.
>
> I've looked thru' the source and I can't account for it in any other
> way at present.
>
> So to change this behaviour, I am not sure exactly what you can do
> about it, as yet.
>
> One possibility may be to flip some flags in the termio structure that
> sets up the terminal via the ioctl syscall. Maybe there might be a
> flag that could prevent the newline. I admit I am unsure about whether
> this will work, I do not know enough about this - still learning how
> linux/unixes are put together :)
>
> Albert van der Horst might be able to suggest something.
>
> If I find out I shall let you know, meanwhile if you find any thing
> else buggy let me know, there's a lot of work yet to be done. I still
> haven't found out why my fork stuffed up :)
>
> Robert Spykerman
>
Almost ... I believe you are looking to uncooked terminal I/O, as it were,
and the extraneous <cr> is from the input. You'll need to set echo OFF,
and then you will be responsible for what appears on the screen. Similar
code is used for password processing, where echo is just turned off until
a CR terminates the input ... man termio(s) on most *nix systems will
describe the code in more detail ...
HTH ...
Rob.
---- Posted via Pronews.com - Premium Cor****ate Usenet News
Provider ----
http://www.pronews.com
offers cor****ate packages that have access to
100,000+ newsgroups


|