fantasdic r372 - in trunk: . lib/fantasdic/sources
- From: mblondel svn gnome org
- To: svn-commits-list gnome org
- Subject: fantasdic r372 - in trunk: . lib/fantasdic/sources
- Date: Sun, 4 Jan 2009 18:22:15 +0000 (UTC)
Author: mblondel
Date: Sun Jan 4 18:22:15 2009
New Revision: 372
URL: http://svn.gnome.org/viewvc/fantasdic?rev=372&view=rev
Log:
* lib/fantasdic/sources/dictd_file.rb: Now supports .dz files.
Modified:
trunk/ChangeLog
trunk/lib/fantasdic/sources/dictd_file.rb
Modified: trunk/lib/fantasdic/sources/dictd_file.rb
==============================================================================
--- trunk/lib/fantasdic/sources/dictd_file.rb (original)
+++ trunk/lib/fantasdic/sources/dictd_file.rb Sun Jan 4 18:22:15 2009
@@ -268,7 +268,7 @@
private
def get_definition(file, offset, len)
- file.seek(offset)
+ file.pos = offset
file.read(len)
end
@@ -287,8 +287,11 @@
elsif File.readable? dict_file
dict_file = File.new(dict_file)
else
- raise Source::SourceError,
- "dict.dz file not implemented yet"
+ begin
+ dict_file = Dictzip.new(dict_gz_file)
+ rescue DictzipError => e
+ raise Source::SourceError, e.to_s
+ end
end
index_file = DictdIndex.new(@config[:filename])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]