diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2007-05-24 00:44:29 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2007-05-24 00:44:29 +0000 |
commit | 24bf34c6ca0118041addd8a3de060bae2246a49d (patch) | |
tree | e4abc6931a84b29636cdefbba67fcbf96d705bc5 /src/fe-text/irssi.c | |
parent | 841cd8d0cf7767eae63300bbf5f98ebe65b02a71 (diff) | |
download | irssi-24bf34c6ca0118041addd8a3de060bae2246a49d.zip |
Move 'version' option in main.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4511 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/irssi.c')
-rw-r--r-- | src/fe-text/irssi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fe-text/irssi.c b/src/fe-text/irssi.c index f14cc630..540aa67b 100644 --- a/src/fe-text/irssi.c +++ b/src/fe-text/irssi.c @@ -40,6 +40,7 @@ #include "statusbar.h" #include "gui-windows.h" #include "textbuffer-reformat.h" +#include "irssi-version.h" #include <signal.h> #include <locale.h> @@ -327,8 +328,10 @@ GMemVTable gc_mem_table = { int main(int argc, char **argv) { + static int version = 0; static struct poptOption options[] = { { "dummy", 'd', POPT_ARG_NONE, &dummy, 0, "Use the dummy terminal mode", NULL }, + { "version", 'v', POPT_ARG_NONE, &version, 0, "Display irssi version", NULL }, { NULL, '\0', 0, NULL } }; @@ -337,6 +340,12 @@ int main(int argc, char **argv) args_register(options); args_execute(argc, argv); + if (version) { + printf(PACKAGE" " IRSSI_VERSION" (%d %04d)\n", + IRSSI_VERSION_DATE, IRSSI_VERSION_TIME); + return 0; + } + #ifdef USE_GC g_mem_set_vtable(&gc_mem_table); #endif |