summaryrefslogtreecommitdiffstats
path: root/src/opt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/opt.c')
-rw-r--r--src/opt.c21
1 files changed, 21 insertions, 0 deletions
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 <stdio.h>
+
+#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;
+}