mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
39da1b6369
commit
3a47cf3395
212 changed files with 846 additions and 846 deletions
36
ChangeLog
36
ChangeLog
|
@ -21,7 +21,7 @@ Sat May 14 22:45:28 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
|||
Sat May 14 19:52:22 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_set_program_name):
|
||||
add for $0 test.
|
||||
add for $0 test.
|
||||
|
||||
Sat May 14 19:50:46 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
|
@ -50,10 +50,10 @@ Sat May 14 17:42:21 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
|
|||
|
||||
Sat May 14 12:12:54 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
|
||||
|
||||
* test/openssl/test_pkey_dsa.rb: Add basic tests and tests that
|
||||
ensure new public key PEM encoding behavior and ensure backward
|
||||
compatibility.
|
||||
[Ruby 1.9 - Bug #4422] [ruby-core:35328]
|
||||
* test/openssl/test_pkey_dsa.rb: Add basic tests and tests that
|
||||
ensure new public key PEM encoding behavior and ensure backward
|
||||
compatibility.
|
||||
[Ruby 1.9 - Bug #4422] [ruby-core:35328]
|
||||
* test/openssl/test_pkey_rsa.rb: Remove line with 'puts'.
|
||||
|
||||
Sat May 14 12:06:49 2011 Eric Hodel <drbrain@segment7.net>
|
||||
|
@ -64,8 +64,8 @@ Sat May 14 12:06:49 2011 Eric Hodel <drbrain@segment7.net>
|
|||
Sat May 14 10:32:36 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
|
||||
|
||||
* test/openssl/test_pkey_rsa.rb: Add tests that ensure new public key
|
||||
encoding behavior and also ensure backward compatibility.
|
||||
[Ruby 1.9 - Bug #4421] [ruby-core:35327]
|
||||
encoding behavior and also ensure backward compatibility.
|
||||
[Ruby 1.9 - Bug #4421] [ruby-core:35327]
|
||||
|
||||
Sat May 14 09:50:10 2011 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
|
@ -87,7 +87,7 @@ Sat May 14 05:08:32 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
|
|||
* ext/openssl/ossl_pkey.c
|
||||
* ext/openssl/ossl_pkey.h
|
||||
* test/openssl/pkey/test_pkey_rsa.rb
|
||||
Reverted premature commit. Sorry for the noise!
|
||||
Reverted premature commit. Sorry for the noise!
|
||||
|
||||
Sat May 14 05:02:58 2011 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
|
@ -97,8 +97,8 @@ Sat May 14 05:02:58 2011 Eric Hodel <drbrain@segment7.net>
|
|||
Sat May 14 04:19:06 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
|
||||
|
||||
* NEWS: Describe altered behaviour for RSA and DSA public key
|
||||
encoding. [Ruby 1.9 - Bug #4421, Bug #4422]
|
||||
[ruby-core:35327,35328]
|
||||
encoding. [Ruby 1.9 - Bug #4421, Bug #4422]
|
||||
[ruby-core:35327,35328]
|
||||
|
||||
Sat May 14 02:57:52 2011 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
|
@ -488,7 +488,7 @@ Fri May 6 23:29:47 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
|||
Fri May 6 23:13:43 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* configure.in: remove nanosleep check. we no longer use it.
|
||||
r20124 removed last usage.
|
||||
r20124 removed last usage.
|
||||
|
||||
Fri May 6 22:35:56 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
|
@ -551,7 +551,7 @@ Thu May 5 15:03:51 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
|
|||
* eval.c (frame_func_id): __method__ return different name from
|
||||
methods defined by Module#define_method with a same block.
|
||||
[ruby-core:35386] fixes #4606
|
||||
* eval (method_entry_of_iseq): new helper function. search control
|
||||
* eval.c (method_entry_of_iseq): new helper function. search control
|
||||
frame stack for a method entry which has given iseq.
|
||||
* test/ruby/test_method.rb: add tests for #4696
|
||||
|
||||
|
@ -573,14 +573,14 @@ Wed May 4 21:11:28 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
|||
Wed May 4 20:22:12 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* io.c (Init_IO): Added File::CLOEXEC constant.
|
||||
[ruby-core:22893] [Feature #1291]
|
||||
[ruby-core:22893] [Feature #1291]
|
||||
* test/ruby/test_io.rb (TestIO#test_o_cloexec): test for File::CLOEXEC.
|
||||
|
||||
Wed May 4 19:00:59 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* thread.c (rb_wait_for_single_fd): Fix wrong return value.
|
||||
* test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb
|
||||
(TestWaitForSingleFD#test_wait_for_closed_pipe): test for it.
|
||||
(TestWaitForSingleFD#test_wait_for_closed_pipe): test for it.
|
||||
|
||||
Wed May 4 18:46:39 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
|
@ -1201,7 +1201,7 @@ Tue Apr 12 01:33:00 2011 Luis Lavena <luislavena@gmail.com>
|
|||
|
||||
* configure.in: properly evaluate existence of truncate, ftruncate
|
||||
and ftello for MinGW. [ruby-core:35678]
|
||||
* win32/win32.c: rename truncate, ftruncate and ftello to avoid
|
||||
* win32/win32.c: rename truncate, ftruncate and ftello to avoid
|
||||
redefinitions.
|
||||
* win32/win32.h: ditto.
|
||||
|
||||
|
@ -1409,11 +1409,11 @@ Tue Mar 29 05:19:57 2011 Tanaka Akira <akr@fsij.org>
|
|||
|
||||
* ext/socket/raddrinfo.c: parenthesize macro arguments.
|
||||
|
||||
Tue Mar 29 00:03:51 2011 Tajima Akio <artonx@yahoo.co.jp>
|
||||
Tue Mar 29 00:03:51 2011 Tajima Akio <artonx@yahoo.co.jp>
|
||||
|
||||
* test/webrick/test_filehandler.rb (test_short_filename):
|
||||
read real short filename by cmd because smb mounted files
|
||||
have different naming convention.
|
||||
read real short filename by cmd because smb mounted files
|
||||
have different naming convention.
|
||||
|
||||
Mon Mar 28 11:38:08 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ class BenchmarkDriver
|
|||
|
||||
def progress_message *args
|
||||
unless STDOUT.tty?
|
||||
STDERR.print(*args)
|
||||
STDERR.print(*args)
|
||||
STDERR.flush
|
||||
end
|
||||
end
|
||||
|
|
|
@ -51,14 +51,14 @@ Bench.each{|b|
|
|||
|
||||
require 'pp'
|
||||
# utime
|
||||
puts Lang.join("\t")
|
||||
puts Lang.join("\t")
|
||||
Bench.each_with_index{|b, bi|
|
||||
print b, "\t"
|
||||
puts Result[bi].map{|e| e[0]}.join("\t")
|
||||
}
|
||||
|
||||
# rtime
|
||||
puts Lang.join("\t")
|
||||
puts Lang.join("\t")
|
||||
Bench.each_with_index{|b, bi|
|
||||
print b, "\t"
|
||||
puts Result[bi].map{|e| e[1]}.join("\t")
|
||||
|
|
|
@ -25,7 +25,7 @@ end
|
|||
|
||||
def benchmark cmd
|
||||
rubybin = ENV['RUBY'] || RbConfig.ruby
|
||||
|
||||
|
||||
IO.popen(rubybin, 'r+'){|io|
|
||||
io.write cmd
|
||||
io.close_write
|
||||
|
|
|
@ -33,8 +33,8 @@ def bm file
|
|||
bm_name = $1
|
||||
puts '-----------------------------------------------------------' unless $rubyonly || $matzrubyonly
|
||||
puts "#{bm_name}: "
|
||||
|
||||
|
||||
|
||||
|
||||
puts <<EOS unless $matzrubyonly || $rubyonly
|
||||
#{prog}
|
||||
--
|
||||
|
@ -93,7 +93,7 @@ if $0 == __FILE__
|
|||
ARGV.delete_if{|arg|
|
||||
/\A-/ =~ arg
|
||||
}
|
||||
|
||||
|
||||
puts "MatzRuby:"
|
||||
system("#{$matzruby_program} -v")
|
||||
puts "Ruby:"
|
||||
|
|
|
@ -75,7 +75,7 @@ assert_equal %q{[1, 2, 3]}, %q{
|
|||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
C.new.to_a
|
||||
}
|
||||
assert_equal %q{[4, 5, 6]}, %q{
|
||||
|
@ -87,7 +87,7 @@ assert_equal %q{[4, 5, 6]}, %q{
|
|||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
C.new.map{|e|
|
||||
e + 3
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ assert_equal %q{20}, %q{
|
|||
def m
|
||||
yield 1
|
||||
end
|
||||
|
||||
|
||||
m{|ib|
|
||||
m{|jb|
|
||||
i = 20
|
||||
|
@ -121,7 +121,7 @@ assert_equal %q{2}, %q{
|
|||
def m
|
||||
yield 1
|
||||
end
|
||||
|
||||
|
||||
m{|ib|
|
||||
m{|jb|
|
||||
ib = 20
|
||||
|
@ -135,11 +135,11 @@ assert_equal %q{3}, %q{
|
|||
yield
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
def iter2
|
||||
yield
|
||||
end
|
||||
|
||||
|
||||
iter1{
|
||||
jb = 2
|
||||
iter1{
|
||||
|
@ -154,11 +154,11 @@ assert_equal %q{2}, %q{
|
|||
yield
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
def iter2
|
||||
yield
|
||||
end
|
||||
|
||||
|
||||
iter1{
|
||||
jb = 2
|
||||
iter1{
|
||||
|
@ -226,11 +226,11 @@ assert_equal %q{[10, 20, 30, 40, nil, nil]}, %q{
|
|||
}
|
||||
assert_equal %q{[1]}, %q{
|
||||
$a = []
|
||||
|
||||
|
||||
def iter
|
||||
yield 1
|
||||
end
|
||||
|
||||
|
||||
def m
|
||||
x = iter{|x|
|
||||
$a << x
|
||||
|
@ -450,7 +450,7 @@ assert_equal 'ok', %q{
|
|||
end
|
||||
vs1 = []
|
||||
C.new.each {|*v| vs1 << v }
|
||||
vs2 = []
|
||||
vs2 = []
|
||||
C.new.to_enum.each {|*v| vs2 << v }
|
||||
vs1 == vs2 ? :ok : :ng
|
||||
}, '[ruby-dev:32329]'
|
||||
|
@ -468,9 +468,9 @@ assert_equal '[nil, []]', %q{
|
|||
def m() yield nil,[] end
|
||||
l = lambda {|*v| v}
|
||||
GC.stress=true
|
||||
r = m(&l)
|
||||
r = m(&l)
|
||||
GC.stress=false
|
||||
r.inspect
|
||||
r.inspect
|
||||
}, '[ruby-dev:32567]'
|
||||
|
||||
assert_equal NilClass.to_s, %q{
|
||||
|
|
|
@ -97,7 +97,7 @@ assert_equal %q{[#<RuntimeError: FOO>, #<RuntimeError: FOO>]}, %q{
|
|||
def m
|
||||
$!
|
||||
end
|
||||
|
||||
|
||||
begin
|
||||
begin
|
||||
raise "FOO"
|
||||
|
@ -205,11 +205,11 @@ assert_equal %q{3}, %q{
|
|||
assert_equal %q{ok3}, %q{
|
||||
class E1 < Exception
|
||||
end
|
||||
|
||||
|
||||
def m
|
||||
yield
|
||||
end
|
||||
|
||||
|
||||
begin
|
||||
begin
|
||||
begin
|
||||
|
@ -239,7 +239,7 @@ assert_equal %q{7}, %q{
|
|||
$i += 2
|
||||
break
|
||||
ensure
|
||||
|
||||
|
||||
end
|
||||
ensure
|
||||
$i += 4
|
||||
|
@ -247,7 +247,7 @@ assert_equal %q{7}, %q{
|
|||
$i = 0
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
def iter
|
||||
yield
|
||||
end
|
||||
|
@ -349,7 +349,7 @@ assert_equal %q{12}, %q{
|
|||
7+7
|
||||
end
|
||||
}
|
||||
assert_equal %q{ok}, %q{ #
|
||||
assert_equal %q{ok}, %q{ #
|
||||
proc{
|
||||
begin
|
||||
raise
|
||||
|
@ -376,7 +376,7 @@ assert_match /undefined method `foo\'/, %q{#`
|
|||
def inspect
|
||||
bar {}
|
||||
end
|
||||
|
||||
|
||||
def bar
|
||||
raise
|
||||
ensure
|
||||
|
|
|
@ -29,7 +29,7 @@ assert_equal %q{ok}, %q{
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
('a').lines.map{|e|
|
||||
break :ok
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ assert_equal %q{ok}, %q{
|
|||
def m
|
||||
yield
|
||||
end
|
||||
|
||||
|
||||
m{
|
||||
begin
|
||||
ensure
|
||||
|
@ -190,7 +190,7 @@ assert_equal %q{100}, %q{
|
|||
$i = 100
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def iter
|
||||
yield
|
||||
end
|
||||
|
@ -216,7 +216,7 @@ assert_equal %q{1}, %q{
|
|||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
m
|
||||
}
|
||||
assert_equal %q{1}, %q{
|
||||
|
@ -227,7 +227,7 @@ assert_equal %q{1}, %q{
|
|||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
m
|
||||
}
|
||||
assert_equal 'ok', %q{
|
||||
|
|
|
@ -914,7 +914,7 @@ assert_equal %q{[:ok, :ok, :ok, :ok, :ok, :ok, :ng, :ng]}, %q{
|
|||
|
||||
o1 = c1.new
|
||||
o2 = c2.new
|
||||
|
||||
|
||||
test{o1.m}
|
||||
test{o2.mm}
|
||||
test{o1.send :m}
|
||||
|
@ -1074,7 +1074,7 @@ assert_equal '[1, 2, [3, 4]]', %q{
|
|||
def regular(a, b, *c)
|
||||
[a, b, c]
|
||||
end
|
||||
regular(*[], 1, *[], *[2, 3], *[], 4)
|
||||
regular(*[], 1, *[], *[2, 3], *[], 4)
|
||||
}, '[ruby-core:19413]'
|
||||
|
||||
assert_equal '[1, [:foo, 3, 4, :foo]]', %q{
|
||||
|
@ -1093,7 +1093,7 @@ assert_equal '["B", "A"]', %q{
|
|||
end
|
||||
|
||||
class B < A
|
||||
define_method(:m) do
|
||||
define_method(:m) do
|
||||
['B', super()]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,11 +2,11 @@ assert_equal %q{[1, 2, 3]}, %q{
|
|||
def getproc &b
|
||||
b
|
||||
end
|
||||
|
||||
|
||||
def m
|
||||
yield
|
||||
end
|
||||
|
||||
|
||||
m{
|
||||
i = 1
|
||||
m{
|
||||
|
@ -24,14 +24,14 @@ assert_equal %q{7}, %q{
|
|||
def make_proc(&b)
|
||||
b
|
||||
end
|
||||
|
||||
|
||||
def make_closure
|
||||
a = 0
|
||||
make_proc{
|
||||
a+=1
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
cl = make_closure
|
||||
cl.call + cl.call * cl.call
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ assert_equal %q{ok}, %q{
|
|||
:ok
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def block
|
||||
C.method(:new).to_proc
|
||||
end
|
||||
|
@ -52,7 +52,7 @@ assert_equal %q{[0, 1, :last, 0, 2, :last]}, %q{
|
|||
def proc &b
|
||||
b
|
||||
end
|
||||
|
||||
|
||||
pr = []
|
||||
proc{|i_b|
|
||||
p3 = proc{|j_b|
|
||||
|
@ -63,18 +63,18 @@ assert_equal %q{[0, 1, :last, 0, 2, :last]}, %q{
|
|||
p3.call(1)
|
||||
p3.call(2)
|
||||
}.call(0)
|
||||
|
||||
|
||||
pr[0].call(:last).concat pr[1].call(:last)
|
||||
}
|
||||
assert_equal %q{12}, %q{
|
||||
def iter
|
||||
yield
|
||||
end
|
||||
|
||||
|
||||
def getproc &b
|
||||
b
|
||||
end
|
||||
|
||||
|
||||
iter{
|
||||
bvar = 3
|
||||
getproc{
|
||||
|
@ -87,11 +87,11 @@ assert_equal %q{200}, %q{
|
|||
def iter
|
||||
yield
|
||||
end
|
||||
|
||||
|
||||
def getproc &b
|
||||
b
|
||||
end
|
||||
|
||||
|
||||
loc1 = 0
|
||||
pr1 = iter{
|
||||
bl1 = 1
|
||||
|
@ -101,7 +101,7 @@ assert_equal %q{200}, %q{
|
|||
loc1 + bl1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pr2 = iter{
|
||||
bl1 = 1
|
||||
getproc{
|
||||
|
@ -110,7 +110,7 @@ assert_equal %q{200}, %q{
|
|||
loc1 + bl1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pr1.call; pr2.call
|
||||
pr1.call; pr2.call
|
||||
pr1.call; pr2.call
|
||||
|
@ -120,21 +120,21 @@ assert_equal %q{[1, 2]}, %q{
|
|||
def proc(&pr)
|
||||
pr
|
||||
end
|
||||
|
||||
|
||||
def m
|
||||
a = 1
|
||||
m2{
|
||||
a
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
def m2
|
||||
b = 2
|
||||
proc{
|
||||
[yield, b]
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
pr = m
|
||||
x = ['a', 1,2,3,4,5,6,7,8,9,0,
|
||||
1,2,3,4,5,6,7,8,9,0,
|
||||
|
@ -147,14 +147,14 @@ assert_equal %q{1}, %q{
|
|||
def proc(&pr)
|
||||
pr
|
||||
end
|
||||
|
||||
|
||||
def m
|
||||
a = 1
|
||||
m2{
|
||||
a
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
def m2
|
||||
b = 2
|
||||
proc{
|
||||
|
|
|
@ -110,7 +110,7 @@ assert_equal %q{100}, %q{
|
|||
end
|
||||
return arg
|
||||
end
|
||||
|
||||
|
||||
test(100)
|
||||
}
|
||||
assert_equal %q{ok}, %q{
|
||||
|
@ -169,7 +169,7 @@ assert_equal %q{[:false, :false, :false, :false, :false, :false, :false, :false,
|
|||
res
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def each_test
|
||||
conds = make_perm(['fv', 'tv'], 3)
|
||||
bangs = make_perm(['', '!'], 3)
|
||||
|
@ -184,10 +184,10 @@ assert_equal %q{[:false, :false, :false, :false, :false, :false, :false, :false,
|
|||
}
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
fv = false
|
||||
tv = true
|
||||
|
||||
|
||||
$ans = []
|
||||
each_test{|syn, conds, bangs, exprs|
|
||||
c1, c2, c3 = conds
|
||||
|
@ -695,7 +695,7 @@ assert_equal 'ok', %q{
|
|||
while true
|
||||
counter -= 1
|
||||
break if counter == 0
|
||||
next
|
||||
next
|
||||
redo
|
||||
end
|
||||
:ok
|
||||
|
@ -706,7 +706,7 @@ assert_equal 'ok', %q{
|
|||
while true
|
||||
counter -= 1
|
||||
break if counter == 0
|
||||
next
|
||||
next
|
||||
"#{ redo }"
|
||||
end
|
||||
:ok
|
||||
|
|
|
@ -183,7 +183,7 @@ h3, h4, h5, h6 {
|
|||
CSS
|
||||
|
||||
XHTML_PREAMBLE = %{<?xml version="1.0" encoding="%charset%"?>
|
||||
<!DOCTYPE html
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
}
|
||||
|
@ -510,7 +510,7 @@ FILE_INDEX = XHTML_PREAMBLE + <<HTML
|
|||
<!--
|
||||
body {
|
||||
background-color: #EEE;
|
||||
font-family: #{FONTS};
|
||||
font-family: #{FONTS};
|
||||
color: #000;
|
||||
margin: 0px;
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
},
|
||||
{ /* S1 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -125,7 +125,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F
|
||||
},
|
||||
{ /* S2 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
|
@ -260,7 +260,7 @@ big5_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end,
|
|||
p++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
len = enclen(enc, p, end);
|
||||
if (p + len > s) return (UChar* )p;
|
||||
|
|
|
@ -90,7 +90,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
},
|
||||
{ /* S1 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -108,7 +108,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F
|
||||
}
|
||||
};
|
||||
#undef A
|
||||
|
@ -179,7 +179,7 @@ cp949_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end
|
|||
p++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
len = enclen(enc, p, end);
|
||||
if (p + len > s) return (UChar* )p;
|
||||
|
|
|
@ -103,7 +103,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A
|
||||
},
|
||||
{ /* S2 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -121,7 +121,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
},
|
||||
{ /* S3 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
|
|
@ -71,7 +71,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
},
|
||||
{ /* S1 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -89,7 +89,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F
|
||||
},
|
||||
{ /* S2 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -107,7 +107,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
},
|
||||
|
||||
};
|
||||
|
@ -192,7 +192,7 @@ code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
|
|||
#if 1
|
||||
if (enclen(enc, buf, p) != (p - buf))
|
||||
return ONIGERR_INVALID_CODE_POINT_VALUE;
|
||||
#endif
|
||||
#endif
|
||||
return (int)(p - buf);
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
},
|
||||
{ /* S1 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -86,7 +86,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F
|
||||
}
|
||||
};
|
||||
#undef A
|
||||
|
|
|
@ -68,7 +68,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
},
|
||||
{ /* S1 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -86,7 +86,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F
|
||||
},
|
||||
{ /* S2 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -104,7 +104,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
},
|
||||
{ /* S3 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -122,7 +122,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
}
|
||||
};
|
||||
#undef A
|
||||
|
|
|
@ -82,7 +82,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
},
|
||||
{ /* S1 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -100,7 +100,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F
|
||||
},
|
||||
{ /* S2 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -118,7 +118,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||||
/* d */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||||
/* e */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||||
/* f */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, F
|
||||
/* f */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, F
|
||||
},
|
||||
{ /* S3 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -136,7 +136,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
}
|
||||
};
|
||||
#undef A
|
||||
|
|
|
@ -90,7 +90,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F
|
||||
},
|
||||
{ /* S1 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -108,7 +108,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F
|
||||
/* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F
|
||||
}
|
||||
};
|
||||
#undef A
|
||||
|
@ -179,7 +179,7 @@ gbk_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end,
|
|||
p++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
len = enclen(enc, p, end);
|
||||
if (p + len > s) return (UChar* )p;
|
||||
|
|
|
@ -208,7 +208,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag,
|
|||
const UChar** pp, const UChar* end)
|
||||
{
|
||||
return onigenc_mbn_is_mbc_ambiguous(enc, flag, pp, end);
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -243,7 +243,7 @@ left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, Onig
|
|||
p++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
len = enclen(enc, p, end);
|
||||
if (p + len > s) return (UChar* )p;
|
||||
|
|
|
@ -2244,7 +2244,7 @@ onigenc_unicode_mbc_case_fold(OnigEncoding enc,
|
|||
|
||||
if (onig_st_lookup(FoldTable, (st_data_t )code, (void* )&to) != 0) {
|
||||
if (to->n == 1) {
|
||||
return ONIGENC_CODE_TO_MBC(enc, to->code[0], fold);
|
||||
return ONIGENC_CODE_TO_MBC(enc, to->code[0], fold);
|
||||
}
|
||||
#if 0
|
||||
/* NO NEEDS TO CHECK */
|
||||
|
@ -2350,7 +2350,7 @@ onigenc_unicode_apply_all_case_fold(OnigCaseFoldType flag,
|
|||
for (j = 0; j < CaseUnfold_12[i].to.n; j++) {
|
||||
r = (*f)(CaseUnfold_12[i].to.code[j],
|
||||
(OnigCodePoint* )CaseUnfold_12[i].from, 2, arg);
|
||||
if (r != 0) return r;
|
||||
if (r != 0) return r;
|
||||
|
||||
for (k = 0; k < CaseUnfold_12[i].to.n; k++) {
|
||||
if (k == j) continue;
|
||||
|
@ -2369,7 +2369,7 @@ onigenc_unicode_apply_all_case_fold(OnigCaseFoldType flag,
|
|||
for (j = 0; j < CaseUnfold_12_Locale[i].to.n; j++) {
|
||||
r = (*f)(CaseUnfold_12_Locale[i].to.code[j],
|
||||
(OnigCodePoint* )CaseUnfold_12_Locale[i].from, 2, arg);
|
||||
if (r != 0) return r;
|
||||
if (r != 0) return r;
|
||||
|
||||
for (k = 0; k < CaseUnfold_12_Locale[i].to.n; k++) {
|
||||
if (k == j) continue;
|
||||
|
@ -2389,7 +2389,7 @@ onigenc_unicode_apply_all_case_fold(OnigCaseFoldType flag,
|
|||
for (j = 0; j < CaseUnfold_13[i].to.n; j++) {
|
||||
r = (*f)(CaseUnfold_13[i].to.code[j],
|
||||
(OnigCodePoint* )CaseUnfold_13[i].from, 3, arg);
|
||||
if (r != 0) return r;
|
||||
if (r != 0) return r;
|
||||
|
||||
for (k = 0; k < CaseUnfold_13[i].to.n; k++) {
|
||||
if (k == j) continue;
|
||||
|
|
16
enc/utf_8.c
16
enc/utf_8.c
|
@ -84,7 +84,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ F, F, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* e */ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3,
|
||||
/* f */ 5, 6, 6, 6, 7, F, F, F, F, F, F, F, F, F, F, F
|
||||
/* f */ 5, 6, 6, 6, 7, F, F, F, F, F, F, F, F, F, F, F
|
||||
},
|
||||
{ /* S1 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -102,7 +102,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
},
|
||||
{ /* S2 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -120,7 +120,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
},
|
||||
{ /* S3 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -138,7 +138,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
},
|
||||
{ /* S4 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -156,7 +156,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
},
|
||||
{ /* S5 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -174,7 +174,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
},
|
||||
{ /* S6 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -192,7 +192,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
},
|
||||
{ /* S7 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
/* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
|
@ -210,7 +210,7 @@ static const signed char trans[][0x100] = {
|
|||
/* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
/* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
|
||||
},
|
||||
};
|
||||
#undef A
|
||||
|
|
2
enum.c
2
enum.c
|
@ -1668,7 +1668,7 @@ enum_each_with_index(int argc, VALUE *argv, VALUE obj)
|
|||
* (1..3).reverse_each {|v| p v }
|
||||
*
|
||||
* produces:
|
||||
*
|
||||
*
|
||||
* 3
|
||||
* 2
|
||||
* 1
|
||||
|
|
|
@ -4645,9 +4645,9 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
|
|||
/* so the representation used (in y->frac) is an array of BDIGIT, where
|
||||
each BDIGIT contains a value between 0 and BASE-1, consisting of BASE_FIG
|
||||
decimal places.
|
||||
|
||||
|
||||
(that numbers of decimal places are typed as ssize_t is somewhat confusing)
|
||||
|
||||
|
||||
nf is now position (in decimal places) of the digit from the start of
|
||||
the array.
|
||||
ix is the position (in BDIGITS) of the BDIGIT containing the decimal digit,
|
||||
|
@ -4666,7 +4666,7 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
|
|||
|
||||
fracf = (v % (shifter * 10) > 0);
|
||||
fracf_1further = ((v % shifter) > 0);
|
||||
|
||||
|
||||
v /= shifter;
|
||||
div = v / 10;
|
||||
v = v - div*10;
|
||||
|
@ -4687,12 +4687,12 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* now fracf = does any positive digit exist under the rounding position?
|
||||
now fracf_1further = does any positive digit exist under one further than the
|
||||
rounding position?
|
||||
now v = the first digit under the rounding position */
|
||||
|
||||
|
||||
/* drop digits after pointed digit */
|
||||
memset(y->frac+ix+1, 0, (y->Prec - (ix+1)) * sizeof(BDIGIT));
|
||||
|
||||
|
|
|
@ -905,7 +905,7 @@ n2i(const char *s, long f, long w)
|
|||
{
|
||||
long e, i;
|
||||
int v;
|
||||
|
||||
|
||||
e = f + w;
|
||||
v = 0;
|
||||
for (i = f; i < e; i++) {
|
||||
|
|
|
@ -18,9 +18,9 @@ static ID i_to_s, i_to_json, i_new, i_indent, i_space, i_space_before,
|
|||
|
||||
/*
|
||||
* Copyright 2001-2004 Unicode, Inc.
|
||||
*
|
||||
*
|
||||
* Disclaimer
|
||||
*
|
||||
*
|
||||
* This source code is provided as is by Unicode, Inc. No claims are
|
||||
* made as to fitness for any particular purpose. No warranties of any
|
||||
* kind are expressed or implied. The recipient agrees to determine
|
||||
|
@ -28,9 +28,9 @@ static ID i_to_s, i_to_json, i_new, i_indent, i_space, i_space_before,
|
|||
* purchased on magnetic or optical media from Unicode, Inc., the
|
||||
* sole remedy for any claim will be exchange of defective media
|
||||
* within 90 days of receipt.
|
||||
*
|
||||
*
|
||||
* Limitations on Rights to Redistribute This Code
|
||||
*
|
||||
*
|
||||
* Unicode, Inc. hereby grants the right to freely use the information
|
||||
* supplied in this file in the creation of products supporting the
|
||||
* Unicode Standard, and to make copies of this file in any form
|
||||
|
@ -61,7 +61,7 @@ static const char trailingBytesForUTF8[256] = {
|
|||
* This table contains as many values as there might be trailing bytes
|
||||
* in a UTF-8 sequence.
|
||||
*/
|
||||
static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL,
|
||||
static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL,
|
||||
0x03C82080UL, 0xFA082080UL, 0x82082080UL };
|
||||
|
||||
/*
|
||||
|
@ -399,7 +399,7 @@ static FBuffer *fbuffer_dup(FBuffer *fb)
|
|||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Document-module: JSON::Ext::Generator
|
||||
*
|
||||
* This is the JSON generator implemented as a C extension. It can be
|
||||
|
@ -979,7 +979,7 @@ static VALUE cState_generate(VALUE self, VALUE obj)
|
|||
* * *indent*: a string used to indent levels (default: ''),
|
||||
* * *space*: a string that is put after, a : or , delimiter (default: ''),
|
||||
* * *space_before*: a string that is put before a : pair delimiter (default: ''),
|
||||
* * *object_nl*: a string that is put at the end of a JSON object (default: ''),
|
||||
* * *object_nl*: a string that is put at the end of a JSON object (default: ''),
|
||||
* * *array_nl*: a string that is put at the end of a JSON array (default: ''),
|
||||
* * *allow_nan*: true if NaN, Infinity, and -Infinity should be
|
||||
* generated, otherwise an exception is thrown, if these values are
|
||||
|
|
|
@ -185,7 +185,7 @@ module JSON
|
|||
# * *indent*: a string used to indent levels (default: ''),
|
||||
# * *space*: a string that is put after, a : or , delimiter (default: ''),
|
||||
# * *space_before*: a string that is put before a : pair delimiter (default: ''),
|
||||
# * *object_nl*: a string that is put at the end of a JSON object (default: ''),
|
||||
# * *object_nl*: a string that is put at the end of a JSON object (default: ''),
|
||||
# * *array_nl*: a string that is put at the end of a JSON array (default: ''),
|
||||
# * *allow_nan*: true if NaN, Infinity, and -Infinity should be
|
||||
# generated, otherwise an exception is thrown, if these values are
|
||||
|
|
|
@ -109,14 +109,14 @@ static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *resu
|
|||
|
||||
*result = NIL_P(object_class) ? rb_hash_new() : rb_class_new_instance(0, 0, object_class);
|
||||
|
||||
|
||||
|
||||
#line 114 "parser.c"
|
||||
{
|
||||
cs = JSON_object_start;
|
||||
}
|
||||
|
||||
#line 159 "parser.rl"
|
||||
|
||||
|
||||
#line 121 "parser.c"
|
||||
{
|
||||
if ( p == pe )
|
||||
|
@ -404,32 +404,32 @@ case 26:
|
|||
goto st2;
|
||||
goto st26;
|
||||
}
|
||||
_test_eof2: cs = 2; goto _test_eof;
|
||||
_test_eof3: cs = 3; goto _test_eof;
|
||||
_test_eof4: cs = 4; goto _test_eof;
|
||||
_test_eof5: cs = 5; goto _test_eof;
|
||||
_test_eof6: cs = 6; goto _test_eof;
|
||||
_test_eof7: cs = 7; goto _test_eof;
|
||||
_test_eof8: cs = 8; goto _test_eof;
|
||||
_test_eof9: cs = 9; goto _test_eof;
|
||||
_test_eof10: cs = 10; goto _test_eof;
|
||||
_test_eof11: cs = 11; goto _test_eof;
|
||||
_test_eof12: cs = 12; goto _test_eof;
|
||||
_test_eof13: cs = 13; goto _test_eof;
|
||||
_test_eof14: cs = 14; goto _test_eof;
|
||||
_test_eof15: cs = 15; goto _test_eof;
|
||||
_test_eof16: cs = 16; goto _test_eof;
|
||||
_test_eof17: cs = 17; goto _test_eof;
|
||||
_test_eof18: cs = 18; goto _test_eof;
|
||||
_test_eof27: cs = 27; goto _test_eof;
|
||||
_test_eof19: cs = 19; goto _test_eof;
|
||||
_test_eof20: cs = 20; goto _test_eof;
|
||||
_test_eof21: cs = 21; goto _test_eof;
|
||||
_test_eof22: cs = 22; goto _test_eof;
|
||||
_test_eof23: cs = 23; goto _test_eof;
|
||||
_test_eof24: cs = 24; goto _test_eof;
|
||||
_test_eof25: cs = 25; goto _test_eof;
|
||||
_test_eof26: cs = 26; goto _test_eof;
|
||||
_test_eof2: cs = 2; goto _test_eof;
|
||||
_test_eof3: cs = 3; goto _test_eof;
|
||||
_test_eof4: cs = 4; goto _test_eof;
|
||||
_test_eof5: cs = 5; goto _test_eof;
|
||||
_test_eof6: cs = 6; goto _test_eof;
|
||||
_test_eof7: cs = 7; goto _test_eof;
|
||||
_test_eof8: cs = 8; goto _test_eof;
|
||||
_test_eof9: cs = 9; goto _test_eof;
|
||||
_test_eof10: cs = 10; goto _test_eof;
|
||||
_test_eof11: cs = 11; goto _test_eof;
|
||||
_test_eof12: cs = 12; goto _test_eof;
|
||||
_test_eof13: cs = 13; goto _test_eof;
|
||||
_test_eof14: cs = 14; goto _test_eof;
|
||||
_test_eof15: cs = 15; goto _test_eof;
|
||||
_test_eof16: cs = 16; goto _test_eof;
|
||||
_test_eof17: cs = 17; goto _test_eof;
|
||||
_test_eof18: cs = 18; goto _test_eof;
|
||||
_test_eof27: cs = 27; goto _test_eof;
|
||||
_test_eof19: cs = 19; goto _test_eof;
|
||||
_test_eof20: cs = 20; goto _test_eof;
|
||||
_test_eof21: cs = 21; goto _test_eof;
|
||||
_test_eof22: cs = 22; goto _test_eof;
|
||||
_test_eof23: cs = 23; goto _test_eof;
|
||||
_test_eof24: cs = 24; goto _test_eof;
|
||||
_test_eof25: cs = 25; goto _test_eof;
|
||||
_test_eof26: cs = 26; goto _test_eof;
|
||||
|
||||
_test_eof: {}
|
||||
_out: {}
|
||||
|
@ -469,14 +469,14 @@ static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *resul
|
|||
{
|
||||
int cs = EVIL;
|
||||
|
||||
|
||||
|
||||
#line 474 "parser.c"
|
||||
{
|
||||
cs = JSON_value_start;
|
||||
}
|
||||
|
||||
#line 265 "parser.rl"
|
||||
|
||||
|
||||
#line 481 "parser.c"
|
||||
{
|
||||
if ( p == pe )
|
||||
|
@ -728,26 +728,26 @@ case 20:
|
|||
goto tr28;
|
||||
goto st0;
|
||||
}
|
||||
_test_eof21: cs = 21; goto _test_eof;
|
||||
_test_eof2: cs = 2; goto _test_eof;
|
||||
_test_eof3: cs = 3; goto _test_eof;
|
||||
_test_eof4: cs = 4; goto _test_eof;
|
||||
_test_eof5: cs = 5; goto _test_eof;
|
||||
_test_eof6: cs = 6; goto _test_eof;
|
||||
_test_eof7: cs = 7; goto _test_eof;
|
||||
_test_eof8: cs = 8; goto _test_eof;
|
||||
_test_eof9: cs = 9; goto _test_eof;
|
||||
_test_eof10: cs = 10; goto _test_eof;
|
||||
_test_eof11: cs = 11; goto _test_eof;
|
||||
_test_eof12: cs = 12; goto _test_eof;
|
||||
_test_eof13: cs = 13; goto _test_eof;
|
||||
_test_eof14: cs = 14; goto _test_eof;
|
||||
_test_eof15: cs = 15; goto _test_eof;
|
||||
_test_eof16: cs = 16; goto _test_eof;
|
||||
_test_eof17: cs = 17; goto _test_eof;
|
||||
_test_eof18: cs = 18; goto _test_eof;
|
||||
_test_eof19: cs = 19; goto _test_eof;
|
||||
_test_eof20: cs = 20; goto _test_eof;
|
||||
_test_eof21: cs = 21; goto _test_eof;
|
||||
_test_eof2: cs = 2; goto _test_eof;
|
||||
_test_eof3: cs = 3; goto _test_eof;
|
||||
_test_eof4: cs = 4; goto _test_eof;
|
||||
_test_eof5: cs = 5; goto _test_eof;
|
||||
_test_eof6: cs = 6; goto _test_eof;
|
||||
_test_eof7: cs = 7; goto _test_eof;
|
||||
_test_eof8: cs = 8; goto _test_eof;
|
||||
_test_eof9: cs = 9; goto _test_eof;
|
||||
_test_eof10: cs = 10; goto _test_eof;
|
||||
_test_eof11: cs = 11; goto _test_eof;
|
||||
_test_eof12: cs = 12; goto _test_eof;
|
||||
_test_eof13: cs = 13; goto _test_eof;
|
||||
_test_eof14: cs = 14; goto _test_eof;
|
||||
_test_eof15: cs = 15; goto _test_eof;
|
||||
_test_eof16: cs = 16; goto _test_eof;
|
||||
_test_eof17: cs = 17; goto _test_eof;
|
||||
_test_eof18: cs = 18; goto _test_eof;
|
||||
_test_eof19: cs = 19; goto _test_eof;
|
||||
_test_eof20: cs = 20; goto _test_eof;
|
||||
|
||||
_test_eof: {}
|
||||
_out: {}
|
||||
|
@ -778,7 +778,7 @@ static char *JSON_parse_integer(JSON_Parser *json, char *p, char *pe, VALUE *res
|
|||
{
|
||||
int cs = EVIL;
|
||||
|
||||
|
||||
|
||||
#line 783 "parser.c"
|
||||
{
|
||||
cs = JSON_integer_start;
|
||||
|
@ -786,7 +786,7 @@ static char *JSON_parse_integer(JSON_Parser *json, char *p, char *pe, VALUE *res
|
|||
|
||||
#line 289 "parser.rl"
|
||||
json->memo = p;
|
||||
|
||||
|
||||
#line 791 "parser.c"
|
||||
{
|
||||
if ( p == pe )
|
||||
|
@ -838,10 +838,10 @@ case 4:
|
|||
goto st4;
|
||||
goto tr4;
|
||||
}
|
||||
_test_eof2: cs = 2; goto _test_eof;
|
||||
_test_eof3: cs = 3; goto _test_eof;
|
||||
_test_eof5: cs = 5; goto _test_eof;
|
||||
_test_eof4: cs = 4; goto _test_eof;
|
||||
_test_eof2: cs = 2; goto _test_eof;
|
||||
_test_eof3: cs = 3; goto _test_eof;
|
||||
_test_eof5: cs = 5; goto _test_eof;
|
||||
_test_eof4: cs = 4; goto _test_eof;
|
||||
|
||||
_test_eof: {}
|
||||
_out: {}
|
||||
|
@ -874,7 +874,7 @@ static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *resul
|
|||
{
|
||||
int cs = EVIL;
|
||||
|
||||
|
||||
|
||||
#line 879 "parser.c"
|
||||
{
|
||||
cs = JSON_float_start;
|
||||
|
@ -882,7 +882,7 @@ static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *resul
|
|||
|
||||
#line 320 "parser.rl"
|
||||
json->memo = p;
|
||||
|
||||
|
||||
#line 887 "parser.c"
|
||||
{
|
||||
if ( p == pe )
|
||||
|
@ -995,15 +995,15 @@ case 9:
|
|||
goto st9;
|
||||
goto st0;
|
||||
}
|
||||
_test_eof2: cs = 2; goto _test_eof;
|
||||
_test_eof3: cs = 3; goto _test_eof;
|
||||
_test_eof4: cs = 4; goto _test_eof;
|
||||
_test_eof5: cs = 5; goto _test_eof;
|
||||
_test_eof10: cs = 10; goto _test_eof;
|
||||
_test_eof6: cs = 6; goto _test_eof;
|
||||
_test_eof7: cs = 7; goto _test_eof;
|
||||
_test_eof8: cs = 8; goto _test_eof;
|
||||
_test_eof9: cs = 9; goto _test_eof;
|
||||
_test_eof2: cs = 2; goto _test_eof;
|
||||
_test_eof3: cs = 3; goto _test_eof;
|
||||
_test_eof4: cs = 4; goto _test_eof;
|
||||
_test_eof5: cs = 5; goto _test_eof;
|
||||
_test_eof10: cs = 10; goto _test_eof;
|
||||
_test_eof6: cs = 6; goto _test_eof;
|
||||
_test_eof7: cs = 7; goto _test_eof;
|
||||
_test_eof8: cs = 8; goto _test_eof;
|
||||
_test_eof9: cs = 9; goto _test_eof;
|
||||
|
||||
_test_eof: {}
|
||||
_out: {}
|
||||
|
@ -1043,14 +1043,14 @@ static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *resul
|
|||
}
|
||||
*result = NIL_P(array_class) ? rb_ary_new() : rb_class_new_instance(0, 0, array_class);
|
||||
|
||||
|
||||
|
||||
#line 1048 "parser.c"
|
||||
{
|
||||
cs = JSON_array_start;
|
||||
}
|
||||
|
||||
#line 371 "parser.rl"
|
||||
|
||||
|
||||
#line 1055 "parser.c"
|
||||
{
|
||||
if ( p == pe )
|
||||
|
@ -1248,22 +1248,22 @@ case 16:
|
|||
goto st2;
|
||||
goto st16;
|
||||
}
|
||||
_test_eof2: cs = 2; goto _test_eof;
|
||||
_test_eof3: cs = 3; goto _test_eof;
|
||||
_test_eof4: cs = 4; goto _test_eof;
|
||||
_test_eof5: cs = 5; goto _test_eof;
|
||||
_test_eof6: cs = 6; goto _test_eof;
|
||||
_test_eof7: cs = 7; goto _test_eof;
|
||||
_test_eof8: cs = 8; goto _test_eof;
|
||||
_test_eof9: cs = 9; goto _test_eof;
|
||||
_test_eof10: cs = 10; goto _test_eof;
|
||||
_test_eof11: cs = 11; goto _test_eof;
|
||||
_test_eof12: cs = 12; goto _test_eof;
|
||||
_test_eof17: cs = 17; goto _test_eof;
|
||||
_test_eof13: cs = 13; goto _test_eof;
|
||||
_test_eof14: cs = 14; goto _test_eof;
|
||||
_test_eof15: cs = 15; goto _test_eof;
|
||||
_test_eof16: cs = 16; goto _test_eof;
|
||||
_test_eof2: cs = 2; goto _test_eof;
|
||||
_test_eof3: cs = 3; goto _test_eof;
|
||||
_test_eof4: cs = 4; goto _test_eof;
|
||||
_test_eof5: cs = 5; goto _test_eof;
|
||||
_test_eof6: cs = 6; goto _test_eof;
|
||||
_test_eof7: cs = 7; goto _test_eof;
|
||||
_test_eof8: cs = 8; goto _test_eof;
|
||||
_test_eof9: cs = 9; goto _test_eof;
|
||||
_test_eof10: cs = 10; goto _test_eof;
|
||||
_test_eof11: cs = 11; goto _test_eof;
|
||||
_test_eof12: cs = 12; goto _test_eof;
|
||||
_test_eof17: cs = 17; goto _test_eof;
|
||||
_test_eof13: cs = 13; goto _test_eof;
|
||||
_test_eof14: cs = 14; goto _test_eof;
|
||||
_test_eof15: cs = 15; goto _test_eof;
|
||||
_test_eof16: cs = 16; goto _test_eof;
|
||||
|
||||
_test_eof: {}
|
||||
_out: {}
|
||||
|
@ -1366,7 +1366,7 @@ static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *resu
|
|||
int cs = EVIL;
|
||||
|
||||
*result = rb_str_buf_new(0);
|
||||
|
||||
|
||||
#line 1371 "parser.c"
|
||||
{
|
||||
cs = JSON_string_start;
|
||||
|
@ -1374,7 +1374,7 @@ static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *resu
|
|||
|
||||
#line 479 "parser.rl"
|
||||
json->memo = p;
|
||||
|
||||
|
||||
#line 1379 "parser.c"
|
||||
{
|
||||
if ( p == pe )
|
||||
|
@ -1482,13 +1482,13 @@ case 7:
|
|||
goto st2;
|
||||
goto st0;
|
||||
}
|
||||
_test_eof2: cs = 2; goto _test_eof;
|
||||
_test_eof8: cs = 8; goto _test_eof;
|
||||
_test_eof3: cs = 3; goto _test_eof;
|
||||
_test_eof4: cs = 4; goto _test_eof;
|
||||
_test_eof5: cs = 5; goto _test_eof;
|
||||
_test_eof6: cs = 6; goto _test_eof;
|
||||
_test_eof7: cs = 7; goto _test_eof;
|
||||
_test_eof2: cs = 2; goto _test_eof;
|
||||
_test_eof8: cs = 8; goto _test_eof;
|
||||
_test_eof3: cs = 3; goto _test_eof;
|
||||
_test_eof4: cs = 4; goto _test_eof;
|
||||
_test_eof5: cs = 5; goto _test_eof;
|
||||
_test_eof6: cs = 6; goto _test_eof;
|
||||
_test_eof7: cs = 7; goto _test_eof;
|
||||
|
||||
_test_eof: {}
|
||||
_out: {}
|
||||
|
@ -1701,7 +1701,7 @@ static VALUE cParser_parse(VALUE self)
|
|||
VALUE result = Qnil;
|
||||
GET_PARSER;
|
||||
|
||||
|
||||
|
||||
#line 1706 "parser.c"
|
||||
{
|
||||
cs = JSON_start;
|
||||
|
@ -1710,7 +1710,7 @@ static VALUE cParser_parse(VALUE self)
|
|||
#line 703 "parser.rl"
|
||||
p = json->source;
|
||||
pe = p + json->len;
|
||||
|
||||
|
||||
#line 1715 "parser.c"
|
||||
{
|
||||
if ( p == pe )
|
||||
|
@ -1830,16 +1830,16 @@ case 9:
|
|||
goto st10;
|
||||
goto st9;
|
||||
}
|
||||
_test_eof1: cs = 1; goto _test_eof;
|
||||
_test_eof2: cs = 2; goto _test_eof;
|
||||
_test_eof3: cs = 3; goto _test_eof;
|
||||
_test_eof4: cs = 4; goto _test_eof;
|
||||
_test_eof5: cs = 5; goto _test_eof;
|
||||
_test_eof10: cs = 10; goto _test_eof;
|
||||
_test_eof6: cs = 6; goto _test_eof;
|
||||
_test_eof7: cs = 7; goto _test_eof;
|
||||
_test_eof8: cs = 8; goto _test_eof;
|
||||
_test_eof9: cs = 9; goto _test_eof;
|
||||
_test_eof1: cs = 1; goto _test_eof;
|
||||
_test_eof2: cs = 2; goto _test_eof;
|
||||
_test_eof3: cs = 3; goto _test_eof;
|
||||
_test_eof4: cs = 4; goto _test_eof;
|
||||
_test_eof5: cs = 5; goto _test_eof;
|
||||
_test_eof10: cs = 10; goto _test_eof;
|
||||
_test_eof6: cs = 6; goto _test_eof;
|
||||
_test_eof7: cs = 7; goto _test_eof;
|
||||
_test_eof8: cs = 8; goto _test_eof;
|
||||
_test_eof9: cs = 9; goto _test_eof;
|
||||
|
||||
_test_eof: {}
|
||||
_out: {}
|
||||
|
|
|
@ -821,7 +821,7 @@ nkf_buf_new(int length)
|
|||
buf->capa = length;
|
||||
buf->len = 0;
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
|
@ -5874,7 +5874,7 @@ finished:
|
|||
|
||||
/*
|
||||
* int options(unsigned char *cp)
|
||||
*
|
||||
*
|
||||
* return values:
|
||||
* 0: success
|
||||
* -1: ArgumentError
|
||||
|
|
|
@ -845,7 +845,7 @@ ossl_asn1_decode0(unsigned char **pp, long length, long *offset, long depth,
|
|||
ossl_asn1_set_infinite_length(asn1data, Qtrue);
|
||||
else
|
||||
ossl_asn1_set_infinite_length(asn1data, Qfalse);
|
||||
|
||||
|
||||
rb_ary_push(ary, asn1data);
|
||||
length -= len;
|
||||
if(once) break;
|
||||
|
|
|
@ -108,7 +108,7 @@ struct {
|
|||
OSSL_SSL_METHOD_ENTRY(TLSv1_server),
|
||||
OSSL_SSL_METHOD_ENTRY(TLSv1_client),
|
||||
#if defined(HAVE_SSLV2_METHOD) && defined(HAVE_SSLV2_SERVER_METHOD) && \
|
||||
defined(HAVE_SSLV2_CLIENT_METHOD)
|
||||
defined(HAVE_SSLV2_CLIENT_METHOD)
|
||||
OSSL_SSL_METHOD_ENTRY(SSLv2),
|
||||
OSSL_SSL_METHOD_ENTRY(SSLv2_server),
|
||||
OSSL_SSL_METHOD_ENTRY(SSLv2_client),
|
||||
|
|
|
@ -170,7 +170,7 @@ path_sub(int argc, VALUE *argv, VALUE self)
|
|||
/*
|
||||
* Return a pathname which the extension of the basename is substituted by
|
||||
* <i>repl</i>.
|
||||
*
|
||||
*
|
||||
* If self has no extension part, <i>repl</i> is appended.
|
||||
*/
|
||||
static VALUE
|
||||
|
@ -220,7 +220,7 @@ path_realpath(int argc, VALUE *argv, VALUE self)
|
|||
/*
|
||||
* Returns the real (absolute) pathname of +self+ in the actual filesystem.
|
||||
* The real pathname doesn't contain symlinks or useless dots.
|
||||
*
|
||||
*
|
||||
* The last component of the real pathname can be nonexistent.
|
||||
*/
|
||||
static VALUE
|
||||
|
@ -239,10 +239,10 @@ path_realdirpath(int argc, VALUE *argv, VALUE self)
|
|||
* pathname.each_line(limit [, open_args]) {|line| block } -> nil
|
||||
* pathname.each_line(sep, limit [, open_args]) {|line| block } -> nil
|
||||
* pathname.each_line(...) -> an_enumerator
|
||||
*
|
||||
*
|
||||
* #each_line iterates over the line in the file. It yields a String object
|
||||
* for each line.
|
||||
*
|
||||
*
|
||||
* This method is availabel since 1.8.1.
|
||||
*/
|
||||
static VALUE
|
||||
|
@ -265,7 +265,7 @@ path_each_line(int argc, VALUE *argv, VALUE self)
|
|||
* call-seq:
|
||||
* pathname.read([length [, offset]]) -> string
|
||||
* pathname.read([length [, offset]], open_args) -> string
|
||||
*
|
||||
*
|
||||
* See <tt>IO.read</tt>. Returns all data from the file, or the first +N+ bytes
|
||||
* if specified.
|
||||
*
|
||||
|
@ -284,7 +284,7 @@ path_read(int argc, VALUE *argv, VALUE self)
|
|||
/*
|
||||
* call-seq:
|
||||
* pathname.binread([length [, offset]]) -> string
|
||||
*
|
||||
*
|
||||
* See <tt>IO.binread</tt>. Returns all the bytes from the file, or the first +N+
|
||||
* if specified.
|
||||
*
|
||||
|
@ -305,7 +305,7 @@ path_binread(int argc, VALUE *argv, VALUE self)
|
|||
* pathname.readlines(sep=$/ [, open_args]) -> array
|
||||
* pathname.readlines(limit [, open_args]) -> array
|
||||
* pathname.readlines(sep, limit [, open_args]) -> array
|
||||
*
|
||||
*
|
||||
* See <tt>IO.readlines</tt>. Returns all the lines from the file.
|
||||
*
|
||||
*/
|
||||
|
@ -323,7 +323,7 @@ path_readlines(int argc, VALUE *argv, VALUE self)
|
|||
/*
|
||||
* call-seq:
|
||||
* pathname.sysopen([mode, [perm]]) -> fixnum
|
||||
*
|
||||
*
|
||||
* See <tt>IO.sysopen</tt>.
|
||||
*
|
||||
*/
|
||||
|
@ -405,7 +405,7 @@ path_lchown(VALUE self, VALUE owner, VALUE group)
|
|||
* call-seq:
|
||||
* pathname.fnmatch(pattern, [flags]) -> string
|
||||
* pathname.fnmatch?(pattern, [flags]) -> string
|
||||
*
|
||||
*
|
||||
* See <tt>File.fnmatch</tt>. Return +true+ if the receiver matches the given
|
||||
* pattern.
|
||||
*/
|
||||
|
|
|
@ -31,7 +31,7 @@ module Psych
|
|||
# doc = Psych::Nodes::Document.new
|
||||
# seq = Psych::Nodes::Sequence.new
|
||||
# scalar = Psych::Nodes::Scalar.new('foo')
|
||||
#
|
||||
#
|
||||
# # Build up our tree
|
||||
# stream.children << doc
|
||||
# doc.children << seq
|
||||
|
|
|
@ -4,7 +4,7 @@ class IO
|
|||
# Reads ios until pattern matches or the timeout is over. It returns
|
||||
# an array with the read buffer, followed by the matches. If a block is given,
|
||||
# the result is yielded to the block and returns nil. The optional timeout parameter defines,
|
||||
# in seconds, the total time to wait for pattern. If it is over of eof is found, it
|
||||
# in seconds, the total time to wait for pattern. If it is over of eof is found, it
|
||||
# returns/yields nil. However, the buffer in a timeout session is kept for the next expect call.
|
||||
# The default timeout is 9999999 seconds.
|
||||
def expect(pat,timeout=9999999)
|
||||
|
|
|
@ -529,7 +529,7 @@ inspect_ipv4_add_drop_membership(int level, int optname, VALUE data, VALUE ret)
|
|||
if (RSTRING_LEN(data) == sizeof(struct ip_mreq))
|
||||
return inspect_ipv4_mreq(level, optname, data, ret);
|
||||
# if defined(HAVE_TYPE_STRUCT_IP_MREQN)
|
||||
else if (RSTRING_LEN(data) == sizeof(struct ip_mreqn))
|
||||
else if (RSTRING_LEN(data) == sizeof(struct ip_mreqn))
|
||||
return inspect_ipv4_mreqn(level, optname, data, ret);
|
||||
# endif
|
||||
else
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
require 'mkmf'
|
||||
|
||||
TkLib_Config = {}
|
||||
TkLib_Config['search_versions'] =
|
||||
TkLib_Config['search_versions'] =
|
||||
# %w[8.9 8.8 8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 7.6 4.2]
|
||||
# %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0]
|
||||
%w[8.7 8.6 8.5 8.4 8.0] # to shorten search steps
|
||||
|
@ -26,7 +26,7 @@ end
|
|||
$cleanfiles << 'config_list'
|
||||
config_list_file = 'config_list'
|
||||
config_list_file_source = File.join(File.dirname(__FILE__),'config_list.in')
|
||||
if !File.exist?(config_list_file) ||
|
||||
if !File.exist?(config_list_file) ||
|
||||
File.ctime(config_list_file_source) > File.ctime(config_list_file)
|
||||
old_config_list_file = config_list_file_source
|
||||
else
|
||||
|
@ -92,7 +92,7 @@ if update_flag
|
|||
|
||||
else
|
||||
makefile = 'Makefile'
|
||||
if File.exist?(makefile) &&
|
||||
if File.exist?(makefile) &&
|
||||
File.ctime(config_list_file) > File.ctime(makefile)
|
||||
# no need to update Makefile
|
||||
exit
|
||||
|
@ -197,7 +197,7 @@ def get_shlib_path_head
|
|||
|
||||
else
|
||||
[
|
||||
'/opt', '/pkg', '/share',
|
||||
'/opt', '/pkg', '/share',
|
||||
'/usr/local/opt', '/usr/local/pkg', '/usr/local/share', '/usr/local',
|
||||
'/usr/opt', '/usr/pkg', '/usr/share', '/usr/contrib', '/usr'
|
||||
].each{|dir|
|
||||
|
@ -268,7 +268,7 @@ def find_macosx_framework
|
|||
end
|
||||
|
||||
# framework is disabled?
|
||||
if with_config("tcltk-framework") == false ||
|
||||
if with_config("tcltk-framework") == false ||
|
||||
enable_config("tcltk-framework") == false
|
||||
return false
|
||||
end
|
||||
|
@ -276,7 +276,7 @@ def find_macosx_framework
|
|||
use_framework ||= (framework_dir = with_config("tcltk-framework"))
|
||||
if framework_dir.kind_of? String
|
||||
TkLib_Config["tcltk-framework"] = framework_dir.strip.chomp('/')
|
||||
return [File.join(TkLib_Config["tcltk-framework"], 'Tcl.framework'),
|
||||
return [File.join(TkLib_Config["tcltk-framework"], 'Tcl.framework'),
|
||||
File.join(TkLib_Config["tcltk-framework"], 'Tk.framework')]
|
||||
end
|
||||
|
||||
|
@ -287,7 +287,7 @@ def find_macosx_framework
|
|||
end
|
||||
|
||||
paths = [
|
||||
#"~/Library/Frameworks",
|
||||
#"~/Library/Frameworks",
|
||||
"/Library/Frameworks",
|
||||
"/Network/Library/Frameworks", "/System/Library/Frameworks"
|
||||
]
|
||||
|
@ -305,7 +305,7 @@ end
|
|||
|
||||
def collect_tcltk_defs(tcl_defs_str, tk_defs_str)
|
||||
conflicts = [
|
||||
'PACKAGE_NAME', 'PACKAGE_TARNAME', 'PACKAGE_VERSION',
|
||||
'PACKAGE_NAME', 'PACKAGE_TARNAME', 'PACKAGE_VERSION',
|
||||
'PACKAGE_STRING', 'PACKAGE_BUGREPORT'
|
||||
]
|
||||
|
||||
|
@ -347,7 +347,7 @@ def collect_tcltk_defs(tcl_defs_str, tk_defs_str)
|
|||
|
||||
defs.delete_if{|name,value|
|
||||
conflicts.include?(name) ||
|
||||
( (vtcl = tcl_defs.assoc(name)) && (vtk = tk_defs.assoc(name)) &&
|
||||
( (vtcl = tcl_defs.assoc(name)) && (vtk = tk_defs.assoc(name)) &&
|
||||
vtcl != vtk )
|
||||
}
|
||||
|
||||
|
@ -433,7 +433,7 @@ def get_tclConfig_dirs
|
|||
File.join(base, 'Tk.framework', 'Versions', 'Current')
|
||||
]
|
||||
|
||||
Dir.glob(File.join(base, 'Tcl.framework',
|
||||
Dir.glob(File.join(base, 'Tcl.framework',
|
||||
'Versions', '*')).sort.reverse.each{|dir|
|
||||
next if dir =~ /Current/
|
||||
config_dir << [dir, dir.gsub(/Tcl/, 'Tk')]
|
||||
|
@ -446,14 +446,14 @@ def get_tclConfig_dirs
|
|||
config_dir.concat [
|
||||
RbConfig::CONFIG['libdir'],
|
||||
File.join(RbConfig::CONFIG['exec_prefix'], 'lib'),
|
||||
File.join(RbConfig::CONFIG['prefix'], 'lib'),
|
||||
"/usr/local/opt/lib", "/usr/local/pkg/lib", "/usr/local/share/lib",
|
||||
"/usr/local/lib", "/usr/opt/lib", "/usr/pkg/lib",
|
||||
File.join(RbConfig::CONFIG['prefix'], 'lib'),
|
||||
"/usr/local/opt/lib", "/usr/local/pkg/lib", "/usr/local/share/lib",
|
||||
"/usr/local/lib", "/usr/opt/lib", "/usr/pkg/lib",
|
||||
"/usr/share/lib", "/usr/contrib/lib", "/usr/lib"
|
||||
]
|
||||
|
||||
config_dir.concat [
|
||||
'/opt', '/pkg', '/share',
|
||||
'/opt', '/pkg', '/share',
|
||||
'/usr/local/opt', '/usr/local/pkg', '/usr/local/share', '/usr/local',
|
||||
'/usr/opt', '/usr/pkg', '/usr/share', '/usr/contrib', '/usr'
|
||||
].map{|dir|
|
||||
|
@ -483,7 +483,7 @@ def get_tclConfig_dirs
|
|||
}
|
||||
|
||||
paths = [
|
||||
#"~/Library/Frameworks",
|
||||
#"~/Library/Frameworks",
|
||||
"/Library/Frameworks",
|
||||
"/Network/Library/Frameworks", "/System/Library/Frameworks"
|
||||
]
|
||||
|
@ -500,7 +500,7 @@ def get_tclConfig_dirs
|
|||
File.join(base, 'Tk.framework', 'Versions', 'Current')
|
||||
]
|
||||
|
||||
Dir.glob(File.join(base, 'Tcl.framework',
|
||||
Dir.glob(File.join(base, 'Tcl.framework',
|
||||
'Versions', '*')).sort.reverse.each{|dir|
|
||||
next if dir =~ /Current/
|
||||
config_dir << [dir, dir.gsub(/Tcl/, 'Tk')]
|
||||
|
@ -702,7 +702,7 @@ def search_tclConfig(*paths) # libdir list or [tcl-libdir|file, tk-libdir|file]
|
|||
end
|
||||
|
||||
def get_tclConfig(tclConfig_file, tkConfig_file, tclConfig_dir, tkConfig_dir)
|
||||
use_tclConfig = (tclConfig_file != false) && (tkConfig_file != false) &&
|
||||
use_tclConfig = (tclConfig_file != false) && (tkConfig_file != false) &&
|
||||
(tclConfig_dir != false) && (tkConfig_dir != false)
|
||||
|
||||
unless use_tclConfig
|
||||
|
@ -736,11 +736,11 @@ def get_tclConfig(tclConfig_file, tkConfig_file, tclConfig_dir, tkConfig_dir)
|
|||
TkLib_Config["tclConfig-dir"] = tclConfig_dir
|
||||
TkLib_Config["tkConfig-dir"] = tkConfig_dir
|
||||
|
||||
print("Search tclConfig.sh", (tclConfig_dir)? " (in #{tclConfig_dir})": "",
|
||||
print("Search tclConfig.sh", (tclConfig_dir)? " (in #{tclConfig_dir})": "",
|
||||
" and tkConfig.sh", (tkConfig_dir)? " (in #{tkConfig_dir})": "", ".")
|
||||
if tclConfig_dir
|
||||
tclConfig, tkConfig =
|
||||
search_tclConfig([ ((tclConfig_file)? tclConfig_file: tclConfig_dir),
|
||||
tclConfig, tkConfig =
|
||||
search_tclConfig([ ((tclConfig_file)? tclConfig_file: tclConfig_dir),
|
||||
((tkConfig_file)? tkConfig_file: tkConfig_dir) ])
|
||||
else
|
||||
tclConfig, tkConfig = search_tclConfig()
|
||||
|
@ -1057,7 +1057,7 @@ def find_tk(tklib, stubs, version, *opt_paths)
|
|||
ret
|
||||
end
|
||||
|
||||
def find_tcltk_library(tcllib, tklib, stubs, tclversion, tkversion,
|
||||
def find_tcltk_library(tcllib, tklib, stubs, tclversion, tkversion,
|
||||
tcl_opt_paths, tk_opt_paths)
|
||||
ret = find_tcl(tcllib, stubs, tclversion, *tcl_opt_paths)
|
||||
unless ret && ret.find{|path, val| val}
|
||||
|
@ -1094,7 +1094,7 @@ def find_tcltk_header(tclver, tkver)
|
|||
base_dir.delete_if{|path| path =~ / /}
|
||||
end
|
||||
|
||||
if TclConfig_Info['TCL_INCLUDE_SPEC'] &&
|
||||
if TclConfig_Info['TCL_INCLUDE_SPEC'] &&
|
||||
have_tcl_h = try_cpp('#include <tcl.h>', TclConfig_Info['TCL_INCLUDE_SPEC'])
|
||||
$INCFLAGS << " " << TclConfig_Info['TCL_INCLUDE_SPEC']
|
||||
elsif have_tcl_h = have_header('tcl.h')
|
||||
|
@ -1106,7 +1106,7 @@ def find_tcltk_header(tclver, tkver)
|
|||
versions = TkLib_Config['search_versions']
|
||||
end
|
||||
paths = base_dir.dup
|
||||
versions.each{|ver|
|
||||
versions.each{|ver|
|
||||
paths.concat(base_dir.map{|dir|
|
||||
[dir + '/tcl' + ver, dir + '/tcl' + ver.delete('.')]
|
||||
}.flatten)
|
||||
|
@ -1114,7 +1114,7 @@ def find_tcltk_header(tclver, tkver)
|
|||
have_tcl_h = find_header('tcl.h', *paths)
|
||||
end
|
||||
|
||||
if TkConfig_Info['TK_INCLUDE_SPEC'] &&
|
||||
if TkConfig_Info['TK_INCLUDE_SPEC'] &&
|
||||
have_tk_h = try_cpp('#include <tk.h>', TkConfig_Info['TK_INCLUDE_SPEC'])
|
||||
$INCFLAGS << " " << TkConfig_Info['TK_INCLUDE_SPEC']
|
||||
elsif have_tk_h = have_header('tk.h')
|
||||
|
@ -1126,7 +1126,7 @@ def find_tcltk_header(tclver, tkver)
|
|||
versions = TkLib_Config['search_versions']
|
||||
end
|
||||
paths = base_dir.dup
|
||||
versions.each{|ver|
|
||||
versions.each{|ver|
|
||||
paths.concat(base_dir.map{|dir|
|
||||
[dir + '/tk' + ver, dir + '/tk' + ver.delete('.')]
|
||||
}.flatten)
|
||||
|
@ -1158,14 +1158,14 @@ def setup_for_macosx_framework(tclver, tkver)
|
|||
TclConfig_Info['TCL_INCLUDE_SPEC'] << File.join(tcl_base, 'Headers')
|
||||
|
||||
unless tclver
|
||||
dir = Dir.glob(File.join(tcl_base, 'Versions', '*', 'Headers'),
|
||||
dir = Dir.glob(File.join(tcl_base, 'Versions', '*', 'Headers'),
|
||||
File::FNM_CASEFOLD).sort.reverse[0]
|
||||
TclConfig_Info['TCL_INCLUDE_SPEC'] << "-I#{dir.quote} " if dir
|
||||
end
|
||||
end
|
||||
|
||||
if TkLib_Config["tk-framework-header"]
|
||||
TkConfig_Info['TK_INCLUDE_SPEC'] =
|
||||
TkConfig_Info['TK_INCLUDE_SPEC'] =
|
||||
"-I#{TkLib_Config["tk-framework-header"].quote} "
|
||||
else
|
||||
TkConfig_Info['TK_INCLUDE_SPEC'] = ""
|
||||
|
@ -1179,7 +1179,7 @@ def setup_for_macosx_framework(tclver, tkver)
|
|||
TkConfig_Info['TK_INCLUDE_SPEC'] << File.join(tk_base, 'Headers')
|
||||
|
||||
unless tkver
|
||||
dir = Dir.glob(File.join(tk_base, 'Versions', '*', 'Headers'),
|
||||
dir = Dir.glob(File.join(tk_base, 'Versions', '*', 'Headers'),
|
||||
File::FNM_CASEFOLD).sort.reverse[0]
|
||||
TkConfig_Info['TK_INCLUDE_SPEC'] << "-I#{dir.quote} " if dir
|
||||
end
|
||||
|
@ -1288,9 +1288,9 @@ def pthread_check()
|
|||
**
|
||||
** NATIVETHREAD SUPPORT CHECK WARNING:
|
||||
**
|
||||
** We cannot check the consistency of nativethread support between
|
||||
** We cannot check the consistency of nativethread support between
|
||||
** Ruby and the Tcl/Tk library in your environment (are you perhaps
|
||||
** cross-compiling?). If nativethread support for these 2 packages
|
||||
** cross-compiling?). If nativethread support for these 2 packages
|
||||
** is inconsistent you may find you get errors when running Ruby/Tk
|
||||
** (e.g. hangs or segmentation faults). We strongly recommend
|
||||
** you to check the consistency manually.
|
||||
|
@ -1333,17 +1333,17 @@ EOF
|
|||
**
|
||||
** NATIVETHREAD SUPPORT MODE WARNING:
|
||||
**
|
||||
** Ruby is compiled with --enable-pthread, but your Tcl/Tk library
|
||||
** seems to be compiled without nativethread support. Although you can
|
||||
** create the tcltklib library, this combination may cause errors (e.g.
|
||||
** hangs or segmentation faults). If you have no reason to keep the
|
||||
** current nativethread support status, we recommend you reconfigure and
|
||||
** Ruby is compiled with --enable-pthread, but your Tcl/Tk library
|
||||
** seems to be compiled without nativethread support. Although you can
|
||||
** create the tcltklib library, this combination may cause errors (e.g.
|
||||
** hangs or segmentation faults). If you have no reason to keep the
|
||||
** current nativethread support status, we recommend you reconfigure and
|
||||
** recompile the libraries so that both or neither support nativethreads.
|
||||
**
|
||||
** If you want change the status of nativethread support, please recompile
|
||||
** Ruby without "--enable-pthread" configure option (If you use Ruby 1.9.x
|
||||
** or later, you cannot remove this option, because it requires native-
|
||||
** thread support.) or recompile Tcl/Tk with "--enable-threads" configure
|
||||
** thread support.) or recompile Tcl/Tk with "--enable-threads" configure
|
||||
** option (if your Tcl/Tk is later than or equal to Tcl/Tk 8.1).
|
||||
**
|
||||
*****************************************************************************
|
||||
|
@ -1434,14 +1434,14 @@ end
|
|||
$CPPFLAGS += ' -D_WIN32' if /cygwin/ =~ RUBY_PLATFORM
|
||||
|
||||
# Does ruby have nativethread ?
|
||||
TkLib_Config["ruby_with_thread"] =
|
||||
TkLib_Config["ruby_with_thread"] =
|
||||
macro_defined?('HAVE_NATIVETHREAD', '#include "ruby.h"')
|
||||
|
||||
|
||||
#---------------------------------------------------
|
||||
# check requirement of Tcl/tk version
|
||||
tcltk_version = with_config("tcltkversion")
|
||||
tclver, tkver =
|
||||
tclver, tkver =
|
||||
TkLib_Config["tcltkversion"] = check_tcltk_version(tcltk_version)
|
||||
puts("Specified Tcl/Tk version is #{[tclver, tkver].inspect}") if tclver&&tkver
|
||||
|
||||
|
@ -1464,12 +1464,12 @@ end
|
|||
TkLib_Config["ActiveTcl"] = activeTcl
|
||||
|
||||
# allow space chars on a libpath
|
||||
TkLib_Config["space-on-tk-libpath"] =
|
||||
TkLib_Config["space-on-tk-libpath"] =
|
||||
enable_config("space-on-tk-libpath", ! is_win32?)
|
||||
|
||||
# enable Tcl/Tk stubs?
|
||||
=begin
|
||||
if TclConfig_Info['TCL_STUB_LIB_SPEC'] && TkConfig_Info['TK_STUB_LIB_SPEC'] &&
|
||||
if TclConfig_Info['TCL_STUB_LIB_SPEC'] && TkConfig_Info['TK_STUB_LIB_SPEC'] &&
|
||||
!TclConfig_Info['TCL_STUB_LIB_SPEC'].strip.empty? &&
|
||||
!TkConfig_Info['TK_STUB_LIB_SPEC'].strip.empty?
|
||||
stubs = true
|
||||
|
@ -1562,7 +1562,7 @@ use_X = search_X_libraries
|
|||
|
||||
if (TkLib_Config["tcltk-framework"] ||
|
||||
( find_tcltk_header(tclver, tkver) &&
|
||||
find_tcltk_library(tcllib, tklib, stubs, tclver, tkver,
|
||||
find_tcltk_library(tcllib, tklib, stubs, tclver, tkver,
|
||||
tcl_ldir_list, tk_ldir_list) ) ) &&
|
||||
(stubs || pthread_check())
|
||||
# create Makefile
|
||||
|
|
|
@ -774,7 +774,7 @@ class MultiTkIp
|
|||
|
||||
ensure
|
||||
# interp must be deleted before the thread for interp is dead.
|
||||
# If not, raise Tcl_Panic on Tcl_AsyncDelete because async handler
|
||||
# If not, raise Tcl_Panic on Tcl_AsyncDelete because async handler
|
||||
# deleted by the wrong thread.
|
||||
interp.delete
|
||||
end
|
||||
|
@ -1933,7 +1933,7 @@ class MultiTkIp
|
|||
end
|
||||
=end
|
||||
def cb_eval(cmd, *args)
|
||||
self.eval_callback(*args,
|
||||
self.eval_callback(*args,
|
||||
&_proc_on_safelevel{|*params|
|
||||
TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *params))
|
||||
})
|
||||
|
@ -2121,7 +2121,7 @@ class MultiTkIp
|
|||
end
|
||||
err
|
||||
}
|
||||
$SAFE=safe if $SAFE < safe;
|
||||
$SAFE=safe if $SAFE < safe;
|
||||
begin
|
||||
yield(*args)
|
||||
rescue Exception => e
|
||||
|
@ -2300,7 +2300,7 @@ end
|
|||
current[:callback_ip] = backup_ip
|
||||
end
|
||||
else
|
||||
eval_proc_core(true,
|
||||
eval_proc_core(true,
|
||||
proc{|safe, *params|
|
||||
Thread.new{cmd.call(safe, *params)}.value
|
||||
},
|
||||
|
|
|
@ -1306,7 +1306,7 @@ EOS
|
|||
|
||||
ensure
|
||||
# interp must be deleted before the thread for interp is dead.
|
||||
# If not, raise Tcl_Panic on Tcl_AsyncDelete because async handler
|
||||
# If not, raise Tcl_Panic on Tcl_AsyncDelete because async handler
|
||||
# deleted by the wrong thread.
|
||||
interp.delete
|
||||
end
|
||||
|
@ -1339,7 +1339,7 @@ EOS
|
|||
|
||||
INTERP.instance_eval{
|
||||
# @tk_cmd_tbl = TkUtil.untrust({})
|
||||
@tk_cmd_tbl =
|
||||
@tk_cmd_tbl =
|
||||
TkUtil.untrust(Hash.new{|hash, key|
|
||||
fail IndexError, "unknown command ID '#{key}'"
|
||||
})
|
||||
|
|
|
@ -538,8 +538,8 @@ class << Tk
|
|||
@TOPLEVEL_ALIAS_TABLE[target][sym] = obj
|
||||
|
||||
else # NOT topalias_defined?(sym)
|
||||
# Nobody controls ALIAS[sym].
|
||||
# At leaset, current widget set doesn't control ALIAS[sym].
|
||||
# Nobody controls ALIAS[sym].
|
||||
# At leaset, current widget set doesn't control ALIAS[sym].
|
||||
# Keep Object::sym (even if it is not defined)
|
||||
# Keep OWNER[sym].
|
||||
@TOPLEVEL_ALIAS_TABLE[target][sym] = obj
|
||||
|
@ -552,7 +552,7 @@ class << Tk
|
|||
@TOPLEVEL_ALIAS_TABLE[target][sym] = obj
|
||||
replace_topalias(sym, obj)
|
||||
replace_topobj(sym, obj)
|
||||
|
||||
|
||||
when nil
|
||||
# New definition for sym
|
||||
@TOPLEVEL_ALIAS_OWNER[sym] = target
|
||||
|
@ -566,7 +566,7 @@ class << Tk
|
|||
# Keep ALIAS[sym].
|
||||
# Keep OWNER[sym].
|
||||
@TOPLEVEL_ALIAS_TABLE[target][sym] = obj
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -583,7 +583,7 @@ class << Tk
|
|||
|
||||
def __set_loaded_toplevel_aliases__(autopath, target, obj, *symbols)
|
||||
# autopath is an autoload file
|
||||
# Currently, this method doesn't support that autoload loads
|
||||
# Currently, this method doesn't support that autoload loads
|
||||
# different toplevels between <basename>.rb and <basename>.so extension.
|
||||
shortpath = (autopath =~ /^(.*)(.rb|.so)$/)? $1: autopath
|
||||
target = target.to_sym
|
||||
|
|
|
@ -86,7 +86,7 @@ class << TkFont::Chooser
|
|||
|
||||
def configure(option, value=None)
|
||||
if option.kind_of? Hash
|
||||
tk_call('tk', 'fontchooser', 'configure',
|
||||
tk_call('tk', 'fontchooser', 'configure',
|
||||
*hash_kv(_symbolkey2str(option)))
|
||||
else
|
||||
opt = option.to_s
|
||||
|
@ -141,8 +141,8 @@ class << TkFont::Chooser
|
|||
def set_for(target, title="Font")
|
||||
if target.kind_of? TkFont
|
||||
configs = {
|
||||
:font=>target.actual_hash,
|
||||
:command=>proc{|fnt, *args|
|
||||
:font=>target.actual_hash,
|
||||
:command=>proc{|fnt, *args|
|
||||
target.configure(TkFont.actual_hash(fnt))
|
||||
}
|
||||
}
|
||||
|
@ -152,14 +152,14 @@ class << TkFont::Chooser
|
|||
fnt = fnt.actual_hash if fnt.kind_of?(TkFont)
|
||||
configs = {
|
||||
:font => fnt,
|
||||
:command=>proc{|fnt, *args|
|
||||
:command=>proc{|fnt, *args|
|
||||
target[:font] = TkFont.actual_hash(fnt)
|
||||
}
|
||||
}
|
||||
else
|
||||
configs = {
|
||||
:font=>target.cget_tkstring(:font),
|
||||
:command=>proc{|fnt, *args|
|
||||
:font=>target.cget_tkstring(:font),
|
||||
:command=>proc{|fnt, *args|
|
||||
target.font = TkFont.actual_hash_displayof(fnt, target)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#
|
||||
# A menu_info is an array of menu entries:
|
||||
# [ entry_info, entry_info, ... ]
|
||||
#
|
||||
#
|
||||
#
|
||||
# underline, accelerator, and configs are optional pearameters.
|
||||
# Hashes are OK instead of Arrays. Then the entry type ('command',
|
||||
|
|
|
@ -62,7 +62,7 @@ module Tk
|
|||
major, minor, type, patchlevel = TclTkLib.get_version
|
||||
|
||||
# ttk::spinbox is supported on Tcl/Tk8.6b1 or later
|
||||
if ([major,minor,type,patchlevel] <=>
|
||||
if ([major,minor,type,patchlevel] <=>
|
||||
[8,6,TclTkLib::RELEASE_TYPE::BETA,1]) >= 0
|
||||
@TOPLEVEL_ALIAS_TABLE[:Ttk].update(
|
||||
:TkSpinbox => 'tkextlib/tile/tspinbox'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||
#
|
||||
# * Part of tcllib extension
|
||||
# *
|
||||
# *
|
||||
#
|
||||
|
||||
require 'tk'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||
#
|
||||
# * Part of tcllib extension
|
||||
# *
|
||||
# *
|
||||
#
|
||||
|
||||
require 'tk'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||
#
|
||||
# * Part of tcllib extension
|
||||
# * chatwidget - Provides a multi-paned view suitable for display of
|
||||
# * chatwidget - Provides a multi-paned view suitable for display of
|
||||
# chat room or irc channel information
|
||||
#
|
||||
|
||||
|
@ -92,7 +92,7 @@ class Tk::Tcllib::ChatWidget
|
|||
|
||||
def hook_add(type, *args, &blk) # args -> [prior, cmd], [prior], [cmd]
|
||||
#type -> 'message', 'post', 'names_group', 'names_nick', 'chatstate', 'url'
|
||||
|
||||
|
||||
if prior = args.shift
|
||||
if !prior.kind_of?(Numeric)
|
||||
cmd = prior
|
||||
|
|
|
@ -70,6 +70,6 @@ class Tk::Tcllib::IP_Entry
|
|||
end
|
||||
end
|
||||
|
||||
class Tk::Tcllib::IP_Entry6 < Tk::Tcllib::IP_Entry
|
||||
class Tk::Tcllib::IP_Entry6 < Tk::Tcllib::IP_Entry
|
||||
TkCommandNames = ['::ipentry::ipentry6'.freeze].freeze
|
||||
end
|
||||
|
|
|
@ -43,11 +43,11 @@ class Tk::Tcllib::KHIM
|
|||
|
||||
def self.set_config(*args)
|
||||
if args.length == 1
|
||||
# cmd_string generated by
|
||||
# cmd_string generated by
|
||||
#Tk.ip_eval_without_enc(cmd_string)
|
||||
Tk.ip_eval(cmd_string)
|
||||
else
|
||||
# args for setConfig command
|
||||
# args for setConfig command
|
||||
#Tk.tk_call_without_enc('::khim::setConfig', *args)
|
||||
Tk.tk_call('::khim::setConfig', *args)
|
||||
end
|
||||
|
|
|
@ -221,7 +221,7 @@ module Tk::Tcllib::Plotchart
|
|||
end
|
||||
|
||||
def legend(series, text)
|
||||
tk_call_without_enc(@chart, 'legend',
|
||||
tk_call_without_enc(@chart, 'legend',
|
||||
_get_eval_enc_str(series), _get_eval_enc_str(text))
|
||||
self
|
||||
end
|
||||
|
@ -238,7 +238,7 @@ module Tk::Tcllib::Plotchart
|
|||
|
||||
text, dir = args
|
||||
|
||||
tk_call_without_enc(@chart, 'balloon', x, y,
|
||||
tk_call_without_enc(@chart, 'balloon', x, y,
|
||||
_get_eval_enc_str(text), dir)
|
||||
self
|
||||
end
|
||||
|
@ -263,7 +263,7 @@ module Tk::Tcllib::Plotchart
|
|||
|
||||
text, dir = args
|
||||
|
||||
tk_call_without_enc(@chart, 'plaintext', x, y,
|
||||
tk_call_without_enc(@chart, 'plaintext', x, y,
|
||||
_get_eval_enc_str(text), dir)
|
||||
self
|
||||
end
|
||||
|
@ -485,7 +485,7 @@ module Tk::Tcllib::Plotchart
|
|||
end
|
||||
|
||||
def dot(series, xcrd, ycrd, value)
|
||||
tk_call_without_enc(@chart, 'dot', _get_eval_enc_str(series),
|
||||
tk_call_without_enc(@chart, 'dot', _get_eval_enc_str(series),
|
||||
xcrd, ycrd, value)
|
||||
self
|
||||
end
|
||||
|
@ -804,7 +804,7 @@ module Tk::Tcllib::Plotchart
|
|||
private :_create_chart
|
||||
|
||||
def plot(label, yvalue, color)
|
||||
tk_call_without_enc(@chart, 'plot', _get_eval_enc_str(label),
|
||||
tk_call_without_enc(@chart, 'plot', _get_eval_enc_str(label),
|
||||
_get_eval_enc_str(yvalue), color)
|
||||
self
|
||||
end
|
||||
|
@ -1262,8 +1262,8 @@ module Tk::Tcllib::Plotchart
|
|||
# time_begin := String of time format (e.g. "1 january 2004")
|
||||
# time_end := String of time format (e.g. "1 january 2004")
|
||||
# args := Expected/maximum number of items
|
||||
# ( This determines the vertical spacing. ),
|
||||
# Expected/maximum width of items,
|
||||
# ( This determines the vertical spacing. ),
|
||||
# Expected/maximum width of items,
|
||||
# Option Hash ( { key=>value, ... } )
|
||||
if args[0].kind_of?(String)
|
||||
@time_begin = args.shift
|
||||
|
|
|
@ -10,7 +10,7 @@ require 'tkextlib/tcllib.rb'
|
|||
|
||||
# check Tile extension :: If already loaded, use tablelist_tile.
|
||||
unless defined? Tk::Tcllib::Tablelist_usingTile
|
||||
Tk::Tcllib::Tablelist_usingTile =
|
||||
Tk::Tcllib::Tablelist_usingTile =
|
||||
TkPackage.provide('tile') || TkPackage.provide('Ttk')
|
||||
end
|
||||
|
||||
|
|
|
@ -419,7 +419,7 @@ class Tk::Tcllib::Tablelist
|
|||
columnwidth(idx, 'total')
|
||||
end
|
||||
|
||||
def configcelllist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
|
||||
def configcelllist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
|
||||
ary = []
|
||||
lst.slice(3){|idx, opt, val|
|
||||
ary << _to_idx(idx) << "-#{opt}" << val
|
||||
|
@ -439,7 +439,7 @@ class Tk::Tcllib::Tablelist
|
|||
end
|
||||
alias config_cells configcells
|
||||
|
||||
def configcolumnlist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
|
||||
def configcolumnlist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
|
||||
ary = []
|
||||
lst.slice(3){|idx, opt, val|
|
||||
ary << _to_idx(idx) << "-#{opt}" << val
|
||||
|
@ -459,7 +459,7 @@ class Tk::Tcllib::Tablelist
|
|||
end
|
||||
alias config_columns configcolumns
|
||||
|
||||
def configrowlist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
|
||||
def configrowlist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
|
||||
ary = []
|
||||
lst.slice(3){|idx, opt, val|
|
||||
ary << _to_idx(idx) << "-#{opt}" << val
|
||||
|
@ -841,11 +841,11 @@ class Tk::Tcllib::Tablelist
|
|||
|
||||
|
||||
# default of 'labelcommand' option
|
||||
DEFAULT_labelcommand_value =
|
||||
DEFAULT_labelcommand_value =
|
||||
DEFAULT_sortByColumn_cmd = '::tablelist::sortByColumn'
|
||||
|
||||
# default of 'labelcommand2' option
|
||||
DEFAULT_labelcommand2_value =
|
||||
DEFAULT_labelcommand2_value =
|
||||
DEFAULT_addToSortColumns_cmd = '::tablelist::addToSortColumns'
|
||||
|
||||
def sortByColumn_with_event_generate(idx)
|
||||
|
@ -1053,7 +1053,7 @@ class << Tk::Tcllib::Tablelist
|
|||
else
|
||||
gmt = None
|
||||
end
|
||||
Tk.tk_call('::tablelist::addDateTimeMentry',
|
||||
Tk.tk_call('::tablelist::addDateTimeMentry',
|
||||
format, date_sep, time_sep, gmt, name)
|
||||
end
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ end
|
|||
#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Sizegrip,
|
||||
# :TkSizegrip, :TkSizeGrip)
|
||||
Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/sizegrip.rb',
|
||||
:Ttk, Tk::Tile::Sizegrip,
|
||||
:Ttk, Tk::Tile::Sizegrip,
|
||||
:TkSizegrip, :TkSizeGrip)
|
||||
|
|
|
@ -295,7 +295,7 @@ class << Tk::Tile::Style
|
|||
fail ArgumentError, "too many arguments" unless args.empty?
|
||||
|
||||
# define a Microsoft Visual Styles element
|
||||
tk_call(TkCommandNames[0], 'element', 'create', name, 'vsapi',
|
||||
tk_call(TkCommandNames[0], 'element', 'create', name, 'vsapi',
|
||||
class_name, part_id, state_map, opts)
|
||||
end
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class Tk::RbWidget::Editable_Listbox < TkListbox
|
|||
if idx = @ebox.pos
|
||||
see(idx) if bbox(idx).empty?
|
||||
@ebox.focus(true)
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ layout_proc = proc{|parent, mbtn|
|
|||
=end
|
||||
|
||||
menubar = TkMenubar.new(nil, menu_spec,
|
||||
'layout_proc'=>layout_proc,
|
||||
'layout_proc'=>layout_proc,
|
||||
'tearoff'=>false,
|
||||
'foreground'=>'grey40',
|
||||
'activeforeground'=>'red',
|
||||
|
|
|
@ -87,7 +87,7 @@ if false && Object.const_defined?(:RubyVM) && ::RubyVM.class == Class
|
|||
Thread.new(l, &y).value
|
||||
}).pack(:fill=>:x, :padx=>5)
|
||||
else
|
||||
# KNOWN BUG::
|
||||
# KNOWN BUG::
|
||||
# Current multi-tk.rb cannot support long term threads on callbacks.
|
||||
# Such a thread freezes the Ruby/Tk process.
|
||||
end
|
||||
|
|
|
@ -209,7 +209,7 @@ end
|
|||
|
||||
# test
|
||||
if __FILE__ == $0
|
||||
f = Tk::RbWidget::ScrollFrame.new(:scrollbarwidth=>10,
|
||||
f = Tk::RbWidget::ScrollFrame.new(:scrollbarwidth=>10,
|
||||
:width=>300, :height=>200)
|
||||
f.pack(:expand=>true, :fill=>:both)
|
||||
|
||||
|
@ -234,13 +234,13 @@ if __FILE__ == $0
|
|||
# remove a vertical scrollbar, and then the scrollframe is not scrollable.
|
||||
Tk.after(6000){ f.vscroll(false) }
|
||||
|
||||
# add a vertical scrollbar, and make the scrollframe scrollable.
|
||||
# add a vertical scrollbar, and make the scrollframe scrollable.
|
||||
Tk.after(9000){ f.vscroll(true) }
|
||||
|
||||
# remove a horizontal scrollbar, and then the scrollframe is not scrollable.
|
||||
Tk.after(12000){ f.hscroll(false) }
|
||||
|
||||
# add a horizontal scrollbar, and make the scrollframe scrollable.
|
||||
# add a horizontal scrollbar, and make the scrollframe scrollable.
|
||||
Tk.after(15000){ f.hscroll(true) }
|
||||
|
||||
Tk.mainloop
|
||||
|
|
|
@ -201,20 +201,20 @@ if __FILE__ == $0
|
|||
TkButton.new(f, :text=>'aaa'),
|
||||
TkButton.new(f, :text=>'aaaa'))
|
||||
|
||||
f = Tk::RbWidget::VBox.new(:borderwidth=>5,
|
||||
f = Tk::RbWidget::VBox.new(:borderwidth=>5,
|
||||
:relief=>'groove').pack(:fill=>:y, :expand=>true)
|
||||
f.add(TkButton.new(f, :text=>'a'),
|
||||
TkButton.new(f, :text=>'aa', :font=>'Helvetica 30'),
|
||||
TkButton.new(f, :text=>'aaa'),
|
||||
TkButton.new(f, :text=>'aaaa'))
|
||||
|
||||
f = Tk::RbWidget::HRBox.new(:borderwidth=>3,
|
||||
f = Tk::RbWidget::HRBox.new(:borderwidth=>3,
|
||||
:relief=>'raised').pack(:fill=>:x)
|
||||
f.add(TkButton.new(f, :text=>'a'),
|
||||
TkButton.new(f, :text=>'aa'),
|
||||
TkButton.new(f, :text=>'aaa'))
|
||||
|
||||
f = Tk::RbWidget::VBBox.new(:borderwidth=>3,
|
||||
f = Tk::RbWidget::VBBox.new(:borderwidth=>3,
|
||||
:relief=>'ridge').pack(:fill=>:x)
|
||||
f.propagate = false
|
||||
f.height 100
|
||||
|
|
|
@ -64,8 +64,8 @@ class Tk::RbWidget::BalloonHelp<TkLabel
|
|||
_balloon_binding(@interval)
|
||||
|
||||
# @label = TkLabel.new(@frame, 'background'=>'bisque').pack
|
||||
@label = TkLabel.new(@frame,
|
||||
'foreground'=>DEFAULT_FOREGROUND,
|
||||
@label = TkLabel.new(@frame,
|
||||
'foreground'=>DEFAULT_FOREGROUND,
|
||||
'background'=>DEFAULT_BACKGROUND).pack
|
||||
@label.configure(_symbolkey2str(keys)) unless keys.empty?
|
||||
@path = @label
|
||||
|
@ -147,7 +147,7 @@ if __FILE__ == $0
|
|||
}
|
||||
TkButton.new('text'=>'This button has another balloon help') {|b|
|
||||
pack('fill'=>'x')
|
||||
Tk::RbWidget::BalloonHelp.new(b,
|
||||
Tk::RbWidget::BalloonHelp.new(b,
|
||||
'text'=>"CONFIGURED MESSAGE\nchange colors, and so on",
|
||||
'interval'=>200, 'font'=>'courier',
|
||||
'background'=>'gray', 'foreground'=>'red')
|
||||
|
|
|
@ -370,7 +370,7 @@ EOD
|
|||
|
||||
startwait = keys.delete('startwait'){300}
|
||||
interval = keys.delete('interval'){150}
|
||||
@lst = Tk::RbWidget::AutoScrollListbox.new(@top, :scrollbar=>true,
|
||||
@lst = Tk::RbWidget::AutoScrollListbox.new(@top, :scrollbar=>true,
|
||||
:startwait=>startwait,
|
||||
:interval=>interval)
|
||||
@lst.pack(:fill=>:both, :expand=>true)
|
||||
|
@ -464,7 +464,7 @@ if __FILE__ == $0
|
|||
# e0.values(%w(aa bb cc dd ee ff gg hh ii jj kk ll mm nn oo pp qq rr ss tt uu))
|
||||
|
||||
v = TkVariable.new
|
||||
e = Tk::RbWidget::Combobox.new(:height=>7, :scrollbar=>true,
|
||||
e = Tk::RbWidget::Combobox.new(:height=>7, :scrollbar=>true,
|
||||
:textvariable=>v,
|
||||
:arrowrelief=>:flat, :arrowborderwidth=>0,
|
||||
:startwait=>400, :interval=>200).pack
|
||||
|
@ -480,9 +480,9 @@ if __FILE__ == $0
|
|||
TkFrame.new(:relief=>:raised, :borderwidth=>2,
|
||||
:height=>3).pack(:fill=>:x, :expand=>true, :padx=>5, :pady=>3)
|
||||
|
||||
l = Tk::RbWidget::AutoScrollListbox.new(nil, :relief=>:groove,
|
||||
:borderwidth=>4,:height=>7,
|
||||
:width=>20).pack(:fill=>:both,
|
||||
l = Tk::RbWidget::AutoScrollListbox.new(nil, :relief=>:groove,
|
||||
:borderwidth=>4,:height=>7,
|
||||
:width=>20).pack(:fill=>:both,
|
||||
:expand=>true)
|
||||
(0..20).each{|i| l.insert('end', "line #{i}")}
|
||||
|
||||
|
|
|
@ -334,7 +334,7 @@ ruby_tk_stubs_init(tcl_ip)
|
|||
FIX ME : dirty hack for Mac OS X frameworks.
|
||||
With stubs, fails to find Resource/Script directory of Tk.framework.
|
||||
So, teach it to a Tcl interpreter by an environment variable.
|
||||
e.g. when $tcl_library ==
|
||||
e.g. when $tcl_library ==
|
||||
/Library/Frameworks/Tcl.framwwork/8.5/Resources/Scripts
|
||||
==> /Library/Frameworks/Tk.framwwork/8.5/Resources/Scripts
|
||||
*/
|
||||
|
|
|
@ -950,7 +950,7 @@ Tcl_AppInitProc Dde_Init, Dde_SafeInit, Registry_Init;
|
|||
|
||||
static char *rubytk_kitpath = NULL;
|
||||
|
||||
static char rubytkkit_preInitCmd[] =
|
||||
static char rubytkkit_preInitCmd[] =
|
||||
"proc tclKitPreInit {} {\n"
|
||||
"rename tclKitPreInit {}\n"
|
||||
"load {} rubytk_kitpath\n"
|
||||
|
@ -1009,7 +1009,7 @@ static char rubytkkit_preInitCmd[] =
|
|||
;
|
||||
|
||||
#if 0
|
||||
/* Not use this script.
|
||||
/* Not use this script.
|
||||
It's a memo to support an initScript for Tcl interpreters in the future. */
|
||||
static const char initScript[] =
|
||||
"if {[file isfile [file join $::tcl::kitpath main.tcl]]} {\n"
|
||||
|
@ -1179,8 +1179,8 @@ static int
|
|||
call_tclkit_init_script(Tcl_Interp *interp)
|
||||
{
|
||||
#if 0
|
||||
/* Currently, do nothing in this function.
|
||||
It's a memo (quoted from kitInit.c of Tclkit)
|
||||
/* Currently, do nothing in this function.
|
||||
It's a memo (quoted from kitInit.c of Tclkit)
|
||||
to support an initScript for Tcl interpreters in the future. */
|
||||
if (Tcl_EvalEx(interp, initScript, -1, TCL_EVAL_GLOBAL) == TCL_OK) {
|
||||
const char *encoding = NULL;
|
||||
|
@ -1247,7 +1247,7 @@ setup_rubytkkit()
|
|||
/* rbtk_win32_SetHINSTANCE("tcltklib.so"); */
|
||||
{
|
||||
volatile VALUE basename;
|
||||
basename = rb_funcall(rb_cFile, rb_intern("basename"), 1,
|
||||
basename = rb_funcall(rb_cFile, rb_intern("basename"), 1,
|
||||
rb_str_new2(rb_sourcefile()));
|
||||
rbtk_win32_SetHINSTANCE(RSTRING_PTR(basename));
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
((__GNUC__ <= 3) && (__GNUC_MINOR__ < 4)) || \
|
||||
((__GNUC__ <= 3) && (__GNUC_MINOR__ <= 4) && (__GNUC_PATCHLEVEL__ <= 4)))
|
||||
|
||||
#if (defined(__GNUC__)) && (GNUC_OLDER_3_4_4)
|
||||
#if (defined(__GNUC__)) && (GNUC_OLDER_3_4_4)
|
||||
#ifndef NONAMELESSUNION
|
||||
#define NONAMELESSUNION 1
|
||||
#endif
|
||||
|
@ -56,13 +56,13 @@
|
|||
#define DOUTI(x) fprintf(stderr, "[%ld]:" #x "=%d\n",__LINE__,x)
|
||||
#define DOUTD(x) fprintf(stderr, "[%d]:" #x "=%f\n",__LINE__,x)
|
||||
|
||||
#if (defined(__GNUC__)) && (GNUC_OLDER_3_4_4)
|
||||
#if (defined(__GNUC__)) && (GNUC_OLDER_3_4_4)
|
||||
#define V_UNION1(X, Y) ((X)->u.Y)
|
||||
#else
|
||||
#define V_UNION1(X, Y) ((X)->Y)
|
||||
#endif
|
||||
|
||||
#if (defined(__GNUC__)) && (GNUC_OLDER_3_4_4)
|
||||
#if (defined(__GNUC__)) && (GNUC_OLDER_3_4_4)
|
||||
#undef V_UNION
|
||||
#define V_UNION(X,Y) ((X)->n1.n2.n3.Y)
|
||||
|
||||
|
@ -1105,7 +1105,7 @@ ole_hresult2msg(HRESULT hr)
|
|||
dwCount = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||
FORMAT_MESSAGE_FROM_SYSTEM |
|
||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
NULL, hr,
|
||||
NULL, hr,
|
||||
MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
|
||||
(LPTSTR)&p_msg, 0, NULL);
|
||||
if (dwCount == 0) {
|
||||
|
|
|
@ -219,7 +219,7 @@ static VALUE rb_gzreader_each(int, VALUE*, VALUE);
|
|||
static VALUE rb_gzreader_readlines(int, VALUE*, VALUE);
|
||||
#endif /* GZIP_SUPPORT */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Document-module: Zlib
|
||||
*
|
||||
* == Overview
|
||||
|
@ -227,7 +227,7 @@ static VALUE rb_gzreader_readlines(int, VALUE*, VALUE);
|
|||
* Access to the zlib library.
|
||||
*
|
||||
* == Class tree
|
||||
*
|
||||
*
|
||||
* - Zlib::Deflate
|
||||
* - Zlib::Inflate
|
||||
* - Zlib::ZStream
|
||||
|
@ -1264,7 +1264,7 @@ rb_deflate_s_allocate(VALUE klass)
|
|||
* filter (or predictor), HUFFMAN_ONLY to force Huffman encoding only (no
|
||||
* string match).
|
||||
*
|
||||
* == Description
|
||||
* == Description
|
||||
*
|
||||
* Creates a new deflate stream for compression. See zlib.h for details of
|
||||
* each argument. If an argument is nil, the default value of that argument is
|
||||
|
@ -1276,14 +1276,14 @@ rb_deflate_s_allocate(VALUE klass)
|
|||
* === basic
|
||||
*
|
||||
* f = File.new("compressed.file","w+")
|
||||
* #=> #<File:compressed.file>
|
||||
* #=> #<File:compressed.file>
|
||||
* f << Zlib::Deflate.new().deflate(File.read("big.file"))
|
||||
* #=> #<File:compressed.file>
|
||||
* #=> #<File:compressed.file>
|
||||
* f.close
|
||||
* #=> nil
|
||||
* #=> nil
|
||||
*
|
||||
* === a little more robust
|
||||
*
|
||||
*
|
||||
* compressed_file = File.open("compressed.file", "w+")
|
||||
* #=> #<File:compressed.file>
|
||||
* zd = Zlib::Deflate.new(Zlib::BEST_COMPRESSION, 15, Zlib::MAX_MEM_LEVEL, Zlib::HUFFMAN_ONLY)
|
||||
|
@ -1423,7 +1423,7 @@ do_deflate(struct zstream *z, VALUE src, int flush)
|
|||
* call-seq: deflate(string[, flush])
|
||||
*
|
||||
* == Arguments
|
||||
*
|
||||
*
|
||||
* +string+::
|
||||
* String
|
||||
*
|
||||
|
@ -1446,7 +1446,7 @@ do_deflate(struct zstream *z, VALUE src, int flush)
|
|||
* == Usage
|
||||
*
|
||||
* comp = Zlib.deflate(File.read("big.file"))
|
||||
* or
|
||||
* or
|
||||
* comp = Zlib.deflate(File.read("big.file"), Zlib::FULL_FLUSH)
|
||||
*
|
||||
*/
|
||||
|
@ -1611,7 +1611,7 @@ rb_inflate_s_allocate(VALUE klass)
|
|||
}
|
||||
|
||||
/*
|
||||
* Document-method: Zlib::Inflate.new
|
||||
* Document-method: Zlib::Inflate.new
|
||||
*
|
||||
* call-seq: Zlib::Inflate.new(window_bits)
|
||||
*
|
||||
|
@ -1639,7 +1639,7 @@ rb_inflate_s_allocate(VALUE klass)
|
|||
* zi.close
|
||||
* cf.close
|
||||
*
|
||||
* or
|
||||
* or
|
||||
*
|
||||
* File.open("compressed.file") {|cf|
|
||||
* zi = Zlib::Inflate.new
|
||||
|
@ -4027,13 +4027,13 @@ Init_zlib()
|
|||
rb_define_method(cZStream, "flush_next_out", rb_zstream_flush_next_out, 0);
|
||||
|
||||
/* Integer representing date types which
|
||||
* ZStream#data_type method returns */
|
||||
* ZStream#data_type method returns */
|
||||
rb_define_const(mZlib, "BINARY", INT2FIX(Z_BINARY));
|
||||
/* Integer representing date types which
|
||||
* ZStream#data_type method returns */
|
||||
* ZStream#data_type method returns */
|
||||
rb_define_const(mZlib, "ASCII", INT2FIX(Z_ASCII));
|
||||
/* Integer representing date types which
|
||||
* ZStream#data_type method returns */
|
||||
* ZStream#data_type method returns */
|
||||
rb_define_const(mZlib, "UNKNOWN", INT2FIX(Z_UNKNOWN));
|
||||
|
||||
cDeflate = rb_define_class_under(mZlib, "Deflate", cZStream);
|
||||
|
@ -4317,7 +4317,7 @@ Init_zlib()
|
|||
*
|
||||
* Subclass of Zlib::Error
|
||||
*
|
||||
* When zlib returns a Z_STREAM_ERROR,
|
||||
* When zlib returns a Z_STREAM_ERROR,
|
||||
* usually if the stream state was inconsistent.
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -274,7 +274,7 @@ extern char **rb_w32_get_environ(void);
|
|||
extern void rb_w32_free_environ(char **);
|
||||
extern int rb_w32_map_errno(DWORD);
|
||||
extern char * WSAAPI rb_w32_inet_ntop(int,void *,char *,size_t);
|
||||
extern DWORD rb_w32_osver(void);
|
||||
extern DWORD rb_w32_osver(void);
|
||||
|
||||
extern int chown(const char *, int, int);
|
||||
extern int rb_w32_uchown(const char *, int, int);
|
||||
|
|
4
io.c
4
io.c
|
@ -7795,7 +7795,7 @@ rb_io_fcntl(int argc, VALUE *argv, VALUE io)
|
|||
* +String+ objects or +Integer+ objects. A +String+ object is passed
|
||||
* as a pointer to the byte sequence. An +Integer+ object is passed
|
||||
* as an integer whose bit size is same as a pointer.
|
||||
* Up to nine parameters may be passed (14 on the Atari-ST).
|
||||
* Up to nine parameters may be passed (14 on the Atari-ST).
|
||||
*
|
||||
* The function identified by _num_ is system
|
||||
* dependent. On some Unix systems, the numbers may be obtained from a
|
||||
|
@ -7854,7 +7854,7 @@ rb_f_syscall(int argc, VALUE *argv)
|
|||
int num, retval = -1;
|
||||
#endif
|
||||
int i;
|
||||
|
||||
|
||||
if (RTEST(ruby_verbose)) {
|
||||
rb_warning("We plan to remove a syscall function at future release. DL(Fiddle) provides safer alternative.");
|
||||
}
|
||||
|
|
|
@ -266,7 +266,7 @@ end
|
|||
# ERB::Compiler
|
||||
class ERB
|
||||
# = ERB::Compiler
|
||||
#
|
||||
#
|
||||
# Compiles ERB templates into Ruby code; the compiled code produces the
|
||||
# template result when evaluated. ERB::Compiler provides hooks to define how
|
||||
# generated output is handled.
|
||||
|
@ -308,7 +308,7 @@ class ERB
|
|||
#
|
||||
# obj = 'It'
|
||||
# eval code
|
||||
#
|
||||
#
|
||||
# Evaluate using an input:
|
||||
#
|
||||
# mod = Module.new
|
||||
|
|
|
@ -154,7 +154,7 @@ module IRB
|
|||
begin
|
||||
candidates = []
|
||||
rec = eval(receiver, bind)
|
||||
if sep == "::" and rec.kind_of?(Module)
|
||||
if sep == "::" and rec.kind_of?(Module)
|
||||
candidates = rec.constants.collect{|m| m.to_s}
|
||||
end
|
||||
candidates |= rec.methods.collect{|m| m.to_s}
|
||||
|
|
|
@ -112,9 +112,9 @@ module IRB
|
|||
|
||||
# @CONF[:LC_MESSAGES] = "en"
|
||||
@CONF[:LC_MESSAGES] = Locale.new
|
||||
|
||||
|
||||
@CONF[:AT_EXIT] = []
|
||||
|
||||
|
||||
@CONF[:DEBUG_LEVEL] = 1
|
||||
end
|
||||
|
||||
|
@ -160,7 +160,7 @@ module IRB
|
|||
opt = $1 || ARGV.shift
|
||||
set_encoding(*opt.split(':', 2))
|
||||
when "--inspect"
|
||||
if /^-/ !~ ARGV.first
|
||||
if /^-/ !~ ARGV.first
|
||||
@CONF[:INSPECT_MODE] = ARGV.shift
|
||||
else
|
||||
@CONF[:INSPECT_MODE] = true
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#
|
||||
# --
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
module IRB
|
||||
|
@ -57,13 +57,13 @@ module IRB
|
|||
# else
|
||||
# inspector = IRB::Inspector(block, init_p)
|
||||
# end
|
||||
|
||||
|
||||
if block_given?
|
||||
inspector = IRB::Inspector(block, arg)
|
||||
else
|
||||
inspector = arg
|
||||
end
|
||||
|
||||
|
||||
case key
|
||||
when Array
|
||||
for k in key
|
||||
|
@ -81,7 +81,7 @@ module IRB
|
|||
end
|
||||
|
||||
INSPECTORS.def_inspector([false, :to_s, :raw]){|v| v.to_s}
|
||||
INSPECTORS.def_inspector([true, :p, :inspect]){|v|
|
||||
INSPECTORS.def_inspector([true, :p, :inspect]){|v|
|
||||
begin
|
||||
v.inspect
|
||||
rescue NoMethodError
|
||||
|
@ -89,7 +89,7 @@ module IRB
|
|||
end
|
||||
}
|
||||
INSPECTORS.def_inspector([:pp, :pretty_inspect], proc{require "pp"}){|v| v.pretty_inspect.chomp}
|
||||
INSPECTORS.def_inspector([:yaml, :YAML], proc{require "yaml"}){|v|
|
||||
INSPECTORS.def_inspector([:yaml, :YAML], proc{require "yaml"}){|v|
|
||||
begin
|
||||
YAML.dump(v)
|
||||
rescue
|
||||
|
@ -98,12 +98,12 @@ module IRB
|
|||
end
|
||||
}
|
||||
|
||||
INSPECTORS.def_inspector([:marshal, :Marshal, :MARSHAL, Marshal]){|v|
|
||||
INSPECTORS.def_inspector([:marshal, :Marshal, :MARSHAL, Marshal]){|v|
|
||||
Marshal.dump(v)
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ module IRB
|
|||
end
|
||||
|
||||
# @param paths load paths in which IRB find a localized file.
|
||||
# @param dir directory
|
||||
# @param dir directory
|
||||
# @param file basename to be localized
|
||||
#
|
||||
# typically, for the parameters and a <path> in paths, it searches
|
||||
|
|
|
@ -1100,7 +1100,7 @@ class RubyLex
|
|||
@indent = 0
|
||||
@indent_stack = []
|
||||
@lex_state = EXPR_BEG
|
||||
|
||||
|
||||
loop do
|
||||
@continue = false
|
||||
prompt
|
||||
|
@ -1119,7 +1119,7 @@ class RubyLex
|
|||
@quoted = reserve_quoted
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def identify_comment
|
||||
@ltype = "#"
|
||||
|
||||
|
|
|
@ -601,7 +601,7 @@ int main() {printf("%d\\n", conftest_const); return 0;}
|
|||
end
|
||||
|
||||
# You should use +have_func+ rather than +try_func+.
|
||||
#
|
||||
#
|
||||
# [+func+] a String which contains a symbol name
|
||||
# [+libs+] a String which contains library names.
|
||||
# [+headers+] a String or an Array of strings which contains
|
||||
|
@ -691,7 +691,7 @@ def macro_defined?(macro, src, opt = "", &b)
|
|||
SRC
|
||||
end
|
||||
|
||||
# Returns whether or not
|
||||
# Returns whether or not
|
||||
# * the +src+ can be compiled as a C source,
|
||||
# * the result object can be linked with its depending libraries successfully,
|
||||
# * the linked file can be invoked as an executable
|
||||
|
@ -1754,7 +1754,7 @@ end
|
|||
|
||||
# Processes the data contents of the "depend" file.
|
||||
# Each line of this file is expected to be a file name.
|
||||
#
|
||||
#
|
||||
# Returns the output of findings, in Makefile format.
|
||||
#
|
||||
def depend_rules(depend)
|
||||
|
|
|
@ -313,7 +313,7 @@ module Net
|
|||
@receiver_thread.join
|
||||
synchronize do
|
||||
unless @sock.closed?
|
||||
@sock.close
|
||||
@sock.close
|
||||
end
|
||||
end
|
||||
raise e if e
|
||||
|
|
|
@ -90,7 +90,7 @@ class RDoc::Markup::FormatterTestCase < MiniTest::Unit::TestCase
|
|||
|
||||
##
|
||||
# Calls start_accepting which needs to verify startup state
|
||||
|
||||
|
||||
def test_start_accepting
|
||||
@to.start_accepting
|
||||
|
||||
|
@ -100,7 +100,7 @@ class RDoc::Markup::FormatterTestCase < MiniTest::Unit::TestCase
|
|||
##
|
||||
# Calls end_accepting on your test case which needs to call
|
||||
# <tt>@to.end_accepting</tt> and verify document generation
|
||||
|
||||
|
||||
def test_end_accepting
|
||||
@to.start_accepting
|
||||
@to.res << 'hi'
|
||||
|
@ -196,7 +196,7 @@ class RDoc::Markup::FormatterTestCase < MiniTest::Unit::TestCase
|
|||
@to.start_accepting
|
||||
|
||||
@to.accept_heading @RM::Heading.new(1, '\\Hello')
|
||||
|
||||
|
||||
accept_heading_suppressed_crossref
|
||||
end
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ class RDoc::Parser
|
|||
end
|
||||
|
||||
##
|
||||
# Creates a new Parser storing +top_level+, +file_name+, +content+,
|
||||
# Creates a new Parser storing +top_level+, +file_name+, +content+,
|
||||
# +options+ and +stats+ in instance variables.
|
||||
#
|
||||
# Usually invoked by +super+
|
||||
|
|
|
@ -1560,7 +1560,7 @@ class RDoc::Parser::Ruby < RDoc::Parser
|
|||
else
|
||||
new_methods = []
|
||||
|
||||
case vis_type
|
||||
case vis_type
|
||||
when 'module_function' then
|
||||
args = parse_symbol_arg
|
||||
container.set_visibility_for args, :private, false
|
||||
|
|
|
@ -407,7 +407,7 @@ class RDoc::RubyLex
|
|||
(ch = getc)
|
||||
res << ch
|
||||
end
|
||||
|
||||
|
||||
gets # consume =end
|
||||
|
||||
@ltype = nil
|
||||
|
|
|
@ -50,7 +50,7 @@ class Gem::Commands::ServerCommand < Gem::Command
|
|||
options[:addresses].push(*address)
|
||||
end
|
||||
|
||||
add_option '-l', '--launch[=COMMAND]',
|
||||
add_option '-l', '--launch[=COMMAND]',
|
||||
'launches a browser window',
|
||||
"COMMAND defaults to 'start' on Windows",
|
||||
"and 'open' on all other platforms" do |launch, options|
|
||||
|
|
|
@ -19,7 +19,7 @@ class Gem::Ext::Builder
|
|||
|
||||
def self.make(dest_path, results)
|
||||
unless File.exist? 'Makefile' then
|
||||
raise Gem::InstallError, "Makefile not found:\n\n#{results.join "\n"}"
|
||||
raise Gem::InstallError, "Makefile not found:\n\n#{results.join "\n"}"
|
||||
end
|
||||
|
||||
mf = File.read('Makefile')
|
||||
|
|
|
@ -236,7 +236,7 @@ class Gem::Package::TarWriter
|
|||
name = newname
|
||||
|
||||
if name.size > 100 or prefix.size > 155 then
|
||||
raise Gem::Package::TooLongFileName
|
||||
raise Gem::Package::TooLongFileName
|
||||
end
|
||||
end
|
||||
|
||||
|
|
20
lib/set.rb
20
lib/set.rb
|
@ -482,35 +482,35 @@ class Set
|
|||
end
|
||||
end
|
||||
|
||||
#
|
||||
#
|
||||
# SortedSet implements a Set that guarantees that it's element are
|
||||
# yielded in sorted order (according to the return values of their
|
||||
# #<=> methods) when iterating over them.
|
||||
#
|
||||
#
|
||||
# All elements that are added to a SortedSet must respond to the <=>
|
||||
# method for comparison.
|
||||
#
|
||||
#
|
||||
# Also, all elements must be <em>mutually comparable</em>: <tt>el1 <=>
|
||||
# el2</tt> must not return <tt>nil</tt> for any elements <tt>el1</tt>
|
||||
# and <tt>el2</tt>, else an ArgumentError will be raised when
|
||||
# iterating over the SortedSet.
|
||||
#
|
||||
# == Example
|
||||
#
|
||||
#
|
||||
# require "set"
|
||||
#
|
||||
#
|
||||
# set = SortedSet.new([2, 1, 5, 6, 4, 5, 3, 3, 3])
|
||||
# ary = []
|
||||
#
|
||||
#
|
||||
# set.each do |obj|
|
||||
# ary << obj
|
||||
# end
|
||||
#
|
||||
#
|
||||
# p ary # => [1, 2, 3, 4, 5, 6]
|
||||
#
|
||||
#
|
||||
# set2 = SortedSet.new([1, 2, "3"])
|
||||
# set2.each { |obj| } # => raises ArgumentError: comparison of Fixnum with String failed
|
||||
#
|
||||
#
|
||||
class SortedSet < Set
|
||||
@@setup = false
|
||||
|
||||
|
@ -535,7 +535,7 @@ class SortedSet < Set
|
|||
@hash = RBTree.new
|
||||
super
|
||||
end
|
||||
|
||||
|
||||
def add(o)
|
||||
o.respond_to?(:<=>) or raise ArgumentError, "value must respond to <=>"
|
||||
super
|
||||
|
|
|
@ -19,10 +19,10 @@ require "e2mmap.rb"
|
|||
# STDERR.puts "Thread #{t} has terminated."
|
||||
# end
|
||||
#
|
||||
#
|
||||
#
|
||||
# th = ThreadsWait.new(thread1,...)
|
||||
# th.next_wait # next one to be done
|
||||
#
|
||||
#
|
||||
#
|
||||
class ThreadsWait
|
||||
RCS_ID='-$Id: thwait.rb,v 1.3 1998/06/26 03:19:34 keiju Exp keiju $-'
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# tracer.rb -
|
||||
# tracer.rb -
|
||||
# $Release Version: 0.3$
|
||||
# $Revision: 1.12 $
|
||||
# by Keiju ISHITSUKA(keiju@ishitsuka.com)
|
||||
#
|
||||
# --
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
require "thread"
|
||||
|
||||
|
@ -136,7 +136,7 @@ class Tracer
|
|||
return unless p.call event, file, line, id, binding, klass
|
||||
end
|
||||
|
||||
return unless Tracer::display_c_call? or
|
||||
return unless Tracer::display_c_call? or
|
||||
event != "c-call" && event != "c-return"
|
||||
|
||||
Tracer::stdout_mutex.synchronize do
|
||||
|
@ -151,7 +151,7 @@ class Tracer
|
|||
printf("%s:%d:%s:%s: %s",
|
||||
file,
|
||||
line,
|
||||
klass || '',
|
||||
klass || '',
|
||||
EVENT_SYMBOL[event],
|
||||
source)
|
||||
end
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
#
|
||||
|
||||
module URI
|
||||
#
|
||||
#
|
||||
# Includes URI::REGEXP::PATTERN
|
||||
#
|
||||
#
|
||||
module REGEXP
|
||||
#
|
||||
# Patterns used to parse URI's
|
||||
|
@ -111,7 +111,7 @@ module URI
|
|||
# see also URI::Parser.initialize_pattern
|
||||
attr_reader :pattern
|
||||
|
||||
# The Hash of Regexp
|
||||
# The Hash of Regexp
|
||||
#
|
||||
# see also URI::Parser.initialize_regexp
|
||||
attr_reader :regexp
|
||||
|
@ -197,7 +197,7 @@ module URI
|
|||
#
|
||||
# == Description
|
||||
#
|
||||
# parses +uri+ and constructs either matching URI scheme object
|
||||
# parses +uri+ and constructs either matching URI scheme object
|
||||
# (FTP, HTTP, HTTPS, LDAP, LDAPS, or MailTo) or URI::Generic
|
||||
#
|
||||
# == Usage
|
||||
|
@ -237,7 +237,7 @@ module URI
|
|||
uris.inject :merge
|
||||
end
|
||||
|
||||
#
|
||||
#
|
||||
# :call-seq:
|
||||
# extract( str )
|
||||
# extract( str, schemes )
|
||||
|
@ -279,7 +279,7 @@ module URI
|
|||
end
|
||||
end
|
||||
|
||||
#
|
||||
#
|
||||
# :call-seq:
|
||||
# escape( str )
|
||||
# escape( str, unsafe )
|
||||
|
@ -311,7 +311,7 @@ module URI
|
|||
end.force_encoding(Encoding::US_ASCII)
|
||||
end
|
||||
|
||||
#
|
||||
#
|
||||
# :call-seq:
|
||||
# unescape( str )
|
||||
# unescape( str, unsafe )
|
||||
|
|
|
@ -151,7 +151,7 @@ module URI
|
|||
end
|
||||
end
|
||||
|
||||
# typecode accessor
|
||||
# typecode accessor
|
||||
#
|
||||
# see URI::FTP::COMPONENT
|
||||
attr_reader :typecode
|
||||
|
|
|
@ -251,7 +251,7 @@ module URI
|
|||
# returns the port component of the URI.
|
||||
#
|
||||
# URI("http://foo/bar/baz").port #=> "80"
|
||||
#
|
||||
#
|
||||
# URI("http://foo:8080/bar/baz").port #=> "8080"
|
||||
#
|
||||
attr_reader :port
|
||||
|
@ -265,13 +265,13 @@ module URI
|
|||
# returns the path component of the URI.
|
||||
#
|
||||
# URI("http://foo/bar/baz").path #=> "/bar/baz"
|
||||
#
|
||||
#
|
||||
attr_reader :path
|
||||
|
||||
# returns the query component of the URI.
|
||||
#
|
||||
# URI("http://foo/bar/baz?search=FooBar").query #=> "search=FooBar"
|
||||
#
|
||||
#
|
||||
attr_reader :query
|
||||
|
||||
# returns the opaque part of the URI.
|
||||
|
@ -287,7 +287,7 @@ module URI
|
|||
# returns the fragment component of the URI.
|
||||
#
|
||||
# URI("http://foo/bar/baz?search=FooBar#ponies").fragment #=> "ponies"
|
||||
#
|
||||
#
|
||||
attr_reader :fragment
|
||||
|
||||
# returns the parser to be used.
|
||||
|
@ -518,7 +518,7 @@ module URI
|
|||
# (with validation)
|
||||
#
|
||||
# see also URI::Generic.userinfo=
|
||||
#
|
||||
#
|
||||
def set_userinfo(user, password = nil)
|
||||
unless password
|
||||
user, password = split_userinfo(user)
|
||||
|
@ -1081,7 +1081,7 @@ module URI
|
|||
end
|
||||
private :split_path
|
||||
|
||||
#
|
||||
#
|
||||
# Merges a base path +base+, with relative path +rel+,
|
||||
# returns a modified base path.
|
||||
#
|
||||
|
|
|
@ -151,7 +151,7 @@ module WEBrick
|
|||
# at directory +root+
|
||||
#
|
||||
# If +options+ is a Hash the following keys are allowed:
|
||||
#
|
||||
#
|
||||
# :AcceptableLanguages:: Array of languages allowed for accept-language
|
||||
# :DirectoryCallback:: Allows preprocessing of directory requests
|
||||
# :FancyIndexing:: If true, show an index for directories
|
||||
|
@ -166,7 +166,7 @@ module WEBrick
|
|||
#
|
||||
# If +options+ is true or false then +:FancyIndexing+ is enabled or
|
||||
# disabled respectively.
|
||||
|
||||
|
||||
def initialize(server, root, options={}, default=Config::FileHandler)
|
||||
@config = server.config
|
||||
@logger = @config[:Logger]
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'dbm'
|
|||
module YAML
|
||||
|
||||
# YAML + DBM = YDBM
|
||||
#
|
||||
#
|
||||
# YAML::DBM provides the same interface as ::DBM.
|
||||
#
|
||||
# However, while DBM only allows strings for both keys and values,
|
||||
|
@ -199,7 +199,7 @@ class DBM < ::DBM
|
|||
a
|
||||
end
|
||||
|
||||
|
||||
|
||||
# Converts the contents of the database to an in-memory Hash object, and
|
||||
# returns it.
|
||||
def to_hash
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
This implementation of the PWB library alloca() function,
|
||||
which is used to allocate space off the run-time stack so
|
||||
that it is automatically reclaimed upon procedure exit,
|
||||
that it is automatically reclaimed upon procedure exit,
|
||||
was inspired by discussions with J. Q. Johnson of Cornell.
|
||||
|
||||
It should work under any C implementation that uses an
|
||||
|
|
|
@ -27,7 +27,7 @@ int
|
|||
flock(int fd, int operation)
|
||||
{
|
||||
struct flock lock;
|
||||
|
||||
|
||||
switch (operation & ~LOCK_NB) {
|
||||
case LOCK_SH:
|
||||
lock.l_type = F_RDLCK;
|
||||
|
@ -44,7 +44,7 @@ flock(int fd, int operation)
|
|||
}
|
||||
lock.l_whence = SEEK_SET;
|
||||
lock.l_start = lock.l_len = 0L;
|
||||
|
||||
|
||||
return fcntl(fd, (operation & LOCK_NB) ? F_SETLK : F_SETLKW, &lock);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ isinf(double n)
|
|||
#include <ieeefp.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
/*
|
||||
* isinf may be provided only as a macro.
|
||||
* ex. HP-UX, Solaris 10
|
||||
* http://www.gnu.org/software/automake/manual/autoconf/Function-Portability.html
|
||||
|
|
|
@ -65,7 +65,7 @@ nl_langinfo_codeset(void)
|
|||
{
|
||||
const char *l, *p;
|
||||
int n;
|
||||
|
||||
|
||||
if (((l = getenv("LC_ALL")) && *l) ||
|
||||
((l = getenv("LC_CTYPE")) && *l) ||
|
||||
((l = getenv("LANG")) && *l)) {
|
||||
|
|
|
@ -94,14 +94,14 @@ char *cmd;
|
|||
if (*s == '=')
|
||||
goto doshell; */
|
||||
for (s = cmd; *s; s++) {
|
||||
if (*sw == '-' && *s != ' ' &&
|
||||
if (*sw == '-' && *s != ' ' &&
|
||||
!isalpha(*s) && index("$&*(){}[]'\";\\|?<>~`\n",*s)) {
|
||||
if (*s == '\n' && !s[1]) {
|
||||
*s = '\0';
|
||||
break;
|
||||
}
|
||||
goto doshell;
|
||||
} else if (*sw == '/' && *s != ' ' &&
|
||||
} else if (*sw == '/' && *s != ' ' &&
|
||||
!isalpha(*s) && index("^()<>|&\n",*s)) {
|
||||
if (*s == '\n' && !s[1]) {
|
||||
*s = '\0';
|
||||
|
|
|
@ -572,7 +572,7 @@ num_to_int(VALUE num)
|
|||
*
|
||||
* Floating point has a different arithmetic and is a inexact number.
|
||||
* So you should know its esoteric system. see following:
|
||||
*
|
||||
*
|
||||
* - http://docs.sun.com/source/806-3568/ncg_goldberg.html
|
||||
* - http://wiki.github.com/rdp/ruby_tutorials_core/ruby-talk-faq#floats_imprecise
|
||||
* - http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
|
||||
|
|
12
pack.c
12
pack.c
|
@ -328,7 +328,7 @@ static unsigned long utf8_to_uv(const char*,long*);
|
|||
* | |
|
||||
* U | Integer | UTF-8 character
|
||||
* w | Integer | BER-compressed integer
|
||||
*
|
||||
*
|
||||
* Float | |
|
||||
* Directive | | Meaning
|
||||
* ---------------------------------------------------------------------------
|
||||
|
@ -338,7 +338,7 @@ static unsigned long utf8_to_uv(const char*,long*);
|
|||
* e | Float | single-precision, little-endian byte order
|
||||
* G | Float | double-precision, network (big-endian) byte order
|
||||
* g | Float | single-precision, network (big-endian) byte order
|
||||
*
|
||||
*
|
||||
* String | |
|
||||
* Directive | | Meaning
|
||||
* ---------------------------------------------------------------------------
|
||||
|
@ -355,7 +355,7 @@ static unsigned long utf8_to_uv(const char*,long*);
|
|||
* | | (if count is 0, no line feed are added, see RFC 4648)
|
||||
* P | String | pointer to a structure (fixed-length string)
|
||||
* p | String | pointer to a null-terminated string
|
||||
*
|
||||
*
|
||||
* Misc. | |
|
||||
* Directive | | Meaning
|
||||
* ---------------------------------------------------------------------------
|
||||
|
@ -1280,7 +1280,7 @@ infected_str_new(const char *ptr, long len, VALUE str)
|
|||
* | |
|
||||
* U | Integer | UTF-8 character
|
||||
* w | Integer | BER-compressed integer (see Array.pack)
|
||||
*
|
||||
*
|
||||
* Float | |
|
||||
* Directive | Returns | Meaning
|
||||
* -----------------------------------------------------------------
|
||||
|
@ -1290,7 +1290,7 @@ infected_str_new(const char *ptr, long len, VALUE str)
|
|||
* e | Float | single-precision, little-endian byte order
|
||||
* G | Float | double-precision, network (big-endian) byte order
|
||||
* g | Float | single-precision, network (big-endian) byte order
|
||||
*
|
||||
*
|
||||
* String | |
|
||||
* Directive | Returns | Meaning
|
||||
* -----------------------------------------------------------------
|
||||
|
@ -1307,7 +1307,7 @@ infected_str_new(const char *ptr, long len, VALUE str)
|
|||
* | | base64 encoded string (RFC 4648) if followed by 0
|
||||
* P | String | pointer to a structure (fixed-length string)
|
||||
* p | String | pointer to a null-terminated string
|
||||
*
|
||||
*
|
||||
* Misc. | |
|
||||
* Directive | Returns | Meaning
|
||||
* -----------------------------------------------------------------
|
||||
|
|
|
@ -19,7 +19,7 @@ class Thread
|
|||
|
||||
# call-seq:
|
||||
# Thread.exclusive { block } => obj
|
||||
#
|
||||
#
|
||||
# Wraps a block in Thread.critical, restoring the original value
|
||||
# upon exit from the critical section, and returns the value of the
|
||||
# block.
|
||||
|
|
2
random.c
2
random.c
|
@ -1203,7 +1203,7 @@ random_equal(VALUE self, VALUE other)
|
|||
* range.member(number) == true.
|
||||
*
|
||||
* Or else converts _max_ to an integer using max1 =
|
||||
* max<code>.to_i.abs</code>.
|
||||
* max<code>.to_i.abs</code>.
|
||||
*
|
||||
* Then if _max_ is +nil+ the result is zero, returns a pseudorandom floating
|
||||
* point number greater than or equal to 0.0 and less than 1.0.
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#!/usr/local/bin/ruby
|
||||
#
|
||||
# biorhythm.rb -
|
||||
# biorhythm.rb -
|
||||
# $Release Version: $
|
||||
# $Revision$
|
||||
# by Yasuo OHBA(STAFS Development Room)
|
||||
#
|
||||
# --
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
# probably based on:
|
||||
|
@ -91,7 +91,7 @@ display_period = options[:days]
|
|||
if ausgabeart == "v"
|
||||
print_header(bd.year, bd.month, bd.day, dd - bd, bd.strftime("%a"))
|
||||
print "\n"
|
||||
|
||||
|
||||
phys, emot, geist = get_position(dd - bd)
|
||||
printf "Biorhythm: %04d.%02d.%02d\n", dd.year, dd.month, dd.day
|
||||
printf "Physical: %d%%\n", phys
|
||||
|
@ -104,10 +104,10 @@ else
|
|||
print " -------------------------+-------------------------\n"
|
||||
print " Bad Condition | Good Condition\n"
|
||||
print " -------------------------+-------------------------\n"
|
||||
|
||||
|
||||
(dd - bd).step(dd - bd + display_period) do |z|
|
||||
phys, emot, geist = get_position(z)
|
||||
|
||||
|
||||
printf "%04d.%02d.%02d : ", dd.year, dd.month, dd.day
|
||||
p = (phys / 2.0 + 0.5).to_i
|
||||
e = (emot / 2.0 + 0.5).to_i
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue