<html>
<body>
<div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream/src</tt></b></td></tr>
<tr><td><tt><a href="#file1">Makefile.am</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+2</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-2</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">b38a327ad8fa -> 425d9de21c78</td></tr>
<tr class="alt" style=";" ><td><tt><a href="#file2">Makefile.in</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+2</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-2</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">b38a327ad8fa -> 425d9de21c78</td></tr>
<tr><td><tt>drivers/<a href="#file3">genkeymap.pl</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+38</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-23</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">b38a327ad8fa -> 425d9de21c78</td></tr>
<tr><td></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+42</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-27</td><td></td></tr>
</table>
<small id="info" style="color: #888888;" >3 modified files</small><br />
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
Fix out-of-tree builds of the mac keymaps
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>Makefile.am</b></big> <small id="info" style="color: #888888;" >b38a327ad8fa -> 425d9de21c78</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/Makefile.am
+++ lxdream/src/Makefile.am
@@ -257,7 +257,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > $(mkdir_p) `dirname $@`
./genglsl $(srcdir)/pvr2/shaders.glsl $@
pvr2/shaders.h: pvr2/shaders.def
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-drivers/mac_keymap.h: drivers/mac_keymap.txt drivers/genkeymap.pl
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+drivers/mac_keymap.h: d<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >ckeysyms.h d</span>rivers/mac_keymap.txt drivers/genkeymap.pl
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > $(mkdir_p) `dirname $@`
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- $(srcdir)/drivers/genkeymap.pl mac $(srcdir)/drivers/mac_keymap.txt > $@
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ $(srcdir)/drivers/genkeymap.pl mac $(srcdir)/dckeysyms.h $(srcdir)/drivers/mac_keymap.txt $@
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >\ No newline at end of file
</small></pre></div>
<hr /><a name="file2" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>Makefile.in</b></big> <small id="info" style="color: #888888;" >b38a327ad8fa -> 425d9de21c78</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/Makefile.in
+++ lxdream/src/Makefile.in
@@ -3217,9 +3217,9 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > $(mkdir_p) `dirname $@`
./genglsl $(srcdir)/pvr2/shaders.glsl $@
pvr2/shaders.h: pvr2/shaders.def
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-drivers/mac_keymap.h: drivers/mac_keymap.txt drivers/genkeymap.pl
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+drivers/mac_keymap.h: d<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >ckeysyms.h d</span>rivers/mac_keymap.txt drivers/genkeymap.pl
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > $(mkdir_p) `dirname $@`
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- $(srcdir)/drivers/genkeymap.pl mac $(srcdir)/drivers/mac_keymap.txt > $@
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ $(srcdir)/drivers/genkeymap.pl mac $(srcdir)/dckeysyms.h $(srcdir)/drivers/mac_keymap.txt $@
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
</pre></div>
<hr /><a name="file3" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/drivers</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>genkeymap.pl</b></big> <small id="info" style="color: #888888;" >b38a327ad8fa -> 425d9de21c78</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/drivers/genkeymap.pl
+++ lxdream/src/drivers/genkeymap.pl
@@ -1,56 +1,71 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #!/usr/bin/perl
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > use POSIX;
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-my $dckeysymsfile = "dckeysyms.h";
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+if( $#ARGV != 3 ) {
+ die "Usage: genkeymap.pl <keysym-name> <dckeysyms.h> <keymap.txt> <output.h>\n";
+}
+
+my $name = shift();
+my $dckeysymsfile = shift();
+my $keymapfile = shift();
+my $outputfile = shift();
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > my %dcsyms = ();
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-open DCKB, "<$dckeysymsfile" || die "Unable to open keysym file $dckeysymsfile";
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+my %hash = ();
+my %rhash = ();
+
+open(DCKB, "<$dckeysymsfile") || die "Unable to open dckeysym file $dckeysymsfile";
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > while(<DCKB>) {
if( /^#define\s+DCKB_([^ ]*)/ ) {
$dcsyms{$1} = "DCKB_$1";
}
}
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+close DCKB;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-my %hash = ();
-my %rhash = ();
-my $name = shift();
-while(<ARGV>) {
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+open(KM, "<$keymapfile") || die "Unable to open keymap file $keymapfile";
+while(<KM>) {
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > my ($val, $sym) = split /\s+/;
$ival = POSIX::strtol($val,0);
$hash{$ival} = $sym;
$rhash{$sym} = $ival;
}
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+close KM;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-print "/**\n * $name keyboard map autogenerated by genkeymap.pl\n */\n\n";
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+open(OUT, ">$outputfile") || die "Unable to open output file $outputfile";
+print OUT "/**\n * $name keyboard map autogenerated by genkeymap.pl\n */\n\n";
+print OUT "const gchar *${name}_keysyms_by_keycode[128] = { ";
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-print "const gchar *${name}_keysyms_by_keycode[128] = { ";
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > for( $i=0; $i < 128; $i++ ) {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- if( $i != 0 ) { print ", "; }
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ if( $i != 0 ) {
+ print OUT ", ";
+ }
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > if( defined($hash{$i}) ) {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- print "\"$hash{$i}\"";
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ print <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >OUT </span>"\"$hash{$i}\"";
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > } else {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- print "NULL";
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ print <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >OUT </span>"NULL";
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > }
}
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-print "};\n\n";
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+print <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >OUT </span>"};\n\n";
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-print "const uint16_t ${name}_keycode_to_dckeysym[128] = { ";
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+print <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >OUT </span>"const uint16_t ${name}_keycode_to_dckeysym[128] = { ";
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > for( $i=0; $i<128; $i++ ) {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- if( $i != 0 ) { print ", "; }
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ if( $i != 0 ) {
+ print OUT ", ";
+ }
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > if( defined($hash{$i}) && $dcsyms{$hash{$i}} ) {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- print $dcsyms{$hash{$i}};
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ print <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >OUT </span>$dcsyms{$hash{$i}};
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > } else {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- print "DCKB_NONE";
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ print <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >OUT </span>"DCKB_NONE";
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > }
}
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-print "};\n\n";
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+print <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >OUT </span>"};\n\n";
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >
my @keys = sort {uc($a) cmp uc($b)} keys %rhash;
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-print "#define ${name}_keysym_count " . ($#keys+1) . "\n";
-print "struct ${name}_keymap_struct {\n const gchar *name;\n uint16_t keycode;\n};\n\n";
-print "struct ${name}_keymap_struct ${name}_keysyms[] = { ";
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+print OUT "#define ${name}_keysym_count " . ($#keys+1) . "\n";
+print OUT "struct ${name}_keymap_struct {\n const gchar *name;\n uint16_t keycode;\n};\n\n";
+print OUT "struct ${name}_keymap_struct ${name}_keysyms[] = { ";
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > foreach my $keysym (@keys) {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- print "{\"$keysym\", $rhash{$keysym} }, ";
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ print <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >OUT </span>"{\"$keysym\", $rhash{$keysym} }, ";
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > }
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-print "{NULL,-1} };\n\n";
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+print <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >OUT </span>"{NULL,-1} };\n\n";
+close OUT;
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>