diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-02 05:08:36 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-02 05:08:36 +0000 |
commit | 97e76f4c979d7a0c4ed296c512c3024e3c6afa18 (patch) | |
tree | a83fe703fa3ef3a26eed5d6c5929fdcad7429072 /src/opt.c | |
parent | 081011f386915bd037a3569e46ed5e4f10c490da (diff) | |
download | librcc-97e76f4c979d7a0c4ed296c512c3024e3c6afa18.tar.gz librcc-97e76f4c979d7a0c4ed296c512c3024e3c6afa18.tar.bz2 librcc-97e76f4c979d7a0c4ed296c512c3024e3c6afa18.tar.xz librcc-97e76f4c979d7a0c4ed296c512c3024e3c6afa18.zip |
02.07.2005
Diffstat (limited to 'src/opt.c')
-rw-r--r-- | src/opt.c | 21 |
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; +} |