aboutsummaryrefslogtreecommitdiff
path: root/src/messenger_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/messenger_cli.c')
-rw-r--r--src/messenger_cli.c37
1 files changed, 10 insertions, 27 deletions
diff --git a/src/messenger_cli.c b/src/messenger_cli.c
index 558170f..0c9fda2 100644
--- a/src/messenger_cli.c
+++ b/src/messenger_cli.c
@@ -22,18 +22,12 @@
22 * @file messenger_cli.c 22 * @file messenger_cli.c
23 */ 23 */
24 24
25#include <stdlib.h> 25#include "application.h"
26#include <curses.h>
27 26
28#include <gnunet/platform.h> 27/*static void
29#include <gnunet/gnunet_chat_lib.h>
30#include <gnunet/gnunet_util_lib.h>
31
32
33static void
34run (void *cls, char* const* args, 28run (void *cls, char* const* args,
35 const char *cfgfile, 29 const char *cfgfile,
36 const struct GNUNET_CONFIGURATION_Handle *cfg) 30 const struct GNUNET_CONFIGURATION_Handle *cfg)
37{ 31{
38 struct GNUNET_CHAT_Handle *handle = GNUNET_CHAT_start( 32 struct GNUNET_CHAT_Handle *handle = GNUNET_CHAT_start(
39 cfg, 33 cfg,
@@ -112,26 +106,15 @@ run (void *cls, char* const* args,
112 endwin(); 106 endwin();
113 107
114 GNUNET_CHAT_stop(handle); 108 GNUNET_CHAT_stop(handle);
115} 109}*/
116 110
117int 111int
118main (int argc, char* const* argv) 112main (int argc, char** argv)
119{ 113{
120 struct GNUNET_GETOPT_CommandLineOption options[] = { 114 MESSENGER_Application app;
121 GNUNET_GETOPT_OPTION_END 115
122 }; 116 application_init(&app, argc, argv);
123 117 application_run(&app);
124 int result = GNUNET_PROGRAM_run(
125 argc, argv,
126 "messenger_cli",
127 gettext_noop("A CLI for the Messenger service of GNUnet."),
128 options,
129 &run,
130 NULL
131 );
132 118
133 if (result != GNUNET_OK) 119 return application_status(&app);
134 return EXIT_FAILURE;
135 else
136 return EXIT_SUCCESS;
137} 120}