Re: Cursor libraries
From: Thomas Dickey (dickey_at_saltmine.radix.net)
Date: 07/09/04
- Next message: Dan Pop: "Re: Passing const void* to free()"
- Previous message: Dan Pop: "Re: Is it time for secure C ?"
- In reply to: Dan Pop: "Re: Cursor libraries"
- Next in thread: Dan Pop: "Re: Cursor libraries"
- Reply: Dan Pop: "Re: Cursor libraries"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 09 Jul 2004 12:28:18 -0000
Dan Pop <Dan.Pop@cern.ch> wrote:
> In <10er4jhhdq6ch0b@corp.supernews.com> Thomas Dickey <dickey@saltmine.radix.net> writes:
>>Dan Pop <Dan.Pop@cern.ch> wrote:
>>> In <10eqff2fhu2d2cb@corp.supernews.com> Thomas Dickey <dickey@saltmine.radix.net> writes:
>>
>>> Nope, it doesn't. When talking about the curses library, without any
>>> qualifiers, one refers to the common subset of features.
>>
>>for that sort of attitude, you shouldn't post in comp.lang.c
> Why? What's wrong with advocating portable programming in c.l.c?
rephrasing your comment, let's simply code against the common denominator
of K&R C, C89 and C99.
>>>>> Another approach is to find an old BSD documentation of the curses
>>>>> library: every other implementation is a superset of the original
>>>>> BSD curses library.
>>>>
>>>>not really. There are analogous features, but it is not compatible.
>>
>>> Concrete examples, please.
>>
>>getch behaves differently (as you would know if you'd done much porting).
> All my curses-based code simply worked anywhere I tried it. But I used
> only the most basic features and had no problems with getch behaving
> differently (as long as we're talking about the curses getch).
BSD getch doesn't do a refresh, doesn't provide for returning function keys.
So it's not compatible.
>>delwin also.
> Never used it. All the descriptions I'm familiar with say basically the
> same thing:
> Calling delwin deletes the named window, freeing all memory
> associated with it (it does not actually erase the window's
> screen image). Subwindows must be deleted before the main
> window can be deleted.
some of the BSD implementations erase the window (more than one that I
used in the late 80's).
>>The low-level flags (cbreak, crmode, etc) are also analogous but not compatible.
> I've asked for *concrete* examples, not for hand waving. Saying "behaves
> differently" is not what I call *concrete*. "Analogous but not
> compatible" even less.
There's no 1-1 mapping between the half-cooked modes in the BSD and SysV
implementations (they're different enough to notice). That's generally
because the BSD code uses sgtty, which has fewer bits to work with. So
a program would have to deal with different control characters that wouldn't
be filtered by the library's settings.
-- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net
- Next message: Dan Pop: "Re: Passing const void* to free()"
- Previous message: Dan Pop: "Re: Is it time for secure C ?"
- In reply to: Dan Pop: "Re: Cursor libraries"
- Next in thread: Dan Pop: "Re: Cursor libraries"
- Reply: Dan Pop: "Re: Cursor libraries"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]