$ git clone https://tcclient.ion.nu/tc_client.git
commit 1ed23e2c634cce1296179c92d44324d2a89bd094
Author: Alicia <...>
Date: Wed Jun 17 21:33:36 2015 +0200
Print version info when called with -v/--version (contributed by Jade)
diff --git a/ChangeLog b/ChangeLog
index cb4d238..fd7145a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
0.34:
Fixed memory alignment in rtmp/amf code (for CPU architectures that are picky about it)
+Print version info when called with -v/--version (contributed by Jade)
tc_client-gtk: fixed windows compatibility (w32_runcmd and strndup)
tc_client-gtk and camviewer: added some compatibility macros for older libav versions.
0.33:
diff --git a/client.c b/client.c
index 91a9566..f89ab8a 100644
--- a/client.c
+++ b/client.c
@@ -226,6 +226,7 @@ void usage(const char* me)
printf("Usage: %s [options] <channelname> <nickname> [channelpassword]\n"
"Options include:\n"
"-h, --help Show this help text and exit\n"
+ "-v, --version Show the program version and exit.\n"
"-u, --user <user> Username of tinychat account to use.\n"
"-p, --pass <pass> Password of tinychat account to use.\n"
"-c, --color <value> Color to use in chat.\n"
@@ -249,6 +250,7 @@ int main(int argc, char** argv)
for(i=1; i<argc; ++i)
{
if(!strcmp(argv[i], "-h")||!strcmp(argv[i], "--help")){usage(argv[0]); return 0;}
+ if(!strcmp(argv[i], "-v")||!strcmp(argv[i], "--version")){printf("tc_client-"VERSION"\n"); return 0;}
else if(!strcmp(argv[i], "-u")||!strcmp(argv[i], "--user"))
{
if(i+1==argc){continue;}