diff options
author | marha <marha@users.sourceforge.net> | 2012-11-19 10:38:33 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-11-19 10:38:33 +0100 |
commit | 24635abae6008bef13e30d798b3f33abab412770 (patch) | |
tree | e799fbde24e0fd935af76b0bc48d30ef69f75d54 /xorg-server/xkeyboard-config/tests/ruby/find_fragments.rb | |
parent | e0844ae8b5ef87049537a7e0ebff81acc2695256 (diff) | |
parent | 6ce1d8f0f8c23e186175a7c84c21d7bfbe168dc5 (diff) | |
download | vcxsrv-24635abae6008bef13e30d798b3f33abab412770.tar.gz vcxsrv-24635abae6008bef13e30d798b3f33abab412770.tar.bz2 vcxsrv-24635abae6008bef13e30d798b3f33abab412770.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
Changed file permissions
dos -> unix
Conflicts:
libX11/include/X11/Xregion.h
libX11/src/ConvSel.c
libX11/src/CrGlCur.c
libX11/src/CrWindow.c
libX11/src/GetDflt.c
libX11/src/StrKeysym.c
libX11/src/Window.c
libX11/src/xkb/XKBBind.c
libX11/src/xkb/XKBGetMap.c
libX11/src/xkb/XKBSetGeom.c
libX11/src/xkb/XKBUse.c
libX11/src/xlibi18n/XimProto.h
libX11/src/xlibi18n/lcDynamic.c
libXdmcp/Key.c
libXdmcp/Write.c
libxcb/src/xcb_windefs.h
xkbcomp/keycodes.c
xkbcomp/xkbpath.c
xorg-server/hw/xwin/glx/winpriv.h
xorg-server/xkeyboard-config/rules/bin/ml1_s.sh
xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh
xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh
xorg-server/xkeyboard-config/rules/bin/ml_s.sh
xorg-server/xkeyboard-config/rules/bin/mln_s.sh
xorg-server/xkeyboard-config/rules/bin/mlnvn_s.sh
xorg-server/xkeyboard-config/rules/bin/mlv_s.sh
xorg-server/xkeyboard-config/rules/compat/.gitignore
Diffstat (limited to 'xorg-server/xkeyboard-config/tests/ruby/find_fragments.rb')
-rw-r--r-- | xorg-server/xkeyboard-config/tests/ruby/find_fragments.rb | 104 |
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}" |