main: replaced booleans by a single format option.

The format enumeration specifies the output format.