Permalink
Browse files

Imported readline from 1.9.2p290.

  • Loading branch information...
1 parent 40f8e6a commit 9c4ae57a53942270753188bf4aab1af930c3ec6d @brixen brixen committed Nov 4, 2011
Showing with 1,613 additions and 2 deletions.
  1. +1 −1 configure
  2. +13 −0 lib/19/c-readline.rb
  3. +29 −0 lib/19/readline/ext/Rakefile
  4. +1,567 −0 lib/19/readline/ext/readline.c
  5. +1 −0 rakelib/extensions.rake
  6. +1 −1 vm/.gitignore
  7. +1 −0 vm/capi/19/include/config.h
View
@@ -1130,7 +1130,7 @@ end
end
end
- FileUtils.cp config_h, "vm/capi/19/include/config.h"
+ FileUtils.cp config_h, "vm/capi/19/include/ruby/config.h"
# Write a require file depending on which Readline library we use.
File.open "lib/readline.rb", "wb" do |f|
View
@@ -0,0 +1,13 @@
+require 'readline/ext/readline'
+
+module Readline
+ def self.readline(prompt="", add_hist=true)
+ perform_readline(prompt, add_hist)
+ end
+
+ def readline(prompt="", add_hist=true)
+ Readline.perform_readline(prompt, add_hist)
+ end
+end
+
+Readline::HISTORY.extend Enumerable
@@ -0,0 +1,29 @@
+require 'rake/loaders/makefile'
+
+# Setup project files
+project_files = common_headers + headers + sources + objects
+
+add_rbx_capi
+
+if ENV["READLINE_DIR"]
+ add_include_dir ENV["READLINE_DIR"]
+ add_link_dir "#{ENV["READLINE_DIR"]}/lib"
+else
+ add_include_dir "/usr/include"
+end
+
+add_shared_lib "readline"
+if lib = Rubinius::BUILD_CONFIG[:curses]
+ add_shared_lib lib
+end
+
+readline = "readline.#{$DLEXT}"
+
+file readline => project_files
+
+graph_dependencies sources
+
+import dependency_file
+
+desc "Build Readline extension"
+task :build => readline
Oops, something went wrong.

0 comments on commit 9c4ae57

Please sign in to comment.