ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

commit 1578bdbd2557b167a046f5b000e5c8b4b522a289
parent c35aa105567bd93837a2bb3de591bd37cc76e1b8
Author: Frederic Cambus <fred@statdns.com>
Date:   Fri, 16 Aug 2019 09:39:02 +0200

Introduce a version() function to display version information, obviously.

Diffstat:
Msrc/ansilove.c | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/ansilove.c b/src/ansilove.c @@ -35,8 +35,8 @@ /* prototypes */ static void synopsis(void); +static void version(void); -/* following the IEEE Std 1003.1 for utility conventions */ static void synopsis(void) { @@ -46,13 +46,17 @@ synopsis(void) " [-R factor] file\n\n"); } -int -main(int argc, char *argv[]) +static void +version(void) { fprintf(stdout, "AnsiLove/C %s - ANSI / ASCII art to PNG converter\n" "Copyright (c) 2011-2019 Stefan Vogt, Brian Cassidy, and " "Frederic Cambus.\n", VERSION); +} +int +main(int argc, char *argv[]) +{ /* SAUCE record related bool types */ bool justDisplaySAUCE = false; bool fileHasSAUCE = false; @@ -143,6 +147,7 @@ main(int argc, char *argv[]) justDisplaySAUCE = true; break; case 'v': + version(); return EXIT_SUCCESS; } }