summaryrefslogtreecommitdiffstats
path: root/common/os_calls.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/os_calls.c')
-rw-r--r--common/os_calls.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/common/os_calls.c b/common/os_calls.c
index f5f5cd60..1939ddc9 100644
--- a/common/os_calls.c
+++ b/common/os_calls.c
@@ -2935,3 +2935,18 @@ g_time3(void)
return (tp.tv_sec * 1000) + (tp.tv_usec / 1000);
#endif
}
+
+/*****************************************************************************/
+/* returns boolean */
+int APP_CC
+g_text2bool(const char *s)
+{
+ if ( (g_atoi(s) != 0) ||
+ (0 == g_strcasecmp(s, "true")) ||
+ (0 == g_strcasecmp(s, "on")) ||
+ (0 == g_strcasecmp(s, "yes")))
+ {
+ return 1;
+ }
+ return 0;
+}