No, indentation should come first as you write. It's meant to make the code easier to read, and hence easier to debug, maintain, etc.
boolean isn't a datatype in C, so unless you define it yourself, or it's defined in some library, you can't use it.
Here's an indented -- and slightly altered -- version of your program:
Much easier to read, isn't it?
typedef struct hello
typedef struct hey
struct hello *ptr;