aisl/tool/main.c

41 lines
833 B
C

/******************************************************************************
*
* Copyright (c) 2017-2019 by Löwenware Ltd
* Please, refer LICENSE file for legal information
*
******************************************************************************/
/**
* @file main.c
* @author Ilja Kartašov <ik@lowenware.com>
* @brief
*
* @see https://lowenware.com/
*/
#include <stdio.h>
#include "option.h"
#include "compose.h"
int
main(int argc, char **argv)
{
int result;
if ((result = option_read_args(argc, argv)) != -1) {
switch (g_options & 0xFF) {
case OPTION_COMMAND_COMPOSE:
if (!compose_execute(argc - result, &argv[result]))
return 0;
break;
default:
result = -1;
break;
}
}
printf("For usage guideance run `%s --help`\n", argv[0]);
return result;
}