11.5Srillig/* $NetBSD: opt_cd.c,v 1.5 2023/06/17 22:09:24 rillig Exp $ */ 21.5Srillig 31.5Srillig/* 41.5Srillig * Tests for the '-cd' option, which sets the column (not the indentation) for 51.5Srillig * declarations. 61.5Srillig */ 71.1Srillig 81.4Srillig//indent input 91.5Srilligint global_var; /* declaration comment */ 101.5Srilligstmt; /* declaration comment, as the code in this line starts at indentation level 0 */ 111.5Srillig 121.5Srillig{ 131.5Srillig int local_var /* unfinished declaration */ 141.5Srillig ; /* finished declaration */ 151.5Srillig stmt; /* statement */ 161.5Srillig} 171.4Srillig//indent end 181.1Srillig 191.4Srillig//indent run -cd49 201.5Srilligint global_var; /* declaration comment */ 211.5Srilligstmt; /* declaration comment, as the 221.5Srillig * code in this line starts at 231.5Srillig * indentation level 0 */ 241.5Srillig 251.5Srillig{ 261.5Srillig int local_var /* unfinished declaration */ 271.5Srillig// $ XXX: Why is the semicolon indented one column to the left? 281.5Srillig ; /* finished declaration */ 291.5Srillig stmt; /* statement */ 301.5Srillig} 311.4Srillig//indent end 321.2Srillig 331.2Srillig/* If '-cd' is not given, it falls back to '-c'. */ 341.5Srillig//indent run -c49 351.5Srilligint global_var; /* declaration comment */ 361.5Srilligstmt; /* declaration comment, as the 371.5Srillig * code in this line starts at 381.5Srillig * indentation level 0 */ 391.5Srillig 401.5Srillig{ 411.5Srillig int local_var /* unfinished declaration */ 421.5Srillig// $ XXX: Why is the semicolon indented one column to the left? 431.5Srillig ; /* finished declaration */ 441.5Srillig stmt; /* statement */ 451.5Srillig} 461.5Srillig//indent end 47