From: Ben Gras Date: Thu, 4 Aug 2011 01:02:02 +0000 (+0000) Subject: terminfo fixes X-Git-Tag: v3.2.0~386 X-Git-Url: http://zhaoyanbai.com/repos/%22../static/icons/mdoc.3.txt?a=commitdiff_plain;h=39774435818c6d054b92f09dd5853df9cde35934;p=minix.git terminfo fixes . add TERM=minix to builtin terms . regenerate compiled-in compile_terms.c . fix terminfo db path . update termcap command . By Antoine Leca --- diff --git a/commands/termcap/termcap.c b/commands/termcap/termcap.c index 95b43ca4d..dbd722dc9 100644 --- a/commands/termcap/termcap.c +++ b/commands/termcap/termcap.c @@ -89,12 +89,13 @@ char *argv[]; Print( "Generated by \"LEFT\"", "kl" ); Print( "Generated by \"RIGHT\"", "kr" ); Print( "Generated by \"HOME\"", "kh" ); - Print( "Generated by \"END\"", "k0" ); - Print( "Generated by \"PGUP\"", "k1" ); - Print( "Generated by \"PGDN\"", "k2" ); - Print( "Generated by numeric \"+\"", "k3" ); - Print( "Generated by numeric \"-\"", "k4" ); - Print( "Generated by numeric \"5\"", "k5" ); + Print( "Generated by \"END\"", "@7" ); + Print( "Generated by \"PGUP\"", "kP" ); + Print( "Generated by \"PGDN\"", "kN" ); + Print( "Generated by \"F1\" ", "k1" ); + Print( "Generated by numeric \"+\"", "%5" ); + Print( "Generated by numeric \"-\"", "%8" ); + Print( "Generated by numeric \"5\"", "K2" ); return( 0 ); } diff --git a/lib/libterminfo/compiled_terms.c b/lib/libterminfo/compiled_terms.c index 75fa1eeb7..4ef9184e3 100644 --- a/lib/libterminfo/compiled_terms.c +++ b/lib/libterminfo/compiled_terms.c @@ -1,6 +1,7 @@ -/* $NetBSD: compiled_terms.c,v 1.1 2010/02/12 12:18:33 roy Exp $ */ +/* $NetBSD$ */ +/* * * MODIFIED FOR MINIX * * */ /* DO NOT EDIT - * Regenerate by doing `make compiled_terms` + * Regenerate by doing ``make compiled_terms'' */ struct compiled_term { @@ -85,6 +86,80 @@ const struct compiled_term compiled_terms[] = { "\002\000\012\000\122\001\002\000\012\000\000\000", 57 }, + { + "minix", + "\002\006\000\155\151\156\151\170\000\000\000\000\000\010\000" + "\002\000\001\000\001\011\000\001\026\000\005\000\004\000\120" + "\000\007\000\010\000\012\000\031\000\016\000\010\000\021\000" + "\100\000\342\003\133\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\010\000\033\133\110\033\133\060\112\000\007\000\002" + "\000\015\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\004\000\033\133\102\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\024\000" + "\005\000\033\133\060\112\000\023\000\004\000\033\133\113\000" + "\034\000\004\000\033\133\110\000\166\001\002\000\011\000\060" + "\001\011\000\033\133\045\160\061\045\144\100\000\165\000\004" + "\000\033\133\100\000\062\001\011\000\033\133\045\160\061\045" + "\144\114\000\166\000\004\000\033\133\114\000\122\001\002\000" + "\012\000\157\000\005\000\033\133\060\155\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\210\000\002\000\177\000\214\000\004\000\033" + "\133\131\000\221\000\006\000\033\133\062\061\176\000\222\000" + "\006\000\033\133\061\061\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\233\000" + "\006\000\033\133\062\061\176\000\234\000\010\000\033\133\061" + "\061\073\062\176\000\235\000\010\000\033\133\061\062\073\062" + "\176\000\236\000\010\000\033\133\061\063\073\062\176\000\237" + "\000\010\000\033\133\061\064\073\062\176\000\240\000\010\000" + "\033\133\061\065\073\062\176\000\241\000\010\000\033\133\061" + "\067\073\062\176\000\242\000\010\000\033\133\061\070\073\062" + "\176\000\243\000\010\000\033\133\061\071\073\062\176\000\244" + "\000\010\000\033\133\062\060\073\062\176\000\245\000\010\000" + "\033\133\062\061\073\062\176\000\246\000\010\000\033\133\061" + "\061\073\065\176\000\247\000\010\000\033\133\061\062\073\065" + "\176\000\250\000\010\000\033\133\061\063\073\065\176\000\251" + "\000\010\000\033\133\061\064\073\065\176\000\252\000\010\000" + "\033\133\061\065\073\065\176\000\253\000\010\000\033\133\061" + "\067\073\065\176\000\254\000\010\000\033\133\061\070\073\065" + "\176\000\255\000\010\000\033\133\061\071\073\065\176\000\256" + "\000\010\000\033\133\062\060\073\065\176\000\257\000\010\000" + "\033\133\062\061\073\065\176\000\260\000\010\000\033\133\061" + "\061\073\066\176\000\261\000\010\000\033\133\061\062\073\066" + "\176\000\262\000\010\000\033\133\061\063\073\066\176\000\263" + "\000\010\000\033\133\061\064\073\066\176\000\264\000\010\000" + "\033\133\061\065\073\066\176\000\265\000\010\000\033\133\061" + "\067\073\066\176\000\266\000\010\000\033\133\061\070\073\066" + "\176\000\267\000\010\000\033\133\061\071\073\066\176\000\270" + "\000\010\000\033\133\062\060\073\066\176\000\271\000\010\000" + "\033\133\062\061\073\066\176\000\323\000\004\000\033\133\110" + "\000\324\000\004\000\033\133\100\000\335\000\004\000\033\133" + "\125\000\340\000\004\000\033\133\126\000\047\001\003\000\015" + "\012\000\105\000\005\000\033\133\067\155\000\123\001\003\000" + "\033\115\000\140\000\005\000\033\133\060\155\000\143\000\005" + "\000\033\133\060\155\000\125\000\005\000\033\133\060\155\000" + "\112\000\005\000\033\133\067\155\000\116\000\005\000\033\133" + "\064\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\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\000\000", + 1045 + }, { "vt100", "\002\006\000\166\164\061\060\060\000\000\000\000\000\021\000" diff --git a/lib/libterminfo/genterms b/lib/libterminfo/genterms index 1a8376045..bbb37f8b1 100755 --- a/lib/libterminfo/genterms +++ b/lib/libterminfo/genterms @@ -31,12 +31,13 @@ set -e : ${TOOL_TIC:=tic} -: ${NETBSDSRCDIR:=/usr/src} -: ${TERMINFO:=${NETBSDSRCDIR}/share/terminfo/terminfo} +: ${MINIXSRCDIR:=/usr/src} +: ${TERMINFO:=${MINIXSRCDIR}/share/terminfo/terminfo} echo "/* \$NetBSD\$ */" +echo "/* * * MODIFIED FOR MINIX * * */" echo "/* DO NOT EDIT" echo " * Regenerate by doing \`\`make compiled_terms''" echo " */" echo -${TOOL_TIC} -Sx ${TERMINFO} ansi dumb vt100 vt220 wsvt25 xterm +${TOOL_TIC} -Sx ${TERMINFO} ansi dumb minix vt100 vt220 wsvt25 xterm diff --git a/lib/libterminfo/term.c b/lib/libterminfo/term.c index 745510c3b..a76a4cfd7 100644 --- a/lib/libterminfo/term.c +++ b/lib/libterminfo/term.c @@ -44,7 +44,11 @@ __RCSID("$NetBSD: term.c,v 1.11 2010/02/26 00:09:00 roy Exp $"); #include #include +#ifndef __minix #define _PATH_TERMINFO "/usr/share/misc/terminfo" +#else +#define _PATH_TERMINFO "/usr/share/terminfo/terminfo" +#endif static char database[PATH_MAX]; static char pathbuf[PATH_MAX]; diff --git a/share/terminfo/terminfo b/share/terminfo/terminfo index 6ffca1c38..980e00d33 100644 --- a/share/terminfo/terminfo +++ b/share/terminfo/terminfo @@ -17229,8 +17229,35 @@ osexec|Osborne executive, # even as single processes under SunOS and the Macintosh OS. # +# This is the entry matching the distributed ncurses patch; +# F11, F12, <5>, Numeric Plus and Minus are not available +minix|minix console (v3), + am, xenl, + cols#80, it#8, lines#25, + bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[0J, cr=^M, + cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, + cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, + cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, + dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[K, home=\E[H, ht=^I, + ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, + is2=\E[0m, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, + kcuu1=\E[A, kdch1=\177, kend=\E[Y, kf0=\E[21~, kf1=\E[11~, + kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, + kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kf10=\E[21~, + kf11=\E[11;2~, kf12=\E[12;2~, kf13=\E[13;2~, kf14=\E[14;2~, + kf15=\E[15;2~, kf16=\E[17;2~, kf17=\E[18;2~, kf18=\E[19;2~, + kf19=\E[20;2~, kf20=\E[21;2~, kf21=\E[11;5~, kf22=\E[12;5~, + kf23=\E[13;5~, kf24=\E[14;5~, kf25=\E[15;5~, kf26=\E[17;5~, + kf27=\E[18;5~, kf28=\E[19;5~, kf29=\E[20;5~, kf30=\E[21;5~, + kf31=\E[11;6~, kf32=\E[12;6~, kf33=\E[13;6~, kf34=\E[14;6~, + kf35=\E[15;6~, kf36=\E[17;6~, kf37=\E[18;6~, kf38=\E[19;6~, + kf39=\E[20;6~, kf40=\E[21;6~, khome=\E[H, kich1=\E[@, + knp=\E[U, kpp=\E[V, nel=^M^J, rev=\E[7m, ri=\EM, + rmso=\E[0m, rmul=\E[0m, sgr0=\E[0m, smso=\E[7m, smul=\E[4m, + colors#8, pairs#64, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, # This is the entry provided with minix 1.7.4, with bogus :ri: removed. -minix|minix console (v1.7), +minix-old2|minix console (v1.7), am, xenl, cols#80, it#8, lines#25, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[0J, cr=^M, @@ -17245,7 +17272,7 @@ minix|minix console (v1.7), lf4=Num -, lf5=Num 5, nel=^M^J, rev=\E[7m, ri=\EM, rmso=\E[0m, rmul=\E[0m, sgr0=\E[0m, smso=\E[7m, smul=\E[4m, # Corrected Jan 14, 1997 by Vincent Broman -minix-old|minix console (v1.5), +minix-old|minix-old15|minix console (v1.5), xon, cols#80, it#8, lines#25, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[0J, cr=^M, diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c index 950b245a2..4043c3ae3 100644 --- a/usr.bin/top/top.c +++ b/usr.bin/top/top.c @@ -572,6 +572,7 @@ void showtop(int cputimemode, int r) if(winsize.ws_row > 0) r = winsize.ws_row; print_procs(r - lines - 2, prev_proc, proc, cputimemode); + fflush(NULL); } void init(int *rows) @@ -592,6 +593,9 @@ void init(int *rows) exit(1); } + initscr(); + cbreak(); + if ( (Tclr_all = tgetstr( "cl", &s )) == NULL ) Tclr_all = "\f";