aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkeyboard-config/tests/ruby/find_fragments.rb
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-11-19 10:16:38 +0100
committermarha <marha@users.sourceforge.net>2012-11-19 10:16:38 +0100
commit3744281b9ae8aa0ab86ceaee1afe8a603e3aeb2c (patch)
treef59b9749730728729691a8a1efd54dce95f0177c /xorg-server/xkeyboard-config/tests/ruby/find_fragments.rb
parent8d57b7fcb22cf1a52203ee57c745b64bba649249 (diff)
downloadvcxsrv-3744281b9ae8aa0ab86ceaee1afe8a603e3aeb2c.tar.gz
vcxsrv-3744281b9ae8aa0ab86ceaee1afe8a603e3aeb2c.tar.bz2
vcxsrv-3744281b9ae8aa0ab86ceaee1afe8a603e3aeb2c.zip
dos -> unix
Diffstat (limited to 'xorg-server/xkeyboard-config/tests/ruby/find_fragments.rb')
-rw-r--r--xorg-server/xkeyboard-config/tests/ruby/find_fragments.rb104
1 files changed, 52 insertions, 52 deletions
diff --git a/xorg-server/xkeyboard-config/tests/ruby/find_fragments.rb b/xorg-server/xkeyboard-config/tests/ruby/find_fragments.rb
index f991ad0ab..118de03be 100644
--- a/xorg-server/xkeyboard-config/tests/ruby/find_fragments.rb
+++ b/xorg-server/xkeyboard-config/tests/ruby/find_fragments.rb
@@ -1,52 +1,52 @@
-#!/usr/bin/ruby
-#
-# $Id$
-# The script finds the fragments
-#
-
-require "xkbparser.rb"
-
-baseDir = "../.."
-
-symbolsDir = "#{baseDir}/symbols"
-#symbolsDir = "."
-
-parser = Parser.new
-
-allSyms = parser.parse("#{symbolsDir}/inet")
-
-everything = allSyms.merge
-
-everything.filter(1)
-
-#numCombinations = 1
-
-#puts "everything:"
-
-#everything.find_all do | symName, keycodes |
-#puts "#{symName}, #{keycodes.length} mappings -> "
-# keycodes.find_all do | keycode, counter |
-# puts " #{keycode} -> #{counter} occurences"
-# end
-# numCombinations *= (keycodes.length + 1)
-#end
-
-#puts "Total mappings: #{everything.length}/#{everything.full_length()}, #{numCombinations} combinations"
-#
-
-numCombinations = 0
-allSyms.find_all do | symsName, symbols |
- puts "n: #{symsName}"
-
- # Counting only symbols which used more than once
- numDupSymbols = symbols.keys.inject(0) do | rv, keycode |
- c = everything.cardinality(keycode, symbols[keycode])
- puts "#{keycode} -> #{symbols[keycode]}, #{c}"
- (c > 0) ? rv : rv + 1
- end
-
- numCombinations += (1 << numDupSymbols)
- puts "l: #{symbols.length} d: #{numDupSymbols} c: #{numCombinations}"
-end
-
-puts "numCombinations: #{numCombinations}"
+#!/usr/bin/ruby
+#
+# $Id$
+# The script finds the fragments
+#
+
+require "xkbparser.rb"
+
+baseDir = "../.."
+
+symbolsDir = "#{baseDir}/symbols"
+#symbolsDir = "."
+
+parser = Parser.new
+
+allSyms = parser.parse("#{symbolsDir}/inet")
+
+everything = allSyms.merge
+
+everything.filter(1)
+
+#numCombinations = 1
+
+#puts "everything:"
+
+#everything.find_all do | symName, keycodes |
+#puts "#{symName}, #{keycodes.length} mappings -> "
+# keycodes.find_all do | keycode, counter |
+# puts " #{keycode} -> #{counter} occurences"
+# end
+# numCombinations *= (keycodes.length + 1)
+#end
+
+#puts "Total mappings: #{everything.length}/#{everything.full_length()}, #{numCombinations} combinations"
+#
+
+numCombinations = 0
+allSyms.find_all do | symsName, symbols |
+ puts "n: #{symsName}"
+
+ # Counting only symbols which used more than once
+ numDupSymbols = symbols.keys.inject(0) do | rv, keycode |
+ c = everything.cardinality(keycode, symbols[keycode])
+ puts "#{keycode} -> #{symbols[keycode]}, #{c}"
+ (c > 0) ? rv : rv + 1
+ end
+
+ numCombinations += (1 << numDupSymbols)
+ puts "l: #{symbols.length} d: #{numDupSymbols} c: #{numCombinations}"
+end
+
+puts "numCombinations: #{numCombinations}"