From 97e76f4c979d7a0c4ed296c512c3024e3c6afa18 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sat, 2 Jul 2005 05:08:36 +0000 Subject: 02.07.2005 --- src/opt.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/opt.c (limited to 'src/opt.c') diff --git a/src/opt.c b/src/opt.c new file mode 100644 index 0000000..ec4684f --- /dev/null +++ b/src/opt.c @@ -0,0 +1,21 @@ +#include + +#include "internal.h" +#include "opt.h" + +rcc_option_value rccConfigGetOption(rcc_context ctx, rcc_option option) { + if ((!ctx)||(option<0)||(option>=RCC_MAX_OPTIONS)) return -1; + + return ctx->options[option]; +} + +int rccConfigSetOption(rcc_context ctx, rcc_option option, rcc_option_value value) { + if ((!ctx)||(option>=RCC_MAX_OPTIONS)) return -1; + + if (ctx->options[option] != value) { + ctx->configure = 1; + ctx->options[option]=value; + } + + return 0; +} -- cgit v1.2.3