I\'m programming in C using ncurses libraries (it\'s the first time) and I\'ve two problems. I\'m on ubuntu with the default terminal (gnome terminal).
1) I need to
You can't resize the terminal window from ncurses. The functions you mention resize the part of the terminal window that is painted on by curses. The idea is you catch the SIGWINCH signal and call resizeterm in the handler when the user resizes the window from outside the application (using the mouse, probably).
This is intended behavior, though poorly documented in ncurses and in the Unix standard/POSIX. NetBSD's curses docs state it explicitly:
If n is positive then
stdscris scrolled up. n lines are lost from the top ofstdscrand n blank lines are inserted at the bottom. If n is negative thenstdscris scrolled down. n blank lines are inserted at the top ofstdscrand n lines are lost from the bottom.
So you'll have to manually save input and reprint it when scrolling.