From: Rich Lane <rlane@club.cc.cmu.edu>
To: sup-devel@rubyforge.org
Subject: [sup-devel] [PATCH] try loading ncursesw
Date: Tue, 29 Dec 2009 15:58:56 -0800 [thread overview]
Message-ID: <1262131136-14766-1-git-send-email-rlane@club.cc.cmu.edu> (raw)
---
bin/sup | 14 +++++++++++++-
lib/sup/buffer.rb | 7 ++++++-
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/bin/sup b/bin/sup
index 471e833..fcc254f 100755
--- a/bin/sup
+++ b/bin/sup
@@ -1,7 +1,15 @@
#!/usr/bin/env ruby
require 'rubygems'
-require 'ncurses'
+
+no_ncursesw = false
+begin
+ require 'ncursesw'
+rescue LoadError
+ require 'ncurses'
+ no_ncursesw = true
+end
+
require 'curses'
require 'fileutils'
require 'trollop'
@@ -21,6 +29,10 @@ EOS
exit(-1)
end
+if no_ncursesw
+ warn "Install the ncursesw gem for wide character support."
+end
+
$opts = Trollop::options do
version "sup v#{Redwood::VERSION}"
banner <<EOS
diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
index df5d23c..e5175bb 100644
--- a/lib/sup/buffer.rb
+++ b/lib/sup/buffer.rb
@@ -1,6 +1,11 @@
require 'etc'
require 'thread'
-require 'ncurses'
+
+begin
+ require 'ncursesw'
+rescue LoadError
+ require 'ncurses'
+end
if defined? Ncurses
module Ncurses
--
1.6.0.4
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel
next reply other threads:[~2009-12-30 0:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-29 23:58 Rich Lane [this message]
2009-12-31 18:56 ` William Morgan
2009-12-31 19:09 ` William Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1262131136-14766-1-git-send-email-rlane@club.cc.cmu.edu \
--to=rlane@club.cc.cmu.edu \
--cc=sup-devel@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox