From 3a4255b6daf5aeffb359a2fcbb2653f7c063c124 Mon Sep 17 00:00:00 2001 From: philippe lhardy Date: Thu, 14 Jun 2018 22:50:18 +0200 Subject: [PATCH] use al_options in yet to be coded laby reader --- c/Makefile.am | 3 ++- c/allaby_main.c | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/c/Makefile.am b/c/Makefile.am index b2fd2cc..fe8ba1c 100644 --- a/c/Makefile.am +++ b/c/Makefile.am @@ -1,4 +1,5 @@ -# This Makefile.am is REALLY where changes should be done +# Makefile.am is REALLY where changes should be done +# Makefile.in and Makefile are generated from this. bin_PROGRAMS = laby diff --git a/c/allaby_main.c b/c/allaby_main.c index 23c59fa..6284847 100644 --- a/c/allaby_main.c +++ b/c/allaby_main.c @@ -1,6 +1,17 @@ +#include "al_options.h" // NOT YET IMPLEMENTED int main(int argc, char ** argv) { - return 1; + int exitcode = 1; + struct al_options * options = al_options_create(argc,argv); + al_options_set_debug(options,0); + struct alhash_datablock * debugdata = al_option_get(options,"debug"); + if ( debugdata != NULL ) + { + exitcode = 0; + } + al_options_release(options); + + return exitcode; }