diff options
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/sysinstall/Makefile | 12 | ||||
-rw-r--r-- | sbin/sysinstall/rtermcap.c | 14 |
2 files changed, 22 insertions, 4 deletions
diff --git a/sbin/sysinstall/Makefile b/sbin/sysinstall/Makefile index 768cf74..d141faa 100644 --- a/sbin/sysinstall/Makefile +++ b/sbin/sysinstall/Makefile @@ -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> diff --git a/sbin/sysinstall/rtermcap.c b/sbin/sysinstall/rtermcap.c new file mode 100644 index 0000000..3f18e8b --- /dev/null +++ b/sbin/sysinstall/rtermcap.c @@ -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; +} |