projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prepare to upload
[debian/amanda]
/
perl
/
Amanda
/
Header.pm
diff --git
a/perl/Amanda/Header.pm
b/perl/Amanda/Header.pm
index c5c516ac1d0779ba6ddec9ce2e42fb372c98dae7..32097b207a18393dbe9c4073024dd0404fb5b0c6 100644
(file)
--- a/
perl/Amanda/Header.pm
+++ b/
perl/Amanda/Header.pm
@@
-301,30
+301,25
@@
uncompression.
-push @EXPORT_OK, qw(filetype_t_to_string
s
);
-push @{$EXPORT_TAGS{"filetype_t"}}, qw(filetype_t_to_string
s
);
+push @EXPORT_OK, qw(filetype_t_to_string);
+push @{$EXPORT_TAGS{"filetype_t"}}, qw(filetype_t_to_string);
my %_filetype_t_VALUES;
my %_filetype_t_VALUES;
-#Convert a flag value to a list of names for flags that are set.
-sub filetype_t_to_strings {
- my ($flags) = @_;
- my @result = ();
+#Convert an enum value to a single string
+sub filetype_t_to_string {
+ my ($enumval) = @_;
for my $k (keys %_filetype_t_VALUES) {
my $v = $_filetype_t_VALUES{$k};
#is this a matching flag?
for my $k (keys %_filetype_t_VALUES) {
my $v = $_filetype_t_VALUES{$k};
#is this a matching flag?
- if (
($v == 0 && $flags == 0) || ($v != 0 && ($flags & $v) == $v)
) {
-
push @result,
$k;
+ if (
$enumval == $v
) {
+
return
$k;
}
}
}
}
-#by default, just return the number as a 1-element list
- if (!@result) {
- return ($flags);
- }
-
- return @result;
+#default, just return the number
+ return $enumval;
}
push @EXPORT_OK, qw($F_UNKNOWN);
}
push @EXPORT_OK, qw($F_UNKNOWN);