Thread: getyx()

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    183

    getyx()

    Hey all. Just a quick one.

    I was reading about a function called getyx() available only on Linux systems. I was wondering if there is a Windows equivalent out there.

    Cheers

    P.S. It also says one of it's arguements was a WINDOW variable. Is it normal that I've never heard of these before? What are they, and how are they different to HWNDs? Thanks again.

  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
    Sounds like it might be an ncurses function.
    http://invisible-island.net/ncurses/man/ncurses.3x.html
    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.

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    183

    Cool cheers :)

    Thanks for the link Salem!

    So am I right in thinking it is not only for linux systems? And that Windows programmers can use it as well providing that they have the header? If I understand correctly, then I need a place to download it. I realize that I could probably get it from a google search with a query (sp?) of "ncurses.h" , but I have 2 reasons for not doing so.

    1. When I searched for it tons of info about it came up, but with no download links, so it would take ages to find a decent site.
    2. (The more important of the one I think,) I don't know which sites I can trust.
    i.e. The site may be riddled with viruses and, as it is programming related, the authors probably possess the knowlage to do this, or the files provided may not be up to date. (Or something along those lines anyway.)

    I know how much people here hate it when others ask for help without trying hard enough first, so I expect I'll get flamed for this, but if you know a decent site to download this header from off the top of your head, then please do share it with me. (And anyone else who may be reading this thread.)

    Thanks
    Necrofear

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Well there are win32 ports of ncurses, which allows you to write such programs in a win32 console environment.

    But the result will still look somewhat like a terminal oriented display.

    It depends what you want to achieve.
    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.

  5. #5
    Registered User
    Join Date
    Jan 2005
    Posts
    183
    Quote Originally Posted by Salem View Post
    But the result will still look somewhat like a terminal oriented display.
    Yeah, I don't mind that. It's only for a dead simple console app. I'm using it to format the output layout in an encryption algorithm testing prog, so once the algorithm is complete, the program probably won't be used for anything really important.

    Know where I can get one of these ports?
    Again, I tried to google it but nothing stood out as helpful.
    Cheers

  6. #6
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Cygwin can come with ncurses, if you ask it nicely. It also comes with bash and gcc and make and ls and all sorts of UNIX commands. You might not need everything that it has now, but you might later.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed