Code Comments
Programming Forum and web based access to our favorite programming groups.I'm trying to save and restore the current position of the console's
cursor in perl on FreeBSD 4.10 using the escape sequences without
success, FreeBSD do not seems to support it.
sub savecursorpos
{
print "\x1B[sm";
}
sub restorecusorpos
{
print "\x1B[um";
}
I also tried:
sub savecursorpos
{
print "\x1B7m";
}
sub restorecusorpos
{
print "\x1B8m";
}
even tput do not work:
print `tput sc`; # Get the code to save the current cursor position
print `tput rc`;
Is there a way to do this using termcap or terminfo ? or any other
functions?
Post Follow-up to this messagesomeone92 wrote: > I'm trying to save and restore the current position of the console's > cursor in perl on FreeBSD 4.10 using the escape sequences without > success, FreeBSD do not seems to support it. When talking about cursor positions usually the Curses module is the answer. Did you check it already? jue
Post Follow-up to this messagesomeone92 wrote:
> I'm trying to save and restore the current position of the console's
> cursor in perl on FreeBSD 4.10 using the escape sequences without
> success, FreeBSD do not seems to support it.
>
> sub savecursorpos { print "\x1B7m"; }
> sub restorecusorpos { print "\x1B8m"; }
That should be "\x1B7" and "\x1B8" (no "m" here).
Don't forget "\x1B[6n". http://www.inwap.com/pdp10/ansicode.txt
The `resize` program uses those escape sequences.
linux% script
Script started, file is typescript
% /usr/X11R6/bin/resize
% exit
linux% od -d typescript
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.