+/********************************************************************/
+/* C_DOUBLE_DATES_4 */
+/********************************************************************/
+
+void compat_date_start()
+{
+ if (compat_mode(C_DOUBLE_DATES_4)) {
+ reset_buffer(&compat_buffer);
+ compat_state[C_DOUBLE_DATES_4].i = 0;
+ }
+}
+
+int compat_double_date_check(char* year2)
+{
+ return (compat_mode(C_DOUBLE_DATES_4)
+ && !compat_state[C_DOUBLE_DATES_4].i
+ && strlen(year2) == 4);
+}
+
+int compat_double_date_final(struct date_value* dv, const char** curr_line)
+{
+ char* compat_line_value = get_buf_string(&compat_buffer);
+ compat_state[C_DOUBLE_DATES_4].i = 1;
+ if (compat_line_value && compat_line_value[0]
+ && (dv->type == DV_NO_MODIFIER || dv->type == DV_ABOUT)
+ && dv->date1.day == -1
+ && dv->date1.month == -1) {
+ gedcom_warning(_("Converting '%s' to standard '%s'"),
+ *curr_line, compat_line_value);
+ *curr_line = compat_line_value;
+ }
+ return 1;
+}
+
+int compat_date_check(struct date_value* dv, const char** curr_line)
+{
+ if (compat_mode(C_DOUBLE_DATES_4)
+ && compat_double_date_final(dv, curr_line)) {
+ return 1;
+ }
+ else {
+ return 0;
+ }
+}
+