Skip to content

Commit

Permalink
[codingstd] fix 3 violations from native_pbc: hard tabs, cpp indents
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed Dec 6, 2012
1 parent 995d9c0 commit 38b82fb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
20 changes: 10 additions & 10 deletions src/packfile/pf_items.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@ cvt_num12_num8(ARGOUT(unsigned char *dest), ARGIN(const unsigned char *src))
{
ASSERT_ARGS(cvt_num12_num8)
int expo, i, s;
#ifdef __LCC__
# ifdef __LCC__
int expo2;
#endif
# endif

/*
12-byte double (96 bits):
Expand Down Expand Up @@ -423,14 +423,14 @@ cvt_num12_num8(ARGOUT(unsigned char *dest), ARGIN(const unsigned char *src))
dest[7] |= 0x80;
return;
}
#ifdef __LCC__
# ifdef __LCC__
/* Yet again, LCC blows up mysteriously until a temporary variable is
* added. */
expo2 = expo - 16383;
expo = expo2;
#else
# else
expo -= 16383; /* - bias */
#endif
# endif
expo += 1023; /* + bias 8byte */
if (expo <= 0) /* underflow */
goto nul;
Expand Down Expand Up @@ -603,9 +603,9 @@ cvt_num16_num8(ARGOUT(unsigned char *dest), ARGIN(const unsigned char *src))
else {
/* FIXME: This codepath fails */
int expo, i, s;
#ifdef __LCC__
# ifdef __LCC__
int expo2;
#endif
# endif
Parrot_x_force_error_exit(NULL, 1, "cvt_num16_num8: long double conversion unsupported");

/* Have only 12-byte long double, or no long double at all. Need to disect it */
Expand Down Expand Up @@ -648,14 +648,14 @@ cvt_num16_num8(ARGOUT(unsigned char *dest), ARGIN(const unsigned char *src))
dest[7] |= 0x80;
return;
}
#ifdef __LCC__
# ifdef __LCC__
/* LCC blows up mysteriously until a temporary variable is
* added. */
expo2 = expo - 16383;
expo = expo2;
#else
# else
expo -= 16383; /* - same bias as with 12-byte */
#endif
# endif
expo += 1023; /* + bias 8byte */
if (expo <= 0) /* underflow */
goto nul;
Expand Down
8 changes: 4 additions & 4 deletions t/native_pbc/number.t
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ sub generate_skip_list {
$skip{"8_".$pbc}++;
}
if (my ($b) = $s[$col] =~ /S(.)/) {
if ($byte == $b) {
$skip{"4_".$pbc}++;
$skip{"8_".$pbc}++;
}
if ($byte == $b) {
$skip{"4_".$pbc}++;
$skip{"8_".$pbc}++;
}
}
if (my ($b) = $s[$col] =~ /T(.)/) {
$skip{$b."_".$pbc}++;
Expand Down
6 changes: 3 additions & 3 deletions tools/dev/pbc_header.pl
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ sub pbc_info {
my $b;
open my $F, "+<", "$f" or die "Can't open $f: $!";
binmode $F;
print "$f:\n";
show_pbc_file_info($F);
close $F;
print "$f:\n";
show_pbc_file_info($F);
close $F;
}
}

Expand Down

0 comments on commit 38b82fb

Please sign in to comment.