Author: paultcochrane
Date: Sat Mar 31 15:06:30 2007
New Revision: 17909

Modified:
   trunk/src/ops/core.ops
   trunk/src/ops/experimental.ops
   trunk/src/ops/math.ops
   trunk/src/ops/object.ops
   trunk/src/ops/string.ops

Log:
[src/ops] Correcting parenthesis-space issues as per coding standards (part 2)

Modified: trunk/src/ops/core.ops
==============================================================================
--- trunk/src/ops/core.ops      (original)
+++ trunk/src/ops/core.ops      Sat Mar 31 15:06:30 2007
@@ -87,7 +87,7 @@
 
 Internal opcode to prederef opcodes on the fly.
 Don't use.
-(Must be op #6, CORE_OPS_prederef__ ).
+(Must be op #6, CORE_OPS_prederef__).
 
 =item B<reserved>(inconst INT)
 
@@ -656,7 +656,7 @@
 }
 
 inline op set_addr(invar PMC, labelvar INT) {
-    $1->vtable->set_pointer(interp, $1, (void* )$2);
+    $1->vtable->set_pointer(interp, $1, (void*)$2);
     goto NEXT();
 }
 

Modified: trunk/src/ops/experimental.ops
==============================================================================
--- trunk/src/ops/experimental.ops      (original)
+++ trunk/src/ops/experimental.ops      Sat Mar 31 15:06:30 2007
@@ -90,7 +90,7 @@
   FLOATVAL temp2 = $2 < 0.0 ? -$2 : $2;
   FLOATVAL temp3 = $3 < 0.0 ? -$3 : $3;
   while (temp3 != 0) {
-    q = floor( (FLOATVAL)temp2/temp3 );
+    q = floor((FLOATVAL)temp2/temp3);
     c = temp2 - temp3*q;
     temp2 = temp3;
     temp3 = c;
@@ -137,24 +137,24 @@
     yk = ykp1;
   }
   $1 = r1;
-  $2 = (INTVAL)( xk * pow( -1, n ) );
-  $3 = (INTVAL)( yk * pow( -1, n+1 ) );
+  $2 = (INTVAL)(xk * pow(-1, n));
+  $3 = (INTVAL)(yk * pow(-1, n+1));
 
   x = $2 * $4;
   y = $3 * $5;
 
   /* correct the sign (can be wrong because we used abs($4) and abs($5) */
-  if ( x + y == r1 ) {
+  if (x + y == r1) {
     /* no correction necessary */
   }
-  else if ( x + y == -r1 ) {
+  else if (x + y == -r1) {
     $2 = -$2;
     $3 = -$3;
   }
-  else if ( x - y == r1 ) {
+  else if (x - y == r1) {
     $3 = -$3;
   }
-  else if ( -x + y == r1 ) {
+  else if (-x + y == r1) {
     $2 = -$2;
   }
 

Modified: trunk/src/ops/math.ops
==============================================================================
--- trunk/src/ops/math.ops      (original)
+++ trunk/src/ops/math.ops      Sat Mar 31 15:06:30 2007
@@ -157,12 +157,12 @@
 =cut
 
 inline op abs(inout INT) :base_core {
-  $1 = abs( $1 );
+  $1 = abs($1);
   goto NEXT();
 }
 
 inline op abs(inout NUM) :base_core {
-  $1 = fabs( $1 );
+  $1 = fabs($1);
   goto NEXT();
 }
 
@@ -475,7 +475,7 @@
 =cut
 
 inline op ceil(inout NUM) :base_core {
-  $1 = ceil( $1 );
+  $1 = ceil($1);
   goto NEXT();
 }
 
@@ -504,7 +504,7 @@
 =cut
 
 inline op floor(inout NUM) :base_core {
-  $1 = floor( $1 );
+  $1 = floor($1);
   goto NEXT();
 }
 
@@ -1027,7 +1027,7 @@
  if (a==0) { $1=b; goto NEXT(); }
  if (b==0) { $1=a; goto NEXT(); }
 
- while ( !((a | b) & 1) ) {
+ while (!((a | b) & 1)) {
    a>>=1;
    b>>=1;
    p++;
@@ -1062,7 +1062,7 @@
 
  if (a==0 || b==0) { $1=0; goto NEXT(); }
 
- while ( !((a | b) & 1) ) {
+ while (!((a | b) & 1)) {
    a>>=1;
    b>>=1;
    p++;

Modified: trunk/src/ops/object.ops
==============================================================================
--- trunk/src/ops/object.ops    (original)
+++ trunk/src/ops/object.ops    Sat Mar 31 15:06:30 2007
@@ -349,7 +349,7 @@
   opcode_t *next = expr NEXT();
   if (PMC_IS_NULL(class)) {
     real_exception(interp, next, NO_CLASS, "Class '%s' doesn't exist",
-                string_to_cstring( interp, $2 ));
+                string_to_cstring(interp, $2));
   }
   $1 = VTABLE_subclass(interp, class, $3);
   goto ADDRESS(next);
@@ -368,7 +368,7 @@
   opcode_t *next = expr NEXT();
   if (PMC_IS_NULL(class)) {
     real_exception(interp, next, NO_CLASS, "Class '%s' doesn't exist",
-                string_to_cstring( interp, $2 ));
+                string_to_cstring(interp, $2));
   }
   else
     $1 = class;

Modified: trunk/src/ops/string.ops
==============================================================================
--- trunk/src/ops/string.ops    (original)
+++ trunk/src/ops/string.ops    Sat Mar 31 15:06:30 2007
@@ -347,8 +347,7 @@
 inline op sprintf(out PMC, invar PMC, invar PMC) :base_core {
     $1->vtable->set_string_native(interp, $1,
         Parrot_psprintf(interp,
-                       $2->vtable->get_string(interp, $2), $3)
-    );
+                       $2->vtable->get_string(interp, $2), $3));
     goto NEXT();
 }
 

Reply via email to