help with ncurses

X

Xavier Noria

I want to ask ncurses for the terminal size, or to clear the screen,
nothing more fancy than that. I have been playing around a bit
without luck, a bit blindly due to the lack of library docs. Can
anyone help?

-- fxn
 
D

David Vallner

--------------enig1EE3185E8AFBF88214BCDBA4
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Xavier said:
I want to ask ncurses for the terminal size, or to clear the screen,
nothing more fancy than that. I have been playing around a bit without
luck, a bit blindly due to the lack of library docs. Can anyone help?
=20
-- fxn
=20
=20

Lack of docs for -curses-?!

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/82359

If you find out the author of a Ruby binding didn't go through
copy/pasting the underlying C library's documentation on his website for
convenience, just look that up, or go figure in irb. Besides, the
standard ruby curses binding works fine enough for that. Having never
before used Curses, irb tells me about Curses::init_screen,
Curses::lines, Curses::cols, and Curses::clear...

David Vallner


--------------enig1EE3185E8AFBF88214BCDBA4
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)

iD8DBQFFHt/qy6MhrS8astoRAt7fAJ45K4drwxjVPrs92SGlZYMuqYirKgCdGrQt
w0Cxfd2r31rJW8N3WyQ2wxM=
=zAtn
-----END PGP SIGNATURE-----

--------------enig1EE3185E8AFBF88214BCDBA4--
 
X

Xavier Noria

Lack of docs for -curses-?!

Lack of ncurses-ruby docs.

Yeah, I already glanced over that document before asking for help.
If you find out the author of a Ruby binding didn't go through
copy/pasting the underlying C library's documentation on his
website for
convenience, just look that up, or go figure in irb.

Yes I did. The library docs says "This wrapper provides access to the
functions, macros, global variables and constants of the ncurses
library. These are mapped to a Ruby Module named "Ncurses": Functions
and external variables are implemented as singleton functions of the
Module Ncurses."

I played around with irb, with the output of Ncurses.methods.sort,
etc. without luck.
Besides, the
standard ruby curses binding works fine enough for that. Having never
before used Curses, irb tells me about Curses::init_screen,
Curses::lines, Curses::cols, and Curses::clear...

Ah, now that is Curses, a standard library I didn't remember
(different from ncurses). In that library what I need is
straigthforward to get.

-- fxn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,214
Messages
2,571,112
Members
47,704
Latest member
DavidSuita

Latest Threads

Top