88 /******* TABLE 30: Functions of time data types *******/ |
88 /******* TABLE 30: Functions of time data types *******/ |
89 /**************************************************************/ |
89 /**************************************************************/ |
90 /**************************************************************/ |
90 /**************************************************************/ |
91 /**************************************************************/ |
91 /**************************************************************/ |
92 |
92 |
|
93 /* NOTE: IEC 61131-3 v2 declares that using implicit operations ('+', '-', '*', '/') on ANYTIME data types is |
|
94 * valid, but deprecated, suposedly meaning that they will be removed in the following version of the standard. |
|
95 * However, the current draft version of IEC 61131-3 v3 still allows this use, and no longer declares these |
|
96 * implicit operations as deprecated. |
|
97 * Because of this, and although we are implementing v2 of the standard, we will no longer mark these |
|
98 * operations as deprecated. |
|
99 */ |
|
100 #define ANYTIME_OPER_DEPRECATION_STATUS widen_entry::ok |
|
101 //#define ANYTIME_OPER_DEPRECATION_STATUS widen_entry::deprecated |
|
102 |
93 |
103 |
94 const struct widen_entry widen_ADD_table[] = { |
104 const struct widen_entry widen_ADD_table[] = { |
95 #define __add(TYPE) \ |
105 #define __add(TYPE) \ |
96 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
106 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
97 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
107 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
98 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
108 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
99 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok }, |
109 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok }, |
100 __ANY_NUM(__add) |
110 __ANY_NUM(__add) |
101 #undef __add |
111 #undef __add |
102 |
112 |
103 /*******************************************/ |
113 /*******************************************/ |
104 /*******************************************/ |
114 /*******************************************/ |
105 /*** Operations with TIME, DT and TOD... ***/ |
115 /*** Operations with TIME, DT and TOD... ***/ |
106 /*******************************************/ |
116 /*******************************************/ |
107 /*******************************************/ |
117 /*******************************************/ |
108 { &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, widen_entry::ok }, |
118 { &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, widen_entry::ok }, |
109 { &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, widen_entry::deprecated }, |
119 { &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
110 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
120 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
111 /* not currently supported by stage4, so it is best no tto add it for now... */ |
121 /* not currently supported by stage4, so it is best no tto add it for now... */ |
112 // { &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::tod_type_name, widen_entry::deprecated }, |
122 // { &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
113 { &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, widen_entry::deprecated }, |
123 { &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
114 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
124 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
115 /* not currently supported by stage4, so it is best no tto add it for now... */ |
125 /* not currently supported by stage4, so it is best no tto add it for now... */ |
116 // { &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::dt_type_name, widen_entry::deprecated }, |
126 // { &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
117 |
127 |
118 /*******************************/ |
128 /*******************************/ |
119 /* SAFE version on the left... */ |
129 /* SAFE version on the left... */ |
120 /*******************************/ |
130 /*******************************/ |
121 { &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, widen_entry::ok }, |
131 { &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, widen_entry::ok }, |
122 { &search_constant_type_c::safetod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, widen_entry::deprecated }, |
132 { &search_constant_type_c::safetod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
123 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
133 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
124 /* not currently supported by stage4, so it is best no tto add it for now... */ |
134 /* not currently supported by stage4, so it is best no tto add it for now... */ |
125 // { &search_constant_type_c::safetime_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::tod_type_name, widen_entry::deprecated }, |
135 // { &search_constant_type_c::safetime_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
126 { &search_constant_type_c::safedt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, widen_entry::deprecated }, |
136 { &search_constant_type_c::safedt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
127 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
137 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
128 /* not currently supported by stage4, so it is best no tto add it for now... */ |
138 /* not currently supported by stage4, so it is best no tto add it for now... */ |
129 // { &search_constant_type_c::safetime_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::dt_type_name, widen_entry::deprecated }, |
139 // { &search_constant_type_c::safetime_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
130 |
140 |
131 /********************************/ |
141 /********************************/ |
132 /* SAFE version on the right... */ |
142 /* SAFE version on the right... */ |
133 /********************************/ |
143 /********************************/ |
134 { &search_constant_type_c::time_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, widen_entry::ok }, |
144 { &search_constant_type_c::time_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, widen_entry::ok }, |
135 { &search_constant_type_c::tod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::tod_type_name, widen_entry::deprecated }, |
145 { &search_constant_type_c::tod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
136 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
146 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
137 /* not currently supported by stage4, so it is best no tto add it for now... */ |
147 /* not currently supported by stage4, so it is best no tto add it for now... */ |
138 // { &search_constant_type_c::time_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::tod_type_name, widen_entry::deprecated }, |
148 // { &search_constant_type_c::time_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
139 { &search_constant_type_c::dt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::dt_type_name, widen_entry::deprecated }, |
149 { &search_constant_type_c::dt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
140 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
150 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
141 /* not currently supported by stage4, so it is best no tto add it for now... */ |
151 /* not currently supported by stage4, so it is best no tto add it for now... */ |
142 // { &search_constant_type_c::time_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::dt_type_name, widen_entry::deprecated }, |
152 // { &search_constant_type_c::time_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
143 |
153 |
144 /*************************************/ |
154 /*************************************/ |
145 /* SAFE version on left and right... */ |
155 /* SAFE version on left and right... */ |
146 /*************************************/ |
156 /*************************************/ |
147 { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, widen_entry::ok }, |
157 { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, widen_entry::ok }, |
148 { &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetod_type_name, widen_entry::deprecated }, |
158 { &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetod_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
149 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
159 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
150 /* not currently supported by stage4, so it is best no tto add it for now... */ |
160 /* not currently supported by stage4, so it is best no tto add it for now... */ |
151 // { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetod_type_name, widen_entry::deprecated }, |
161 // { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetod_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
152 { &search_constant_type_c::safedt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safedt_type_name, widen_entry::deprecated }, |
162 { &search_constant_type_c::safedt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safedt_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
153 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
163 /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */ |
154 /* not currently supported by stage4, so it is best no tto add it for now... */ |
164 /* not currently supported by stage4, so it is best no tto add it for now... */ |
155 // { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::safedt_type_name, widen_entry::deprecated }, |
165 // { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::safedt_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
156 |
166 |
157 { NULL, NULL, NULL, widen_entry::ok }, |
167 { NULL, NULL, NULL, widen_entry::ok }, |
158 }; |
168 }; |
159 |
169 |
160 |
170 |
163 |
173 |
164 |
174 |
165 |
175 |
166 const struct widen_entry widen_SUB_table[] = { |
176 const struct widen_entry widen_SUB_table[] = { |
167 #define __sub(TYPE) \ |
177 #define __sub(TYPE) \ |
168 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
178 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
169 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
179 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
170 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
180 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
171 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok }, |
181 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok }, |
172 __ANY_NUM(__sub) |
182 __ANY_NUM(__sub) |
173 #undef __sub |
183 #undef __sub |
174 |
184 |
175 /*******************************************/ |
185 /*******************************************/ |
176 /*******************************************/ |
186 /*******************************************/ |
177 /*** Operations with TIME, DT and TOD... ***/ |
187 /*** Operations with TIME, DT and TOD... ***/ |
178 /*******************************************/ |
188 /*******************************************/ |
179 /*******************************************/ |
189 /*******************************************/ |
180 { &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, widen_entry::ok }, |
190 { &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, widen_entry::ok }, |
181 { &search_constant_type_c::date_type_name, &search_constant_type_c::date_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, |
191 { &search_constant_type_c::date_type_name, &search_constant_type_c::date_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
182 { &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, widen_entry::deprecated }, |
192 { &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
183 { &search_constant_type_c::tod_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, |
193 { &search_constant_type_c::tod_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
184 { &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, widen_entry::deprecated }, |
194 { &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
185 { &search_constant_type_c::dt_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, |
195 { &search_constant_type_c::dt_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
186 |
196 |
187 /*******************************/ |
197 /*******************************/ |
188 /* SAFE version on the left... */ |
198 /* SAFE version on the left... */ |
189 /*******************************/ |
199 /*******************************/ |
190 { &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, widen_entry::ok }, |
200 { &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, widen_entry::ok }, |
191 { &search_constant_type_c::safedate_type_name, &search_constant_type_c::date_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, |
201 { &search_constant_type_c::safedate_type_name, &search_constant_type_c::date_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
192 { &search_constant_type_c::safetod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, widen_entry::deprecated }, |
202 { &search_constant_type_c::safetod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
193 { &search_constant_type_c::safetod_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, |
203 { &search_constant_type_c::safetod_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
194 { &search_constant_type_c::safedt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, widen_entry::deprecated }, |
204 { &search_constant_type_c::safedt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
195 { &search_constant_type_c::safedt_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, |
205 { &search_constant_type_c::safedt_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
196 |
206 |
197 /********************************/ |
207 /********************************/ |
198 /* SAFE version on the right... */ |
208 /* SAFE version on the right... */ |
199 /********************************/ |
209 /********************************/ |
200 { &search_constant_type_c::time_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, widen_entry::ok }, |
210 { &search_constant_type_c::time_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, widen_entry::ok }, |
201 { &search_constant_type_c::date_type_name, &search_constant_type_c::safedate_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, |
211 { &search_constant_type_c::date_type_name, &search_constant_type_c::safedate_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
202 { &search_constant_type_c::tod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::tod_type_name, widen_entry::deprecated }, |
212 { &search_constant_type_c::tod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
203 { &search_constant_type_c::tod_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, |
213 { &search_constant_type_c::tod_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
204 { &search_constant_type_c::dt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::dt_type_name, widen_entry::deprecated }, |
214 { &search_constant_type_c::dt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
205 { &search_constant_type_c::dt_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, |
215 { &search_constant_type_c::dt_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
206 |
216 |
207 /*************************************/ |
217 /*************************************/ |
208 /* SAFE version on left and right... */ |
218 /* SAFE version on left and right... */ |
209 /*************************************/ |
219 /*************************************/ |
210 { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, widen_entry::ok }, |
220 { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, widen_entry::ok }, |
211 { &search_constant_type_c::safedate_type_name, &search_constant_type_c::safedate_type_name, &search_constant_type_c::safetime_type_name, widen_entry::deprecated }, |
221 { &search_constant_type_c::safedate_type_name, &search_constant_type_c::safedate_type_name, &search_constant_type_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
212 { &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetod_type_name, widen_entry::deprecated }, |
222 { &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetod_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
213 { &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetime_type_name, widen_entry::deprecated }, |
223 { &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
214 { &search_constant_type_c::safedt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safedt_type_name, widen_entry::deprecated }, |
224 { &search_constant_type_c::safedt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safedt_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
215 { &search_constant_type_c::safedt_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::safetime_type_name, widen_entry::deprecated }, |
225 { &search_constant_type_c::safedt_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
216 |
226 |
217 { NULL, NULL, NULL, widen_entry::ok }, |
227 { NULL, NULL, NULL, widen_entry::ok }, |
218 }; |
228 }; |
219 |
229 |
220 |
230 |
223 |
233 |
224 |
234 |
225 |
235 |
226 const struct widen_entry widen_MUL_table[] = { |
236 const struct widen_entry widen_MUL_table[] = { |
227 #define __mul(TYPE) \ |
237 #define __mul(TYPE) \ |
228 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
238 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
229 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
239 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
230 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
240 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
231 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok }, |
241 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok }, |
232 __ANY_NUM(__mul) |
242 __ANY_NUM(__mul) |
233 #undef __mul |
243 #undef __mul |
234 |
244 |
235 /*******************************************/ |
245 /*******************************************/ |
236 /*******************************************/ |
246 /*******************************************/ |
237 /*** Operations with TIME, DT and TOD... ***/ |
247 /*** Operations with TIME, DT and TOD... ***/ |
238 /*******************************************/ |
248 /*******************************************/ |
239 /*******************************************/ |
249 /*******************************************/ |
240 #define __multime(TYPE) \ |
250 #define __multime(TYPE) \ |
241 { &search_constant_type_c::time_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, \ |
251 { &search_constant_type_c::time_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \ |
242 { &search_constant_type_c::safetime_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, \ |
252 { &search_constant_type_c::safetime_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \ |
243 { &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 }, \ |
253 { &search_constant_type_c::time_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \ |
244 { &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 }, \ |
254 { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \ |
245 /* NOTE: the standard des not explicitly support the following semantics. However, since 'multiplication' is supposed to be commutative, we add it anyway... */ \ |
255 /* NOTE: the standard des not explicitly support the following semantics. However, since 'multiplication' is supposed to be commutative, we add it anyway... */ \ |
246 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, \ |
256 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \ |
247 { &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 }, \ |
257 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \ |
248 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, \ |
258 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \ |
249 { &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 }, |
259 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
250 __ANY_NUM(__multime) |
260 __ANY_NUM(__multime) |
251 #undef __multime |
261 #undef __multime |
252 |
262 |
253 { NULL, NULL, NULL, widen_entry::ok }, |
263 { NULL, NULL, NULL, widen_entry::ok }, |
254 }; |
264 }; |
257 |
267 |
258 |
268 |
259 |
269 |
260 const struct widen_entry widen_DIV_table[] = { |
270 const struct widen_entry widen_DIV_table[] = { |
261 #define __div(TYPE) \ |
271 #define __div(TYPE) \ |
262 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
272 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
263 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
273 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
264 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
274 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
265 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok }, |
275 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok }, |
266 __ANY_NUM(__div) |
276 __ANY_NUM(__div) |
267 #undef __div |
277 #undef __div |
268 |
278 |
269 /*******************************************/ |
279 /*******************************************/ |
270 /*******************************************/ |
280 /*******************************************/ |
271 /*** Operations with TIME, DT and TOD... ***/ |
281 /*** Operations with TIME, DT and TOD... ***/ |
272 /*******************************************/ |
282 /*******************************************/ |
273 /*******************************************/ |
283 /*******************************************/ |
274 #define __divtime(TYPE) \ |
284 #define __divtime(TYPE) \ |
275 { &search_constant_type_c::time_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, \ |
285 { &search_constant_type_c::time_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \ |
276 { &search_constant_type_c::safetime_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, widen_entry::deprecated }, \ |
286 { &search_constant_type_c::safetime_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \ |
277 { &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 }, \ |
287 { &search_constant_type_c::time_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \ |
278 { &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 }, |
288 { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, |
279 __ANY_NUM(__divtime) |
289 __ANY_NUM(__divtime) |
280 #undef __divtime |
290 #undef __divtime |
281 |
291 |
282 { NULL, NULL, NULL, widen_entry::ok }, |
292 { NULL, NULL, NULL, widen_entry::ok }, |
283 }; |
293 }; |
325 /**************************************************************/ |
335 /**************************************************************/ |
326 /**************************************************************/ |
336 /**************************************************************/ |
327 /* table used by AND and ANDN operators, and and_expression */ |
337 /* table used by AND and ANDN operators, and and_expression */ |
328 const struct widen_entry widen_AND_table[] = { |
338 const struct widen_entry widen_AND_table[] = { |
329 #define __and(TYPE) \ |
339 #define __and(TYPE) \ |
330 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
340 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
331 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
341 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
332 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
342 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
333 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok }, |
343 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok }, |
334 __ANY_BIT(__and) |
344 __ANY_BIT(__and) |
335 #undef __and |
345 #undef __and |
336 |
346 |
337 { NULL, NULL, NULL, widen_entry::ok }, |
347 { NULL, NULL, NULL, widen_entry::ok }, |
338 }; |
348 }; |
339 |
349 |
340 /* table used by OR and ORN operators, and or_expression */ |
350 /* table used by OR and ORN operators, and or_expression */ |
341 const struct widen_entry widen_OR_table[] = { |
351 const struct widen_entry widen_OR_table[] = { |
342 #define __or(TYPE) \ |
352 #define __or(TYPE) \ |
343 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
353 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
344 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
354 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
345 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
355 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
346 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok }, |
356 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok }, |
347 __ANY_BIT(__or) |
357 __ANY_BIT(__or) |
348 #undef __or |
358 #undef __or |
349 |
359 |
350 { NULL, NULL, NULL, widen_entry::ok }, |
360 { NULL, NULL, NULL, widen_entry::ok }, |
351 }; |
361 }; |
352 |
362 |
353 |
363 |
354 /* table used by XOR and XORN operators, and xor_expression */ |
364 /* table used by XOR and XORN operators, and xor_expression */ |
355 const struct widen_entry widen_XOR_table[] = { |
365 const struct widen_entry widen_XOR_table[] = { |
356 #define __xor(TYPE) \ |
366 #define __xor(TYPE) \ |
357 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
367 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
358 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
368 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
359 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
369 { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \ |
360 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok }, |
370 { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok }, |
361 __ANY_BIT(__xor) |
371 __ANY_BIT(__xor) |
362 #undef __xor |
372 #undef __xor |
363 |
373 |
364 { NULL, NULL, NULL, widen_entry::ok }, |
374 { NULL, NULL, NULL, widen_entry::ok }, |
365 }; |
375 }; |