SCCS-vsn: lib/libterm/Makefile 5.7
SCCS-vsn: lib/libterm/termcap.c 5.4
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# @(#)Makefile 5.6 (Berkeley) %G%
+# @(#)Makefile 5.7 (Berkeley) %G%
#
CFLAGS= -O -DCM_N -DCM_GT -DCM_B -DCM_D
LIBC= /lib/libc.a
#
CFLAGS= -O -DCM_N -DCM_GT -DCM_B -DCM_D
LIBC= /lib/libc.a
all: termcap.a termcap_p.a
termcap.a termcap_p.a: ${OBJS}
all: termcap.a termcap_p.a
termcap.a termcap_p.a: ${OBJS}
- ar cr termcap.a ${OBJS}
- cd profiled; ar cr ../termcap_p.a ${OBJS}
+ @echo building normal termcap
+ @ar cr termcap.a ${OBJS}
+ ranlib termcap.a
+ @echo building profiled termcap
+ @cd profiled; ar cr ../termcap_p.a ${OBJS}
+ ranlib termcap_p.a
${CC} ${CFLAGS} -o tc1 tc1.c termcap.a
${CC} ${CFLAGS} -o tc2 tc2.c termcap.a
${CC} ${CFLAGS} -o tc3 tc3.c termcap.a
${CC} ${CFLAGS} -o tc1 tc1.c termcap.a
${CC} ${CFLAGS} -o tc2 tc2.c termcap.a
${CC} ${CFLAGS} -o tc3 tc3.c termcap.a
install: ${MAN}
install -o bin -g bin -m 644 termcap.a ${DESTDIR}/usr/lib/libtermcap.a
install: ${MAN}
install -o bin -g bin -m 644 termcap.a ${DESTDIR}/usr/lib/libtermcap.a
+ ranlib -t ${DESTDIR}/usr/lib/libtermcap.a
rm -f ${DESTDIR}/usr/lib/libtermlib.a
ln ${DESTDIR}/usr/lib/libtermcap.a ${DESTDIR}/usr/lib/libtermlib.a
rm -f ${DESTDIR}/usr/lib/libtermlib.a
ln ${DESTDIR}/usr/lib/libtermcap.a ${DESTDIR}/usr/lib/libtermlib.a
- ranlib ${DESTDIR}/usr/lib/libtermcap.a
- install -o bin -g bin -m 644 termcap_p.a ${DESTDIR}/usr/lib/libtermcap_p.a
+ install -o bin -g bin -m 644 termcap_p.a \
+ ${DESTDIR}/usr/lib/libtermcap_p.a
+ ranlib -t ${DESTDIR}/urs/lib/libtermcap_p.a
rm -f ${DESTDIR}/usr/lib/libtermlib_p.a
ln ${DESTDIR}/usr/lib/libtermcap_p.a ${DESTDIR}/usr/lib/libtermlib_p.a
rm -f ${DESTDIR}/usr/lib/libtermlib_p.a
ln ${DESTDIR}/usr/lib/libtermcap_p.a ${DESTDIR}/usr/lib/libtermlib_p.a
- ranlib ${DESTDIR}/usr/lib/libtermcap_p.a
install -c -o bin -g bin -m 444 termcap.0 ${DESTDIR}/usr/man/cat3
rm -f ${MDIR}/tgetent.0; ln ${MDIR}/termcap.0 ${MDIR}/tgetent.0
rm -f ${MDIR}/tgetflag.0; ln ${MDIR}/termcap.0 ${MDIR}/tgetflag.0
install -c -o bin -g bin -m 444 termcap.0 ${DESTDIR}/usr/man/cat3
rm -f ${MDIR}/tgetent.0; ln ${MDIR}/termcap.0 ${MDIR}/tgetent.0
rm -f ${MDIR}/tgetflag.0; ln ${MDIR}/termcap.0 ${MDIR}/tgetflag.0
-static char sccsid[] = "@(#)termcap.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)termcap.c 5.4 (Berkeley) %G%";
#endif /* not lint */
#define BUFSIZ 1024
#define MAXHOP 32 /* max number of tc= indirections */
#define PBUFSIZ 512 /* max length of filename path */
#define PVECSIZ 32 /* max number of names in path */
#endif /* not lint */
#define BUFSIZ 1024
#define MAXHOP 32 /* max number of tc= indirections */
#define PBUFSIZ 512 /* max length of filename path */
#define PVECSIZ 32 /* max number of names in path */
-#define DEF_PATH ".termcap /etc/termcap"
+#include "pathnames.h"
+
/*
* termcap - routines for dealing with the terminal capability data base
*
/*
* termcap - routines for dealing with the terminal capability data base
*
pvec = pathvec;
tbuf = bp;
p = pathbuf;
pvec = pathvec;
tbuf = bp;
p = pathbuf;
cp = getenv("TERMCAP");
/*
* TERMCAP can have one of two things in it. It can be the
cp = getenv("TERMCAP");
/*
* TERMCAP can have one of two things in it. It can be the
strcpy(pathbuf, home); /* $HOME first */
*p++ = '/';
} /* if no $HOME look in current directory */
strcpy(pathbuf, home); /* $HOME first */
*p++ = '/';
} /* if no $HOME look in current directory */
- strncpy(p, DEF_PATH, PBUFSIZ - (p - pathbuf));
+ strncpy(p, _PATH_DEF, PBUFSIZ - (p - pathbuf));
}
}
else /* user-defined name in TERMCAP */
strncpy(pathbuf, cp, PBUFSIZ); /* still can be tokenized */
}
}
else /* user-defined name in TERMCAP */
strncpy(pathbuf, cp, PBUFSIZ); /* still can be tokenized */
-#else
- strncpy(pathbuf, "/etc/termcap", PBUFSIZ);
-#endif
*fname++ = pathbuf; /* tokenize path into vector of names */
while (*++p)
if (*p == ' ' || *p == ':') {
*fname++ = pathbuf; /* tokenize path into vector of names */
while (*++p)
if (*p == ' ' || *p == ':') {