ncurses refresh()


 
Thread Tools Search this Thread
Top Forums Programming ncurses refresh()
# 1  
Old 10-29-2009
ncurses refresh()

i have read in one of links, there its documented
Quote:
The job of printw is to update a few flags and data structures and write the data to a buffer corresponding to stdscr. In order to show it on the screen, we need to call refresh() and tell the curses system to dump the contents on the screen.
but i am using following code

Code:
 int main ()
 {
     char ch;
     initscr();
     printw("Enter a char :");
     ch=getch();
     printw("You Entered '%c' ",ch);
     getch();
     endwin();
     return 0;
}

the code does not have
Quote:
refresh();
but have one getch() extra,its showing out put on the window.

without that getch() the program is getting terminated in falsh so we cant observe the out put .
my question is how its printing o/p on window without refresh().
# 2  
Old 11-04-2009
please reply for this
# 3  
Old 11-04-2009
As specified in the rules, you're not supposed to bump threads.

A little googling brought me to the curses functions echo() and noecho(), which enable and disable local echo respectively.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Ncurses colors

I am using ncurses to develop a user interface. Perhaps I should be using something else, but I am reasonably comfortable with ncurses and don't really want to climb another learning curve at this time. One problem I have dealt with for many years is ncurses' colors. I have simply been... (23 Replies)
Discussion started by: BillLee
23 Replies

2. Programming

[C/Ncurses]Need help on a project

Hi guys I'm a newbie.Got a school project:need to convert Linux Hunt game,which is in K&R C to C99.I got some problems over Ncurses files:new library it's very different from the old one.There are some variables that with gcc are considered undefined 'cause they are no more used in the new Ncurses... (2 Replies)
Discussion started by: fracche
2 Replies

3. UNIX for Dummies Questions & Answers

ncurses not in library?

I tried to complile a text-based messenger program but, while configuring, got a message saying that ncurses wasn't found. Though it appears to be there... This is the program: http://sourceforge.net/project/showfiles.php?group_id=110124&package_id=119574&release_id=373164 I get the error... (5 Replies)
Discussion started by: riwa
5 Replies

4. Programming

Help with ncurses

Help with ncurses Hi, I need some help with ncurses.I'm supposed to write a program in C to display date and time and also to input the username and password using C.I chose ncurses for my task and here I am. Code: #include <stdio.h> #include <termios.h> #include... (1 Reply)
Discussion started by: rakesh_01
1 Replies

5. Linux

Ncurses with Ubuntu

Hi, I am new to this programming with ncurses. I want to work out few examples on this ncurses. I jus want to know whether this ncurses works with Ubuntu OS? I found tat ncurses doesn come with AIX OS, may be it could be installed as a SupportPac or something, not sure about it. Can u please... (4 Replies)
Discussion started by: julie_s
4 Replies

6. Programming

nCurses over telnet

hello all. my first post here :) i just want a little help. i have a small app tha uses ncurses for gui, and for user input. I need this app to be executed on a sever side, and have access to it through telnet. When i test it, i see that enter makes the hole gui move up, and some other... (0 Replies)
Discussion started by: tamtam
0 Replies

7. UNIX for Dummies Questions & Answers

Refresh ls list on screen (auto-refresh)?

I am looking for a way to issue a command or string of commands to repeatedly display new files that are written to the directory. I usually use ls -ltr to see the newest files at the bottom of the screen. I would like to automate this command to refresh what is displayed every second or so. Can... (3 Replies)
Discussion started by: skidude
3 Replies

8. AIX

Refresh window?

Hi, for my first time using AIX, I haven't had much luck and I was wondering if I could get some urgent help. I had a terminal open and had allocated some space to a new volume group and then logical partition to "/foldername". I then went to go to netscape, so I typed that in the terminal and it... (0 Replies)
Discussion started by: JimmyFo
0 Replies

9. Programming

ncurses/Darwin

I am using Darwin on Mac OS X.I.I (new to both Unix and C++). I downloaded the ncurses library from http://prdownloads.sourceforge.net/gnu-darwin/ncurses-5.2.tgz, but I don't know what to do with it now. Stuffit has expanded the archive, but I still have the original .tgz as well (if that's... (1 Reply)
Discussion started by: parmenides
1 Replies
Login or Register to Ask a Question