#!/bin/sh # This is `vwcurses.06' (part 6 of a multipart archive). # Do not concatenate these parts, unpack them in order with `/bin/sh'. # File `vw_curses/termlib/README' is being continued... # touch -am 1231235999 $$.touch >/dev/null 2>&1 if test ! -f 1231235999 && test -f $$.touch; then shar_touch=touch else shar_touch=: echo echo 'WARNING: not restoring timestamps. Consider getting and' echo "installing GNU \`touch', distributed in GNU File Utilities..." echo fi rm -f 1231235999 $$.touch # if test ! -r _sharseq.tmp; then echo 'Please unpack part 1 first!' exit 1 fi shar_sequence=`cat _sharseq.tmp` if test "$shar_sequence" != 6; then echo "Please unpack part $shar_sequence next!" exit 1 fi if test ! -f _sharnew.tmp; then echo 'x - still skipping vw_curses/termlib/README' else echo 'x - continuing file vw_curses/termlib/README' sed 's/^X//' << 'SHAR_EOF' >> 'vw_curses/termlib/README' && ISTS, 2700 Steeles Ave West Concord, Ontario (416) 665-5458 SHAR_EOF echo 'File vw_curses/termlib/README is complete' && $shar_touch -am 0627091195 'vw_curses/termlib/README' && chmod 0644 'vw_curses/termlib/README' || echo 'restore of vw_curses/termlib/README failed' shar_count="`wc -c < 'vw_curses/termlib/README'`" test 1613 -eq "$shar_count" || echo "vw_curses/termlib/README: original size 1613, current size $shar_count" rm -f _sharnew.tmp fi # ============= vw_curses/termlib/tgoto.c ============== if test -f 'vw_curses/termlib/tgoto.c' && test X"$1" != X"-c"; then echo 'x - skipping vw_curses/termlib/tgoto.c (file already exists)' rm -f _sharnew.tmp else > _sharnew.tmp echo 'x - extracting vw_curses/termlib/tgoto.c (text)' sed 's/^X//' << 'SHAR_EOF' > 'vw_curses/termlib/tgoto.c' && #include X #define MAXRESULTLEN 64 X /* the following must be defined by the linking application. If curses is used, X they are defined by curses */ extern char *UP; extern char *BC; X X char* tgoto(cmstr, destcol, destline) X char* cmstr; X int destcol; X int destline; /* X * Interpret and expand cursor motion capability strings. X * 'cmstr' is the capability string to use for cursor addressing, and X * describes how to output 'destcol' and 'destline' using %-escapes. X * 'destline' is normally output first. X * 'destcol' is the destination column number (horizontal). X * 'destline' is the destination row number (vertical). X * X * The % escapes have the following meanings: X * %% produce the character % X * %d output value as in printf %d X * %2 output value as in printf %2d X * %3 output value as in printf %3d X * %. output value as in printf %c X * %+x add x to value, then do `%.' X * %>xy if value > x then add y, no output X * %r reverse order of two parameters, no output X * %i increment by one, no output X * %n exclusive-or all parameters with 0140 (Datamedia 2500) X * %B BCD (16*(value/10)) + (value%10), no output X * %D Reverse coding (value - 2*(value%16)), no output (Delta Data) X * X * Return value is a pointer to the expanded cursor motion string to be output. X * The string "OOPS" is returned if there is an error. X * ***Caution for VxWorks: This uses a static array to return the result. X */ { X static char result[MAXRESULTLEN]; X int is; /* current index in cmstr */ X int ir; /* current index in result */ X int coord; /* current coordinate, either col or line */ X int curcol; /* TRUE if 'coord' is col, FALSE if line */ X int extracols = 0; /* motion corrections from %. */ X int extralines = 0; X int c; X #define COORD_SET coord = (curcol ? destcol : destline) #define COORD_SWAP curcol=!curcol; COORD_SET X X if (cmstr==NULL) { X /* output "OOPS" on errors */ X return ("OOPS"); X } X X curcol = FALSE; X COORD_SET; X X is=0; X ir=0; X X while ((c=cmstr[is++])!=NULL) { X if (c != '%') { X result[ir++]=c; X continue; X } X X /* get % escape code */ X c=cmstr[is++]; X X switch (c) { X X case '2': X case '3': X case 'd': X if (c=='3' || c=='d' && coord >= 100) { X result[ir++] = coord/100 + '0'; X coord %= 100; X } X if (c=='2' || c=='d' && coord >= 10) { X result[ir++] = coord/10 + '0'; X } X result[ir++] = (coord % 10) + '0'; X COORD_SWAP; X break; X X case '+': X case '.': X if (c=='+') X coord += cmstr[is++]; X X /* Output current coordinate in binary, but avoid outputting X nulls, newlines, and cntl-D's because they may be interpreted X as something else. We go "one ahead" instead, and back up using X UP or BC */ X if (coord==0 || coord=='\n' || coord=='\004') { X if (curcol) { X extracols++; X coord++; X } X else if (UP!=NULL) { X extralines++; X coord++; X } X } X result[ir++] = coord; X COORD_SWAP; X break; X X case '>': X if (coord > cmstr[is++]) X coord += cmstr[is++]; X else X is++; X break; X X case 'r': X curcol=TRUE; X COORD_SET; X break; X X case 'i': X destcol++; X destline++; X coord++; X break; X X case 'n': X destcol ^= 0140; X destline ^= 0140; X COORD_SET; X break; X X case 'B': X coord = (coord/10 * 16) + (coord % 10); X break; X X case 'D': X coord = coord - 2*(coord % 16); X break; X X case '%': X result[ir++] = '%'; X break; X X default: X return ("OOPS"); X } X } X X result[ir]=NULL; /* null-terminate result */ X X while (extracols>0) { X strcat(result,((BC!=NULL) ? BC : "\b")); X extracols--; X } X X while (extralines>0) { X strcat(result,UP); X extralines--; X } X X return (result); } SHAR_EOF $shar_touch -am 0627091195 'vw_curses/termlib/tgoto.c' && chmod 0644 'vw_curses/termlib/tgoto.c' || echo 'restore of vw_curses/termlib/tgoto.c failed' shar_count="`wc -c < 'vw_curses/termlib/tgoto.c'`" test 4365 -eq "$shar_count" || echo "vw_curses/termlib/tgoto.c: original size 4365, current size $shar_count" rm -f _sharnew.tmp fi # ============= vw_curses/termlib/tputs.c ============== if test -f 'vw_curses/termlib/tputs.c' && test X"$1" != X"-c"; then echo 'x - skipping vw_curses/termlib/tputs.c (file already exists)' rm -f _sharnew.tmp else > _sharnew.tmp echo 'x - extracting vw_curses/termlib/tputs.c (text)' sed 's/^X//' << 'SHAR_EOF' > 'vw_curses/termlib/tputs.c' && #include #include X /* The following must be defined by the linking application. If curses is used, X they are defined by curses */ extern short ospeed; extern char PC; X /* Times to transmit one serial character in tenths of milliseconds. X Indexing is according to the speed codes returned by gtty(), X e.g. code 7 == 300 baud == 33.3 milliseconds/char. */ static short chartime[] = { 0, 2000, 1333, 909, 743, 666, 500, 333, 166, X 83, 55, 41, 20, 10, 5 }; X X void tputs(cp, affcnt, outc) X char *cp; X int affcnt; X int (*outc)(); /* X * Output the character string 'cp' with padding as described by an initial X * delay constant, in milliseconds, embedded in the string, e.g. "2\E[A". X * This routine should be used when outputting terminal capability strings X * from tgetstr(). Cursor motion strings should first be expanded using tgoto(). X * 'affcnt' is the number of lines affected ('*' code only). X * 'outc' is the routine to be used to output each character. X */ { X int j; /* index into 'cp' */ X int delay; /* delay to be implemented, in 10ths of milliseconds */ X int delayc; /* number of padding characters to output */ X X if (cp==NULL) X return; X X j=0; X X /* parse the delay code */ X delay=0; X while (isdigit(cp[j])) { X delay*=10; X delay+=cp[j++]-'0'; X } X X delay*=10; /* change milliseconds to 10ths of ms */ X X /* handle fractions */ X if (cp[j]=='.') { X j++; X if (isdigit(cp[j])) X delay+=cp[j++]-'0'; X X /* we only use the first fractional digit */ X while (isdigit(cp[j])) X j++; X } X X /* check for '*' and multiply by the affected lines count */ X if (cp[j]=='*') { X j++; X delay*=affcnt; X } X X /* output the main body of the string */ X while (cp[j]!=NULL) X (*outc)(cp[j++]); X X /* don't delay if none specified or 'ospeed' is out of range */ X if (delay==0 || ospeed<= 0 || ospeed>=((sizeof chartime)/sizeof(short))) X return; X X /* calculate padding needed to the nearest number of characters */ X delayc = (delay+chartime[ospeed]/2)/chartime[ospeed]; X X /* transmit padding chars */ X while (delayc>0) { X (*outc)(PC); X delayc--; X } } SHAR_EOF $shar_touch -am 0627091195 'vw_curses/termlib/tputs.c' && chmod 0644 'vw_curses/termlib/tputs.c' || echo 'restore of vw_curses/termlib/tputs.c failed' shar_count="`wc -c < 'vw_curses/termlib/tputs.c'`" test 2253 -eq "$shar_count" || echo "vw_curses/termlib/tputs.c: original size 2253, current size $shar_count" rm -f _sharnew.tmp fi # ============= vw_curses/termlib/termcap.c ============== if test -f 'vw_curses/termlib/termcap.c' && test X"$1" != X"-c"; then echo 'x - skipping vw_curses/termlib/termcap.c (file already exists)' rm -f _sharnew.tmp else > _sharnew.tmp echo 'x - extracting vw_curses/termlib/termcap.c (binary)' sed 's/^X//' << 'SHAR_EOF' > _sharuue.tmp && begin 600 vw_curses/termlib/termcap.c M(VEN8VQU9&4@/'9X5V]R:W,N:#X*(VEN8VQU9&4@/&EO3&EB+F@^"B-I;F-L M=61E(#QC='EP92YH/@H*+RH*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H5%)512D@('L*("`@ M("`@("`@("`@("`@:68@*&YR/CUN=RD@('L*("`@("`@("`@("`@("`@("`@ M;G<]2!T;V\@;&]N9UQN(BPR."D["B`@("`@("`@("`@("`@("`@(&)R96%K M.PH@("`@("`@("`@("`@("!]"@H@("`@("`@("`@("`@("!B<%MJ*RM=(#T@ M8SL*("`@("`@("`@("`@?0H*("`@("`@("`@("`@8G!;:ET]3E5,3#L@("`@ M("`@+RH@;G5L;"UT97)M:6YA=&4@*B\*"B`@("`@("`@("`@(&EF("AM871C M:"AB<"QN86UE*2D@('L*("`@("`@("`@("`@("`@8VQO0H@("`@("`@("AT97)M:6YA=&5D(&)Y(&$@;G5L;"!S M=')I;FPH@("`@("`@("!W2`J+PI]"@II;G0@=&=E=&YU;2AC87`I"B`@(&-H87(J(&-A M<#L*+RH*("H@4V5A2!T;R!S96%R8V@@9F]R+@H@*B!2971U2!V86QU92P@;W(@+3$@:68@ M;F]T(&9O=6YD+@H@*@H@*B!#875T:6]N.B!T:&4@=&5R;6-A<"!E;G1R>2!U M2!T:&4@2!B=6=S(&EN(&]R:6=I;F%L M($)E2!A("2!U2!T:&4@PH@("`@("!I(#T@2!A("<])RX@"B`J("=C87`G(&ES M('1H92!T=V\M8VAA2!S=')I;F2!N;W0@ M9F]U;F0N"B`J"B`J($-A=71I;VXZ('1H92!T97)M8V%P(&5N=')Y('5S960@ M:7,@=&AE(&]N92!F'AX+`H@*B!R96-U2!F:6YD('1H92!E;G1R>2!F M;W(@>'AX(&%N9"!A<'!E;F0@=&AA="!E;G1R>2`H;6EN=7,@=&AE"B`J('1E M'AX(&-A<&%B:6QI M='DN(%1H:7,@86QL;W=S('1E2X*("HO"GL*("`@ M:6YT(&5R"!I M;G1O('1C('-T2AT8VYA;64L8G`K=&,K,RD["B`@(&QE M;CUS=')L96XH=&-N86UE*2TQ.PH@("`O*B!R96UO=F4@=')A:6QI;F<@)SHG M(&EF(&%N>2`J+PH@("!I9B`H=&-N86UE6VQE;ET]/2'0@=&EM M92`@*B\*("`@("`@=&)U9CU.54Q,.R`@("`@("`O*B!N;R!V86QI9"`G=&)U M9B<@*B\*("`@("`@2P@;6%R:R!W:71H("=S=')T)R`J+PH@("!S=')T/3$[ M"B`@(&QE;CUS=')L96XH=&-B=68I.PH@("!W:&EL92`H=&-B=69;2!I M2!\)W,I+@H@*B!4 M:&4@;F]R;6%L("PH@ M("!I;G0@:3L*("`@:6YT(&QN.R`@("`@("`@("\J(&QE;F=T:"!O9B`G;F%M M92<@*B\*("`@:6YT(&QB.R`@("`@("`@("\J(&QE;F=T:"!O9B!N86UE('!O MPH@("`@("`@("`O*B!C:&5C:R!I9B!N86UE(&UA=&-H97,@*B\*("`@ M("`@("`@:68@*'-T2P@2X* M("H@)VDG(&ES(&EN9&5X('1O('-T87)T('-K:7!P:6YG(&9R;VTN"B`J(%)E M='5R;B!V86QU92!I"!O9B!S=&%R="!O9B!N97<@8V%P86)I;&ET M>2X*("HO"GL*("`@:6YT(&9I2!S=')I;F<@*&1O=6)L92!D97)E9F5R96YC960*("H@("`@ M("`@("!P;VEN=&5R*2X@5&AE('!O:6YT97(@:71S96QF(&ES(&QE9G0@<&]I M;G1I;F<@;VYE('!APH@("!I;G0@:CL*("`@:6YT(&,[ M"B`@(&EN="!I7%Q<7#HZ;EQNPH@("`@("!S=VET8V@@*&,I('L*"B`@("`@ M(&-APH@("`@("`@("`@("`@("!C/2AC/#PS*2!\("AS=');:7,K*UTM)S`G*3L* M("`@("`@("`@("`@("`@:68@*&ES9&EG:70HPH@("`@("`@("`@ M("!F;W(@*&H],#L@97-C7VUA<%MJ72$]3E5,3#L@:BL],BD@('L*("`@("`@ M("`@("`@("`@:68@*&5S8U]M87!;:ET]/6,I('L*("`@("`@("`@("`@("`@ M("`@8SUE _sharnew.tmp echo 'x - extracting vw_curses/termlib/termcap (binary)' sed 's/^X//' << 'SHAR_EOF' > _sharuue.tmp && begin 600 vw_curses/termlib/termcap M(R!-:6YI('1E2#IB2#I<"@DZ:&\]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