head	1.7;
access;
symbols
	netbsd-11-0-RC5:1.7
	netbsd-11-0-RC4:1.7
	netbsd-11-0-RC3:1.7
	netbsd-11-0-RC2:1.7
	netbsd-11-0-RC1:1.7
	perseant-exfatfs-base-20250801:1.7
	netbsd-11:1.7.0.44
	netbsd-11-base:1.7
	netbsd-10-1-RELEASE:1.7
	perseant-exfatfs-base-20240630:1.7
	perseant-exfatfs:1.7.0.42
	perseant-exfatfs-base:1.7
	netbsd-8-3-RELEASE:1.7
	netbsd-9-4-RELEASE:1.7
	netbsd-10-0-RELEASE:1.7
	netbsd-10-0-RC6:1.7
	netbsd-10-0-RC5:1.7
	netbsd-10-0-RC4:1.7
	netbsd-10-0-RC3:1.7
	netbsd-10-0-RC2:1.7
	netbsd-10-0-RC1:1.7
	netbsd-10:1.7.0.40
	netbsd-10-base:1.7
	netbsd-9-3-RELEASE:1.7
	cjep_sun2x-base1:1.7
	cjep_sun2x:1.7.0.38
	cjep_sun2x-base:1.7
	cjep_staticlib_x-base1:1.7
	netbsd-9-2-RELEASE:1.7
	cjep_staticlib_x:1.7.0.36
	cjep_staticlib_x-base:1.7
	netbsd-9-1-RELEASE:1.7
	phil-wifi-20200421:1.7
	phil-wifi-20200411:1.7
	is-mlppp:1.7.0.34
	is-mlppp-base:1.7
	phil-wifi-20200406:1.7
	netbsd-8-2-RELEASE:1.7
	netbsd-9-0-RELEASE:1.7
	netbsd-9-0-RC2:1.7
	netbsd-9-0-RC1:1.7
	phil-wifi-20191119:1.7
	netbsd-9:1.7.0.32
	netbsd-9-base:1.7
	phil-wifi-20190609:1.7
	netbsd-8-1-RELEASE:1.7
	netbsd-8-1-RC1:1.7
	pgoyette-compat-merge-20190127:1.7
	pgoyette-compat-20190127:1.7
	pgoyette-compat-20190118:1.7
	pgoyette-compat-1226:1.7
	pgoyette-compat-1126:1.7
	pgoyette-compat-1020:1.7
	pgoyette-compat-0930:1.7
	pgoyette-compat-0906:1.7
	netbsd-7-2-RELEASE:1.7
	pgoyette-compat-0728:1.7
	netbsd-8-0-RELEASE:1.7
	phil-wifi:1.7.0.30
	phil-wifi-base:1.7
	pgoyette-compat-0625:1.7
	netbsd-8-0-RC2:1.7
	pgoyette-compat-0521:1.7
	pgoyette-compat-0502:1.7
	pgoyette-compat-0422:1.7
	netbsd-8-0-RC1:1.7
	pgoyette-compat-0415:1.7
	pgoyette-compat-0407:1.7
	pgoyette-compat-0330:1.7
	pgoyette-compat-0322:1.7
	pgoyette-compat-0315:1.7
	netbsd-7-1-2-RELEASE:1.7
	pgoyette-compat:1.7.0.28
	pgoyette-compat-base:1.7
	netbsd-7-1-1-RELEASE:1.7
	matt-nb8-mediatek:1.7.0.26
	matt-nb8-mediatek-base:1.7
	perseant-stdc-iso10646:1.7.0.24
	perseant-stdc-iso10646-base:1.7
	netbsd-8:1.7.0.22
	netbsd-8-base:1.7
	prg-localcount2-base3:1.7
	prg-localcount2-base2:1.7
	prg-localcount2-base1:1.7
	prg-localcount2:1.7.0.20
	prg-localcount2-base:1.7
	pgoyette-localcount-20170426:1.7
	bouyer-socketcan-base1:1.7
	pgoyette-localcount-20170320:1.7
	netbsd-7-1:1.7.0.18
	netbsd-7-1-RELEASE:1.7
	netbsd-7-1-RC2:1.7
	netbsd-7-nhusb-base-20170116:1.7
	bouyer-socketcan:1.7.0.16
	bouyer-socketcan-base:1.7
	pgoyette-localcount-20170107:1.7
	netbsd-7-1-RC1:1.7
	pgoyette-localcount-20161104:1.7
	netbsd-7-0-2-RELEASE:1.7
	localcount-20160914:1.7
	netbsd-7-nhusb:1.7.0.14
	netbsd-7-nhusb-base:1.7
	pgoyette-localcount-20160806:1.7
	pgoyette-localcount-20160726:1.7
	pgoyette-localcount:1.7.0.12
	pgoyette-localcount-base:1.7
	netbsd-7-0-1-RELEASE:1.7
	netbsd-7-0:1.7.0.10
	netbsd-7-0-RELEASE:1.7
	netbsd-7-0-RC3:1.7
	netbsd-7-0-RC2:1.7
	netbsd-7-0-RC1:1.7
	netbsd-6-0-6-RELEASE:1.4.4.1
	netbsd-6-1-5-RELEASE:1.4.4.2
	netbsd-7:1.7.0.8
	netbsd-7-base:1.7
	yamt-pagecache-base9:1.7
	yamt-pagecache-tag8:1.4.2.3
	netbsd-6-1-4-RELEASE:1.4.4.2
	netbsd-6-0-5-RELEASE:1.4.4.1
	tls-earlyentropy:1.7.0.6
	tls-earlyentropy-base:1.7
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.7
	riastradh-drm2-base3:1.7
	netbsd-6-1-3-RELEASE:1.4.4.2
	netbsd-6-0-4-RELEASE:1.4.4.1
	netbsd-6-1-2-RELEASE:1.4.4.2
	netbsd-6-0-3-RELEASE:1.4.4.1
	netbsd-6-1-1-RELEASE:1.4.4.2
	riastradh-drm2-base2:1.7
	riastradh-drm2-base1:1.7
	riastradh-drm2:1.7.0.2
	riastradh-drm2-base:1.7
	netbsd-6-1:1.4.4.2.0.2
	netbsd-6-0-2-RELEASE:1.4.4.1
	netbsd-6-1-RELEASE:1.4.4.2
	netbsd-6-1-RC4:1.4.4.2
	netbsd-6-1-RC3:1.4.4.2
	agc-symver:1.7.0.4
	agc-symver-base:1.7
	netbsd-6-1-RC2:1.4.4.2
	netbsd-6-1-RC1:1.4.4.1
	yamt-pagecache-base8:1.6
	netbsd-6-0-1-RELEASE:1.4.4.1
	yamt-pagecache-base7:1.6
	matt-nb6-plus-nbase:1.4.4.1
	yamt-pagecache-base6:1.6
	netbsd-6-0:1.4.4.1.0.4
	netbsd-6-0-RELEASE:1.4.4.1
	netbsd-6-0-RC2:1.4.4.1
	tls-maxphys:1.6.0.2
	tls-maxphys-base:1.7
	matt-nb6-plus:1.4.4.1.0.2
	matt-nb6-plus-base:1.4.4.1
	netbsd-6-0-RC1:1.4.4.1
	yamt-pagecache-base5:1.4
	yamt-pagecache-base4:1.4
	netbsd-6:1.4.0.4
	netbsd-6-base:1.4
	yamt-pagecache:1.4.0.2
	yamt-pagecache-base3:1.4
	yamt-pagecache-base2:1.4;
locks; strict;
comment	@# @;


1.7
date	2013.01.24.14.17.40;	author roy;	state Exp;
branches;
next	1.6;

1.6
date	2012.08.20.15.44.02;	author joerg;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	2012.06.03.23.19.10;	author joerg;	state Exp;
branches;
next	1.4;

1.4
date	2011.11.03.07.19.39;	author joerg;	state Exp;
branches
	1.4.2.1
	1.4.4.1;
next	1.3;

1.3
date	2011.11.02.20.39.41;	author yamt;	state Exp;
branches;
next	1.2;

1.2
date	2011.11.02.20.30.00;	author christos;	state Exp;
branches;
next	1.1;

1.1
date	2011.11.02.17.48.53;	author christos;	state Exp;
branches;
next	;

1.6.2.1
date	2013.02.25.00.28.01;	author tls;	state Exp;
branches;
next	;

1.4.2.1
date	2011.11.03.07.19.39;	author yamt;	state dead;
branches;
next	1.4.2.2;

1.4.2.2
date	2011.11.10.14.31.37;	author yamt;	state Exp;
branches;
next	1.4.2.3;

1.4.2.3
date	2012.10.30.18.59.18;	author yamt;	state Exp;
branches;
next	1.4.2.4;

1.4.2.4
date	2014.05.22.11.37.00;	author yamt;	state Exp;
branches;
next	;
commitid	HJV5p3BoaVY5KwBx;

1.4.4.1
date	2012.06.23.22.54.57;	author riz;	state Exp;
branches;
next	1.4.4.2;

1.4.4.2
date	2013.03.14.15.48.29;	author riz;	state Exp;
branches;
next	;


desc
@@


1.7
log
@Fix building our terminals with a non standard NETBSDSRCDIR, PR lib/46793.
Thanks to Bernd Ernesti.
@
text
@#	$NetBSD: Makefile.hash,v 1.6 2012/08/20 15:44:02 joerg Exp $

SCRIPT_ENV=	\
	NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
	TOOL_AWK=${TOOL_AWK:Q} \
	TOOL_NBPERF=${TOOL_NBPERF:Q} \
	TOOL_SED=${TOOL_SED:Q} \
	TOOL_SORT=${TOOL_SORT:Q} \
	TOOL_TIC=${TOOL_TIC:Q}

PARSEDIR:=${.PARSEDIR}
# Generate our string and hash tables
hash.c: genhash term.h
		@@echo "Generating terminfo hash"
		${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} > ${.TARGET}

termcap_hash.c: genthash termcap_map.c
		@@echo "Generating termcap hash"
		${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} > ${.TARGET}

# Allow terminfo descriptions to be compiled into libterminfo
compiled_terms.c: genterms term.h ${NETBSDSRCDIR}/share/terminfo/terminfo
		@@echo "Generating compiled terminfo descriptions"
		${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} > ${.TARGET}

.if ${USETOOLS} == "yes"
compiled_terms.c: ${TOOL_TIC}
.endif

DPSRCS+=	hash.c termcap_hash.c compiled_terms.c

CLEANFILES+=	hash.c termcap_hash.c compiled_terms.c
@


1.6
log
@Add tic dependency only for the USETOOLS case.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.hash,v 1.5 2012/06/03 23:19:10 joerg Exp $
d4 1
@


1.6.2.1
log
@resync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.hash,v 1.6 2012/08/20 15:44:02 joerg Exp $
a3 1
	NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
@


1.5
log
@Switch terminfo(3) to cdb(5).
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.hash,v 1.4 2011/11/03 07:19:39 joerg Exp $
d25 1
d27 1
@


1.4
log
@Fix dependencies on generated files.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.hash,v 1.3 2011/11/02 20:39:41 yamt Exp $
d25 2
@


1.4.4.1
log
@Pull up following revision(s) (requested by joerg in ticket #328):
	lib/libc/gen/devname.c: revision 1.22
	distrib/sparc64/instfs/dot.profile: revision 1.7
	distrib/i386/cdroms/install.sh: revision 1.3
	tests/lib/libcurses/director/director.c: revision 1.10
	lib/libc/include/reentrant.h: revision 1.15
	distrib/amd64/cdroms/install.sh: revision 1.3
	tests/include/t_paths.c: revision 1.12
	share/man/man7/hier.7: revision 1.101
	etc/rc.d/sysdb: revision 1.24
	include/stdlib.h: revision 1.99
	tests/lib/libcurses/Makefile: revision 1.3
	distrib/sparc64/cdroms/installcd/install.sh: revision 1.3
	distrib/i386/cdroms/Makefile.cdrom: revision 1.27
	lib/libc/gen/ttyname.c: revision 1.25
	usr.bin/tic/Makefile: revision 1.2
	tools/compat/Makefile: revision 1.57
	lib/libterminfo/compile.c: revision 1.7
	lib/libc/gen/ttyname.c: revision 1.26
	lib/libterminfo/compile.c: revision 1.8
	tools/compat/Makefile: revision 1.59
	tools/compat/cdbw.h: revision 1.1
	distrib/i386/installimage/install.sh: revision 1.2
	lib/libc/include/namespace.h: revision 1.154
	usr.bin/tic/tic.c: revision 1.13
	usr.bin/tic/tic.c: revision 1.14
	usr.bin/tic/tic.c: revision 1.15
	distrib/sets/lists/base/mi: revision 1.996
	usr.bin/tic/tic.c: revision 1.16
	usr.sbin/dev_mkdb/dev_mkdb.8: revision 1.13
	usr.bin/tic/tic.c: revision 1.17
	usr.bin/tic/tic.c: revision 1.18
	tools/compat/cdbr.h: revision 1.1
	distrib/sparc64/instfs/list: revision 1.25
	usr.bin/tic/tic.c: revision 1.19
	lib/libc/cdb/cdbw.c: revision 1.4
	lib/libc/cdb/cdbw.3: revision 1.4
	lib/libc/cdb/cdbw.3: revision 1.5
	share/terminfo/Makefile: revision 1.3
	usr.sbin/dev_mkdb/dev_mkdb.c: revision 1.29
	usr.sbin/dev_mkdb/Makefile: revision 1.8
	lib/libc/gen/ttyname.3: revision 1.23
	lib/libc/gen/ttyname.3: revision 1.24
	lib/libc/cdb/cdbr.c: revision 1.3
	include/cdbw.h: revision 1.2
	distrib/sparc64/cdroms/installcd/Makefile: revision 1.15
	lib/libc/gen/devname.3: revision 1.12
	tools/compat/compat_defs.h: revision 1.85
	tools/compat/compat_defs.h: revision 1.86
	lib/libterminfo/term_private.h: revision 1.10
	lib/libterminfo/term.c: revision 1.14
	usr.bin/tic/tic.1: revision 1.10
	lib/libterminfo/term.c: revision 1.15
	lib/libterminfo/Makefile.hash: revision 1.5
	lib/libterminfo/term.c: revision 1.16
	distrib/amd64/installimage/install.sh: revision 1.2
	share/man/man5/rc.conf.5: revision 1.152
	distrib/sets/lists/tests/mi: revision 1.472
	distrib/amd64/cdroms/Makefile.cdrom: revision 1.7
	include/paths.h: revision 1.41
	bin/ps/ps.1: revision 1.101
	lib/libterminfo/terminfo.5.in: revision 1.16
	usr.bin/tic/tic.c: revision 1.20
	lib/libterminfo/terminfo.5.in: revision 1.17
Prefer __printflike.
Use queue(3)
Replace linear lookup with hash table, reducing runtime by 60%.
Use e* from util.h.
One more strdup -> estrdup.
Maintain nalias and nterm on the fly.
Add void for ttyslot prototype.
Use memcmp in place of strncmp, since length is known to no longer than
either of the arguments.
Fix a number of memory leaks. Keep final loop of the cleanup in tic(1)
under #ifdef __VALGRIND__ though.
Add __predict_true / __predict_false definitions.
Add a special seeder for cdbw_output that gives stable results.
Hook up cdbw(3) for the tool build.
Prototype for cdbw_stable_seeder.
Provide a usable thr_once for !_REENTRANT
Switch device database to cdb(5). Rework ttyname(3) and ttyname_r(3) to
depend on new devname_r(3) as heart. Add /dev/pts magic directly to
devname(3). While it can lead to returning non-existing paths, the
behavior is more consistent that way. Drop caching layer in devname(3),
it doesn't buy anything for the common case of having access to the
database. Teach devname(3) proper fallback behavior of scanning /dev.
Create both old-style and new-style database for now in /etc/rc.d/sysdb.
Switch terminfo(3) to cdb(5).
Fix typos.
Make Alan Barrett happy and add ().
Add cdbr(3) support to tools/compat.
Bump date for previous.
Relax consistency to make it possible to match valid entries.
Prefix devname's buffer with /dev/ as ttyname is supposed to return the
full path. Reported by Dave Huang.
@
text
@d1 1
a1 1
#	$NetBSD$
a24 2
compiled_terms.c: ${TOOL_TIC}

@


1.4.4.2
log
@Pull up following revision(s) (requested by roy in ticket #835):
	lib/libterminfo/terminfo.3: revision 1.9
	lib/libterminfo/term.h: revision 1.13
	lib/libterminfo/term.h: revision 1.14
	usr.bin/tput/Makefile: revision 1.11
	lib/libterminfo/terminfo.3: revision 1.10
	lib/libterminfo/genman: revision 1.5
	lib/libterminfo/term_private.h: revision 1.11
	usr.bin/tput/tput.c: revision 1.23
	usr.bin/tput/tput.c: revision 1.24
	usr.bin/tput/tput.c: revision 1.25
	lib/libterminfo/tparm.c: revision 1.11
	lib/libterminfo/Makefile.hash: revision 1.7
	usr.bin/tput/tput.c: revision 1.26
	lib/libterminfo/tparm.c: revision 1.12
	lib/libterminfo/tparm.c: revision 1.13
	lib/libterminfo/tparm.c: revision 1.14
	lib/libterminfo/terminfo.5.in: revision 1.18
As tparm accepts longs we should treat them as long during expansion.
Also, fix the ~ and ! logic.
Move the strings vs long analysis to a private function, but allow
tput(1) to use it so we can work with string parameters to
capabilities.
Fix building our terminals with a non standard NETBSDSRCDIR, PR
lib/46793.
Thanks to Bernd Ernesti.
Remove debug accidently commited.
If char * > long then print a suitable error when passing a string
parameter.
For platforms where we cannot fit a char * into a long, return NULL
and set errno to ENOTSUPP.
Add descriptions for terminfo keys to term.h
These are extracted by genman and placed into the compiled terminfo.5
Fixes PR lib/47090
Provide a disabled implentation of tlparm and ti_tlparm for
completeness.
This also improves the readability of _ti_tiparm.
Use putp(3) to output our strings.
Fixes PR lib/47532
@
text
@a3 1
	NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
@


1.4.2.1
log
@file Makefile.hash was added on branch yamt-pagecache on 2011-11-10 14:31:37 +0000
@
text
@d1 27
@


1.4.2.2
log
@sync with head
@
text
@a0 27
#	$NetBSD$

SCRIPT_ENV=	\
	TOOL_AWK=${TOOL_AWK:Q} \
	TOOL_NBPERF=${TOOL_NBPERF:Q} \
	TOOL_SED=${TOOL_SED:Q} \
	TOOL_SORT=${TOOL_SORT:Q} \
	TOOL_TIC=${TOOL_TIC:Q}

PARSEDIR:=${.PARSEDIR}
# Generate our string and hash tables
hash.c: genhash term.h
		@@echo "Generating terminfo hash"
		${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} > ${.TARGET}

termcap_hash.c: genthash termcap_map.c
		@@echo "Generating termcap hash"
		${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} > ${.TARGET}

# Allow terminfo descriptions to be compiled into libterminfo
compiled_terms.c: genterms term.h ${NETBSDSRCDIR}/share/terminfo/terminfo
		@@echo "Generating compiled terminfo descriptions"
		${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} > ${.TARGET}

DPSRCS+=	hash.c termcap_hash.c compiled_terms.c

CLEANFILES+=	hash.c termcap_hash.c compiled_terms.c
@


1.4.2.3
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.hash,v 1.4.2.2 2011/11/10 14:31:37 yamt Exp $
a24 4
.if ${USETOOLS} == "yes"
compiled_terms.c: ${TOOL_TIC}
.endif

@


1.4.2.4
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.hash,v 1.4.2.3 2012/10/30 18:59:18 yamt Exp $
a3 1
	NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
@


1.3
log
@use the tools version of utilities for other scripts, too
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.hash,v 1.2 2011/11/02 20:30:00 christos Exp $
d25 2
@


1.2
log
@use the tools version.
@
text
@d1 8
a8 1
#	$NetBSD: Makefile.hash,v 1.1 2011/11/02 17:48:53 christos Exp $
d14 1
a14 2
		TOOL_NBPERF=${TOOL_NBPERF} TOOL_AWK=${TOOL_AWK} \
		    TOOL_SED=${TOOL_SED} ${HOST_SH} ${.ALLSRC} > ${.TARGET}
d18 1
a18 2
		${HOST_SH} ${.ALLSRC} > ${.TARGET}

d23 1
a23 1
		${HOST_SH} ${.ALLSRC} > ${.TARGET}
@


1.1
log
@Separate the generators out, so that they can be re-used by tools, and
don't play games with curdir/objdir.
@
text
@d1 1
a1 1
#	$NetBSD$
d7 2
a8 1
		${HOST_SH} ${.ALLSRC} > ${.TARGET}
@

