aboutsummaryrefslogtreecommitdiff
path: root/c_implementation/src/ak_log_main.c
blob: abeb69187186518eb1d7547bca585bd7a63a71ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <getopt.h>
#include <libaklog.h>

static int ak_log_usage()
{
    ak_log_info(__func__, "Available commands:");
    ak_log_info(__func__, "  ak_log");
    return 1;
}

int ak_log_main(int argc, char **argv)
{
    int option;
    while ( (option = getopt(argc, argv, ":h|:help")) != -1 )
    {
        switch(option)
        {
            case 'h':
                return ak_log_usage();
            case ':':
                return 1;
            case '?':
                return 2;
        }
    }
    return 0;
}

int main(int argc, char** argv)
{
    return ak_log_main(argc, argv);
}