|
Last change
on this file since 1668 was 642, checked in by bird, 22 years ago |
|
Initial coding.
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Author Date Id Revision
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | /* $Id: tst4.c 642 2003-08-19 00:26:01Z bird $ */
|
|---|
| 2 | /** @file
|
|---|
| 3 | *
|
|---|
| 4 | * Testcase no.4
|
|---|
| 5 | * For checking that certain _Optlink declarations/defines does not
|
|---|
| 6 | * infect code after the ';'. (As we've seen in mozilla lately.)
|
|---|
| 7 | *
|
|---|
| 8 | * InnoTek Systemberatung GmbH confidential
|
|---|
| 9 | *
|
|---|
| 10 | * Copyright (c) 2003 InnoTek Systemberatung GmbH
|
|---|
| 11 | * Author: knut st. osmundsen <bird-srcspam@anduin.net>
|
|---|
| 12 | *
|
|---|
| 13 | * All Rights Reserved
|
|---|
| 14 | *
|
|---|
| 15 | */
|
|---|
| 16 |
|
|---|
| 17 | #include <stdio.h>
|
|---|
| 18 |
|
|---|
| 19 | /** pre optlink statement declaration. */
|
|---|
| 20 | int defaultconvention(int i1, int i2, int i3);
|
|---|
| 21 |
|
|---|
| 22 | /** function pointer type */
|
|---|
| 23 | typedef int (_Optlink * pfn)(int i1, int i2, int i3);
|
|---|
| 24 |
|
|---|
| 25 | /** pre optlink statement declaration. */
|
|---|
| 26 | extern int asmdefaultconvention(int i1, int i2, int i3);
|
|---|
| 27 |
|
|---|
| 28 | /** post optlink statement defintion. */
|
|---|
| 29 | int defaultconvention(int i1, int i2, int i3)
|
|---|
| 30 | {
|
|---|
| 31 | if (i1 != 1)
|
|---|
| 32 | return 1;
|
|---|
| 33 | if (i2 != 2)
|
|---|
| 34 | return 2;
|
|---|
| 35 | if (i3 != 3)
|
|---|
| 36 | return 3;
|
|---|
| 37 | return 0;
|
|---|
| 38 | }
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 | int main ()
|
|---|
| 42 | {
|
|---|
| 43 | int rc;
|
|---|
| 44 |
|
|---|
| 45 | rc = defaultconvention(1, 2, 3);
|
|---|
| 46 | if (!rc)
|
|---|
| 47 | rc = asmdefaultconvention(1, 2, 3);
|
|---|
| 48 | if (!rc)
|
|---|
| 49 | printf("tst4: Success.\n");
|
|---|
| 50 | else
|
|---|
| 51 | printf("tst4: failure.\n");
|
|---|
| 52 | return rc;
|
|---|
| 53 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.