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
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().
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT NETBSD
wprintw
CURSES_PRINT(3) BSD Library Functions Manual CURSES_PRINT(3)NAME
curses_print, printw, wprintw, mvprintw, mvwprintw, unctrl -- curses print formatted strings on windows routines
LIBRARY
Curses Library (libcurses, -lcurses)
SYNOPSIS
#include <curses.h>
int
printw(const char *fmt, ...);
int
wprintw(WINDOW *win, const char *fmt, ...);
int
mvprintw(int y, int x, const char *fmt, ...);
int
mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...);
char *
unctrl(chtype ch);
DESCRIPTION
These functions print formatted strings on stdscr or on the specified window.
The printw() function formats and prints its arguments on stdscr. The behavior is deliberately similar to that of printf(3), but, notably,
the return value differs.
The wprintw() function is the same as the printw() function, excepting that the resulting output is printed on the window specified by win.
The mvprintw() and mvwprintw() functions are the same as the printw() and wprintw() functions, respectively, excepting that wmove() is called
to move the cursor to the position specified by y, x before the output is printed on the window.
The unctrl() function returns a printable string representation of the character ch. If ch is a control character then it will be converted
to the form ^Y.
RETURN VALUES
Functions returning pointers will return NULL if an error is detected. The functions that return an int will return one of the following
values:
OK The function completed successfully.
ERR An error occurred in the function.
SEE ALSO curses_cursor(3), curses_scanw(3), printf(3)STANDARDS
The NetBSD Curses library complies with the X/Open Curses specification, part of the Single Unix Specification.
HISTORY
The Curses package appeared in 4.0BSD.
BSD April 6, 2011 BSD