From: Peter Verthez Date: Tue, 28 Jan 2003 17:32:53 +0000 (+0000) Subject: Don't lose the HEAD.TIME section of lifelines. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=6190c7618fa60d3827fe7414925a66c694ca2047;p=gedcom-parse.git Don't lose the HEAD.TIME section of lifelines. --- diff --git a/gedcom/gedcom.y b/gedcom/gedcom.y index 41c5935..9eadd44 100644 --- a/gedcom/gedcom.y +++ b/gedcom/gedcom.y @@ -646,6 +646,8 @@ head_date_sect : OPEN DELIM TAG_DATE mand_line_item $$ = start_element(ELT_HEAD_DATE, PARENT, $1, $3, $4, GEDCOM_MAKE_DATE(val1, dv)); + if (compat_mode(C_HEAD_TIME)) + compat_save_head_date_context($$); START(DATE, $1, $$) } head_date_subs @@ -679,9 +681,15 @@ head_date_time_sect : OPEN DELIM TAG_TIME mand_line_item ; /* HEAD.TIME (Only for compatibility) */ -/* Just ignore the time... */ -head_time_sect : OPEN DELIM TAG_TIME opt_line_item CLOSE - { gedcom_warning(_("Header change time lost in the compatibility")); +head_time_sect : OPEN DELIM TAG_TIME opt_line_item + { if (compat_mode(C_HEAD_TIME)) { + $$ = compat_generate_head_time_start($1, $3, $4); + } + } + CLOSE + { if (compat_mode (C_HEAD_TIME)) { + compat_generate_head_time_end($5); + } } ;