]> git.sur5r.net Git - cc65/blob - test/ref/macro.c
remote TABs in doc/ and test/
[cc65] / test / ref / macro.c
1 /*
2   !!DESCRIPTION!! macro bug test program
3   !!ORIGIN!!      testsuite
4   !!LICENCE!!     Public Domain
5   !!AUTHOR!!      Groepaz/Hitmen
6 */
7
8 #include <stdio.h>
9 #include <stdlib.h>
10
11 unsigned long fs=7;
12 unsigned long fd=5;
13 unsigned long a=3;
14
15 unsigned long _func(unsigned long x,unsigned long y)
16 {
17         printf("x:%ld y:%ld\n",x,y);
18         return 0;
19 }
20
21 #define func(x,y)       _func(x,y)
22
23 int main(void)
24 {
25         fs= func( (fd/a) ,  func(2,0x0082c90f) );
26         printf("fs:%ld\n",fs);
27         fs=_func( (fd/a) , _func(2,0x0082c90f) );
28         printf("fs:%ld\n",fs);
29         return 0;
30 }