Sha256: 1980edf46d36432e09923ab9092664d72de9a60ddbb9a155cb9809eb32c5ad42
Contents?: true
Size: 882 Bytes
Versions: 1
Compression:
Stored size: 882 Bytes
Contents
#!/usr/bin/env ruby # # Sean O'Halpin, 2010-08-28 # # Demo that global variables are not initialized until after # `initscr`. # require 'ffi-ncurses' include FFI::NCurses begin # symbols = [:acs_map, :curscr, :newscr, :stdscr, :ttytype, :COLORS, :COLOR_PAIRS, :COLS, :ESCDELAY, :LINES, :TABSIZE] symbols = [ "acs_map", "curscr", "newscr", "stdscr", "ttytype", "COLORS", "COLOR_PAIRS", "COLS", "ESCDELAY", "LINES", "TABSIZE" ] # symbols = [:curscr, :newscr, :stdscr] symbols.each do |sym| p [sym, FFI::NCurses.send(sym)] end initscr symbols.each do |sym| addstr [sym, FFI::NCurses.send(sym)].inspect + "\n" end refresh getch ensure endwin end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ffi-ncurses-0.4.0 | examples/globals.rb |