xref: /netbsd-src/tests/usr.bin/indent/lsym_offsetof.c (revision 47306038c7d906b62edca1fd252c0e0d0772f5a0)
1 /* $NetBSD: lsym_offsetof.c,v 1.5 2022/04/24 09:04:12 rillig Exp $ */
2 
3 /*
4  * Tests for the token lsym_offsetof, which represents the keyword 'offsetof'
5  * that starts an expression for computing the offset of a member in a struct.
6  */
7 
8 //indent input
9 size_t		offset = offsetof(struct s, member);
10 //indent end
11 
12 //indent run-equals-input
13 
14 //indent run-equals-input -bs
15 
16 /*
17  * The option '-pcs' forces a blank after the function name.  That option
18  * applies to 'offsetof' as well, even though it is not really a function.
19  */
20 //indent run -pcs
21 size_t		offset = offsetof (struct s, member);
22 //indent end
23