4 * Copyright (c) Tuomo Valkonen 2005.
6 * You may distribute and modify this library under the terms of either
7 * the Clarified Artistic License or the GNU LGPL, version 2.1 or later.
14 int libtu_string_to_setparam(const char *str
)
17 if(strcmp(str
, "set")==0 || strcmp(str
, "true")==0)
19 else if(strcmp(str
, "unset")==0 || strcmp(str
, "false")==0)
20 return SETPARAM_UNSET
;
21 else if(strcmp(str
, "toggle")==0)
22 return SETPARAM_TOGGLE
;
25 return SETPARAM_UNKNOWN
;
29 bool libtu_do_setparam(int sp
, bool val
)
43 bool libtu_do_setparam_str(const char *str
, bool val
)
45 return libtu_do_setparam(libtu_string_to_setparam(str
), val
);
49 int libtu_setparam_invert(int sp
)
53 return SETPARAM_UNSET
;