LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-15-2003, 02:08 PM   #1
xunilpassion
LQ Newbie
 
Registered: Oct 2003
Posts: 12

Rep: Reputation: 0
Clearing screen


I don't know if this question is going to bore you down. Anyway, i am sure it is not going to give you any opportunity to learn. "crabboy" the moderator of this group has psoted a code segment to clear the screen. Here is a quick snapshot of it

#include
#include

main()
{
initscr();
clear();
refresh();
endwin();
}

This code uses the curses library. So far so good.

But this only works if i boot into the runlevel 3. The same code doesn't seem to budge in an xterm. My xterm looks pure and simple.

One more thing.

I am developing an application which will look like the pine email client (Only in the gui perspective). I could manage to display the key menus and main menu of my application at different locations in the xterm. but when i resize the xterm it will turn out into a mess. The only way i can get the resized event is through ioctl system calls. But i want to make my application posix compatible as much as possible. I am assuming curses.h will provide all the stuff i need. Is that true ?. If not, could anyone suggest a different method. Can you guys just point me to a reference library for the curses library. Or incase if you have a different method, just don't forget to give links to the resources that i must read.

I was a java programmer turned c programmer, still haven't broke the ice yet. so please be considerate.
 
Old 10-16-2003, 03:54 PM   #2
xunilpassion
LQ Newbie
 
Registered: Oct 2003
Posts: 12

Original Poster
Rep: Reputation: 0
I sorted it out myself.put a sleep or getch before you delete the window. You will see it works.

~xunil.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Angry Help clearing the panel at the boto of the screen (where the aps, desktop, web A6Quattro Fedora 2 10-16-2005 10:53 PM
Help clearing the panel at the boto of the screen (where the aps, desktop, web browse A6Quattro SUSE / openSUSE 2 10-16-2005 10:17 PM
Clearing the tty console screen on logout koyi Linux - General 8 07-30-2004 11:32 AM
Clearing the screen in C++ qcoder Programming 7 11-29-2003 11:03 AM
Clearing the Ms Dos screen in java? Ginger1329 Programming 3 11-13-2003 09:40 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration