mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 04:13:39 +00:00
The things you have to go through some times! Add a minimal program to
read a termcap entry, since tset is picky about filedescriptors...
This commit is contained in:
parent
e04e0de266
commit
7705c77bd6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6745
@ -1,6 +1,7 @@
|
||||
PROG = sysinstall
|
||||
MANEXT = 1
|
||||
NOMAN= yet
|
||||
CLEANFILES= makedevs.c rtermcap
|
||||
|
||||
.PATH: ${.CURDIR}/../disklabel
|
||||
|
||||
@ -18,7 +19,7 @@ BOOTS=${.CURDIR}/../../sys/i386/boot/biosboot/obj
|
||||
BOOTS=${.CURDIR}/../../sys/i386/boot/biosboot
|
||||
.endif
|
||||
|
||||
makedevs.c: dev2c.sh Makefile
|
||||
makedevs.c: dev2c.sh Makefile rtermcap
|
||||
mkdir -p dev
|
||||
cp ${.CURDIR}/../../etc/etc.i386/MAKEDEV dev
|
||||
( cd dev; sh ./MAKEDEV all )
|
||||
@ -32,16 +33,19 @@ makedevs.c: dev2c.sh Makefile
|
||||
< ${BOOTS}/boot1 >> makedevs.tmp
|
||||
file2c 'const unsigned char boot2[] = {' '};' \
|
||||
< ${BOOTS}/boot2 >> makedevs.tmp
|
||||
tset -Q -S cons25 | sed 's/^.* //' | \
|
||||
./rtermcap cons25 | \
|
||||
file2c 'const char termcap_cons25[] = {' ',0};' \
|
||||
>> makedevs.tmp
|
||||
tset -Q -S cons25-m | sed 's/^.* //' | \
|
||||
./rtermcap cons25-m | \
|
||||
file2c 'const char termcap_cons25_m[] = {' ',0};' \
|
||||
>> makedevs.tmp
|
||||
tset -Q -S vt100 | sed 's/^.* //' | \
|
||||
./rtermcap vt100 | \
|
||||
file2c 'const char termcap_vt100[] = {' ',0};' \
|
||||
>> makedevs.tmp
|
||||
mv makedevs.tmp makedevs.c
|
||||
|
||||
rtermcap: ${.CURDIR}/rtermcap.c
|
||||
${CC} -o rtermcap ${.CURDIR}/rtermcap.c -ltermcap
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
|
14
sbin/sysinstall/rtermcap.c
Normal file
14
sbin/sysinstall/rtermcap.c
Normal file
@ -0,0 +1,14 @@
|
||||
#include <stdio.h>
|
||||
#include <termcap.h>
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
char buf[4096];
|
||||
int i;
|
||||
|
||||
i = tgetent(buf, argv[1]);
|
||||
|
||||
printf("%s",buf);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user