X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gedcom.y;h=e512aa6dd617665da3d53d60a61465971b041de5;hb=e9437eaf0195f6b397d55d0a4205f47afea0cd71;hp=7b8b2ef421440c6e4c36d4f0ea44dd76b6788729;hpb=a2f7d56476e81f8689d56e6a5641469f6497c487;p=gedcom-parse.git diff --git a/gedcom.y b/gedcom.y index 7b8b2ef..e512aa6 100644 --- a/gedcom.y +++ b/gedcom.y @@ -1,3 +1,12 @@ +/* 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. * + + (C) 2001 by The Genes Development Team + Original author: Peter Verthez (Peter.Verthez@advalvas.be) +*/ + /* $Id$ */ /* $Name$ */ @@ -123,6 +132,7 @@ %{ #include "gedcom.h" #include "multilex.h" +#include "encoding.h" int count_level = 0; int fail = 0; @@ -568,7 +578,8 @@ head_gedc_form_sect : OPEN DELIM TAG_FORM mand_line_item /* HEAD.CHAR */ head_char_sect : OPEN DELIM TAG_CHAR mand_line_item - { START(CHAR) } + { if (open_conv_to_internal($4) == 0) YYERROR; + START(CHAR) } head_char_subs { CHECK0 } CLOSE @@ -2110,7 +2121,7 @@ opt_line_item : /* empty */ { } | DELIM line_item { } ; -line_item : anychar { int i; +line_item : anychar { size_t i; CLEAR_BUFFER(string_buf); string_buf_ptr = string_buf; /* The following also takes care of '@@' */ @@ -2132,7 +2143,7 @@ line_item : anychar { int i; YYERROR; } else { - int i; + size_t i; /* The following also takes care of '@@' */ if (!strncmp($2, "@@", 3)) *string_buf_ptr++ = '@';