From 5e778f7c8d1ecf3d8f11385db013af2ba026e2a5 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 22 Aug 2009 18:56:06 +0200 Subject: global: convert indentation-TABs to spaces Transformed via this shell code: t=$'\t' git ls-files \ | grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \ | grep -vE 'tests/pr/|help2man' \ | xargs grep -lE "^ *$t" \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_' --- src/wheel-gen.pl | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/wheel-gen.pl') diff --git a/src/wheel-gen.pl b/src/wheel-gen.pl index 987619de3..96fb48f05 100755 --- a/src/wheel-gen.pl +++ b/src/wheel-gen.pl @@ -50,7 +50,7 @@ sub is_prime ($) and return 0; $d += $w; $q < $d - and last; + and last; $w = 2; } return 1; @@ -68,12 +68,12 @@ sub is_prime ($) for (my $i = 3; ; $i += 2) { if (is_prime $i) - { - push @primes, $i; - $product *= $i; - ++$n_primes == $wheel_size - and last; - } + { + push @primes, $i; + $product *= $i; + ++$n_primes == $wheel_size + and last; + } } my $ws_m1 = $wheel_size - 1; @@ -92,20 +92,20 @@ EOF { my $rel_prime = 1; foreach my $divisor (@primes) - { - $i != $divisor && $i % $divisor == 0 - and $rel_prime = 0; - } + { + $i != $divisor && $i % $divisor == 0 + and $rel_prime = 0; + } if ($rel_prime) - { - #warn $i, ' ', $i - $prev, "\n"; - push @increments, $i - $prev; - $prev = $i; - - $product + 1 < $i - and last; - } + { + #warn $i, ' ', $i - $prev, "\n"; + push @increments, $i - $prev; + $prev = $i; + + $product + 1 < $i + and last; + } } print join (",\n", @increments), "\n"; -- cgit v1.2.3-54-g00ecf