@@ -796,7 +796,8 @@ static void _parse_eatline(struct vcardparser_state *state)
796
796
static void _parse_prop (struct vcardparser_state * state )
797
797
{
798
798
int r = _parse_prop_name (state );
799
- fprintf (stderr , "_parse_prop_name: %d '%s'\n" , r , state -> prop ? vcardproperty_get_property_name (state -> prop ) : "" );
799
+
800
+ fprintf (stderr , "_parse_prop_name: %d '%s'\n" , r , state -> prop ? vcardproperty_get_property_name (state -> prop ) : "" );
800
801
if (r ) {
801
802
if (r == PE_PROP_MULTIGROUP ) {
802
803
vcardproperty_kind prop_kind = vcardproperty_isa (state -> prop );
@@ -868,6 +869,7 @@ static int _parse_vcard(struct vcardparser_state *state,
868
869
int r = 0 ;
869
870
870
871
while (* state -> p ) {
872
+ fprintf (stderr , "p: '%c'\n" , * state -> p );
871
873
/* whitespace is very skippable before AND afterwards */
872
874
if (* state -> p == '\r' || * state -> p == '\n' ||
873
875
* state -> p == ' ' || * state -> p == '\t' ) {
@@ -915,20 +917,23 @@ fprintf(stderr, "END val: '%s'\n", val);
915
917
/* special case mismatched card, the "start" was the start of
916
918
* the card */
917
919
state -> itemstart = cardstart ;
918
- fprintf (stderr , "BEGIN comp (%u) != END (%u)\n" ,
919
- vcardcomponent_isa (comp ), kind );
920
+ fprintf (stderr , "BEGIN comp (%u) != END (%u)\n" ,
921
+ vcardcomponent_isa (comp ), kind );
922
+ fprintf (stderr , "cardstart: '%s'\n" , cardstart );
920
923
r = PE_MISMATCHED_CARD ;
921
924
}
922
925
923
926
break ;
924
927
}
925
928
else {
929
+ fprintf (stderr , "add prop\n" );
926
930
vcardcomponent_add_property (comp , state -> prop );
927
931
state -> prop = NULL ;
928
932
}
929
933
}
930
934
931
935
if (state -> prop ) {
936
+ fprintf (stderr , "end of card\n" );
932
937
if (vcardproperty_isa (state -> prop ) != VCARD_END_PROPERTY ) {
933
938
r = PE_FINISHED_EARLY ;
934
939
}
@@ -1032,11 +1037,11 @@ vcardcomponent *vcardparser_parse_string(const char *str)
1032
1037
parser .root = NULL ;
1033
1038
}
1034
1039
}
1035
- else {
1036
- fprintf (stderr , "vcardparser_parse_string() failed: %s\n%s\n" ,
1037
- vcardparser_errstr (r ),
1038
- vcardcomponent_as_vcard_string (parser .root ));
1039
- }
1040
+ else {
1041
+ fprintf (stderr , "vcardparser_parse_string() failed: %s\n%s\n" ,
1042
+ vcardparser_errstr (r ),
1043
+ vcardcomponent_as_vcard_string (parser .root ));
1044
+ }
1040
1045
1041
1046
vcardparser_free (& parser );
1042
1047
0 commit comments