Print version text by default if not started in quiet mode.

This commit is contained in:
Daniel Beer 2010-10-28 14:08:22 +13:00
parent 3620996f75
commit 50f589b05c
1 changed files with 4 additions and 6 deletions

10
main.c
View File

@ -261,15 +261,12 @@ static const struct driver driver_table[] = {
}
};
static void version(void)
{
printc(
static const char *version_text =
"MSPDebug version 0.12 - debugging tool for MSP430 MCUs\n"
"Copyright (C) 2009, 2010 Daniel Beer <daniel@tortek.co.nz>\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR "
"PURPOSE.\n");
}
"PURPOSE.\n";
static void usage(const char *progname)
{
@ -409,7 +406,7 @@ static int parse_cmdline_args(int argc, char **argv,
exit(0);
case 'V':
version();
printc("%s", version_text);
exit(0);
case 'v':
@ -489,6 +486,7 @@ int main(int argc, char **argv)
if (parse_cmdline_args(argc, argv, &args) < 0)
return -1;
printc_dbg("%s\n", version_text);
if (setup_driver(&args) < 0)
return -1;