#define iprintf(fmt, ...) printf("%*s" fmt, 2*depth, "", ##__VA_ARGS__)
int depth;
void print_level()
{
if (depth > 4)
return;
iprintf("level %d\n", depth);
++depth;
print_level();
--depth;
iprintf("level %d\n", depth);
}
print_level();
level 0
level 1
level 2
level 3
level 4
level 4
level 3
level 2
level 1
level 0