franz@meaddata.com (Franz Weckesser) (03/11/91)
I've written a shell script which does some cursor positioning using the tput cup capability. Works great on my sun, but when I move it to other machines (a sequent or an ibm RT), tput gives a usage error due to the extra arguments (the cursor position coordinates). I.e on my sun, "tput cup 5 5" places the cursor at the coordinates 5,5, but on an RT or Sequent "tput cup 5 5" complains about the number of parameters (though "tput cup" provides a string with places for the parameters). The man pages seem to imply that the parameters will be put into the return string by tput using tparm, but they never get the chance due to the usage failure. Is this a bug with earlier tput implementations? Is there any way to make use of the string passed back by tput? Franz ================================================================= Everything should be made as simple as possible, but no simpler - A.E. =================================================================
allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) (03/15/91)
As quoted from <3249@meaddata.meaddata.com> by franz@meaddata.com (Franz Weckesser): +--------------- | I've written a shell script which does some cursor positioning using | the tput cup capability. Works great on my sun, but when I move it to | other machines (a sequent or an ibm RT), tput gives a usage error due | to the extra arguments (the cursor position coordinates). I.e on my +--------------- Prior to V.3.2 (V.3.1?), tput didn't do a tparm automatically. This made it less than useful. This restriction *was* documented, however. If you run Perl, watch for my terminfo-in-Perl routines in comp.lang.perl. &setupterm; print &tputs(&tparm(&cursor_address, 0, 0)); ++Brandon -- Me: Brandon S. Allbery Ham: KB8JRR on 40m, 10m when time Internet: allbery@NCoast.ORG permits; also 2m, 220, 440, 1200 America OnLine: KB8JRR // Delphi: ALLBERY AMPR: kb8jrr.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery KB8JRR @ WA8BXN.OH