]> git.sur5r.net Git - cc65/blob - test/ref/cc65090726.c
remote TABs in doc/ and test/
[cc65] / test / ref / cc65090726.c
1 /*
2   !!DESCRIPTION!! 
3   !!ORIGIN!!      testsuite
4   !!LICENCE!!     Public Domain
5   !!AUTHOR!!
6 */
7
8 #include "common.h"
9
10 struct Record {
11   struct Record *PtrComp;
12   int x;
13 };
14
15 typedef struct Record RecordType;
16 typedef RecordType *RecordPtr;
17
18 void Proc3(RecordPtr *PtrParOut)
19 {
20         /* whatever */
21 }
22
23 void Proc1(RecordPtr PtrParIn)
24 {
25 #define  NextRecord  (*(PtrParIn->PtrComp))
26         Proc3((RecordPtr *)NextRecord.PtrComp);
27         Proc3(&NextRecord.PtrComp);
28         Proc3(&PtrParIn->PtrComp->PtrComp);
29
30 #ifdef CAST_STRUCT_PTR
31         Proc3((RecordPtr *) PtrParIn->PtrComp->PtrComp);
32         Proc3((RecordPtr *) (*(PtrParIn->PtrComp)).PtrComp);
33         Proc3((RecordPtr *) NextRecord.PtrComp);
34 #else
35         Proc3(PtrParIn->PtrComp->PtrComp);
36         Proc3((*(PtrParIn->PtrComp)).PtrComp);
37         Proc3(NextRecord.PtrComp);
38 #endif
39         
40 #undef   NextRecord
41 }
42
43 int main(void)
44 {
45     printf("it works :)\n");
46
47     return 0;
48 }