[svn:parrot] r36170 - in trunk/config/auto: alignptrs attributes backtrace byteorder cgoto funcptr gc gcc glibc headers isreg jit memalign msvc sizes va_ptr warnings
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Fri Jan 30 14:08:55 UTC 2009
Author: fperrad
Date: Fri Jan 30 14:08:53 2009
New Revision: 36170
URL: https://trac.parrot.org/parrot/changeset/36170
Log:
[codingstd] fix C coding standard in template file.
Modified:
trunk/config/auto/alignptrs/test_c.in
trunk/config/auto/attributes/test_c.in
trunk/config/auto/backtrace/test_c.in
trunk/config/auto/backtrace/test_dlinfo_c.in
trunk/config/auto/byteorder/test_c.in
trunk/config/auto/cgoto/test_c.in
trunk/config/auto/funcptr/test_c.in
trunk/config/auto/gc/test_c.in
trunk/config/auto/gcc/test_c.in
trunk/config/auto/glibc/test_c.in
trunk/config/auto/headers/test_c.in
trunk/config/auto/isreg/test_c.in
trunk/config/auto/jit/test_c.in
trunk/config/auto/memalign/test_c.in
trunk/config/auto/msvc/test_c.in
trunk/config/auto/sizes/test2_c.in
trunk/config/auto/sizes/test3_c.in
trunk/config/auto/sizes/test_c.in
trunk/config/auto/va_ptr/test_c.in
trunk/config/auto/warnings/test_c.in
Modified: trunk/config/auto/alignptrs/test_c.in
==============================================================================
--- trunk/config/auto/alignptrs/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/alignptrs/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,32 +1,33 @@
/*
- * testalignptrs.in - figure out our minimum pointer alignment
- *
- * This file is automatically generated by Configure
- * from config/auto/alignptrs/test_c.in.
- */
+Copyright (C) 2002-2009, The Perl Foundation.
+$Id$
+
+figure out our minimum pointer alignment
+*/
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
/* Try to catch bus errors */
#ifdef SIGBUS
-#include <stdlib.h>
+# include <stdlib.h>
void bletch(int s) { exit(1); }
#endif
-int main(int argc, char **argv) {
-
+int
+main(int argc, char **argv)
+{
int i;
char *c;
long space[32];
void **ptr;
-
+
int align = 0;
- if(argc != 2) {
+ if (argc != 2) {
printf("FAILED - single command-line parameter required!\n");
- return 1;
+ return 1;
}
#ifdef SIGBUS
@@ -36,16 +37,16 @@
for (i = 0; i < 32; i ++) space[i] = 0;
for (c = argv[1]; *c; c++) align = align * 10 + ((int)*c - '0');
-
+
#if defined(__alpha)
if (align < 8) {
printf("Soft failure hack for systems that simulate unaligned access\n");
return 1;
}
#endif
-
+
ptr = (void **)((char *)space + align);
-
+
if (*ptr == (void *)0)
printf("%d OK\n", align);
else
@@ -53,3 +54,10 @@
return 0;
}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: trunk/config/auto/attributes/test_c.in
==============================================================================
--- trunk/config/auto/attributes/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/attributes/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,7 +1,10 @@
/*
- * figure out if the compiler supports attributes.
- * see parrot/compiler.h for attribute value definitions.
- */
+Copyright (C) 2007-2009, The Perl Foundation.
+$Id$
+
+figure out if the compiler supports attributes.
+see parrot/compiler.h for attribute value definitions.
+*/
#include <stdio.h>
#include <stdlib.h>
@@ -14,7 +17,7 @@
__attribute__deprecated__
void *
dummyfunc(const char *my_format, ...)
- __attribute__format__(printf,1,2)
+ __attribute__format__(printf, 1, 2)
__attribute__nonnull__(1)
;
@@ -40,13 +43,9 @@
return EXIT_SUCCESS;
}
-
/*
* Local variables:
- * c-indentation-style: bsd
- * c-basic-offset: 4
- * indent-tabs-mode: nil
+ * c-file-style: "parrot"
* End:
- *
- * vim: expandtab shiftwidth=4 ft=c:
+ * vim: expandtab shiftwidth=4:
*/
Modified: trunk/config/auto/backtrace/test_c.in
==============================================================================
--- trunk/config/auto/backtrace/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/backtrace/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,6 +1,9 @@
/*
- * test_c.c - figure out if libc has backtrace() & backtrace_symbols()
- */
+Copyright (C) 2007-2009, The Perl Foundation.
+$Id$
+
+figure out if libc has backtrace() & backtrace_symbols()
+*/
#include <execinfo.h>
#include <stdlib.h>
@@ -19,10 +22,7 @@
/*
* Local variables:
- * c-indentation-style: bsd
- * c-basic-offset: 4
- * indent-tabs-mode: nil
+ * c-file-style: "parrot"
* End:
- *
* vim: expandtab shiftwidth=4:
*/
Modified: trunk/config/auto/backtrace/test_dlinfo_c.in
==============================================================================
--- trunk/config/auto/backtrace/test_dlinfo_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/backtrace/test_dlinfo_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,6 +1,9 @@
/*
- * test_dlinfo_c.c - check that Dl_info is avaible
- */
+Copyright (C) 2009, The Perl Foundation.
+$Id$
+
+check that Dl_info is avaible
+*/
#include <execinfo.h>
#include <dlfcn.h>
@@ -15,10 +18,7 @@
/*
* Local variables:
- * c-indentation-style: bsd
- * c-basic-offset: 4
- * indent-tabs-mode: nil
+ * c-file-style: "parrot"
* End:
- *
* vim: expandtab shiftwidth=4:
*/
Modified: trunk/config/auto/byteorder/test_c.in
==============================================================================
--- trunk/config/auto/byteorder/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/byteorder/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,25 +1,39 @@
+/*
+Copyright (C) 2002-2009, The Perl Foundation.
+$Id$
+
+*/
+
#include <stdlib.h>
#include <stdio.h>
-int main() {
- int i;
- union W {
- unsigned char b[sizeof(@iv@)/sizeof(unsigned char)];
- @iv@ w;
- } w;
- if(sizeof(w) == 4) {
- w.w = 0x04030201;
- }
- else {
- w.w = 0x08070605;
- w.w <<= 32;
- w.w |= 0x04030201;
- }
+int
+main()
+{
+ int i;
+ union W {
+ unsigned char b[sizeof (@iv@)/sizeof (unsigned char)];
+ @iv@ w;
+ } w;
+ if (sizeof (w) == 4) {
+ w.w = 0x04030201;
+ }
+ else {
+ w.w = 0x08070605;
+ w.w <<= 32;
+ w.w |= 0x04030201;
+ }
- for(i = 0; i < sizeof(w.b); i++) {
- printf("%1u", w.b[i]);
- }
- printf("\n");
- exit(0);
- return 0;
+ for (i = 0; i < sizeof (w.b); i++) {
+ printf("%1u", w.b[i]);
+ }
+ printf("\n");
+ return 0;
}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: trunk/config/auto/cgoto/test_c.in
==============================================================================
--- trunk/config/auto/cgoto/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/cgoto/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,19 +1,28 @@
/*
- * testcomputedgoto.c - figure out if we can use computed goto
- *
- * This file is automatically generated by Configure
- * from testcomputedgoto_c.in.
- */
+Copyright (C) 2002-2009, The Perl Foundation.
+$Id$
+
+figure out if we can use computed goto
+*/
-int main(int argc, char **argv) {
- static void *ptr = &&LABEL;
- int a;
+int
+main(int argc, char **argv)
+{
+ static void *ptr = &&LABEL;
+ int a;
+
+ goto *ptr;
- goto *ptr;
-
LABEL: {
- a = 1;
+ a = 1;
}
-
- return 0;
+
+ return 0;
}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: trunk/config/auto/funcptr/test_c.in
==============================================================================
--- trunk/config/auto/funcptr/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/funcptr/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,7 +1,9 @@
/*
- * testparrotfuncptr.c - figure out if the compiler will let us do
- * non-ansi function pointer casts.
- */
+Copyright (C) 2002-2009, The Perl Foundation.
+$Id$
+
+figure out if the compiler will let us do non-ansi function pointer casts.
+*/
#include <stdio.h>
@@ -35,10 +37,7 @@
/*
* Local variables:
- * c-indentation-style: bsd
- * c-basic-offset: 4
- * indent-tabs-mode: nil
+ * c-file-style: "parrot"
* End:
- *
* vim: expandtab shiftwidth=4:
*/
Modified: trunk/config/auto/gc/test_c.in
==============================================================================
--- trunk/config/auto/gc/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/gc/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,15 +1,26 @@
/*
- * gc.c - figure out if we can use malloc as allocator
- *
- * This file is automatically generated by Configure
- * from gc.in.
- */
+Copyright (C) 2002-2009, The Perl Foundation.
+$Id$
+
+figure out if we can use malloc as allocator
+*/
+
#include <@malloc_header@>
#include <stdio.h>
-int main(int argc, char **argv) {
- void *p = malloc(128);
- int used = mallinfo().uordblks;
- printf("%d\n", used);
- return 0;
+int
+main(int argc, char **argv)
+{
+ void *p = malloc(128);
+ int used = mallinfo().uordblks;
+ printf("%d\n", used);
+
+ return 0;
}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: trunk/config/auto/gcc/test_c.in
==============================================================================
--- trunk/config/auto/gcc/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/gcc/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,6 +1,9 @@
/*
- * figure out if the compiler is gcc.
- */
+Copyright (C) 2002-2009, The Perl Foundation.
+$Id$
+
+figure out if the compiler is gcc.
+*/
#include <stdio.h>
#include <stdlib.h>
@@ -21,13 +24,9 @@
return EXIT_SUCCESS;
}
-
/*
* Local variables:
- * c-indentation-style: bsd
- * c-basic-offset: 4
- * indent-tabs-mode: nil
+ * c-file-style: "parrot"
* End:
- *
* vim: expandtab shiftwidth=4:
*/
Modified: trunk/config/auto/glibc/test_c.in
==============================================================================
--- trunk/config/auto/glibc/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/glibc/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,6 +1,9 @@
/*
- * test_c.c - seeing if GNU libc is installed
- */
+Copyright (C) 2008-2009, The Perl Foundation.
+$Id$
+
+seeing if GNU libc is installed
+*/
#include <stdio.h>
#include <stdlib.h>
@@ -21,10 +24,7 @@
/*
* Local variables:
- * c-indentation-style: bsd
- * c-basic-offset: 4
- * indent-tabs-mode: nil
+ * c-file-style: "parrot"
* End:
- *
* vim: expandtab shiftwidth=4:
*/
Modified: trunk/config/auto/headers/test_c.in
==============================================================================
--- trunk/config/auto/headers/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/headers/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,10 +1,25 @@
+/*
+Copyright (C) 2002-2009, The Perl Foundation.
+$Id$
+
+*/
+
@testheaders@
/* Don't want stdio influencing our ability to include headers. Some day soon
we won't be using stdio */
#include <stdio.h>
-int main (int argc, char* argv[]) {
+int
+main(int argc, char* argv[])
+{
printf("@testheader@ OK\n");
return 0;
}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: trunk/config/auto/isreg/test_c.in
==============================================================================
--- trunk/config/auto/isreg/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/isreg/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,30 +1,42 @@
/*
- * test for S_ISREG macro
- *
- */
+Copyright (C) 2003-2009, The Perl Foundation.
+$Id$
+
+test for S_ISREG macro
+*/
#include <stdio.h>
#include <sys/stat.h>
-int main(int argc, char **argv) {
+int
+main(int argc, char **argv)
+{
struct stat file_stat;
struct stat dir_stat;
-
+
if (0 != stat("config/auto/isreg/test_c.in", &file_stat)) {
puts("file stat failed");
- return 0;
+ return 0;
}
-
+
if (0 != stat("config/auto/isreg", &dir_stat)) {
puts("dir stat failed");
- return 0;
+ return 0;
}
if (S_ISREG(file_stat.st_mode) && ! S_ISREG(dir_stat.st_mode)) {
puts("ok");
- } else {
+ }
+ else {
puts("borken");
}
-
+
return 0;
}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: trunk/config/auto/jit/test_c.in
==============================================================================
--- trunk/config/auto/jit/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/jit/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,7 +1,11 @@
-#include <stdio.h>
/*
- * test for the fcomip float instruction
- */
+Copyright (C) 2002-2009, The Perl Foundation.
+$Id$
+
+test for the fcomip float instruction
+*/
+
+#include <stdio.h>
/*
* c equiv:
@@ -13,29 +17,37 @@
/* this code leaves one op on the fp stack, but this shouldn't harm */
char code[] = {
- 0x55, /* pushl %ebp */
- 0x89,0xE5, /* movl %esp,%ebp */
- 0x83,0xEC,0x18, /* subl $24,%esp */
- 0xDB,0x45,0x08, /* fildl 8(%ebp) */
- 0xDB,0x45,0x0C, /* fildl 12(%ebp)*/
- 0xDF,0xE9, /* fucomip */
- 0x0F,0x94,0xC0, /* sete %al */
- 0x31,0xD2, /* xorl %edx,%edx */
- 0x88,0xC2, /* movb %al,%dl */
- 0x89,0xD0, /* movl %edx,%eax */
- 0x89,0xEC, /* movl %ebp,%esp */
- 0x5D, /* popl %ebp */
- 0xC3 /* ret */
+ 0x55, /* pushl %ebp */
+ 0x89, 0xE5, /* movl %esp,%ebp */
+ 0x83, 0xEC, 0x18, /* subl $24,%esp */
+ 0xDB, 0x45, 0x08, /* fildl 8(%ebp) */
+ 0xDB, 0x45, 0x0C, /* fildl 12(%ebp)*/
+ 0xDF, 0xE9, /* fucomip */
+ 0x0F, 0x94, 0xC0, /* sete %al */
+ 0x31, 0xD2, /* xorl %edx,%edx */
+ 0x88, 0xC2, /* movb %al,%dl */
+ 0x89, 0xD0, /* movl %edx,%eax */
+ 0x89, 0xEC, /* movl %ebp,%esp */
+ 0x5D, /* popl %ebp */
+ 0xC3 /* ret */
};
typedef int (*pf)(int, int);
-int main()
+
+int
+main()
{
- pf t = (pf) code;
- if (t(10,10) && !t(10,20))
- puts("ok");
- else
- return 1;
- return 0;
+ pf t = (pf) code;
+ if (t(10, 10) && !t(10, 20))
+ puts("ok");
+ else
+ return 1;
+ return 0;
}
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: trunk/config/auto/memalign/test_c.in
==============================================================================
--- trunk/config/auto/memalign/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/memalign/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,14 +1,24 @@
/*
- * test for memalign function
- *
- * This file is automatically generated by Configure
- * from test_c.in.
- */
+Copyright (C) 2003-2009, The Perl Foundation.
+$Id$
+
+test for memalign function
+*/
+
#include <@malloc_header@>
#include <stdio.h>
-int main(int argc, char **argv) {
- void *ptr = memalign(256, 17);
- puts(ptr && ((@ptrcast@)ptr & 0xff) == 0 ? "ok" : "nix");
- return 0;
+int
+main(int argc, char **argv)
+{
+ void *ptr = memalign(256, 17);
+ puts(ptr && ((@ptrcast@)ptr & 0xff) == 0 ? "ok" : "nix");
+ return 0;
}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: trunk/config/auto/msvc/test_c.in
==============================================================================
--- trunk/config/auto/msvc/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/msvc/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,6 +1,9 @@
/*
- * figure out if the compiler is msvc.
- */
+Copyright (C) 2005-2009, The Perl Foundation.
+$Id$
+
+figure out if the compiler is msvc.
+*/
#include <stdio.h>
#include <stdlib.h>
@@ -25,13 +28,9 @@
return EXIT_SUCCESS;
}
-
/*
* Local variables:
- * c-indentation-style: bsd
- * c-basic-offset: 4
- * indent-tabs-mode: nil
+ * c-file-style: "parrot"
* End:
- *
* vim: expandtab shiftwidth=4:
*/
Modified: trunk/config/auto/sizes/test2_c.in
==============================================================================
--- trunk/config/auto/sizes/test2_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/sizes/test2_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,21 +1,30 @@
/*
- * test.c - figure out if a 64-bit type is available
- *
- * This file is automatically generated by Configure
- * from test_c.in.
- */
+Copyright (C) 2003-2009, The Perl Foundation.
+$Id$
+
+figure out if a 64-bit type is available
+*/
#include <stdio.h>
-int main(int argc, char **argv) {
- @int8_t@ dummy;
+int
+main(int argc, char **argv)
+{
+ @int8_t@ dummy;
+
+ printf("(");
- printf("(");
+ printf("\thugeintval => '%s',\n", "@int8_t@");
+ printf("\thugeintvalsize => %d,\n", sizeof (@int8_t@));
- printf("\thugeintval => '%s',\n", "@int8_t@");
- printf("\thugeintvalsize => %d,\n", sizeof(@int8_t@));
+ printf(");\n");
- printf(");\n");
-
- return 0;
+ return 0;
}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: trunk/config/auto/sizes/test3_c.in
==============================================================================
--- trunk/config/auto/sizes/test3_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/sizes/test3_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,14 +1,23 @@
/*
- * test.c - figure out if a 64-bit type is available
- *
- * This file is automatically generated by Configure
- * from test3_c.in.
- */
+Copyright (C) 2008-2009, The Perl Foundation.
+$Id$
+
+figure out if a 64-bit type is available
+*/
#include <stdio.h>
-int main(int argc, char **argv) {
+int
+main(int argc, char **argv)
+{
long double foo;
- printf("%u", sizeof(foo));
+ printf("%u", sizeof (foo));
return 0;
}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: trunk/config/auto/sizes/test_c.in
==============================================================================
--- trunk/config/auto/sizes/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/sizes/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,29 +1,37 @@
/*
- * test.c - figure out some Configure settings
- *
- * This file is automatically generated by Configure
- * from test_c.in.
- */
+Copyright (C) 2002-2009, The Perl Foundation.
+$Id$
+
+figure out some Configure settings
+*/
#include <stdio.h>
-int main(int argc, char **argv) {
- printf("(");
-
- printf("\tintvalsize => %d,\n", sizeof(@iv@));
- printf("\tnumvalsize => %d,\n", sizeof(@nv@));
- printf("\topcode_t_size => %d,\n", sizeof(@opcode_t@));
-
- printf("\tshortsize => %d,\n", sizeof(short));
- printf("\tintsize => %d,\n", sizeof(int));
- printf("\tlongsize => %d,\n", sizeof(long));
- printf("\tptrsize => %d,\n", sizeof(void*));
-
- printf("\tfloatsize => %d,\n", sizeof(float));
- printf("\tdoublesize => %d,\n", sizeof(double));
-
- printf(");\n");
-
- return 0;
+int
+main(int argc, char **argv)
+{
+ printf("(");
+
+ printf("\tintvalsize => %d,\n", sizeof (@iv@));
+ printf("\tnumvalsize => %d,\n", sizeof (@nv@));
+ printf("\topcode_t_size => %d,\n", sizeof (@opcode_t@));
+
+ printf("\tshortsize => %d,\n", sizeof (short));
+ printf("\tintsize => %d,\n", sizeof (int));
+ printf("\tlongsize => %d,\n", sizeof (long));
+ printf("\tptrsize => %d,\n", sizeof (void*));
+
+ printf("\tfloatsize => %d,\n", sizeof (float));
+ printf("\tdoublesize => %d,\n", sizeof (double));
+
+ printf(");\n");
+
+ return 0;
}
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: trunk/config/auto/va_ptr/test_c.in
==============================================================================
--- trunk/config/auto/va_ptr/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/va_ptr/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,3 +1,9 @@
+/*
+Copyright (C) 2005-2009, The Perl Foundation.
+$Id$
+
+*/
+
#include <stdio.h>
#include <stdarg.h>
@@ -24,9 +30,9 @@
d = va_arg(*ap, double);
s = va_arg(*ap, char *);
if (i == 42 && d == 2.0)
- printf("%s\n",s);
+ printf("%s\n", s);
else
- printf("nok\n");
+ printf("nok\n");
}
static void
@@ -46,10 +52,16 @@
va_end(ap);
}
-int main(int argc, char *argv[])
+int
+main(int argc, char *argv[])
{
test0(3, 42, 2.0, "ok");
return 0;
}
-
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: trunk/config/auto/warnings/test_c.in
==============================================================================
--- trunk/config/auto/warnings/test_c.in Fri Jan 30 14:05:19 2009 (r36169)
+++ trunk/config/auto/warnings/test_c.in Fri Jan 30 14:08:53 2009 (r36170)
@@ -1,7 +1,8 @@
/*
- * figure out if the compiler supports attributes.
- * see parrot/compiler.h for attribute value definitions.
- */
+Copyright (C) 2007-2009, The Perl Foundation.
+$Id$
+
+*/
#include <stdio.h>
#include <stdlib.h>
@@ -14,13 +15,9 @@
return EXIT_SUCCESS;
}
-
/*
* Local variables:
- * c-indentation-style: bsd
- * c-basic-offset: 4
- * indent-tabs-mode: nil
+ * c-file-style: "parrot"
* End:
- *
- * vim: expandtab shiftwidth=4 ft=c:
+ * vim: expandtab shiftwidth=4:
*/
More information about the parrot-commits
mailing list