head	1.26;
access;
symbols
	RELENG_3_5_0_RELEASE:1.25
	RELENG_3_4_0_RELEASE:1.25
	RELENG_3_3_0_RELEASE:1.25
	RELENG_3_2_PAO:1.25.0.4
	RELENG_3_2_PAO_BP:1.25
	RELENG_3_2_0_RELEASE:1.25
	RELENG_3_1_0_RELEASE:1.25
	RELENG_3:1.25.0.2
	RELENG_3_BP:1.25
	RELENG_2_2_8_RELEASE:1.17.2.1
	RELENG_3_0_0_RELEASE:1.25
	RELENG_2_2_7_RELEASE:1.17.2.1
	RELENG_2_2_6_RELEASE:1.17.2.1
	RELENG_2_2_5_RELEASE:1.17
	RELENG_2_2_2_RELEASE:1.17
	RELENG_2_2_1_RELEASE:1.17
	RELENG_2_2_0_RELEASE:1.17
	RELENG_2_1_7_RELEASE:1.11.4.1
	RELENG_2_1_6_1_RELEASE:1.11.4.1
	RELENG_2_1_6_RELEASE:1.11.4.1
	RELENG_2_2:1.17.0.2
	RELENG_2_2_BP:1.17
	RELENG_2_1_5_RELEASE:1.11.4.1
	RELENG_2_1_0_RELEASE:1.11.4.1
	RELENG_2_1_0:1.11.0.4
	RELENG_2_1_0_BP:1.11
	RELENG_2_0_5_RELEASE:1.11
	RELENG_2_0_5:1.11.0.2
	RELENG_2_0_5_BP:1.11
	RELENG_2_0_5_ALPHA:1.11
	RELEASE_2_0:1.9
	BETA_2_0:1.9
	ALPHA_2_0:1.3.0.2
	bsd_44_lite:1.1.1.1
	CSRG:1.1.1;
locks; strict;
comment	@# @;


1.26
date	99.11.26.09.32.53;	author peter;	state dead;
branches;
next	1.25;

1.25
date	98.10.11.04.39.56;	author peter;	state Exp;
branches;
next	1.24;

1.24
date	98.08.30.02.44.33;	author jb;	state Exp;
branches;
next	1.23;

1.23
date	98.06.12.15.57.59;	author peter;	state Exp;
branches;
next	1.22;

1.22
date	97.12.19.22.11.29;	author bde;	state Exp;
branches;
next	1.21;

1.21
date	97.12.02.11.56.36;	author peter;	state Exp;
branches;
next	1.20;

1.20
date	97.08.31.08.37.28;	author ache;	state Exp;
branches;
next	1.19;

1.19
date	97.08.24.19.19.08;	author ache;	state Exp;
branches;
next	1.18;

1.18
date	97.04.13.12.16.58;	author bde;	state Exp;
branches;
next	1.17;

1.17
date	96.08.30.16.38.45;	author peter;	state Exp;
branches
	1.17.2.1;
next	1.16;

1.16
date	96.08.30.02.04.28;	author peter;	state Exp;
branches;
next	1.15;

1.15
date	96.02.12.04.56.33;	author mpp;	state Exp;
branches;
next	1.14;

1.14
date	95.08.06.12.24.13;	author bde;	state Exp;
branches;
next	1.13;

1.13
date	95.08.05.21.21.48;	author ache;	state Exp;
branches;
next	1.12;

1.12
date	95.08.04.06.39.52;	author ache;	state Exp;
branches;
next	1.11;

1.11
date	95.05.03.22.14.01;	author ache;	state Exp;
branches
	1.11.4.1;
next	1.10;

1.10
date	94.12.04.02.41.38;	author ache;	state Exp;
branches;
next	1.9;

1.9
date	94.11.19.14.01.58;	author ats;	state Exp;
branches;
next	1.8;

1.8
date	94.11.18.12.38.41;	author ats;	state Exp;
branches;
next	1.7;

1.7
date	94.11.18.00.59.33;	author phk;	state Exp;
branches;
next	1.6;

1.6
date	94.11.14.06.45.23;	author bde;	state Exp;
branches;
next	1.5;

1.5
date	94.11.08.17.33.22;	author ache;	state Exp;
branches;
next	1.4;

1.4
date	94.11.08.17.31.52;	author ache;	state Exp;
branches;
next	1.3;

1.3
date	94.08.08.19.26.23;	author jkh;	state Exp;
branches;
next	1.2;

1.2
date	94.05.27.11.02.31;	author rgrimes;	state Exp;
branches;
next	1.1;

1.1
date	94.05.27.05.00.08;	author rgrimes;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	94.05.27.05.00.09;	author rgrimes;	state Exp;
branches;
next	;

1.11.4.1
date	95.09.02.17.42.11;	author davidg;	state Exp;
branches;
next	;

1.17.2.1
date	97.11.21.16.03.18;	author ache;	state Exp;
branches;
next	;


desc
@@


1.26
log
@To avoid confusion, zap libtermcap.  ncurses provides both curses, termcap
and termlib (terminfo) support.
@
text
@#	@@(#)Makefile	8.1 (Berkeley) 6/4/93

LIB=	termcap
SHLIB_MAJOR= 2
SHLIB_MINOR= 1
CFLAGS+=-DCM_N -DCM_GT -DCM_B -DCM_D -I${.CURDIR}
SRCS=   termcap.c tgoto.c tputs.c tparm.c tospeed.c

MAN3=	termcap.3
MLINKS=	termcap.3 tgetent.3 termcap.3 tgetflag.3 termcap.3 tgetnum.3 \
	termcap.3 tgetstr.3 termcap.3 tgoto.3 termcap.3 tputs.3 \
	termcap.3 tparm.3 termcap.3 __set_ospeed.3

LINKS=	${LIBDIR}/libtermcap.a ${LIBDIR}/libtermlib.a
.if ${OBJFORMAT} == aout
.if !defined(NOPIC)
LINKS+= ${SHLIBDIR}/libtermcap.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
	${SHLIBDIR}/libtermlib.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
.endif
.endif
.if !defined(NOPROFILE)
LINKS+=	${LIBDIR}/libtermcap_p.a ${LIBDIR}/libtermlib_p.a
.endif

beforeinstall:
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/termcap.h \
		${DESTDIR}/usr/include

# This is a hack.. Work around a major number bump that should have been
# done differently.  Back out this delta when it's time to go to 3.0 for real.
afterinstall:
.if !defined(NOPIC)
.if ${OBJFORMAT} == aout
.for lib in libtermcap libtermlib
	rm -f ${DESTDIR}/usr/lib/compat/${lib}.so.3.0
	rm -f ${DESTDIR}/usr/lib/compat/aout/${lib}.so.3.0
	ln -s ${SHLIBDIR}/${lib}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
		${DESTDIR}/usr/lib/compat/aout/${lib}.so.3.0
	rm -f ${DESTDIR}${SHLIBDIR}/${lib}.so.3.0
.endfor
.endif
.if ${OBJFORMAT} == elf
	rm -f ${DESTDIR}${SHLIBDIR}/libtermlib.so
	ln -s libtermcap.so.${SHLIB_MAJOR} ${DESTDIR}${SHLIBDIR}/libtermlib.so 
.endif
.endif

.include <bsd.lib.mk>
@


1.25
log
@Deal with /usr/lib/compat/aout, and that we've been installing things
in the wrong places for a while.
Also, the the libtermlib.so -> libtermcap.so manually for elf, otherwise
the hard link follows the symlink and the result looks rather wierd.  The
*.a files are still hard linked under elf as before.
@
text
@@


1.24
log
@BINFORMAT -> OBJFORMAT ready for E-day.
@
text
@d15 1
a16 1
.if ${OBJFORMAT} == aout
a18 4
.else
# no need for major at all, it's an ld-time redirection only
LINKS+=	${SHLIBDIR}/libtermcap.so \
	${SHLIBDIR}/libtermlib.so
a28 1
.if ${OBJFORMAT} == aout
d31 1
d33 7
a39 6
afterinstall:
.for lib in libtermcap.so libtermlib.so
	rm -f ${DESTDIR}/usr/lib/compat/${lib}.3.0
	ln -s ${SHLIBDIR}/${lib}.${SHLIB_MAJOR}.${SHLIB_MINOR} \
		${DESTDIR}/usr/lib/compat/${lib}.3.0
	rm -f ${DESTDIR}${SHLIBDIR}/${lib}.3.0
d41 4
@


1.23
log
@Understand elf library naming rules for libtermlib alias.
Don't do the libtermcap un-bump hack for anything but a.out
@
text
@d16 1
a16 1
.if ${BINFORMAT} == aout
d33 1
a33 1
.if ${BINFORMAT} == aout
@


1.22
log
@Fixed the termcap 3.0 hacks.  They were very broken in my configuration
where shared libraries are in /lib and almost everything is linked
shared.  First, they removed the old shared library before installing
the new one.  Second, they attemped a cross-device link from /lib
to /usr/lib/compat.
@
text
@d13 1
d16 1
d19 5
d33 1
d44 1
@


1.21
log
@"un-bump" the major number for libtermcap.so.  This brings -current back
to the same version numbers as 2.2.x.
The problem with the way things were was:
 - if you took a 2.2.x binary, it either wouldn't run on -current or
   if you had the old -current version of libtermcap.so.2.1 then it could
   potentially be a security problem.
 - the alternative is to start a compat22 tree dist for -current with a
   uuencoded binary.  This makefile hack is less cost.
libtermcap.so.3.0 is provided via /usr/lib/compat to avoid transition
problems.
@
text
@d22 4
d29 7
a35 4
LINKS+= ${SHLIBDIR}/libtermcap.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
	/usr/lib/compat/libtermcap.so.3.0
LINKS+= ${SHLIBDIR}/libtermcap.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
	/usr/lib/compat/libtermlib.so.3.0
a36 6

beforeinstall:
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/termcap.h \
		${DESTDIR}/usr/include
	rm -f ${DESTDIR}${SHLIBDIR}/libtermcap.so.3.0 \
	      ${DESTDIR}${SHLIBDIR}/libtermlib.so.3.0
@


1.20
log
@Restore back issetugid() usage and bump major number
@
text
@d4 2
a5 2
SHLIB_MAJOR= 3
SHLIB_MINOR= 0
d22 9
d34 2
@


1.19
log
@Bump minor number due to issetugid()
@
text
@d4 2
a5 2
SHLIB_MAJOR= 2
SHLIB_MINOR= 2
@


1.18
log
@Fixed spelling of __set_ospeed (was _set_ospeed) and improved
nearby English.
@
text
@d5 1
a5 1
SHLIB_MINOR= 1
@


1.17
log
@oops, install termcap.h from ${.CURDIR}, not the obj dir.

Pointed out by: asami
@
text
@d12 1
a12 1
	termcap.3 tparm.3 termcap.3 _set_ospeed.3
@


1.17.2.1
log
@MFC: HOME bufer overflow fix, manpage spelling fixes, __set_ospeed declaration,
issetugid() check
@
text
@d12 1
a12 1
	termcap.3 tparm.3 termcap.3 __set_ospeed.3
@


1.16
log
@cmp -s || install -c ==> install -C
@
text
@d23 2
a24 2
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 termcap.h \
	    ${DESTDIR}/usr/include
@


1.15
log
@Another round of man page cleanups.

Down to only about 100 items left to cleanup! :-)
@
text
@d23 1
a23 2
	-cd ${.CURDIR}; cmp -s termcap.h ${DESTDIR}/usr/include/termcap.h || \
	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 termcap.h \
@


1.14
log
@Change `install' to `${INSTALL}' so that default install flags can be
specified in the top level Makefiles.

Previously I missed dozens of Makefiles that skip the install after
using `cmp -s' to decide that the install isn't necessary.
@
text
@d12 1
a12 1
	termcap.3 tparm.3
@


1.13
log
@Do a little trick which covers 99% cases: initialize ospeed
variable directly in tgetent by stderr or stdout output speed.
It helps hide in non-standard __set_ospeed function and remove it
from other sources (coming soon).
Do prototype cleanup too.
@
text
@d24 1
a24 1
	    install -c -o ${BINOWN} -g ${BINGRP} -m 444 termcap.h \
@


1.12
log
@Add non-standard function: _set_ospeed(speed)
Basically all termios+termcap pgms needs it.
It set ospeed variable using nearest-matched stty speeds,
which helps termcap pgms works with non-fixed termios speeds
and not duplicate ospeed switch into every pgm.
Also it isn't standard function, its source code is too big to include it
in whole to every termcap+termios pgm.
@
text
@d6 1
a6 1
CFLAGS+=-DCM_N -DCM_GT -DCM_B -DCM_D
d12 1
a12 1
	termcap.3 tparm.3 termcap.3 _set_ospeed.3
@


1.11
log
@Bump minor number
@
text
@d7 1
a7 1
SRCS=   termcap.c tgoto.c tputs.c tparm.c
d12 1
a12 1
	termcap.3 tparm.3
@


1.11.4.1
log
@Brought in changes from main branch: Andrey's "ospeed" fixes, plus some
minor (mostly compiler warning) fixes in related files.
@
text
@d6 2
a7 2
CFLAGS+=-DCM_N -DCM_GT -DCM_B -DCM_D -I${.CURDIR}
SRCS=   termcap.c tgoto.c tputs.c tparm.c tospeed.c
d24 1
a24 1
	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 termcap.h \
@


1.10
log
@Add termcap.h & tparm
@
text
@d4 2
@


1.9
log
@Ooops, change back the LIBDIR macro to the SHLIBDIR macro for the shared
libs as told by Bruce. Now it works.
@
text
@d5 1
a5 1
SRCS=	termcap.c tgoto.c tputs.c
d9 2
a10 1
	termcap.3 tgetstr.3 termcap.3 tgoto.3 termcap.3 tputs.3
d19 5
@


1.8
log
@Makefile:
Change the reference for the libtermcap libtermlib link from SHLIBDIR
to LIBDIR. SHLIBDIR is undefined in the standard case.
termcap.c:
Initialize a local variable to zero. Otherwise an erroneous free call
can happen and clobber the calling program.
Seen with vi and gdb. If you have TERMCAP set with a terminal entry and
set TERM with something like huhu, vi and gdb core dumps.
@
text
@d12 2
a13 2
LINKS+= ${LIBDIR}/libtermcap.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
	${LIBDIR}/libtermlib.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
@


1.7
log
@Remove ${DESTDIR} from link-macros.  Already applied behind the scenes.
@
text
@d12 2
a13 2
LINKS+= ${SHLIBDIR}/libtermcap.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
	${SHLIBDIR}/libtermlib.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
@


1.6
log
@Install shared libraries in ${SHLIBDIR} instead of in ${LIBDIR}.

Add missing ${DESTDIR}'s.
@
text
@d10 1
a10 1
LINKS=	${DESTDIR}${LIBDIR}/libtermcap.a ${DESTDIR}${LIBDIR}/libtermlib.a
d12 2
a13 2
LINKS+= ${DESTDIR}${SHLIBDIR}/libtermcap.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
	${DESTDIR}${SHLIBDIR}/libtermlib.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
d16 1
a16 1
LINKS+=	${DESTDIR}${LIBDIR}/libtermcap_p.a ${DESTDIR}${LIBDIR}/libtermlib_p.a
@


1.5
log
@Forget to change = to += in previous commit
@
text
@d10 1
a10 1
LINKS=	${LIBDIR}/libtermcap.a ${LIBDIR}/libtermlib.a
d12 2
a13 2
LINKS+= ${LIBDIR}/libtermcap.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
	${LIBDIR}/libtermlib.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
d16 1
a16 1
LINKS+=	${LIBDIR}/libtermcap_p.a ${LIBDIR}/libtermlib_p.a
@


1.4
log
@Add missing link for shared libtermlib
@
text
@d12 1
a12 1
LINKS=  ${LIBDIR}/libtermcap.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
@


1.3
log
@Correct the man page extent.
Submitted by:	jkh
@
text
@d11 4
@


1.2
log
@Do not create link for *lib_p.a if you are not installing profiled libraries.
@
text
@d7 1
a7 1
MAN3=	termcap.0
@


1.1
log
@Initial revision
@
text
@d10 4
a13 2
LINKS=	${LIBDIR}/libtermcap.a ${LIBDIR}/libtermlib.a \
	${LIBDIR}/libtermcap_p.a ${LIBDIR}/libtermlib_p.a
@


1.1.1.1
log
@BSD 4.4 Lite Lib Sources
@
text
@@
