Skip to content

Commit

Permalink
Remove need for round in foomaticalize, fix macOS build
Browse files Browse the repository at this point in the history
From @andrew867. Fixes #6.
  • Loading branch information
philpem committed Mar 30, 2021
1 parent a739dac commit b08c61b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions foomaticalize
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ use Getopt::Long qw(GetOptions);
use XML::LibXML;
use File::Basename;
use File::Path qw(make_path);
use POSIX qw(round);

sub find_or_create_node($$) {
my ($obj, $type) = @_;
Expand Down Expand Up @@ -209,7 +208,7 @@ sub transform($) {
if ($driverval->textContent =~
/^\s*(\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)\s*$/) {
$driverval->removeChildNodes();
$driverval->appendText(round($1) . ' ' . round($2));
$driverval->appendText(sprintf("%.0f", $1) . ' ' . sprintf("%.0f", $2));
}
}
}
Expand Down

0 comments on commit b08c61b

Please sign in to comment.