zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "ZSH Workers Mailing List" <zsh-workers@sunsite.dk>,
	"a normal guy" <ee_in_co@yahoo.com>
Subject: RE: HP-UX 11.00 tgetenv dilemma
Date: Fri, 8 Jun 2001 09:26:00 +0400	[thread overview]
Message-ID: <000201c0efdb$80bf9790$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <20010602004009.8849.qmail@web12507.mail.yahoo.com>

[Moved to zsh-workers]

>
> HP-UX 11.00 has two man pages discussing tgetent.  'man termcap'
> says:
>
> =======================================================(quote)
>         :
> tgetent()       ...tgetent() returns -1 if it cannot
>                 access the terminfo directory, 0 if there is no
>                 capability file for name, and 1 if all goes
> well.
>         :
> =======================================================(unquote)
>
> but 'man tgetent' says
>
>
> =======================================================(quote)
> 	:
> RETURN VALUE
>       Upon successful completion, functions that return an
>       integer return OK(0).  Otherwise, they return ERR(-1).
>
>       Functions that return pointers return a null pointer on
>       error.
> 	:
> =======================================================(unquote)
>
> The code in init.c, init_term() requires the man termcap
> functionality.  HP claims that the man tgetent functionality is
> the true X-Open Standard.  (I have not confirmed this.)
>

SUS says OK or ERR. It does not define the values. Interesting, I looked on
my own system and here manual says the same but tgetent() still works the
way zsh expects it.

> We can solve the problem in two ways.
>
> 1. If we link with -lHcurses, we get tgetent to return the
> expected 1 with success.  I suppose this would be done in the
> configure script.  This library may not be around for the
> future.
>
> 2. If the X-Open Standard is truely as HP claims, we can add
> another #ifdef block to the existing TGETENT_ACCEPTS_NULL to
> work with this situation.  Then we link with -lcurses as the
> current configure script does.
>

Pretty hard to figure out automatically.

3. Use setupterm if compiled with curses (or just if available) and tgetent
otherwise. The above problem should happen only on systems with terminfo and
setupterem must be there.

-andrej


       reply	other threads:[~2001-06-08  5:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20010602004009.8849.qmail@web12507.mail.yahoo.com>
2001-06-08  5:26 ` Andrej Borsenkow [this message]
2001-06-08 16:10   ` Bart Schaefer
     [not found] <20010611165637.24436.qmail@web12503.mail.yahoo.com>
2001-06-11 18:24 ` Andrej Borsenkow
2001-06-11 22:52   ` Bart Schaefer
2001-06-12 10:25     ` Peter Stephenson
2001-06-12 14:25       ` Bart Schaefer
2001-06-12 16:04         ` Peter Stephenson
2001-06-13  5:00           ` Bart Schaefer
2001-06-13  5:35             ` Andrej Borsenkow
2001-06-13 13:04               ` Clint Adams

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='000201c0efdb$80bf9790$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=ee_in_co@yahoo.com \
    --cc=zsh-workers@sunsite.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).