aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkeyboard-config/tests/ruby/find_match.rb
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-11-19 10:38:33 +0100
committermarha <marha@users.sourceforge.net>2012-11-19 10:38:33 +0100
commit24635abae6008bef13e30d798b3f33abab412770 (patch)
treee799fbde24e0fd935af76b0bc48d30ef69f75d54 /xorg-server/xkeyboard-config/tests/ruby/find_match.rb
parente0844ae8b5ef87049537a7e0ebff81acc2695256 (diff)
parent6ce1d8f0f8c23e186175a7c84c21d7bfbe168dc5 (diff)
downloadvcxsrv-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_match.rb')
-rw-r--r--xorg-server/xkeyboard-config/tests/ruby/find_match.rb84
1 files changed, 42 insertions, 42 deletions
diff --git a/xorg-server/xkeyboard-config/tests/ruby/find_match.rb b/xorg-server/xkeyboard-config/tests/ruby/find_match.rb
index 43af93482..10738fafd 100644
--- a/xorg-server/xkeyboard-config/tests/ruby/find_match.rb
+++ b/xorg-server/xkeyboard-config/tests/ruby/find_match.rb
@@ -1,42 +1,42 @@
-#!/usr/bin/ruby
-#
-# $Id$
-# The script finds best matching xkb_symbols in symbols/in
-#
-# Parameters: $0 - the name of the file with new xkb_symbols
-# $1 - max number of non-matching mappings (0 by default)
-#
-
-require "xkbparser.rb"
-
-baseDir = "../.."
-
-symbolsDir = "#{baseDir}/symbols"
-#symbolsDir = "."
-
-parser = Parser.new
-
-allSyms = parser.parse("#{symbolsDir}/inet")
-
-newSyms = parser.parse(ARGV[0])
-limit = ARGV[1].to_i
-
-newSyms.find_all do | key, value |
-
- if value.hidden?
- next
- end
-
- puts "Existing xkb_symbols matching #{key}: "
-
- sorted = allSyms.match_symbols(value,limit).sort_by do | symsName, diff |
- sprintf "%03d_%s", diff.size, symsName
- end
-
- sorted.find_all do | symsName, diff |
- puts " #{symsName}, up to #{allSyms[symsName].size} keys (difference #{diff.size})-> #{diff}"
- end
-
-end
-
-
+#!/usr/bin/ruby
+#
+# $Id$
+# The script finds best matching xkb_symbols in symbols/in
+#
+# Parameters: $0 - the name of the file with new xkb_symbols
+# $1 - max number of non-matching mappings (0 by default)
+#
+
+require "xkbparser.rb"
+
+baseDir = "../.."
+
+symbolsDir = "#{baseDir}/symbols"
+#symbolsDir = "."
+
+parser = Parser.new
+
+allSyms = parser.parse("#{symbolsDir}/inet")
+
+newSyms = parser.parse(ARGV[0])
+limit = ARGV[1].to_i
+
+newSyms.find_all do | key, value |
+
+ if value.hidden?
+ next
+ end
+
+ puts "Existing xkb_symbols matching #{key}: "
+
+ sorted = allSyms.match_symbols(value,limit).sort_by do | symsName, diff |
+ sprintf "%03d_%s", diff.size, symsName
+ end
+
+ sorted.find_all do | symsName, diff |
+ puts " #{symsName}, up to #{allSyms[symsName].size} keys (difference #{diff.size})-> #{diff}"
+ end
+
+end
+
+