Module: Pebbles::SL

Defined in:
ext/pebbles/sl.c

Class Method Summary collapse

Class Method Details

.run(*args) ⇒ Object



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'ext/pebbles/sl.c', line 72

static VALUE run(int argc, VALUE* argv, VALUE self)
{
    int x, i;

    for (i = 0; i < argc; ++i) {
  char* arg = RSTRING_PTR(argv[i]);
  if (*arg == '-') {
      option(arg + 1);
  }
    }
    initscr();
    signal(SIGINT, SIG_IGN);
    noecho();
    leaveok(stdscr, TRUE);
    scrollok(stdscr, FALSE);

    for (x = COLS - 1; ; --x) {
  if ( == 0) {
      if (add_D51(x) == ERR) break;
  } else {
      if (add_sl(x) == ERR) break;
  }
  refresh();
  usleep(20000);
    }
    mvcur(0, COLS - 1, LINES - 1, 0);
    endwin();
}