cursor/printParentNames.c
static RDM_RETCODE printParentNames (RDM_CURSOR child)
{
char name[32];
RDM_CURSOR parent = NULL;
rc = rdm_cursorGetOwnerRow (child, REF_MOTHERS_CHILDREN, &parent);
if (rc == eNOTLINKED)
{
rc = sOKAY;
printf ("Unknown mother\n");
}
else if (rc == sOKAY)
{
parent, COL_ADULT_ADULT_NAME, name, sizeof (name), NULL);
if (rc == sOKAY)
{
printf ("Mother: %s\n", name);
}
}
if (rc == sOKAY)
{
rc = rdm_cursorGetOwnerRow (child, REF_FATHERS_CHILDREN, &parent);
}
if (rc == eNOTLINKED)
{
rc = sOKAY;
printf ("Unknown father\n");
}
else if (rc == sOKAY)
{
parent, COL_ADULT_ADULT_NAME, name, sizeof (name), NULL);
if (rc == sOKAY)
{
printf ("Father: %s\n", name);
}
}
rdm_cursorFree (parent);
return rc;
}