delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2010/03/29/12:39:11

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
Date: Mon, 29 Mar 2010 20:38:07 +0300
From: Eli Zaretskii <eliz AT gnu DOT org>
Subject: Re: djgpp/libreadline bug? (cannot use backspace)
In-reply-to: <81255c92-b71b-4d8b-871c-fe057d72ddb7@u22g2000yqf.googlegroups.com>
X-012-Sender: halo1 AT inter DOT net DOT il
To: djgpp AT delorie DOT com
Message-id: <834ojz111c.fsf@gnu.org>
References: <013d25d6-f34d-4686-9c68-0de775d5bf59 AT t20g2000yqe DOT googlegroups DOT com> <e2f8f69b-01d0-4b14-abe3-11672f25ab5b AT t23g2000yqt DOT googlegroups DOT com> <7705c9031003082118y4a617ce4p8e70fcc4e6949c8b AT mail DOT gmail DOT com> <c371ad0b-67a6-4d85-9a3a-2ae5ddf29186 AT q16g2000yqq DOT googlegroups DOT com> <7705c9031003122205u29f3d86dkb94e472d76b6d553 AT mail DOT gmail DOT com> <9dd368da-7195-43ac-ac5b-6560a6a93bed AT k17g2000yqb DOT googlegroups DOT com> <7705c9031003141648k4de53b9cs1bfdc8e709f2f19 AT mail DOT gmail DOT com> <33944e03-8325-4651-9f73-202b4f1202e2 AT z11g2000yqz DOT googlegroups DOT com> <87zl1riozn DOT fsf AT turtle DOT gmx DOT de> <7705c9031003290422w7015bbd6y5e8647aec1ba3f36 AT mail DOT gmail DOT com> <109418c8-c160-4b9f-8e6c-a842da1b7a98 AT k13g2000yqe DOT googlegroups DOT com> <83oci71dhr DOT fsf AT gnu DOT org> <11fa369b-5fab-42ac-805f-1e7e74051411 AT l36g2000yqb DOT googlegroups DOT com> <83fx3j1874 DOT fsf AT gnu DOT org> <81255c92-b71b-4d8b-871c-fe057d72ddb7 AT u22g2000yqf DOT googlegroups DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: RayeR <glaux AT centrum DOT cz>
> Date: Mon, 29 Mar 2010 09:53:30 -0700 (PDT)
> Bytes: 2494
> 
> > You can _use_, i.e., _call_ the same function from many places.  But
> > ncurses does not _call_ getch etc., it _implements_ them.
> 
> OK understand. And why ncurses cannot use this functions from conio
> (libc.a)

Probably because they need to use the same infrastructure as other
ncurses functions, e.g. so that the cursor position could be tracked.

> or name them differently?

The names are expected by programs that link against ncurses.

> I tried to play with linking order and found that if I link libc first
> I got any error and it compiles OK.
> [object files] -lc -lreadline -lncurses
> And it seems to work for both parts using getch and readline.
> Which implementation of getch was used?

The one from ncurses, I think.  GNU ld is a one-pass linker, so it
will not load the functions from libc until it sees some other
function that calls them.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019