Closed due to no activity
-
The following code compiles and runs within the QTC IDE but does not clear screen.
@#include <iostream>
#include "term.h"
#include "unistd.h"
#include "ncurses.h"using namespace std;
void Clear_Screen(bool RESET= true);
int main()
{
Clear_Screen();
cout << "Hello World!" << endl;
Clear_Screen();
cout << "Hello Again!" << endl;
return 0;
}void Clear_Screen(bool RESET)
{
if (!cur_term)
{
int result;
setupterm(NULL,STDOUT_FILENO,&result);
if (result <=0) return;
}
putp(tigetstr("clear"));
if (RESET == true)
putp(tigetstr( "rs1"));
} @After compile then run from inside QTC gives
@Hello World!
Hello Again!@When run straight from XTerm result is
@Hello Again!@debug shows result with value -1. Does this mean that tty is not set by xterm from within QTC?
Just guessing?????