Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libterminfo Store the generated compiled terminfo descri...



details:   https://anonhg.NetBSD.org/src/rev/deb7184c518d
branches:  trunk
changeset: 752062:deb7184c518d
user:      roy <roy%NetBSD.org@localhost>
date:      Fri Feb 12 12:18:33 2010 +0000

description:
Store the generated compiled terminfo descriptions so that we can build
a consistent library just from source.

diffstat:

 lib/libterminfo/Makefile         |   19 +-
 lib/libterminfo/compiled_terms.c |  520 +++++++++++++++++++++++++++++++++++++++
 lib/libterminfo/genterms         |   41 +++
 lib/libterminfo/term.c           |   17 +-
 4 files changed, 573 insertions(+), 24 deletions(-)

diffs (truncated from 654 to 300 lines):

diff -r 5034e89caadc -r deb7184c518d lib/libterminfo/Makefile
--- a/lib/libterminfo/Makefile  Fri Feb 12 12:07:12 2010 +0000
+++ b/lib/libterminfo/Makefile  Fri Feb 12 12:18:33 2010 +0000
@@ -1,25 +1,17 @@
-#      $NetBSD: Makefile,v 1.8 2010/02/11 14:49:56 roy Exp $
+#      $NetBSD: Makefile,v 1.9 2010/02/12 12:18:33 roy Exp $
 
 USE_SHLIBDIR=  yes
 
 LIB=           terminfo
 WARNS=         4
 
-CPPFLAGS+=     -I${.CURDIR} -I${.OBJDIR}
+CPPFLAGS+=     -I${.CURDIR}
 
 SRCS=          term.c ti.c setupterm.c curterm.c tparm.c tputs.c
 SRCS+=         hash.c
 INCS=          term.h
 INCSDIR=       /usr/include
 
-.PHONY:        rescue.c
-
-rescue.c:
-               ${TOOL_TIC} -Sx ${NETBSDSRCDIR}/share/terminfo/terminfo \
-                   ansi dumb vt100 vt220 wsvt25 xterm >$@
-
-term.c: rescue.c
-
 MAN=           terminfo.3 terminfo.5
 MLINKS=                terminfo.3 setupterm.3 \
                terminfo.3 set_curterm.3 terminfo.3 del_curterm.3 \
@@ -50,9 +42,14 @@
                @echo "Generating terminfo man pages"
                cd ${.CURDIR} && ${HOST_SH} ./genman >${.OBJDIR}/$@
 
+# Allow terminfo descriptions to be compiled into libterminfo
+compiled_terms:
+               @echo "Generating compiled terminfo descriptions"
+               cd ${.CURDIR} && ${HOST_SH} ./genterms >compiled_terms.c
+
 man: terminfo.5
 
-gen: hash man
+gen: hash compiled_terms man
 
 .include <bsd.own.mk>
 .include <bsd.shlib.mk>
diff -r 5034e89caadc -r deb7184c518d lib/libterminfo/compiled_terms.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libterminfo/compiled_terms.c  Fri Feb 12 12:18:33 2010 +0000
@@ -0,0 +1,520 @@
+/* $NetBSD: compiled_terms.c,v 1.1 2010/02/12 12:18:33 roy Exp $ */
+/* DO NOT EDIT
+ * Regenerate by doing `make compiled_terms`
+ */
+
+struct compiled_term {
+       const char *name;
+       const char *cap;
+       size_t caplen;
+};
+
+const struct compiled_term compiled_terms[] = {
+       {
+               "ansi",
+               "\002\005\000\141\156\163\151\000\000\000\000\000\016\000\004"
+               "\000\036\000\001\001\000\001\026\000\001\027\000\001\032\000"
+               "\006\000\016\000\010\000\025\000\003\000\021\000\100\000\004"
+               "\000\120\000\007\000\010\000\012\000\030\000\142\003\107\000"
+               "\200\001\013\000\033\133\045\151\045\144\073\045\144\122\000"
+               "\201\001\005\000\033\133\066\156\000\202\001\023\000\033\133"
+               "\077\045\133\073\060\061\062\063\064\065\066\067\070\071\135"
+               "\143\000\203\001\004\000\033\133\143\000\052\001\011\000\033"
+               "\133\063\071\073\064\071\155\000\132\001\012\000\033\133\064"
+               "\045\160\061\045\144\155\000\133\001\012\000\033\133\063\045"
+               "\160\061\045\144\155\000\110\000\005\000\033\133\070\155\000"
+               "\134\001\126\000\033\133\060\073\061\060\045\077\045\160\061"
+               "\045\164\073\067\045\073\045\077\045\160\062\045\164\073\064"
+               "\045\073\045\077\045\160\063\045\164\073\067\045\073\045\077"
+               "\045\160\064\045\164\073\065\045\073\045\077\045\160\066\045"
+               "\164\073\061\045\073\045\077\045\160\067\045\164\073\070\045"
+               "\073\045\077\045\160\071\045\164\073\061\061\045\073\155\000"
+               "\063\000\005\000\033\133\065\155\000\064\000\005\000\033\133"
+               "\061\155\000\105\000\005\000\033\133\067\155\000\135\000\006"
+               "\000\033\133\061\060\155\000\140\000\004\000\033\133\155\000"
+               "\143\000\004\000\033\133\155\000\125\000\010\000\033\133\060"
+               "\073\061\060\155\000\103\000\006\000\033\133\061\061\155\000"
+               "\112\000\005\000\033\133\067\155\000\116\000\005\000\033\133"
+               "\064\155\000\000\000\077\000\053\020\054\021\055\030\056\031"
+               "\060\333\140\004\141\261\146\370\147\361\150\260\152\331\153"
+               "\277\154\332\155\300\156\305\157\176\160\304\161\304\162\304"
+               "\163\137\164\303\165\264\166\301\167\302\170\263\171\363\172"
+               "\362\173\343\174\330\175\234\176\376\000\123\000\006\000\033"
+               "\133\061\060\155\000\061\000\006\000\033\133\061\061\155\000"
+               "\063\001\011\000\033\133\045\160\061\045\144\104\000\056\001"
+               "\011\000\033\133\045\160\061\045\144\102\000\065\001\011\000"
+               "\033\133\045\160\061\045\144\103\000\070\001\011\000\033\133"
+               "\045\160\061\045\144\101\000\054\001\011\000\033\133\045\160"
+               "\061\045\144\120\000\055\001\011\000\033\133\045\160\061\045"
+               "\144\115\000\122\000\011\000\033\133\045\160\061\045\144\130"
+               "\000\022\000\005\000\033\133\061\113\000\027\000\013\000\033"
+               "\133\045\151\045\160\061\045\144\107\000\166\001\004\000\033"
+               "\133\111\000\060\001\011\000\033\133\045\160\061\045\144\100"
+               "\000\062\001\011\000\033\133\045\160\061\045\144\114\000\061"
+               "\001\011\000\033\133\045\160\061\045\144\123\000\173\000\002"
+               "\000\010\000\175\000\004\000\033\133\132\000\326\000\004\000"
+               "\033\133\104\000\212\000\004\000\033\133\102\000\351\000\004"
+               "\000\033\133\103\000\015\001\004\000\033\133\101\000\324\000"
+               "\004\000\033\133\114\000\102\001\005\000\033\133\064\151\000"
+               "\103\001\005\000\033\133\065\151\000\047\001\005\000\015\033"
+               "\133\123\000\107\001\024\000\045\160\061\045\143\033\133\045"
+               "\160\062\045\173\061\175\045\055\045\144\142\000\067\001\011"
+               "\000\033\133\045\160\061\045\144\124\000\125\001\004\000\033"
+               "\050\102\000\126\001\004\000\033\051\102\000\127\001\004\000"
+               "\033\052\102\000\130\001\004\000\033\053\102\000\017\000\005"
+               "\000\033\133\062\147\000\117\001\013\000\033\133\045\151\045"
+               "\160\061\045\144\144\000\003\000\002\000\007\000\002\000\004"
+               "\000\033\133\132\000\021\000\007\000\033\133\110\033\133\112"
+               "\000\007\000\002\000\015\000\036\000\004\000\033\133\104\000"
+               "\033\000\004\000\033\133\102\000\041\000\004\000\033\133\103"
+               "\000\032\000\021\000\033\133\045\151\045\160\061\045\144\073"
+               "\045\160\062\045\144\110\000\043\000\004\000\033\133\101\000"
+               "\047\000\004\000\033\133\120\000\050\000\004\000\033\133\115"
+               "\000\024\000\004\000\033\133\112\000\023\000\004\000\033\133"
+               "\113\000\034\000\004\000\033\133\110\000\153\001\003\000\033"
+               "\110\000\166\000\004\000\033\133\114\000\122\001\002\000\012"
+               "\000\323\000\004\000\033\133\110\000\020\000\002\000\003\000"
+               "\101\130\000\146\001\003\000\142\163\000\146\001",
+               942
+       },
+       {
+               "dumb",
+               "\002\005\000\144\165\155\142\000\000\000\000\000\005\000\001"
+               "\000\001\000\001\006\000\001\000\004\000\120\000\032\000\004"
+               "\000\003\000\002\000\007\000\007\000\002\000\015\000\033\000"
+               "\002\000\012\000\122\001\002\000\012\000\000\000",
+               57
+       },
+       {
+               "vt100",
+               "\002\006\000\166\164\061\060\060\000\000\000\000\000\021\000"
+               "\005\000\001\000\001\036\000\001\027\000\001\011\000\001\044"
+               "\000\001\022\000\004\000\004\000\120\000\007\000\010\000\012"
+               "\000\030\000\036\000\003\000\100\003\107\000\000\000\063\000"
+               "\140\140\141\141\146\146\147\147\152\152\153\153\154\154\155"
+               "\155\156\156\157\157\160\160\161\161\162\162\163\163\164\164"
+               "\165\165\166\166\167\167\170\170\171\171\172\172\173\173\174"
+               "\174\175\175\176\176\000\003\000\002\000\007\000\063\000\011"
+               "\000\033\133\065\155\044\074\062\076\000\064\000\011\000\033"
+               "\133\061\155\044\074\062\076\000\021\000\014\000\033\133\110"
+               "\033\133\112\044\074\065\060\076\000\007\000\002\000\015\000"
+               "\014\000\021\000\033\133\045\151\045\160\061\045\144\073\045"
+               "\160\062\045\144\162\000\063\001\011\000\033\133\045\160\061"
+               "\045\144\104\000\036\000\002\000\010\000\056\001\011\000\033"
+               "\133\045\160\061\045\144\102\000\033\000\002\000\012\000\065"
+               "\001\011\000\033\133\045\160\061\045\144\103\000\041\000\010"
+               "\000\033\133\103\044\074\062\076\000\032\000\025\000\033\133"
+               "\045\151\045\160\061\045\144\073\045\160\062\045\144\110\044"
+               "\074\065\076\000\070\001\011\000\033\133\045\160\061\045\144"
+               "\101\000\043\000\010\000\033\133\101\044\074\062\076\000\024"
+               "\000\011\000\033\133\112\044\074\065\060\076\000\023\000\010"
+               "\000\033\133\113\044\074\063\076\000\022\000\011\000\033\133"
+               "\061\113\044\074\063\076\000\057\000\007\000\033\050\102\033"
+               "\051\060\000\034\000\004\000\033\133\110\000\166\001\002\000"
+               "\011\000\153\001\003\000\033\110\000\122\001\002\000\012\000"
+               "\173\000\002\000\010\000\326\000\004\000\033\117\104\000\212"
+               "\000\004\000\033\117\102\000\351\000\004\000\033\117\103\000"
+               "\015\001\004\000\033\117\101\000\021\001\004\000\160\146\061"
+               "\000\022\001\004\000\160\146\062\000\023\001\004\000\160\146"
+               "\063\000\024\001\004\000\160\146\064\000\100\001\005\000\033"
+               "\133\060\151\000\102\001\005\000\033\133\064\151\000\103\001"
+               "\005\000\033\133\065\151\000\116\001\003\000\033\070\000\105"
+               "\000\011\000\033\133\067\155\044\074\062\076\000\123\001\007"
+               "\000\033\115\044\074\065\076\000\123\000\002\000\017\000\124"
+               "\000\006\000\033\133\077\067\154\000\016\001\010\000\033\133"
+               "\077\061\154\033\076\000\140\000\010\000\033\133\155\044\074"
+               "\062\076\000\143\000\010\000\033\133\155\044\074\062\076\000"
+               "\113\001\034\000\033\076\033\133\077\063\154\033\133\077\064"
+               "\154\033\133\077\065\154\033\133\077\067\150\033\133\077\070"
+               "\150\000\120\001\003\000\033\067\000\134\001\114\000\033\133"
+               "\060\045\077\045\160\061\045\160\066\045\174\045\164\073\061"
+               "\045\073\045\077\045\160\062\045\164\073\064\045\073\045\077"
+               "\045\160\061\045\160\063\045\174\045\164\073\067\045\073\045"
+               "\077\045\160\064\045\164\073\065\045\073\155\045\077\045\160"
+               "\071\045\164\016\045\145\017\045\073\044\074\062\076\000\125"
+               "\000\011\000\033\133\155\017\044\074\062\076\000\061\000\002"
+               "\000\016\000\062\000\006\000\033\133\077\067\150\000\017\001"
+               "\010\000\033\133\077\061\150\033\075\000\112\000\011\000\033"
+               "\133\067\155\044\074\062\076\000\116\000\011\000\033\133\064"
+               "\155\044\074\062\076\000\017\000\005\000\033\133\063\147\000"
+               "\221\000\004\000\033\117\171\000\233\000\004\000\033\117\170"
+               "\000\226\000\004\000\033\117\164\000\227\000\004\000\033\117"
+               "\165\000\230\000\004\000\033\117\166\000\231\000\004\000\033"
+               "\117\154\000\232\000\004\000\033\117\167\000\215\000\004\000"
+               "\033\117\115\000\222\000\004\000\033\117\120\000\223\000\004"
+               "\000\033\117\121\000\224\000\004\000\033\117\122\000\225\000"
+               "\004\000\033\117\123\000\170\000\004\000\033\117\161\000\171"
+               "\000\004\000\033\117\163\000\172\000\004\000\033\117\162\000"
+               "\176\000\004\000\033\117\160\000\177\000\004\000\033\117\156"
+               "\000\011\000\001\000\003\000\142\163\000\146\001",
+               897
+       },
+       {
+               "vt220",
+               "\002\006\000\166\164\062\062\060\000\000\000\000\000\024\000"
+               "\006\000\001\000\001\036\000\001\026\000\001\027\000\001\011"
+               "\000\001\044\000\001\022\000\004\000\004\000\120\000\007\000"
+               "\010\000\012\000\030\000\036\000\003\000\367\003\132\000\000"
+               "\000\063\000\140\140\141\141\146\146\147\147\152\152\153\153"
+               "\154\154\155\155\156\156\157\157\160\160\161\161\162\162\163"
+               "\163\164\164\165\165\166\166\167\167\170\170\171\171\172\172"
+               "\173\173\174\174\175\175\176\176\000\003\000\002\000\007\000"
+               "\063\000\005\000\033\133\065\155\000\064\000\005\000\033\133"
+               "\061\155\000\021\000\007\000\033\133\110\033\133\112\000\007"
+               "\000\002\000\015\000\014\000\021\000\033\133\045\151\045\160"
+               "\061\045\144\073\045\160\062\045\144\162\000\063\001\011\000"
+               "\033\133\045\160\061\045\144\104\000\036\000\002\000\010\000"
+               "\056\001\011\000\033\133\045\160\061\045\144\102\000\033\000"
+               "\002\000\012\000\065\001\011\000\033\133\045\160\061\045\144"
+               "\103\000\041\000\004\000\033\133\103\000\032\000\021\000\033"
+               "\133\045\151\045\160\061\045\144\073\045\160\062\045\144\110"
+               "\000\070\001\011\000\033\133\045\160\061\045\144\101\000\043"
+               "\000\004\000\033\133\101\000\054\001\011\000\033\133\045\160"
+               "\061\045\144\120\000\047\000\004\000\033\133\120\000\055\001"
+               "\011\000\033\133\045\160\061\045\144\115\000\050\000\004\000"
+               "\033\133\115\000\122\000\011\000\033\133\045\160\061\045\144"
+               "\130\000\024\000\004\000\033\133\112\000\023\000\004\000\033"
+               "\133\113\000\022\000\005\000\033\133\061\113\000\057\000\004"
+               "\000\033\051\060\000\150\000\022\000\033\133\077\065\150\044"
+               "\074\062\060\060\057\076\033\133\077\065\154\000\034\000\004"
+               "\000\033\133\110\000\166\001\002\000\011\000\153\001\003\000"
+               "\033\110\000\060\001\011\000\033\133\045\160\061\045\144\100"
+               "\000\161\000\030\000\057\165\163\162\057\163\150\141\162\145"
+               "\057\164\141\142\163\145\164\057\166\164\061\060\060\000\062"
+               "\001\011\000\033\133\045\160\061\045\144\114\000\166\000\004"
+               "\000\033\133\114\000\122\001\003\000\033\104\000\157\000\026"
+               "\000\033\133\077\067\150\033\133\076\033\133\077\061\150\033"
+               "\040\106\033\133\077\064\154\000\173\000\002\000\010\000\326"
+               "\000\004\000\033\133\104\000\212\000\004\000\033\133\102\000"
+               "\351\000\004\000\033\133\103\000\015\001\004\000\033\133\101"
+               "\000\222\000\004\000\033\117\120\000\233\000\006\000\033\133"
+               "\062\061\176\000\234\000\006\000\033\133\062\063\176\000\235"
+               "\000\006\000\033\133\062\064\176\000\236\000\006\000\033\133"
+               "\062\065\176\000\237\000\006\000\033\133\062\066\176\000\242"
+               "\000\006\000\033\133\063\061\176\000\243\000\006\000\033\133"
+               "\063\062\176\000\244\000\006\000\033\133\063\063\176\000\223"
+               "\000\004\000\033\117\121\000\245\000\006\000\033\133\063\064"
+               "\176\000\224\000\004\000\033\117\122\000\225\000\004\000\033"
+               "\117\123\000\227\000\006\000\033\133\061\067\176\000\230\000"
+               "\006\000\033\133\061\070\176\000\231\000\006\000\033\133\061"
+               "\071\176\000\232\000\006\000\033\133\062\060\176\000\321\000"
+               "\005\000\033\133\061\176\000\322\000\006\000\033\133\062\070"
+               "\176\000\324\000\005\000\033\133\062\176\000\335\000\005\000"
+               "\033\133\066\176\000\340\000\005\000\033\133\065\176\000\343"
+               "\000\006\000\033\133\062\071\176\000\362\000\005\000\033\133"
+               "\064\176\000\021\001\004\000\160\146\061\000\022\001\004\000"
+               "\160\146\062\000\023\001\004\000\160\146\063\000\024\001\004"
+               "\000\160\146\064\000\100\001\004\000\033\133\151\000\102\001"
+               "\005\000\033\133\064\151\000\103\001\005\000\033\133\065\151"
+               "\000\047\001\003\000\033\105\000\116\001\003\000\033\070\000"
+               "\105\000\005\000\033\133\067\155\000\123\001\003\000\033\115"
+               "\000\123\000\010\000\033\050\102\044\074\064\076\000\124\000"
+               "\006\000\033\133\077\067\154\000\131\000\005\000\033\133\064"
+               "\154\000\140\000\006\000\033\133\062\067\155\000\143\000\006"
+               "\000\033\133\062\064\155\000\112\001\006\000\033\133\077\063"
+               "\154\000\120\001\003\000\033\067\000\134\001\113\000\033\133"
+               "\060\045\077\045\160\066\045\164\073\061\045\073\045\077\045"
+               "\160\062\045\164\073\064\045\073\045\077\045\160\064\045\164"
+               "\073\065\045\073\045\077\045\160\061\045\160\063\045\174\045"
+               "\164\073\067\045\073\155\045\077\045\160\071\045\164\033\050"
+               "\060\045\145\033\050\102\045\073\044\074\062\076\000\125\000"
+               "\007\000\033\133\155\033\050\102\000\061\000\010\000\033\050"
+               "\060\044\074\062\076\000\062\000\006\000\033\133\077\067\150"
+               "\000\073\000\005\000\033\133\064\150\000\112\000\005\000\033"
+               "\133\067\155\000\116\000\005\000\033\133\064\155\000\017\000"
+               "\005\000\033\133\063\147\000\011\000\001\000\003\000\142\163"
+               "\000\146\001",
+               1083
+       },
+       {
+               "wsvt25",
+               "\002\007\000\167\163\166\164\062\065\000\000\000\000\000\027"
+               "\000\007\000\002\000\001\027\000\001\001\000\001\036\000\001"
+               "\026\000\001\011\000\001\044\000\001\036\000\007\000\016\000"
+               "\010\000\004\000\120\000\007\000\010\000\012\000\031\000\025"
+               "\000\002\000\021\000\100\000\036\000\003\000\064\004\140\000"
+               "\157\000\013\000\033\133\162\033\133\062\065\073\061\110\000"
+               "\214\000\005\000\033\133\070\176\000\222\000\006\000\033\133"
+               "\061\061\176\000\233\000\006\000\033\133\062\061\176\000\234"
+               "\000\006\000\033\133\062\063\176\000\235\000\006\000\033\133"
+               "\062\064\176\000\223\000\006\000\033\133\061\062\176\000\224"
+               "\000\006\000\033\133\061\063\176\000\225\000\006\000\033\133"
+               "\061\064\176\000\226\000\006\000\033\133\061\065\176\000\227"
+               "\000\006\000\033\133\061\067\176\000\230\000\006\000\033\133"
+               "\061\070\176\000\231\000\006\000\033\133\061\071\176\000\232"
+               "\000\006\000\033\133\062\060\176\000\323\000\005\000\033\133"
+               "\067\176\000\052\001\004\000\033\133\155\000\132\001\012\000"
+               "\033\133\064\045\160\061\045\144\155\000\133\001\012\000\033"
+               "\133\063\045\160\061\045\144\155\000\000\000\063\000\140\140"
+               "\141\141\146\146\147\147\152\152\153\153\154\154\155\155\156"



Home | Main Index | Thread Index | Old Index