# HG changeset patch # User Tuomo Valkonen # Date 1111266475 -3600 # Node ID 147a593d3cebbb86a3a76a7d72e3a39c839ced75 # Parent daf2b3d79cb8f26ad8b69b593ddfbdb49c4b6aa8 Added libtu_setparam_invert. diff -r daf2b3d79cb8 -r 147a593d3ceb setparam.c --- 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; + } +} + diff -r daf2b3d79cb8 -r 147a593d3ceb setparam.h --- 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 */