]> git.sur5r.net Git - cc65/blobdiff - test/err/front.c
remote TABs in doc/ and test/
[cc65] / test / err / front.c
index dde8d47ecd1855410663fe565d6568009ef8f9d6..af59209b7329bf368c02d20dfd0e1f9f87ee56eb 100644 (file)
@@ -5,25 +5,25 @@
 */
 
 main() {
-       return 0;
+        return 0;
 }
 
 nested(a,b) {
-       if ((a<4 && b == 'r')
-               || (a == 1 && (b == 'h' || b == 'i'))
-               || (a == 2 && (b == 'o' || b == 'y'))
-       ) a=b;
+        if ((a<4 && b == 'r')
+                || (a == 1 && (b == 'h' || b == 'i'))
+                || (a == 2 && (b == 'o' || b == 'y'))
+        ) a=b;
 }
 
 /* type name scope */
 
-void s(struct D *d) {} /* this struct D differs from the one below */
+void s(struct D *d) {}  /* this struct D differs from the one below */
 typedef struct D D;
 struct D {int x, y;} Dy={0};
 D Dz={1};
 Dfunc(){
-       D a; a.y=1;
-       s(&Dy);         /* error */
+        D a; a.y=1;
+        s(&Dy);         /* error */
 }
 
 /* qualifiers */
@@ -33,39 +33,39 @@ const int a, *x; int b, *y;
 volatile unsigned z;
 
 f() {
-       x = y;
-       z = z + z;      /* should be 2 references to z's r-value */
+        x = y;
+        z = z + z;      /* should be 2 references to z's r-value */
 }
 f1() {
-       x = &a;
-       x = &b;
-       y = &a;         /* error */
-       y = &b;
+        x = &a;
+        x = &b;
+        y = &a;         /* error */
+        y = &b;
 }
 f2(int **a, int **b) {
-       f(&x, &y);
-       **a = 0;
-       return **b;
+        f(&x, &y);
+        **a = 0;
+        return **b;
 }
 g(const int *p) {
-       g(&a);
-       g(&b);
-       return *p;
+        g(&a);
+        g(&b);
+        return *p;
 }
 h(int *p) {
-       f(&a);
-       f(&b);
-       return *p;
+        f(&a);
+        f(&b);
+        return *p;
 }
 h1(const int x, int y) {
-       h1(a,b);
-       h1(b,a);
-       return x + y;
+        h1(a,b);
+        h1(b,a);
+        return x + y;
 }
 h2() {
-       char *b; const void *p;
-       p = b;
-       b = p;          /* error (incompatible pointer type) */
+        char *b; const void *p;
+        p = b;
+        b = p;          /* error (incompatible pointer type) */
 }
 
 /* static naming */
@@ -120,14 +120,14 @@ extern int strcmp(const char*, const char*);
 extern void qsort(void*, int, int, int (*)(const void*, const void*));
 extern int cmp(char**a, char**b) { return strcmp(*a,*b); }
 sort() {
-       int n; char *a[100];
-       qsort(a, n, sizeof(char*), (int (*)(const void*, const void*))cmp);
+        int n; char *a[100];
+        qsort(a, n, sizeof(char*), (int (*)(const void*, const void*))cmp);
         qsort(a, n, sizeof(char*), cmp);        /* error (incompatible pointer type) */
 }
 
 /* nasty calls */
 
 onearg(){
-       int a,b,c,d;
-       f( ( (a? (b = 1): (c = 2)), (d ? 3 : 4) ) );    /* 1 argument */
+        int a,b,c,d;
+        f( ( (a? (b = 1): (c = 2)), (d ? 3 : 4) ) );    /* 1 argument */
 }