summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-08-10 15:04:00 +0200
committerHans Hagen <pragma@wxs.nl>2009-08-10 15:04:00 +0200
commit06f543b2faef1df3adf5f00839e16942863f0376 (patch)
tree40d3c9f3939f1d97b4056a69c13976088e141d25 /scripts
parente31ad5bc5980ee238e41d64bfd3303d48fea30f8 (diff)
downloadcontext-06f543b2faef1df3adf5f00839e16942863f0376.tar.gz
beta 2009.08.10 15:04
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/ruby/base/tex.rb8
-rw-r--r--scripts/context/ruby/base/texutil.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb
index 4a60ad4c1..23db7f1e8 100644
--- a/scripts/context/ruby/base/tex.rb
+++ b/scripts/context/ruby/base/tex.rb
@@ -894,7 +894,7 @@ class TEX
def scantexpreamble(filename)
begin
- if FileTest.file?(filename) and tex = File.open(filename) then
+ if FileTest.file?(filename) and tex = File.open(filename,'rb') then
bomdone = false
while str = tex.gets and str.chomp! do
unless bomdone then
@@ -940,7 +940,7 @@ end
end
def scantexcontent(filename)
- if FileTest.file?(filename) and tex = File.open(filename) then
+ if FileTest.file?(filename) and tex = File.open(filename,'rb') then
while str = tex.gets do
case str.chomp
when /^\%/o then
@@ -1075,7 +1075,7 @@ end
end
def checkxmlfile(rawname)
- if FileTest.file?(rawname) && (xml = File.open(rawname)) then
+ if FileTest.file?(rawname) && (xml = File.open(rawname,'rb')) then
xml.each do |line|
case line
when /<\?context\-directive\s+(\S+)\s+(\S+)\s+(\S+)\s*(.*?)\s*\?>/o then
@@ -2011,7 +2011,7 @@ end
end
if true then # autopurge
begin
- File.open(File.suffixed(rawbase, 'tuo')) do |f|
+ File.open(File.suffixed(rawbase, 'tuo'),'rb') do |f|
ok = 0
f.each do |line|
case ok
diff --git a/scripts/context/ruby/base/texutil.rb b/scripts/context/ruby/base/texutil.rb
index 3775469ed..868e3ca16 100644
--- a/scripts/context/ruby/base/texutil.rb
+++ b/scripts/context/ruby/base/texutil.rb
@@ -1028,7 +1028,7 @@ class TeXUtil
tuifile = File.suffixed(filename,'tui')
if FileTest.file?(tuifile) then
report("parsing file #{tuifile}")
- if f = open(tuifile) then
+ if f = File.open(tuifile,'rb') then
f.each do |line|
case line.chomp
when /^f (.*)$/o then @plugins.reader('MyFiles', $1.splitdata)