X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: RayeR Newsgroups: comp.os.msdos.djgpp Subject: Re: djgpp/libreadline bug? (cannot use backspace) Date: Tue, 30 Mar 2010 17:51:17 -0700 (PDT) Organization: http://groups.google.com Lines: 21 Message-ID: <1433b3f4-9d44-455b-9465-e873fd2cb618@33g2000yqj.googlegroups.com> References: <013d25d6-f34d-4686-9c68-0de775d5bf59 AT t20g2000yqe 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> <834ojz111c DOT fsf AT gnu DOT org> <9e95b163-ba8a-467d-870e-4f3437dd9a96 AT y17g2000yqd DOT googlegroups DOT com> NNTP-Posting-Host: 213.220.252.124 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1269996677 8565 127.0.0.1 (31 Mar 2010 00:51:17 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Wed, 31 Mar 2010 00:51:17 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: 33g2000yqj.googlegroups.com; posting-host=213.220.252.124; posting-account=Q0wMHAoAAADjYrghh94FTf6YnbpTqZgp User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090825 SeaMonkey/1.1.18,gzip(gfe) Bytes: 3186 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > P.S. GNU ld still links all *.o into the .EXE even if not used. I find > that annoying. I was wondering why removing a #define and recompiling > didn't shave any output size until I proved that. Hm I think not. Look at libc.a which have about 850kB this would produce much bigger helloworld.exe if all *.o from libc would be linked. I observed that if you use one or more functions from x.o then entire x.o is linked. But it doesn't matter if it's ar-packed in library (group of *.o in .a) or separated. I know -ffunction-sections - fdata-sections and use it on avr-gcc where I want spare every byte and it helps. It also should work for DJGPP but it would require to recompile libraries to utilize it. BTW readline and ncurses increased size of my program from ~100kB - > 190kB (after strip & UPX) it seems to me high cost for a command line history (I use only 2 functions readline and add_history). I also want to add my commands completion - it looks a bit complicated I'm looking for some simple examples. I though it would be enough to provide a pointer on string array and readline would complette it but it seems that I will have to write some functions for searching in array etc. and readline will call them.