summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-12-14 09:00:08 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-12-14 09:00:08 +0000
commit17a5fa1b4344199cef86c2cea4f1ba35f021593d (patch)
treea85bb7fdd3bbae60a1a69b2efa898ce949f8e2ac /ext
parent11187ce939d94c3a2f6d9239114c2696a8271834 (diff)
1.1c final (hopefully)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/extmk.rb.in15
-rw-r--r--ext/tk/lib/tkfont.rb31
2 files changed, 25 insertions, 21 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index b60951538d..e1623529b6 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -313,11 +313,11 @@ archdir = $(pkglibdir)/@arch@
mfile.printf $objs.join(" ")
mfile.printf "\n"
- mfile.printf "\
-TARGET = %s.%s
+ mfile.printf << EOS
+TARGET = #{target}.#{$static ? "a" : "@DLEXT@"}
-INSTALL = %s@INSTALL@
-INSTALL_DATA = %s@INSTALL_DATA@
+INSTALL = #{$dots}@INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
binsuffix = @binsuffix@
@@ -328,16 +328,15 @@ clean:; @rm -f *.o *.a *.so *.sl
@rm -f core ruby$(binsuffix) *~
realclean: clean
-", target,
- if $static then "a" else "@DLEXT@" end, $dots, $dots
+EOS
- mfile.printf "\
+ mfile.printf <<EOS
install:
@test -d $(DESTDIR)$(libdir) || mkdir $(DESTDIR)$(libdir)
@test -d $(DESTDIR)$(pkglibdir) || mkdir $(DESTDIR)$(pkglibdir)
@test -d $(DESTDIR)$(archdir) || mkdir $(DESTDIR)$(archdir)
-"
+EOS
if !$static
mfile.printf "\
$(INSTALL) $(TARGET) $(DESTDIR)$(archdir)/$(TARGET)
diff --git a/ext/tk/lib/tkfont.rb b/ext/tk/lib/tkfont.rb
index 1c11f8f842..e0394dc880 100644
--- a/ext/tk/lib/tkfont.rb
+++ b/ext/tk/lib/tkfont.rb
@@ -26,9 +26,9 @@ class TkFont
when /^8\.*/
if window
- list(tk_call('font', 'families', '-displayof', window))
+ tk_split_simplelist(tk_call('font', 'families', '-displayof', window))
else
- list(tk_call('font', 'families'))
+ tk_split_simplelist(tk_call('font', 'families'))
end
end
end
@@ -64,7 +64,9 @@ class TkFont
def TkFont.init_widget_font(path, *args)
case (Tk::TK_VERSION)
when /^4\.*/
- conf = tk_split_list(tk_call(*args))
+ conf = tk_split_simplelist(tk_call(*args)).
+ find_all{|prop| prop[0..5]=='-font ' || prop[0..10]=='-kanjifont '}.
+ collect{|prop| tk_split_simplelist(prop)}
if font_inf = conf.assoc('-font')
ltn = font_inf[4]
ltn = nil if ltn == []
@@ -81,11 +83,13 @@ class TkFont
TkFont.new(ltn, knj).call_font_configure(path, *(args + [{}]))
when /^8\.*/
- conf = tk_split_list(tk_call(*args))
- unless font_inf = conf.assoc('-font')
+ font_prop = tk_split_simplelist(tk_call(*args)).find{|prop|
+ prop[0..5] == '-font '
+ }
+ unless font_prop
raise RuntimeError, "unknown option '-font'"
end
- fnt = font_inf[4]
+ fnt = tk_split_simplelist(font_prop)[4]
if fnt == []
TkFont.new(nil, nil).call_font_configure(path, *(args + [{}]))
else
@@ -343,7 +347,7 @@ class TkFont
if JAPANIZED_TK
@fontslot = {'font'=>@compoundfont}
tk_call('font', 'create', @compoundfont,
- '-compound', "#{@latinfont} #{@kanjifont}", *hash_kv(keys))
+ '-compound', [@latinfont, @kanjifont], *hash_kv(keys))
else
tk_call('font', 'create', @compoundfont)
latinkeys = {}
@@ -409,11 +413,12 @@ class TkFont
tk_call('font', 'actual', font, "-displayof", window, "-#{option}")
end
else
- l = tk_split_list(if window
- tk_call('font', 'actual', font, "-displayof", window)
- else
- tk_call('font', 'actual', font)
- end)
+ l = tk_split_simplelist(if window
+ tk_call('font', 'actual', font,
+ "-displayof", window)
+ else
+ tk_call('font', 'actual', font)
+ end)
r = []
while key=l.shift
if key == '-compound'
@@ -455,7 +460,7 @@ class TkFont
elsif option
tk_call('font', 'configure', font, "-#{option}")
else
- l = tk_split_list(tk_call('font', 'configure', font))
+ l = tk_split_simplelist(tk_call('font', 'configure', font))
r = []
while key=l.shift
if key == '-compound'