Author: petdance
Date: Sun Jun 17 15:07:33 2007
New Revision: 19071

Modified:
   trunk/config/gen/platform/win32/env.c
   trunk/parrotbug
   trunk/src/debug.c
   trunk/src/malloc.c
   trunk/src/objects.c
   trunk/src/packfile.c
   trunk/src/stm/stm_internal.h
   trunk/src/string_primitives.c
   trunk/src/thread.c
   trunk/src/utils.c

Log:
uncuddling elses

Modified: trunk/config/gen/platform/win32/env.c
==============================================================================
--- trunk/config/gen/platform/win32/env.c       (original)
+++ trunk/config/gen/platform/win32/env.c       Sun Jun 17 15:07:33 2007
@@ -56,15 +56,16 @@
 }
 
 char *
-Parrot_getenv(const char *name, int *free_it)
+Parrot_getenv(const char *name /*NN*/, int *free_it /*NN*/)
 {
-    DWORD size = GetEnvironmentVariable(name, NULL, 0);
+    const DWORD size = GetEnvironmentVariable(name, NULL, 0);
     char *buffer;
 
     if (size == 0) {
         *free_it = 0;
         return NULL;
-    } else
+    }
+    else
         *free_it = 1;
     buffer = mem_sys_allocate(size);
     GetEnvironmentVariable(name, buffer, size);

Modified: trunk/parrotbug
==============================================================================
--- trunk/parrotbug     (original)
+++ trunk/parrotbug     Sun Jun 17 15:07:33 2007
@@ -99,8 +99,9 @@
          length($subject) < 4 ||
          $subject !~ /\s/ ) {
         return 1;
-    } else {
-       return 0;
+    }
+    else {
+        return 0;
     }
 }
 
@@ -182,11 +183,11 @@
             local $/;
             $report{body} = <BODY>;
             close BODY or  die "Can't close '$opts{input}': $!";
-        } else {
+        }
+        else {
             # No file provided...
             $report{body} = "";
         }
-            
 
       nok_report: {
             last nok_report unless defined $opts{nok};
@@ -239,9 +240,11 @@
     eval "use Mail::Util;";
     if ( $@ eq "" ) {
         $domain = Mail::Util::maildomain();
-    } elsif ($is_mswin32) {
+    }
+    elsif ($is_mswin32) {
         $domain = $ENV{USERDOMAIN};
-    } else {
+    }
+    else {
         require Sys::Hostname;
         $domain = Sys::Hostname::hostname();
     }
@@ -323,7 +326,8 @@
     if ( $opts{editor} ) {
         $editor = $opts{editor};
 
-    } else {
+    }
+    else {
         ask_for_editor($opts{quiet} ? "" : <<EOT);
 You will probably want to use an editor to enter the report. If the
 default editor proposed below is the editor you want to use, then just
@@ -615,7 +619,8 @@
 
        print "\nMessage sent.\n";
 
-    } else {
+    }
+    else {
        my $sendmail = "";
        for ( qw[ /usr/lib/sendmail /usr/sbin/sendmail 
                   /usr/ucblib/sendmail /var/qmail/bin/sendmail ] ) {
@@ -644,7 +649,8 @@
         print SENDMAIL format_message();
        if (close(SENDMAIL)) {
            printf "\nMessage sent.\n";
-       } else {
+        }
+        else {
            warn "\nSendmail returned status '", $? >> 8, "'\n";
        }
     }

Modified: trunk/src/debug.c
==============================================================================
--- trunk/src/debug.c   (original)
+++ trunk/src/debug.c   Sun Jun 17 15:07:33 2007
@@ -2444,7 +2444,8 @@
             PMC_cont(old)->to_ctx->current_sub ==
             PMC_cont(sub)->to_ctx->current_sub) {
                 ++rec_level;
-        } else if (rec_level != 0) {
+        }
+        else if (rec_level != 0) {
             PIO_eprintf(interp, "... call repeated %d times\n", rec_level);
             rec_level = 0;
         }

Modified: trunk/src/malloc.c
==============================================================================
--- trunk/src/malloc.c  (original)
+++ trunk/src/malloc.c  Sun Jun 17 15:07:33 2007
@@ -5272,7 +5272,8 @@
         g_last->top_allocated = (char *) g_last->top_allocated + allocate_size;
         result = (char *) g_last->top_allocated - size;
     /* Deallocation requested? */
-    } else if (size < 0) {
+    }
+    else if (size < 0) {
         long deallocate_size = - size;
         /* As long as we have a region to release */
         while ((char *) g_last->top_allocated - deallocate_size

Modified: trunk/src/objects.c
==============================================================================
--- trunk/src/objects.c (original)
+++ trunk/src/objects.c Sun Jun 17 15:07:33 2007
@@ -1058,7 +1058,8 @@
             VTABLE_name(interp, _class));
 
         create_deleg_pmc_vtable(interp, _class, class_name, 1);
-    } else if (!PObj_is_class_TEST(parent)) {
+    }
+    else if (!PObj_is_class_TEST(parent)) {
         internal_exception(1, "Parent isn't a ParrotClass");
     }
 

Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c        (original)
+++ trunk/src/packfile.c        Sun Jun 17 15:07:33 2007
@@ -1342,7 +1342,8 @@
             if (pf->header->wordsize == 8)
                 pos = pf->src + seg->file_offset * 2;
 #endif
-        } else
+        }
+        else
             pos = pf->src + seg->file_offset;
         tmp = PF_fetch_opcode(pf, &pos);
         if (seg->op_count != tmp) {
@@ -1388,7 +1389,8 @@
             if (pf->header->wordsize == 8)
                 delta = (pos - cursor) / 2;
 #endif
-        } else
+        }
+        else
             delta = pos - cursor;
         if ((size_t)delta != tmp || dir->segments[i]->op_count != tmp)
             fprintf(stderr, "PackFile_unpack segment '%s' directory length %d "

Modified: trunk/src/stm/stm_internal.h
==============================================================================
--- trunk/src/stm/stm_internal.h        (original)
+++ trunk/src/stm/stm_internal.h        Sun Jun 17 15:07:33 2007
@@ -22,7 +22,8 @@
           else { \
               if (time_bucket >= TIME_BUCKETS) { \
                   time_bucket = TIME_BUCKETS - 1; \
-              } else if (time_bucket == 0) { \
+              } \
+              else if (time_bucket == 0) { \
                   abort(); \
                   time_bucket = 0; \
               } \

Modified: trunk/src/string_primitives.c
==============================================================================
--- trunk/src/string_primitives.c       (original)
+++ trunk/src/string_primitives.c       Sun Jun 17 15:07:33 2007
@@ -173,11 +173,14 @@
             codepoint = CHARSET_GET_BYTE(interp, string, *offset);
             if (codepoint >= '0' && codepoint <= '9') {
                 workchar = codepoint - '0';
-            } else if (codepoint >= 'a' && codepoint <= 'f') {
+            }
+            else if (codepoint >= 'a' && codepoint <= 'f') {
                 workchar = codepoint - 'a' + 10;
-            } else if (codepoint >= 'A' && codepoint <= 'F') {
+            }
+            else if (codepoint >= 'A' && codepoint <= 'F') {
                 workchar = codepoint - 'A' + 10;
-            } else if (codepoint == '{') {
+            }
+            else if (codepoint == '{') {
                 int i;
                 ++*offset;
                 workchar = 0;
@@ -190,9 +193,11 @@
                     workchar *= 16;
                     if (codepoint >= '0' && codepoint <= '9') {
                         workchar += codepoint - '0';
-                    } else if (codepoint >= 'a' && codepoint <= 'f') {
+                    }
+                    else if (codepoint >= 'a' && codepoint <= 'f') {
                         workchar += codepoint - 'a' + 10;
-                    } else if (codepoint >= 'A' && codepoint <= 'F') {
+                    }
+                    else if (codepoint >= 'A' && codepoint <= 'F') {
                         workchar += codepoint - 'A' + 10;
                     }
                     else {
@@ -213,9 +218,11 @@
                 codepoint = CHARSET_GET_BYTE(interp, string, *offset);
                 if (codepoint >= '0' && codepoint <= '9') {
                     workchar += codepoint - '0';
-                } else if (codepoint >= 'a' && codepoint <= 'f') {
+                }
+                else if (codepoint >= 'a' && codepoint <= 'f') {
                     workchar += codepoint - 'a' + 10;
-                } else if (codepoint >= 'A' && codepoint <= 'F') {
+                }
+                else if (codepoint >= 'A' && codepoint <= 'F') {
                     workchar += codepoint - 'A' + 10;
                 }
                 else {
@@ -245,9 +252,11 @@
                     codepoint = CHARSET_GET_BYTE(interp, string, *offset);
                     if (codepoint >= '0' && codepoint <= '9') {
                         workchar += codepoint - '0';
-                    } else if (codepoint >= 'a' && codepoint <= 'f') {
+                    }
+                    else if (codepoint >= 'a' && codepoint <= 'f') {
                         workchar += codepoint - 'a' + 10;
-                    } else if (codepoint >= 'A' && codepoint <= 'F') {
+                    }
+                    else if (codepoint >= 'A' && codepoint <= 'F') {
                         workchar += codepoint - 'A' + 10;
                     }
                     else {
@@ -270,9 +279,11 @@
                     codepoint = CHARSET_GET_BYTE(interp, string, *offset);
                     if (codepoint >= '0' && codepoint <= '9') {
                         workchar += codepoint - '0';
-                    } else if (codepoint >= 'a' && codepoint <= 'f') {
+                    }
+                    else if (codepoint >= 'a' && codepoint <= 'f') {
                         workchar += codepoint - 'a' + 10;
-                    } else if (codepoint >= 'A' && codepoint <= 'F') {
+                    }
+                    else if (codepoint >= 'A' && codepoint <= 'F') {
                         workchar += codepoint - 'A' + 10;
                     }
                     else {

Modified: trunk/src/thread.c
==============================================================================
--- trunk/src/thread.c  (original)
+++ trunk/src/thread.c  Sun Jun 17 15:07:33 2007
@@ -62,9 +62,11 @@
 
     if (PMC_IS_NULL(arg)) {
         ret_val = PMCNULL;
-    } else if (PObj_is_PMC_shared_TEST(arg)) {
+    }
+    else if (PObj_is_PMC_shared_TEST(arg)) {
         ret_val = arg;
-    } else if (VTABLE_isa(from, arg, _multi_sub)) {
+    }
+    else if (VTABLE_isa(from, arg, _multi_sub)) {
         INTVAL i = 0;
         INTVAL n = VTABLE_elements(from, arg);
         ret_val  = pmc_new(interp, enum_class_MultiSub);
@@ -74,7 +76,8 @@
             PMC *const copy = make_local_copy(interp, from, orig);
             VTABLE_push_pmc(interp, ret_val, copy);
         }
-    } else if (VTABLE_isa(from, arg, _sub)) {
+    }
+    else if (VTABLE_isa(from, arg, _sub)) {
         /* this is a workaround for cloning subroutines not actually
          * working as one might expect mainly because the segment is
          * not correctly copied
@@ -401,7 +404,8 @@
         interpreter_array[tid] = NULL;
         TRACE_THREAD("really destroying an interpreter [exit while detached]");
         Parrot_really_destroy(interp, 0, NULL);
-    } else if (interp->thread_data->state & THREAD_STATE_JOINED) {
+    }
+    else if (interp->thread_data->state & THREAD_STATE_JOINED) {
         pt_thread_signal(interp, interp->thread_data->joiner);
     }
 
@@ -1419,13 +1423,15 @@
                  THREAD_STATE_SUSPEND_GC_REQUESTED));
         TRACE_THREAD("already suspended...");
         UNLOCK(interpreter_array_mutex);
-    } else if (block_level) {
+    }
+    else if (block_level) {
         /* unthreaded collection */
         TRACE_THREAD("... but blocked");
 
         /* holding the lock */
         return;
-    } else if (interp->thread_data->state &
+    }
+    else if (interp->thread_data->state &
                THREAD_STATE_SUSPEND_GC_REQUESTED) {
         while (remove_queued_suspend_gc(interp));
 

Modified: trunk/src/utils.c
==============================================================================
--- trunk/src/utils.c   (original)
+++ trunk/src/utils.c   Sun Jun 17 15:07:33 2007
@@ -677,7 +677,8 @@
     if (0 == alt) { /* use temp reg */
         move_reg(c->dest_regs[node_index],c->temp_reg, c);
         c->backup[node_index] = c->temp_reg;
-    } else
+    }
+    else
         c->backup[node_index] = c->dest_regs[node_index];
 
     rec_climb_back_and_mark(node_index, c);

Reply via email to