static svn_boolean_t is_valid_iproplist_skel(const svn_skel_t *skel) { int len = svn_skel__list_length(skel); if ((len >= 0) && (len & 1) == 0) { svn_skel_t *elt; for (elt = skel->children; elt; elt = elt->next) { if (!elt->is_atom) return FALSE; if (elt->next == NULL) return FALSE; elt = elt->next; if (! is_valid_proplist_skel(elt)) return FALSE; } return TRUE; } return FALSE; }
static svn_boolean_t is_valid_version_info_skel(const svn_skel_t *skel) { return (svn_skel__list_length(skel) == 5 && svn_skel__matches_atom(skel->children, "version") && skel->children->next->is_atom && skel->children->next->next->is_atom && skel->children->next->next->next->is_atom && skel->children->next->next->next->next->is_atom); }
static svn_boolean_t is_valid_conflict_skel(const svn_skel_t *skel) { int i; if (svn_skel__list_length(skel) != 8 || !svn_skel__matches_atom(skel->children, "conflict")) return FALSE; /* 5 atoms ... */ skel = skel->children->next; for (i = 5; i--; skel = skel->next) if (!skel->is_atom) return FALSE; /* ... and 2 version info skels. */ return (is_valid_version_info_skel(skel) && is_valid_version_info_skel(skel->next)); }