Thread: how to tell ncurses program terminal size

  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    7

    how to tell ncurses program terminal size

    My question touches the same project I talked about in another thread. I've made a C program that launches a text mode web browser and works as a bot on certain web pages collecting information from them. For the purpose of successful navigation, this method is better than just e.g. wget'ing the pages. So the question is how can I tell the web browser what size the terminal window is? The output is directed away from stdout using setvbuf(...);. The browser is launched using execl(...);. Right now the output is received in a very small window size which is not the size I run the program in. The browser is most likely ncurses-based.
    Last edited by apawamajawa; 07-20-2011 at 01:52 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ncurses program help with arrows keys
    By georgio in forum Game Programming
    Replies: 2
    Last Post: 11-29-2010, 11:43 AM
  2. program wont run on terminal services
    By bart21 in forum C# Programming
    Replies: 3
    Last Post: 11-25-2010, 12:26 PM
  3. Getting screen size - unix/linux terminal
    By enok in forum C++ Programming
    Replies: 3
    Last Post: 11-21-2009, 04:56 AM
  4. terminal window size
    By eight8ball in forum C Programming
    Replies: 5
    Last Post: 01-08-2009, 08:48 AM
  5. Yet another lame program -- ncurses problem
    By w00tw00tkab00t in forum C Programming
    Replies: 2
    Last Post: 01-08-2006, 02:48 PM