opt_bc.c revision 1.4 1 /* $NetBSD: opt_bc.c,v 1.4 2021/11/19 22:24:29 rillig Exp $ */
2 /* $FreeBSD$ */
3
4 /*
5 * Tests for the options '-bc' and '-nbc'.
6 *
7 * The option '-bc' forces a newline after each comma in a declaration.
8 *
9 * The option '-nbc' removes line breaks between declarators. In most other
10 * places, indent preserves line breaks.
11 */
12
13 #indent input
14 int a,b,c;
15 void function_declaration(int a,int b,int c);
16 int m1,
17 m2,
18 m3;
19 char plain, *pointer;
20 #indent end
21
22 #indent run -bc
23 int a,
24 b,
25 c;
26 void function_declaration(int a, int b, int c);
27 int m1,
28 m2,
29 m3;
30 char plain,
31 *pointer;
32 #indent end
33
34 #indent run -nbc
35 int a, b, c;
36 void function_declaration(int a, int b, int c);
37 int m1, m2, m3;
38 char plain, *pointer;
39 #indent end
40
41
42 #indent input
43 old_style_definition(a, b, c)
44 double a,b,c;
45 {
46 return a+b+c;
47 }
48 #indent end
49
50 #indent run -bc
51 old_style_definition(a, b, c)
52 double a,
53 b,
54 c;
55 {
56 return a + b + c;
57 }
58 #indent end
59
60 #indent run -nbc
61 old_style_definition(a, b, c)
62 double a, b, c;
63 {
64 return a + b + c;
65 }
66 #indent end
67