10 if ARGV.size != 1 then
11 printf("usage: view file\n");
15 fp = open(ARGV[0], "r")
17 raise "cannot open file: #{ARGV[1]}"
20 # signal(SIGINT, finish)
27 #scrollok(stdscr, TRUE)
43 addstr(data_lines[lptr + i]) #if data_lines[lptr + i]
59 n = 1 if !explicit && n == 0
62 when "n" #when KEY_DOWN
65 if lptr + lines < data_lines.size then