[Freeciv-Dev] Re: Patch for freeciv
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, 29 Jan 2002 10:18:25 +0100, Raimar Falke wrote:
>On Tue, Jan 29, 2002 at 12:55:08AM +0100, Alexander Mai wrote:
>> Hello,
>>
>> attached is a patch for the civserver to work within
>> "non xterm sessions" on OS/2. It has been written by
>> some previous OS/2 porter, but never made its way into
>> the sources. And I didn't know what it was required for ...
>>
>> Problem is that those sessions doesn't react in time
>> (or at all) to client connections.
>> According to the contribution guide one shouldn't
>> add #ifdef my_fancy_os, but here I'm not sure
>> whether I should really try to make this code more
>> general so it gets executed w/o #ifdef ?? (should work...,
>> not tried)
>
>The patch enables the canonical mode for the terminal. Why is this
>needed? It looks to me like some bug in OS/2 or the other software
>used. Freeciv doesn't mess with the terminal normally. Readline
>does. Does the bug show up if you disable the readline support?
>
>Nevertheless the code should be wrapped in a
>"enable_canonical_terminal_mode" function.
>
> Raimar
First:
I confess it looked ugly at this place. It used to be
in civserver.c, but the related headers are for whatever
reasons(?) only in src_main.c. So I decided to place
it there.
Second:
readline? Oh, time to have a closer look. Indeed I built without readline!
Ok, let's postpone this for now.
Third:
Reading in the depth of my libc's documentation solves a miracle:
Indeed that I_CANON bit was already set, and I couldn't
explain what's going on.
The POSIX.1 terminal interface is enabled by calling tcsetattr().
Before the first invocation of tcsetattr(), the default operating
system input method is used (including line editing).
Ok, that means this should be a platform specific problem,
my patch could be "simplified" (it's ok for now)
and moved to some suitable location.
Bye,
---
Alexander Mai
st002279@xxxxxxxxxxxxxxxxxxxxxx
|
|