+bool wxConfigBase::Read(const wxString& key, bool* val) const
+{
+ long l;
+ if (Read(key, & l))
+ {
+ *val = (l != 0);
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+bool wxConfigBase::Read(const wxString& key, bool* val, bool defVal) const
+{
+ if (!Read(key, val))
+ {
+ *val = defVal;
+ return FALSE;
+ }
+ else
+ return TRUE;
+}
+
+// Convenience functions
+
+bool wxConfigBase::Read(const wxString& key, int *pi) const
+{
+ long l;
+ bool ret = Read(key, &l);
+ if (ret)
+ *pi = (int) l;
+ return ret;
+}
+
+bool wxConfigBase::Read(const wxString& key, int *pi, int defVal) const
+{
+ long l;
+ bool ret = Read(key, &l, (long) defVal);
+ *pi = (int) l;
+ return ret;
+}
+
+bool wxConfigBase::Write(const wxString& key, double val)
+{
+ wxString str;
+ str.Printf(_T("%f"), val);
+ return Write(key, str);
+}
+
+bool wxConfigBase::Write(const wxString& key, bool value)
+{
+ long l = (value ? 1 : 0);
+ return Write(key, l);
+}
+
+wxString wxConfigBase::ExpandEnvVars(const wxString& str) const
+{
+ wxString tmp; // Required for BC++
+ if (IsExpandingEnvVars())
+ tmp = wxExpandEnvVars(str);
+ else
+ tmp = str;
+ return tmp;