equal
deleted
inserted
replaced
|
1 /** |
|
2 * $Id: tokenpasting.c,v 1.1.1.1 2008-04-28 17:32:53 mbroeker Exp $ |
|
3 * $Source: /development/c/demos/tokenpasting.c,v $ |
|
4 * |
|
5 * Description: Demonstration of the secret token concatenation mechanism |
|
6 */ |
|
7 |
|
8 #include <stdio.h> |
|
9 #include <stdlib.h> |
|
10 |
|
11 #define a(a,b) { tsb.fd##a = b; } |
|
12 |
|
13 struct { |
|
14 int fd1; |
|
15 int fd2; |
|
16 int fd3; |
|
17 } tsb; |
|
18 |
|
19 int main (int argc, char **argv) |
|
20 { |
|
21 a (1, 10); |
|
22 a (2, 20); |
|
23 a (3, 30); |
|
24 |
|
25 printf ("1=[%d] 2=[%d] 3=[%d]\n", tsb.fd1, tsb.fd2, tsb.fd3); |
|
26 |
|
27 return EXIT_SUCCESS; |
|
28 } |