]> git.kernelconcepts.de Git - karo-tx-redboot.git/blobdiff - tools/src/libcdl/value.cxx
RedBoot Release TX53-v3 2012-02-08
[karo-tx-redboot.git] / tools / src / libcdl / value.cxx
index 610fffcb32af948e44790b2472ff8817058571e6..b7961de904aef6248e6d10fa1f3c3b456cabafd7 100644 (file)
@@ -1,4 +1,4 @@
-//{{{  Banner                           
+//{{{  Banner
 
 //============================================================================
 //
@@ -8,29 +8,29 @@
 //
 //============================================================================
 //####COPYRIGHTBEGIN####
-//                                                                          
+//
 // ----------------------------------------------------------------------------
 // Copyright (C) 2002 Bart Veer
 // Copyright (C) 1999, 2000, 2001 Red Hat, Inc.
 //
 // This file is part of the eCos host tools.
 //
-// This program is free software; you can redistribute it and/or modify it 
-// under the terms of the GNU General Public License as published by the Free 
-// Software Foundation; either version 2 of the License, or (at your option) 
+// This program is free software; you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 of the License, or (at your option)
 // any later version.
-// 
-// This program is distributed in the hope that it will be useful, but WITHOUT 
-// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
-// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
+//
+// This program is distributed in the hope that it will be useful, but WITHOUT
+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 // more details.
-// 
+//
 // You should have received a copy of the GNU General Public License along with
-// this program; if not, write to the Free Software Foundation, Inc., 
+// this program; if not, write to the Free Software Foundation, Inc.,
 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 //
 // ----------------------------------------------------------------------------
-//                                                                          
+//
 //####COPYRIGHTEND####
 //============================================================================
 //#####DESCRIPTIONBEGIN####
@@ -44,7 +44,7 @@
 //============================================================================
 
 //}}}
-//{{{  #include's                       
+//{{{  #include's
 
 // ----------------------------------------------------------------------------
 #include "cdlconfig.h"
@@ -61,7 +61,7 @@
 
 //}}}
 
-//{{{  Statics                          
+//{{{  Statics
 
 // ----------------------------------------------------------------------------
 CYGDBG_DEFINE_MEMLEAK_COUNTER(CdlValue);
@@ -69,9 +69,9 @@ CYGDBG_DEFINE_MEMLEAK_COUNTER(CdlListValue);
 CYGDBG_DEFINE_MEMLEAK_COUNTER(CdlValuableBody);
 
 //}}}
-//{{{  CdlSimpleValue class             
+//{{{  CdlSimpleValue class
 
-//{{{  Constructors                     
+//{{{  Constructors
 
 // ----------------------------------------------------------------------------
 
@@ -99,7 +99,7 @@ CdlSimpleValue::CdlSimpleValue(std::string val)
     double_value        = 0.0;
     valid_flags         = string_valid;
     format              = CdlValueFormat_Default;
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -113,7 +113,7 @@ CdlSimpleValue::CdlSimpleValue(cdl_int val)
     double_value        = 0.0;
     valid_flags         = int_valid;
     format              = CdlValueFormat_Default;
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -141,7 +141,7 @@ CdlSimpleValue::CdlSimpleValue(bool val)
     double_value        = 0.0;
     valid_flags         = string_valid | int_valid;
     format              = CdlValueFormat_Default;
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -155,12 +155,12 @@ CdlSimpleValue::CdlSimpleValue(const CdlSimpleValue& original)
     double_value        = original.double_value;
     valid_flags         = original.valid_flags;
     format              = original.format;
-    
+
     CYG_REPORT_RETURN();
 }
 
 //}}}
-//{{{  Destructor                       
+//{{{  Destructor
 
 // ----------------------------------------------------------------------------
 
@@ -179,7 +179,7 @@ CdlSimpleValue::~CdlSimpleValue()
 }
 
 //}}}
-//{{{  Assignment operators             
+//{{{  Assignment operators
 
 // ----------------------------------------------------------------------------
 
@@ -190,13 +190,13 @@ CdlSimpleValue::operator=(const CdlSimpleValue& original)
     CYG_REPORT_FUNCARG2XV(this, &original);
 
     if (this != &original) {
-        value           = original.value;
-        int_value       = original.int_value;
-        double_value    = original.double_value;
-        valid_flags     = original.valid_flags;
-        format          = original.format;
+       value           = original.value;
+       int_value       = original.int_value;
+       double_value    = original.double_value;
+       valid_flags     = original.valid_flags;
+       format          = original.format;
     }
-    
+
     CYG_REPORT_RETURN();
     return *this;
 }
@@ -228,7 +228,7 @@ CdlSimpleValue::operator=(cdl_int val)
     double_value        = 0.0;
     valid_flags         = int_valid;
     format              = CdlValueFormat_Default;
-    
+
     CYG_REPORT_RETURN();
     return *this;
 }
@@ -271,7 +271,7 @@ CdlSimpleValue::operator=(bool val)
 }
 
 //}}}
-//{{{  CdlValuable -> CdlSimpleValue    
+//{{{  CdlValuable -> CdlSimpleValue
 
 // ----------------------------------------------------------------------------
 // This routine bridges the gap between the full data held in the CdlValuable
@@ -288,70 +288,70 @@ CdlSimpleValue::eval_valuable(CdlEvalContext& context, CdlValuable valuable, Cdl
     // always zero for the purposes of expression evaluation.
     // FIXME: this check should be on a per-transaction basis.
     if (((0 != context.transaction) && !context.transaction->is_active(valuable)) ||
-        ((0 == context.transaction) && !valuable->is_active())) {
-        
-        result.value           = "0";
-        result.int_value       = 0;
-        result.double_value    = 0.0;
-        result.valid_flags     = string_valid | int_valid;
-        result.format          = CdlValueFormat_Default;
-        CYG_REPORT_RETURN();
-        return;
+       ((0 == context.transaction) && !valuable->is_active())) {
+
+       result.value           = "0";
+       result.int_value       = 0;
+       result.double_value    = 0.0;
+       result.valid_flags     = string_valid | int_valid;
+       result.format          = CdlValueFormat_Default;
+       CYG_REPORT_RETURN();
+       return;
     }
 
     // Get hold of the underlying CdlValue object
     const CdlValue& val = (0 != context.transaction) ?
-        context.transaction->get_whole_value(valuable) : valuable->get_whole_value();
-        
+       context.transaction->get_whole_value(valuable) : valuable->get_whole_value();
+
     // Otherwise the value depends on the flavor.
     switch(val.get_flavor()) {
       case CdlValueFlavor_None :
       {
-        // This could be treated as an error, but since valuables with flavor
-        // none are permanently enabled a constant "1" is a better result.
-        result.value           = "1";
-        result.int_value       = 1;
-        result.double_value    = 0.0;
-        result.valid_flags     = string_valid | int_valid;
-        result.format          = CdlValueFormat_Default;
-        break;
+       // This could be treated as an error, but since valuables with flavor
+       // none are permanently enabled a constant "1" is a better result.
+       result.value           = "1";
+       result.int_value       = 1;
+       result.double_value    = 0.0;
+       result.valid_flags     = string_valid | int_valid;
+       result.format          = CdlValueFormat_Default;
+       break;
       }
       case CdlValueFlavor_Bool :
       {
-        bool enabled           = val.is_enabled();
-        result.value           = (enabled) ? "1" : "0";
-        result.int_value       = (enabled) ?  1  :  0;
-        result.double_value    = 0.0;
-        result.valid_flags     = string_valid | int_valid;
-        result.format          = CdlValueFormat_Default;
-        break;
+       bool enabled           = val.is_enabled();
+       result.value           = (enabled) ? "1" : "0";
+       result.int_value       = (enabled) ?  1  :  0;
+       result.double_value    = 0.0;
+       result.valid_flags     = string_valid | int_valid;
+       result.format          = CdlValueFormat_Default;
+       break;
       }
       case CdlValueFlavor_BoolData :
       {
-        if (!val.is_enabled()) {
-                    
-            result.value        = "0";
-            result.int_value    = 0;
-            result.double_value = 0.0;
-            result.valid_flags  = string_valid | int_valid;
-            result.format       = CdlValueFormat_Default;
-                    
-        } else {
-
-            // Just use a copy constructor, let the compiler optimise things.
-            result = val.get_simple_value();
-        }
-        break;
+       if (!val.is_enabled()) {
+
+           result.value        = "0";
+           result.int_value    = 0;
+           result.double_value = 0.0;
+           result.valid_flags  = string_valid | int_valid;
+           result.format       = CdlValueFormat_Default;
+
+       } else {
+
+           // Just use a copy constructor, let the compiler optimise things.
+           result = val.get_simple_value();
+       }
+       break;
       }
       case CdlValueFlavor_Data :
       {
-        // Just like BoolData, but with no need to check the enabled flag.
-        result = val.get_simple_value();
-        break;
+       // Just like BoolData, but with no need to check the enabled flag.
+       result = val.get_simple_value();
+       break;
       }
       default:
       {
-        CYG_FAIL("Valuable object with an unknown flavor encountered.");
+       CYG_FAIL("Valuable object with an unknown flavor encountered.");
       }
     }
 
@@ -359,7 +359,7 @@ CdlSimpleValue::eval_valuable(CdlEvalContext& context, CdlValuable valuable, Cdl
 }
 
 //}}}
-//{{{  Getting the value                
+//{{{  Getting the value
 
 // ----------------------------------------------------------------------------
 // Some of these calls involve conversion operators.
@@ -371,14 +371,14 @@ CdlSimpleValue::get_value() const
     CYG_REPORT_FUNCARG1XV(this);
 
     if (!(valid_flags & string_valid)) {
-        if (valid_flags & int_valid) {
-            Cdl::integer_to_string(int_value, value, format);
-        } else if (valid_flags & double_valid) {
-            Cdl::double_to_string(double_value, value, format);
-        } else {
-            CYG_FAIL("Attempt to use uninitialized SimpleValue");
-        }
-        valid_flags |= string_valid;
+       if (valid_flags & int_valid) {
+           Cdl::integer_to_string(int_value, value, format);
+       } else if (valid_flags & double_valid) {
+           Cdl::double_to_string(double_value, value, format);
+       } else {
+           CYG_FAIL("Attempt to use uninitialized SimpleValue");
+       }
+       valid_flags |= string_valid;
     }
 
     CYG_REPORT_RETURN();
@@ -392,23 +392,23 @@ CdlSimpleValue::has_integer_value() const
     CYG_REPORT_FUNCARG1XV(this);
 
     if (!(valid_flags & (int_valid | int_invalid))) {
-        if (valid_flags & double_valid) {
-            if (Cdl::double_to_integer(double_value, int_value)) {
-                valid_flags |= int_valid;
-            } else {
-                valid_flags |= int_invalid;
-            }
-        } else if (valid_flags & string_valid) {
-            if (Cdl::string_to_integer(value, int_value)) {
-                valid_flags |= int_valid;
-            } else {
-                valid_flags |= int_invalid;
-            }
-        } else {
-            CYG_FAIL("Attempt to use uninitialized SimpleValue");
-        }
+       if (valid_flags & double_valid) {
+           if (Cdl::double_to_integer(double_value, int_value)) {
+               valid_flags |= int_valid;
+           } else {
+               valid_flags |= int_invalid;
+           }
+       } else if (valid_flags & string_valid) {
+           if (Cdl::string_to_integer(value, int_value)) {
+               valid_flags |= int_valid;
+           } else {
+               valid_flags |= int_invalid;
+           }
+       } else {
+           CYG_FAIL("Attempt to use uninitialized SimpleValue");
+       }
     }
-    
+
     bool result = (valid_flags & int_valid);
     CYG_REPORT_RETVAL(result);
     return result;
@@ -422,7 +422,7 @@ CdlSimpleValue::get_integer_value() const
 
     cdl_int result = 0;
     if ((valid_flags & int_valid) || has_integer_value()) {
-        result = int_value;
+       result = int_value;
     }
 
     CYG_REPORT_RETVAL((int) result);
@@ -436,18 +436,18 @@ CdlSimpleValue::has_double_value() const
     CYG_REPORT_FUNCARG1XV(this);
 
     if (!(valid_flags & (double_valid | double_invalid))) {
-        if (valid_flags & int_valid) {
-            Cdl::integer_to_double(int_value, double_value);
-            valid_flags |= double_valid;
-        } else if (valid_flags & string_valid) {
-            if (Cdl::string_to_double(value, double_value)) {
-                valid_flags |= double_valid;
-            } else {
-                valid_flags |= double_invalid;
-            }
-        } else {
-            CYG_FAIL("Attempt to use uninitialized SimpleValue");
-        }
+       if (valid_flags & int_valid) {
+           Cdl::integer_to_double(int_value, double_value);
+           valid_flags |= double_valid;
+       } else if (valid_flags & string_valid) {
+           if (Cdl::string_to_double(value, double_value)) {
+               valid_flags |= double_valid;
+           } else {
+               valid_flags |= double_invalid;
+           }
+       } else {
+           CYG_FAIL("Attempt to use uninitialized SimpleValue");
+       }
     }
     bool result = (valid_flags & double_valid);
     CYG_REPORT_RETVAL(result);
@@ -462,7 +462,7 @@ CdlSimpleValue::get_double_value() const
 
     double result = 0.0;
     if ((valid_flags & double_valid) || has_double_value()) {
-        result = double_value;
+       result = double_value;
     }
 
     CYG_REPORT_RETURN();
@@ -477,26 +477,26 @@ CdlSimpleValue::get_bool_value() const
 
     bool result = false;
     if (valid_flags & int_valid) {
-        if (0 != int_value) {
-            result = true;
-        }
+       if (0 != int_value) {
+           result = true;
+       }
     } else if (valid_flags & double_valid) {
-        // Leave it to the compiler to decide what is valid
-        result = double_value;
+       // Leave it to the compiler to decide what is valid
+       result = double_value;
     } else if (valid_flags & string_valid) {
-        // string_to_bool copes with "1", "true", and a few other cases.
-        // If the current value does not match any of these then
-        // true corresponds to a non-empty string.
-        if (!Cdl::string_to_bool(value, result)) {
-            if ("" == value) {
-                result = false;
-            } else {
-                result = true;
-            }
-        }
+       // string_to_bool copes with "1", "true", and a few other cases.
+       // If the current value does not match any of these then
+       // true corresponds to a non-empty string.
+       if (!Cdl::string_to_bool(value, result)) {
+           if ("" == value) {
+               result = false;
+           } else {
+               result = true;
+           }
+       }
     } else {
-        // No value defined, default to false.
-        result = false;
+       // No value defined, default to false.
+       result = false;
     }
 
     CYG_REPORT_RETVAL(result);
@@ -504,7 +504,7 @@ CdlSimpleValue::get_bool_value() const
 }
 
 //}}}
-//{{{  Updating the value               
+//{{{  Updating the value
 
 // ----------------------------------------------------------------------------
 // Normally the assignment operators will be used for this instead.
@@ -555,7 +555,7 @@ CdlSimpleValue::set_double_value(double val, CdlValueFormat new_format)
 }
 
 //}}}
-//{{{  Value format support             
+//{{{  Value format support
 
 // ----------------------------------------------------------------------------
 
@@ -577,7 +577,7 @@ CdlSimpleValue::set_value_format(CdlValueFormat new_format)
     CYG_REPORT_FUNCARG2XV(this, new_format);
 
     format      = new_format;
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -612,7 +612,7 @@ CdlSimpleValue::set_value_format(CdlSimpleValue& val1, CdlSimpleValue& val2)
 }
 
 //}}}
-//{{{  Comparison operators             
+//{{{  Comparison operators
 
 // ----------------------------------------------------------------------------
 
@@ -623,25 +623,25 @@ CdlSimpleValue::operator==(const CdlSimpleValue& other) const
     CYG_REPORT_FUNCARG2XV(this, &other);
 
     bool result = false;
-    
+
     if (has_integer_value()) {
-        if (other.has_integer_value()) {
-            cdl_int val1 = get_integer_value();
-            cdl_int val2 = other.get_integer_value();
-            result = (val1 == val2);
-        }
+       if (other.has_integer_value()) {
+           cdl_int val1 = get_integer_value();
+           cdl_int val2 = other.get_integer_value();
+           result = (val1 == val2);
+       }
     } else if (has_double_value()) {
-        if (other.has_double_value()) {
-            double val1 = get_double_value();
-            double val2 = other.get_double_value();
-            result = (val1 == val2);
-        }
+       if (other.has_double_value()) {
+           double val1 = get_double_value();
+           double val2 = other.get_double_value();
+           result = (val1 == val2);
+       }
     } else {
-        std::string val1 = get_value();
-        std::string val2 = other.get_value();
-        result = (val1 == val2);
+       std::string val1 = get_value();
+       std::string val2 = other.get_value();
+       result = (val1 == val2);
     }
-    
+
     CYG_REPORT_RETVAL(result);
     return result;
 }
@@ -654,21 +654,21 @@ CdlSimpleValue::operator!=(const CdlSimpleValue& other) const
 
     bool result = true;
     if (has_integer_value()) {
-        if (other.has_integer_value()) {
-            cdl_int val1 = get_integer_value();
-            cdl_int val2 = other.get_integer_value();
-            result = (val1 != val2);
-        }
+       if (other.has_integer_value()) {
+           cdl_int val1 = get_integer_value();
+           cdl_int val2 = other.get_integer_value();
+           result = (val1 != val2);
+       }
     } else if (has_double_value()) {
-        if (other.has_double_value()) {
-            double val1 = get_double_value();
-            double val2 = other.get_double_value();
-            result = (val1 != val2);
-        }
+       if (other.has_double_value()) {
+           double val1 = get_double_value();
+           double val2 = other.get_double_value();
+           result = (val1 != val2);
+       }
     } else {
-        std::string val1 = get_value();
-        std::string val2 = other.get_value();
-        result = (val1 != val2);
+       std::string val1 = get_value();
+       std::string val2 = other.get_value();
+       result = (val1 != val2);
     }
 
 
@@ -679,7 +679,7 @@ CdlSimpleValue::operator!=(const CdlSimpleValue& other) const
 //}}}
 
 //}}}
-//{{{  CdlValue class                   
+//{{{  CdlValue class
 
 // ----------------------------------------------------------------------------
 // This should really be a class static constant, but VC++ does not implement
@@ -688,7 +688,7 @@ CdlSimpleValue::operator!=(const CdlSimpleValue& other) const
 
 static const int CdlValue_number_of_sources = 4;
 
-//{{{  Constructors                             
+//{{{  Constructors
 
 // ----------------------------------------------------------------------------
 // The default flavor depends on the type of entity being created. For
@@ -711,13 +711,13 @@ CdlValue::CdlValue(CdlValueFlavor flavor_arg)
     enabled[CdlValueSource_User]                = false;
 
     // The SimpleValues will initialize themselves.
-    
+
     cdlvalue_cookie         = CdlValue_Magic;
     CYGDBG_MEMLEAK_CONSTRUCTOR();
 
     // This cannot happen until after the object is valid.
     set_flavor(flavor_arg);
-        
+
     CYG_POSTCONDITION_THISC();
     CYG_REPORT_RETURN();
 }
@@ -736,14 +736,14 @@ CdlValue::CdlValue(const CdlValue& original)
     flavor              = original.flavor;
     current_source      = original.current_source;
     for (int i = 0; i < CdlValue_number_of_sources; i++) {
-        source_valid[i] = original.source_valid[i];
-        enabled[i]      = original.enabled[i];
-        values[i]       = original.values[i];
+       source_valid[i] = original.source_valid[i];
+       enabled[i]      = original.enabled[i];
+       values[i]       = original.values[i];
     }
 
     cdlvalue_cookie = CdlValue_Magic;
     CYGDBG_MEMLEAK_CONSTRUCTOR();
-    
+
     CYG_POSTCONDITION_THISC();
     CYG_REPORT_RETURN();
 }
@@ -759,13 +759,13 @@ CdlValue& CdlValue::operator=(const CdlValue& original)
     CYG_INVARIANT_CLASSOC(CdlValue, original);
 
     if (this != &original) {
-        flavor          = original.flavor;
-        current_source  = original.current_source;
-        for (int i = 0; i < CdlValue_number_of_sources; i++) {
-            source_valid[i]     = original.source_valid[i];
-            enabled[i]          = original.enabled[i];
-            values[i]           = original.values[i];
-        }
+       flavor          = original.flavor;
+       current_source  = original.current_source;
+       for (int i = 0; i < CdlValue_number_of_sources; i++) {
+           source_valid[i]     = original.source_valid[i];
+           enabled[i]          = original.enabled[i];
+           values[i]           = original.values[i];
+       }
     }
 
     cdlvalue_cookie = CdlValue_Magic;
@@ -775,7 +775,7 @@ CdlValue& CdlValue::operator=(const CdlValue& original)
 }
 
 //}}}
-//{{{  Destructor                               
+//{{{  Destructor
 
 // ----------------------------------------------------------------------------
 
@@ -789,9 +789,9 @@ CdlValue::~CdlValue()
     flavor              = CdlValueFlavor_Invalid;
     current_source      = CdlValueSource_Invalid;
     for (int i = 0; i < CdlValue_number_of_sources; i++) {
-        source_valid[i]         = false;
-        enabled[i]              = false;
-        // The CdlSimpleValue array will take care of itself.
+       source_valid[i]         = false;
+       enabled[i]              = false;
+       // The CdlSimpleValue array will take care of itself.
     }
     CYGDBG_MEMLEAK_DESTRUCTOR();
 
@@ -799,41 +799,41 @@ CdlValue::~CdlValue()
 }
 
 //}}}
-//{{{  check_this()                             
+//{{{  check_this()
 
 // ----------------------------------------------------------------------------
 bool
 CdlValue::check_this(cyg_assert_class_zeal zeal) const
 {
     if (CdlValue_Magic != cdlvalue_cookie) {
-        return false;
+       return false;
     }
     CYGDBG_MEMLEAK_CHECKTHIS();
 
     if (!source_valid[CdlValueSource_Default]) {
-        return false;
+       return false;
     }
 
     if ((CdlValueFlavor_None == flavor) || (CdlValueFlavor_Data == flavor)) {
-        for (int i = 0; i < CdlValue_number_of_sources; i++) {
-            if (!enabled[i]) {
-                return false;
-            }
-        }
+       for (int i = 0; i < CdlValue_number_of_sources; i++) {
+           if (!enabled[i]) {
+               return false;
+           }
+       }
     }
     for (int i = 0; i < CdlValue_number_of_sources; i++) {
-        if (source_valid[i]) {
-            if (!values[i].check_this(zeal)) {
-                return false;
-            }
-        }
+       if (source_valid[i]) {
+           if (!values[i].check_this(zeal)) {
+               return false;
+           }
+       }
     }
-    
+
     return true;
 }
 
 //}}}
-//{{{  Flavor manipulation                      
+//{{{  Flavor manipulation
 
 // ----------------------------------------------------------------------------
 // Get hold of the current flavor.
@@ -863,94 +863,94 @@ CdlValue::set_flavor(CdlValueFlavor flavor_arg)
 {
     CYG_REPORT_FUNCNAME("CdlValue:: set_flavor");
     CYG_REPORT_FUNCARG2XV(this, flavor_arg);
-    
+
     // No precondition here, set_flavor() is called from inside the constructor
     CYG_PRECONDITIONC((CdlValueFlavor_None     == flavor_arg) || \
-                      (CdlValueFlavor_Bool     == flavor_arg) || \
-                      (CdlValueFlavor_BoolData == flavor_arg) || \
-                      (CdlValueFlavor_Data     == flavor_arg));
+                     (CdlValueFlavor_Bool     == flavor_arg) || \
+                     (CdlValueFlavor_BoolData == flavor_arg) || \
+                     (CdlValueFlavor_Data     == flavor_arg));
 
     flavor = flavor_arg;
     switch(flavor) {
       case CdlValueFlavor_None :
-        {
-            // All value sources are enabled, but "default" remains
-            // the only valid one. All data parts are set to "1",
-            // although that should not really matter.
-            enabled[CdlValueSource_Default]     = true;
-            enabled[CdlValueSource_Inferred]    = true;
-            enabled[CdlValueSource_Wizard]      = true;
-            enabled[CdlValueSource_User]        = true;
-            
-            CdlSimpleValue simple_val((cdl_int) 1);
-            values[CdlValueSource_Default]      = simple_val;
-            values[CdlValueSource_Inferred]     = simple_val;
-            values[CdlValueSource_Wizard]       = simple_val;
-            values[CdlValueSource_User]         = simple_val;
-            break;
-        }
-          
+       {
+           // All value sources are enabled, but "default" remains
+           // the only valid one. All data parts are set to "1",
+           // although that should not really matter.
+           enabled[CdlValueSource_Default]     = true;
+           enabled[CdlValueSource_Inferred]    = true;
+           enabled[CdlValueSource_Wizard]      = true;
+           enabled[CdlValueSource_User]        = true;
+
+           CdlSimpleValue simple_val((cdl_int) 1);
+           values[CdlValueSource_Default]      = simple_val;
+           values[CdlValueSource_Inferred]     = simple_val;
+           values[CdlValueSource_Wizard]       = simple_val;
+           values[CdlValueSource_User]         = simple_val;
+           break;
+       }
+
       case CdlValueFlavor_Bool :
-        {
-            // All value sources start out as disabled, but with a
-            // constant data part of 1. Users can only control the
-            // boolean part. This is consistent with header file
-            // generation: no #define is generated for disabled
-            // options, but if the option is enabled then the data
-            // part will be used for the value.
-            enabled[CdlValueSource_Default]     = false;
-            enabled[CdlValueSource_Inferred]    = false;
-            enabled[CdlValueSource_Wizard]      = false;
-            enabled[CdlValueSource_User]        = false;
-
-            // BLV - keep the data part at 0 for now. There is too
-            // much confusion in the code between value as a string
-            // representation, and value as the data part of the
-            // bool/data pair. This needs to be fixed, but it requires
-            // significant API changes.
-#if 0            
-            CdlSimpleValue simple_val(cdl_int(1));
+       {
+           // All value sources start out as disabled, but with a
+           // constant data part of 1. Users can only control the
+           // boolean part. This is consistent with header file
+           // generation: no #define is generated for disabled
+           // options, but if the option is enabled then the data
+           // part will be used for the value.
+           enabled[CdlValueSource_Default]     = false;
+           enabled[CdlValueSource_Inferred]    = false;
+           enabled[CdlValueSource_Wizard]      = false;
+           enabled[CdlValueSource_User]        = false;
+
+           // BLV - keep the data part at 0 for now. There is too
+           // much confusion in the code between value as a string
+           // representation, and value as the data part of the
+           // bool/data pair. This needs to be fixed, but it requires
+           // significant API changes.
+#if 0
+           CdlSimpleValue simple_val(cdl_int(1));
 #else
-            CdlSimpleValue simple_val(cdl_int(0));
-#endif            
-            values[CdlValueSource_Default]      = simple_val;
-            values[CdlValueSource_Inferred]     = simple_val;
-            values[CdlValueSource_Wizard]       = simple_val;
-            values[CdlValueSource_User]         = simple_val;
-            break;
-        }
-          
+           CdlSimpleValue simple_val(cdl_int(0));
+#endif
+           values[CdlValueSource_Default]      = simple_val;
+           values[CdlValueSource_Inferred]     = simple_val;
+           values[CdlValueSource_Wizard]       = simple_val;
+           values[CdlValueSource_User]         = simple_val;
+           break;
+       }
+
       case CdlValueFlavor_BoolData :
-        {
-            // All value sources start out as disabled, just like
-            // booleans. Nothing is known about the data part.
-            enabled[CdlValueSource_Default]       = false;
-            enabled[CdlValueSource_Inferred]      = false;
-            enabled[CdlValueSource_Wizard]        = false;
-            enabled[CdlValueSource_User]          = false;
-            break;
-        }
-          
+       {
+           // All value sources start out as disabled, just like
+           // booleans. Nothing is known about the data part.
+           enabled[CdlValueSource_Default]       = false;
+           enabled[CdlValueSource_Inferred]      = false;
+           enabled[CdlValueSource_Wizard]        = false;
+           enabled[CdlValueSource_User]          = false;
+           break;
+       }
+
       case CdlValueFlavor_Data :
-        {
-            // All value sources start out as enabled, and cannot be
-            // changed. Nothing is known about the data part.
-            enabled[CdlValueSource_Default]       = true;
-            enabled[CdlValueSource_Inferred]      = true;
-            enabled[CdlValueSource_Wizard]        = true;
-            enabled[CdlValueSource_User]          = true;
-            break;
-        }
+       {
+           // All value sources start out as enabled, and cannot be
+           // changed. Nothing is known about the data part.
+           enabled[CdlValueSource_Default]       = true;
+           enabled[CdlValueSource_Inferred]      = true;
+           enabled[CdlValueSource_Wizard]        = true;
+           enabled[CdlValueSource_User]          = true;
+           break;
+       }
 
       default :
-        break;
+       break;
     }
-    
+
     CYG_REPORT_RETURN();
 }
 
 //}}}
-//{{{  Source manipulation                      
+//{{{  Source manipulation
 
 // ----------------------------------------------------------------------------
 
@@ -1007,25 +1007,25 @@ CdlValue::invalidate_source(CdlValueSource source)
     CYG_PRECONDITIONC((0 <= source) && (source < CdlValue_number_of_sources));
 
     if (CdlValueSource_Default != source) {
-        source_valid[source]        = false;
-        if (current_source == source) {
-            if (source_valid[CdlValueSource_User]) {
-                current_source = CdlValueSource_User;
-            } else if (source_valid[CdlValueSource_Wizard]) {
-                current_source = CdlValueSource_Wizard;
-            } else if (source_valid[CdlValueSource_Inferred]) {
-                current_source = CdlValueSource_Inferred;
-            } else {
-                current_source = CdlValueSource_Default;
-            }
-        }
+       source_valid[source]        = false;
+       if (current_source == source) {
+           if (source_valid[CdlValueSource_User]) {
+               current_source = CdlValueSource_User;
+           } else if (source_valid[CdlValueSource_Wizard]) {
+               current_source = CdlValueSource_Wizard;
+           } else if (source_valid[CdlValueSource_Inferred]) {
+               current_source = CdlValueSource_Inferred;
+           } else {
+               current_source = CdlValueSource_Default;
+           }
+       }
     }
-    
+
     CYG_POSTCONDITIONC(source_valid[current_source]);
 }
 
 //}}}
-//{{{  Retrieving the data                      
+//{{{  Retrieving the data
 
 // ----------------------------------------------------------------------------
 // Check the enabled flag for the appropriate source. The specified source
@@ -1044,7 +1044,7 @@ CdlValue::is_enabled(CdlValueSource source) const
     CYG_PRECONDITION_THISC();
 
     if (CdlValueSource_Current == source) {
-        source = current_source;
+       source = current_source;
     }
     CYG_PRECONDITIONC((0 <= source) && (source < CdlValue_number_of_sources));
     CYG_PRECONDITIONC(source_valid[source]);
@@ -1065,7 +1065,7 @@ CdlValue::get_value(CdlValueSource source) const
     CYG_PRECONDITION_THISC();
 
     if (CdlValueSource_Current == source) {
-        source = current_source;
+       source = current_source;
     }
     CYG_PRECONDITIONC((0 <= source) && (source < CdlValue_number_of_sources));
     CYG_PRECONDITIONC(source_valid[source]);
@@ -1083,7 +1083,7 @@ CdlValue::has_integer_value(CdlValueSource source) const
     CYG_INVARIANT_THISC(CdlValue);
 
     if (CdlValueSource_Current == source) {
-        source = current_source;
+       source = current_source;
     }
     CYG_PRECONDITIONC((0 <= source) && (source < CdlValue_number_of_sources));
     CYG_PRECONDITIONC(source_valid[source]);
@@ -1099,9 +1099,9 @@ CdlValue::has_double_value(CdlValueSource source) const
     CYG_REPORT_FUNCNAMETYPE("CdlValue::has_value", "result %d");
     CYG_REPORT_FUNCARG2XV(this, source);
     CYG_INVARIANT_THISC(CdlValue);
-    
+
     if (CdlValueSource_Current == source) {
-        source = current_source;
+       source = current_source;
     }
     CYG_PRECONDITIONC((0 <= source) && (source < CdlValue_number_of_sources));
     CYG_PRECONDITIONC(source_valid[source]);
@@ -1119,7 +1119,7 @@ CdlValue::get_integer_value(CdlValueSource source) const
     CYG_PRECONDITION_THISC();
 
     if (CdlValueSource_Current == source) {
-        source = current_source;
+       source = current_source;
     }
     CYG_PRECONDITIONC((0 <= source) && (source < CdlValue_number_of_sources));
     CYG_PRECONDITIONC(source_valid[source]);
@@ -1137,7 +1137,7 @@ CdlValue::get_double_value(CdlValueSource source) const
     CYG_PRECONDITION_THISC();
 
     if (CdlValueSource_Current == source) {
-        source = current_source;
+       source = current_source;
     }
     CYG_PRECONDITIONC((0 <= source) && (source < CdlValue_number_of_sources));
     CYG_PRECONDITIONC(source_valid[source]);
@@ -1155,7 +1155,7 @@ CdlValue::get_simple_value(CdlValueSource source) const
     CYG_PRECONDITION_THISC();
 
     if (CdlValueSource_Current == source) {
-        source = current_source;
+       source = current_source;
     }
     CYG_PRECONDITIONC((0 <= source) && (source < CdlValue_number_of_sources));
     CYG_PRECONDITIONC(source_valid[source]);
@@ -1165,7 +1165,7 @@ CdlValue::get_simple_value(CdlValueSource source) const
 }
 
 //}}}
-//{{{  Value modification                       
+//{{{  Value modification
 
 // ----------------------------------------------------------------------------
 
@@ -1181,9 +1181,9 @@ CdlValue::set_enabled(bool val, CdlValueSource source)
     enabled[source] = val;
     source_valid[source] = true;
     if (source > current_source) {
-        current_source = source;
+       current_source = source;
     }
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -1195,13 +1195,13 @@ CdlValue::set_value(CdlSimpleValue& val, CdlValueSource source)
     CYG_INVARIANT_THISC(CdlValue);
     CYG_PRECONDITIONC((CdlValueFlavor_BoolData == flavor) || (CdlValueFlavor_Data == flavor));
     CYG_PRECONDITIONC((0 <= source) && (source < CdlValue_number_of_sources));
-    
+
     values[source] = val;
     source_valid[source] = true;
     if (source > current_source) {
-        current_source = source;
+       current_source = source;
     }
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -1218,9 +1218,9 @@ CdlValue::set_enabled_and_value(bool enabled_arg, CdlSimpleValue& val, CdlValueS
     values[source]       = val;
     source_valid[source] = true;
     if (source > current_source) {
-        current_source = source;
+       current_source = source;
     }
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -1239,30 +1239,30 @@ CdlValue::set(CdlSimpleValue& val, CdlValueSource source)
 
     switch(flavor) {
       case CdlValueFlavor_Bool:
-        enabled[source] = val.get_bool_value();
-        break;
+       enabled[source] = val.get_bool_value();
+       break;
 
       case CdlValueFlavor_BoolData:
-        if (!val.get_bool_value()) {
-            enabled[source] = false;
-            values[source]  = (cdl_int) 0;
-        } else {
-            enabled[source] = true;
-            values[source]  = val;
-        }
-        break;
-                    
+       if (!val.get_bool_value()) {
+           enabled[source] = false;
+           values[source]  = (cdl_int) 0;
+       } else {
+           enabled[source] = true;
+           values[source]  = val;
+       }
+       break;
+
       case CdlValueFlavor_Data:
-        values[source] = val;
-        break;
-                    
+       values[source] = val;
+       break;
+
       default:
-        CYG_FAIL("Unknown value flavor detected.");
+       CYG_FAIL("Unknown value flavor detected.");
     }
-    
+
     source_valid[source] = true;
     if (source > current_source) {
-        current_source = source;
+       current_source = source;
     }
 
     CYG_REPORT_RETURN();
@@ -1271,7 +1271,7 @@ CdlValue::set(CdlSimpleValue& val, CdlValueSource source)
 //}}}
 
 //}}}
-//{{{  CdlListValue class               
+//{{{  CdlListValue class
 
 // ----------------------------------------------------------------------------
 // List values. Most of this is straightforward.
@@ -1285,7 +1285,7 @@ CdlListValue::CdlListValue()
     // filled in already.
     cdllistvalue_cookie = CdlListValue_Magic;
     CYGDBG_MEMLEAK_CONSTRUCTOR();
-    
+
     CYG_POSTCONDITION_THISC();
     CYG_REPORT_RETURN();
 }
@@ -1295,14 +1295,14 @@ CdlListValue::CdlListValue(const CdlListValue& original)
     CYG_REPORT_FUNCNAME("CdlListValue:: copy constructor");
     CYG_REPORT_FUNCARG2XV(this, &original);
     CYG_INVARIANT_CLASSOC(CdlListValue, original);
-    
+
     // This may get expensive, but should not happen very often.
     table               = original.table;
     integer_ranges      = original.integer_ranges;
     double_ranges       = original.double_ranges;
     cdllistvalue_cookie = CdlListValue_Magic;
     CYGDBG_MEMLEAK_CONSTRUCTOR();
-    
+
     CYG_POSTCONDITION_THISC();
     CYG_REPORT_RETURN();
 }
@@ -1314,14 +1314,14 @@ CdlListValue & CdlListValue::operator=(const CdlListValue& original)
     CYG_INVARIANT_CLASSOC(CdlListValue, original);
 
     if (this != &original) {
-        table.clear();
-        integer_ranges.clear();
-        double_ranges.clear();
-        table          = original.table;
-        integer_ranges = original.integer_ranges;
-        double_ranges  = original.double_ranges;
+       table.clear();
+       integer_ranges.clear();
+       double_ranges.clear();
+       table          = original.table;
+       integer_ranges = original.integer_ranges;
+       double_ranges  = original.double_ranges;
     }
-    
+
     CYG_POSTCONDITION_THISC();
     CYG_REPORT_RETURN();
     return *this;
@@ -1338,7 +1338,7 @@ CdlListValue::~CdlListValue()
     integer_ranges.clear();
     double_ranges.clear();
     CYGDBG_MEMLEAK_DESTRUCTOR();
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -1418,15 +1418,15 @@ CdlListValue::is_member(CdlSimpleValue& val) const
 
     bool result = false;
     if (val.has_integer_value()) {
-        result = is_member(val.get_integer_value(), false);
+       result = is_member(val.get_integer_value(), false);
     }
     if (!result && val.has_double_value()) {
-        result = is_member(val.get_double_value(), false);
+       result = is_member(val.get_double_value(), false);
     }
     if (!result) {
-        result = is_member(val.get_value());
+       result = is_member(val.get_value());
     }
-    
+
     CYG_REPORT_RETVAL(result);
     return result;
 }
@@ -1440,23 +1440,23 @@ CdlListValue::is_member(std::string val, bool allow_conversions) const
 
     bool        result = false;
     if (allow_conversions) {
-        cdl_int     integer_value;
-        double      double_value;
-
-        if (Cdl::string_to_integer(val, integer_value)) {
-            result = is_member(integer_value, false);
-        }
-        if (!result && Cdl::string_to_double(val, double_value)) {
-            result = is_member(double_value, false);
-        }
+       cdl_int     integer_value;
+       double      double_value;
+
+       if (Cdl::string_to_integer(val, integer_value)) {
+           result = is_member(integer_value, false);
+       }
+       if (!result && Cdl::string_to_double(val, double_value)) {
+           result = is_member(double_value, false);
+       }
     }
     if (!result) {
-        for (std::vector<CdlSimpleValue>::const_iterator val_i = table.begin(); val_i != table.end(); val_i++) {
-            if (val_i->get_value() == val) {
-                result = true;
-                break;
-            }
-        }
+       for (std::vector<CdlSimpleValue>::const_iterator val_i = table.begin(); val_i != table.end(); val_i++) {
+           if (val_i->get_value() == val) {
+               result = true;
+               break;
+           }
+       }
     }
 
     CYG_REPORT_RETVAL(result);
@@ -1472,23 +1472,23 @@ CdlListValue::is_member(cdl_int val, bool allow_conversions) const
 
     bool result = false;
     for (std::vector<CdlSimpleValue>::const_iterator val_i = table.begin(); val_i != table.end(); val_i++) {
-        if (val_i->has_integer_value() && (val_i->get_integer_value() == val)) {
-            result = true;
-            break;
-        }
+       if (val_i->has_integer_value() && (val_i->get_integer_value() == val)) {
+           result = true;
+           break;
+       }
     }
     if (!result) {
-        for (std::vector<std::pair<cdl_int,cdl_int> >::const_iterator i = integer_ranges.begin();
-             i != integer_ranges.end(); i++) {
-            if ((val >= i->first) && (val <= i->second)) {
-                result = true;
-                break;
-            }
-        }
+       for (std::vector<std::pair<cdl_int,cdl_int> >::const_iterator i = integer_ranges.begin();
+            i != integer_ranges.end(); i++) {
+           if ((val >= i->first) && (val <= i->second)) {
+               result = true;
+               break;
+           }
+       }
     }
     if (!result && allow_conversions) {
-        double double_value = Cdl::integer_to_double(val);
-        result = is_member(double_value, false);
+       double double_value = Cdl::integer_to_double(val);
+       result = is_member(double_value, false);
     }
 
     CYG_REPORT_RETVAL(result);
@@ -1504,25 +1504,25 @@ CdlListValue::is_member(double val, bool allow_conversions) const
 
     bool result = false;
     for (std::vector<CdlSimpleValue>::const_iterator val_i = table.begin(); val_i != table.end(); val_i++) {
-        if (val_i->has_double_value() && (val_i->get_double_value() == val)) {
-            result = true;
-            break;
-        }
+       if (val_i->has_double_value() && (val_i->get_double_value() == val)) {
+           result = true;
+           break;
+       }
     }
     if (!result) {
-        for (std::vector<std::pair<double,double> >::const_iterator i = double_ranges.begin();
-             i != double_ranges.end(); i++) {
-            if ((val >= i->first) && (val <= i->second)) {
-                result = true;
-                break;
-            }
-        }
+       for (std::vector<std::pair<double,double> >::const_iterator i = double_ranges.begin();
+            i != double_ranges.end(); i++) {
+           if ((val >= i->first) && (val <= i->second)) {
+               result = true;
+               break;
+           }
+       }
     }
     if (!result && allow_conversions) {
-        cdl_int integer_value;
-        if (Cdl::double_to_integer(val, integer_value)) {
-            result = is_member(integer_value, false);
-        }
+       cdl_int integer_value;
+       if (Cdl::double_to_integer(val, integer_value)) {
+           result = is_member(integer_value, false);
+       }
     }
 
     CYG_REPORT_RETVAL(result);
@@ -1535,7 +1535,7 @@ bool
 CdlListValue::check_this(cyg_assert_class_zeal zeal) const
 {
     if (CdlListValue_Magic != cdllistvalue_cookie) {
-        return false;
+       return false;
     }
     CYGDBG_MEMLEAK_CHECKTHIS();
 
@@ -1547,37 +1547,37 @@ CdlListValue::check_this(cyg_assert_class_zeal zeal) const
 
 //}}}
 
-//{{{  dialog property                  
+//{{{  dialog property
 
 // ----------------------------------------------------------------------------
 // Syntax: dialog <reference>
 
 void
 CdlValuableBody::dialog_update_handler(CdlTransaction transaction, CdlNode source, CdlProperty prop, CdlNode dest,
-                                       CdlUpdate change)
+                                      CdlUpdate change)
 {
     CYG_REPORT_FUNCNAME("CdlValuable::dialog_update_handler");
     CYG_PRECONDITION_CLASSC(transaction);
     CYG_PRECONDITION_CLASSC(source);
     CYG_PRECONDITION_CLASSC(prop);
-    
+
     // The main update of interest is Loaded (iff dest != 0), and
     // Created. These updates indicate that the destination now exists,
     // so it is possible to check that the destination is a dialog.
     if (((CdlUpdate_Loaded == change) && (0 != dest)) ||
-        (CdlUpdate_Created == change)) {
-
-        CYG_ASSERT_CLASSC(dest);
-        CdlDialog dialog = dynamic_cast<CdlDialog>(dest);
-        if (0 == dialog) {
-            std::string msg = dest->get_class_name() + " " + dest->get_name() +
-                " cannot be used in a dialog property, it is not a custom dialog.";
-            CdlConflict_DataBody::make(transaction, source, prop, msg);
-        }
-        
+       (CdlUpdate_Created == change)) {
+
+       CYG_ASSERT_CLASSC(dest);
+       CdlDialog dialog = dynamic_cast<CdlDialog>(dest);
+       if (0 == dialog) {
+           std::string msg = dest->get_class_name() + " " + dest->get_name() +
+               " cannot be used in a dialog property, it is not a custom dialog.";
+           CdlConflict_DataBody::make(transaction, source, prop, msg);
+       }
+
     } else if (CdlUpdate_Destroyed == change) {
-        // If there was a data conflict object, it is no longer relevant
-        transaction->clear_structural_conflicts(source, prop, &CdlConflict_DataBody::test);
+       // If there was a data conflict object, it is no longer relevant
+       transaction->clear_structural_conflicts(source, prop, &CdlConflict_DataBody::test);
     }
 
     CYG_REPORT_RETURN();
@@ -1589,7 +1589,7 @@ CdlValuableBody::parse_dialog(CdlInterpreter interp, int argc, const char* argv[
     CYG_REPORT_FUNCNAMETYPE("parse_dialog", "result %d");
 
     int result = CdlParse::parse_reference_property(interp, argc, argv, CdlPropertyId_Dialog, 0, 0, false, &dialog_update_handler);
-    
+
     CYG_REPORT_RETVAL(result);
     return result;
 }
@@ -1606,16 +1606,16 @@ CdlValuableBody::has_dialog() const
     bool        result          = false;
     CdlProperty property        = get_property(CdlPropertyId_Dialog);
     if (0 != property) {
-        CdlProperty_Reference ref_prop = dynamic_cast<CdlProperty_Reference>(property);
-        CYG_ASSERTC(0 != ref_prop);
-
-        CdlNode destination = ref_prop->get_destination();
-        if (0 != destination) {
-            CdlDialog dialog = dynamic_cast<CdlDialog>(destination);
-            if (0 != dialog) {
-                result = true;
-            }
-        }
+       CdlProperty_Reference ref_prop = dynamic_cast<CdlProperty_Reference>(property);
+       CYG_ASSERTC(0 != ref_prop);
+
+       CdlNode destination = ref_prop->get_destination();
+       if (0 != destination) {
+           CdlDialog dialog = dynamic_cast<CdlDialog>(destination);
+           if (0 != dialog) {
+               result = true;
+           }
+       }
     }
     CYG_REPORT_RETVAL(result);
     return result;
@@ -1632,13 +1632,13 @@ CdlValuableBody::get_dialog() const
     CdlDialog   result          = 0;
     CdlProperty property        = get_property(CdlPropertyId_Dialog);
     if (0 != property) {
-        CdlProperty_Reference ref_prop = dynamic_cast<CdlProperty_Reference>(property);
-        CYG_ASSERTC(0 != ref_prop);
+       CdlProperty_Reference ref_prop = dynamic_cast<CdlProperty_Reference>(property);
+       CYG_ASSERTC(0 != ref_prop);
 
-        CdlNode destination = ref_prop->get_destination();
-        if (0 != destination) {
-            result = dynamic_cast<CdlDialog>(destination);
-        }
+       CdlNode destination = ref_prop->get_destination();
+       if (0 != destination) {
+           result = dynamic_cast<CdlDialog>(destination);
+       }
     }
 
     CYG_REPORT_RETVAL(result);
@@ -1646,37 +1646,37 @@ CdlValuableBody::get_dialog() const
 }
 
 //}}}
-//{{{  wizard property                  
+//{{{  wizard property
 
 // ----------------------------------------------------------------------------
 // Syntax: wizard <reference>
 
 void
 CdlValuableBody::wizard_update_handler(CdlTransaction transaction, CdlNode source, CdlProperty prop, CdlNode dest,
-                                       CdlUpdate change)
+                                      CdlUpdate change)
 {
     CYG_REPORT_FUNCNAME("CdlValuable::wizard_update_handler");
     CYG_PRECONDITION_CLASSC(transaction);
     CYG_PRECONDITION_CLASSC(source);
     CYG_PRECONDITION_CLASSC(prop);
-    
+
     // The main update of interest is Loaded (iff dest != 0), and
     // Created. These updates indicate that the destination now exists,
     // so it is possible to check that the destination is a dialog.
     if (((CdlUpdate_Loaded == change) && (0 != dest)) ||
-        (CdlUpdate_Created == change)) {
-
-        CYG_ASSERT_CLASSC(dest);
-        CdlWizard wizard = dynamic_cast<CdlWizard>(dest);
-        if (0 == wizard) {
-            std::string msg = dest->get_class_name() + " " + dest->get_name() +
-                " cannot be used in a wizard property, it is not a wizard.";
-            CdlConflict_DataBody::make(transaction, source, prop, msg);
-        }
-        
+       (CdlUpdate_Created == change)) {
+
+       CYG_ASSERT_CLASSC(dest);
+       CdlWizard wizard = dynamic_cast<CdlWizard>(dest);
+       if (0 == wizard) {
+           std::string msg = dest->get_class_name() + " " + dest->get_name() +
+               " cannot be used in a wizard property, it is not a wizard.";
+           CdlConflict_DataBody::make(transaction, source, prop, msg);
+       }
+
     } else if (CdlUpdate_Destroyed == change) {
-        // If there was a data conflict object, it is no longer relevant
-        transaction->clear_structural_conflicts(source, prop, &CdlConflict_DataBody::test);
+       // If there was a data conflict object, it is no longer relevant
+       transaction->clear_structural_conflicts(source, prop, &CdlConflict_DataBody::test);
     }
 
     CYG_REPORT_RETURN();
@@ -1704,16 +1704,16 @@ CdlValuableBody::has_wizard() const
     bool        result          = false;
     CdlProperty property        = get_property(CdlPropertyId_Wizard);
     if (0 != property) {
-        CdlProperty_Reference ref_prop = dynamic_cast<CdlProperty_Reference>(property);
-        CYG_ASSERTC(0 != ref_prop);
-
-        CdlNode destination = ref_prop->get_destination();
-        if (0 != destination) {
-            CdlWizard wizard = dynamic_cast<CdlWizard>(destination);
-            CYG_ASSERTC(0 != wizard);
-            CYG_UNUSED_PARAM(CdlWizard, wizard);
-            result = true;
-        }
+       CdlProperty_Reference ref_prop = dynamic_cast<CdlProperty_Reference>(property);
+       CYG_ASSERTC(0 != ref_prop);
+
+       CdlNode destination = ref_prop->get_destination();
+       if (0 != destination) {
+           CdlWizard wizard = dynamic_cast<CdlWizard>(destination);
+           CYG_ASSERTC(0 != wizard);
+           CYG_UNUSED_PARAM(CdlWizard, wizard);
+           result = true;
+       }
     }
     CYG_REPORT_RETVAL(result);
     return result;
@@ -1729,14 +1729,14 @@ CdlValuableBody::get_wizard() const
     CdlWizard   result          = 0;
     CdlProperty property        = get_property(CdlPropertyId_Wizard);
     if (0 != property) {
-        CdlProperty_Reference ref_prop = dynamic_cast<CdlProperty_Reference>(property);
-        CYG_ASSERTC(0 != ref_prop);
-
-        CdlNode destination = ref_prop->get_destination();
-        if (0 != destination) {
-            result = dynamic_cast<CdlWizard>(destination);
-            CYG_ASSERTC(0 != result);
-        }
+       CdlProperty_Reference ref_prop = dynamic_cast<CdlProperty_Reference>(property);
+       CYG_ASSERTC(0 != ref_prop);
+
+       CdlNode destination = ref_prop->get_destination();
+       if (0 != destination) {
+           result = dynamic_cast<CdlWizard>(destination);
+           CYG_ASSERTC(0 != result);
+       }
     }
 
     CYG_REPORT_RETVAL(result);
@@ -1744,14 +1744,14 @@ CdlValuableBody::get_wizard() const
 }
 
 //}}}
-//{{{  legal_values property            
+//{{{  legal_values property
 
 // ----------------------------------------------------------------------------
 // Syntax: legal_values <list expression>
 
 void
 CdlValuableBody::legal_values_update_handler(CdlTransaction transaction, CdlNode source, CdlProperty prop, CdlNode dest,
-                                             CdlUpdate change)
+                                            CdlUpdate change)
 {
     CYG_REPORT_FUNCNAME("legal_values_update_handler");
 
@@ -1761,8 +1761,8 @@ CdlValuableBody::legal_values_update_handler(CdlTransaction transaction, CdlNode
     // Any other change can affect the list expression and hence
     // invalidate the current value.
     if ((CdlUpdate_Loaded == change) || (CdlUpdate_Unloading == change)) {
-        CYG_REPORT_RETURN();
-        return;
+       CYG_REPORT_RETURN();
+       return;
     }
 
     CdlValuable valuable = dynamic_cast<CdlValuable>(source);
@@ -1783,7 +1783,7 @@ CdlValuableBody::parse_legal_values(CdlInterpreter interp, int argc, const char*
     CYG_REPORT_FUNCNAMETYPE("parse_legal_values", "result %d");
 
     int result = CdlParse::parse_listexpression_property(interp, argc, argv, CdlPropertyId_LegalValues, 0, 0,
-                                                         &legal_values_update_handler);
+                                                        &legal_values_update_handler);
     CYG_REPORT_RETVAL(result);
     return result;
 }
@@ -1810,8 +1810,8 @@ CdlValuableBody::get_legal_values() const
     CdlProperty_ListExpression result = 0;
     CdlProperty       property          = get_property(CdlPropertyId_LegalValues);
     if (0 != property) {
-        result = dynamic_cast<CdlProperty_ListExpression>(property);
-        CYG_ASSERTC(0 != result);
+       result = dynamic_cast<CdlProperty_ListExpression>(property);
+       CYG_ASSERTC(0 != result);
     }
 
     CYG_REPORT_RETVAL(result);
@@ -1819,22 +1819,22 @@ CdlValuableBody::get_legal_values() const
 }
 
 //}}}
-//{{{  default_value property           
+//{{{  default_value property
 
 // ----------------------------------------------------------------------------
 // syntax: default_value <expr>
 
 void
 CdlValuableBody::default_value_update_handler(CdlTransaction transaction, CdlNode source, CdlProperty prop, CdlNode dest,
-                                              CdlUpdate change)
+                                             CdlUpdate change)
 {
     CYG_REPORT_FUNCNAME("CdlValuable::default_value_update_handler");
     CYG_REPORT_FUNCARG5XV(transaction, source, prop, dest, change);
 
     // Loaded and unloading should be ignored.
     if ((CdlUpdate_Loaded == change) || (CdlUpdate_Unloading == change)) {
-        CYG_REPORT_RETURN();
-        return;
+       CYG_REPORT_RETURN();
+       return;
     }
 
     // Init, Created, Destroyed, ValueChange and ActiveChange should
@@ -1844,25 +1844,25 @@ CdlValuableBody::default_value_update_handler(CdlTransaction transaction, CdlNod
     CYG_ASSERTC(0 != valuable);
     CdlProperty_Expression expr = dynamic_cast<CdlProperty_Expression>(prop);
     CYG_ASSERTC(0 != expr);
-    
+
     CdlSimpleValue val;
 
     try {
-        
-        CdlEvalContext context(transaction, source, prop);
-        expr->eval(context, val);
 
-        valuable->set(transaction, val, CdlValueSource_Default);
+       CdlEvalContext context(transaction, source, prop);
+       expr->eval(context, val);
+
+       valuable->set(transaction, val, CdlValueSource_Default);
 
     } catch(CdlEvalException e) {
 
-        
-        // An EvalException conflict will have been created, so the
-        // user knows that this default_value is not kosher. It is
-        // still a good idea to make sure that the object retains a
-        // sensible value.
-        val = (cdl_int) 0;
-        valuable->set(transaction, val, CdlValueSource_Default);
+
+       // An EvalException conflict will have been created, so the
+       // user knows that this default_value is not kosher. It is
+       // still a good idea to make sure that the object retains a
+       // sensible value.
+       val = (cdl_int) 0;
+       valuable->set(transaction, val, CdlValueSource_Default);
     }
 
     CYG_UNUSED_PARAM(CdlNode, dest);
@@ -1874,7 +1874,7 @@ CdlValuableBody::parse_default_value(CdlInterpreter interp, int argc, const char
 {
     CYG_REPORT_FUNCNAMETYPE("parse_default_value", "result %d");
     int result = CdlParse::parse_expression_property(interp, argc, argv, CdlPropertyId_DefaultValue, 0, 0,
-                                                     &default_value_update_handler);
+                                                    &default_value_update_handler);
     CYG_REPORT_RETVAL(result);
     return result;
 }
@@ -1901,8 +1901,8 @@ CdlValuableBody::get_default_value_expression() const
     CdlProperty_Expression result = 0;
     CdlProperty property          = get_property(CdlPropertyId_DefaultValue);
     if (0 != property) {
-        result = dynamic_cast<CdlProperty_Expression>(property);
-        CYG_ASSERTC(0 != result);
+       result = dynamic_cast<CdlProperty_Expression>(property);
+       CYG_ASSERTC(0 != result);
     }
 
     CYG_REPORT_RETVAL(result);
@@ -1910,22 +1910,22 @@ CdlValuableBody::get_default_value_expression() const
 }
 
 //}}}
-//{{{  calculated_property              
+//{{{  calculated_property
 
 // ----------------------------------------------------------------------------
 // Syntax: calculated <expression>
 
 void
 CdlValuableBody::calculated_update_handler(CdlTransaction transaction, CdlNode source, CdlProperty prop, CdlNode dest,
-                                           CdlUpdate change)
+                                          CdlUpdate change)
 {
     CYG_REPORT_FUNCNAME("CdlValuable::default_value_update_handler");
     CYG_REPORT_FUNCARG5XV(transaction, source, prop, dest, change);
 
     // Loaded and unloading should be ignored.
     if ((CdlUpdate_Loaded == change) || (CdlUpdate_Unloading == change)) {
-        CYG_REPORT_RETURN();
-        return;
+       CYG_REPORT_RETURN();
+       return;
     }
 
     // Init, Created, Destroyed, ValueChange and ActiveChange should
@@ -1935,25 +1935,25 @@ CdlValuableBody::calculated_update_handler(CdlTransaction transaction, CdlNode s
     CYG_ASSERTC(0 != valuable);
     CdlProperty_Expression expr = dynamic_cast<CdlProperty_Expression>(prop);
     CYG_ASSERTC(0 != expr);
-    
+
     CdlSimpleValue val;
 
     try {
-        
-        CdlEvalContext context(transaction, source, prop);
-        expr->eval(context, val);
 
-        valuable->set(transaction, val, CdlValueSource_Default);
+       CdlEvalContext context(transaction, source, prop);
+       expr->eval(context, val);
+
+       valuable->set(transaction, val, CdlValueSource_Default);
 
     } catch(CdlEvalException e) {
 
-        
-        // An EvalException conflict will have been created, so the
-        // user knows that this default_value is not kosher. It is
-        // still a good idea to make sure that the object retains a
-        // sensible value.
-        val = (cdl_int) 0;
-        valuable->set(transaction, val, CdlValueSource_Default);
+
+       // An EvalException conflict will have been created, so the
+       // user knows that this default_value is not kosher. It is
+       // still a good idea to make sure that the object retains a
+       // sensible value.
+       val = (cdl_int) 0;
+       valuable->set(transaction, val, CdlValueSource_Default);
     }
 
     CYG_UNUSED_PARAM(CdlNode, dest);
@@ -1967,7 +1967,7 @@ CdlValuableBody::parse_calculated(CdlInterpreter interp, int argc, const char* a
     CYG_REPORT_FUNCNAMETYPE("parse_calculated", "result %d");
 
     int result = CdlParse::parse_expression_property(interp, argc, argv, CdlPropertyId_Calculated, 0, 0,
-                                                     &calculated_update_handler);
+                                                    &calculated_update_handler);
     CYG_REPORT_RETVAL(result);
     return result;
 }
@@ -1994,8 +1994,8 @@ CdlValuableBody::get_calculated_expression() const
     CdlProperty_Expression result   = 0;
     CdlProperty            property = get_property(CdlPropertyId_Calculated);
     if (0 != property) {
-        result = dynamic_cast<CdlProperty_Expression>(property);
-        CYG_ASSERTC(0 != result);
+       result = dynamic_cast<CdlProperty_Expression>(property);
+       CYG_ASSERTC(0 != result);
     }
 
     CYG_REPORT_RETVAL(result);
@@ -2003,7 +2003,7 @@ CdlValuableBody::get_calculated_expression() const
 }
 
 //}}}
-//{{{  active_if property               
+//{{{  active_if property
 
 // ----------------------------------------------------------------------------
 // Syntax:
@@ -2011,7 +2011,7 @@ CdlValuableBody::get_calculated_expression() const
 
 void
 CdlValuableBody::active_if_update_handler(CdlTransaction transaction, CdlNode source, CdlProperty prop, CdlNode dest,
-                                      CdlUpdate change)
+                                     CdlUpdate change)
 {
     CYG_REPORT_FUNCNAME("CdlValuable::active_if_update_handler");
     CYG_REPORT_FUNCARG5XV(transaction, source, prop, dest, change);
@@ -2022,8 +2022,8 @@ CdlValuableBody::active_if_update_handler(CdlTransaction transaction, CdlNode so
     // Loaded should be ignored here, the world is still getting sorted out.
     // Unloading is of no interest, the source is disappearing anyway.
     if ((CdlUpdate_Loaded == change) || (CdlUpdate_Unloading == change)) {
-        CYG_REPORT_RETURN();
-        return;
+       CYG_REPORT_RETURN();
+       return;
     }
 
     // Any other change warrants re-evaluating the active status of the source.
@@ -2034,9 +2034,9 @@ CdlValuableBody::active_if_update_handler(CdlTransaction transaction, CdlNode so
     bool old_state = transaction->is_active(source);
     bool new_state = source->test_active(transaction);
     if (old_state != new_state) {
-        transaction->set_active(source, new_state);
+       transaction->set_active(source, new_state);
     }
-    
+
     CYG_UNUSED_PARAM(CdlNode, dest);
     CYG_REPORT_RETURN();
 }
@@ -2047,7 +2047,7 @@ CdlValuableBody::parse_active_if(CdlInterpreter interp, int argc, const char* ar
     CYG_REPORT_FUNCNAMETYPE("parse_active_if", "result %d");
 
     int result = CdlParse::parse_goalexpression_property(interp, argc, argv, CdlPropertyId_ActiveIf, 0, 0,
-                                                         &active_if_update_handler);
+                                                        &active_if_update_handler);
     CYG_REPORT_RETVAL(result);
     return result;
 }
@@ -2075,23 +2075,23 @@ CdlValuableBody::get_active_if_conditions(std::vector<CdlProperty_GoalExpression
     get_properties(CdlPropertyId_ActiveIf, properties);
     std::vector<CdlProperty>::const_iterator i;
     for (i = properties.begin(); i != properties.end(); i++) {
-        CdlProperty_GoalExpression goal = dynamic_cast<CdlProperty_GoalExpression>(*i);
-        CYG_ASSERTC(0 != goal);
-        result.push_back(goal);
+       CdlProperty_GoalExpression goal = dynamic_cast<CdlProperty_GoalExpression>(*i);
+       CYG_ASSERTC(0 != goal);
+       result.push_back(goal);
     }
 
     CYG_REPORT_RETURN();
 }
 
 //}}}
-//{{{  requires property                
+//{{{  requires property
 
 // ----------------------------------------------------------------------------
 // Syntax: requires <goal expression>
 
 void
 CdlValuableBody::requires_update_handler(CdlTransaction transaction, CdlNode source, CdlProperty prop, CdlNode dest,
-                                         CdlUpdate change)
+                                        CdlUpdate change)
 {
     CYG_REPORT_FUNCNAME("CdlValuable::requires_update_handler");
     CYG_REPORT_FUNCARG5XV(transaction, source, prop, dest, change);
@@ -2099,10 +2099,10 @@ CdlValuableBody::requires_update_handler(CdlTransaction transaction, CdlNode sou
 
     // Loaded and Unloading are not of interest.
     if ((CdlUpdate_Loaded == change) || (CdlUpdate_Unloading == change)) {
-        CYG_REPORT_RETURN();
-        return;
+       CYG_REPORT_RETURN();
+       return;
     }
-    
+
     // Any other change should cause normal handling. This happens in
     // a separate function because "requires" properties also need to
     // be checked when e.g. the source becomes inactive.
@@ -2123,7 +2123,7 @@ CdlValuableBody::parse_requires(CdlInterpreter interp, int argc, const char* arg
     CYG_REPORT_FUNCNAMETYPE("parse_requires", "result %d");
 
     int result = CdlParse::parse_goalexpression_property(interp, argc, argv, CdlPropertyId_Requires, 0, 0,
-                                                         &requires_update_handler);
+                                                        &requires_update_handler);
     CYG_REPORT_RETVAL(result);
     return result;
 }
@@ -2151,23 +2151,23 @@ CdlValuableBody::get_requires_goals(std::vector<CdlProperty_GoalExpression>& res
     get_properties(CdlPropertyId_Requires, properties);
     std::vector<CdlProperty>::const_iterator i;
     for (i = properties.begin(); i != properties.end(); i++) {
-        CdlProperty_GoalExpression goal = dynamic_cast<CdlProperty_GoalExpression>(*i);
-        CYG_ASSERTC(0 != goal);
-        result.push_back(goal);
+       CdlProperty_GoalExpression goal = dynamic_cast<CdlProperty_GoalExpression>(*i);
+       CYG_ASSERTC(0 != goal);
+       result.push_back(goal);
     }
 
     CYG_REPORT_RETURN();
 }
 
 //}}}
-//{{{  implements property              
+//{{{  implements property
 
 // ----------------------------------------------------------------------------
 // Syntax: implements <reference to interface>
 
 void
 CdlValuableBody::implements_update_handler(CdlTransaction transaction, CdlNode source, CdlProperty prop, CdlNode dest,
-                                           CdlUpdate change)
+                                          CdlUpdate change)
 {
     CYG_REPORT_FUNCNAME("CdlValuable::implements_update_handler");
     CYG_REPORT_FUNCARG5XV(transaction, source, prop, dest, change);
@@ -2183,14 +2183,14 @@ CdlValuableBody::implements_update_handler(CdlTransaction transaction, CdlNode s
 
     // Any changes to the interface itself can be ignored.
     if ((CdlUpdate_ValueChange == change) || (CdlUpdate_ActiveChange == change)) {
-        CYG_REPORT_RETURN();
-        return;
+       CYG_REPORT_RETURN();
+       return;
     }
 
     // The second stage init is irrelevant
     if (CdlUpdate_Init == change) {
-        CYG_REPORT_RETURN();
-        return;
+       CYG_REPORT_RETURN();
+       return;
     }
 
     // Possibilities:
@@ -2209,24 +2209,24 @@ CdlValuableBody::implements_update_handler(CdlTransaction transaction, CdlNode s
     //
     // If the dest is invalid, a structural conflict has to be created.
     if (CdlUpdate_Destroyed == change) {
-        // There is no need to do any clean-ups in the dest.
-        dest = 0;
+       // There is no need to do any clean-ups in the dest.
+       dest = 0;
     }
     if (0 == dest) {
-        transaction->clear_structural_conflicts(source, prop, &CdlConflict_DataBody::test);
+       transaction->clear_structural_conflicts(source, prop, &CdlConflict_DataBody::test);
     } else {
-        CdlInterface interface = dynamic_cast<CdlInterface>(dest);
-
-        if (0 == interface) {
-            std::string msg = source->get_class_name() + " " + source->get_name() + " cannot implement " +
-                dest->get_name() + "\n    The latter is not an interface.";
-            CdlConflict_DataBody::make(transaction, source, prop, msg);
-        } else {
-            transaction->clear_structural_conflicts(source, prop, &CdlConflict_DataBody::test);
-            interface->recalculate(transaction);
-        }
+       CdlInterface interface = dynamic_cast<CdlInterface>(dest);
+
+       if (0 == interface) {
+           std::string msg = source->get_class_name() + " " + source->get_name() + " cannot implement " +
+               dest->get_name() + "\n    The latter is not an interface.";
+           CdlConflict_DataBody::make(transaction, source, prop, msg);
+       } else {
+           transaction->clear_structural_conflicts(source, prop, &CdlConflict_DataBody::test);
+           interface->recalculate(transaction);
+       }
     }
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -2236,8 +2236,8 @@ CdlValuableBody::parse_implements(CdlInterpreter interp, int argc, const char* a
     CYG_REPORT_FUNCNAMETYPE("parse_implements", "result %d");
 
     int result = CdlParse::parse_reference_property(interp, argc, argv, CdlPropertyId_Implements, 0, 0, false,
-                                                    &implements_update_handler);
-    
+                                                   &implements_update_handler);
+
     CYG_REPORT_RETVAL(result);
     return result;
 }
@@ -2253,21 +2253,21 @@ CdlValuableBody::get_implemented_interfaces(std::vector<CdlInterface>& result) c
     get_properties(CdlPropertyId_Implements, properties);
     std::vector<CdlProperty>::const_iterator i;
     for (i = properties.begin(); i != properties.end(); i++) {
-        CdlProperty_Reference refprop = dynamic_cast<CdlProperty_Reference>(*i);
-        CYG_ASSERTC(0 != refprop);
-        CdlNode node = refprop->get_destination();
-        if (0 != node) {
-            CdlInterface interface = dynamic_cast<CdlInterface>(node);
-            CYG_ASSERT_CLASSC(interface);
-            result.push_back(interface);
-        }
+       CdlProperty_Reference refprop = dynamic_cast<CdlProperty_Reference>(*i);
+       CYG_ASSERTC(0 != refprop);
+       CdlNode node = refprop->get_destination();
+       if (0 != node) {
+           CdlInterface interface = dynamic_cast<CdlInterface>(node);
+           CYG_ASSERT_CLASSC(interface);
+           result.push_back(interface);
+       }
     }
 
     CYG_REPORT_RETURN();
 }
 
 //}}}
-//{{{  Other properties                 
+//{{{  Other properties
 
 // ----------------------------------------------------------------------------
 // Syntax: flavor <legal flavor>
@@ -2278,15 +2278,15 @@ parse_flavor_final_check(CdlInterpreter interp, CdlProperty_String prop)
     CYG_REPORT_FUNCNAME("parse_flavor_final_check");
     CYG_PRECONDITION_CLASSC(interp);
     CYG_PRECONDITION_CLASSC(prop);
-    
+
     const std::string& str = prop->get_string();
     std::string copy = std::string(str);
     CdlValueFlavor flavor;
 
     if (!Cdl::string_to_flavor(copy, flavor)) {
-        CdlParse::report_property_parse_error(interp, prop, str + " is not a valid CDL flavor.");
+       CdlParse::report_property_parse_error(interp, prop, str + " is not a valid CDL flavor.");
     }
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -2309,7 +2309,7 @@ CdlValuableBody::parse_group(CdlInterpreter interp, int argc, const char* argv[]
     CYG_REPORT_FUNCNAMETYPE("parse_group", "result %d");
 
     int result = CdlParse::parse_string_property(interp, argc, argv, CdlPropertyId_Group, 0, 0);
-    
+
     CYG_REPORT_RETVAL(result);
     return result;
 }
@@ -2323,7 +2323,7 @@ CdlValuableBody::parse_check_proc(CdlInterpreter interp, int argc, const char* a
     CYG_REPORT_FUNCNAMETYPE("parse_check_proc", "result %d");
 
     int result = CdlParse::parse_tclcode_property(interp, argc, argv, CdlPropertyId_CheckProc, 0, 0);
-    
+
     CYG_REPORT_RETVAL(result);
     return result;
 }
@@ -2350,11 +2350,11 @@ CdlValuableBody::get_check_proc() const
     cdl_tcl_code result         = "";
     CdlProperty  property       = get_property(CdlPropertyId_CheckProc);
     if (0 != property) {
-        CdlProperty_TclCode code_prop = dynamic_cast<CdlProperty_TclCode>(property);
-        CYG_ASSERTC(0 != code_prop);
-        result = code_prop->get_code();
+       CdlProperty_TclCode code_prop = dynamic_cast<CdlProperty_TclCode>(property);
+       CYG_ASSERTC(0 != code_prop);
+       result = code_prop->get_code();
     }
-    
+
     CYG_REPORT_RETURN();
     return result;
 }
@@ -2368,7 +2368,7 @@ CdlValuableBody::parse_entry_proc(CdlInterpreter interp, int argc, const char* a
     CYG_REPORT_FUNCNAMETYPE("parse_entry_proc", "result %d");
 
     int result = CdlParse::parse_tclcode_property(interp, argc, argv, CdlPropertyId_EntryProc, 0, 0);
-    
+
     CYG_REPORT_RETVAL(result);
     return result;
 }
@@ -2394,9 +2394,9 @@ CdlValuableBody::get_entry_proc() const
     cdl_tcl_code result         = "";
     CdlProperty  property       = get_property(CdlPropertyId_EntryProc);
     if (0 != property) {
-        CdlProperty_TclCode code_prop = dynamic_cast<CdlProperty_TclCode>(property);
-        CYG_ASSERTC(0 != code_prop);
-        result = code_prop->get_code();
+       CdlProperty_TclCode code_prop = dynamic_cast<CdlProperty_TclCode>(property);
+       CYG_ASSERTC(0 != code_prop);
+       result = code_prop->get_code();
     }
 
     CYG_REPORT_RETURN();
@@ -2405,7 +2405,7 @@ CdlValuableBody::get_entry_proc() const
 
 //}}}
 
-//{{{  CdlValuable misc                 
+//{{{  CdlValuable misc
 
 // ----------------------------------------------------------------------------
 // Objects with flavor none are not modifiable. Also, objects with the
@@ -2420,9 +2420,9 @@ CdlValuableBody::is_modifiable() const
 
     bool result = true;
     if (CdlValueFlavor_None == get_flavor()) {
-        result = false;
+       result = false;
     } else if (has_property(CdlPropertyId_Calculated)) {
-        result = false;
+       result = false;
     }
 
     CYG_REPORT_RETVAL(result);
@@ -2430,7 +2430,7 @@ CdlValuableBody::is_modifiable() const
 }
 
 //}}}
-//{{{  CdlValuable::get_widget_hint()   
+//{{{  CdlValuable::get_widget_hint()
 
 // ----------------------------------------------------------------------------
 
@@ -2452,219 +2452,219 @@ CdlValuableBody::get_widget_hint(CdlWidgetHint& hint)
     // separate dialog, followed by a tree redisplay
     CdlConstLoadable loadable = dynamic_cast<CdlConstLoadable>(this);
     if (0 != loadable) {
-        hint.value_widget = CdlValueWidget_Loadable;
-        CYG_REPORT_RETURN();
-        return;
+       hint.value_widget = CdlValueWidget_Loadable;
+       CYG_REPORT_RETURN();
+       return;
     }
-    
+
     // If the valuable is not modifiable then we are already done.
     CdlValueFlavor flavor = this->get_flavor();
     if ((CdlValueFlavor_None == flavor) || !this->is_modifiable()) {
-        CYG_REPORT_RETURN();
-        return;
+       CYG_REPORT_RETURN();
+       return;
     }
 
     // If there is a custom dialog and dialogs are enabled, use it.
     if (this->has_dialog() && CdlDialogBody::dialogs_are_enabled()) {
-        if ((CdlValueFlavor_Bool == flavor) || (CdlValueFlavor_BoolData == flavor)) {
-            hint.bool_widget = CdlBoolWidget_CustomDialog;
-        }
-        if ((CdlValueFlavor_Data == flavor) || (CdlValueFlavor_BoolData == flavor)) {
-            hint.value_widget = CdlValueWidget_CustomDialog;
-        }
-        CYG_REPORT_RETURN();
-        return;
+       if ((CdlValueFlavor_Bool == flavor) || (CdlValueFlavor_BoolData == flavor)) {
+           hint.bool_widget = CdlBoolWidget_CustomDialog;
+       }
+       if ((CdlValueFlavor_Data == flavor) || (CdlValueFlavor_BoolData == flavor)) {
+           hint.value_widget = CdlValueWidget_CustomDialog;
+       }
+       CYG_REPORT_RETURN();
+       return;
     }
-    
+
     // Process the bool part, if any
     if ((CdlValueFlavor_Bool == flavor) || (CdlValueFlavor_BoolData == flavor)) {
-        
-        // Default to a CheckButton
-        hint.bool_widget = CdlBoolWidget_CheckButton;
-
-        // Under some circumstances it is appropriate to use a radio button instead.
-        // This is the case when there are several mutually exclusive entities.
-        // Most of the time radio buttons should actually be handled by a single
-        // option which has a list of legal values. There are a couple of cases
-        // where this is not appropriate:
-        //
-        // 1) grouping. Some of the mutually exclusive entities could be containers.
-        //    With clever use of a single option and some active_if properties it
-        //    would be possible to get almost the same effect, but not quite.
-        //
-        // 2) external packages. It should be possible to have a third party package
-        //    which could add e.g. a new scheduler.
-        //
-        // The implementation of this involves interfaces. Basically mutually
-        // exclusive entities should implement the same interface, and that
-        // interface should have an explicit requires $cdl_value == 1
-        // In addition all of the options involved should have the same parent.
-        // An entity may implement multiple interfaces, so they all have to be checked
-        CdlInterface radio_interface = 0;
-        std::vector<CdlProperty> implements = this->get_properties(CdlPropertyId_Implements);
-        std::vector<CdlProperty>::const_iterator imp_i;
-        for (imp_i = implements.begin(); (imp_i != implements.end()) && (0 == radio_interface); imp_i++) {
-            CdlProperty_Reference refprop = dynamic_cast<CdlProperty_Reference>(*imp_i);
-            CYG_ASSERT_CLASSC(refprop);
-
-            CdlNode destnode = refprop->get_destination();
-            if (0 == destnode) {
-                continue;
-            }
-            CdlInterface interface = dynamic_cast<CdlInterface>(destnode);
-            CYG_ASSERT_CLASSC(interface);
-            std::vector<CdlProperty_GoalExpression> requires;
-            std::vector<CdlProperty_GoalExpression>::const_iterator req_i;
-            interface->get_requires_goals(requires);
-            for (req_i = requires.begin(); req_i != requires.end(); req_i++) {
-
-                CdlExpression expr = (*req_i)->get_expression();
-                CdlSubexpression& subexpr = expr->sub_expressions[expr->first_subexpression];
-                if (CdlExprOp_Equal != subexpr.op) {
-                    continue;
-                }
-                CdlSubexpression& lhs = expr->sub_expressions[subexpr.lhs_index];
-                CdlSubexpression& rhs = expr->sub_expressions[subexpr.rhs_index];
-                CdlSubexpression* ref_operand = &lhs;
-
-                // Allow for "a == 1" or "1 == a"
-                if ((CdlExprOp_IntegerConstant == lhs.op) && (1 == lhs.constants.get_integer_value())) {
-                    ref_operand = &rhs;
-                } else if ((CdlExprOp_IntegerConstant == rhs.op) && (1 == rhs.constants.get_integer_value())) {
-                    ref_operand = &lhs;
-                } else {
-                    continue;
-                }
-
-                if (CdlExprOp_Reference != ref_operand->op) {
-                    continue;
-                }
-                CdlReference& ref = expr->references[ref_operand->reference_index];
-                if (ref.get_destination() == interface) {
-                    break;
-                }
-            }
-            if (req_i == requires.end()) {
-                continue;
-            }
-
-            CdlContainer parent = this->get_parent();
-            CYG_ASSERT_CLASSC(parent);
-            std::vector<CdlValuable> implementers;
-            std::vector<CdlValuable>::const_iterator imp_i;
-            interface->get_implementers(implementers);
-            for (imp_i = implementers.begin(); imp_i != implementers.end(); imp_i++) {
-                if (parent != (*imp_i)->get_parent()) {
-                    break;
-                }
-            }
-
-            if (imp_i == implementers.end()) {
-                // An interface has been found that matches the constraints.
-                radio_interface = interface;
-            }
-        }
-        if (0 != radio_interface) {
-            hint.bool_widget = CdlBoolWidget_Radio;
-            hint.radio_button_interface = radio_interface->get_name();
-        }
+
+       // Default to a CheckButton
+       hint.bool_widget = CdlBoolWidget_CheckButton;
+
+       // Under some circumstances it is appropriate to use a radio button instead.
+       // This is the case when there are several mutually exclusive entities.
+       // Most of the time radio buttons should actually be handled by a single
+       // option which has a list of legal values. There are a couple of cases
+       // where this is not appropriate:
+       //
+       // 1) grouping. Some of the mutually exclusive entities could be containers.
+       //    With clever use of a single option and some active_if properties it
+       //    would be possible to get almost the same effect, but not quite.
+       //
+       // 2) external packages. It should be possible to have a third party package
+       //    which could add e.g. a new scheduler.
+       //
+       // The implementation of this involves interfaces. Basically mutually
+       // exclusive entities should implement the same interface, and that
+       // interface should have an explicit requires $cdl_value == 1
+       // In addition all of the options involved should have the same parent.
+       // An entity may implement multiple interfaces, so they all have to be checked
+       CdlInterface radio_interface = 0;
+       std::vector<CdlProperty> implements = this->get_properties(CdlPropertyId_Implements);
+       std::vector<CdlProperty>::const_iterator imp_i;
+       for (imp_i = implements.begin(); (imp_i != implements.end()) && (0 == radio_interface); imp_i++) {
+           CdlProperty_Reference refprop = dynamic_cast<CdlProperty_Reference>(*imp_i);
+           CYG_ASSERT_CLASSC(refprop);
+
+           CdlNode destnode = refprop->get_destination();
+           if (0 == destnode) {
+               continue;
+           }
+           CdlInterface interface = dynamic_cast<CdlInterface>(destnode);
+           CYG_ASSERT_CLASSC(interface);
+
+           std::vector<CdlProperty_GoalExpression> requires;
+           std::vector<CdlProperty_GoalExpression>::const_iterator req_i;
+           interface->get_requires_goals(requires);
+           for (req_i = requires.begin(); req_i != requires.end(); req_i++) {
+
+               CdlExpression expr = (*req_i)->get_expression();
+               CdlSubexpression& subexpr = expr->sub_expressions[expr->first_subexpression];
+               if (CdlExprOp_Equal != subexpr.op) {
+                   continue;
+               }
+
+               CdlSubexpression& lhs = expr->sub_expressions[subexpr.lhs_index];
+               CdlSubexpression& rhs = expr->sub_expressions[subexpr.rhs_index];
+               CdlSubexpression* ref_operand = &lhs;
+
+               // Allow for "a == 1" or "1 == a"
+               if ((CdlExprOp_IntegerConstant == lhs.op) && (1 == lhs.constants.get_integer_value())) {
+                   ref_operand = &rhs;
+               } else if ((CdlExprOp_IntegerConstant == rhs.op) && (1 == rhs.constants.get_integer_value())) {
+                   ref_operand = &lhs;
+               } else {
+                   continue;
+               }
+
+               if (CdlExprOp_Reference != ref_operand->op) {
+                   continue;
+               }
+               CdlReference& ref = expr->references[ref_operand->reference_index];
+               if (ref.get_destination() == interface) {
+                   break;
+               }
+           }
+           if (req_i == requires.end()) {
+               continue;
+           }
+
+           CdlContainer parent = this->get_parent();
+           CYG_ASSERT_CLASSC(parent);
+
+           std::vector<CdlValuable> implementers;
+           std::vector<CdlValuable>::const_iterator imp_i;
+           interface->get_implementers(implementers);
+           for (imp_i = implementers.begin(); imp_i != implementers.end(); imp_i++) {
+               if (parent != (*imp_i)->get_parent()) {
+                   break;
+               }
+           }
+
+           if (imp_i == implementers.end()) {
+               // An interface has been found that matches the constraints.
+               radio_interface = interface;
+           }
+       }
+       if (0 != radio_interface) {
+           hint.bool_widget = CdlBoolWidget_Radio;
+           hint.radio_button_interface = radio_interface->get_name();
+       }
     }
 
     // Process the data part, if any
     if ((CdlValueFlavor_Data == flavor) || (CdlValueFlavor_BoolData == flavor)) {
-        
-        // Default to a simple entry box.
-        hint.value_widget = CdlValueWidget_EntryBox;
-        
-        // If there is a legal_values list, this will normally indicate
-        // which widget should be used.
-        if (this->has_legal_values()) {
-            // The legal_values expression needs to be evaluated and examined.
-            // If the result is a simple numerical range then all we need to
-            // figure out is whether to default to decimal, hex, octal or double.
-            // Otherwise if the result is a simple list and all of the entries
-            // are numerical, that is sufficient information. If a list with
-            // non-numerical entries that is fine as well. Anything more complicated
-            // needs to revert to an entry box.
-            CdlProperty_ListExpression lexpr = this->get_legal_values();
-            CdlEvalContext             context(0, this, lexpr);
-            CdlListValue               val;
-
-            try {
-                lexpr->eval(context, val);
-                const std::vector<CdlSimpleValue>& table = val.get_table();
-                const std::vector<std::pair<cdl_int, cdl_int> >& int_ranges = val.get_integer_ranges();
-                const std::vector<std::pair<double, double> >&   double_ranges = val.get_double_ranges();
-                
-                if ((0 == table.size()) && (0 == int_ranges.size()) && (1 == double_ranges.size())) {
-                    
-                    // A straightforward range of double precision numbers
-                    hint.value_widget = CdlValueWidget_DoubleRange;
-                    
-                } else if ((0 == table.size()) && (1 == int_ranges.size()) && (0 == double_ranges.size())) {
-
-                    // Bummer. The formatting information has been lost.
-                    // To fix this the two sets of ranges should be collapsed into pairs of
-                    // CdlSimpleValue's.
-                    hint.value_widget = CdlValueWidget_DecimalRange;
-                    
-                } else if ((1 <= table.size() && (0 == int_ranges.size()) && (0 == double_ranges.size()))) {
-
-                    // If all of the values are numerical, then we have a numeric set.
-                    // Otherwise we have a string set.
-                    bool all_numeric = true;
-                    std::vector<CdlSimpleValue>::const_iterator tab_i;
-                    for (tab_i = table.begin(); (tab_i != table.end()) && all_numeric; tab_i++) {
-                        if (!tab_i->has_double_value() && !tab_i->has_integer_value()) {
-                            all_numeric = false;
-                        }
-                    }
-                    if (all_numeric) {
-                        hint.value_widget = CdlValueWidget_NumericSet;
-                    } else {
-                        hint.value_widget = CdlValueWidget_StringSet;
-                    }
-                    
-                } else {
-                    // The list expression is a complex combination. Leave it as an entry box.
-                    // In some cases it would be possible to do better, for example
-                    //     legal_values -1 1 to 4 8 to 12
-                    // Support for cases like these may get added in future, if such cases
-                    // ever arise in practice.
-                }
-                
-            } catch(...) {
-                // Not a lot that can be done here, unfortunately
-            }
-        } else {
-            // There is no legal_values property, so an entry box is probably the
-            // right thing to use. There is a special case for multiline strings,
-            // identified by a default_value expression that contains a newline.
-            if (this->has_default_value_expression()) {
-                CdlProperty_Expression expr = this->get_default_value_expression();
-                CdlEvalContext         context(0, this, expr);
-                CdlSimpleValue         val;
-                try {
-                    expr->eval(context, val);
-                    std::string tmp = val.get_value();
-                    if (std::string::npos != tmp.find('\n')) {
-                        hint.value_widget = CdlValueWidget_MultilineString;
-                    }
-                } catch(...) {
-                    // Not a lot that can be done here, unfortunately
-                }
-            }
-        }
+
+       // Default to a simple entry box.
+       hint.value_widget = CdlValueWidget_EntryBox;
+
+       // If there is a legal_values list, this will normally indicate
+       // which widget should be used.
+       if (this->has_legal_values()) {
+           // The legal_values expression needs to be evaluated and examined.
+           // If the result is a simple numerical range then all we need to
+           // figure out is whether to default to decimal, hex, octal or double.
+           // Otherwise if the result is a simple list and all of the entries
+           // are numerical, that is sufficient information. If a list with
+           // non-numerical entries that is fine as well. Anything more complicated
+           // needs to revert to an entry box.
+           CdlProperty_ListExpression lexpr = this->get_legal_values();
+           CdlEvalContext             context(0, this, lexpr);
+           CdlListValue               val;
+
+           try {
+               lexpr->eval(context, val);
+               const std::vector<CdlSimpleValue>& table = val.get_table();
+               const std::vector<std::pair<cdl_int, cdl_int> >& int_ranges = val.get_integer_ranges();
+               const std::vector<std::pair<double, double> >&   double_ranges = val.get_double_ranges();
+
+               if ((0 == table.size()) && (0 == int_ranges.size()) && (1 == double_ranges.size())) {
+
+                   // A straightforward range of double precision numbers
+                   hint.value_widget = CdlValueWidget_DoubleRange;
+
+               } else if ((0 == table.size()) && (1 == int_ranges.size()) && (0 == double_ranges.size())) {
+
+                   // Bummer. The formatting information has been lost.
+                   // To fix this the two sets of ranges should be collapsed into pairs of
+                   // CdlSimpleValue's.
+                   hint.value_widget = CdlValueWidget_DecimalRange;
+
+               } else if ((1 <= table.size() && (0 == int_ranges.size()) && (0 == double_ranges.size()))) {
+
+                   // If all of the values are numerical, then we have a numeric set.
+                   // Otherwise we have a string set.
+                   bool all_numeric = true;
+                   std::vector<CdlSimpleValue>::const_iterator tab_i;
+                   for (tab_i = table.begin(); (tab_i != table.end()) && all_numeric; tab_i++) {
+                       if (!tab_i->has_double_value() && !tab_i->has_integer_value()) {
+                           all_numeric = false;
+                       }
+                   }
+                   if (all_numeric) {
+                       hint.value_widget = CdlValueWidget_NumericSet;
+                   } else {
+                       hint.value_widget = CdlValueWidget_StringSet;
+                   }
+
+               } else {
+                   // The list expression is a complex combination. Leave it as an entry box.
+                   // In some cases it would be possible to do better, for example
+                   //     legal_values -1 1 to 4 8 to 12
+                   // Support for cases like these may get added in future, if such cases
+                   // ever arise in practice.
+               }
+
+           } catch(...) {
+               // Not a lot that can be done here, unfortunately
+           }
+       } else {
+           // There is no legal_values property, so an entry box is probably the
+           // right thing to use. There is a special case for multiline strings,
+           // identified by a default_value expression that contains a newline.
+           if (this->has_default_value_expression()) {
+               CdlProperty_Expression expr = this->get_default_value_expression();
+               CdlEvalContext         context(0, this, expr);
+               CdlSimpleValue         val;
+               try {
+                   expr->eval(context, val);
+                   std::string tmp = val.get_value();
+                   if (std::string::npos != tmp.find('\n')) {
+                       hint.value_widget = CdlValueWidget_MultilineString;
+                   }
+               } catch(...) {
+                   // Not a lot that can be done here, unfortunately
+               }
+           }
+       }
     }
-    
+
     CYG_REPORT_RETURN();
 }
 
 //}}}
-//{{{  CdlValuable get operations       
+//{{{  CdlValuable get operations
 
 // ----------------------------------------------------------------------------
 const CdlValue&
@@ -2926,7 +2926,7 @@ CdlValuableBody::get_simple_value(CdlTransaction transaction, CdlValueSource sou
 }
 
 //}}}
-//{{{  CdlValuable internal modify ops  
+//{{{  CdlValuable internal modify ops
 
 // ----------------------------------------------------------------------------
 // There has been a change to either the value itself or to the
@@ -2944,46 +2944,46 @@ CdlValuableBody::check_value(CdlTransaction transaction)
     // values.
     CdlValueFlavor flavor = value.get_flavor();
     if ((CdlValueFlavor_BoolData != flavor) && (CdlValueFlavor_Data != flavor)) {
-        CYG_REPORT_RETURN();
-        return;
+       CYG_REPORT_RETURN();
+       return;
     }
 
     // If the valuable is not currently active and enabled then it
     // does not matter whether or not the value is legal. Any old
     // conflicts should be destroyed.
     if (!(transaction->is_active(this) && this->is_enabled(transaction))) {
-        transaction->clear_conflicts(this, &CdlConflict_IllegalValueBody::test);
-        CYG_REPORT_RETURN();
-        return;
+       transaction->clear_conflicts(this, &CdlConflict_IllegalValueBody::test);
+       CYG_REPORT_RETURN();
+       return;
     }
 
     // If there is a legal_values property, check membership.
     if (this->has_property(CdlPropertyId_LegalValues)) {
-        CdlProperty_ListExpression lexpr = dynamic_cast<CdlProperty_ListExpression>(get_property(CdlPropertyId_LegalValues));
-        CYG_ASSERT_CLASSC(lexpr);
-
-        CdlSimpleValue val = this->get_simple_value(transaction);
-        CdlEvalContext context(transaction, this, lexpr);
-        try {
-            if (!lexpr->is_member(context, val)) {
-                if (!transaction->has_conflict(this, lexpr, &CdlConflict_IllegalValueBody::test)) {
-                    CdlConflict_IllegalValueBody::make(transaction, this, lexpr);
-                }
-            
-            } else {
-                // Tne current value is legal. Get rid of any old conflicts.
-                transaction->clear_conflicts(this, lexpr, &CdlConflict_IllegalValueBody::test);
-            }
-        } catch(CdlEvalException e) {
-            // There should now be an EvalException conflict for this
-            // node, so there is no point in having an IllegalValue conflict
-            // as well.
-            transaction->clear_conflicts(this, lexpr, &CdlConflict_IllegalValueBody::test);
-        }              
-
-        // FIXME: add support for check_proc
+       CdlProperty_ListExpression lexpr = dynamic_cast<CdlProperty_ListExpression>(get_property(CdlPropertyId_LegalValues));
+       CYG_ASSERT_CLASSC(lexpr);
+
+       CdlSimpleValue val = this->get_simple_value(transaction);
+       CdlEvalContext context(transaction, this, lexpr);
+       try {
+           if (!lexpr->is_member(context, val)) {
+               if (!transaction->has_conflict(this, lexpr, &CdlConflict_IllegalValueBody::test)) {
+                   CdlConflict_IllegalValueBody::make(transaction, this, lexpr);
+               }
+
+           } else {
+               // Tne current value is legal. Get rid of any old conflicts.
+               transaction->clear_conflicts(this, lexpr, &CdlConflict_IllegalValueBody::test);
+           }
+       } catch(CdlEvalException e) {
+           // There should now be an EvalException conflict for this
+           // node, so there is no point in having an IllegalValue conflict
+           // as well.
+           transaction->clear_conflicts(this, lexpr, &CdlConflict_IllegalValueBody::test);
+       }
+
+       // FIXME: add support for check_proc
     }
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -3004,9 +3004,9 @@ CdlValuableBody::check_requires(CdlTransaction transaction)
     get_properties(CdlPropertyId_Requires, requires_properties);
     for (prop_i = requires_properties.begin(); prop_i != requires_properties.end(); prop_i++) {
 
-        CdlProperty_GoalExpression gexpr = dynamic_cast<CdlProperty_GoalExpression>(*prop_i);
-        CYG_ASSERT_CLASSC(gexpr);
-        this->check_requires(transaction, gexpr);
+       CdlProperty_GoalExpression gexpr = dynamic_cast<CdlProperty_GoalExpression>(*prop_i);
+       CYG_ASSERT_CLASSC(gexpr);
+       this->check_requires(transaction, gexpr);
     }
 
     CYG_REPORT_RETURN();
@@ -3024,29 +3024,29 @@ CdlValuableBody::check_requires(CdlTransaction transaction, CdlProperty_GoalExpr
     // If the valuable is not currently active and enabled then the "requires"
     // properties are irrelevant, and any old conflicts should be destroyed.
     if (!transaction->is_active(this) || !this->is_enabled(transaction)) {
-        transaction->clear_conflicts(this, gexpr, &CdlConflict_RequiresBody::test);
-        CYG_REPORT_RETURN();
-        return;
+       transaction->clear_conflicts(this, gexpr, &CdlConflict_RequiresBody::test);
+       CYG_REPORT_RETURN();
+       return;
     }
 
     // What is the current value of the goal expression?
     try {
-        CdlEvalContext context(transaction, this, gexpr);
-        if (gexpr->eval(context)) {
-            // The goal is satisfied.
-            transaction->clear_conflicts(this, gexpr, &CdlConflict_RequiresBody::test);
-        } else {
-            // The goal is not satisfied. Make sure there is a conflict object.
-            if (!transaction->has_conflict(this, gexpr, &CdlConflict_RequiresBody::test)) {
-                CdlConflict_RequiresBody::make(transaction, this, gexpr);
-            }
-        }
+       CdlEvalContext context(transaction, this, gexpr);
+       if (gexpr->eval(context)) {
+           // The goal is satisfied.
+           transaction->clear_conflicts(this, gexpr, &CdlConflict_RequiresBody::test);
+       } else {
+           // The goal is not satisfied. Make sure there is a conflict object.
+           if (!transaction->has_conflict(this, gexpr, &CdlConflict_RequiresBody::test)) {
+               CdlConflict_RequiresBody::make(transaction, this, gexpr);
+           }
+       }
     } catch(CdlEvalException e) {
-        // There should now be an EvalException conflict associated with this node,
-        // having a requires conflict as well serves no purpose
-        transaction->clear_conflicts(this, gexpr, &CdlConflict_RequiresBody::test);
+       // There should now be an EvalException conflict associated with this node,
+       // having a requires conflict as well serves no purpose
+       transaction->clear_conflicts(this, gexpr, &CdlConflict_RequiresBody::test);
     }
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -3063,10 +3063,10 @@ CdlValuableBody::update(CdlTransaction transaction, CdlUpdate update)
     CYG_PRECONDITION_CLASSC(transaction);
 
     if ((CdlUpdate_ValueChange == update) || (CdlUpdate_ActiveChange == update)) {
-        this->check_value(transaction);
-        this->check_requires(transaction);
+       this->check_value(transaction);
+       this->check_requires(transaction);
     }
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -3085,31 +3085,31 @@ CdlValuableBody::test_active(CdlTransaction transaction)
 
     bool result = true;
     if (!this->CdlNodeBody::test_active(transaction)) {
-        result = false;
+       result = false;
     }
 
     if (result) {
-        std::vector<CdlProperty> active_if_properties;
-        std::vector<CdlProperty>::const_iterator prop_i;
-        
-        this->get_properties(CdlPropertyId_ActiveIf, active_if_properties);
-        for (prop_i = active_if_properties.begin(); result && (prop_i != active_if_properties.end()); prop_i++) {
-            
-            CdlProperty_GoalExpression gexpr = dynamic_cast<CdlProperty_GoalExpression>(*prop_i);
-            CYG_ASSERT_CLASSC(gexpr);
-            CdlEvalContext context(transaction, this, gexpr);
-            try {
-                if (!gexpr->eval(context)) {
-                    result = false;
-                }
-            } catch(CdlEvalException e) {
-                // Hmmm, an active_if property cannot be evaluated.
-                // Tricky. If the node is inactive then its conflicts
-                // are ignored, which would be a bad thing. For now
-                // assume that the node is active, unless it was already
-                // inactive for other reasons.
-            }
-        }
+       std::vector<CdlProperty> active_if_properties;
+       std::vector<CdlProperty>::const_iterator prop_i;
+
+       this->get_properties(CdlPropertyId_ActiveIf, active_if_properties);
+       for (prop_i = active_if_properties.begin(); result && (prop_i != active_if_properties.end()); prop_i++) {
+
+           CdlProperty_GoalExpression gexpr = dynamic_cast<CdlProperty_GoalExpression>(*prop_i);
+           CYG_ASSERT_CLASSC(gexpr);
+           CdlEvalContext context(transaction, this, gexpr);
+           try {
+               if (!gexpr->eval(context)) {
+                   result = false;
+               }
+           } catch(CdlEvalException e) {
+               // Hmmm, an active_if property cannot be evaluated.
+               // Tricky. If the node is inactive then its conflicts
+               // are ignored, which would be a bad thing. For now
+               // assume that the node is active, unless it was already
+               // inactive for other reasons.
+           }
+       }
     }
 
     CYG_REPORT_RETVAL(result);
@@ -3117,7 +3117,7 @@ CdlValuableBody::test_active(CdlTransaction transaction)
 }
 
 //}}}
-//{{{  CdlValuable modify operations    
+//{{{  CdlValuable modify operations
 
 // ----------------------------------------------------------------------------
 // Start with the non-transaction versions. These allocate a new transaction,
@@ -3130,7 +3130,7 @@ CdlValuableBody::set_source(CdlValueSource source)
     CYG_REPORT_FUNCNAME("CdlValuable::set_source (no transaction)");
     CYG_REPORT_FUNCARG2XV(this, source);
     CYG_PRECONDITION_THISC();
-    
+
     CdlTransaction transaction = CdlTransactionBody::make(get_toplevel());
     this->set_source(transaction, source);
     transaction->body();
@@ -3160,7 +3160,7 @@ CdlValuableBody::set_enabled(bool val, CdlValueSource source)
     CYG_REPORT_FUNCNAME("CdlValuable::set_enabled (no transaction)");
     CYG_REPORT_FUNCARG3XV(this, val, source);
     CYG_PRECONDITION_THISC();
-    
+
     CdlTransaction transaction = CdlTransactionBody::make(get_toplevel());
     this->set_enabled(transaction, val, source);
     transaction->body();
@@ -3234,7 +3234,7 @@ CdlValuableBody::set_source(CdlTransaction transaction, CdlValueSource source)
     CYG_ASSERTC((source == CdlValueSource_Default) || !has_property(CdlPropertyId_Calculated));
     CYG_PRECONDITION_THISC();
     CYG_PRECONDITION_CLASSC(transaction);
-    
+
     const CdlValue& old_value = transaction->get_whole_value(this);
     CdlValue        new_value = old_value;
     new_value.set_source(source);
@@ -3250,12 +3250,12 @@ CdlValuableBody::invalidate_source(CdlTransaction transaction, CdlValueSource so
     CYG_REPORT_FUNCARG3XV(this, transaction, source);
     CYG_PRECONDITION_THISC();
     CYG_PRECONDITION_CLASSC(transaction);
-    
+
     const CdlValue& old_value = transaction->get_whole_value(this);
     CdlValue        new_value = old_value;
     new_value.invalidate_source(source);
     transaction->set_whole_value(this, old_value, new_value);
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -3272,7 +3272,7 @@ CdlValuableBody::set_enabled(CdlTransaction transaction, bool enabled_arg, CdlVa
     CdlValue        new_value = old_value;
     new_value.set_enabled(enabled_arg, source);
     transaction->set_whole_value(this, old_value, new_value);
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -3284,30 +3284,30 @@ CdlValuableBody::set_value(CdlTransaction transaction, CdlSimpleValue& val, CdlV
     CYG_ASSERTC((source == CdlValueSource_Default) || !has_property(CdlPropertyId_Calculated));
     CYG_PRECONDITION_THISC();
     CYG_PRECONDITION_CLASSC(transaction);
-    
+
     const CdlValue& old_value = transaction->get_whole_value(this);
     CdlValue        new_value = old_value;
     new_value.set_value(val, source);
     transaction->set_whole_value(this, old_value, new_value);
-    
+
     CYG_REPORT_RETURN();
 }
 
 void
 CdlValuableBody::set_enabled_and_value(CdlTransaction transaction, bool enabled_arg, CdlSimpleValue& val,
-                                       CdlValueSource source)
+                                      CdlValueSource source)
 {
     CYG_REPORT_FUNCNAME("CdlValuable::set_enabled");
     CYG_REPORT_FUNCARG3XV(this, transaction, source);
     CYG_ASSERTC((source == CdlValueSource_Default) || !has_property(CdlPropertyId_Calculated));
     CYG_PRECONDITION_THISC();
     CYG_PRECONDITION_CLASSC(transaction);
-    
+
     const CdlValue& old_value = transaction->get_whole_value(this);
     CdlValue        new_value = old_value;
     new_value.set_enabled_and_value(enabled_arg, val, source);
     transaction->set_whole_value(this, old_value, new_value);
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -3319,12 +3319,12 @@ CdlValuableBody::set(CdlTransaction transaction, CdlSimpleValue& val, CdlValueSo
     CYG_ASSERTC((source == CdlValueSource_Default) || !has_property(CdlPropertyId_Calculated));
     CYG_PRECONDITION_THISC();
     CYG_PRECONDITION_CLASSC(transaction);
-    
+
     const CdlValue& old_value = transaction->get_whole_value(this);
     CdlValue        new_value = old_value;
     new_value.set(val, source);
     transaction->set_whole_value(this, old_value, new_value);
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -3335,7 +3335,7 @@ CdlValuableBody::set(CdlTransaction transaction, const CdlValue& val)
     CYG_REPORT_FUNCARG2XV(this, transaction);
     CYG_PRECONDITION_THISC();
     CYG_PRECONDITION_CLASSC(transaction);
-    
+
     const CdlValue& old_value = transaction->get_whole_value(this);
     CdlValue        new_value = val;
     transaction->set_whole_value(this, old_value, new_value);
@@ -3344,7 +3344,7 @@ CdlValuableBody::set(CdlTransaction transaction, const CdlValue& val)
 }
 
 //}}}
-//{{{  CdlValuable basics               
+//{{{  CdlValuable basics
 
 // ----------------------------------------------------------------------------
 // The CdlValuable class implements the concept of CDL objects that take
@@ -3358,7 +3358,7 @@ CdlValuableBody::CdlValuableBody(CdlValueFlavor flavor)
 
     cdlvaluablebody_cookie = CdlValuableBody_Magic;
     CYGDBG_MEMLEAK_CONSTRUCTOR();
-    
+
     CYG_POSTCONDITION_THISC();
     CYG_REPORT_RETURN();
 }
@@ -3371,7 +3371,7 @@ CdlValuableBody::~CdlValuableBody()
 
     cdlvaluablebody_cookie = CdlValuableBody_Invalid;
     CYGDBG_MEMLEAK_DESTRUCTOR();
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -3391,20 +3391,20 @@ bool
 CdlValuableBody::check_this(cyg_assert_class_zeal zeal) const
 {
     if (CdlValuableBody_Magic != cdlvaluablebody_cookie) {
-        return false;
+       return false;
     }
     CYGDBG_MEMLEAK_CHECKTHIS();
 
     if (has_property(CdlPropertyId_Calculated) && (CdlValueSource_Default != value.get_source())) {
-        CYG_FAIL("Calculated valuables can only have a default value.");
-        return false;
+       CYG_FAIL("Calculated valuables can only have a default value.");
+       return false;
     }
-    
+
     return CdlNodeBody::check_this(zeal) && value.check_this(zeal);
 }
 
 //}}}
-//{{{  CdlValuable parsing support      
+//{{{  CdlValuable parsing support
 
 // ----------------------------------------------------------------------------
 // Parsing support. Adding the appropriate parsers is straightforward.
@@ -3416,37 +3416,37 @@ CdlValuableBody::add_property_parsers(std::vector<CdlInterpreterCommandEntry>& p
 
     static CdlInterpreterCommandEntry commands[] =
     {
-        CdlInterpreterCommandEntry("active_if",          &parse_active_if    ),
-        CdlInterpreterCommandEntry("calculated",         &parse_calculated   ),
-        CdlInterpreterCommandEntry("check_proc",         &parse_check_proc   ),
-        CdlInterpreterCommandEntry("default_value",      &parse_default_value),
-        CdlInterpreterCommandEntry("dialog",             &parse_dialog       ),
-        CdlInterpreterCommandEntry("entry_proc",         &parse_entry_proc   ),
-        CdlInterpreterCommandEntry("flavor",             &parse_flavor       ),
-        CdlInterpreterCommandEntry("group",              &parse_group        ),
-        CdlInterpreterCommandEntry("implements",         &parse_implements   ),
-        CdlInterpreterCommandEntry("legal_values",       &parse_legal_values ),
-        CdlInterpreterCommandEntry("requires",           &parse_requires     ),
-        CdlInterpreterCommandEntry("wizard",             &parse_wizard       ),
-        CdlInterpreterCommandEntry("",                   0                   )
+       CdlInterpreterCommandEntry("active_if",          &parse_active_if    ),
+       CdlInterpreterCommandEntry("calculated",         &parse_calculated   ),
+       CdlInterpreterCommandEntry("check_proc",         &parse_check_proc   ),
+       CdlInterpreterCommandEntry("default_value",      &parse_default_value),
+       CdlInterpreterCommandEntry("dialog",             &parse_dialog       ),
+       CdlInterpreterCommandEntry("entry_proc",         &parse_entry_proc   ),
+       CdlInterpreterCommandEntry("flavor",             &parse_flavor       ),
+       CdlInterpreterCommandEntry("group",              &parse_group        ),
+       CdlInterpreterCommandEntry("implements",         &parse_implements   ),
+       CdlInterpreterCommandEntry("legal_values",       &parse_legal_values ),
+       CdlInterpreterCommandEntry("requires",           &parse_requires     ),
+       CdlInterpreterCommandEntry("wizard",             &parse_wizard       ),
+       CdlInterpreterCommandEntry("",                   0                   )
     };
 
     for (int i = 0; commands[i].command != 0; i++) {
-        std::vector<CdlInterpreterCommandEntry>::const_iterator j;
-        for (j = parsers.begin(); j != parsers.end(); j++) {
-            if (commands[i].name == j->name) {
-                if (commands[i].command != j->command) {
-                    CYG_FAIL("Property names are being re-used");
-                }
-                break;
-            }
-        }
-        if (j == parsers.end()) {
-            parsers.push_back(commands[i]);
-        }
+       std::vector<CdlInterpreterCommandEntry>::const_iterator j;
+       for (j = parsers.begin(); j != parsers.end(); j++) {
+           if (commands[i].name == j->name) {
+               if (commands[i].command != j->command) {
+                   CYG_FAIL("Property names are being re-used");
+               }
+               break;
+           }
+       }
+       if (j == parsers.end()) {
+           parsers.push_back(commands[i]);
+       }
     }
     CdlNodeBody::add_property_parsers(parsers);
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -3466,49 +3466,49 @@ CdlValuableBody::check_properties(CdlInterpreter interp)
     //       This could prove useful if there are a sensible number
     //       of library check_proc's.
     if (count_properties(CdlPropertyId_Flavor) > 1) {
-        CdlParse::report_error(interp, "", "There should be at most one flavor property.");
+       CdlParse::report_error(interp, "", "There should be at most one flavor property.");
     }
     if (count_properties(CdlPropertyId_EntryProc) > 1) {
-        CdlParse::report_error(interp, "", "There should be at most one entry_proc property.");
+       CdlParse::report_error(interp, "", "There should be at most one entry_proc property.");
     }
     if (count_properties(CdlPropertyId_CheckProc) > 1) {
-        CdlParse::report_error(interp, "", "There should be at most one check_proc property.");
+       CdlParse::report_error(interp, "", "There should be at most one check_proc property.");
     }
     if (count_properties(CdlPropertyId_DefaultValue) > 1) {
-        CdlParse::report_error(interp, "", "There should be at most one default_value property.");
+       CdlParse::report_error(interp, "", "There should be at most one default_value property.");
     }
     if (count_properties(CdlPropertyId_LegalValues) > 1) {
-        CdlParse::report_error(interp, "", "There should be at most one legal_values property.");
+       CdlParse::report_error(interp, "", "There should be at most one legal_values property.");
     }
     if (count_properties(CdlPropertyId_Dialog) > 1) {
-        CdlParse::report_error(interp, "", "There should be at most one dialog property.");
+       CdlParse::report_error(interp, "", "There should be at most one dialog property.");
     }
     if (count_properties(CdlPropertyId_Wizard) > 1) {
-        CdlParse::report_error(interp, "", "There should be at most one wizard property.");
+       CdlParse::report_error(interp, "", "There should be at most one wizard property.");
     }
     if (count_properties(CdlPropertyId_Calculated) > 1) {
-        CdlParse::report_error(interp, "", "There should be at most one calculated property.");
+       CdlParse::report_error(interp, "", "There should be at most one calculated property.");
     }
 
     // If there is a flavor property, update the flavor in the base class
     if (has_property(CdlPropertyId_Flavor)) {
-        CdlProperty_String flavor_property = dynamic_cast<CdlProperty_String>(get_property(CdlPropertyId_Flavor));
-        CYG_ASSERTC(0 != flavor_property);
-        
-        std::string flavor_string = flavor_property->get_string();
-        CdlValueFlavor flavor;
-        // The property parsing code should have caught any problems already.
-        if (!Cdl::string_to_flavor(flavor_string, flavor)) {
-            CdlParse::report_error(interp, "", "Invalid flavor " + flavor_string);
-        } else {
-            value.set_flavor(flavor);
-        }
-
-        // If the flavor is "none" then the entity is not modifiable,
-        // and most of the properties do not make sense. However this
-        // is not enforced at parse-time: temporarily switching to
-        // flavor none may make sense during debugging.
-        // FIXME: no longer correct
+       CdlProperty_String flavor_property = dynamic_cast<CdlProperty_String>(get_property(CdlPropertyId_Flavor));
+       CYG_ASSERTC(0 != flavor_property);
+
+       std::string flavor_string = flavor_property->get_string();
+       CdlValueFlavor flavor;
+       // The property parsing code should have caught any problems already.
+       if (!Cdl::string_to_flavor(flavor_string, flavor)) {
+           CdlParse::report_error(interp, "", "Invalid flavor " + flavor_string);
+       } else {
+           value.set_flavor(flavor);
+       }
+
+       // If the flavor is "none" then the entity is not modifiable,
+       // and most of the properties do not make sense. However this
+       // is not enforced at parse-time: temporarily switching to
+       // flavor none may make sense during debugging.
+       // FIXME: no longer correct
     }
 
     // For boolean entities legal_values does not make much sense.
@@ -3519,14 +3519,14 @@ CdlValuableBody::check_properties(CdlInterpreter interp)
     // check_proc is allowed, this can be used to check programatically
     // that the current value is legal.
     if (CdlValueFlavor_Bool == get_flavor()) {
-        if (has_property(CdlPropertyId_LegalValues)) {
-            CdlParse::report_error(interp, "", "The \"legal_values\" property is not applicable to boolean entities."); 
-        }
+       if (has_property(CdlPropertyId_LegalValues)) {
+           CdlParse::report_error(interp, "", "The \"legal_values\" property is not applicable to boolean entities.");
+       }
     }
 
     // default_value and calculated are mutually exclusive
     if (has_property(CdlPropertyId_Calculated) && has_property(CdlPropertyId_DefaultValue)) {
-        CdlParse::report_error(interp, "", "The properties \"default_value\" and \"calculated\" cannot be used together.");
+       CdlParse::report_error(interp, "", "The properties \"default_value\" and \"calculated\" cannot be used together.");
     }
 
 #if 0
@@ -3535,20 +3535,20 @@ CdlValuableBody::check_properties(CdlInterpreter interp)
     // a text entry widget will be used and an entry_proc may well be
     // applicable.
     if (has_property(CdlPropertyId_Dialog) && has_property(CdlPropertyId_EntryProc)) {
-        CdlParse::report_error(interp, "", "The properties \"dialog\" and \"entry_proc\" cannot be used together.");
+       CdlParse::report_error(interp, "", "The properties \"dialog\" and \"entry_proc\" cannot be used together.");
     }
-#endif    
+#endif
 
     // All of the expressions may be invalid because of unresolved references,
-    // ditto for implements and for dialog. 
-    
+    // ditto for implements and for dialog.
+
     CdlNodeBody::check_properties(interp);
-    
+
     CYG_REPORT_RETURN();
 }
 
 //}}}
-//{{{  CdlValuable persistence support  
+//{{{  CdlValuable persistence support
 
 // ----------------------------------------------------------------------------
 void
@@ -3580,14 +3580,14 @@ CdlValuableBody::value_savefile_entry_needed() const
     bool result = false;
 
     if (this->is_modifiable()) {
-        if (this->has_source(CdlValueSource_User) ||
-            this->has_source(CdlValueSource_Wizard) ||
-            this->has_source(CdlValueSource_Inferred)) {
+       if (this->has_source(CdlValueSource_User) ||
+           this->has_source(CdlValueSource_Wizard) ||
+           this->has_source(CdlValueSource_Inferred)) {
 
-            result = true;
-        }
+           result = true;
+       }
     }
-    
+
     CYG_REPORT_RETVAL(result);
     return result;
 }
@@ -3604,21 +3604,21 @@ value_to_string(CdlValuable valuable, CdlValueSource source)
     CYG_REPORT_FUNCNAME("value_to_string");
 
     std::string data = "";
-    
+
     switch(valuable->get_flavor()) {
       case CdlValueFlavor_Bool :
-        data += (valuable->is_enabled(source) ? one : zero);
-        break;
+       data += (valuable->is_enabled(source) ? one : zero);
+       break;
       case CdlValueFlavor_BoolData :
-        data += (valuable->is_enabled(source) ? one : zero) + " " +
-            CdlInterpreterBody::quote(valuable->get_value(source));
-        break;
+       data += (valuable->is_enabled(source) ? one : zero) + " " +
+           CdlInterpreterBody::quote(valuable->get_value(source));
+       break;
       case CdlValueFlavor_Data:
-        data += CdlInterpreterBody::quote(valuable->get_value(source));
-        break;
+       data += CdlInterpreterBody::quote(valuable->get_value(source));
+       break;
       default:
-        CYG_FAIL("Invalid value flavor detected");
-        break;
+       CYG_FAIL("Invalid value flavor detected");
+       break;
     }
     return data;
 }
@@ -3632,13 +3632,13 @@ get_expected_source(CdlValuable valuable)
     CYG_REPORT_FUNCARG1XV(valuable);
 
     CdlValueSource expected_source = CdlValueSource_Default;
-        
+
     if (valuable->has_source(CdlValueSource_User)) {
-        expected_source = CdlValueSource_User;
+       expected_source = CdlValueSource_User;
     } else if (valuable->has_source(CdlValueSource_Wizard)) {
-        expected_source = CdlValueSource_Wizard;
+       expected_source = CdlValueSource_Wizard;
     } else if (valuable->has_source(CdlValueSource_Inferred)) {
-        expected_source = CdlValueSource_Inferred;
+       expected_source = CdlValueSource_Inferred;
     }
 
     CYG_REPORT_RETVAL((int) expected_source);
@@ -3668,25 +3668,25 @@ follow_expr_references(CdlProperty property, CdlExpression expr)
     std::string    data = "";
     CdlSimpleValue simple_value;
     std::vector<CdlReference>::const_iterator ref_i;
-    
+
     for (ref_i = expr->references.begin(); ref_i != expr->references.end(); ref_i++) {
-        const std::string& refname = ref_i->get_destination_name();
-        CdlNode refnode = ref_i->get_destination();
-        CdlValuable refvaluable = 0;
-        if (0 != refnode) {
-            refvaluable = dynamic_cast<CdlValuable>(refnode);
-        }
-        data += refname + " ";
-        if (0 == refvaluable) {
-            data += "(unknown) == 0";
-        } else {
-            CdlEvalContext context(0, refvaluable, property);
-            CdlSimpleValue::eval_valuable(context, refvaluable, simple_value);
-            data += "== " + CdlInterpreterBody::quote(simple_value.get_value());
-        }
-        data += '\n';
+       const std::string& refname = ref_i->get_destination_name();
+       CdlNode refnode = ref_i->get_destination();
+       CdlValuable refvaluable = 0;
+       if (0 != refnode) {
+           refvaluable = dynamic_cast<CdlValuable>(refnode);
+       }
+       data += refname + " ";
+       if (0 == refvaluable) {
+           data += "(unknown) == 0";
+       } else {
+           CdlEvalContext context(0, refvaluable, property);
+           CdlSimpleValue::eval_valuable(context, refvaluable, simple_value);
+           data += "== " + CdlInterpreterBody::quote(simple_value.get_value());
+       }
+       data += '\n';
     }
-    
+
     CYG_REPORT_RETURN();
     return data;
 }
@@ -3694,7 +3694,7 @@ follow_expr_references(CdlProperty property, CdlExpression expr)
 // ----------------------------------------------------------------------------
 
 void
-CdlValuableBody::save(CdlInterpreter interp, Tcl_Channel chan, int indentation, bool modifiable, bool minimal)
+CdlValuableBody::_save(CdlInterpreter interp, Tcl_Channel chan, int indentation, bool modifiable, bool minimal)
 {
     CYG_REPORT_FUNCNAME("CdlValuable::save");
     CYG_REPORT_FUNCARG5XV(this, interp, chan, indentation, minimal);
@@ -3714,274 +3714,271 @@ CdlValuableBody::save(CdlInterpreter interp, Tcl_Channel chan, int indentation,
     // but the alternative is an awful lot of "if (minimal)" tests
     // in the main code.
     if (minimal) {
-        
-        if (modifiable) {
-            if (this->has_source(CdlValueSource_User)) {
-                data += indent_string + "user_value " + value_to_string(this, CdlValueSource_User) + "\n";
-            }
-            if (this->has_source(CdlValueSource_Wizard)) {
-                data += indent_string + "wizard_value " + value_to_string(this, CdlValueSource_Wizard) + "\n";
-            }
-            if (this->has_source(CdlValueSource_Inferred)) {
-                data += indent_string + "inferred_value " + value_to_string(this, CdlValueSource_Inferred) + "\n";
-            }
-            CdlValueSource expected_source = get_expected_source(this);
-            if (expected_source != this->get_source()) {
-                std::string current_source_string;
-                if (!Cdl::source_to_string(this->get_source(), current_source_string)) {
-                    CYG_FAIL("Invalid current value source detected");
-                }
-                data += indent_string + "value_source " + current_source_string + "\n";
-            }
-        }
-        
+       if (modifiable) {
+           if (this->has_source(CdlValueSource_User)) {
+               data += indent_string + "user_value " + value_to_string(this, CdlValueSource_User) + "\n";
+           }
+           if (this->has_source(CdlValueSource_Wizard)) {
+               data += indent_string + "wizard_value " + value_to_string(this, CdlValueSource_Wizard) + "\n";
+           }
+           if (this->has_source(CdlValueSource_Inferred)) {
+               data += indent_string + "inferred_value " + value_to_string(this, CdlValueSource_Inferred) + "\n";
+           }
+           CdlValueSource expected_source = get_expected_source(this);
+           if (expected_source != this->get_source()) {
+               std::string current_source_string;
+               if (!Cdl::source_to_string(this->get_source(), current_source_string)) {
+                   CYG_FAIL("Invalid current value source detected");
+               }
+               data += indent_string + "value_source " + current_source_string + "\n";
+           }
+       }
     } else {
-    
-        // Right at the start, indicate whether or not this property is active.
-        if (!this->is_active()) {
-            data += indent_string + "# This option is not active\n";
-            // If the entity is inactive because the parent is inactive or disabled,
-            // say so here. This is in addition to any unsatisfied active_if
-            // conditions, which will be reported below.
-            CdlContainer parent = this->get_parent();
-            if (!parent->is_active()) {
-                data += indent_string + "# The parent " + parent->get_name() + " is not active\n";
-            }
-            CdlValuable tmp = dynamic_cast<CdlValuable>(parent);
-            if ((0 != tmp) && !tmp->is_enabled()) {
-                data += indent_string + "# The parent " + parent->get_name() + " is disabled\n";
-            }
-        }
-        if (this->has_active_if_conditions()) {
-            std::vector<CdlProperty_GoalExpression> active_if_conditions;
-            this->get_active_if_conditions(active_if_conditions);
-            std::vector<CdlProperty_GoalExpression>::const_iterator expr_i;
-            for (expr_i = active_if_conditions.begin(); expr_i != active_if_conditions.end(); expr_i++) {
-                data += indent_string + "# ActiveIf constraint: " +
-                    CdlInterpreterBody::extend_comment((*expr_i)->get_original_string(), indentation, 4) +
-                    '\n';
-
-                CdlExpression expr = (*expr_i)->get_expression();
-                data += CdlInterpreterBody::multiline_comment(follow_expr_references(*expr_i, expr), indentation, 4);
-                CdlEvalContext context(0, this, *expr_i);
-                bool active_if_value = false;
-                try {
-                    active_if_value = (*expr_i)->eval(context);
-                } catch(CdlEvalException e) {
-                    active_if_value = false;
-                } catch(std::bad_alloc) {
-                    throw;
-                }
-                data += indent_string + "#   --> " + (active_if_value ? one : zero) + "\n";
-            }
-        }
-        
-        // If there has been any information related to the active status,
-        // add a blank line before we start worrying about values.
-        if (0 < data.size()) {
-            data += '\n';
-        }
-
-        if (CdlValueFlavor_None == this->get_flavor()) {
-            data += indent_string + "# There is no associated value.\n";
-        } else if (this->has_property(CdlPropertyId_Calculated)) {
-            CdlProperty_Expression expr = this->get_calculated_expression();
-            data += indent_string + "# Calculated value: " +
-                CdlInterpreterBody::extend_comment(expr->get_original_string(), indentation, 4) + '\n';
-            data += CdlInterpreterBody::multiline_comment(follow_expr_references(expr, expr), indentation, 4);
-        } else if (!modifiable) {
-            data += indent_string + "# This value cannot be modified here.\n";
-        }
-         
-        // Output the flavor. This clutters up the savefile a bit.
-        // However it is necessary so that the user can distinguish
-        // between bool, booldata and data items
-        switch(this->get_flavor()) {
-          case CdlValueFlavor_Bool:
-            data += indent_string + "# Flavor: bool\n";
-            break;
-          case CdlValueFlavor_BoolData:
-            data += indent_string + "# Flavor: booldata\n";
-            break;
-          case CdlValueFlavor_Data:
-            data += indent_string + "# Flavor: data\n";
-            break;
-          default:
-            break;
-        }
-            
-        // If the value is not modifiable, just list the current value.
-        // This is not in a form that allows users to change it easily.
-        if (!modifiable) {
-            switch(this->get_flavor()) {
-              case CdlValueFlavor_None :
-                break;
-              case CdlValueFlavor_Bool :
-                data += indent_string + "# Current value: " + (this->is_enabled() ? one : zero) + '\n';
-                break;
-              case CdlValueFlavor_BoolData :
-                data += indent_string + "# Current value: " + (this->is_enabled() ? one : zero) + " " +
-                    CdlInterpreterBody::extend_comment(this->get_value(), indentation, 4) + '\n';
-                break;
-              case CdlValueFlavor_Data :
-                data += indent_string + "# Current_value: " +
-                    CdlInterpreterBody::extend_comment(this->get_value(), indentation, 4) + '\n';
-                break;
-              default:
-                break;
-            }
-        
-        } else if (CdlValueFlavor_None != this->get_flavor()) {
-
-            // If there is a user value, output it. Otherwise output
-            // a comment that allows users to edit the user value conveniently.
-            // It is assumed that the user will want a value similar to the
-            // default one, so that is provided as the starting point
-            if (this->has_source(CdlValueSource_User)) {
-                data += indent_string + "user_value " + value_to_string(this, CdlValueSource_User) + "\n";
-            } else {
-                data += indent_string + "# No user value, uncomment the following line to provide one.\n" +
-                    indent_string + "# user_value " +
-                    CdlInterpreterBody::extend_comment(value_to_string(this, CdlValueSource_Default), indentation, 0) + "\n";
-            }
-        
-            // Output a wizard value iff there is one. There is little point
-            // in letting users edit a wizard value, they should be running
-            // the wizard itself.
-            if (this->has_source(CdlValueSource_Wizard)) {
-                data += indent_string + "# The wizard value should not be edited directly.\n" +
-                    indent_string + "# Instead the wizard should be run again if necessary.\n";
-                data += indent_string + "wizard_value " + value_to_string(this, CdlValueSource_Wizard) + "\n";
-            }
-
-            // List the inferred value. This needs to be a command,
-            if (this->has_source(CdlValueSource_Inferred)) {
-                data += indent_string + "# The inferred value should not be edited directly.\n";
-                data += indent_string + "inferred_value " + value_to_string(this, CdlValueSource_Inferred) + "\n";
-            }
-        
-            // Output the value source iff it is unusual. If the current
-            // source is the highest priority one then there is no point
-            // in outputting a command, but a comment is usual. The value
-            // source needs to come after wizard and inferred values
-            std::string    current_source_string;
-            CdlValueSource expected_source = get_expected_source(this);
-            CdlValueSource current_source  = this->get_source();
-            if (!Cdl::source_to_string(current_source, current_source_string)) {
-                CYG_FAIL("Invalid current value source detected");
-            }
-            if (this->get_source() == expected_source) {
-                data += indent_string + "# value_source " + current_source_string + "\n";
-            } else {
-                data += indent_string + "value_source " + current_source_string + "\n";
-            }
-
-            // Always output the default value as a comment.
-            data += indent_string + "# Default value: ";
-            
-            // If there is no default_value expression or if the expression involves
-            // only constants, just output the current default value. Otherwise
-            // output both the expression and the value
-            CdlProperty prop = this->get_property(CdlPropertyId_DefaultValue);
-            CdlProperty_Expression expr = dynamic_cast<CdlProperty_Expression>(prop);
-            if ((0 == expr) || (0 == expr->references.size())) {
-                // There is no default_value expression, so just output the current value
-                data += CdlInterpreterBody::extend_comment(value_to_string(this, CdlValueSource_Default), indentation, 4)
-                    + "\n";
-            } else {
-                data += CdlInterpreterBody::extend_comment(expr->get_original_string(), indentation, 4) + "\n";
-                data += CdlInterpreterBody::multiline_comment(follow_expr_references(expr, expr), indentation, 4);
-                data += indent_string + "#   --> " +
-                    CdlInterpreterBody::extend_comment(value_to_string(this, CdlValueSource_Default), indentation, 4) + "\n";
-            }
-        }
-
-        // If there is a legal_values property, add the details.
-        if (this->has_property(CdlPropertyId_LegalValues)) {
-            CdlProperty_ListExpression lexpr = this->get_legal_values();
-            data += indent_string + "# Legal values: " +
-                CdlInterpreterBody::extend_comment(lexpr->get_original_string(), indentation, 4) + '\n';
-        
-            std::vector<CdlExpression>::const_iterator expr_i;
-            std::vector<std::pair<CdlExpression,CdlExpression> >::const_iterator ranges_i;
-            for (expr_i = lexpr->data.begin(); expr_i != lexpr->data.end(); expr_i++) {
-                data += CdlInterpreterBody::multiline_comment(follow_expr_references(lexpr, *expr_i), indentation, 4);
-            }
-            for (ranges_i = lexpr->ranges.begin(); ranges_i != lexpr->ranges.end(); ranges_i++) {
-                data += CdlInterpreterBody::multiline_comment(follow_expr_references(lexpr, ranges_i->first), indentation, 4);
-                data += CdlInterpreterBody::multiline_comment(follow_expr_references(lexpr, ranges_i->second), indentation, 4);
-            }
-        }
-    
-        // If there is a check_proc property, mention this.
-        if (this->has_property(CdlPropertyId_CheckProc)) {
-            data += indent_string + "# There is a check_proc routine that will check the value.\n";
-        }
-
-        // Output all requires properties
-        if (this->has_property(CdlPropertyId_Requires)) {
-            std::vector<CdlProperty_GoalExpression> requires_goals;
-            this->get_requires_goals(requires_goals);
-            std::vector<CdlProperty_GoalExpression>::const_iterator expr_i;
-            for (expr_i = requires_goals.begin(); expr_i != requires_goals.end(); expr_i++) {
-                data += indent_string + "# Requires: " +
-                    CdlInterpreterBody::extend_comment((*expr_i)->get_original_string(), indentation, 4) + "\n";
-
-                CdlExpression expr = (*expr_i)->get_expression();
-                data += CdlInterpreterBody::multiline_comment(follow_expr_references(*expr_i, expr), indentation, 4);
-                CdlEvalContext context(0, this, *expr_i);
-                bool active_if_value = false;
-                try {
-                    active_if_value = (*expr_i)->eval(context);
-                } catch(CdlEvalException e) {
-                    active_if_value = false;
-                } catch(std::bad_alloc) {
-                    throw;
-                }
-                data += indent_string + "#   --> " + (active_if_value ? one : zero) + "\n";
-            }
-        }
-
-        // Output all dependencies that other entities may have on this one.
-        const std::vector<CdlReferrer>& referrers = this->get_referrers();
-        if (0 != referrers.size()) {
-            data += '\n' + indent_string + "# The following properties are affected by this value\n";
-            std::vector<CdlReferrer>::const_iterator ref_i;
-            for (ref_i = referrers.begin(); ref_i != referrers.end(); ref_i++) {
-            
-                CdlNode source = ref_i->get_source();
-                CdlProperty source_prop = ref_i->get_source_property();
-                std::string prop_id = source_prop->get_property_name();
-            
-                if ((prop_id == CdlPropertyId_ActiveIf)     ||
-                    (prop_id == CdlPropertyId_Calculated)   ||
-                    (prop_id == CdlPropertyId_DefaultValue) ||
-                    (prop_id == CdlPropertyId_LegalValues)  ||
-                    (prop_id == CdlPropertyId_Requires)) {
-                
-                    data += indent_string + "# " + source->get_class_name() + " " + source->get_name() + "\n";
-                    data += indent_string + "#     " + prop_id + ": ";
-                    if ((prop_id == CdlPropertyId_Calculated) || (prop_id == CdlPropertyId_DefaultValue)) {
-                        CdlProperty_Expression expr = dynamic_cast<CdlProperty_Expression>(source_prop);
-                        CYG_ASSERT_CLASSC(expr);
-                        data += CdlInterpreterBody::extend_comment(expr->get_original_string(), indentation, 4);
-                    } else if (prop_id == CdlPropertyId_LegalValues) {
-                        CdlProperty_ListExpression lexpr = dynamic_cast<CdlProperty_ListExpression>(source_prop);
-                        CYG_ASSERT_CLASSC(lexpr);
-                        data += CdlInterpreterBody::extend_comment(lexpr->get_original_string(), indentation, 4);
-                    } else if ((prop_id == CdlPropertyId_ActiveIf) || (prop_id == CdlPropertyId_Requires)) {
-                        CdlProperty_GoalExpression gexpr = dynamic_cast<CdlProperty_GoalExpression>(source_prop);
-                        CYG_ASSERT_CLASSC(gexpr);
-                        data += CdlInterpreterBody::extend_comment(gexpr->get_original_string(), indentation, 4);
-                    }
-                    data += '\n';
-                }
-            }
-        }
+       // Right at the start, indicate whether or not this property is active.
+       if (!this->is_active()) {
+           data += indent_string + "# This option is not active\n";
+           // If the entity is inactive because the parent is inactive or disabled,
+           // say so here. This is in addition to any unsatisfied active_if
+           // conditions, which will be reported below.
+           CdlContainer parent = this->get_parent();
+           if (!parent->is_active()) {
+               data += indent_string + "# The parent " + parent->get_name() + " is not active\n";
+           }
+           CdlValuable tmp = dynamic_cast<CdlValuable>(parent);
+           if ((0 != tmp) && !tmp->is_enabled()) {
+               data += indent_string + "# The parent " + parent->get_name() + " is disabled\n";
+           }
+       }
+       if (this->has_active_if_conditions()) {
+           std::vector<CdlProperty_GoalExpression> active_if_conditions;
+           this->get_active_if_conditions(active_if_conditions);
+           std::vector<CdlProperty_GoalExpression>::const_iterator expr_i;
+           for (expr_i = active_if_conditions.begin(); expr_i != active_if_conditions.end(); expr_i++) {
+               data += indent_string + "# ActiveIf constraint: " +
+                   CdlInterpreterBody::extend_comment((*expr_i)->get_original_string(), indentation, 4) +
+                   '\n';
+
+               CdlExpression expr = (*expr_i)->get_expression();
+               data += CdlInterpreterBody::multiline_comment(follow_expr_references(*expr_i, expr), indentation, 4);
+               CdlEvalContext context(0, this, *expr_i);
+               bool active_if_value = false;
+               try {
+                   active_if_value = (*expr_i)->eval(context);
+               } catch(CdlEvalException e) {
+                   active_if_value = false;
+               } catch(std::bad_alloc) {
+                   throw;
+               }
+               data += indent_string + "#   --> " + (active_if_value ? one : zero) + "\n";
+           }
+       }
+
+       // If there has been any information related to the active status,
+       // add a blank line before we start worrying about values.
+       if (0 < data.size()) {
+           data += '\n';
+       }
+
+       if (CdlValueFlavor_None == this->get_flavor()) {
+           data += indent_string + "# There is no associated value.\n";
+       } else if (this->has_property(CdlPropertyId_Calculated)) {
+           CdlProperty_Expression expr = this->get_calculated_expression();
+           data += indent_string + "# Calculated value: " +
+               CdlInterpreterBody::extend_comment(expr->get_original_string(), indentation, 4) + '\n';
+           data += CdlInterpreterBody::multiline_comment(follow_expr_references(expr, expr), indentation, 4);
+       } else if (!modifiable) {
+           data += indent_string + "# This value cannot be modified here.\n";
+       }
+
+       // Output the flavor. This clutters up the savefile a bit.
+       // However it is necessary so that the user can distinguish
+       // between bool, booldata and data items
+       switch(this->get_flavor()) {
+       case CdlValueFlavor_Bool:
+           data += indent_string + "# Flavor: bool\n";
+           break;
+       case CdlValueFlavor_BoolData:
+           data += indent_string + "# Flavor: booldata\n";
+           break;
+       case CdlValueFlavor_Data:
+           data += indent_string + "# Flavor: data\n";
+           break;
+       default:
+           break;
+       }
+
+       // If the value is not modifiable, just list the current value.
+       // This is not in a form that allows users to change it easily.
+       if (!modifiable) {
+           switch(this->get_flavor()) {
+             case CdlValueFlavor_None :
+               break;
+             case CdlValueFlavor_Bool :
+               data += indent_string + "# Current value: " + (this->is_enabled() ? one : zero) + '\n';
+               break;
+             case CdlValueFlavor_BoolData :
+               data += indent_string + "# Current value: " + (this->is_enabled() ? one : zero) + " " +
+                   CdlInterpreterBody::extend_comment(this->get_value(), indentation, 4) + '\n';
+               break;
+             case CdlValueFlavor_Data :
+               data += indent_string + "# Current_value: " +
+                   CdlInterpreterBody::extend_comment(this->get_value(), indentation, 4) + '\n';
+               break;
+             default:
+               break;
+           }
+
+       } else if (CdlValueFlavor_None != this->get_flavor()) {
+
+           // If there is a user value, output it. Otherwise output
+           // a comment that allows users to edit the user value conveniently.
+           // It is assumed that the user will want a value similar to the
+           // default one, so that is provided as the starting point
+           if (this->has_source(CdlValueSource_User)) {
+               data += indent_string + "user_value " + value_to_string(this, CdlValueSource_User) + "\n";
+           } else {
+               data += indent_string + "# No user value, uncomment the following line to provide one.\n" +
+                   indent_string + "# user_value " +
+                   CdlInterpreterBody::extend_comment(value_to_string(this, CdlValueSource_Default), indentation, 0) + "\n";
+           }
+
+           // Output a wizard value iff there is one. There is little point
+           // in letting users edit a wizard value, they should be running
+           // the wizard itself.
+           if (this->has_source(CdlValueSource_Wizard)) {
+               data += indent_string + "# The wizard value should not be edited directly.\n" +
+                   indent_string + "# Instead the wizard should be run again if necessary.\n";
+               data += indent_string + "wizard_value " + value_to_string(this, CdlValueSource_Wizard) + "\n";
+           }
+
+           // List the inferred value. This needs to be a command,
+           if (this->has_source(CdlValueSource_Inferred)) {
+               data += indent_string + "# The inferred value should not be edited directly.\n";
+               data += indent_string + "inferred_value " + value_to_string(this, CdlValueSource_Inferred) + "\n";
+           }
+
+           // Output the value source iff it is unusual. If the current
+           // source is the highest priority one then there is no point
+           // in outputting a command, but a comment is usual. The value
+           // source needs to come after wizard and inferred values
+           std::string    current_source_string;
+           CdlValueSource expected_source = get_expected_source(this);
+           CdlValueSource current_source  = this->get_source();
+           if (!Cdl::source_to_string(current_source, current_source_string)) {
+               CYG_FAIL("Invalid current value source detected");
+           }
+           if (this->get_source() == expected_source) {
+               data += indent_string + "# value_source " + current_source_string + "\n";
+           } else {
+               data += indent_string + "value_source " + current_source_string + "\n";
+           }
+
+           // Always output the default value as a comment.
+           data += indent_string + "# Default value: ";
+
+           // If there is no default_value expression or if the expression involves
+           // only constants, just output the current default value. Otherwise
+           // output both the expression and the value
+           CdlProperty prop = this->get_property(CdlPropertyId_DefaultValue);
+           CdlProperty_Expression expr = dynamic_cast<CdlProperty_Expression>(prop);
+           if ((0 == expr) || (0 == expr->references.size())) {
+               // There is no default_value expression, so just output the current value
+               data += CdlInterpreterBody::extend_comment(value_to_string(this, CdlValueSource_Default), indentation, 4)
+                   + "\n";
+           } else {
+               data += CdlInterpreterBody::extend_comment(expr->get_original_string(), indentation, 4) + "\n";
+               data += CdlInterpreterBody::multiline_comment(follow_expr_references(expr, expr), indentation, 4);
+               data += indent_string + "#   --> " +
+                   CdlInterpreterBody::extend_comment(value_to_string(this, CdlValueSource_Default), indentation, 4) + "\n";
+           }
+       }
+
+       // If there is a legal_values property, add the details.
+       if (this->has_property(CdlPropertyId_LegalValues)) {
+           CdlProperty_ListExpression lexpr = this->get_legal_values();
+           data += indent_string + "# Legal values: " +
+               CdlInterpreterBody::extend_comment(lexpr->get_original_string(), indentation, 4) + '\n';
+
+           std::vector<CdlExpression>::const_iterator expr_i;
+           std::vector<std::pair<CdlExpression,CdlExpression> >::const_iterator ranges_i;
+           for (expr_i = lexpr->data.begin(); expr_i != lexpr->data.end(); expr_i++) {
+               data += CdlInterpreterBody::multiline_comment(follow_expr_references(lexpr, *expr_i), indentation, 4);
+           }
+           for (ranges_i = lexpr->ranges.begin(); ranges_i != lexpr->ranges.end(); ranges_i++) {
+               data += CdlInterpreterBody::multiline_comment(follow_expr_references(lexpr, ranges_i->first), indentation, 4);
+               data += CdlInterpreterBody::multiline_comment(follow_expr_references(lexpr, ranges_i->second), indentation, 4);
+           }
+       }
+
+       // If there is a check_proc property, mention this.
+       if (this->has_property(CdlPropertyId_CheckProc)) {
+           data += indent_string + "# There is a check_proc routine that will check the value.\n";
+       }
+
+       // Output all requires properties
+       if (this->has_property(CdlPropertyId_Requires)) {
+           std::vector<CdlProperty_GoalExpression> requires_goals;
+           this->get_requires_goals(requires_goals);
+           std::vector<CdlProperty_GoalExpression>::const_iterator expr_i;
+           for (expr_i = requires_goals.begin(); expr_i != requires_goals.end(); expr_i++) {
+               data += indent_string + "# Requires: " +
+                   CdlInterpreterBody::extend_comment((*expr_i)->get_original_string(), indentation, 4) + "\n";
+
+               CdlExpression expr = (*expr_i)->get_expression();
+               data += CdlInterpreterBody::multiline_comment(follow_expr_references(*expr_i, expr), indentation, 4);
+               CdlEvalContext context(0, this, *expr_i);
+               bool active_if_value = false;
+               try {
+                   active_if_value = (*expr_i)->eval(context);
+               } catch(CdlEvalException e) {
+                   active_if_value = false;
+               } catch(std::bad_alloc) {
+                   throw;
+               }
+               data += indent_string + "#   --> " + (active_if_value ? one : zero) + "\n";
+           }
+       }
+
+       // Output all dependencies that other entities may have on this one.
+       const std::vector<CdlReferrer>& referrers = this->get_referrers();
+       if (0 != referrers.size()) {
+           data += '\n' + indent_string + "# The following properties are affected by this value\n";
+           std::vector<CdlReferrer>::const_iterator ref_i;
+           for (ref_i = referrers.begin(); ref_i != referrers.end(); ref_i++) {
+
+               CdlNode source = ref_i->get_source();
+               CdlProperty source_prop = ref_i->get_source_property();
+               std::string prop_id = source_prop->get_property_name();
+
+               if ((prop_id == CdlPropertyId_ActiveIf)     ||
+                   (prop_id == CdlPropertyId_Calculated)   ||
+                   (prop_id == CdlPropertyId_DefaultValue) ||
+                   (prop_id == CdlPropertyId_LegalValues)  ||
+                   (prop_id == CdlPropertyId_Requires)) {
+
+                   data += indent_string + "# " + source->get_class_name() + " " + source->get_name() + "\n";
+                   data += indent_string + "#     " + prop_id + ": ";
+                   if ((prop_id == CdlPropertyId_Calculated) || (prop_id == CdlPropertyId_DefaultValue)) {
+                       CdlProperty_Expression expr = dynamic_cast<CdlProperty_Expression>(source_prop);
+                       CYG_ASSERT_CLASSC(expr);
+                       data += CdlInterpreterBody::extend_comment(expr->get_original_string(), indentation, 4);
+                   } else if (prop_id == CdlPropertyId_LegalValues) {
+                       CdlProperty_ListExpression lexpr = dynamic_cast<CdlProperty_ListExpression>(source_prop);
+                       CYG_ASSERT_CLASSC(lexpr);
+                       data += CdlInterpreterBody::extend_comment(lexpr->get_original_string(), indentation, 4);
+                   } else if ((prop_id == CdlPropertyId_ActiveIf) || (prop_id == CdlPropertyId_Requires)) {
+                       CdlProperty_GoalExpression gexpr = dynamic_cast<CdlProperty_GoalExpression>(source_prop);
+                       CYG_ASSERT_CLASSC(gexpr);
+                       data += CdlInterpreterBody::extend_comment(gexpr->get_original_string(), indentation, 4);
+                   }
+                   data += '\n';
+               }
+           }
+       }
     }
 
     interp->write_data(chan, data);
-    
+
     CYG_REPORT_RETURN();
 }
 
@@ -3999,18 +3996,18 @@ CdlValuableBody::savefile_value_source_command(CdlInterpreter interp, int argc,
 
     CdlValueSource source = CdlValueSource_Invalid;
     if ((2 != argc) || !Cdl::string_to_source(argv[1], source) || !valuable->has_source(transaction, source)) {
-        std::string msg = "Invalid value_source command for ";
-        msg += valuable->get_class_name() + " " + valuable->get_name() + "\n";
-        if (CdlValueSource_Invalid == source) {
-            msg += "Expecting one argument, which should \"user\", \"wizard\", \"inferred\" or \"default\"";
-        } else {
-            msg += "The specified value source is not valid.";
-        }
-        CdlParse::report_error(interp, "", msg);
+       std::string msg = "Invalid value_source command for ";
+       msg += valuable->get_class_name() + " " + valuable->get_name() + "\n";
+       if (CdlValueSource_Invalid == source) {
+           msg += "Expecting one argument, which should \"user\", \"wizard\", \"inferred\" or \"default\"";
+       } else {
+           msg += "The specified value source is not valid.";
+       }
+       CdlParse::report_error(interp, "", msg);
     } else {
-        valuable->set_source(transaction, source);
+       valuable->set_source(transaction, source);
     }
-    
+
     return TCL_OK;
 }
 
@@ -4030,55 +4027,55 @@ CdlValuableBody::savefile_xxx_value_command(CdlInterpreter interp, int argc, con
     bool warn  = false;
     std::string msg = "";
     if (CdlValueFlavor_None == valuable->get_flavor()) {
-        msg = "Options with flavor \"none\" cannot be modified.";
-        error = true;
+       msg = "Options with flavor \"none\" cannot be modified.";
+       error = true;
     } else if (!valuable->is_modifiable()) {
-        msg = "This option is not user-modifiable.";
-        error = true;
+       msg = "This option is not user-modifiable.";
+       error = true;
     } else {
-        switch(valuable->get_flavor()) {
-          case CdlValueFlavor_Bool :
-              if (2 != argc) {
-                  msg = "Invalid boolean value, expecting 0 or 1";
-                  error = true;
-              } else {
-                  bool x;
-                  Cdl::string_to_bool(argv[1], x);
-                  valuable->set_enabled(transact, x, source);
-              }
-              break;
-          case CdlValueFlavor_Data :
-              if (2 != argc) {
-                  msg = "Invalid data value, expecting a single string";
-                  error = true;
-              } else {
-                  valuable->set_value(transact, argv[1], source);
-              }
-              break;
-          case CdlValueFlavor_BoolData:
-              if (3 != argc) {
-                  msg = "Invalid booldata value, expecting a boolean followed by a string";
-                  error = true;
-              } else {
-                  bool x;
-                  Cdl::string_to_bool(argv[1], x);
-                  valuable->set_enabled_and_value(transact, x, argv[2], source);
-              }
-              break;
-          default:
-            CYG_FAIL("Invalid value flavor detected");
-            break;
-        }
+       switch(valuable->get_flavor()) {
+         case CdlValueFlavor_Bool :
+             if (2 != argc) {
+                 msg = "Invalid boolean value, expecting 0 or 1";
+                 error = true;
+             } else {
+                 bool x;
+                 Cdl::string_to_bool(argv[1], x);
+                 valuable->set_enabled(transact, x, source);
+             }
+             break;
+         case CdlValueFlavor_Data :
+             if (2 != argc) {
+                 msg = "Invalid data value, expecting a single string";
+                 error = true;
+             } else {
+                 valuable->set_value(transact, argv[1], source);
+             }
+             break;
+         case CdlValueFlavor_BoolData:
+             if (3 != argc) {
+                 msg = "Invalid booldata value, expecting a boolean followed by a string";
+                 error = true;
+             } else {
+                 bool x;
+                 Cdl::string_to_bool(argv[1], x);
+                 valuable->set_enabled_and_value(transact, x, argv[2], source);
+             }
+             break;
+         default:
+           CYG_FAIL("Invalid value flavor detected");
+           break;
+       }
     }
 
     if (error || warn) {
-        msg = std::string("Invalid value command for ") + valuable->get_class_name() + " " + valuable->get_name() + "\n"
-            + msg;
-        if (error) {
-            CdlParse::report_error(interp, "", msg);
-        } else {
-            CdlParse::report_warning(interp, "", msg);
-        }
+       msg = std::string("Invalid value command for ") + valuable->get_class_name() + " " + valuable->get_name() + "\n"
+           + msg;
+       if (error) {
+           CdlParse::report_error(interp, "", msg);
+       } else {
+           CdlParse::report_warning(interp, "", msg);
+       }
     }
 
     return TCL_OK;