Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: HP-UX 11.00 tgetenv dilemma



On Jun 8,  9:26am, Andrej Borsenkow wrote:
}
} [Moved to zsh-workers]
} 
} > 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.

It actually shouldn't be all that difficult.  (The TGETENT_ACCEPTS_NULL
configure test is already going to be wrong for this case, BTW.)  If we
accept that "vt100" is sufficiently universal that it's guaranteed to
exist, which the accepts-null test seems to imply, then we just have to
do three tests:

	r1 = tgetent(buffer, "vt100")
	r2 = tgetent(buffer, "!@#$%^&*")
	r3 = tgetent(NULL, "vt100")

If (r1 == -1) we can't access the terminfo directory and we should give
up (bail out of configure with an error?).

If (r2 == -1) then we have the wierd HP-UX-11-style tgetent(), because
otherwise it ought to be == 0 (no cap file).

If (r3 == r1) then TGETENT_ACCEPTS_NULL.
 
} 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
} setupterm must be there.

Please refer to zsh-workers/14061 for my concerns about setupterm().  I
still think it may be wrong even to call it from the terminfo module, and
I don't know what we should do about use_env().

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author