我想知道是否可以使用 termcaps 保存多个光标位置,以便以后能够恢复它们?
例如 :
char *c_pos_1 = tgetstr("sc", NULL); //save cursor position at position 1
稍后在代码中
char *c_pos_2 = tgetstr("sc", NULL);
稍后在代码中
char *c_pos_3 = tgetstr("sc", NULL);
稍后在代码中
tputs(c_pos_2, 1, my_out); // restoring cursor at c_pos_2
稍后在代码中
tputs(c_pos_1, 1, my_out); //restoring cursor at c_pos_1
如果不可能怎么办?
谢谢您的帮助 :)