xkbdesc/tests/ruby find_match.rb,1.2,1.3 xkbparser.rb,1.1,1.2
"Sergey V. Oudaltsov" <xlibs-commit-u7BhqnqprCWvj1b/[email protected]>
| Newsgroups | gmane.comp.freedesktop.xlibs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Committed by: svu
Update of /cvs/xlibs/xkbdesc/tests/ruby
In directory kemper:/tmp/cvs-serv13143
Modified Files:
find_match.rb xkbparser.rb
Log Message:
rough xkb_symbols size is primted
Index: find_match.rb
===================================================================
RCS file: /cvs/xlibs/xkbdesc/tests/ruby/find_match.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- find_match.rb 22 Oct 2006 15:07:04 -0000 1.2
+++ find_match.rb 26 Oct 2006 22:56:06 -0000 1.3
@@ -30,7 +30,7 @@
end
sorted.find_all do | symsName, diff |
- puts " #{symsName} (difference #{diff.size})-> #{diff}"
+ puts " #{symsName}, up to #{allSyms[symsName].rough_size} keys (difference #{diff.size})-> #{diff}"
end
end
Index: xkbparser.rb
===================================================================
RCS file: /cvs/xlibs/xkbdesc/tests/ruby/xkbparser.rb,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xkbparser.rb 22 Oct 2006 12:31:59 -0000 1.1
+++ xkbparser.rb 26 Oct 2006 22:56:06 -0000 1.2
@@ -58,6 +58,16 @@
end
#
+ # Approximate size - does not take into account overlapping key definitions
+ #
+ def rough_size()
+ @includedSyms.inject(size) do | sum, symsName |
+ syms = @symbolsList[symsName]
+ syms.size + sum
+ end
+ end
+
+ #
# Create a hash including all elements of this hash which are not in the
# other hash, use symbols + and * for marking the elements which existed in
# the original hash (+ if not existed)