2 Copyright © 1995-2002, The AROS Development Team. All rights reserved.
6 #include <proto/exec.h>
7 #include <clib/exec_protos.h>
8 #include "initstruct.h"
21 #define O(n) offsetof(struct demo,n)
25 S_CPY (1,3,L
); /* 3 LONGs */
26 S_REP (2,7,B
); /* 7 BYTEs */
27 S_CPYO (3,3,L
); /* 3 LONGs */
28 S_CPYO24(4,1,W
); /* 1 WORD */
32 { { I_CPY (3,L
), { 1, 2, 3 } } },
33 { { I_REP (7,B
), 4 } },
34 { { I_CPYO (3,L
,O(c
)), { 5, 6, 7 } } },
35 { { I_CPYO24(1,W
,O(d
)), { 8 } } },
41 int main(int argc
,char *argv
[])
46 InitStruct(&inittable
,&d
,sizeof(d
));
48 for(i
=0;i
<sizeof(d
);i
++)
49 printf("%02x ",((UBYTE
*)&d
)[i
]);