Sat, 19 Mar 2005 22:07:55 +0100
Added libtu_setparam_invert.
setparam.c | file | annotate | diff | comparison | revisions | |
setparam.h | file | annotate | diff | comparison | revisions |
--- a/setparam.c Sat Mar 19 21:27:30 2005 +0100 +++ b/setparam.c Sat Mar 19 22:07:55 2005 +0100 @@ -43,4 +43,18 @@ bool libtu_do_setparam_str(const char *str, bool val) { return libtu_do_setparam(libtu_string_to_setparam(str), val); -} \ No newline at end of file +} + + +int libtu_setparam_invert(int sp) +{ + switch(sp){ + case SETPARAM_SET: + return SETPARAM_UNSET; + case SETPARAM_UNSET: + return SETPARAM_SET; + default: + return sp; + } +} +
--- a/setparam.h Sat Mar 19 21:27:30 2005 +0100 +++ b/setparam.h Sat Mar 19 22:07:55 2005 +0100 @@ -22,5 +22,6 @@ extern int libtu_string_to_setparam(const char *str); extern bool libtu_do_setparam_str(const char *str, bool val); extern bool libtu_do_setparam(int sp, bool val); +extern int libtu_setparam_invert(int sp); #endif /* LIBTU_SETPARAM_H */