blob: 7133192fe5c6000325233931ceb20c6087ec9a4d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/usr/bin/ruby
def File::resolve_symlink( path = __FILE__ )
path = readlink(path) while symlink?(path)
expand_path(path)
end
def require_from_here ( *list )
require File.join( FM_DIR, *list )
end
$: << FM_DIR = File::dirname(File::resolve_symlink)
require 'ftools'
require 'pp'
require_from_here 'interface/ncurses.rb'
require_from_here 'code/fm.rb'
require_from_here 'code/keys.rb'
require_from_here 'code/types.rb'
require_from_here 'code/extensions.rb'
include Interface
ERROR_STREAM = File.open('/tmp/errorlog', 'a')
def log(obj)
$stdout = ERROR_STREAM
pp obj
$stdout.flush
$stdout = STDOUT
obj
end
END {
closei
Fm.dump
ERROR_STREAM.close
}
Fm.initialize
Fm.main_loop
|