projects
/
platform
/
core
/
api
/
vine.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Do not build unittest when ASAN is enabled
[platform/core/api/vine.git]
/
tool
/
tool_main.cpp
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <getopt.h>
4
#include <signal.h>
5
6
#include "tool_help.h"
7
#include "tool_parse.h"
8
#include "tool_run.h"
9
10
static void interrupt_handler(int signo)
11
{
12
stop_event_loop();
13
}
14
15
int main(int argc, char **argv)
16
{
17
signal(SIGINT, interrupt_handler);
18
19
if (argc == 1) {
20
tool_help_msgs();
21
return 0;
22
}
23
24
if (tool_parse_params(argc, argv) == -1) {
25
printf("error.\n");
26
return 0;
27
}
28
29
if (tool_run() == -1) {
30
printf("Failed.\n");
31
return 0;
32
}
33
34
return 0;
35
}