#!/usr/bin/perl %patch = (); while () { next if /^\s*#/ || /^\s*$/ ; ($f, $t, $other) = split; if (ord($other) == ord('+')) { $patch{$f} = $t; next; } next if hex($t)>=0x10000; $patch{$f} = $t if(!exists $patch{$f}); } for(keys %patch) { print "$_\t$patch{$_}\t#\n" }