Author: djpig
Date: 2007-07-08 19:42:16 +0000 (Sun, 08 Jul 2007)
New Revision: 848
Modified:
branches/dpkg-shlibdeps-buxy/scripts/modules/Objdump.pm
branches/dpkg-shlibdeps-buxy/scripts/modules/Shlibs.pm
branches/dpkg-shlibdeps-buxy/scripts/modules/SymbolFile.pm
Log:
Whitespace cleanup
Modified: branches/dpkg-shlibdeps-buxy/scripts/modules/Objdump.pm
===================================================================
--- branches/dpkg-shlibdeps-buxy/scripts/modules/Objdump.pm 2007-07-08
19:33:48 UTC (rev 847)
+++ branches/dpkg-shlibdeps-buxy/scripts/modules/Objdump.pm 2007-07-08
19:42:16 UTC (rev 848)
@@ -29,14 +29,14 @@
sub parse {
my ($self, $file) = @_;
local $ENV{LC_ALL} = 'C';
- open(OBJDUMP, "-|", "objdump", "-w", "-p", "-T", $file) ||
+ open(OBJDUMP, "-|", "objdump", "-w", "-p", "-T", $file) ||
syserr(sprintf(_g("Can't execute objdump: %s"), $!));
my $obj = Dpkg::Shlibs::Objdump::Object->new($file);
my $section = "none";
while (defined($_ = <OBJDUMP>)) {
chomp($_);
next if (/^\s*$/);
-
+
if ($_ =~ /^DYNAMIC SYMBOL TABLE:/) {
$section = "dynsym";
next;
@@ -87,7 +87,7 @@
# Output format of objdump -w -T
#
# /lib/libc.so.6: file format elf32-i386
-#
+#
# DYNAMIC SYMBOL TABLE:
# 00056ef0 g DF .text 000000db GLIBC_2.2 getwchar
# 00000000 g DO *ABS* 00000000 GCC_3.0 GCC_3.0
@@ -96,7 +96,7 @@
# 0000b788 g DF .text 0000008e Base .protected xine_close
# | ||||||| | | | |
# | ||||||| | | Version str (.visibility) + Symbol name
-# | ||||||| | Alignment
+# | ||||||| | Alignment
# | ||||||| Section name (or *UND* for an undefined symbol)
# | ||||||F=Function,f=file,O=object
# | |||||d=debugging,D=dynamic
@@ -104,7 +104,7 @@
# | |||W=warning
# | ||C=constructor
# | |w=weak
-# | g=global,l=local,!=both global/local
+# | g=global,l=local,!=both global/local
# Size of the symbol
#
# GLIBC_2.2 is the version string associated to the symbol
@@ -128,7 +128,7 @@
'hidden' => 0,
'defined' => $sect ne '*UND*'
};
-
+
# Handle hidden symbols
if (defined($ver) and $ver =~ /^\((.*)\)$/) {
$ver = $1;
@@ -167,22 +167,22 @@
{
my %format; # Cache of result
sub get_format {
- my ($file) = @_;
+ my ($file) = @_;
- if (exists $format{$file}) {
- return $format{$file};
- } else {
- local $ENV{LC_ALL} = "C";
- open(P, "objdump -a -- $file |") || syserr(_g("cannot fork for
objdump"));
- while (<P>) {
- chomp;
- if (/^\s*\S+:\s*file\s+format\s+(\S+)\s*$/) {
- $format{$file} = $1;
- return $format{$file};
- }
- }
- close(P) or main::subprocerr(sprintf(_g("objdump on \`%s'"),
$file));
- }
+ if (exists $format{$file}) {
+ return $format{$file};
+ } else {
+ local $ENV{LC_ALL} = "C";
+ open(P, "objdump -a -- $file |") || syserr(_g("cannot fork for
objdump"));
+ while (<P>) {
+ chomp;
+ if (/^\s*\S+:\s*file\s+format\s+(\S+)\s*$/) {
+ $format{$file} = $1;
+ return $format{$file};
+ }
+ }
+ close(P) or main::subprocerr(sprintf(_g("objdump on \`%s'"),
$file));
+ }
}
}
@@ -234,13 +234,13 @@
sub get_exported_dynamic_symbols {
my ($self) = @_;
- return grep { $_->{defined} && $_->{dynamic} }
+ return grep { $_->{defined} && $_->{dynamic} }
values %{$self->{dynsyms}};
}
sub get_undefined_dynamic_symbols {
my ($self) = @_;
- return grep { (!$_->{defined}) && $_->{dynamic} }
+ return grep { (!$_->{defined}) && $_->{dynamic} }
values %{$self->{dynsyms}};
}
Modified: branches/dpkg-shlibdeps-buxy/scripts/modules/Shlibs.pm
===================================================================
--- branches/dpkg-shlibdeps-buxy/scripts/modules/Shlibs.pm 2007-07-08
19:33:48 UTC (rev 847)
+++ branches/dpkg-shlibdeps-buxy/scripts/modules/Shlibs.pm 2007-07-08
19:42:16 UTC (rev 848)
@@ -30,10 +30,10 @@
# Update library paths with LD_LIBRARY_PATH
if ($ENV{LD_LIBRARY_PATH}) {
foreach my $path (reverse split( /:/, $ENV{LD_LIBRARY_PATH} )) {
- $path =~ s{/+$}{};
- unless (scalar grep { $_ eq $path } @librarypaths) {
- unshift @librarypaths, $path;
- }
+ $path =~ s{/+$}{};
+ unless (scalar grep { $_ eq $path } @librarypaths) {
+ unshift @librarypaths, $path;
+ }
}
}
@@ -47,7 +47,7 @@
or main::syserr(sprintf(_g("couldn't open %s: %s"), $file, $!));
while (<$fh>) {
next if /^\s*$/;
- chomp;
+ chomp;
s{/+$}{};
if (/^include\s+(\S.*\S)\s*$/) {
foreach my $include (glob($1)) {
Modified: branches/dpkg-shlibdeps-buxy/scripts/modules/SymbolFile.pm
===================================================================
--- branches/dpkg-shlibdeps-buxy/scripts/modules/SymbolFile.pm 2007-07-08
19:33:48 UTC (rev 847)
+++ branches/dpkg-shlibdeps-buxy/scripts/modules/SymbolFile.pm 2007-07-08
19:42:16 UTC (rev 848)
@@ -120,8 +120,8 @@
sub merge_symbols {
my ($self, $object, $minver) = @_;
my $soname = $object->{SONAME} || main::error(_g("Can't merge symbols from
objects without SONAME."));
- my %dynsyms = map { $_ => $object->{dynsyms}{$_} }
- grep { local $a = $object->{dynsyms}{$_}; $a->{dynamic} &&
$a->{defined} }
+ my %dynsyms = map { $_ => $object->{dynsyms}{$_} }
+ grep { local $a = $object->{dynsyms}{$_}; $a->{dynamic} &&
$a->{defined} }
keys %{$object->{dynsyms}};
# Scan all symbols provided by the objects
foreach my $sym (keys %dynsyms) {
@@ -183,7 +183,7 @@
foreach my $so (@{$sonames}) {
next if (! exists $self->{objects}{$so});
if (exists $self->{objects}{$so}{syms}{$name} and
- not $self->{objects}{$so}{syms}{$name}{deprecated})
+ not $self->{objects}{$so}{syms}{$name}{deprecated})
{
my $dep_id = $self->{objects}{$so}{syms}{$name}{dep_id};
return {
@@ -202,11 +202,11 @@
my $mysyms = $self->{objects}{$soname}{syms};
next if not exists $ref->{objects}{$soname};
my $refsyms = $ref->{objects}{$soname}{syms};
- foreach my $sym (grep { not $refsyms->{$_}{deprecated} }
- keys %{$refsyms})
+ foreach my $sym (grep { not $refsyms->{$_}{deprecated} }
+ keys %{$refsyms})
{
- if ((not exists $mysyms->{$sym}) or
- $mysyms->{$sym}{deprecated})
+ if ((not exists $mysyms->{$sym}) or
+ $mysyms->{$sym}{deprecated})
{
return 1;
}
@@ -221,11 +221,11 @@
my $mysyms = $self->{objects}{$soname}{syms};
next if not exists $ref->{objects}{$soname};
my $refsyms = $ref->{objects}{$soname}{syms};
- foreach my $sym (grep { not $mysyms->{$_}{deprecated} }
- keys %{$mysyms})
+ foreach my $sym (grep { not $mysyms->{$_}{deprecated} }
+ keys %{$mysyms})
{
- if ((not exists $refsyms->{$sym}) or
- $refsyms->{$sym}{deprecated})
+ if ((not exists $refsyms->{$sym}) or
+ $refsyms->{$sym}{deprecated})
{
return 1;
}
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]