| 1 | /* $Id: 572c.c 1232 2004-02-12 15:21:45Z bird $ */
|
|---|
| 2 | /** @file
|
|---|
| 3 | *
|
|---|
| 4 | * _Optlink declaration and definition testcases.
|
|---|
| 5 | *
|
|---|
| 6 | * InnoTek Systemberatung GmbH confidential
|
|---|
| 7 | *
|
|---|
| 8 | * Copyright (c) 2003 InnoTek Systemberatung GmbH
|
|---|
| 9 | * Author: knut st. osmundsen <[email protected]>
|
|---|
| 10 | *
|
|---|
| 11 | * All Rights Reserved
|
|---|
| 12 | *
|
|---|
| 13 | */
|
|---|
| 14 | typedef struct some_struct_pointer * PTYPE;
|
|---|
| 15 |
|
|---|
| 16 | /*
|
|---|
| 17 | * Function and method declarations.
|
|---|
| 18 | * Checks mangling.
|
|---|
| 19 | */
|
|---|
| 20 | /* No underscore, No mangling. */
|
|---|
| 21 | void _Optlink CVoid(int a, int b, int c, int d);
|
|---|
| 22 | void * _Optlink CPVoid(int a, int b, int c, int d);
|
|---|
| 23 | int _Optlink CInt(int a, int b, int c, int d);
|
|---|
| 24 | PTYPE _Optlink CPType(int a, int b, int c, int d);
|
|---|
| 25 |
|
|---|
| 26 | /*
|
|---|
| 27 | * Typedefs.
|
|---|
| 28 | * Checks that there is not warnings on these.
|
|---|
| 29 | */
|
|---|
| 30 | typedef void _Optlink Typedef1Void(int a, int b, int c, int d);
|
|---|
| 31 | typedef void * _Optlink Typedef1PVoid(int a, int b, int c, int d);
|
|---|
| 32 | typedef int _Optlink Typedef1Int(int a, int b, int c, int d);
|
|---|
| 33 | typedef PTYPE _Optlink Typedef1PType(int a, int b, int c, int d);
|
|---|
| 34 |
|
|---|
| 35 | typedef void (_Optlink Typedef2Void)(int a, int b, int c, int d);
|
|---|
| 36 | typedef void * (_Optlink Typedef2PVoid)(int a, int b, int c, int d);
|
|---|
| 37 | typedef int (_Optlink Typedef2Int)(int a, int b, int c, int d);
|
|---|
| 38 | typedef PTYPE (_Optlink Typedef2PType)(int a, int b, int c, int d);
|
|---|
| 39 | #ifdef __EMX__
|
|---|
| 40 | typedef void _Optlink (Typedef3Void)(int a, int b, int c, int d);
|
|---|
| 41 | typedef void * _Optlink (Typedef3PVoid)(int a, int b, int c, int d);
|
|---|
| 42 | typedef int _Optlink (Typedef3Int)(int a, int b, int c, int d);
|
|---|
| 43 | typedef PTYPE _Optlink (Typedef3PType)(int a, int b, int c, int d);
|
|---|
| 44 | #endif
|
|---|
| 45 |
|
|---|
| 46 | typedef void (* _Optlink PTypedef1Void)(int a, int b, int c, int d);
|
|---|
| 47 | typedef void * (* _Optlink PTypedef1PVoid)(int a, int b, int c, int d);
|
|---|
| 48 | typedef int (* _Optlink PTypedef1Int)(int a, int b, int c, int d);
|
|---|
| 49 | typedef PTYPE (* _Optlink PTypedef1PType)(int a, int b, int c, int d);
|
|---|
| 50 |
|
|---|
| 51 | /* Alternate writing which should have the same effect I think... */
|
|---|
| 52 | typedef void (_Optlink * PTypedef2Void)(int a, int b, int c, int d);
|
|---|
| 53 | typedef void * (_Optlink * PTypedef2PVoid)(int a, int b, int c, int d);
|
|---|
| 54 | typedef int (_Optlink * PTypedef2Int)(int a, int b, int c, int d);
|
|---|
| 55 | typedef PTYPE (_Optlink * PTypedef2PType)(int a, int b, int c, int d);
|
|---|
| 56 | #ifdef __EMX__
|
|---|
| 57 | /* Alternate writing which should have the same effect I think... */
|
|---|
| 58 | typedef void _Optlink (* PTypedef3Void)(int a, int b, int c, int d);
|
|---|
|
|---|