comparison th_util.c @ 45:e031a062b731

Separate program "banner" printing from th_args_help() to th_print_banner().
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 03 Oct 2011 15:37:53 +0300
parents 5b1e38a41bac
children 55e36ec05881
comparison
equal deleted inserted replaced
44:669d2bc97c57 45:e031a062b731
40 th_prog_license = progLicense; 40 th_prog_license = progLicense;
41 else 41 else
42 th_prog_license = TH_PROG_LICENSE; 42 th_prog_license = TH_PROG_LICENSE;
43 43
44 th_initialized = TRUE; 44 th_initialized = TRUE;
45 }
46
47
48 void th_print_banner(FILE *outFile, const char *binName, const char *progUsage)
49 {
50 fprintf(outFile,
51 "\n%s v%s (%s)\n"
52 "%s\n"
53 "%s\n"
54 "Usage: %s %s\n",
55 th_prog_name, th_prog_version, th_prog_fullname,
56 th_prog_author, th_prog_license, binName, progUsage);
45 } 57 }
46 58
47 59
48 /* Print formatted error, warning and information messages 60 /* Print formatted error, warning and information messages
49 * TODO: Implement th_vfprintf() and friends? 61 * TODO: Implement th_vfprintf() and friends?