how to tell ncurses program terminal size

This is a discussion on how to tell ncurses program terminal size within the Linux Programming forums, part of the Platform Specific Boards category; My question touches the same project I talked about in another thread. I've made a C program that launches a ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,451
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 10:43 AM
  2. program wont run on terminal services
    By bart21 in forum C# Programming
    Replies: 3
    Last Post: 11-25-2010, 11:26 AM
  3. Getting screen size - unix/linux terminal
    By enok in forum C++ Programming
    Replies: 3
    Last Post: 11-21-2009, 03:56 AM
  4. terminal window size
    By eight8ball in forum C Programming
    Replies: 5
    Last Post: 01-08-2009, 07:48 AM
  5. Yet another lame program -- ncurses problem
    By w00tw00tkab00t in forum C Programming
    Replies: 2
    Last Post: 01-08-2006, 01:48 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21