A few coding style errors have crept in lately.  The attached patch should 
fix the majority of them.  I didn't touch the MANIFEST errors mentioned, 
though.

--Josh

$ make check_source  | grep ERROR | grep -v '^languages/'
byteorder.c:35 (ERROR) Improper indenting for "# if INTVAL_SIZE == 4" (should be "#  if
byteorder.c:37 (ERROR) Improper indenting for "# else"
byteorder.c:46 (ERROR) Improper indenting for "# endif"
byteorder.c:55 (ERROR) Improper indenting for "# if INTVAL_SIZE == 4" (should be "#  if
byteorder.c:57 (ERROR) Improper indenting for "# else"
byteorder.c:67 (ERROR) Improper indenting for "# endif"
byteorder.c:80 (ERROR) Improper indenting for "# if OPCODE_T_SIZE == 4" (should be "#  
 if
byteorder.c:83 (ERROR) Improper indenting for "# else"
byteorder.c:93 (ERROR) Improper indenting for "# endif"
byteorder.c:103 (ERROR) Improper indenting for "# if OPCODE_T_SIZE == 4" (should be "# 
 if
byteorder.c:106 (ERROR) Improper indenting for "# else"
byteorder.c:115 (ERROR) Improper indenting for "# endif"
byteorder.c:274 (ERROR) apparent non-4 space indenting (0 spaces)
hash.c:381 (ERROR) Cuddled else ("} else {") found.
packfile.c:184 (ERROR) Improper indenting for "#if TRACE_PACKFILE" (should be "#  if
packfile.c:189 (ERROR) Improper indenting for "#endif"
pxs.c:11 (ERROR) apparent non-4 space indenting (2 spaces)
pxs.c:18 (ERROR) apparent non-4 space indenting (0 spaces)
pxs.c:24 (ERROR) apparent non-4 space indenting (0 spaces)
pxs.c:30 (ERROR) apparent non-4 space indenting (0 spaces)
pxs.c:36 (ERROR) apparent non-4 space indenting (0 spaces)
pxs.c:87 (ERROR) apparent non-4 space indenting (3 spaces)
pxs.c:102 (ERROR) apparent non-4 space indenting (3 spaces)
pxs.c:0 (ERROR) Ending boilerplate is missing.
types/bignum.h:65 (ERROR) apparent non-4 space indenting (2 spaces)
jit/alpha/jit_emit.h:173 (ERROR) Cuddled else ("} else {") found.
include/parrot/has_header.h:0 (ERROR) Ending boilerplate is missing.
include/parrot/debug.h:0 (ERROR) Ending boilerplate is missing.
include/parrot/pxs.h:0 (ERROR) Ending boilerplate is missing.
config/gen/platform/darwin.c:74 (ERROR) apparent non-4 space indenting (0 spaces)
config/gen/platform/darwin.c:106 (ERROR) apparent non-4 space indenting (0 spaces)
MANIFEST:138 (ERROR) examples/benchmarks/gc_alloc_reuse.pasm: 8.3 name collision with
MANIFEST:141 (ERROR) examples/benchmarks/gc_header_reuse.pasm: 8.3 name collision with
MANIFEST:143 (ERROR) examples/benchmarks/gc_waves_sizeable_data.pasm: 8.3 name 
collision with
MANIFEST:144 (ERROR) examples/benchmarks/gc_waves_sizeable_headers.pasm: 8.3 name 
collision with

--------- patch ---------

Index: byteorder.c
===================================================================
RCS file: /cvs/public/parrot/byteorder.c,v
retrieving revision 1.10
diff -u -r1.10 byteorder.c
--- byteorder.c 20 May 2002 01:28:32 -0000      1.10
+++ byteorder.c 6 Jun 2002 04:00:18 -0000
@@ -32,9 +32,9 @@
     return w;
 #else
     INTVAL r;
-# if INTVAL_SIZE == 4
+#  if INTVAL_SIZE == 4
     return (w << 24) | ((w & 0xff00) << 8) | ((w & 0xff0000) >> 8) | (w>>24); 
-# else
+#  else
     r = w << 56;
     r |= (w & 0xff00) << 40;
     r |= (w & 0xff0000) << 24;
@@ -43,7 +43,7 @@
     r |= (w & 0xff0000000000) >> 24;
     r |= (w & 0xff00000000000000) >> 56;
     return r;    
-# endif
+#  endif
 #endif
 }
 
@@ -52,9 +52,9 @@
 #if PARROT_BIGENDIAN
     return w;
 #else
-# if INTVAL_SIZE == 4
+#  if INTVAL_SIZE == 4
     return (w << 24) | ((w & 0xff00) << 8) | ((w & 0xff0000) >> 8) | (w>>24); 
-# else
+#  else
     INTVAL r;
     r = w << 56;
     r |= (w & 0xff00) << 40;
@@ -64,7 +64,7 @@
     r |= (w & 0xff0000000000) >> 24;
     r |= (w & 0xff00000000000000) >> 56;
     return r;    
-# endif
+#  endif
 #endif
 }
 
@@ -77,10 +77,10 @@
 #if PARROT_BIGENDIAN
     return w;
 #else
-# if OPCODE_T_SIZE == 4
+#  if OPCODE_T_SIZE == 4
     return  (w << 24) | ((w & 0x0000ff00) << 8) | ((w & 0x00ff0000) >> 8) |
             ((w & 0xff000000) >>24); 
-# else
+#  else
     opcode_t r;
     r = w << 56;
     r |= (w & 0xff00) << 40;
@@ -90,7 +90,7 @@
     r |= (w & 0xff0000000000) >> 24;
     r |= (w & 0xff00000000000000) >> 56;
     return r;    
-# endif
+#  endif
 #endif    
 }
 
@@ -100,10 +100,10 @@
     return w;
 #else
     opcode_t r;
-# if OPCODE_T_SIZE == 4
+#  if OPCODE_T_SIZE == 4
     return  (w << 24) | ((w & 0x0000ff00) << 8) | ((w & 0x00ff0000) >> 8) |
             ((w & 0xff000000) >>24); 
-# else
+#  else
     r = w << 56;
     r |= (w & 0xff00) << 40;
     r |= (w & 0xff0000) << 24;
@@ -112,7 +112,7 @@
     r |= (w & 0xff0000000000) >> 24;
     r |= (w & 0xff00000000000000) >> 56;
     return r;    
-# endif
+#  endif
 #endif    
 }
 
@@ -271,7 +271,7 @@
 
 INTVAL
 endianize_fetch_int(char * s, char * o) {
-
+    
 }
 
 void endianize_put_int(const char * s, char * o) {
Index: hash.c
===================================================================
RCS file: /cvs/public/parrot/hash.c,v
retrieving revision 1.5
diff -u -r1.5 hash.c
--- hash.c      22 May 2002 18:27:32 -0000      1.5
+++ hash.c      6 Jun 2002 04:00:18 -0000
@@ -379,7 +379,8 @@
     if (bucket) {
         /* Replacing old value */
         memcpy(&bucket->value, value, sizeof(KEY_ATOM));
-    } else {
+    }
+    else {
         /* Create new bucket */
         hash->entries++;
         bucket = new_bucket(interpreter, hash, key, value);
Index: packfile.c
===================================================================
RCS file: /cvs/public/parrot/packfile.c,v
retrieving revision 1.49
diff -u -r1.49 packfile.c
--- packfile.c  1 Jun 2002 01:52:12 -0000       1.49
+++ packfile.c  6 Jun 2002 04:00:19 -0000
@@ -181,12 +181,12 @@
         /* FIXME: Use the float_type from bytecode header to decide vtable */
         pf->fetch_nv = fetch_buf_be_8;
     }
-#if TRACE_PACKFILE
+#  if TRACE_PACKFILE
     else {
         fprintf(stderr, "header->byteorder [%d] native byteorder [%d]\n",
             pf->header->byteorder, PARROT_BIGENDIAN);
     }
-#endif
+#  endif
 #endif    
 }
 
Index: pxs.c
===================================================================
RCS file: /cvs/public/parrot/pxs.c,v
retrieving revision 1.1
diff -u -r1.1 pxs.c
--- pxs.c       2 Jun 2002 04:07:50 -0000       1.1
+++ pxs.c       6 Jun 2002 04:00:19 -0000
@@ -8,32 +8,28 @@
 
 int
 PXS_initargs(Parrot_Interp_t interp) {
-  INTVAL numargs;
-  stack_pop(interp, interp->user_stack, &numargs, STACK_ENTRY_INT);
-  return numargs;
+    INTVAL numargs;
+    stack_pop(interp, interp->user_stack, &numargs, STACK_ENTRY_INT);
+    return numargs;
 }
 
 void
 PXS_reti(Parrot_Interp_t interp, INTVAL i) {
-
     stack_push(interp, interp->user_stack, &i, STACK_ENTRY_INT, STACK_CLEANUP_NULL);
 }
 
 void 
 PXS_retn(Parrot_Interp_t interp, FLOATVAL f) {
-
     stack_push(interp, interp->user_stack, &f, STACK_ENTRY_FLOAT, STACK_CLEANUP_NULL);
 }
 
 void
 PXS_rets(Parrot_Interp_t interp, STRING * s) {
-
     stack_push(interp, interp->user_stack, s, STACK_ENTRY_STRING, STACK_CLEANUP_NULL);
 }
 
 void
 PXS_retp(Parrot_Interp_t interp, PMC * p) {
-
     stack_push(interp, interp->user_stack, p, STACK_ENTRY_PMC, STACK_CLEANUP_NULL);
 }
 
@@ -84,23 +80,32 @@
 }
 
 void * PXS_api[] = {
-   PXS_initargs, 
-   PXS_reti, 
-   PXS_retn, 
-   PXS_rets, 
-   PXS_retp, 
-   PXS_shifti,
-   PXS_shiftn,
-   PXS_shifts,
-   PXS_shiftp,
-   PXS_findop
+    PXS_initargs, 
+    PXS_reti, 
+    PXS_retn, 
+    PXS_rets, 
+    PXS_retp, 
+    PXS_shifti,
+    PXS_shiftn,
+    PXS_shifts,
+    PXS_shiftp,
+    PXS_findop
 };
 
 /*
 void ** PXS_api(void)
 {
-   return &_PXS_api[0];
+    return &_PXS_api[0];
 }
 */
 
 
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil 
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+*/
Index: config/gen/config_h.pl
===================================================================
RCS file: /cvs/public/parrot/config/gen/config_h.pl,v
retrieving revision 1.1
diff -u -r1.1 config_h.pl
--- config/gen/config_h.pl      24 May 2002 06:23:26 -0000      1.1
+++ config/gen/config_h.pl      6 Jun 2002 04:00:19 -0000
@@ -13,7 +13,13 @@
 
   open(HH, ">include/parrot/has_header.h") or die "Can't open has_header.h: $!";
 
-  print HH "/* This file was generated by Configure.pl. */\n\n";
+  print HH qq(
+/*
+ ** !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
+ **
+ ** This file is generated automatically by Configure.pl
+ */
+);
 
   for(Configure::Data->keys()) {
     next unless /i_(\w+)/;
Index: config/gen/platform/darwin.c
===================================================================
RCS file: /cvs/public/parrot/config/gen/platform/darwin.c,v
retrieving revision 1.1
diff -u -r1.1 darwin.c
--- config/gen/platform/darwin.c        5 Jun 2002 01:47:10 -0000       1.1
+++ config/gen/platform/darwin.c        6 Jun 2002 04:00:19 -0000
@@ -71,7 +71,6 @@
 void *
 Parrot_dlopen(const char *filename)
 {
-
     int dyld_result;
     NSObjectFileImage ofile;
     NSModule handle = NULL;
@@ -103,7 +102,6 @@
 void *
 Parrot_dlsym(void *handle, char *symbol)
 {
-
     void *addr;
 
     if (NSIsSymbolNameDefined(symbol))
Index: include/parrot/debug.h
===================================================================
RCS file: /cvs/public/parrot/include/parrot/debug.h,v
retrieving revision 1.4
diff -u -r1.4 debug.h
--- include/parrot/debug.h      3 Jun 2002 00:44:59 -0000       1.4
+++ include/parrot/debug.h      6 Jun 2002 04:00:19 -0000
@@ -247,3 +247,13 @@
 #define c_disassemble   1903830
 
 #endif
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil 
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+*/
Index: include/parrot/pxs.h
===================================================================
RCS file: /cvs/public/parrot/include/parrot/pxs.h,v
retrieving revision 1.1
diff -u -r1.1 pxs.h
--- include/parrot/pxs.h        2 Jun 2002 04:08:01 -0000       1.1
+++ include/parrot/pxs.h        6 Jun 2002 04:00:20 -0000
@@ -29,5 +29,12 @@
 #define PXSCALL(f) void f(Parrot_Interp_t interp, void * object) 
 
 
-
-
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil 
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+*/
Index: jit/alpha/jit_emit.h
===================================================================
RCS file: /cvs/public/parrot/jit/alpha/jit_emit.h,v
retrieving revision 1.1
diff -u -r1.1 jit_emit.h
--- jit/alpha/jit_emit.h        20 May 2002 05:32:58 -0000      1.1
+++ jit/alpha/jit_emit.h        6 Jun 2002 04:00:20 -0000
@@ -155,8 +155,7 @@
     char *pc = jit_info->native_ptr;
     long high,low;
 
-    if ((*address < -0x7fffffff) || (*address > 0x7fffffff))
-    {
+    if ((*address < -0x7fffffff) || (*address > 0x7fffffff)) {
 
         Parrot_jit_newfixup(jit_info);
         jit_info->fixups->type = JIT_ALPHASTART;
@@ -165,13 +164,14 @@
         high = 0;
         pc = emit_l_s(pc, LDH, target, REG27_t12, &high);
         pc = emit_l_s(pc, LDA, target, target, &high);
-    } else if ((*address < -0x7fff) || (*address > 0x7fff))
-    {
+    }
+    else if ((*address < -0x7fff) || (*address > 0x7fff)) {
         high = 0;
         calculate_displacement(&high, address, &high, &low);
         pc = emit_l_s(pc, LDH, target, REG31_zero, &high);
         pc = emit_l_s(pc, LDA, target, target, &low);
-    } else {
+    }
+    else {
         pc = emit_l_s(pc, LDA, target, REG31_zero, address);
     }
     return pc;
@@ -238,8 +238,7 @@
 
     char base1 = 0,base2 = 0x04;
 
-    if (type == SUBQ)
-    {
+    if (type == SUBQ) {
         base1 = 0x20; 
         base2 = 0x05;
         type = ADDQ;
Index: types/bignum.h
===================================================================
RCS file: /cvs/public/parrot/types/bignum.h,v
retrieving revision 1.14
diff -u -r1.14 bignum.h
--- types/bignum.h      17 Mar 2002 20:06:20 -0000      1.14
+++ types/bignum.h      6 Jun 2002 04:00:22 -0000
@@ -62,11 +62,11 @@
 /* CONTEXT: defines the context for the operation, precision and rounding */
 
 typedef enum {
-  ROUND_HALF_UP,
-  ROUND_DOWN,
-  ROUND_HALF_EVEN,
-  ROUND_CEILING,
-  ROUND_FLOOR
+    ROUND_HALF_UP,
+    ROUND_DOWN,
+    ROUND_HALF_EVEN,
+    ROUND_CEILING,
+    ROUND_FLOOR
 } BN_ROUNDING;
 
 /* Flags for exception triggers and exception signals */


Reply via email to