zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: <koen.van_hoof@alcatel.be>
Cc: "Zsh hackers list" <zsh-workers@sunsite.auc.dk>
Subject: RE: Some general problems with exporting cariables (Was: TERMCAP  problem. )
Date: Thu, 18 Jan 2001 16:16:55 +0300	[thread overview]
Message-ID: <001e01c08150$ee0dc320$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <3A66E2CC.4D890D59@alcatel.be>

>
> I made a new executable from the current CVS, and even without the
> patch it did not
> crash anymore.

That is exactly what I was afraid of :-)

> For some reason, it how uses '-lcurses' instead of '-ltermcap'.
>

Yes, it is here but I have no idea what was the reason behind:

        * 12239: Fr. Br. George (George V Kouryachy), adapted:
        configure.in: prefer curses to termcap on solaris.

You may look in zsh-workes archive.

> I did some tests with the debugger.
> The crash happened because getenv("TERM") returned 0 during the
> call to tgetent from
> the termcap library.

Well, I am surpsised that it worked at all then, screen or no screen. May be,
the lack of `=' confused getenv.

> Whithout the patch, getenv("TERM") still returns 0, but now tgetent
> from libcursus.a
> is used.
> With the patch, getenv("TERM") returns "dumb" before tgetent is
> called, so I guess it
> will also be fine for tgetent from the termcap library

What do you mean "before""? Zsh itself never calls getenv("TERM").

Anyway, if this -lcurses is terminfo-based, you loose TERMCAP hack that screen
is using (unless newer screen version can cope with TERMINFO as well). I was
about to suggest adding LIBS=-ltermcap, but realised, that zsh is usiing
AC_CHECK_LIB. This macro stinks and should never be used - it does not check,
if function is already available, but blindly adds lib(s) even if not needed.

To all developers - shuld not we better consistenly use AC_SEARCH_LIBS
instead? This has major advantage - it checks first, if function is already
available, so you can easily override library list.

Koen, you can look in configure for a

case "$host_os" in
  aix*|hpux10.*|hpux11.*|solaris*)
      termcap_curses_order="curses ncurses termcap" ;;
  *)             termcap_curses_order="termcap curses ncurses" ;;
esac

remove solaris, and reconfigure zsh (probably, make distclean first). It
should give you old behaviour. Then we see if patch really helps :-)))

I'll change configure to use AC_SERCH_LIBS instead to be able to override
library selection.

-andrej


  reply	other threads:[~2001-01-18 13:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-15 10:14 TERMCAP problem koen van hoof
2001-01-15 15:46 ` Dan Nelson
2001-01-15 17:23   ` Bart Schaefer
2001-01-16  8:30     ` koen van hoof
2001-01-16  8:52       ` Andrej Borsenkow
2001-01-16 10:42         ` koen van hoof
2001-01-16 10:54           ` Peter Stephenson
2001-01-16 11:19             ` Andrej Borsenkow
2001-01-16 11:56               ` koen van hoof
2001-01-16 12:11                 ` Andrej Borsenkow
2001-01-16 16:27                   ` koen van hoof
2001-01-16 17:05                     ` Peter Stephenson
2001-01-17  7:46                       ` koen van hoof
2001-01-17  7:53                       ` Andrej Borsenkow
2001-01-17 18:41                         ` Some general problems with exporting cariables (Was: TERMCAP problem. ) Andrej Borsenkow
2001-01-18 12:34                           ` koen van hoof
2001-01-18 13:16                             ` Andrej Borsenkow [this message]
2001-01-18 15:54                               ` koen van hoof
2001-01-19 15:05                                 ` Andrej Borsenkow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001e01c08150$ee0dc320$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=koen.van_hoof@alcatel.be \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).