stage3/datatype_functions.cc
changeset 475 28816126cf8d
parent 474 85cacf5298fb
child 478 b13feab3b918
equal deleted inserted replaced
474:85cacf5298fb 475:28816126cf8d
    45 
    45 
    46 
    46 
    47 
    47 
    48 
    48 
    49 
    49 
       
    50 /* Macro that expand to subtypes */
       
    51 /* copied from matiec/lib/create_standard_functions_txt.sh */
       
    52 #define __ANY(DO)                 __ANY_DERIVED(DO) __ANY_ELEMENTARY(DO)
       
    53 #define __ANY_DERIVED(DO)
       
    54 #define __ANY_ELEMENTARY(DO)      __ANY_MAGNITUDE(DO) __ANY_BIT(DO) __ANY_STRING(DO) __ANY_DATE(DO)
       
    55 #define __ANY_MAGNITUDE(DO)       __ANY_NUM(DO) DO(TIME)
       
    56 #define __ANY_BIT(DO)             __ANY_NBIT(DO) DO(BOOL)
       
    57 #define __ANY_NBIT(DO)            DO(byte) DO(word) DO(dword) DO(lword)
       
    58 //#define __ANY_STRING(DO)          DO(string) DO(wstring)
       
    59 #define __ANY_STRING(DO)          DO(string)
       
    60 #define __ANY_DATE(DO)            DO(date) DO(tod) DO(dt)
       
    61 #define __ANY_NUM(DO)             __ANY_REAL(DO) __ANY_INT(DO)
       
    62 #define __ANY_REAL(DO)            DO(real) DO(lreal)
       
    63 #define __ANY_INT(DO)             __ANY_SINT(DO) __ANY_UINT(DO)
       
    64 #define __ANY_SINT(DO)            DO(sint) DO(int) DO(dint) DO(lint)
       
    65 #define __ANY_UINT(DO)            DO(usint) DO(uint) DO(udint) DO(ulint)
       
    66 
       
    67 #define __ANY_1(DO,P1)            __ANY_DERIVED_1(DO,P1) __ANY_ELEMENTARY_1(DO,P1)
       
    68 #define __ANY_DERIVED_1(DO,P1)
       
    69 #define __ANY_ELEMENTARY_1(DO,P1) __ANY_MAGNITUDE_1(DO,P1) __ANY_BIT_1(DO,P1) __ANY_STRING_1(DO,P1) __ANY_DATE_1(DO,P1)
       
    70 #define __ANY_MAGNITUDE_1(DO,P1)  __ANY_NUM_1(DO,P1) DO(TIME,P1)
       
    71 #define __ANY_BIT_1(DO,P1)        __ANY_NBIT_1(DO,P1) DO(BOOL,P1)
       
    72 #define __ANY_NBIT_1(DO,P1)       DO(byte,P1) DO(word,P1) DO(dword,P1) DO(lword,P1)
       
    73 // #define __ANY_STRING_1(DO,P1)     DO(string,P1) DO(wstring,P1)
       
    74 #define __ANY_STRING_1(DO,P1)     DO(string,P1)
       
    75 #define __ANY_DATE_1(DO,P1)       DO(date,P1) DO(tod,P1) DO(dt,P1)
       
    76 #define __ANY_NUM_1(DO,P1)        __ANY_REAL_1(DO,P1) __ANY_INT_1(DO,P1)
       
    77 #define __ANY_REAL_1(DO,P1)       DO(real,P1) DO(lreal,P1)
       
    78 #define __ANY_INT_1(DO,P1)        __ANY_SINT_1(DO,P1) __ANY_UINT_1(DO,P1)
       
    79 #define __ANY_SINT_1(DO,P1)       DO(sint,P1) DO(int,P1) DO(dint,P1) DO(lint,P1)
       
    80 #define __ANY_UINT_1(DO,P1)       DO(usint,P1) DO(uint,P1) DO(udint,P1) DO(ulint,P1)
       
    81 
       
    82 
       
    83 
       
    84 
    50 /*
    85 /*
    51  * 2.5.1.5.6 Functions of time data types
    86  * 2.5.1.5.6 Functions of time data types
    52  * Table 30 - page 64
    87  * Table 30 - page 64
    53  */
    88  */
    54 
    89 
    62     { &search_constant_type_c::time_type_name,          &search_constant_type_c::dt_type_name,              &search_constant_type_c::dt_type_name, widen_entry::deprecated },         
    97     { &search_constant_type_c::time_type_name,          &search_constant_type_c::dt_type_name,              &search_constant_type_c::dt_type_name, widen_entry::deprecated },         
    63 
    98 
    64     /*******************************/
    99     /*******************************/
    65     /* SAFE version on the left... */
   100     /* SAFE version on the left... */
    66     /*******************************/
   101     /*******************************/
    67     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name, widen_entry::ok         },
   102     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,     widen_entry::ok         },
    68     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name, widen_entry::deprecated },
   103     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
    69     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   104     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
    70     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::tod_type_name,             &search_constant_type_c::tod_type_name, widen_entry::deprecated },
   105     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::tod_type_name,             &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
    71     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name, widen_entry::deprecated },         
   106     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,       widen_entry::deprecated },         
    72     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   107     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
    73     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::dt_type_name,              &search_constant_type_c::dt_type_name, widen_entry::deprecated },         
   108     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::dt_type_name,              &search_constant_type_c::dt_type_name,       widen_entry::deprecated },         
    74 
   109 
    75     /********************************/
   110     /********************************/
    76     /* SAFE version on the right... */
   111     /* SAFE version on the right... */
    77     /********************************/
   112     /********************************/
    78     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetime_type_name,        &search_constant_type_c::time_type_name, widen_entry::ok         },
   113     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetime_type_name,        &search_constant_type_c::time_type_name,     widen_entry::ok         },
    79     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetime_type_name,        &search_constant_type_c::tod_type_name, widen_entry::deprecated },
   114     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetime_type_name,        &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
    80     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   115     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
    81     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetod_type_name,         &search_constant_type_c::tod_type_name, widen_entry::deprecated },
   116     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetod_type_name,         &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
    82     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safetime_type_name,        &search_constant_type_c::dt_type_name, widen_entry::deprecated },         
   117     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safetime_type_name,        &search_constant_type_c::dt_type_name,       widen_entry::deprecated },         
    83     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   118     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
    84     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safedt_type_name,          &search_constant_type_c::dt_type_name, widen_entry::deprecated },         
   119     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safedt_type_name,          &search_constant_type_c::dt_type_name,       widen_entry::deprecated },         
    85 
   120 
    86     /*************************************/
   121     /*************************************/
    87     /* SAFE version on left and right... */
   122     /* SAFE version on left and right... */
    88     /*************************************/
   123     /*************************************/
    89     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetime_type_name, widen_entry::ok         },
   124     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetime_type_name, widen_entry::ok         },
    90     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetod_type_name, widen_entry::deprecated },
   125     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetod_type_name,  widen_entry::deprecated },
    91     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   126     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
    92     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetod_type_name,         &search_constant_type_c::safetod_type_name, widen_entry::deprecated },
   127     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetod_type_name,         &search_constant_type_c::safetod_type_name,  widen_entry::deprecated },
    93     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safedt_type_name, widen_entry::deprecated },         
   128     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safedt_type_name,   widen_entry::deprecated },         
    94     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   129     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
    95     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safedt_type_name,          &search_constant_type_c::safedt_type_name, widen_entry::deprecated },
   130     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safedt_type_name,          &search_constant_type_c::safedt_type_name,   widen_entry::deprecated },
    96    
   131    
    97     { NULL, NULL, NULL, widen_entry::ok },
   132     { NULL, NULL, NULL, widen_entry::ok },
    98 };
   133 };
    99 
   134 
   100 
   135 
   101 
   136 
   102 
   137 
       
   138 
       
   139 
       
   140 
   103 const struct widen_entry widen_SUB_table[] = {
   141 const struct widen_entry widen_SUB_table[] = {
   104     { &search_constant_type_c::time_type_name,          &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name, widen_entry::ok         },
   142     { &search_constant_type_c::time_type_name,          &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,     widen_entry::ok         },
   105     { &search_constant_type_c::date_type_name,          &search_constant_type_c::date_type_name,            &search_constant_type_c::time_type_name, widen_entry::deprecated },
   143     { &search_constant_type_c::date_type_name,          &search_constant_type_c::date_type_name,            &search_constant_type_c::time_type_name,     widen_entry::deprecated },
   106     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name, widen_entry::deprecated },
   144     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
   107     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::tod_type_name,             &search_constant_type_c::time_type_name, widen_entry::deprecated },
   145     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::tod_type_name,             &search_constant_type_c::time_type_name,     widen_entry::deprecated },
   108     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name, widen_entry::deprecated },
   146     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,       widen_entry::deprecated },
   109     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::dt_type_name,              &search_constant_type_c::time_type_name, widen_entry::deprecated },        
   147     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::dt_type_name,              &search_constant_type_c::time_type_name,     widen_entry::deprecated },        
   110 
   148 
   111     /*******************************/
   149     /*******************************/
   112     /* SAFE version on the left... */
   150     /* SAFE version on the left... */
   113     /*******************************/
   151     /*******************************/
   114     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name, widen_entry::ok         },
   152     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,     widen_entry::ok         },
   115     { &search_constant_type_c::safedate_type_name,      &search_constant_type_c::date_type_name,            &search_constant_type_c::time_type_name, widen_entry::deprecated },
   153     { &search_constant_type_c::safedate_type_name,      &search_constant_type_c::date_type_name,            &search_constant_type_c::time_type_name,     widen_entry::deprecated },
   116     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name, widen_entry::deprecated },
   154     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
   117     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::tod_type_name,             &search_constant_type_c::time_type_name, widen_entry::deprecated },
   155     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::tod_type_name,             &search_constant_type_c::time_type_name,     widen_entry::deprecated },
   118     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name, widen_entry::deprecated },
   156     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,       widen_entry::deprecated },
   119     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::dt_type_name,              &search_constant_type_c::time_type_name, widen_entry::deprecated },        
   157     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::dt_type_name,              &search_constant_type_c::time_type_name,     widen_entry::deprecated },        
   120 
   158 
   121     /********************************/
   159     /********************************/
   122     /* SAFE version on the right... */
   160     /* SAFE version on the right... */
   123     /********************************/
   161     /********************************/
   124     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetime_type_name,            &search_constant_type_c::time_type_name, widen_entry::ok         },
   162     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetime_type_name,            &search_constant_type_c::time_type_name,     widen_entry::ok         },
   125     { &search_constant_type_c::date_type_name,          &search_constant_type_c::safedate_type_name,            &search_constant_type_c::time_type_name, widen_entry::deprecated },
   163     { &search_constant_type_c::date_type_name,          &search_constant_type_c::safedate_type_name,            &search_constant_type_c::time_type_name,     widen_entry::deprecated },
   126     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetime_type_name,            &search_constant_type_c::tod_type_name, widen_entry::deprecated },
   164     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetime_type_name,            &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
   127     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetod_type_name,             &search_constant_type_c::time_type_name, widen_entry::deprecated },
   165     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetod_type_name,             &search_constant_type_c::time_type_name,     widen_entry::deprecated },
   128     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safetime_type_name,            &search_constant_type_c::dt_type_name, widen_entry::deprecated },
   166     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safetime_type_name,            &search_constant_type_c::dt_type_name,       widen_entry::deprecated },
   129     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safedt_type_name,              &search_constant_type_c::time_type_name, widen_entry::deprecated },        
   167     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safedt_type_name,              &search_constant_type_c::time_type_name,     widen_entry::deprecated },        
   130 
   168 
   131     /*************************************/
   169     /*************************************/
   132     /* SAFE version on left and right... */
   170     /* SAFE version on left and right... */
   133     /*************************************/
   171     /*************************************/
   134     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetime_type_name,            &search_constant_type_c::safetime_type_name, widen_entry::ok         },
   172     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetime_type_name,            &search_constant_type_c::safetime_type_name, widen_entry::ok         },
   135     { &search_constant_type_c::safedate_type_name,      &search_constant_type_c::safedate_type_name,            &search_constant_type_c::safetime_type_name, widen_entry::deprecated },
   173     { &search_constant_type_c::safedate_type_name,      &search_constant_type_c::safedate_type_name,            &search_constant_type_c::safetime_type_name, widen_entry::deprecated },
   136     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetime_type_name,            &search_constant_type_c::safetod_type_name, widen_entry::deprecated },
   174     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetime_type_name,            &search_constant_type_c::safetod_type_name,  widen_entry::deprecated },
   137     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetod_type_name,             &search_constant_type_c::safetime_type_name, widen_entry::deprecated },
   175     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetod_type_name,             &search_constant_type_c::safetime_type_name, widen_entry::deprecated },
   138     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safetime_type_name,            &search_constant_type_c::safedt_type_name, widen_entry::deprecated },
   176     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safetime_type_name,            &search_constant_type_c::safedt_type_name,   widen_entry::deprecated },
   139     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safedt_type_name,              &search_constant_type_c::safetime_type_name, widen_entry::deprecated },        
   177     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safedt_type_name,              &search_constant_type_c::safetime_type_name, widen_entry::deprecated },        
   140 
   178 
   141     { NULL, NULL, NULL, widen_entry::ok },
   179     { NULL, NULL, NULL, widen_entry::ok },
   142 };
   180 };
   143 
   181 
   146 
   184 
   147 
   185 
   148 
   186 
   149 
   187 
   150 const struct widen_entry widen_MUL_table[] = {
   188 const struct widen_entry widen_MUL_table[] = {
   151     { &search_constant_type_c::time_type_name,          &search_constant_type_c::lreal_type_name,           &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   189 #define __multime(TYPE)       \
   152     { &search_constant_type_c::time_type_name,          &search_constant_type_c::real_type_name,            &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   190     { &search_constant_type_c::time_type_name,          &search_constant_type_c::TYPE##_type_name,           &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   153     { &search_constant_type_c::time_type_name,          &search_constant_type_c::dint_type_name,            &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   191     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::TYPE##_type_name,           &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   154     { &search_constant_type_c::time_type_name,          &search_constant_type_c::int_type_name,             &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   192     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safe##TYPE##_type_name,           &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   155     { &search_constant_type_c::time_type_name,          &search_constant_type_c::sint_type_name,            &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   193     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safe##TYPE##_type_name,           &search_constant_type_c::safetime_type_name, widen_entry::deprecated }, \
   156     { &search_constant_type_c::time_type_name,          &search_constant_type_c::ulint_type_name,           &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   194     /* NOTE: the standard des not explicitly support the following semantics. However, since 'multiplication' is supposed to be commutative, we add it anyway... */ \
   157     { &search_constant_type_c::time_type_name,          &search_constant_type_c::udint_type_name,           &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   195     { &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::time_type_name,           &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   158     { &search_constant_type_c::time_type_name,          &search_constant_type_c::uint_type_name,            &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   196     { &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::time_type_name,           &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   159     { &search_constant_type_c::time_type_name,          &search_constant_type_c::usint_type_name,           &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   197     { &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::safetime_type_name,           &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   160 
   198     { &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safetime_type_name,           &search_constant_type_c::safetime_type_name, widen_entry::deprecated },
   161     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::lreal_type_name,           &search_constant_type_c::safetime_type_name , widen_entry::ok         },
   199 
   162     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::real_type_name,            &search_constant_type_c::safetime_type_name , widen_entry::ok         },
   200     __ANY_NUM(__multime)
   163     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::dint_type_name,            &search_constant_type_c::safetime_type_name , widen_entry::ok         },
   201 #undef __multime
   164     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::int_type_name,             &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   165     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::sint_type_name,            &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   166     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::ulint_type_name,           &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   167     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::udint_type_name,           &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   168     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::uint_type_name,            &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   169     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::usint_type_name,           &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   170                                                                                                                                                                                  
       
   171     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safelreal_type_name,       &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   172     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safereal_type_name,        &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   173     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safedint_type_name,        &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   174     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safeint_type_name,         &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   175     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safesint_type_name,        &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   176     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safeulint_type_name,       &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   177     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safeudint_type_name,       &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   178     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safeuint_type_name,        &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   179     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safeusint_type_name,       &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   180 
   202 
   181     { NULL, NULL, NULL, widen_entry::ok },
   203     { NULL, NULL, NULL, widen_entry::ok },
   182 };
   204 };
   183 
   205 
       
   206 
       
   207 
       
   208 
       
   209 
   184 const struct widen_entry widen_DIV_table[] = {
   210 const struct widen_entry widen_DIV_table[] = {
   185     { &search_constant_type_c::time_type_name,          &search_constant_type_c::lreal_type_name,           &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   211 #define __divtime(TYPE)       \
   186     { &search_constant_type_c::time_type_name,          &search_constant_type_c::real_type_name,            &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   212     { &search_constant_type_c::time_type_name,          &search_constant_type_c::TYPE##_type_name,           &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   187     { &search_constant_type_c::time_type_name,          &search_constant_type_c::dint_type_name,            &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   213     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::TYPE##_type_name,           &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   188     { &search_constant_type_c::time_type_name,          &search_constant_type_c::int_type_name,             &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   214     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safe##TYPE##_type_name,           &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   189     { &search_constant_type_c::time_type_name,          &search_constant_type_c::sint_type_name,            &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   215     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safe##TYPE##_type_name,           &search_constant_type_c::safetime_type_name, widen_entry::deprecated },
   190     { &search_constant_type_c::time_type_name,          &search_constant_type_c::ulint_type_name,           &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   216     __ANY_NUM(__divtime)
   191     { &search_constant_type_c::time_type_name,          &search_constant_type_c::udint_type_name,           &search_constant_type_c::time_type_name     , widen_entry::deprecated },
   217 #undef __divtime
   192     { &search_constant_type_c::time_type_name,          &search_constant_type_c::uint_type_name,            &search_constant_type_c::time_type_name     , widen_entry::deprecated },
       
   193     { &search_constant_type_c::time_type_name,          &search_constant_type_c::usint_type_name,           &search_constant_type_c::time_type_name     , widen_entry::deprecated },
       
   194 
       
   195     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::lreal_type_name,           &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   196     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::real_type_name,            &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   197     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::dint_type_name,            &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   198     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::int_type_name,             &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   199     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::sint_type_name,            &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   200     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::ulint_type_name,           &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   201     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::udint_type_name,           &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   202     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::uint_type_name,            &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   203     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::usint_type_name,           &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   204                                                                                                                                                                                   
       
   205     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safelreal_type_name,       &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   206     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safereal_type_name,        &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   207     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safedint_type_name,        &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   208     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safeint_type_name,         &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   209     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safesint_type_name,        &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   210     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safeulint_type_name,       &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   211     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safeudint_type_name,       &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   212     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safeuint_type_name,        &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   213     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safeusint_type_name,       &search_constant_type_c::safetime_type_name , widen_entry::ok         },
       
   214 
   218 
   215     { NULL, NULL, NULL, widen_entry::ok },
   219     { NULL, NULL, NULL, widen_entry::ok },
   216  };
   220  };
   217 
   221 
   218  
   222