summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2011-07-11 01:12:55 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2011-07-11 01:12:55 (GMT)
commite0266175537ec220544c050874be215b11c902fa (patch)
tree64b1cf5be3c54c22d5c7af245189bf42a9f5f11e /src/main.c
parent1f1693722646de5ac8d2299a22121a760941f75e (diff)
Shown a small version info with all major used directories.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@209 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index fbf8b14..a3529ef 100644
--- a/src/main.c
+++ b/src/main.c
@@ -37,7 +37,7 @@
#include "glibext/delayed.h"
#include "gtkext/support.h"
#include "plugins/pglist.h"
-
+#include "../revision.h"
#include "format/mangling/demangler.h"
@@ -46,6 +46,36 @@
/******************************************************************************
* *
+* Paramètres : - *
+* *
+* Description : Affiche des indications sur la version courante du programme.*
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static show_version(void)
+{
+ printf("\n");
+
+ printf("-o- OpenIDA r%u -o-\n", REVISION);
+ printf(_("Last compiled on %s at %s\n"), __DATE__, __TIME__);
+
+ printf("\n");
+
+ printf(_("Data directory: %s\n"), PACKAGE_DATA_DIR);
+ printf(_("Plugins directory: %s\n"), PLUGINS_DIR);
+ printf(_("Locale directory: %s\n"), LOCALE_DIR);
+
+ printf("\n");
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : argc = nombre d'arguments dans la ligne de commande. *
* argv = arguments de la ligne de commande. *
* *
@@ -64,6 +94,14 @@ int main(int argc, char **argv)
const char *filename; /* Chemin du dernier projet */
openida_project *project; /* Nouveau projet courant */
+
+ if (argc > 1 && strcmp(argv[1], "--version") == 0)
+ {
+ show_version();
+ return EXIT_SUCCESS;
+ }
+
+
config = load_configuration("main", main_params, MPT_COUNT);
set_main_configuration(config);