Return to psym_do.c CVS log | Up to [cvs.NetBSD.org] / src / tests / usr.bin / indent |
Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. |
version 1.3, 2022/04/24 09:04:12 | version 1.4, 2022/04/24 10:36:37 | ||
---|---|---|---|
|
|
||
*/ | */ | ||
//indent input | //indent input | ||
// TODO: add input | void function(void) { | ||
do stmt(); while (0); | |||
do {} while (0); | |||
} | |||
//indent end | //indent end | ||
//indent run-equals-input | //indent run | ||
void | |||
function(void) | |||
{ | |||
do | |||
stmt(); | |||
while (0); | |||
do { | |||
} while (0); | |||
} | |||
//indent end | |||
/* | |||
* The keyword 'do' is followed by a statement, as opposed to 'while', which | |||
* is followed by a parenthesized expression. | |||
*/ | |||
//indent input | |||
void | |||
function(void) | |||
{ | |||
do(var)--;while(var>0); | |||
} | |||
//indent end | |||
//indent run | |||
void | |||
function(void) | |||
{ | |||
do | |||
(var)--; | |||
while (var > 0); | |||
} | |||
//indent end |